/* ============================================================
   PORTAL GURU — SMP FATAHILLAH
   style.css — Vanilla CSS Utama
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    /* Brand Colors - Premium Professional Palette */
    --brand-primary: #1e3a8a;    /* Deep Blue */
    --brand-secondary: #2563eb;  /* Modern Blue */
    --brand-light: #eff6ff;
    --brand-accent: #0ea5e9;
    --brand-emerald: #059669;

    /* Neutrals */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-mid: #475569;
    --text-light: #94a3b8;
    --border-light: #f1f5f9;
    --border-focus: #3b82f6;

    /* Professional Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Menu Icon Colors - Refined for Professional Look */
    --color-blue:    #2563eb; --color-blue-bg:    #eff6ff;
    --color-green:   #16a34a; --color-green-bg:   #f0fdf4;
    --color-purple:  #7c3aed; --color-purple-bg:  #f5f3ff;
    --color-red:     #dc2626; --color-red-bg:     #fff1f2;
    --color-indigo:  #4338ca; --color-indigo-bg:  #eef2ff;
    --color-teal:    #0d9488; --color-teal-bg:    #f0fdfa;
    --color-yellow:  #d97706; --color-yellow-bg:  #fffbeb;
    --color-slate:   #475569; --color-slate-bg:   #f8fafc;
    --color-emerald: #059669; --color-emerald-bg: #ecfdf5;
    --color-orange:  #ea580c; --color-orange-bg:  #fff7ed;
    --color-pink:    #db2777; --color-pink-bg:    #fdf2f8;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(12px);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    padding-bottom: 48px;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   HEADER SEKOLAH
   ============================================================ */
.school-header {
    background: var(--brand-primary);
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    padding: 0 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.school-header::before {
    content: '';
    position: absolute;
    top: -20%; right: -5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.school-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.school-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255,255,255,0.1);
}

.school-logo-wrap img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.school-header-text { flex: 1; }

