:root { 
    --primary: #0ea5e9; 
    --primary-hover: #0284c7; 
    --dark: #0f172a; 
    --light: #f8fafc; 
    --gray: #64748b; 
    --card-bg: #ffffff; 
    --border: #e2e8f0; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Tahoma, sans-serif; 
}

/* 🎯 STICKY FOOTER SETUP */
html {
    height: 100%;
}

body { 
    background-color: var(--light); 
    color: var(--dark); 
    line-height: 1.6; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 📌 HEADER - ΜΕΝΕΙ ΠΑΝΤΑ ΣΤΗΝ ΚΟΡΥΦΗ */
header { 
    background-color: var(--dark); 
    color: white; 
    padding: 1rem 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
}

.logo { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: white; 
    text-decoration: none; 
}

.logo span { 
    color: var(--primary); 
}

nav { 
    display: flex; 
    align-items: center; 
    gap: 1.2rem; 
}

nav button { 
    background: none; 
    border: none; 
    color: #cbd5e1; 
    cursor: pointer; 
    font-size: 0.95rem; 
    font-weight: 500; 
    transition: color 0.2s; 
}

nav button:hover { 
    color: white; 
}

nav button.btn-primary { 
    background: var(--primary); 
    color: white; 
    padding: 0.4rem 0.9rem; 
    border-radius: 4px; 
    font-weight: 600; 
}

nav button.btn-primary:hover { 
    background: var(--primary-hover); 
}

.hero { 
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    color: white; 
    text-align: center; 
    padding: 2.5rem 1rem; 
    transition: all 0.3s ease; 
}

.hero h1 { 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
}

.hero p { 
    font-size: 1.2rem; 
    color: #cbd5e1; 
    max-width: 950px; 
    margin: 0 auto; 
}

/* 🔍 ΔΙΑΧΕΙΡΙΣΗ ΑΝΑΖΗΤΗΣΗΣ DOMAIN */
.search-box-container {
    max-width: 750px;
    width: 90%;
    margin: 2.5rem auto 0;
    background: white;
    padding: 0.6rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}

.search-box-container input {
    flex: 1;
    border: none;
    padding: 0.8rem;
    font-size: 1rem;
    outline: none;
    border-radius: 6px;
    color: var(--dark);
}

.search-box-container select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    background: var(--light);
    font-weight: bold;
    color: var(--dark);
    outline: none;
}

.search-box-container button {
    width: auto;
    background: var(--primary);
    padding: 0.8rem 2rem;
}

/* 🌐 CONTAINER - ΑΠΛΩΝΕΙ ΣΤΗΝ 27" ΟΘΟΝΗ ΚΑΙ ΠΙΕΖΕΙ ΤΟ FOOTER ΚΑΤΩ */
main.container { 
    flex: 1 0 auto; /* 🎯 Γεμίζει όλο τον διαθέσιμο χώρο καθ' ύψος */
    width: 95%;
    max-width: 1550px; 
    margin: 2rem auto; 
    padding: 0 1rem; 
    text-align: center; 
    box-sizing: border-box;
}

.tabs-container { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    margin-bottom: 2rem; 
    border-bottom: 2px solid var(--border); 
    gap: 0.5rem; 
}

/* 📱 Οριζόντιο Swipe για όλους τους πίνακες */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 700px; 
}

.tab-btn { 
    background: none; 
    border: none; 
    padding: 0.8rem 1.2rem; 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--gray); 
    cursor: pointer; 
    transition: all 0.3s; 
    position: relative; 
}

.tab-btn:hover { 
    color: var(--dark); 
}

.tab-btn.active { 
    color: var(--primary); 
}

.tab-btn.active::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    width: 100%; 
    height: 2px; 
    background-color: var(--primary); 
}

.pricing-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); 
    gap: 2rem; 
}

.card { 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 2.5rem 2rem; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative; 
    transition: transform 0.3s, box-shadow 0.3s; 
}

.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
}

