:root {
    --v2-navy: #0f2557;
    --v2-blue: #2563eb;
    --v2-indigo: #4f46e5;
    --v2-cyan: #0891b2;
    --v2-bg: #f4f7fb;
    --v2-card: #ffffff;
    --v2-text: #172033;
    --v2-muted: #64748b;
    --v2-border: #e2e8f0;
    --v2-sidebar: 252px;
    --v2-topbar: 68px;
    --v2-radius: 18px;
}

* { box-sizing: border-box; }

html { background: var(--v2-bg); }

body.v2-portal {
    margin: 0;
    min-height: 100vh;
    color: var(--v2-text);
    background:
        radial-gradient(circle at 92% 4%, rgba(37, 99, 235, .10), transparent 24rem),
        var(--v2-bg);
}

.v2-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 10000;
    transform: translateY(-150%);
    padding: .65rem 1rem;
    border-radius: 10px;
    background: #fff;
    color: var(--v2-navy);
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(15, 37, 87, .18);
}

.v2-skip-link:focus { transform: translateY(0); }

.v2-shell { min-height: 100vh; }

.v2-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: var(--v2-sidebar);
    display: flex;
    flex-direction: column;
    color: #eaf1ff;
    background: linear-gradient(180deg, #0c1f49 0%, #102b64 58%, #153474 100%);
    box-shadow: 16px 0 38px rgba(15, 37, 87, .10);
    transition: transform .22s ease;
}

.v2-brand {
    height: var(--v2-topbar);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.v2-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-weight: 900;
    letter-spacing: -.03em;
    background: linear-gradient(145deg, #38bdf8, #6366f1);
    box-shadow: 0 8px 22px rgba(56, 189, 248, .28);
}

.v2-brand-copy strong,
.v2-brand-copy span { display: block; }
.v2-brand-copy strong { font-size: .96rem; line-height: 1.1; }
.v2-brand-copy span { margin-top: .18rem; color: #a9c3f4; font-size: .68rem; font-weight: 700; }

.v2-nav {
    flex: 1;
    overflow-y: auto;
    padding: .85rem .7rem 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.24) transparent;
}

.v2-nav-group { margin: 0 0 .85rem; }
.v2-nav-label {
    display: block;
    padding: .2rem .75rem .38rem;
    color: #7fa2df;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.v2-nav-link {
    display: flex;
    align-items: center;
    gap: .72rem;
    min-height: 40px;
    margin: 2px 0;
    padding: .58rem .72rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #dce8ff;
    font-size: .79rem;
    font-weight: 650;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.v2-nav-link i { width: 18px; color: #8eb6f5; text-align: center; }
.v2-nav-link:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.v2-nav-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(37,99,235,.86), rgba(79,70,229,.62));
    border-color: rgba(255,255,255,.13);
    box-shadow: 0 8px 20px rgba(5, 16, 43, .20);
}
.v2-nav-link.is-active i { color: #fff; }

.v2-sidebar-footer {
    padding: .8rem;
    border-top: 1px solid rgba(255,255,255,.10);
}

.v2-profile-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #fff;
    text-decoration: none;
    padding: .55rem;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
}

.v2-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
    background: rgba(56,189,248,.22);
    border: 1px solid rgba(255,255,255,.16);
}
.v2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v2-profile-copy { min-width: 0; }
.v2-profile-copy strong,
.v2-profile-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-profile-copy strong { font-size: .74rem; }
.v2-profile-copy span { color: #a9c3f4; font-size: .64rem; margin-top: .15rem; text-transform: capitalize; }

.v2-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--v2-sidebar);
    z-index: 50;
    height: var(--v2-topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.4rem;
    background: rgba(255,255,255,.90);
    border-bottom: 1px solid rgba(226,232,240,.88);
    backdrop-filter: blur(14px);
}

.v2-topbar-left { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.v2-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--v2-border);
    border-radius: 12px;
    color: var(--v2-navy);
    background: #fff;
    cursor: pointer;
}
.v2-page-heading { min-width: 0; }
.v2-page-heading strong { display: block; color: var(--v2-navy); font-size: .92rem; }
.v2-page-heading span { display: block; margin-top: .14rem; color: var(--v2-muted); font-size: .69rem; }

.v2-top-actions { display: flex; align-items: center; gap: .45rem; }
.v2-top-action {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--v2-border);
    border-radius: 12px;
    color: #475569;
    background: #fff;
    text-decoration: none;
    transition: .16s ease;
}
.v2-top-action:hover { color: var(--v2-blue); border-color: #bfdbfe; background: #eff6ff; }
.v2-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .58rem;
    font-weight: 900;
}

.v2-main {
    min-height: 100vh;
    margin-left: var(--v2-sidebar);
    padding-top: var(--v2-topbar);
}

.v2-content { padding: 1.35rem; }
.v2-content > :first-child { margin-top: 0; }

