/**
 * CSS για Φροντιστήριο Management App
 * Minimal & Clean Design για 2025
 * Χρωματική Παλέτα: Μπλε (#2563eb), Γκρι (#6b7280), Λευκό (#ffffff)
 */

/* Reset και βασικές ρυθμίσεις */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
    font-size: 14px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

/* Κουμπιά - Modern Design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

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

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-outline {
    background-color: transparent;
    color: #2563eb;
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: #2563eb;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    color: #2563eb;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Main Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h2 {
    color: #2563eb;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-header p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    border-left-color: #2563eb;
}

.nav-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
}

.nav-item i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 1.5rem;
    background-color: #f9fafb;
}

/* Header */
.content-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-title h1 {
    margin-bottom: 0.25rem;
}

.header-title p {
    color: #6b7280;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.card-header h3 {
    margin: 0;
    color: #111827;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Stats Cards για Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue { background: #2563eb; }
.stat-icon.green { background: #10b981; }
.stat-icon.yellow { background: #f59e0b; }
.stat-icon.red { background: #ef4444; }

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #111827;
}

.stat-content p {
    color: #6b7280;
    margin: 0;
}

/* Πίνακες */
.table-container {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f9fafb;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 1rem;
    padding: 0;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f9fafb;
}

/* Search και Filters */
.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.search-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.search-input {
    flex: 1;
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.schedule-header {
    background: #2563eb;
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.schedule-time {
    background: #f3f4f6;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 500;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-cell {
    background: white;
    min-height: 80px;
    padding: 0.5rem;
    position: relative;
}

.schedule-lesson {
    background: #2563eb;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    height: 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.schedule-lesson:hover {
    transform: scale(1.02);
}

.lesson-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.lesson-info {
    opacity: 0.9;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .schedule-grid {
        grid-template-columns: 60px repeat(7, minmax(80px, 1fr));
        font-size: 0.75rem;
    }
    
    .modal-content {
        margin: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .header-actions,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Dark Mode Support (για μελλοντική χρήση) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
        color: #f9fafb;
    }
    
    .card,
    .sidebar,
    .modal-content {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .form-control {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
}