:root {
    --bg: #050505;
    --bg-soft: #0c0c0f;
    --panel: rgba(16, 16, 18, 0.82);
    --panel-strong: rgba(20, 20, 24, 0.94);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f6f7fb;
    --muted: #9da2b3;
    --gold: #ffb000;
    --gold-soft: rgba(255, 176, 0, 0.16);
    --cyan: #18d9e6;
    --cyan-soft: rgba(24, 217, 230, 0.16);
    --blue: #2296f3;
    --blue-soft: rgba(34, 150, 243, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(24, 217, 230, 0.12), transparent 26%),
        radial-gradient(circle at top right, rgba(255, 176, 0, 0.12), transparent 24%),
        linear-gradient(180deg, #070708 0%, #030303 100%);
    font-family: "Plus Jakarta Sans", "Segoe UI", "Ubuntu", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(255,255,255,0.45), transparent 80%);
    pointer-events: none;
}

h1,
h2,
h3,
strong {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.03em;
}

p {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

.admin-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 300px;
    padding: 28px;
    background: rgba(10, 10, 12, 0.9);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(22px);
    z-index: 30;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.sidebar-logo {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 0 24px rgba(24, 217, 230, 0.15));
}

.sidebar-brand strong {
    display: block;
    font-size: 1.1rem;
}

.sidebar-brand span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 13px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(24, 217, 230, 0.12), rgba(255, 176, 0, 0.12));
    border-color: var(--border);
}

.sidebar-card,
.panel-card,
.hero-panel,
.stat-card,
.login-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.sidebar-card {
    padding: 22px;
}

.sidebar-card h3 {
    font-size: 1.18rem;
    margin: 8px 0 10px;
}

.sidebar-card p {
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 18px;
}

.page-wrap {
    grid-column: 2;
    min-width: 0;
    min-height: 100vh;
}

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 300px;
    min-height: var(--header-height);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(8, 8, 10, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    z-index: 20;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-right {
    position: relative;
}

.topbar-lang .brand-lang-picker {
    position: static;
}

.topbar-lang .brand-lang-menu {
    right: auto;
    left: 0;
}

.topbar h1 {
    font-size: clamp(1.25rem, 2vw, 1.9rem);
    margin: 4px 0 0;
}

.eyebrow {
    color: var(--cyan);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.search-chip,
.user-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.92rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.86rem;
    font-weight: 600;
}

.lang-pill.active,
.lang-pill:hover {
    color: var(--text);
    border-color: rgba(24, 217, 230, 0.4);
    background: linear-gradient(120deg, rgba(24, 217, 230, 0.2), rgba(255, 176, 0, 0.2));
}

.user-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 18px rgba(255, 176, 0, 0.55);
}

.content {
    padding: calc(var(--header-height) + 26px) 28px 40px;
}

.site-footer {
    margin: 18px 28px 32px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(12, 12, 14, 0.82);
    box-shadow: var(--shadow);
}

.footer-inner {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
}

.footer-col {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-col-title {
    color: var(--cyan);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-links,
.footer-social {
    display: grid;
    gap: 8px;
}

.footer-links a,
.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--cyan);
}

.footer-copy {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.hero-grid,
.dashboard-grid,
.route-grid,
.stats-grid {
    display: grid;
    gap: 22px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
    margin-bottom: 22px;
}

.hero-panel {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -10% -30% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 217, 230, 0.18), transparent 68%);
}

.hero-panel-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.hero-panel-main h2 {
    max-width: 12ch;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 0.98;
    margin: 12px 0 18px;
}

.muted-copy {
    color: var(--muted);
    line-height: 1.7;
    max-width: 62ch;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.primary-button,
.ghost-button,
.text-link {
    appearance: none;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 10px 18px 24px 8px;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    position: relative;
    overflow: hidden;
}

.primary-button::before,
.ghost-button::before {
    content: "";
    position: absolute;
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    border-radius: 0 0 14px 0;
    background: rgba(6, 6, 8, 0.55);
}

.primary-button {
    color: #0b0b0f;
    background: linear-gradient(135deg, var(--gold), #ffd15f);
}

.ghost-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.signal-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.signal-list div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
}

.signal-list strong,
.signal-list small {
    grid-column: 2;
}

.signal-list small {
    color: var(--muted);
}

.signal {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-top: 4px;
}

.signal.cyan {
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(24, 217, 230, 0.45);
}

.signal.gold {
    background: var(--gold);
    box-shadow: 0 0 18px rgba(255, 176, 0, 0.45);
}

.signal.blue {
    background: var(--blue);
    box-shadow: 0 0 18px rgba(34, 150, 243, 0.45);
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stat-card {
    padding: 22px;
    animation: riseIn 480ms ease both;
}

.stat-card p {
    color: var(--muted);
    margin-bottom: 16px;
}

.stat-card h3 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--text);
    font-size: 0.95rem;
}

