/**
 * PHP Admin Panel Styles - Modern Edition
 * Σύγχρονο και κομψό design για το admin panel
 */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Clean Black & White Theme */
    --primary-color: #1a1a1a;
    --primary-dark: #000000;
    --primary-light: #333333;

    /* Action Colors - Monochrome */
    --color-blue: #1a1a1a;
    --color-blue-dark: #000000;
    --color-red: #dc3545;
    --color-red-dark: #c82333;
    --color-green: #28a745;
    --color-green-dark: #218838;
    --color-orange: #fd7e14;
    --color-orange-dark: #e96b02;
    --color-gray: #6c757d;
    --color-gray-dark: #495057;

    /* Status Colors - Keep for functionality */
    --status-pending: var(--color-orange);
    --status-confirmed: #17a2b8;
    --status-completed: var(--color-green);
    --status-cancelled: var(--color-red);

    /* Neutral Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    --border-color: #dee2e6;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== LOGIN PAGE ====== */
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(100, 100, 100, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--bg-secondary);
    padding: 50px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header i {
    color: var(--color-gray);
    margin-bottom: 20px;
    animation: rotate 2s ease-in-out;
}

@keyframes rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

.login-header h2 {
    color: var(--text-primary);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1.05em;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.login-form label i {
    margin-right: 8px;
    color: var(--color-gray);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    transition: all var(--transition-normal);
    background: var(--bg-primary);
}

.login-form input:hover {
    border-color: var(--text-light);
}

.login-form input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
    background: var(--bg-secondary);
}

.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    margin-top: 10px;
    font-weight: 700;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.back-link:hover {
    color: var(--color-blue);
    background: var(--bg-primary);
}

.login-page-footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