.card.popular { 
    border-color: var(--primary); 
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2); 
}

.popular-badge { 
    position: absolute; 
    top: -12px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--primary); 
    color: white; 
    padding: 0.25rem 1rem; 
    font-size: 0.8rem; 
    border-radius: 20px; 
    font-weight: bold; 
}

.card h3 { 
    font-size: 1.4rem; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    color: var(--dark); 
}

.price { 
    font-size: 2.2rem; 
    font-weight: bold; 
    color: var(--dark); 
    margin-bottom: 1.5rem; 
}

.price span { 
    font-size: 1rem; 
    color: var(--gray); 
    font-weight: normal; 
}

.features-list { 
    list-style: none; 
    text-align: left; 
    margin-bottom: 2rem; 
    flex-grow: 1; 
}

.features-list li { 
    margin-bottom: 0.75rem; 
    font-size: 0.95rem; 
    color: #475569; 
    display: flex; 
    align-items: center; 
}

.features-list li::before { 
    content: "✓"; 
    color: #22c55e; 
    font-weight: bold; 
    margin-right: 10px; 
}

.btn { 
    display: block; 
    background-color: var(--dark); 
    color: white; 
    border: none; 
    padding: 0.75rem 1.5rem; 
    border-radius: 6px; 
    font-weight: 600; 
    cursor: pointer; 
    width: 100%; 
    transition: background 0.2s; 
}

.btn:hover { 
    background-color: #1e293b; 
}

.card.popular .btn { 
    background-color: var(--primary); 
}

.card.popular .btn:hover { 
    background-color: var(--primary-hover); 
}

.panel { 
    display: none; 
    text-align: left; 
    background: white; 
    padding: 2rem; 
    border-radius: 12px; 
    border: 1px solid var(--border); 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 1rem; 
}

th, td { 
    padding: 1rem; 
    border-bottom: 1px solid var(--border); 
    text-align: left; 
}

th { 
    background: #f1f5f9; 
    font-weight: 600; 
}

.input-group { 
    margin-bottom: 1rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.3rem; 
}

.input-group label { 
    font-weight: 600; 
    font-size: 0.9rem; 
    color: var(--gray); 
}

.input-group input, .input-group select, .input-group textarea { 
    padding: 0.7rem; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
}

.badge { 
    padding: 0.3rem 0.8rem; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    color: white; 
    display: inline-block; 
}

.bg-warning { background: #f59e0b; } 
.bg-success { background: #10b981; } 
.bg-danger { background: #ef4444; }
.bg-gray { background: #64748b; }
.bg-info { background: #0ea5e9; }

/* 🎯 FOOTER ΜΕΝΕΙ ΠΑΝΤΑ ΣΤΟ ΤΕΡΜΑ ΚΑΤΩ ΜΕΡΟΣ */
footer { 
    flex-shrink: 0;
    background-color: var(--dark); 
    color: #94a3b8; 
    text-align: center; 
    padding: 1.5rem 1rem; 
    margin-top: auto; 
}

/* --- 💻 ΔΙΑΧΕΙΡΙΣΗ ΜΕΓΑΛΩΝ ΟΘΟΝΩΝ (24" & 27"+) --- */
@media (min-width: 1200px) {
    #view-admin.panel {
        max-width: 100%; 
    }
    .tabs-container {
        display: flex !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        justify-content: center !important; 
        gap: 1.5rem !important;
    }
}

@media (min-width: 1600px) {
    .pricing-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* --- 📱 ΔΙΟΡΘΩΣΗ ΓΙΑ MOBILE (RESPONSIVE) --- */
.ham-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    header {
        position: relative;
        justify-content: space-between;
        padding: 1rem 1.5rem;
    }

    .ham-toggle {
        display: block;
    }

    #nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0f172a;
        padding: 1rem 0;
        border-top: 1px solid #1e293b;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
        z-index: 9999;
        text-align: center;
        gap: 1rem;
    }

    #nav-menu.open {
        display: flex;
    }

    #nav-menu button {
        width: 90%;
        margin: 0 auto;
    }
    
    #nav-menu span {
        display: block;
        margin-bottom: 0.5rem;
    }

    .search-box-container {
        display: flex !important;
        flex-direction: column !important;
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        margin: 1.5rem auto 0 !important;
        padding: 0.8rem !important;
        gap: 0.6rem !important;
        box-sizing: border-box !important;
    }

    .search-box-container input,
    .search-box-container select,
    .search-box-container button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.8rem !important;
    }

    .search-box-container select {
        text-align-last: center;
    }

    .tabs-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .tab-btn {
        white-space: nowrap !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        background: #f1f5f9;
        border-radius: 20px;
        border: 1px solid #e2e8f0;
    }

    .tab-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    table {
        min-width: 650px;
    }
}