.school-name {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.school-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    margin-top: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Header wave decoration */
.header-wave {
    display: block;
    width: 100%;
    height: 28px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    clip-path: ellipse(55% 100% at 50% 0%);
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    overflow-x: hidden;
}

/* ============================================================
   TOP BAR — Jam/Tanggal + Search Bar
   ============================================================ */
.top-bar {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

.top-bar .datetime-card {
    flex: 0 0 auto;
    min-width: 240px; /* Diperkecil dari 280px */
    padding: 14px 20px; /* Padding lebih ramping */
}

.server-status-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 140px; /* Diperkecil dari 160px */
    transition: all var(--transition-med);
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8; /* Gray initially */
    position: relative;
}

.status-text {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Online State */
.server-status-card.online .status-dot {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.server-status-card.online .status-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: status-pulse 2s infinite;
}
.server-status-card.online .status-text { color: #059669; }

/* Offline State */
.server-status-card.offline .status-dot {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}
.server-status-card.offline .status-text { color: #dc2626; }

@keyframes status-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.top-bar .search-wrap {
    flex: 1;
}

/* Main area takes full width */
.main-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

/* ============================================================
   CLOCK & DATE CARD
   ============================================================ */
.datetime-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 20px 24px;
    gap: 0;
    transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.datetime-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.datetime-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.datetime-col:first-child {
    padding-right: 20px;
    border-right: 1px solid var(--border-light);
}
.datetime-col:last-child {
    padding-left: 20px;
    align-items: flex-end;
}

.datetime-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.datetime-value {
    font-size: 22px; /* Diperkecil agar lebih compact */
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.date-value {
    font-size: 12px; /* Diperkecil sedikit */
    font-weight: 600;
    color: var(--text-mid);
    text-align: right;
    line-height: 1.2;
}

/* ============================================================
   INFO MARQUEE BANNER
   ============================================================ */
.marquee-banner {
    background: linear-gradient(90deg, #eff6ff, #f0fdf4);
    border-left: 4px solid var(--brand-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    max-width: 100%;
}

.marquee-badge {
    background: var(--brand-secondary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    white-space: nowrap;
}

.marquee-track { 
    overflow: hidden; 
    flex: 1; 
    min-width: 0; /* Critical for flex items with nowrap children */
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    color: #1e40af;
    animation: marquee-scroll 20s linear infinite;
    transition: opacity 0.4s ease;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ============================================================
   GREETING SECTION
   ============================================================ */
.greeting-section { margin-bottom: 20px; }

.greeting-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.greeting-sub {
    font-size: 15px;
    color: var(--text-mid);
    margin-top: 8px;
    max-width: 600px;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg); /* Mengubah dari full ke lg agar serasi dengan card */
    padding: 14px 20px 14px 52px;
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-med);
    outline: none;
    height: 100%; /* Pastikan tinggi sama dengan card lainnya */
}

.search-input::placeholder { color: var(--text-light); }

.search-input:focus {
    border-color: var(--brand-secondary);
    box-shadow: var(--shadow-glow);
    background: #fff;
}

.search-input:focus + .search-icon {
    color: var(--brand-secondary);
}

/* ============================================================
   MENU SECTION
   ============================================================ */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: var(--border-light);
    border-radius: 2px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

/* ---- Menu Item ---- */
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: var(--bg-card);
    padding: 20px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-med);
    text-decoration: none;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-light);
}

.menu-item:active { transform: scale(0.95); }

.menu-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}

.menu-icon-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.menu-item:hover .menu-icon-box {
    transform: rotate(5deg) scale(1.1);
}

.menu-item:hover .menu-icon-box::before { opacity: 1; }

/* Icon color classes — generated from --color-* tokens */
.icon-blue    { background: var(--color-blue-bg);    color: var(--color-blue); }
.icon-green   { background: var(--color-green-bg);   color: var(--color-green); }
.icon-purple  { background: var(--color-purple-bg);  color: var(--color-purple); }
.icon-red     { background: var(--color-red-bg);     color: var(--color-red); }
.icon-indigo  { background: var(--color-indigo-bg);  color: var(--color-indigo); }
.icon-teal    { background: var(--color-teal-bg);    color: var(--color-teal); }
.icon-yellow  { background: var(--color-yellow-bg);  color: var(--color-yellow); }
.icon-slate   { background: var(--color-slate-bg);   color: var(--color-slate); }
.icon-emerald { background: var(--color-emerald-bg); color: var(--color-emerald); }
.icon-orange  { background: var(--color-orange-bg);  color: var(--color-orange); }
.icon-pink    { background: var(--color-pink-bg);    color: var(--color-pink); }

.menu-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mid);
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
}

/* --- Offline Badge on Menu Item --- */
.menu-item { position: relative; }

.offline-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
    z-index: 10;
}

.menu-item.server-offline {
    border-color: #fecaca;
    background: #fff5f5;
}

.menu-item.server-offline .menu-icon-box {
    filter: grayscale(0.8);
    opacity: 0.7;
}

/* Submenu badge indicator */
.has-submenu .menu-icon-box::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 8px;
    position: absolute;
    bottom: 5px;
    right: 6px;
    color: inherit;
    opacity: 0.6;
}

/* Hidden menu item */
.menu-item.hidden { display: none; }

/* No results */
.no-results {
    display: none;
    text-align: center;
    padding: 64px 20px;
    color: var(--text-light);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-light);
}
.no-results i { font-size: 56px; margin-bottom: 16px; display: block; color: var(--border-light); }
.no-results p { font-size: 16px; font-weight: 500; color: var(--text-mid); }
.no-results.visible { display: block; animation: fadeIn 0.3s ease; }

