/* Parent-Teacher Interviews - Modern UI */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --accent: #8b5cf6;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e5e7eb;
    --sidebar-active: #eef2ff;
    --sidebar-text: #4b5563;
    --sidebar-text-active: #4f46e5;
    --navbar-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --content-bg: #f8fafc;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --radius: 10px;
    --radius-lg: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
    background: var(--content-bg);
}

/* ===== Admin Navbar ===== */
.admin-navbar {
    background: var(--navbar-bg);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}
.admin-brand:hover { color: #e0e7ff; }
.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.admin-user {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}
.admin-back-btn {
    font-size: 0.8rem;
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
}
.admin-back-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

/* ===== Admin Layout ===== */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
}
.admin-content {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 100%;
    overflow-x: auto;
}
.sidebar-section {
    padding: 1rem 0.75rem;
}
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}
.sidebar-link:hover {
    background: #f3f4f6;
    color: #1f2937;
}
.sidebar-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}
.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}
.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 0.75rem 0;
}
.sidebar-event-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    padding: 0 0.85rem;
    margin-bottom: 0.4rem;
}

/* ===== Public Navbar ===== */
.public-body {
    background: #f1f5f9;
}
.public-navbar {
    background: var(--navbar-bg);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.public-brand {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}
.public-step-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ===== Cards ===== */
.card {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.card-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.85rem 1.25rem;
}

/* Event cards on dashboard */
.event-card {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}
.event-card .card-body {
    padding: 1.25rem;
}

/* ===== Booking Step Cards ===== */
.booking-step-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}
.booking-step-card .card-header {
    background: var(--navbar-bg);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
}
.booking-step-card .card-body {
    padding: 1.5rem;
}

/* ===== Availability Switches ===== */
.avail-block-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.avail-block-card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}
.avail-switch-list {
    max-height: 400px;
    overflow-y: auto;
}
.avail-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}
.avail-switch-row:last-child {
    border-bottom: none;
}
.avail-switch-row:hover:not(.booked) {
    background: #f9fafb;
}
.avail-switch-row.booked {
    background: #eff6ff;
}
.avail-time-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    min-width: 70px;
}
.avail-booked-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
}
.avail-hour-sep {
    height: 0;
    border-top: 2px solid #d1d5db;
}
.avail-switch-row .form-check-input {
    width: 2.2em;
    height: 1.1em;
    cursor: pointer;
}
.avail-switch-row .form-check-input:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}
.avail-switch-row .form-check-input:not(:checked) {
    background-color: #fca5a5;
    border-color: #f87171;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ===== Time Slots ===== */
.time-slot {
    display: inline-block;
    padding: 6px 14px;
    margin: 3px;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.15s ease;
}
.time-slot:hover:not(.disabled):not(.selected) {
    border-color: var(--primary);
    background: var(--primary-light);
}
.time-slot.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}
.time-slot.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: line-through;
}
.time-slot.booked-other {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    cursor: not-allowed;
}

/* ===== Teacher Cards (Booking) ===== */
.teacher-select-card {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s ease;
}
.teacher-select-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* ===== Child Cards ===== */
.child-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* ===== Confirmation Items ===== */
.confirm-booking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
}
.confirm-booking-item .booking-time {
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 110px;
    color: var(--primary);
    white-space: nowrap;
}
.confirm-booking-item .booking-teacher {
    font-weight: 600;
    font-size: 0.9rem;
}
.confirm-booking-item .booking-class {
    color: #6b7280;
    font-size: 0.82rem;
}

/* ===== Tables ===== */
.table-modern {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.table-modern thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.75rem 1rem;
}
.table-modern tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}
.table-modern tbody tr:hover {
    background: #f9fafb;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.loading-overlay.active {
    display: flex;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-content { padding: 1rem; }
    .avail-grid { font-size: 0.75rem; }
    .avail-cell { height: 32px; }
}

/* ===== Form Helpers ===== */
.form-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
}
.form-label .fa-info-circle,
.form-check-label .fa-info-circle {
    font-size: 0.78rem;
    cursor: help;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.form-label .fa-info-circle:hover,
.form-check-label .fa-info-circle:hover {
    opacity: 0.9;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===== Page Headers ===== */
h4 {
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}
h5 {
    font-weight: 600;
    color: #1f2937;
}
h6 {
    font-weight: 600;
    color: #374151;
}

/* ===== Alert Improvements ===== */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
}