.tone-cyan {
    background: linear-gradient(180deg, rgba(24, 217, 230, 0.15), rgba(12, 12, 15, 0.9));
}

.tone-gold {
    background: linear-gradient(180deg, rgba(255, 176, 0, 0.15), rgba(12, 12, 15, 0.9));
}

.tone-blue {
    background: linear-gradient(180deg, rgba(34, 150, 243, 0.15), rgba(12, 12, 15, 0.9));
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
    margin-bottom: 22px;
}

.panel-card {
    padding: 24px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin-top: 8px;
    font-size: 1.4rem;
}

.text-link {
    color: var(--cyan);
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
}

.admin-table th {
    color: var(--muted);
    font-weight: 600;
}

.timeline-list {
    display: grid;
    gap: 18px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: start;
}

.timeline-time {
    color: var(--gold);
    font-family: "Space Grotesk", sans-serif;
}

.timeline-item p {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 6px;
}

.route-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card h3 {
    font-size: 1.15rem;
    margin: 10px 0 14px;
}

.route-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.progress-label {
    display: inline-block;
    margin-top: 12px;
}

.login-shell {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
}

.login-layout {
    width: min(1240px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
    position: relative;
    margin: 0 auto;
    background: rgba(10, 10, 12, 0.86);
    border: 1px solid var(--border);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.login-shell .site-footer {
    width: min(1240px, 100%);
    margin: 18px auto 0;
}

.login-brand-panel,
.login-form-panel {
    position: relative;
    min-height: calc(100vh - 64px);
}

.login-brand-panel {
    padding: 42px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(24, 217, 230, 0.18), transparent 28%),
        radial-gradient(circle at 80% 16%, rgba(255, 176, 0, 0.18), transparent 22%),
        linear-gradient(180deg, rgba(8, 8, 10, 0.6), rgba(8, 8, 10, 0.95));
}

.orbital-backdrop {
    position: absolute;
    inset: 8% auto auto 50%;
    width: 520px;
    height: 520px;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 3px solid rgba(255, 176, 0, 0.72);
    box-shadow:
        0 0 0 34px rgba(24, 217, 230, 0.08),
        0 0 0 74px rgba(34, 150, 243, 0.08),
        0 0 0 114px rgba(255, 176, 0, 0.06);
    opacity: 0.85;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
}

.brand-lang-picker {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
}

.brand-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(6, 6, 8, 0.62);
    color: var(--text);
    cursor: pointer;
}

.brand-lang-trigger svg {
    width: 16px;
    height: 16px;
    fill: var(--cyan);
}

.brand-lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, 84vw);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(8, 8, 10, 0.96);
    box-shadow: var(--shadow);
}

.brand-lang-search input {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 12px;
}

.brand-lang-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.brand-lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text);
}

.brand-lang-item:hover,
.brand-lang-item.active {
    border-color: var(--border);
    background: linear-gradient(120deg, rgba(24, 217, 230, 0.16), rgba(255, 176, 0, 0.16));
}

.brand-lang-item small {
    color: var(--muted);
    letter-spacing: 0.08em;
}

.login-logo {
    width: 94px;
    margin-bottom: 32px;
}

.login-brand-inner h1 {
    font-size: clamp(1.8rem, 2.8vw, 3.1rem);
    line-height: 0.94;
    margin: 12px 0 18px;
}