/* ============================================================
   MODAL — SUB MENU
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med);
    padding: 0 0 0 0;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-sheet {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 0 0 32px;
    transform: translateY(100%);
    transition: transform var(--transition-med);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 40px;
    }
    .modal-sheet {
        border-radius: var(--radius-xl);
        transform: scale(0.9);
        opacity: 0;
        transition: transform var(--transition-med), opacity var(--transition-med);
    }
    .modal-overlay.active .modal-sheet {
        transform: scale(1);
        opacity: 1;
    }
    .modal-drag-bar { display: none; }
}

.modal-drag-bar {
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 4px;
    margin: 12px auto 0;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 14px;
    border-bottom: 1.5px solid var(--border-light);
}

.modal-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    flex: 1;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-page);
    color: var(--text-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.modal-close-btn:hover { background: #fee2e2; color: #dc2626; }

.modal-submenu-list {
    padding: 12px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-page);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 1.5px solid transparent;
}

.submenu-item:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.submenu-item:active { transform: scale(0.98); }

.submenu-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.submenu-item-text { flex: 1; }

.submenu-item-arrow {
    color: var(--text-light);
    font-size: 12px;
}

/* --- Server Warning Styles (Option C) --- */
.server-warning-box {
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    margin: 0 auto;
}

.status-badge.active {
    background: var(--color-emerald-bg);
    color: var(--color-emerald);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-badge.inactive {
    background: var(--color-red-bg);
    color: var(--color-red);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.status-badge.warning {
    background: var(--color-yellow-bg);
    color: var(--color-yellow);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.server-message {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.6;
}

.server-hours-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-page);
    padding: 14px;
    border-radius: var(--radius-md);
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 14px;
    border: 1px dashed var(--border-light);
}

.server-disclaimer {
    font-size: 13px;
    color: var(--text-mid);
    font-style: italic;
    line-height: 1.5;
}

.modal-action-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.btn-continue {
    background: var(--brand-primary);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-med);
    text-decoration: none;
}

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

.btn-whatsapp {
    background: #25d366;
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-med);
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-cancel {
    padding: 12px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
    text-align: center;
    padding: 48px 24px 32px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    border-top: 1px solid var(--border-light);
    margin-top: 64px;
}
.page-footer strong { color: var(--brand-primary); font-weight: 700; }

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 1023px) {
    .page-content {
        padding: 20px 16px;
        gap: 16px;
    }

    .top-bar {
        flex-direction: column;
        gap: 12px;
    }

    .server-status-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        min-width: 0;
    }
    
    .server-status-card .status-label {
        order: -1;
    }

    .top-bar .datetime-card {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 16px 12px;
        gap: 14px;
    }

    .school-header {
        padding: 0 12px;
    }
    
    .school-logo-wrap {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .school-logo-wrap img {
        width: 32px;
        height: 32px;
    }
    
    .school-name {
        font-size: 17px;
    }
    
    .school-subtitle {
        font-size: 10px;
    }

    .greeting-title {
        font-size: 20px;
    }
    
    .greeting-sub {
        font-size: 13px;
    }

    .top-bar {
        flex-direction: column;
        gap: 10px;
    }

    .datetime-card {
        padding: 14px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }

    .datetime-col:first-child {
        padding-right: 16px;
        border-right: 1px solid var(--border-light);
        border-bottom: none;
        padding-bottom: 0;
        width: auto;
    }
    
    .datetime-col:last-child {
        padding-left: 16px;
        align-items: flex-end;
        width: auto;
    }

    .datetime-value {
        font-size: 20px;
    }
    
    .date-value {
        text-align: right;
        font-size: 12px;
    }

    .search-input {
        padding: 12px 16px 12px 44px;
        font-size: 13px;
    }

    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .menu-item {
        padding: 12px 4px;
    }
    
    .menu-icon-box {
        width: 48px;
        height: 48px;
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .menu-label {
        font-size: 9px;
    }
}

@media (max-width: 400px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .greeting-title {
        font-size: 20px;
    }

    .school-name {
        font-size: 16px;
    }
}

/* Safety fix for horizontal overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-item {
    animation: fadeIn 0.4s ease backwards;
}

.menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-item:nth-child(3) { animation-delay: 0.15s; }
.menu-item:nth-child(4) { animation-delay: 0.2s; }
.menu-item:nth-child(5) { animation-delay: 0.25s; }
.menu-item:nth-child(6) { animation-delay: 0.3s; }
.menu-item:nth-child(7) { animation-delay: 0.35s; }
.menu-item:nth-child(8) { animation-delay: 0.4s; }