.v2-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: none;
    background: rgba(15,23,42,.48);
    backdrop-filter: blur(2px);
}

.v2-dashboard { max-width: 1440px; margin: 0 auto; }
.v2-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(191,219,254,.78);
    border-radius: var(--v2-radius);
    background: linear-gradient(105deg, #fff 0%, #f4f8ff 62%, #eef2ff 100%);
    box-shadow: 0 10px 30px rgba(15,37,87,.06);
}
.v2-welcome h1 { margin: 0; color: var(--v2-navy); font-size: clamp(1.25rem, 2vw, 1.72rem); line-height: 1.2; }
.v2-welcome p { margin: .38rem 0 0; color: var(--v2-muted); font-size: .84rem; }
.v2-today { flex: 0 0 auto; text-align: right; }
.v2-today strong { display: block; color: var(--v2-navy); font-size: .86rem; }
.v2-today span { color: var(--v2-muted); font-size: .7rem; }

.v2-notice {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: .85rem;
    padding: .8rem 1rem;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
    color: #854d0e;
}
.v2-notice-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #a16207;
    background: #fef3c7;
}
.v2-notice-copy { min-width: 0; flex: 1; }
.v2-notice-copy strong { display: block; font-size: .78rem; }
.v2-notice-copy span { display: block; margin-top: .12rem; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-notice a { color: #92400e; font-size: .7rem; font-weight: 800; text-decoration: none; }

.v2-section { margin-top: 1.15rem; }
.v2-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.v2-section-head h2 { margin: 0; color: var(--v2-navy); font-size: .92rem; }
.v2-section-head p { margin: .18rem 0 0; color: var(--v2-muted); font-size: .7rem; }

.v2-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.v2-quick-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--v2-border);
    border-radius: 16px;
    color: var(--v2-text);
    background: var(--v2-card);
    box-shadow: 0 8px 24px rgba(15,37,87,.045);
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.v2-quick-card:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 14px 30px rgba(15,37,87,.09); }
.v2-quick-top { display: flex; justify-content: space-between; gap: .8rem; }
.v2-quick-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--card-accent, var(--v2-blue));
    background: var(--card-soft, #eff6ff);
}
.v2-quick-arrow { color: #cbd5e1; font-size: .75rem; }
.v2-quick-card strong { display: block; margin-top: .75rem; color: var(--v2-navy); font-size: .82rem; }
.v2-quick-card span { display: block; margin-top: .2rem; color: var(--v2-muted); font-size: .68rem; line-height: 1.4; }

.v2-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: .85rem; }
.v2-panel { border: 1px solid var(--v2-border); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15,37,87,.045); }
.v2-panel-head { padding: .9rem 1rem .7rem; border-bottom: 1px solid #f1f5f9; }
.v2-panel-head h3 { margin: 0; color: var(--v2-navy); font-size: .82rem; }
.v2-panel-body { padding: .85rem 1rem 1rem; }

.v2-module-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem; }
.v2-module-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .7rem;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}
.v2-module-link i { width: 18px; color: var(--v2-blue); text-align: center; }
.v2-module-link:hover { color: var(--v2-blue); border-color: #bfdbfe; background: #eff6ff; }

.v2-clocks { display: grid; gap: .48rem; }
.v2-clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding: .62rem .7rem;
    border-radius: 12px;
    background: #f8fafc;
}
.v2-clock-city { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.v2-clock-flag { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #eef2ff; font-size: .82rem; }
.v2-clock-city strong { display: block; color: #334155; font-size: .7rem; }
.v2-clock-city span { display: block; color: #94a3b8; font-size: .6rem; }
.v2-clock-time { color: var(--v2-navy); font-size: .74rem; font-weight: 850; white-space: nowrap; }

.v2-footer {
    margin-top: 1.25rem;
    padding: 1rem .15rem .25rem;
    color: #94a3b8;
    font-size: .65rem;
    text-align: center;
}

@media (max-width: 1120px) {
    .v2-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .v2-sidebar { transform: translateX(-105%); }
    .v2-sidebar.is-open { transform: translateX(0); }
    .v2-mobile-overlay.is-open { display: block; }
    .v2-topbar { left: 0; padding: 0 .85rem; }
    .v2-main { margin-left: 0; }
    .v2-menu-button { display: grid; }
    .v2-content { padding: 1rem; }
    .v2-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .v2-page-heading span { display: none; }
    .v2-top-action.v2-hide-mobile { display: none; }
    .v2-welcome { align-items: flex-start; flex-direction: column; }
    .v2-today { text-align: left; }
    .v2-notice-copy span { white-space: normal; }
    .v2-notice a { display: none; }
    .v2-quick-grid,
    .v2-module-list { grid-template-columns: 1fr; }
    .v2-quick-card { min-height: 106px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