.login-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.login-stats div {
    min-width: 140px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.login-stats strong {
    display: block;
    font-size: 1.6rem;
}

.login-stats span {
    color: var(--muted);
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: linear-gradient(180deg, rgba(12, 12, 14, 0.9), rgba(6, 6, 8, 0.96));
}

.login-card {
    width: min(100%, 430px);
    padding: 28px;
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.login-form {
    display: grid;
    gap: 16px;
    margin: 22px 0;
}

.login-form label {
    display: grid;
    gap: 10px;
}

.login-form span {
    color: var(--muted);
    font-size: 0.92rem;
}

.login-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

.login-form input:focus {
    outline: 2px solid rgba(24, 217, 230, 0.45);
    outline-offset: 2px;
}

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

.inline-check input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.remember-block,
.login-form label.remember-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.remember-block input[type="checkbox"] {
    appearance: auto;
    width: 16px;
    height: 16px;
    min-height: 16px;
    flex: 0 0 16px;
    margin: 0;
    padding: 0;
}

.remember-block span {
    color: var(--muted);
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 14px;
    margin-top: 14px;
}

.auth-link-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.auth-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.auth-link-register {
    background: linear-gradient(135deg, rgba(24, 217, 230, 0.22), rgba(24, 217, 230, 0.06));
    border-color: rgba(24, 217, 230, 0.36);
}

.auth-link-register .auth-link-icon {
    background: var(--cyan);
    box-shadow: 0 0 16px rgba(24, 217, 230, 0.65);
}

.auth-link-register .auth-link-icon::before {
    content: "+";
    font-size: 10px;
    font-weight: 700;
    color: #041114;
    line-height: 1;
}

.auth-link-forgot {
    background: linear-gradient(135deg, rgba(255, 176, 0, 0.24), rgba(255, 176, 0, 0.06));
    border-color: rgba(255, 176, 0, 0.42);
}

.auth-link-forgot .auth-link-icon {
    background: var(--gold);
    box-shadow: 0 0 16px rgba(255, 176, 0, 0.65);
}

.auth-link-forgot .auth-link-icon::before {
    content: "?";
    font-size: 10px;
    font-weight: 700;
    color: #1a1300;
    line-height: 1;
}

.auth-link-chip:hover {
    transform: translateY(-1px);
}

.swal2-popup.swal2-keyzeron {
    background: #0b0b10;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px 20px 26px 10px;
    box-shadow: var(--shadow);
}

.swal2-popup.swal2-keyzeron .swal2-title {
    color: var(--text);
}

.swal2-popup.swal2-keyzeron .swal2-html-container {
    color: var(--muted);
}

.swal2-popup.swal2-keyzeron .swal2-confirm {
    background: linear-gradient(135deg, var(--gold), #ffd15f);
    color: #0b0b0f !important;
    border-radius: 10px 18px 24px 8px;
}

.swal2-popup.swal2-keyzeron .swal2-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text) !important;
    border-radius: 10px 18px 24px 8px;
}

.swal2-popup.swal2-keyzeron .swal2-styled {
    font-weight: 700;
    text-shadow: none;
}

.login-support {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.form-alert {
    margin-top: 16px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 102, 102, 0.45);
    background: rgba(255, 102, 102, 0.12);
    color: #ffd4d4;
    font-size: 0.92rem;
}

.form-success {
    margin-top: 16px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(24, 217, 230, 0.45);
    background: rgba(24, 217, 230, 0.14);
    color: #cbfbff;
    font-size: 0.92rem;
}

.users-content {
    display: grid;
    gap: 22px;
}

.users-form-card h2 {
    margin-top: 8px;
    font-size: 1.2rem;
}

.admin-form {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.admin-form label {
    display: grid;
    gap: 8px;
}

.admin-form label span {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-form input,
.admin-form select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

.admin-form input:focus,
.admin-form select:focus {
    outline: 2px solid rgba(24, 217, 230, 0.45);
    outline-offset: 2px;
}

.form-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.login-support div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.login-support strong {
    display: block;
    margin-bottom: 6px;
}

.login-support span {
    color: var(--muted);
    font-size: 0.92rem;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    visibility: hidden;
    transition: 180ms ease;
    z-index: 25;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

body.drawer-open {
    overflow: hidden;
}

body.drawer-open .sidebar {
    transform: translateX(0);
}

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

@media (max-width: 1180px) {
    .stats-grid,
    .route-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .hero-grid,
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel,
    .login-form-panel {
        min-height: auto;
    }

    .brand-lang-picker {
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 980px) {
    .admin-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 180ms ease;
        width: min(86vw, 320px);
    }

    .topbar {
        left: 0;
        padding: 16px 18px;
    }

    .content {
        padding: calc(var(--header-height) + 18px) 18px 32px;
    }

    .site-footer {
        margin: 10px 18px 24px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: inline-block;
    }
}

@media (max-width: 720px) {
    :root {
        --header-height: 148px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .lang-switch {
        width: 100%;
        justify-content: flex-start;
    }

    .stats-grid,
    .route-grid,
    .admin-form {
        grid-template-columns: 1fr;
    }

    .auth-links {
        gap: 10px;
    }

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

    .hero-panel,
    .panel-card,
    .login-card {
        padding: 20px;
    }

    .search-chip {
        width: 100%;
        justify-content: center;
    }

    .login-shell {
        padding: 0;
        align-items: stretch;
    }

    .site-footer {
        margin: 12px;
        padding: 18px;
    }

    .login-layout {
        border-radius: 0;
        min-height: 100vh;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 20px;
    }

    .orbital-backdrop {
        width: 320px;
        height: 320px;
        box-shadow:
            0 0 0 22px rgba(24, 217, 230, 0.08),
            0 0 0 48px rgba(34, 150, 243, 0.08),
            0 0 0 72px rgba(255, 176, 0, 0.06);
    }
}

/* New fixed full-width admin header */
.admin-page {
    --header-height: 76px;
}

.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: blur(20px);
    z-index: 50;
}

.admin-topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    min-height: var(--header-height);
    padding: 12px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.topbar-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    text-decoration: none;
    transition: 160ms ease;
}

.topbar-nav-link:hover,
.topbar-nav-link.active {
    color: var(--text);
    border-color: var(--border);
    background: linear-gradient(120deg, rgba(24, 217, 230, 0.14), rgba(255, 176, 0, 0.14));
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.dot-super {
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(24, 217, 230, 0.55);
}

.dot-org {
    background: var(--gold);
    box-shadow: 0 0 18px rgba(255, 176, 0, 0.55);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 20px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #041114;
    background: linear-gradient(135deg, var(--cyan), #8ef5ff);
}

.switch-org-btn,
.exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.switch-org-btn:hover {
    border-color: rgba(24, 217, 230, 0.4);
    background: linear-gradient(120deg, rgba(24, 217, 230, 0.18), rgba(24, 217, 230, 0.08));
}

.exit-btn {
    border-color: rgba(255, 176, 0, 0.4);
    background: linear-gradient(120deg, rgba(255, 176, 0, 0.26), rgba(255, 115, 0, 0.22));
    color: #fff6dd;
}

.exit-btn i {
    color: #ffda77;
}

.exit-btn:hover {
    filter: brightness(1.06);
}

.ham-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
}

.ham-btn span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
}

.switch-org-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 42px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, rgba(24, 217, 230, 0.2), rgba(255, 176, 0, 0.2));
    border-bottom: 1px solid var(--border);
    z-index: 60;
}

.switch-org-banner + .admin-topbar {
    top: 42px;
}

.switch-exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 176, 0, 0.36);
    color: #ffe9b1;
    text-decoration: none;
    background: rgba(255, 176, 0, 0.1);
}