/* 🎨 CUSTOM HOSTINGLAB MODAL SYSTEM */
#hl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#hl-modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 440px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

/* ==========================================
   🖥️ DESKTOP DEFAULTS
   ========================================== */
.compare-tabs-wrapper,
#compare-mobile-cta-wrapper {
    display: none !important;
}

.compare-table {
    width: 100% !important;
    table-layout: auto !important;
}

.compare-table th,
.compare-table td {
    display: table-cell !important;
    width: auto !important;
    text-align: center !important;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left !important;
}


/* ==========================================
   🖥️ DESKTOP vs 📱 MOBILE COMPARISON VIEW
   ========================================== */

/* Προεπιλογή Desktop: Εμφάνιση Desktop Πίνακα, Απόκρυψη Mobile */
.mobile-comparison-view {
    display: none !important;
}

.desktop-comparison-view {
    display: block !important;
    overflow-x: auto;
}

/* 📱 MOBILE VIEW (Οθόνες <= 768px) */
@media (max-width: 768px) {

    .desktop-comparison-view {
        display: none !important;
    }

    .mobile-comparison-view {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 1. Swipe Tabs στην Κορυφή (Μόνο αυτά κάνουν Scroll) */
    .compare-tabs-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.6rem 0.8rem !important;
        gap: 0.5rem !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px 8px 0 0 !important;
    }

    .compare-tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        background: transparent !important;
        color: #475569 !important;
        border: none !important;
        padding: 0.5rem 1rem !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        font-size: 0.85rem !important;
        cursor: pointer !important;
    }

    .compare-tab-btn.active {
        background: #e2e8f0 !important;
        color: #0f172a !important;
    }

    /* 2. Mobile Spec Groups (Τίτλοι Ενοτήτων) */
    .mobile-spec-group {
        width: 100% !important;
        background: #f1f5f9 !important;
        padding: 0.65rem 0.8rem !important;
        font-size: 0.85rem !important;
        font-weight: bold !important;
        color: #0f172a !important;
        border-left: 1px solid #e2e8f0 !important;
        border-right: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-sizing: border-box !important;
        text-align: left !important;
    }

    /* 3. Mobile Spec Rows (Γραμμή 2 Στηλών με Flexbox) */
    .mobile-spec-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.7rem 0.8rem !important;
        background: #ffffff !important;
        border-left: 1px solid #e2e8f0 !important;
        border-right: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
        box-sizing: border-box !important;
    }

    /* Αριστερός Τίτλος Χαρακτηριστικού */
    .mobile-spec-title {
        text-align: left !important;
        font-size: 0.82rem !important;
        color: #475569 !important;
        padding-right: 0.5rem !important;
        word-break: break-word !important;
    }

    /* Δεξιά Τιμή (Κολλάει Τέρμα Δεξιά, Έντονη) */
    .mobile-spec-val {
        text-align: right !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin-left: auto !important;
        white-space: nowrap !important;
    }
}

/* ==========================================
   🎯 ΔΙΟΡΘΩΣΗ HERO SEARCH & ΚΑΤΗΓΟΡΙΩΝ (ΧΩΡΙΣ ΝΑ ΠΕΙΡΑΧΤΕΙ Ο ΠΙΝΑΚΑΣ)
   ========================================== */
