@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ink: #0F172A;
    --ink-soft: #475569;
    --ink-faint: #94A3B8;
    --primary: #2451C4;
    --primary-dark: #15306B;
    --primary-soft: rgba(36, 81, 196, 0.08);
    --primary-hover: rgba(36, 81, 196, 0.12);
    --surface: #F8FAFC;
    --card: #FFFFFF;
    --card-subtle: #F1F5F9;
    --border: #E2E8F0;
    --border-subtle: #EDF2F7;
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.08);
    --accent-gold: #D97706;
    --accent-gold-soft: rgba(217, 119, 6, 0.09);
    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.03);
    --shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 10px 24px rgba(15, 23, 42, 0.05);

    --drawer-bg: rgba(255, 255, 255, 0.98);
    --bottom-nav-bg: rgba(255, 255, 255, 0.85);
    --icon-btn-bg: rgba(255, 255, 255, 0.6);
}

:root.dark-theme,
html.dark-theme {
    --ink: #F8FAFC;
    --ink-soft: #94A3B8;
    --ink-faint: #64748B;
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-soft: rgba(59, 130, 246, 0.12);
    --primary-hover: rgba(59, 130, 246, 0.18);
    --surface: #0B0F19;
    --card: #111827;
    --card-subtle: #1F2937;
    --border: rgba(255, 255, 255, 0.09);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --accent-gold: #F59E0B;
    --accent-gold-soft: rgba(245, 158, 11, 0.14);
    --danger: #F87171;
    --danger-soft: rgba(248, 113, 113, 0.12);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 4px 14px rgba(0, 0, 0, 0.45), 0 10px 24px rgba(0, 0, 0, 0.35);

    --drawer-bg: rgba(17, 24, 39, 0.98);
    --bottom-nav-bg: rgba(17, 24, 39, 0.85);
    --icon-btn-bg: rgba(255, 255, 255, 0.08);
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--surface);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ========================================================
   Header & Navigation Bar
   ======================================================== */
.dash-header {
    background: var(--card) !important;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm);
    z-index: 1200;
    flex-shrink: 0;
    height: 60px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(36, 81, 196, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text .title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    letter-spacing: -0.2px;
}

.desktop-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.desktop-nav .nav-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav .nav-btn:hover {
    background: var(--primary-soft);
    color: var(--theme-accent-text);
}

.desktop-nav .nav-btn.active {
    background: var(--primary-soft);
    color: var(--theme-accent-text);
    font-weight: 700;
}

.desktop-nav svg {
    width: 17px;
    height: 17px;
}

.icon-btn.menu-btn-top {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-subtle);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.icon-btn.menu-btn-top:hover {
    background: var(--primary-soft);
    color: var(--theme-accent-text);
}

/* ========================================================
   Drawer & Backdrop
   ======================================================== */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.floating-header-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: min(320px, 86vw);
    height: 100%;
    height: 100dvh;
    background: var(--drawer-bg);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 18px;
    transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.floating-header-menu.active {
    right: 0 !important;
    transform: none !important;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.floating-header-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    color: var(--ink);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    user-select: none;
}

.floating-header-menu .menu-item:hover,
.floating-header-menu .menu-item.active {
    background: var(--primary-soft);
    color: var(--theme-accent-text);
}

.floating-header-menu .menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-subtle);
    color: inherit;
    flex-shrink: 0;
}

.drawer-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* ========================================================
   Main Container Layout
   ======================================================== */
.container {
    max-width: 580px;
    margin: 0 auto;
    padding: 22px 16px calc(110px + env(safe-area-inset-bottom, 16px));
    width: 100%;
}

.profile-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#profileMainContent {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    animation: profileFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Base Card Styling */
.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
    position: relative;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ========================================================
   1. Student Identity Card (Redesigned Header)
   ======================================================== */
.profile-card.profile-hero,
.dark-theme .profile-card.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px !important;
    min-height: 164px;
    background: linear-gradient(115deg, #15306B 0%, #2451C4 100%);
    border-color: rgba(255, 255, 255, 0.12);
    text-align: left;
}
.profile-avatar-wrap {
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
    margin: 0;
}
.profile-avatar-wrap .avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.65);
    background-color: #15306B;
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
}
.profile-avatar-wrap .student-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-orientation: from-image;
    border-radius: inherit;
}
.profile-avatar-wrap.is-vip .avatar {
    border-color: #F6C760;
    box-shadow: 0 0 0 2px rgba(246, 199, 96, 0.16);
}
.profile-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}
.student-name {
    font-size: 18px !important;
    font-weight: 750 !important;
    letter-spacing: -0.2px !important;
    color: #FFFFFF !important;
    overflow-wrap: anywhere;
    margin: 0 0 5px 0 !important;
    font-family: var(--font-display);
    line-height: 1.25;
}

.dept-display-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px 0;
}

.dept-display-row .student-dept {
    margin: 0;
    line-height: 1.35;
}

.student-dept {
    color: #E1EAFE;
    overflow-wrap: anywhere;
    font-size: 12.5px;
    font-weight: 500;
    margin: 0 0 10px 0;
    line-height: 1.35;
    max-width: 440px;
}

.student-shift-pill {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2.5px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.2);
    color: #93C5FD;
    border: 1px solid rgba(59, 130, 246, 0.4);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1;
}

.student-shift-pill[hidden],
.student-shift-pill.is-hidden {
    display: none !important;
}

.btn-edit-dept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0 !important;
}

.btn-edit-dept:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

.btn-edit-dept:active {
    transform: scale(0.95);
}

.profile-dept-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 6px 0 12px 0;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    max-width: 440px;
}

.profile-dept-form[hidden],
.profile-dept-form.is-hidden {
    display: none !important;
}

.profile-dept-form .dept-form-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-dept-form .dept-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-dept-form label {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.profile-dept-form select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 8px;
    background: #0F172A;
    color: #F8FAFC;
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: border-color 0.15s ease;
}

.profile-dept-form select:focus {
    border-color: #38BDF8;
}