/* ====== ADMIN LAYOUT ====== */
.admin-body {
    background: #f5f5f5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ====== HEADER ====== */
.admin-header {
    background: #ffffff;
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-header h1 {
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #000000;
    margin: 0;
}

.admin-header h1 i {
    color: #000000;
    font-size: 1.1em;
}

.header-title {
    display: inline-block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    color: #333333;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
}

.user-name i {
    color: #666666;
}

/* ====== NAVIGATION BAR ====== */
.admin-nav {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
}

.nav-content {
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    display: flex;
    gap: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    color: #666666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link i {
    font-size: 1em;
}

.nav-link:hover {
    color: #000000;
    background: #fafafa;
}

.nav-link.active {
    color: #000000;
    font-weight: 600;
    border-bottom: 3px solid #000000;
}

.nav-link.active i {
    color: #000000;
}

.admin-main {
    max-width: 100%;
    margin: 0 auto;
    padding: 30px 40px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-footer {
    background: var(--primary-color);
    color: white;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 3px solid #666666;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--color-blue);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.footer-links a:hover {
    color: var(--color-blue-dark);
    text-decoration: underline;
}

/* ====== BUTTONS ====== */
.btn {
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn i {
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--color-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-logout:hover {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
    padding: 9px 18px;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
}

.btn-edit:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-delete {
    background: var(--color-red);
    color: white;
    padding: 9px 18px;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-delete:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Success Button - Green */
.btn-success {
    background: var(--color-green);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    background: var(--color-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Warning Button - Orange */
.btn-warning {
    background: var(--color-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.btn-warning:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* Danger Button - Red (alias for delete) */
.btn-danger {
    background: var(--color-red);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    color: var(--color-blue);
    border: 2px solid var(--color-blue);
}

.btn-outline-primary:hover {
    background: var(--color-blue);
    color: white;
}

.btn-outline-success {
    background: transparent;
    color: var(--color-green);
    border: 2px solid var(--color-green);
}

.btn-outline-success:hover {
    background: var(--color-green);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    color: var(--color-red);
    border: 2px solid var(--color-red);
}

.btn-outline-danger:hover {
    background: var(--color-red);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none;
}

/* ====== ALERTS ====== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.4s ease-out;
    box-shadow: var(--shadow-sm);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert i {
    font-size: 1.4em;
    flex-shrink: 0;
}

.alert-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #721c24;
    border-top: 3px solid var(--status-cancelled);
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #155724;
    border-top: 3px solid var(--status-completed);
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #856404;
    border-top: 3px solid var(--status-pending);
}

/* ====== FORMS ====== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--color-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    font-family: inherit;
    transition: all var(--transition-normal);
    background: var(--bg-secondary);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
    background: var(--bg-secondary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ====== DASHBOARD ====== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Filters Section */
.filters-section {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(100, 100, 100, 0.1);
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.filter-group label i {
    color: var(--color-gray);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-today:hover {
    border-color: var(--color-blue);
}

.stat-pending:hover {
    border-color: var(--status-pending);
}

.stat-confirmed:hover {
    border-color: var(--status-confirmed);
}

.stat-icon {
    font-size: 3em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.stat-today .stat-icon {
    color: var(--color-blue);
}

.stat-pending .stat-icon {
    color: var(--status-pending);
}

.stat-confirmed .stat-icon {
    color: var(--status-confirmed);
}

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-content h3 {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* Appointments Section */
.appointments-section {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(100, 100, 100, 0.1);
}

.appointments-section h2 {
    color: var(--text-primary);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6em;
    font-weight: 700;
}

.appointments-section h2 i {
    color: var(--color-gray);
}

.count-badge {
    background: var(--color-blue);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.appointments-grid {
    display: grid;
    gap: 24px;
}

.appointment-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.appointment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-blue);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.appointment-card:hover {
    border-color: var(--color-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.appointment-card:hover::before {
    transform: scaleY(1);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.appointment-datetime {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.appointment-datetime i {
    color: var(--color-gray);
}

.status-badge {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
}

.status-confirmed {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
}

.status-completed {
    background: linear-gradient(135deg, #d4edda 0%, #b9e4c4 100%);
    color: #155724;
}

.status-cancelled {
    background: linear-gradient(135deg, #f8d7da 0%, #f3bec3 100%);
    color: #721c24;
}

.appointment-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.appointment-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.appointment-detail strong {
    min-width: 120px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92em;
}

.appointment-detail strong i {
    margin-right: 8px;
    color: var(--color-gray);
    width: 16px;
    text-align: center;
}

.appointment-detail span {
    color: var(--text-primary);
    flex: 1;
    font-weight: 500;
}

.appointment-notes {
    background: var(--bg-tertiary);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    flex-direction: column;
    border-top: 3px solid var(--color-orange);
    margin-top: 6px;
}

.appointment-notes strong {
    margin-bottom: 8px;
    display: block;
}

.appointment-notes span {
    font-style: italic;
    line-height: 1.6;
}

.appointment-actions {
    display: flex;
    gap: 12px;
    padding-top: 22px;
    border-top: 2px solid var(--bg-tertiary);
}

.appointment-actions .btn {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
}

.empty-state i {
    color: var(--border-color);
    margin-bottom: 24px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.empty-state p {
    color: var(--text-light);
    font-size: 1.05em;
}

/* ====== EDIT APPOINTMENT PAGE ====== */
.edit-appointment-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h2 {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6em;
    font-weight: 700;
}

.page-header h2 i {
    color: var(--color-gray);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.edit-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.appointment-info-section,
.edit-form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.appointment-info-section h3,
.edit-form-section h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.info-grid {
    display: grid;
    gap: 20px;
}

.info-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-item label i {
    color: #1a1a1a;
}

.info-item p {
    color: #333;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.info-item p small {
    color: #666;
    font-size: 0.9em;
}

.info-item-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .edit-form-container {
        grid-template-columns: 1fr;
    }

    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .admin-header::after {
        height: 1px;
    }

    .admin-header h1 {
        font-size: 1.35em;
    }

    .header-title {
        display: none;
    }

    .user-info {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .user-name {
        width: 100%;
        justify-content: center;
    }

    .nav-content {
        padding: 0 20px;
        justify-content: center;
    }

    .nav-link {
        padding: 14px 18px;
        font-size: 0.9em;
    }

    .nav-link span {
        display: none;
    }

    .nav-link i {
        font-size: 1.3em;
    }

    .admin-main {
        padding: 20px 16px;
    }

    .filters-section {
        padding: 20px;
    }

    .filters-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 2.5em;
    }

    .stat-number {
        font-size: 2.2em;
    }

    .appointments-section {
        padding: 24px 20px;
    }

    .appointments-section h2 {
        font-size: 1.4em;
    }

    .appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .appointment-datetime {
        font-size: 1.05em;
    }

    .appointment-detail {
        flex-direction: column;
        gap: 6px;
    }

    .appointment-detail strong {
        min-width: auto;
    }

    .appointment-actions {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .multi-select-toggle {
        width: 100%;
    }

    .info-badge {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 35px 25px;
    }

    .login-header h2 {
        font-size: 1.5em;
    }

    .admin-header {
        padding: 14px 16px;
    }

    .admin-header h1 {
        font-size: 1.2em;
    }

    .admin-main {
        padding: 16px 12px;
    }

    .filters-section,
    .appointments-section {
        padding: 18px 16px;
        border-radius: var(--radius-md);
    }

    .stat-card {
        padding: 18px;
        gap: 16px;
    }

    .stat-icon {
        font-size: 2.2em;
    }

    .stat-content h3 {
        font-size: 0.85em;
    }

    .stat-number {
        font-size: 2em;
    }

    .appointments-section h2 {
        font-size: 1.25em;
        gap: 8px;
    }

    .appointment-card {
        padding: 18px;
    }

    .appointment-datetime {
        font-size: 1em;
    }

    .status-badge {
        padding: 6px 14px;
        font-size: 0.8em;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
}

/* ====== LOADING SPINNER ====== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== UTILITIES ====== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* ====== AVAILABILITY / CALENDAR PAGE ====== */
.availability-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.availability-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    grid-template-areas: "closed calendar timeslots";
}

.closed-days-section {
    grid-area: closed;
}

.calendar-section {
    grid-area: calendar;
}

.time-slots-section {
    grid-area: timeslots;
}

.calendar-section,
.closed-days-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(100, 100, 100, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-tertiary);
}

/* Multi-select toggle */
.multi-select-toggle {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-top: 3px solid #1a1a1a;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    transition: all var(--transition-normal);
    position: relative;
    flex-shrink: 0;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #1a1a1a;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.checkbox-text i {
    color: #1a1a1a;
    font-size: 1.1em;
}

.calendar-header h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-nav {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.btn-nav:hover {
    background: var(--color-blue);
    color: white;
    transform: scale(1.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.85em;
    color: var(--text-secondary);
    padding: 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 25px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid transparent;
    position: relative;
}

.calendar-day:hover:not(.empty):not(.past) {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--color-blue);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: var(--color-green);
    color: white;
    font-weight: 800;
}

.calendar-day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.calendar-day.closed {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    font-weight: 700;
}

.calendar-day.closed::before {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    opacity: 0.3;
}

.calendar-day.past {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.selected {
    background: #1a1a1a;
    color: white;
    font-weight: 800;
    border-color: #000000;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.calendar-day.selected:hover {
    background: #000000;
    border-color: #000000;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--bg-tertiary);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.legend-dot {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-dot.available {
    background: var(--bg-tertiary);
}

.legend-dot.closed {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.legend-dot.today {
    background: var(--color-green);
}

/* Closed Days List */
.closed-days-section h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}

.closed-days-section h3 i {
    color: var(--color-red);
}

.closed-days-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.closed-days-list::-webkit-scrollbar {
    width: 6px;
}

.closed-days-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.closed-days-list::-webkit-scrollbar-thumb {
    background: var(--color-gray);
    border-radius: 10px;
}

.closed-day-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-top: 3px solid var(--status-cancelled);
    transition: all var(--transition-normal);
}

.closed-day-item:hover {
    background: #fafafa;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.day-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-info i {
    font-size: 1.5em;
    color: var(--status-cancelled);
}

.day-info div strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.05em;
    margin-bottom: 2px;
}

.day-info div small {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.btn-remove {
    background: var(--status-cancelled);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #d32f2f;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.empty-state-small {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-small i {
    color: var(--color-gray);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-small p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state-small small {
    color: var(--text-light);
    font-size: 0.9em;
}

.info-badge {
    background: var(--bg-tertiary);
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    white-space: nowrap;
}

.info-badge i {
    color: var(--status-cancelled);
}

/* Time Slots Section */
.time-slots-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(100, 100, 100, 0.1);
}

.time-slots-section h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}

.time-slots-section h3 i {
    color: var(--color-blue);
}

.selected-date-info {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.selected-date-info i {
    color: var(--color-blue);
    font-size: 1.2em;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.time-slot {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
    font-size: 0.95em;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.time-slot:hover {
    border-color: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.time-slot.unavailable {
    background: #ffebee;
    border-color: #ef5350;
    color: #c62828;
}

.time-slot.unavailable:hover {
    background: #ffcdd2;
    border-color: #e53935;
}

.time-slot i {
    margin-right: 6px;
    font-size: 0.9em;
}

.time-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--bg-tertiary);
}

.empty-selection {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-selection i {
    color: var(--color-gray);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-selection p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-selection small {
    color: var(--text-light);
    font-size: 0.9em;
}

/* Responsive for Availability Page */
@media (max-width: 1024px) {
    .availability-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "calendar"
            "timeslots"
            "closed";
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-section,
    .closed-days-section,
    .time-slots-section {
        padding: 20px;
    }

    .calendar-header h3 {
        font-size: 1.2em;
    }

    .multi-select-toggle {
        padding: 10px 14px;
    }

    .checkbox-text {
        font-size: 0.9em;
    }

    .calendar-day {
        font-size: 0.85em;
    }

    .btn-nav {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .time-slot {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .calendar-section,
    .closed-days-section,
    .time-slots-section {
        padding: 16px;
    }

    .weekday {
        font-size: 0.75em;
        padding: 8px 4px;
    }

    .calendar-days {
        gap: 4px;
    }

    .calendar-day {
        font-size: 0.8em;
    }

    .closed-day-item {
        padding: 12px;
    }

    .day-info i {
        font-size: 1.2em;
    }

    .btn-remove {
        width: 32px;
        height: 32px;
    }

    .time-slots-grid {
        grid-template-columns: 1fr;
    }

    .time-actions {
        flex-direction: column;
    }

    .time-actions .btn {
        width: 100%;
    }
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-footer .btn {
    flex: 1;
}

/* Selected Dates Display */
.selected-dates-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    min-height: 50px;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.date-chip i {
    color: var(--color-blue);
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group label small {
    display: block;
    font-weight: normal;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition-fast);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

.char-counter {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Closed Day Item with Message */
.closed-day-item.has-message {
    border-top: 3px solid var(--color-orange);
}

.day-message {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: start;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.day-message i {
    color: var(--color-orange);
    margin-top: 2px;
}

.day-message span {
    flex: 1;
    line-height: 1.4;
}

/* Extended Hours Section */
.extended-hours-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.btn-add-extended {
    margin-left: auto;
    background: var(--color-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-add-extended:hover {
    background: var(--color-blue-dark);
    transform: scale(1.05);
}

.extended-hours-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extended-hour-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-top: 3px solid #1a1a1a;
    transition: all var(--transition-normal);
}

.extended-hour-item:hover {
    background: #fafafa;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.ext-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ext-info > i {
    font-size: 1.4em;
    color: #1a1a1a;
    margin-top: 4px;
}

.ext-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.ext-info small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.ext-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    color: #000000;
    font-size: 0.85rem;
}

.ext-time i {
    font-size: 0.8em;
}

.ext-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