@media (max-width: 768px) {

    /* Input & .gr στην ίδια γραμμή */
    .domain-input-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    .domain-input-group input {
        flex: 1 1 70% !important;
    }

    .domain-input-group select {
        flex: 0 0 30% !important;
    }

    /* Κατηγορίες σε 1 οριζόντια γραμμή */
    .category-tabs-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
    }
}

/* ==========================================
   📱 CATEGORY TABS FIX (SINGLE ROW SCROLL)
   ========================================== */
@media (max-width: 768px) {
    #category-tabs-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0.2rem !important;
        margin-bottom: 1.5rem !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #category-tabs-container button,
    #category-tabs-container .tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }
}
/* ==========================================
   🔍 HERO DOMAIN SEARCH (DESKTOP vs MOBILE)
   ========================================== */

/* 🖥️ DESKTOP: Όλα σε 1 οριζόντια γραμμή */
.domain-search-wrapper {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.domain-search-wrapper input {
    flex: 1 !important;
    padding: 0.8rem 1rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
}

.domain-search-wrapper select {
    width: 90px !important;
    padding: 0.8rem 0.4rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    background: #f8fafc !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.domain-search-wrapper .domain-btn {
    width: auto !important; /* Μαζεύει το κουμπί στο Desktop */
    padding: 0.8rem 1.8rem !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
}

/* 📱 MOBILE (<= 768px): Input + Select στη γραμμή 1, Κουμπί στη γραμμή 2 */
@media (max-width: 768px) {
    .domain-search-wrapper {
        flex-wrap: wrap !important;
    }

    .domain-search-wrapper input {
        flex: 1 1 65% !important;
    }

    .domain-search-wrapper select {
        flex: 0 0 28% !important;
        width: auto !important;
    }

    .domain-search-wrapper .domain-btn {
        width: 100% !important; /* Πιάσε όλο το πλάτος στο mobile */
        margin-top: 0.2rem !important;
    }
}

/* ==========================================
   🔐 LOGGED-IN USER DASHBOARD & PROFILE MOBILE FIXES
   ========================================== */
@media (max-width: 768px) {

    /* 1. ΣΤΟΙΒΑΞΗ ΠΕΔΙΩΝ ΦΟΡΜΑΣ ΣΕ 1 ΣΤΗΛΗ (Ονομα/Επώνυμο, Πόλη/ΤΚ) */
    #view-profile div[style*="grid-template-columns"],
    #view-register-complete div[style*="grid-template-columns"],
    #view-login div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important; /* Μετατροπή από 2 στήλες σε 1 */
        gap: 0.8rem !important;
    }

    /* Προσαρμογή πλαισίου Panel στο πλάτος του κινητού */
    .panel, 
    #view-profile, 
    #view-user, 
    #view-login {
        padding: 1.2rem 0.8rem !important;
        margin: 1rem auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2. ΚΑΘΑΡΟ & ΟΜΑΛΟ SCROLL ΣΤΟΥΣ ΠΙΝΑΚΕΣ ΧΡΗΣΤΗ */
    #view-user table,
    #user-services table,
    #user-tickets-section table {
        width: 100% !important;
        font-size: 0.82rem !important;
    }

    #view-user table th,
    #view-user table td {
        padding: 0.6rem 0.4rem !important;
        white-space: nowrap !important; /* Εμποδίζει το άσχημο σπάσιμο λέξεων */
    }

    /* Ενίσχυση του wrapper για οριζόντιο swipe στους πίνακες */
    #user-services > div,
    #user-tickets-section > div[style*="overflow-x"] {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 8px !important;
    }

    /* Κουμπιά tabs στον Πίνακα Χρήστη */
    #view-user .tabs-container {
        display: flex !important;
        justify-content: center !important;
        gap: 0.4rem !important;
    }

    #view-user .tab-btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.9rem !important;
    }
}