.profile-dept-form .dept-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.btn-save-dept {
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-save-dept:hover:not(:disabled) {
    background: #1D4ED8;
}

.btn-save-dept:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel-dept {
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-cancel-dept:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
}

.dept-status-msg {
    font-size: 11.5px;
    min-height: 16px;
    line-height: 1.3;
}

.dept-status-msg.success {
    color: #4ADE80;
}

.dept-status-msg.error {
    color: #F87171;
}

.student-id-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    min-height: 44px;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
    border-radius: 6px;
    background: transparent;
    border: 0;
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.student-id-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.student-id-chip:active {
    transform: scale(0.98);
}

.student-id-chip svg {
    color: inherit;
    opacity: 0.8;
}

/* ========================================================
   2. Rewards & VIP Card
   ======================================================== */
.profile-card.rewards-hub-card {
    display: block;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.rewards-top-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; min-height: 44px; }
.rewards-card-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 750; }
.rewards-card-title svg { flex-shrink: 0; color: var(--theme-accent-text); }
.rewards-metrics-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.reward-metric-box { min-width: 0; padding: 10px; border-radius: 10px; background: var(--primary-soft); }
.reward-metric-label, .reward-metric-val { display: block; line-height: 1.4; }
.reward-metric-label { color: var(--ink-soft); font-size: 11px; }
.reward-metric-val { margin-top: 4px; color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.rewards-headline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rewards-gem { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; color: var(--theme-accent-text); background: var(--primary-soft); }
.rewards-summary { min-width: 0; }
.rewards-eyebrow { color: var(--ink-soft); font-size: 10.5px; line-height: 1.3; font-weight: 650; letter-spacing: 0.07em; }
.rewards-balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-top: 2px; color: var(--ink); font-size: 23px; font-weight: 750; line-height: 1.1; overflow-wrap: anywhere; }
.rewards-unit { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.rewards-hub-action { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 56px; min-height: 44px; flex: 0 0 auto; padding: 0 4px; border: 0; border-radius: 6px; color: var(--theme-accent-text); background: none; text-decoration: none; font-size: 12px; font-weight: 650; }
.rewards-hub-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.rewards-hub-action svg { flex-shrink: 0; }
.rewards-membership { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.rewards-access { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rewards-access svg { flex: 0 0 16px; color: var(--theme-accent-text); }
.rewards-membership strong { color: var(--ink); font-weight: 650; text-align: right; overflow-wrap: anywhere; max-width: min(140px, 38vw); }

/* ========================================================
   3. Campus & Emergency Information Accordion Card
   ======================================================== */
.emergency-card {
    padding: 14px 18px !important;
    transition: all 0.2s ease;
}

.emergency-card-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.emergency-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}

.emergency-card-title svg {
    color: var(--theme-accent-text);
    flex-shrink: 0;
}

.emergency-toggle-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.voluntary-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: var(--radius-pill);
    background: var(--danger-soft);
    color: var(--status-danger-text);
    border: 1px solid rgba(239, 68, 68, 0.18);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.card-chevron {
    color: var(--ink-faint);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

#emergencyCardBody {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 12px;
    animation: accordionFade 0.2s ease;
}

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

.emergency-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .emergency-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.emergency-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.emergency-field-label {
    font-size: 11px;
    font-weight: 650;
    color: var(--ink-soft);
    letter-spacing: 0.1px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.emergency-field-label svg {
    color: var(--ink-faint);
    flex-shrink: 0;
}

.emergency-field input,
.emergency-field select {
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-subtle);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 550;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.emergency-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.emergency-field input:focus,
.emergency-field select:focus {
    background: var(--card);
    border-color: var(--primary);
    box-shadow: 0 0 0 2.5px var(--primary-soft);
}

.emergency-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    margin-top: 4px;
    width: 100%;
}

.emergency-save-btn:hover {
    background: var(--primary-dark);
}

.emergency-save-btn:active {
    transform: scale(0.985);
}

.emergency-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========================================================
   4. Menu & Preference Cards (Action List)
   ======================================================== */
.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-faint);
    padding: 4px 6px 0;
    margin: 4px 0 -4px;
}

.menu-card {
    padding: 4px 14px !important;
    display: flex;
    flex-direction: column;
}

.menu-card .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 2px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    min-height: 48px;
    width: 100%;
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    font: inherit;
    text-align: left;
}

.menu-card .menu-item:last-child {
    border-bottom: none;
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.menu-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: var(--card-subtle);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.menu-card .menu-item:hover .menu-icon {
    background: var(--primary-soft);
    color: var(--theme-accent-text);
}

.menu-text-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.menu-text {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--ink);
    letter-spacing: -0.1px;
}

.menu-text-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-faint);
    margin-top: 1px;
}