.switch-org-modal {
    display: none;
    position: fixed;
    inset: 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.58);
    z-index: 90;
}

.switch-org-modal.open {
    display: grid;
    place-items: center;
}

.switch-org-modal-box {
    width: min(680px, 100%);
    max-height: min(76vh, 760px);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(10, 10, 13, 0.98);
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
}

.switch-org-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch-org-close {
    border: 1px solid var(--border);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
}

.switch-org-search {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 12px;
}

.switch-org-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    display: grid;
    gap: 10px;
}

.switch-org-item-btn {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    min-height: 56px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.switch-org-item-btn:hover {
    border-color: rgba(24, 217, 230, 0.42);
    background: linear-gradient(120deg, rgba(24, 217, 230, 0.14), rgba(255, 176, 0, 0.12));
}

.switch-org-item-btn small,
.switch-org-empty,
.switch-org-loading {
    color: var(--muted);
}

body.modal-open {
    overflow: hidden;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 160ms ease;
    z-index: 45;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-page .content {
    max-width: 1440px;
    margin: 0 auto;
    padding-top: calc(var(--header-height) + 22px);
}

.admin-page .site-footer {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1180px) {
    .topbar-nav-link span,
    .switch-org-label,
    .exit-btn span {
        display: none;
    }
}

@media (max-width: 980px) {
    .admin-page {
        --header-height: 70px;
    }

    .admin-topbar-inner {
        grid-template-columns: auto auto;
        gap: 10px;
    }

    .topbar-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        transform: translateY(-115%);
        transition: transform 180ms ease;
        padding: 14px;
        background: rgba(8, 8, 10, 0.98);
        border-bottom: 1px solid var(--border);
        z-index: 46;
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-nav.open {
        transform: translateY(0);
    }

    .topbar-nav-link {
        justify-content: flex-start;
    }

    .topbar-nav-link span,
    .switch-org-label,
    .exit-btn span {
        display: inline;
    }

    .ham-btn {
        display: inline-block;
    }

    .topbar-actions .brand-lang-picker,
    .topbar-actions .user-pill,
    .topbar-actions .switch-org-btn,
    .topbar-actions .exit-btn {
        display: none;
    }

    .admin-page .content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .switch-org-banner {
        padding: 8px 10px;
        font-size: 0.88rem;
    }
}
