/* style.css - Επαναφορά έκδοσης πριν το Dark Mode */

/* ------------------------------------------- */
/* --- 1. ΓΕΝΙΚΕΣ ΡΥΘΜΙΣΕΙΣ & ΧΡΩΜΑΤΑ --- */
/* ------------------------------------------- */
:root {
    --primary-color: #007bff; /* Μπλε */
    --success-color: #28a745; /* Πράσινο */
    --error-color: #dc3545; /* Κόκκινο */
    --sidebar-bg: #2c3e50; /* Σκούρο Μπλε */
    --text-light: #ecf0f1;
    --text-dark: #333;
    --bg-light: #f0f4f8;
    --card-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-light) 0%, #d9e2ec 100%);
    height: 100vh;
    overflow: hidden; 
}

/* ------------------------------------------- */
/* --- 2. AUTHENTICATION FORMS (index.html) --- */
/* ------------------------------------------- */
#auth-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 350px;
    max-width: 90%;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-view h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.auth-view form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px; 
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.auth-view button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    margin-top: 15px;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85em;
    display: block;
    margin-bottom: 10px;
    height: 15px;
}

/* ------------------------------------------- */
/* --- 3. DASHBOARD LAYOUT & SIDEBAR --- */
/* ------------------------------------------- */
#dashboard-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
}
#sidebar.collapsed { width: 70px; }
#sidebar .logo { color: var(--primary-color); }
#sidebar ul { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
#sidebar ul li a {
    display: flex; align-items: center; padding: 15px 20px; color: var(--text-light);
    font-size: 1.1em; transition: background-color 0.3s, color 0.3s;
}
#sidebar.collapsed ul li a span { display: none; }
#sidebar ul li a:hover, #sidebar ul li a.active {
    background-color: #34495e; color: var(--primary-color); border-left: 5px solid var(--primary-color); padding-left: 15px; 
}

/* Sidebar Toggle Button (Fixed Position) */
#sidebar-toggle {
    background-color: var(--primary-color); color: white; border: none; border-radius: 5px;
    width: 45px; height: 45px; position: fixed; top: 10px; left: 10px; 
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); z-index: 1001;
}

/* Main Content Area */
#main-content-area {
    flex-grow: 1; 
    padding: 20px;
    overflow-y: auto; 
}
#navbar {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

/* ------------------------------------------- */
/* --- 4. DASHBOARD UI ELEMENTS --- */
/* ------------------------------------------- */
/* Info Cards */
#info-cards-container { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.info-card { background: var(--card-bg); padding: 20px 30px; border-radius: 10px; flex: 1; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); }
.total-customers-value { color: var(--primary-color); display: flex; justify-content: space-between; }
.total-customers-value i { color: var(--primary-color); background: #e6f0ff; }

/* Controls */
.controls-section { background: var(--card-bg); padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.search-controls { display: flex; justify-content: space-between; align-items: center; }
.export-buttons .excel-btn { background-color: var(--success-color); color: white; border: none; }
.export-buttons .csv-btn { background-color: var(--error-color); color: white; border: none; }

/* Table & CRUD */
#customers-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
#customers-table th { background-color: #f2f2f2; cursor: pointer; user-select: none; }
.customer-avatar { background-color: var(--primary-color); }
.action-btn { color: var(--primary-color); }
.delete-btn { color: var(--error-color); }
.customer-info-cell { display: flex; align-items: center; }

/* Status Badges */
.status-active { background-color: #e6fef2; color: var(--success-color); }
.status-inactive { background-color: #fff0f0; color: var(--error-color); }

/* ------------------------------------------- */
/* --- 5. TOAST NOTIFICATIONS & MODAL --- */
/* ------------------------------------------- */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px;
}
.toast {
    opacity: 0; transform: translateX(100%); transition: opacity 0.3s ease, transform 0.3s ease;
    background-color: #333; color: white; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 250px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background-color: var(--success-color); }
.toast.error { background-color: var(--error-color); }

/* ------------------------------------------- */
/* --- 6. RESPONSIVE DESIGN (MOBILE) --- */
/* ------------------------------------------- */
/* style.css (Αντικαταστήστε το block 7) */

/* ------------------------------------------- */
/* --- 7. RESPONSIVE DESIGN (MOBILE) --- */
/* ------------------------------------------- */
@media (max-width: 900px) {
    /* Layout Fixes */
    body { 
        overflow-y: auto; 
        height: auto; 
        /* Πρέπει να επιτρέψουμε την κύλιση, καθώς το sidebar είναι πλέον μέρος του layout */
    }
    #dashboard-wrapper { 
        /* Ενεργοποιούμε το flexbox ξανά για να είναι το sidebar δίπλα στο περιεχόμενο */
        flex-direction: row; 
        min-height: 100vh;
        width: 100%;
        overflow-x: hidden; /* Αποφυγή οριζόντιας κύλισης */
    }
    
    /* Sidebar: Τώρα είναι ΜΟΝΙΜΑ ΜΙΚΡΟ και ΜΕΡΟΣ του layout */
    #sidebar { 
        width: 70px; /* Σταθερό μικρό πλάτος */
        position: static; /* Αφαιρούμε το fixed/absolute */
        height: 100vh; /* Να πιάνει όλο το ύψος */
        flex-shrink: 0;
        /* Εφαρμογή των collapsed styles */
    }

    /* Κρύβουμε τον Toggle Button (δεν χρειάζεται πλέον) */
    #sidebar-toggle {
        display: none; 
    }

    /* Main Content Adjustment */
    #main-content-area { 
        padding-top: 20px; /* Αφαιρούμε το padding για το fixed toggle */
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Εφαρμογή Collapsed Styles (τα οποία είναι ήδη στο style.css) */
    #sidebar .logo { display: none; } /* Κρύβουμε το logo */
    #sidebar ul li a { justify-content: center; padding: 15px 0; }
    #sidebar ul li a span { display: none; }
    #sidebar ul li a i { margin-right: 0; }

    /* Controls Stack */
    .search-controls { flex-direction: column-reverse; align-items: stretch; gap: 15px; }
    .search-controls > div { width: 100%; }
    
    /* Table Fix */
    #customers-view { overflow-x: auto; }
    #customers-table { min-width: 700px; } 
    #info-cards-container { flex-direction: column; }
}