.menu-chevron {
    width: 14px;
    height: 14px;
    color: var(--ink-faint);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.menu-card .menu-item:hover .menu-chevron {
    transform: translateX(2px);
    color: var(--theme-accent-text);
}

/* Danger Item (Logout) */
.menu-item.danger .menu-icon {
    background: var(--danger-soft);
    color: var(--status-danger-text);
}

.menu-item.danger .menu-text {
    color: var(--status-danger-text);
}

.menu-item.danger .menu-chevron {
    color: var(--status-danger-text);
    opacity: 0.7;
}

.menu-item.danger:hover .menu-chevron {
    color: var(--status-danger-text);
    opacity: 1;
}

/* ========================================================
   iOS Style Toggle Switches
   ======================================================== */
.ios-switch {
    width: 44px;
    height: 24px;
    background: #CBD5E1;
    border-radius: var(--radius-pill);
    position: relative;
    cursor: pointer;
    transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.ios-switch-knob {
    width: 20px;
    height: 20px;
    background: #FFFFFF;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   Portal Footer Note
   ======================================================== */
.profile-footer-note {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-faint);
    padding: 6px 12px 16px;
    line-height: 1.4;
}

/* ========================================================
   Toast Notification Popup (Floating above dock)
   ======================================================== */
.profile-toast-popup {
    position: fixed;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    width: max-content;
    max-width: min(88vw, 340px);
}

.profile-toast-popup.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.profile-toast-popup.toast-success {
    background: #15306B;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-toast-popup.toast-error {
    background: #E11D48;
}

.profile-toast-popup.toast-info {
    background: #2451C4;
}

/* ========================================================
   Skeleton Shimmer View
   ======================================================== */
#profileSkeletonOverlay {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skeleton-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
}

.profile-card :is(button, a):focus-visible,
button.menu-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.profile-hero button:focus-visible { outline-color: #FFFFFF; }

/* ========================================================
   Mobile Responsiveness & CSS Media Query Standard
   Strictly following AGENTS.md Hierarchy:
   1. All Standard Mobile Devices (361px - 480px)
   2. Ultra-Compact Mobile Devices (<= 360px)
   3. Tablets & Large Handhelds (<= 768px)
   ======================================================== */

/* 1. All Standard Mobile Devices (iPhone, Samsung, Pixel: 361px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 14px 12px calc(105px + env(safe-area-inset-bottom, 16px)) !important;
        max-width: 100%;
    }
    .profile-card {
        padding: 16px 14px !important;
        border-radius: var(--radius-lg) !important;
    }
    .profile-card.profile-hero {
        gap: 14px;
        padding: 16px !important;
        border-radius: var(--radius-lg) !important;
    }
    .profile-avatar-wrap {
        width: 76px !important;
        height: 76px !important;
        margin: 0 !important;
    }
    .profile-avatar-wrap .avatar {
        width: 100% !important;
        height: 100% !important;
        font-size: 22px !important;
        border-width: 2px !important;
    }
    .student-name {
        font-size: 19px !important;
    }
    .student-dept {
        font-size: 11.5px !important;
    }
    .student-shift-pill {
        font-size: 9.5px !important;
        padding: 2px 6.5px !important;
    }
    .student-id-chip {
        font-size: 11px !important;
        padding: 0 !important;
    }
    .emergency-card, .rewards-hub-card {
        padding: 14px 14px !important;
    }
    .emergency-card-title, .rewards-card-title {
        font-size: 13px !important;
        gap: 7px !important;
    }
    .menu-card {
        padding: 2px 12px !important;
    }
    .menu-card .menu-item {
        padding: 11px 0 !important;
        min-height: 46px !important;
    }
    .menu-text {
        font-size: 13px !important;
    }
    .menu-text-sub {
        font-size: 10.5px !important;
    }
    .menu-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }
    .menu-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* 2. Ultra-Compact Mobile Devices (<= 360px) */
@media (max-width: 360px) {
    .container {
        padding: 12px 10px calc(100px + env(safe-area-inset-bottom, 16px)) !important;
    }
    .profile-card {
        padding: 14px 12px !important;
    }
    .profile-card.profile-hero { gap: 10px; }
    .profile-avatar-wrap {
        width: 72px !important;
        height: 72px !important;
        margin: 0 !important;
    }
    .profile-avatar-wrap .avatar {
        width: 100% !important;
        height: 100% !important;
        font-size: 20px !important;
    }
    .student-name {
        font-size: 17px !important;
    }
    .student-dept {
        font-size: 11px !important;
    }
    .student-shift-pill {
        font-size: 9px !important;
        padding: 1.5px 5px !important;
    }
    .emergency-card, .rewards-hub-card {
        padding: 12px 10px !important;
    }
    .rewards-card-title, .emergency-card-title {
        font-size: 12px !important;
    }
    .menu-card {
        padding: 2px 10px !important;
    }
    .menu-card .menu-item {
        padding: 10px 0 !important;
        min-height: 44px !important;
    }
    .menu-text {
        font-size: 12.5px !important;
    }
    .ios-switch {
        width: 44px !important;
        height: 22px !important;
    }
    .ios-switch-knob {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 3. Tablets & Large Handhelds (<= 768px) */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
    .icon-btn.menu-btn-top {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .icon-btn.menu-btn-top {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .container.profile-container,
    #profileMainContent,
    .profile-card {
        animation: none !important;
        transition: none !important;
    }
    .student-id-chip,
    .rewards-hub-action { transition: none !important; }
}


/* Compact identity design approved by the owner: avatar/shift at left, small corner edit. */
.profile-card.profile-hero { min-height: 0; padding: 16px !important; gap: 12px; align-items: center; }
.profile-hero .profile-avatar-wrap { width: 54px !important; height: auto !important; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 54px; }
.profile-hero .profile-avatar-wrap .avatar { width: 48px !important; height: 48px !important; flex: 0 0 48px; font-size: 18px !important; background-color: #F8FAFC; color: #0E1B33; }
.profile-hero .profile-identity { gap: 4px; min-width: 0; }
.profile-hero .student-name { margin: 0 !important; padding-right: 18px; font-size: 15px !important; line-height: 1.35; font-weight: 650 !important; }
.profile-hero .dept-display-row { display: block; width: 100%; margin: 0; }
.profile-hero .student-dept { display: block; margin: 0; max-width: 100%; font-size: 11px !important; line-height: 1.5; font-weight: 400; }
.profile-hero .student-shift-pill { padding: 3px 7px !important; font-size: 9px !important; line-height: 1.1; letter-spacing: 0; text-transform: none; font-weight: 500; background: rgba(255,255,255,.12); border: 0; color: #DCE8FF; white-space: nowrap !important; flex-shrink: 0 !important; }
.profile-hero .btn-edit-dept { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; padding: 0; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #DCE8FF; }
.profile-hero .btn-edit-dept::before { content: ''; position: absolute; inset: -10px; }
.profile-hero .btn-edit-dept svg { width: 12px; height: 12px; }
.profile-hero .student-id-chip { margin: 0; gap: 6px; min-height: 32px; align-self: flex-start; padding: 0; background: transparent; border: 0; color: #E1EAFE; font-family: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.profile-hero .student-id-chip svg { flex-shrink: 0; width: 11px; height: 11px; opacity: .8; }
.profile-hero .profile-dept-form { max-width: 100%; width: 100%; }
@media (max-width: 480px) { .profile-card.profile-hero { padding: 14px !important; gap: 10px; } }
@media (max-width: 360px) { .profile-card.profile-hero { gap: 8px; } }

/* ========================================================
   Guest Mode: Hero Sign-In Card & Perks Grid
   ======================================================== */
.guest-hero-card {
    text-align: center;
    padding: 22px 16px 18px;
    position: relative;
    overflow: hidden;
}

.guest-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3B82F6, #10B981);
}

.guest-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(36, 81, 196, 0.12);
}

.guest-hero-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    line-height: 1.25;
}

.guest-hero-sub {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.45;
    margin-bottom: 14px;
    padding: 0 4px;
}

/* 3 Perks Horizontal Grid (GPTZero Style) */
.perks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.perk-item {
    background: var(--card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.perk-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.perk-icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.perk-icon-bus {
    background: rgba(36, 81, 196, 0.12);
    color: #2451C4;
}

.perk-icon-route {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.perk-icon-vip {
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
}

.perk-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.perk-desc {
    font-size: 9.5px;
    color: var(--ink-faint);
    line-height: 1.2;
}

/* Continue with Google button */
.btn-google-cta {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: all 0.15s ease;
}

.btn-google-cta:hover {
    background: var(--card-subtle);
    border-color: var(--primary);
}

.guest-hero-footnote {
    margin-top: 10px;
    font-size: 11px;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Guest Rewards Teaser in Rewards Hub */
.guest-rewards-teaser {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(36, 81, 196, 0.06));
    border: 1px dashed rgba(217, 119, 6, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.guest-teaser-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.guest-teaser-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
}

.guest-teaser-desc {
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.35;
}

.btn-guest-teaser {
    background: var(--accent-gold);
    color: #FFFFFF;
    border: none;
    padding: 7px 14px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: opacity 0.15s ease;
}

.btn-guest-teaser:hover {
    opacity: 0.9;
}

/* Responsive Breakpoints (AGENTS.md Section 1.1) */
@media (max-width: 480px) {
    .guest-hero-card {
        padding: 18px 12px !important;
        border-radius: 16px !important;
    }
    .perks-grid {
        gap: 6px;
    }
    .perk-item {
        padding: 10px 4px;
    }
    .perk-title {
        font-size: 10.5px !important;
    }
    .perk-desc {
        font-size: 9px !important;
    }
    .btn-google-cta {
        height: 42px;
        font-size: 13px;
    }
    .guest-rewards-teaser {
        padding: 10px 12px !important;
    }
}

@media (max-width: 360px) {
    .guest-hero-card {
        padding: 14px 10px !important;
    }
    .guest-hero-title {
        font-size: 16px !important;
    }
    .guest-hero-sub {
        font-size: 11px !important;
    }
    .perks-grid {
        gap: 4px;
    }
    .perk-item {
        padding: 8px 3px;
    }
    .perk-title {
        font-size: 9.5px !important;
    }
    .perk-desc {
        font-size: 8.5px !important;
    }
    .btn-guest-teaser {
        font-size: 10.5px !important;
        padding: 5px 8px !important;
    }
}

/* Dark Theme Adjustments */
:root.dark-theme .perk-icon-bus,
html.dark-theme .perk-icon-bus {
    background: rgba(59, 130, 246, 0.18);
    color: #60A5FA;
}

:root.dark-theme .perk-icon-route,
html.dark-theme .perk-icon-route {
    background: rgba(16, 185, 129, 0.18);
    color: #34D399;
}

:root.dark-theme .perk-icon-vip,
html.dark-theme .perk-icon-vip {
    background: rgba(245, 158, 11, 0.18);
    color: #FBBF24;
}

:root.dark-theme .btn-google-cta,
html.dark-theme .btn-google-cta {
    background: var(--card-subtle);
    color: #F8FAFC;
    border-color: rgba(255, 255, 255, 0.12);
}

:root.dark-theme .btn-google-cta:hover,
html.dark-theme .btn-google-cta:hover {
    background: var(--card);
    border-color: var(--primary);
}

:root.dark-theme .guest-rewards-teaser,
html.dark-theme .guest-rewards-teaser {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(59, 130, 246, 0.08));
    border-color: rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   Clean White + Blue UI v2 Theme — Profile & Account Surfaces
   Scoped strictly under body.ui-v2 to preserve existing behavior & other pages
   ========================================================================== */

body.ui-v2 {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--ui-bg, #F4F7FB);
    color: var(--ui-ink, #0E1B33);
    -webkit-font-smoothing: antialiased;
}

/* Dashboard Header */
body.ui-v2 .dash-header {
    background: var(--ui-surface, #FFFFFF) !important;
    border-bottom: 1px solid var(--ui-border, #E5E7EB) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.ui-v2 .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.ui-v2 .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(36, 81, 196, 0.2);
}

body.ui-v2 .brand-mark svg {
    display: block;
    width: 32px !important;
    height: 32px !important;
}

body.ui-v2 .brand-text .title {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .desktop-nav .nav-btn {
    font-family: 'Switzer', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--ui-ink-soft, #5C6B8A);
    border-radius: 10px;
    padding: 7px 12px;
    transition: all 0.15s ease;
}

body.ui-v2 .desktop-nav .nav-btn:hover {
    color: var(--primary, #2451C4);
    background: rgba(36, 81, 196, 0.08);
}

body.ui-v2 .desktop-nav .nav-btn.active {
    background: #EAF0FC !important;
    color: var(--primary, #2451C4) !important;
    font-weight: 600;
}

body.ui-v2 .icon-btn.menu-btn-top {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 10px;
    color: var(--ui-ink, #0E1B33);
    transition: all 0.15s ease;
}

body.ui-v2 .icon-btn.menu-btn-top:hover {
    background: var(--ui-bg, #F4F7FB);
    border-color: rgba(36, 81, 196, 0.3);
    color: var(--primary, #2451C4);
}

/* Profile Main Container */
body.ui-v2 .profile-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 90px;
    box-sizing: border-box;
}

/* Card Foundations */
body.ui-v2 .profile-card {
    background: var(--ui-surface, #FFFFFF) !important;
    border: 1px solid var(--ui-border, #E5E7EB) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.02) !important;
    padding: 22px 20px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Guest Hero Card */
body.ui-v2 .guest-hero-card {
    text-align: center;
}

body.ui-v2 .guest-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #EAF0FC;
    color: var(--primary, #2451C4);
    margin: 0 auto 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.ui-v2 .guest-hero-title {
    font-family: 'Switzer', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ui-ink, #0E1B33);
    margin-bottom: 6px;
}

body.ui-v2 .guest-hero-sub {
    font-size: 13px;
    color: var(--ui-ink-soft, #5C6B8A);
    margin-bottom: 18px;
    line-height: 1.45;
}

body.ui-v2 .perks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

body.ui-v2 .perk-item {
    background: var(--ui-bg, #F8FAFC);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.15s ease;
}

body.ui-v2 .perk-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.ui-v2 .perk-icon-bus {
    background: #EAF0FC;
    color: var(--primary, #2451C4);
}

body.ui-v2 .perk-icon-route {
    background: #ECFDF5;
    color: #059669;
}

body.ui-v2 .perk-icon-vip {
    background: #FEF3C7;
    color: #D97706;
}

body.ui-v2 .perk-title {
    font-family: 'Switzer', sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: block;
    color: var(--ui-ink, #0E1B33);
    margin-bottom: 2px;
}

body.ui-v2 .perk-desc {
    font-size: 10.5px;
    color: var(--ui-ink-soft, #5C6B8A);
    display: block;
    line-height: 1.3;
}

body.ui-v2 .btn-google-cta {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: 'Switzer', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1F2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.ui-v2 .btn-google-cta:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

body.ui-v2 .guest-hero-footnote {
    font-size: 11.5px;
    color: var(--ui-ink-soft, #5C6B8A);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

/* Student Identity Card */
/* Student Identity Card - Clean Unified Master Card Layout */
body.ui-v2 .profile-hero {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 16px 14px 14px !important;
    gap: 0 !important;
    min-height: 0 !important;
    margin-bottom: 12px !important;
    border-radius: 24px !important;
}

body.ui-v2 .btn-edit-dept {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--ui-bg, #F8FAFC);
    border: 1px solid var(--ui-border, #E5E7EB);
    color: var(--ui-ink-soft, #64748B);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
}

body.ui-v2 .btn-edit-dept:hover {
    background: #EAF0FC;
    color: var(--primary, #2451C4);
    border-color: rgba(36, 81, 196, 0.3);
}

body.ui-v2 .profile-avatar-wrap {
    position: relative;
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 5px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px !important;
}

body.ui-v2 .avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50%;
    background: #EAF0FC;
    color: var(--primary, #2451C4);
    border: 2px solid rgba(36, 81, 196, 0.25);
    font-family: 'Switzer', sans-serif;
    font-weight: 700;
    font-size: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s ease;
}

body.ui-v2 .profile-avatar-wrap.is-vip .avatar {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

body.ui-v2 .avatar-camera-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary, #2451C4);
    color: #FFFFFF;
    border: 2px solid var(--ui-surface, #FFFFFF);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.ui-v2 .profile-identity {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    gap: 0 !important;
}

body.ui-v2 .student-name {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px !important;
    font-weight: 750 !important;
    letter-spacing: -0.015em;
    color: var(--ui-ink, #0E1B33) !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100%;
    line-height: 1.25;
}

body.ui-v2 .dept-display-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    margin: 0 !important;
}

body.ui-v2 .student-dept {
    font-size: 12px !important;
    font-weight: 500;
    color: var(--ui-ink-soft, #64748B) !important;
    margin: 0 0 4px 0 !important;
    text-align: center !important;
    max-width: 280px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.35;
}

body.ui-v2 .student-id-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4.5px;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    background: var(--ui-bg, #F8FAFC) !important;
    border: 1px solid var(--ui-border, #E2E8F0) !important;
    font-family: 'Switzer', monospace;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer;
    align-self: center !important;
    margin: 2px auto 0 !important;
    transition: all 0.15s ease;
}

body.ui-v2 .student-id-chip:hover {
    background: #EAF0FC !important;
    border-color: rgba(36, 81, 196, 0.3) !important;
    color: var(--primary, #2451C4) !important;
}

body.ui-v2 .student-id-chip svg {
    color: #9CA3AF;
    transition: color 0.15s ease;
}

body.ui-v2 .student-shift-pill {
    position: static !important;
    transform: none !important;
    margin: 2px auto 8px auto !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 9px !important;
    border-radius: 9999px !important;
    background: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

body.ui-v2 .student-shift-pill .shift-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10B981;
    display: inline-block;
}

body.ui-v2 .student-shift-pill.shift-evening {
    background: #FFFBEB !important;
    color: #B45309 !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

body.ui-v2 .student-shift-pill.shift-evening .shift-dot {
    background: #F59E0B;
}

/* Integrated 3-Column Metrics (Proportional & Compact matching Reference) */
body.ui-v2 .profile-metrics-unified {
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

body.ui-v2 .profile-metrics-unified .rewards-metrics-row {
    display: flex !important;
    background: var(--ui-bg, #F8FAFC) !important;
    border: 1px solid var(--ui-border, #E2E8F0) !important;
    border-radius: 16px !important;
    padding: 8px 4px !important;
    margin-bottom: 0 !important;
}

body.ui-v2 .profile-metrics-unified .reward-metric-box {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: opacity 0.15s ease;
}

body.ui-v2 .profile-metrics-unified .reward-metric-box:hover {
    border: none !important;
    box-shadow: none !important;
    opacity: 0.85;
}

body.ui-v2 .profile-metrics-unified .reward-metric-box:not(:last-child) {
    border-right: 1px solid var(--ui-border, #E2E8F0) !important;
}

body.ui-v2 .profile-metrics-unified .metric-icon {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 2px !important;
}

body.ui-v2 .profile-metrics-unified .metric-icon svg {
    width: 15px !important;
    height: 15px !important;
}

body.ui-v2 .profile-metrics-unified .metric-icon-pts svg {
    color: #D97706 !important;
}

body.ui-v2 .profile-metrics-unified .metric-icon-vip svg {
    color: #059669 !important;
}

body.ui-v2 .profile-metrics-unified .metric-icon-store svg {
    color: var(--primary, #2451C4) !important;
}

body.ui-v2 .profile-metrics-unified .reward-metric-val {
    font-family: 'Switzer', sans-serif;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--ui-ink, #0E1B33) !important;
    line-height: 1.15 !important;
}

body.ui-v2 .profile-metrics-unified .reward-metric-val #profilePtsValue {
    color: inherit !important;
}

body.ui-v2 .profile-metrics-unified #profileVipDays {
    color: #059669 !important;
}

body.ui-v2 .profile-metrics-unified .reward-action-text {
    color: var(--primary, #2451C4) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 1.5px !important;
    font-size: 12.5px !important;
}

body.ui-v2 .profile-metrics-unified .reward-metric-label {
    font-size: 9.5px !important;
    font-weight: 500 !important;
    color: var(--ui-ink-soft, #64748B) !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
}

body.ui-v2 .student-id-chip:hover svg {
    color: var(--primary, #2451C4);
}

/* Department Edit Form */
body.ui-v2 .profile-dept-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--ui-border, #E5E7EB);
}

body.ui-v2 .dept-form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    text-align: left;
}

body.ui-v2 .dept-field-group label {
    font-family: 'Switzer', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--ui-ink-soft, #5C6B8A);
    display: block;
    margin-bottom: 4px;
}

body.ui-v2 .dept-field-group select {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--ui-border, #E5E7EB);
    background: var(--ui-surface, #FFFFFF);
    color: var(--ui-ink, #0E1B33);
    padding: 0 10px;
    font-size: 13px;
    font-family: 'Switzer', sans-serif;
    outline: none;
    transition: border-color 0.15s ease;
}

body.ui-v2 .dept-field-group select:focus {
    border-color: var(--primary, #2451C4);
    box-shadow: 0 0 0 3px rgba(36, 81, 196, 0.15);
}

body.ui-v2 .dept-form-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

body.ui-v2 .btn-save-dept {
    padding: 7px 18px;
    border-radius: 10px;
    background: var(--primary, #2451C4);
    color: #FFFFFF;
    font-family: 'Switzer', sans-serif;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.ui-v2 .btn-save-dept:hover {
    background: var(--primary-hover, #15306B);
}

body.ui-v2 .btn-cancel-dept {
    padding: 7px 18px;
    border-radius: 10px;
    background: var(--ui-bg, #F4F7FB);
    color: var(--ui-ink-soft, #5C6B8A);
    font-family: 'Switzer', sans-serif;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid var(--ui-border, #E5E7EB);
    cursor: pointer;
    transition: all 0.15s ease;
}

body.ui-v2 .btn-cancel-dept:hover {
    background: #E5E7EB;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .dept-status-msg {
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* Rewards Hub Card */
body.ui-v2 .rewards-hub-card {
    position: relative;
}

body.ui-v2 .rewards-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

body.ui-v2 .rewards-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Switzer', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .rewards-card-title svg {
    color: #F59E0B;
}

body.ui-v2 .rewards-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

body.ui-v2 .reward-metric-box {
    background: var(--ui-bg, #F8FAFC);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    padding: 12px 14px;
    transition: all 0.15s ease;
}

body.ui-v2 .reward-metric-label {
    font-size: 11.5px;
    color: var(--ui-ink-soft, #5C6B8A);
    display: block;
    margin-bottom: 4px;
}

body.ui-v2 .reward-metric-val {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .reward-metric-val #profilePtsValue {
    color: var(--primary, #2451C4);
}

body.ui-v2 .rewards-hub-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    background: #EAF0FC;
    color: var(--primary, #2451C4);
    font-family: 'Switzer', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

body.ui-v2 .rewards-hub-action:hover {
    background: #D9E4FA;
}

/* Emergency Contact Card */
body.ui-v2 .emergency-card-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

body.ui-v2 .emergency-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Switzer', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .emergency-card-title svg {
    color: #EF4444;
}

body.ui-v2 .emergency-toggle-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.ui-v2 .voluntary-badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 9999px;
    background: var(--ui-bg, #F4F7FB);
    color: var(--ui-ink-soft, #5C6B8A);
    border: 1px solid var(--ui-border, #E5E7EB);
}

body.ui-v2 .emergency-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 14px;
}

body.ui-v2 .emergency-field-label {
    font-family: 'Switzer', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ui-ink-soft, #5C6B8A);
    display: block;
    margin-bottom: 4px;
}

body.ui-v2 .emergency-field input,
body.ui-v2 .emergency-field select {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--ui-border, #E5E7EB);
    background: var(--ui-surface, #FFFFFF);
    padding: 0 10px;
    font-size: 13px;
    font-family: 'Switzer', sans-serif;
    color: var(--ui-ink, #0E1B33);
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

body.ui-v2 .emergency-field input:focus,
body.ui-v2 .emergency-field select:focus {
    border-color: var(--primary, #2451C4);
    box-shadow: 0 0 0 3px rgba(36, 81, 196, 0.15);
}

body.ui-v2 .emergency-save-btn {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    background: var(--primary, #2451C4);
    color: #FFFFFF;
    font-family: 'Switzer', sans-serif;
    font-weight: 600;
    font-size: 13px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.ui-v2 .emergency-save-btn:hover {
    background: var(--primary-hover, #15306B);
}

/* Section Labels & Menu Cards */
body.ui-v2 .section-label {
    font-family: 'Switzer', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ui-ink-soft, #5C6B8A);
    padding: 0 4px;
    margin: 14px 0 6px 0 !important;
}

body.ui-v2 .menu-card {
    padding: 6px !important;
}

body.ui-v2 .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ui-ink, #0E1B33);
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

body.ui-v2 .menu-item:hover {
    background: var(--ui-bg, #F8FAFC);
}

body.ui-v2 .menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.ui-v2 .menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #EAF0FC;
    color: var(--primary, #2451C4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.ui-v2 .menu-text {
    font-family: 'Switzer', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ui-ink, #0E1B33);
}

body.ui-v2 .menu-text-sub {
    font-size: 11px;
    color: var(--ui-ink-soft, #5C6B8A);
}

body.ui-v2 .menu-chevron {
    width: 14px;
    height: 14px;
    color: #9CA3AF;
}

body.ui-v2 .menu-item.danger .menu-icon {
    background: #FEE2E2;
    color: #EF4444;
}

body.ui-v2 .menu-item.danger .menu-text {
    color: #EF4444;
}

body.ui-v2 .ios-switch {
    width: 44px;
    height: 24px;
    border-radius: 9999px;
    background: var(--ui-border, #E5E7EB);
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

body.ui-v2 .ios-switch-knob {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

/* Footer Portal Note */
body.ui-v2 .profile-footer-note {
    text-align: center;
    font-family: 'Switzer', sans-serif;
    font-size: 11px;
    color: var(--ui-ink-soft, #5C6B8A);
    margin-top: 24px;
    padding-bottom: 24px;
}

/* Floating Bottom Dock */
body.ui-v2 .dock-island-main {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .dock-tab {
    color: #6B7280;
    transition: color 0.15s ease, background 0.15s ease;
}

body.ui-v2 .dock-tab:hover {
    color: var(--primary, #2451C4);
}

body.ui-v2 .dock-tab.active {
    background: var(--primary, #2451C4) !important;
    color: #FFFFFF !important;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(36, 81, 196, 0.35) !important;
}

body.ui-v2 .dock-tab.active svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

body.ui-v2 .dock-island-action {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .dock-action-btn {
    color: #374151;
}

/* Full Dark Theme Pairing */
:root.dark-theme body.ui-v2,
html.dark-theme body.ui-v2,
body.ui-v2.dark-theme {
    background-color: var(--ui-bg, #0B0F19);
    color: var(--ui-ink, #F9FAFB) !important;
}

:root.dark-theme body.ui-v2 .dash-header,
html.dark-theme body.ui-v2 .dash-header,
body.ui-v2.dark-theme .dash-header {
    background: var(--ui-surface, #111827) !important;
    border-bottom-color: var(--ui-border, #1F2937) !important;
}

:root.dark-theme body.ui-v2 .brand-text .title,
html.dark-theme body.ui-v2 .brand-text .title,
body.ui-v2.dark-theme .brand-text .title {
    color: var(--ui-ink, #F9FAFB) !important;
}

:root.dark-theme body.ui-v2 .desktop-nav .nav-btn,
html.dark-theme body.ui-v2 .desktop-nav .nav-btn,
body.ui-v2.dark-theme .desktop-nav .nav-btn {
    color: #9CA3AF;
}

:root.dark-theme body.ui-v2 .desktop-nav .nav-btn.active,
html.dark-theme body.ui-v2 .desktop-nav .nav-btn.active,
body.ui-v2.dark-theme .desktop-nav .nav-btn.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60A5FA !important;
}

:root.dark-theme body.ui-v2 .profile-card,
html.dark-theme body.ui-v2 .profile-card,
body.ui-v2.dark-theme .profile-card {
    background: var(--ui-surface, #111827) !important;
    border-color: var(--ui-border, #1F2937) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

:root.dark-theme body.ui-v2 .guest-hero-title,
html.dark-theme body.ui-v2 .guest-hero-title,
body.ui-v2.dark-theme .guest-hero-title,
:root.dark-theme body.ui-v2 .student-name,
html.dark-theme body.ui-v2 .student-name,
body.ui-v2.dark-theme .student-name,
:root.dark-theme body.ui-v2 .rewards-card-title,
html.dark-theme body.ui-v2 .rewards-card-title,
body.ui-v2.dark-theme .rewards-card-title,
:root.dark-theme body.ui-v2 .emergency-card-title,
html.dark-theme body.ui-v2 .emergency-card-title,
body.ui-v2.dark-theme .emergency-card-title,
:root.dark-theme body.ui-v2 .menu-text,
html.dark-theme body.ui-v2 .menu-text,
body.ui-v2.dark-theme .menu-text,
:root.dark-theme body.ui-v2 .perk-title,
html.dark-theme body.ui-v2 .perk-title,
body.ui-v2.dark-theme .perk-title,
:root.dark-theme body.ui-v2 .reward-metric-val,
html.dark-theme body.ui-v2 .reward-metric-val,
body.ui-v2.dark-theme .reward-metric-val {
    color: var(--ui-ink, #F9FAFB) !important;
}

:root.dark-theme body.ui-v2 .guest-hero-sub,
html.dark-theme body.ui-v2 .guest-hero-sub,
body.ui-v2.dark-theme .guest-hero-sub,
:root.dark-theme body.ui-v2 .student-dept,
html.dark-theme body.ui-v2 .student-dept,
body.ui-v2.dark-theme .student-dept,
:root.dark-theme body.ui-v2 .reward-metric-label,
html.dark-theme body.ui-v2 .reward-metric-label,
body.ui-v2.dark-theme .reward-metric-label,
:root.dark-theme body.ui-v2 .emergency-field-label,
html.dark-theme body.ui-v2 .emergency-field-label,
body.ui-v2.dark-theme .emergency-field-label,
:root.dark-theme body.ui-v2 .section-label,
html.dark-theme body.ui-v2 .section-label,
body.ui-v2.dark-theme .section-label,
:root.dark-theme body.ui-v2 .perk-desc,
html.dark-theme body.ui-v2 .perk-desc,
body.ui-v2.dark-theme .perk-desc,
:root.dark-theme body.ui-v2 .dept-field-group label,
html.dark-theme body.ui-v2 .dept-field-group label,
body.ui-v2.dark-theme .dept-field-group label {
    color: #9CA3AF;
}

:root.dark-theme body.ui-v2 .perk-item,
html.dark-theme body.ui-v2 .perk-item,
body.ui-v2.dark-theme .perk-item,
:root.dark-theme body.ui-v2 .reward-metric-box,
html.dark-theme body.ui-v2 .reward-metric-box,
body.ui-v2.dark-theme .reward-metric-box {
    background: #0B0F19;
    border-color: #1F2937;
}

:root.dark-theme body.ui-v2 .btn-edit-dept,
html.dark-theme body.ui-v2 .btn-edit-dept,
body.ui-v2.dark-theme .btn-edit-dept,
:root.dark-theme body.ui-v2 .student-id-chip,
html.dark-theme body.ui-v2 .student-id-chip,
body.ui-v2.dark-theme .student-id-chip,
:root.dark-theme body.ui-v2 .voluntary-badge,
html.dark-theme body.ui-v2 .voluntary-badge,
body.ui-v2.dark-theme .voluntary-badge,
:root.dark-theme body.ui-v2 .btn-cancel-dept,
html.dark-theme body.ui-v2 .btn-cancel-dept,
body.ui-v2.dark-theme .btn-cancel-dept {
    background: #1F2937;
    border-color: #374151;
    color: #D1D5DB;
}

:root.dark-theme body.ui-v2 .avatar,
html.dark-theme body.ui-v2 .avatar,
body.ui-v2.dark-theme .avatar {
    background: rgba(59, 130, 246, 0.15);
    border-color: #374151;
    color: #60A5FA;
}

:root.dark-theme body.ui-v2 .emergency-field input,
:root.dark-theme body.ui-v2 .emergency-field select,
:root.dark-theme body.ui-v2 .dept-field-group select,
html.dark-theme body.ui-v2 .emergency-field input,
html.dark-theme body.ui-v2 .emergency-field select,
html.dark-theme body.ui-v2 .dept-field-group select,
body.ui-v2.dark-theme .emergency-field input,
body.ui-v2.dark-theme .emergency-field select,
body.ui-v2.dark-theme .dept-field-group select {
    background: #1F2937;
    border-color: #374151;
    color: #F9FAFB;
}

:root.dark-theme body.ui-v2 .menu-item:hover,
html.dark-theme body.ui-v2 .menu-item:hover,
body.ui-v2.dark-theme .menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

:root.dark-theme body.ui-v2 .menu-icon,
html.dark-theme body.ui-v2 .menu-icon,
body.ui-v2.dark-theme .menu-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

:root.dark-theme body.ui-v2 .rewards-hub-action,
html.dark-theme body.ui-v2 .rewards-hub-action,
body.ui-v2.dark-theme .rewards-hub-action {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

:root.dark-theme body.ui-v2 .rewards-hub-action:hover,
html.dark-theme body.ui-v2 .rewards-hub-action:hover,
body.ui-v2.dark-theme .rewards-hub-action:hover {
    background: rgba(59, 130, 246, 0.22);
}

:root.dark-theme body.ui-v2 .dock-island-main,
:root.dark-theme body.ui-v2 .dock-island-action,
html.dark-theme body.ui-v2 .dock-island-main,
html.dark-theme body.ui-v2 .dock-island-action,
body.ui-v2.dark-theme .dock-island-main,
body.ui-v2.dark-theme .dock-island-action {
    background: rgba(17, 24, 39, 0.94);
    border-color: rgba(31, 41, 55, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

:root.dark-theme body.ui-v2 .dock-tab,
html.dark-theme body.ui-v2 .dock-tab,
body.ui-v2.dark-theme .dock-tab {
    color: #9CA3AF;
}

:root.dark-theme body.ui-v2 .dock-tab.active,
html.dark-theme body.ui-v2 .dock-tab.active,
body.ui-v2.dark-theme .dock-tab.active {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45) !important;
}

:root.dark-theme body.ui-v2 .dock-tab.active svg,
html.dark-theme body.ui-v2 .dock-tab.active svg,
body.ui-v2.dark-theme .dock-tab.active svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

:root.dark-theme body.ui-v2 .dock-action-btn,
html.dark-theme body.ui-v2 .dock-action-btn,
body.ui-v2.dark-theme .dock-action-btn {
    color: #D1D5DB;
}

:root.dark-theme body.ui-v2 .avatar-camera-badge,
html.dark-theme body.ui-v2 .avatar-camera-badge,
body.ui-v2.dark-theme .avatar-camera-badge {
    background: #3B82F6;
    border-color: #101624;
}

:root.dark-theme body.ui-v2 .student-id-chip,
html.dark-theme body.ui-v2 .student-id-chip,
body.ui-v2.dark-theme .student-id-chip {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified,
html.dark-theme body.ui-v2 .profile-metrics-unified,
body.ui-v2.dark-theme .profile-metrics-unified {
    border-top: none !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .rewards-metrics-row,
html.dark-theme body.ui-v2 .profile-metrics-unified .rewards-metrics-row,
body.ui-v2.dark-theme .profile-metrics-unified .rewards-metrics-row {
    background: #090e1a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-box,
html.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-box,
body.ui-v2.dark-theme .profile-metrics-unified .reward-metric-box {
    background: transparent !important;
    border: none !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-box:not(:last-child),
html.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-box:not(:last-child),
body.ui-v2.dark-theme .profile-metrics-unified .reward-metric-box:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .metric-icon {
    background: transparent !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .metric-icon-pts svg {
    color: #FBBF24 !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .metric-icon-vip svg {
    color: #34D399 !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .metric-icon-store svg {
    color: #60A5FA !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-val,
html.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-val,
body.ui-v2.dark-theme .profile-metrics-unified .reward-metric-val {
    color: #FFFFFF !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified #profileVipDays,
html.dark-theme body.ui-v2 .profile-metrics-unified #profileVipDays,
body.ui-v2.dark-theme .profile-metrics-unified #profileVipDays {
    color: #34D399 !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .reward-action-text,
html.dark-theme body.ui-v2 .profile-metrics-unified .reward-action-text,
body.ui-v2.dark-theme .profile-metrics-unified .reward-action-text {
    color: #3B82F6 !important;
}

:root.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-label,
html.dark-theme body.ui-v2 .profile-metrics-unified .reward-metric-label,
body.ui-v2.dark-theme .profile-metrics-unified .reward-metric-label {
    color: #94A3B8 !important;
}

:root.dark-theme body.ui-v2 .student-shift-pill,
html.dark-theme body.ui-v2 .student-shift-pill,
body.ui-v2.dark-theme .student-shift-pill {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6EE7B7 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

:root.dark-theme body.ui-v2 .student-shift-pill.shift-evening,
html.dark-theme body.ui-v2 .student-shift-pill.shift-evening,
body.ui-v2.dark-theme .student-shift-pill.shift-evening {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #FCD34D !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Mobile Breakpoint Standards (Rule 1.1) */
@media (max-width: 480px) {
    body.ui-v2 .profile-container {
        padding: 14px 12px 85px !important;
        max-width: 100%;
    }
    body.ui-v2 .profile-card,
    body.ui-v2 .menu-card {
        padding: 16px 14px !important;
        border-radius: 16px !important;
        margin-bottom: 12px !important;
    }
    body.ui-v2 .profile-hero {
        padding: 14px 12px 12px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important;
    }
    body.ui-v2 .profile-avatar-wrap {
        width: 64px !important;
        height: 64px !important;
        flex: 0 0 64px !important;
        margin: 0 auto 5px !important;
    }
    body.ui-v2 .profile-avatar-wrap .avatar {
        width: 64px !important;
        height: 64px !important;
        font-size: 20px !important;
    }
    body.ui-v2 .student-name {
        font-size: 15.5px !important;
        margin: 0 0 2px 0 !important;
        padding-right: 0 !important;
        text-align: center !important;
    }
    body.ui-v2 .student-dept {
        font-size: 11.5px !important;
        margin: 0 0 3px 0 !important;
        text-align: center !important;
    }
    body.ui-v2 .student-id-chip {
        font-size: 10.5px !important;
        padding: 2px 7px !important;
        margin: 2px auto 0 !important;
        align-self: center !important;
    }
    body.ui-v2 .student-shift-pill {
        font-size: 10px !important;
        padding: 1.5px 8px !important;
        margin: 2px auto 8px auto !important;
    }
    body.ui-v2 .profile-metrics-unified {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    body.ui-v2 .profile-metrics-unified .rewards-metrics-row {
        padding: 7px 2px !important;
    }
    body.ui-v2 .profile-metrics-unified .reward-metric-val {
        font-size: 13.5px !important;
    }
    body.ui-v2 .profile-metrics-unified .reward-metric-label {
        font-size: 9px !important;
    }
    body.ui-v2 .emergency-card {
        padding: 16px 14px !important;
    }
    body.ui-v2 .emergency-card-title {
        font-size: 13px !important;
    }
    body.ui-v2 .perks-grid {
        gap: 6px;
    }
    body.ui-v2 .perk-item {
        padding: 10px 4px;
    }
    body.ui-v2 .emergency-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 360px) {
    body.ui-v2 .profile-card,
    body.ui-v2 .menu-card,
    body.ui-v2 .emergency-card {
        padding: 14px 10px !important;
        margin-bottom: 10px !important;
    }
    body.ui-v2 .profile-hero {
        padding: 12px 10px 10px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important;
    }
    body.ui-v2 .profile-avatar-wrap {
        width: 58px !important;
        height: 58px !important;
        flex: 0 0 58px !important;
        margin: 0 auto 4px !important;
    }
    body.ui-v2 .profile-avatar-wrap .avatar {
        width: 58px !important;
        height: 58px !important;
        font-size: 18px !important;
    }
    body.ui-v2 .student-name {
        font-size: 14.5px !important;
        margin: 0 0 2px 0 !important;
        padding-right: 0 !important;
        text-align: center !important;
    }
    body.ui-v2 .student-dept {
        font-size: 11px !important;
        margin: 0 0 3px 0 !important;
        text-align: center !important;
    }
    body.ui-v2 .student-id-chip {
        font-size: 10px !important;
        padding: 1.5px 6px !important;
        margin: 2px auto 0 !important;
        align-self: center !important;
    }
    body.ui-v2 .student-shift-pill {
        font-size: 9.5px !important;
        padding: 1.5px 7px !important;
        margin: 2px auto 6px auto !important;
    }
    body.ui-v2 .profile-metrics-unified {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    body.ui-v2 .profile-metrics-unified .rewards-metrics-row {
        padding: 6px 2px !important;
        border-radius: 12px !important;
    }
    body.ui-v2 .profile-metrics-unified .metric-icon {
        margin-bottom: 2px !important;
    }
    body.ui-v2 .profile-metrics-unified .metric-icon svg {
        width: 13px !important;
        height: 13px !important;
    }
    body.ui-v2 .profile-metrics-unified .reward-metric-val {
        font-size: 12.5px !important;
    }
    body.ui-v2 .profile-metrics-unified .reward-metric-label {
        font-size: 8.5px !important;
    }
    body.ui-v2 .voluntary-badge {
        font-size: 9.5px !important;
        padding: 2px 6px !important;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    body.ui-v2 .profile-card,
    body.ui-v2 .menu-item,
    body.ui-v2 .btn-google-cta,
    body.ui-v2 .rewards-hub-action,
    body.ui-v2 .btn-save-dept,
    body.ui-v2 .emergency-save-btn {
        transition: none !important;
    }
}
