/* RouterProxy Data UI — synchronized with the main MikrotikProxy dashboard */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

:root {
    color-scheme: light;
    --rp-bg: #f8fafc;
    --rp-login-bg: #edf2f8;
    --rp-sidebar: #0f172a;
    --rp-sidebar-deep: #020617;
    --rp-card: rgba(255, 255, 255, 0.78);
    --rp-card-solid: #ffffff;
    --rp-border: rgba(148, 163, 184, 0.22);
    --rp-glass-border: rgba(255, 255, 255, 0.72);
    --rp-text: #1e293b;
    --rp-text-strong: #172033;
    --rp-muted: #64748b;
    --rp-subtle: #94a3b8;
    --rp-primary: #6366f1;
    --rp-primary-hover: #4f46e5;
    --rp-primary-rgb: 99, 102, 241;
    --rp-success: #10b981;
    --rp-danger: #ef4444;
    --rp-warning: #f59e0b;
    --rp-info: #0ea5e9;
    --rp-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
    --rp-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --rp-shadow-lg: 0 12px 30px -8px rgb(15 23 42 / 0.2);
    --rp-sidebar-width: 260px;
    --rp-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--rp-bg) !important;
    scroll-behavior: smooth;
}

body.dashboard-sync-shell {
    color: var(--rp-text) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.admin-shell.dashboard-sync-shell {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at 94% 4%, rgba(var(--rp-primary-rgb), 0.07), transparent 28rem),
        var(--rp-bg) !important;
}

.dashboard-sync-shell * { scrollbar-width: thin; scrollbar-color: rgba(var(--rp-primary-rgb), 0.45) #eef2f7; }
.dashboard-sync-shell *::-webkit-scrollbar { width: 9px; height: 9px; }
.dashboard-sync-shell *::-webkit-scrollbar-track { background: #eef2f7; }
.dashboard-sync-shell *::-webkit-scrollbar-thumb { background: rgba(var(--rp-primary-rgb), 0.42); border: 2px solid #eef2f7; border-radius: 999px; }
.dashboard-sync-shell *::-webkit-scrollbar-thumb:hover { background: rgba(var(--rp-primary-rgb), 0.72); }

/* Fixed navigation rail — same proportions and states as panel.routerproxy.uk */
.admin-shell.dashboard-sync-shell .sidebar {
    width: var(--rp-sidebar-width) !important;
    height: 100vh;
    padding: 24px !important;
    overflow: hidden;
    border: 0 !important;
    background: var(--rp-sidebar) !important;
    color: #fff;
    box-shadow: none !important;
}

.admin-shell.dashboard-sync-shell .sidebar-logo {
    position: relative;
    min-height: 48px;
    margin: 0 0 28px;
    padding: 0 !important;
    gap: 10px !important;
    border: 0 !important;
}

.admin-shell.dashboard-sync-shell .sidebar-logo .icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 0 !important;
    border-radius: 10px !important;
    background: rgba(var(--rp-primary-rgb), 0.13) !important;
    color: var(--rp-primary) !important;
    box-shadow: none !important;
    animation: none !important;
}

.admin-shell.dashboard-sync-shell .sidebar-logo .icon i { animation: none !important; }
.admin-shell.dashboard-sync-shell .sidebar-logo h2 {
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1;
}
.admin-shell.dashboard-sync-shell .sidebar-logo h2::before {
    content: "MikrotikProxy";
    display: block;
    color: transparent;
    font: 700 1.25rem/1.1 Inter, sans-serif;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #818cf8, #38bdf8);
    background-clip: text;
    -webkit-background-clip: text;
}
.admin-shell.dashboard-sync-shell .sidebar-logo h2::after {
    content: "DATA HOSTING";
    display: block;
    margin-top: 5px;
    color: #64748b;
    font: 700 0.52rem/1 Inter, sans-serif;
    letter-spacing: 0.16em;
}

.admin-shell.dashboard-sync-shell .sidebar-nav {
    min-height: 0;
    padding: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.admin-shell.dashboard-sync-shell .nav-item {
    min-height: 44px;
    margin: 0 0 8px !important;
    padding: 11px 15px !important;
    gap: 12px !important;
    border: 0 !important;
    border-left: 3px solid transparent !important;
    border-radius: 8px !important;
    color: #94a3b8 !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    transition: background var(--rp-transition), color var(--rp-transition), transform var(--rp-transition);
}
.admin-shell.dashboard-sync-shell .nav-item i { width: 18px; color: inherit !important; }
.admin-shell.dashboard-sync-shell .nav-item:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(2px);
}
.admin-shell.dashboard-sync-shell .nav-item.active {
    color: #fff !important;
    border-left-color: var(--rp-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

.admin-shell.dashboard-sync-shell .sidebar > div[style*="padding:0 16px"] {
    margin: 10px -8px 0 !important;
    padding: 14px 12px !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}
.admin-shell.dashboard-sync-shell .sidebar > div[style*="padding:0 16px"] div[style*="background:#0f172a"] {
    background: rgba(255, 255, 255, 0.08) !important;
}
.admin-shell.dashboard-sync-shell .sidebar-footer {
    margin-top: 10px;
    padding: 14px 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}
.admin-shell.dashboard-sync-shell .sidebar-footer a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8 !important;
}
.admin-shell.dashboard-sync-shell .sidebar-footer a:hover { color: #fff !important; background: rgba(239, 68, 68, 0.11); }

/* Workspace */
.admin-shell.dashboard-sync-shell .main {
    width: calc(100% - var(--rp-sidebar-width)) !important;
    max-width: calc(100vw - var(--rp-sidebar-width));
    min-width: 0;
    margin-left: var(--rp-sidebar-width) !important;
    padding: 0 40px 48px !important;
}
.admin-shell.dashboard-sync-shell .main > * { width: 100%; max-width: 1680px; margin-left: auto; margin-right: auto; }
.admin-shell.dashboard-sync-shell .header-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    min-height: 72px;
    margin: 0 -40px 30px !important;
    padding: 0 40px;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.admin-shell.dashboard-sync-shell .breadcrumb { margin-bottom: 3px !important; color: var(--rp-muted) !important; font-size: 0.73rem !important; }
.admin-shell.dashboard-sync-shell .breadcrumb a { color: var(--rp-primary) !important; font-weight: 600; }
.admin-shell.dashboard-sync-shell .page-title {
    color: var(--rp-text-strong) !important;
    font-size: clamp(1.2rem, 2vw, 1.5rem) !important;
    letter-spacing: -0.025em;
}

/* Cards, metrics and tables */
.admin-shell.dashboard-sync-shell .card,
.admin-shell.dashboard-sync-shell .table-card,
.admin-shell.dashboard-sync-shell .stat-card,
.admin-shell.dashboard-sync-shell .api-card,
.admin-shell.dashboard-sync-shell .api-doc-card {
    border: 1px solid var(--rp-border) !important;
    border-radius: 16px !important;
    background: var(--rp-card) !important;
    box-shadow: var(--rp-shadow-md) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.admin-shell.dashboard-sync-shell .card { padding: clamp(18px, 2.2vw, 24px) !important; }
.admin-shell.dashboard-sync-shell .card h4,
.admin-shell.dashboard-sync-shell .api-card h4 { color: var(--rp-text-strong) !important; }
.admin-shell.dashboard-sync-shell .stats-grid { gap: 24px !important; }
.admin-shell.dashboard-sync-shell .stat-card {
    min-width: 0;
    padding: 24px !important;
    overflow: hidden;
    transition: transform var(--rp-transition), box-shadow var(--rp-transition), border-color var(--rp-transition);
}
.admin-shell.dashboard-sync-shell .stat-card::after { background: rgba(var(--rp-primary-rgb), 0.08) !important; }
.admin-shell.dashboard-sync-shell .stat-card:hover { transform: translateY(-4px); border-color: rgba(var(--rp-primary-rgb), 0.3) !important; box-shadow: var(--rp-shadow-lg) !important; }
.admin-shell.dashboard-sync-shell .stat-label {
    color: #475569 !important;
    font-weight: 700 !important;
}
.admin-shell.dashboard-sync-shell .stat-value {
    color: #0f172a !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.admin-shell.dashboard-sync-shell .stat-icon { color: var(--rp-primary) !important; }

.admin-shell.dashboard-sync-shell .table-card {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    background: rgba(255, 255, 255, 0.82) !important;
    -webkit-overflow-scrolling: touch;
}
.admin-shell.dashboard-sync-shell table { width: 100%; border-collapse: collapse !important; background: transparent !important; }
.admin-shell.dashboard-sync-shell thead th,
.admin-shell.dashboard-sync-shell .param-table th {
    padding: 13px 16px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
    background: rgba(248, 250, 252, 0.88) !important;
    color: var(--rp-muted) !important;
    font-size: 0.71rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
}
.admin-shell.dashboard-sync-shell tbody td,
.admin-shell.dashboard-sync-shell .param-table td {
    padding: 12px 16px !important;
    border-bottom-color: rgba(226, 232, 240, 0.9) !important;
    color: #334155 !important;
}
.admin-shell.dashboard-sync-shell tbody tr:hover { background: rgba(var(--rp-primary-rgb), 0.055) !important; }

/* High-contrast counters for the light dashboard. */
.admin-shell.dashboard-sync-shell .badge {
    border: 1px solid transparent !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
}
.admin-shell.dashboard-sync-shell .badge-green {
    border-color: #a7f3d0 !important;
    background: #d1fae5 !important;
    color: #047857 !important;
}
.admin-shell.dashboard-sync-shell .badge-red {
    border-color: #fecaca !important;
    background: #fee2e2 !important;
    color: #b91c1c !important;
}
.admin-shell.dashboard-sync-shell .badge-blue {
    border-color: #bae6fd !important;
    background: #e0f2fe !important;
    color: #0369a1 !important;
}
.admin-shell.dashboard-sync-shell .badge-purple {
    border-color: #ddd6fe !important;
    background: #ede9fe !important;
    color: #6d28d9 !important;
}
.admin-shell.dashboard-sync-shell #userTable tbody td:nth-child(4) .badge {
    min-width: 68px;
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Controls */
.admin-shell.dashboard-sync-shell .btn {
    min-height: 38px;
    padding: 9px 18px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: transform var(--rp-transition), box-shadow var(--rp-transition), filter var(--rp-transition) !important;
}
.admin-shell.dashboard-sync-shell .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(var(--rp-primary-rgb), 0.22) !important; filter: brightness(1.02); }
.admin-shell.dashboard-sync-shell .btn-primary { background: var(--rp-primary) !important; }
.admin-shell.dashboard-sync-shell .btn-primary:hover { background: var(--rp-primary-hover) !important; }
.admin-shell.dashboard-sync-shell .btn-success { background: var(--rp-success) !important; }
.admin-shell.dashboard-sync-shell .btn-danger { background: var(--rp-danger) !important; }
.admin-shell.dashboard-sync-shell .btn-warning { background: var(--rp-warning) !important; }
.admin-shell.dashboard-sync-shell .btn-info { background: var(--rp-info) !important; }
.admin-shell.dashboard-sync-shell .btn-sm { min-height: 30px; padding: 5px 12px !important; font-size: 0.72rem !important; }
.admin-shell.dashboard-sync-shell .btn-cancel {
    border-color: rgba(148, 163, 184, 0.35) !important;
    background: #fff !important;
    color: var(--rp-muted) !important;
}
.admin-shell.dashboard-sync-shell :is(input, textarea, select),
.admin-shell.dashboard-sync-shell .form-group :is(input, textarea, select),
.admin-shell.dashboard-sync-shell .search-box input {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--rp-text) !important;
    box-shadow: var(--rp-shadow-sm) !important;
}
.admin-shell.dashboard-sync-shell :is(input, textarea, select)::placeholder { color: var(--rp-subtle) !important; }
.admin-shell.dashboard-sync-shell :is(input, textarea, select):focus {
    border-color: var(--rp-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(var(--rp-primary-rgb), 0.1) !important;
}
.admin-shell.dashboard-sync-shell .form-group label { color: #475569 !important; }
.admin-shell.dashboard-sync-shell .modal-overlay { background: rgba(15, 23, 42, 0.56) !important; }
.admin-shell.dashboard-sync-shell .modal {
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    background: #fff !important;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.25) !important;
}
.admin-shell.dashboard-sync-shell .modal h3 { color: var(--rp-text-strong) !important; }
.admin-shell.dashboard-sync-shell .pagination { border-top-color: var(--rp-border) !important; }
.admin-shell.dashboard-sync-shell .pagination li a,
.admin-shell.dashboard-sync-shell .pagination li span { border-color: var(--rp-border) !important; background: #fff !important; color: var(--rp-muted) !important; }
.admin-shell.dashboard-sync-shell .pagination li.active span { border-color: var(--rp-primary) !important; background: var(--rp-primary) !important; color: #fff !important; }
.admin-shell.dashboard-sync-shell .token-cell { color: var(--rp-primary-hover) !important; background: rgba(var(--rp-primary-rgb), 0.09) !important; }
.admin-shell.dashboard-sync-shell .api-doc-card code,
.admin-shell.dashboard-sync-shell .api-code,
.admin-shell.dashboard-sync-shell .log-box { background: var(--rp-sidebar) !important; color: #c7d2fe !important; }
.admin-shell.dashboard-sync-shell .alert-success { color: #047857 !important; background: #ecfdf5 !important; }
.admin-shell.dashboard-sync-shell .alert-danger { color: #b91c1c !important; background: #fef2f2 !important; }

/* Mobile header follows the same dark navigation language */
.admin-shell.dashboard-sync-shell .mobile-header {
    height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(15, 23, 42, 0.96) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: blur(14px);
}
.admin-shell.dashboard-sync-shell .mobile-title { color: #fff !important; }
.admin-shell.dashboard-sync-shell .menu-toggle,
.admin-shell.dashboard-sync-shell .mobile-logout { color: #94a3b8 !important; }
.admin-shell.dashboard-sync-shell .sidebar-overlay { background: rgba(15, 23, 42, 0.58) !important; }

/* Login — same two-panel shell used by panel.routerproxy.uk */
body.auth-shell.dashboard-sync-shell {
    position: relative;
    display: grid !important;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 36px !important;
    background: var(--rp-login-bg) !important;
}
.auth-shell.dashboard-sync-shell::before,
.auth-shell.dashboard-sync-shell::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
}
.auth-shell.dashboard-sync-shell::before { top: -210px; right: -110px; background: radial-gradient(circle, rgba(var(--rp-primary-rgb), 0.18), transparent 70%); }
.auth-shell.dashboard-sync-shell::after { bottom: -240px; left: -90px; background: radial-gradient(circle, rgba(14, 165, 233, 0.14), transparent 70%); }
.dashboard-login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    width: min(1000px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 30px;
    background: #f7f9fc;
    box-shadow: 24px 24px 60px rgba(47, 62, 88, 0.18), -18px -18px 44px rgba(255, 255, 255, 0.95);
}
.dashboard-login-welcome {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 12%, rgba(99, 102, 241, 0.35), transparent 17rem),
        linear-gradient(155deg, #172440, #111a32 58%, #0f172a);
}
.dashboard-brand { display: flex; align-items: center; gap: 13px; }
.dashboard-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--rp-primary), #0ea5e9);
    box-shadow: 0 9px 24px rgba(var(--rp-primary-rgb), 0.32);
}
.dashboard-brand-mark i { font-size: 18px; }
.dashboard-brand strong { display: block; font-size: 1rem; }
.dashboard-brand small { color: #94a3b8; font-size: 0.7rem; }
.dashboard-welcome-copy .kicker {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 6px 10px;
    border: 1px solid rgba(165, 180, 252, 0.2);
    border-radius: 999px;
    color: #c7d2fe;
    background: rgba(var(--rp-primary-rgb), 0.1);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.dashboard-welcome-copy h2 { margin: 0 0 15px; color: #fff; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.08; letter-spacing: -0.045em; }
.dashboard-welcome-copy p { max-width: 350px; color: #aab6ca; font-size: 0.88rem; line-height: 1.7; }
.dashboard-feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.dashboard-feature-row span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; color: #cbd5e1; background: rgba(255,255,255,.04); font-size: .7rem; }
.dashboard-ready { display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 0.72rem; }
.dashboard-ready::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rp-success); box-shadow: 0 0 0 5px rgba(16,185,129,.1); }
.dashboard-login-panel { display: flex; flex-direction: column; justify-content: center; padding: 58px 68px; }
.dashboard-login-panel .mobile-dashboard-brand { display: none; margin-bottom: 40px; }
.dashboard-login-panel .eyebrow { margin: 0 0 8px; color: var(--rp-primary); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.dashboard-login-panel h1 { margin: 0 0 9px; color: var(--rp-text-strong); font-size: 1.85rem; letter-spacing: -0.035em; }
.dashboard-login-panel .intro { margin: 0 0 30px; color: var(--rp-muted); font-size: 0.84rem; }
.dashboard-login-panel .form-group { margin-bottom: 19px; }
.dashboard-login-panel .form-group label { display: block; margin-bottom: 7px; color: #475569; font-size: 0.74rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.dashboard-input-wrap { position: relative; }
.dashboard-input-wrap > i { position: absolute; top: 50%; left: 15px; color: #94a3b8; transform: translateY(-50%); pointer-events: none; }
.dashboard-login-panel input[type="email"],
.dashboard-login-panel input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 13px;
    outline: 0;
    color: var(--rp-text);
    background: #f8fafc;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.025), 0 1px 2px rgba(15,23,42,.03);
    font: inherit;
    font-size: 0.84rem;
    transition: border-color var(--rp-transition), box-shadow var(--rp-transition), background var(--rp-transition);
}
.dashboard-login-panel input:focus { border-color: var(--rp-primary); background: #fff; box-shadow: 0 0 0 4px rgba(var(--rp-primary-rgb), .1); }
.dashboard-login-panel .remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 17px; color: var(--rp-muted); font-size: .77rem; cursor: pointer; }
.dashboard-login-panel .remember input { width: 16px; height: 16px; accent-color: var(--rp-primary); }
.dashboard-login-panel .btn-login {
    display: inline-flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    border: 0 !important;
    border-radius: 15px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #7477f6, var(--rp-primary-hover)) !important;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.26) !important;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--rp-transition), box-shadow var(--rp-transition);
}
.dashboard-login-panel .btn-login:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .32) !important; }
.dashboard-login-panel .error-msg { margin-top: 14px; color: #dc2626; font-size: .78rem; text-align: center; }
.dashboard-secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: #8290a4; font-size: .7rem; }
.dashboard-secure-note i { color: var(--rp-success); }

@media (max-width: 991px) {
    .admin-shell.dashboard-sync-shell .sidebar { width: 240px !important; padding: 15px !important; transform: translateX(-100%) !important; visibility: hidden; z-index: 2000; }
    .admin-shell.dashboard-sync-shell .sidebar.show { transform: translateX(0) !important; visibility: visible; }
    .admin-shell.dashboard-sync-shell .main { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; padding: 72px 18px 32px !important; }
    .admin-shell.dashboard-sync-shell .header-bar { position: relative; top: auto; min-height: auto; margin: 0 0 20px !important; padding: 0; border-bottom: 0 !important; background: transparent; box-shadow: none; backdrop-filter: none; }
    .admin-shell.dashboard-sync-shell .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
    .dashboard-login-shell { width: min(100%, 520px); min-height: auto; grid-template-columns: 1fr; }
    .dashboard-login-welcome { display: none; }
    .dashboard-login-panel { min-height: 600px; padding: 52px; }
    .dashboard-login-panel .mobile-dashboard-brand { display: flex; }
}

@media (max-width: 600px) {
    body.auth-shell.dashboard-sync-shell { display: block !important; padding: 0 !important; background: #f7f9fc !important; }
    .dashboard-login-shell { width: 100%; min-height: 100vh; min-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
    .dashboard-login-panel { min-height: 100vh; min-height: 100svh; padding: 36px 24px; }
    .admin-shell.dashboard-sync-shell .main { padding-right: 14px !important; padding-left: 14px !important; }
    .admin-shell.dashboard-sync-shell .stats-grid { grid-template-columns: 1fr !important; }
    .admin-shell.dashboard-sync-shell .stat-card { padding: 17px !important; }
    .admin-shell.dashboard-sync-shell .card { padding: 16px !important; }
    .admin-shell.dashboard-sync-shell .data-toolbar { grid-template-columns: 1fr !important; }
    .admin-shell.dashboard-sync-shell .table-card table { min-width: 720px; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-sync-shell *, .dashboard-sync-shell *::before, .dashboard-sync-shell *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* 2026-08-31 cross-browser layout hardening */
html,
body.dashboard-sync-shell {
    width: 100%;
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.admin-shell.dashboard-sync-shell {
    overflow-x: hidden;
}

body.admin-shell.dashboard-sync-shell .main,
body.admin-shell.dashboard-sync-shell .main > * {
    min-width: 0;
}

body.admin-shell.dashboard-sync-shell .main {
    overflow-x: hidden;
}

body.admin-shell.dashboard-sync-shell .header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
}

body.admin-shell.dashboard-sync-shell .header-bar > div:first-child {
    min-width: 0;
    flex: 1 1 240px;
}

body.admin-shell.dashboard-sync-shell .header-bar > div:last-child {
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 auto;
    flex-wrap: wrap;
}

body.admin-shell.dashboard-sync-shell .header-bar > .btn,
body.admin-shell.dashboard-sync-shell .header-bar .btn {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

body.admin-shell.dashboard-sync-shell .page-title,
body.admin-shell.dashboard-sync-shell .breadcrumb,
body.admin-shell.dashboard-sync-shell .card h1,
body.admin-shell.dashboard-sync-shell .card h2,
body.admin-shell.dashboard-sync-shell .card h3,
body.admin-shell.dashboard-sync-shell .card h4 {
    min-width: 0;
    overflow-wrap: break-word;
}

body.admin-shell.dashboard-sync-shell .data-toolbar,
body.admin-shell.dashboard-sync-shell .data-toolbar-organized,
body.admin-shell.dashboard-sync-shell .toolbar,
body.admin-shell.dashboard-sync-shell .recovery-toolbar,
body.admin-shell.dashboard-sync-shell .toolbar-group,
body.admin-shell.dashboard-sync-shell .token-sort-controls {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .data-toolbar,
body.admin-shell.dashboard-sync-shell .data-toolbar-organized,
body.admin-shell.dashboard-sync-shell .toolbar,
body.admin-shell.dashboard-sync-shell .recovery-toolbar {
    align-items: center;
}

body.admin-shell.dashboard-sync-shell .toolbar-group,
body.admin-shell.dashboard-sync-shell .token-sort-controls {
    flex-wrap: wrap;
}

body.admin-shell.dashboard-sync-shell .toolbar-group > .btn,
body.admin-shell.dashboard-sync-shell .toolbar-group > a.btn,
body.admin-shell.dashboard-sync-shell .data-toolbar > .btn,
body.admin-shell.dashboard-sync-shell .toolbar > .btn,
body.admin-shell.dashboard-sync-shell .recovery-toolbar > .btn {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .table-tools,
body.admin-shell.dashboard-sync-shell .table-search-form,
body.admin-shell.dashboard-sync-shell .search-box {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .table-search-form input,
body.admin-shell.dashboard-sync-shell .search-box input {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .table-card,
body.admin-shell.dashboard-sync-shell .api-card,
body.admin-shell.dashboard-sync-shell .api-doc-card,
body.admin-shell.dashboard-sync-shell .card {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .table-card {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

body.admin-shell.dashboard-sync-shell .table-card th,
body.admin-shell.dashboard-sync-shell .table-card td,
body.admin-shell.dashboard-sync-shell .param-table th,
body.admin-shell.dashboard-sync-shell .param-table td {
    overflow-wrap: break-word;
}

body.admin-shell.dashboard-sync-shell .data-value-cell {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
}

body.admin-shell.dashboard-sync-shell .api-code,
body.admin-shell.dashboard-sync-shell .api-code-wrap,
body.admin-shell.dashboard-sync-shell .api-doc-card code,
body.admin-shell.dashboard-sync-shell .log-box {
    min-width: 0;
    max-width: 100%;
}

body.admin-shell.dashboard-sync-shell .api-code,
body.admin-shell.dashboard-sync-shell .api-doc-card code {
    overflow-x: auto;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

body.admin-shell.dashboard-sync-shell button,
body.admin-shell.dashboard-sync-shell input,
body.admin-shell.dashboard-sync-shell textarea,
body.admin-shell.dashboard-sync-shell select {
    font-family: inherit;
}

body.admin-shell.dashboard-sync-shell img,
body.admin-shell.dashboard-sync-shell svg,
body.admin-shell.dashboard-sync-shell video,
body.admin-shell.dashboard-sync-shell canvas {
    max-width: 100%;
}

@media (min-width: 992px) and (max-width: 1199px) {
    body.admin-shell.dashboard-sync-shell .main {
        padding-right: 24px !important;
        padding-left: 24px !important;
    }

    body.admin-shell.dashboard-sync-shell .header-bar {
        margin-right: -24px !important;
        margin-left: -24px !important;
        padding-right: 24px !important;
        padding-left: 24px !important;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized {
        flex-wrap: wrap !important;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized > .toolbar-group {
        flex: 1 1 100%;
    }

    body.admin-shell.dashboard-sync-shell .toolbar-group-secondary {
        margin-left: 0 !important;
        justify-content: flex-start;
    }
}

@media (max-width: 991px) {
    body.admin-shell.dashboard-sync-shell .header-bar > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }

    body.admin-shell.dashboard-sync-shell .header-bar > .btn {
        flex: 0 1 auto;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar .toolbar-group {
        width: 100%;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group-secondary {
        margin-left: 0 !important;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    body.admin-shell.dashboard-sync-shell .header-bar > div:last-child .btn {
        flex: 1 1 150px;
        justify-content: center;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar .toolbar-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group > .btn,
    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group > a.btn,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar .toolbar-group > .btn,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar .toolbar-group > a.btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    body.admin-shell.dashboard-sync-shell .recovery-toolbar > .table-search-form,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar > span {
        width: 100%;
        margin-left: 0 !important;
    }

    body.admin-shell.dashboard-sync-shell .table-search-form {
        width: 100%;
    }

    body.admin-shell.dashboard-sync-shell input[type="search"],
    body.admin-shell.dashboard-sync-shell input[type="text"],
    body.admin-shell.dashboard-sync-shell input[type="email"],
    body.admin-shell.dashboard-sync-shell input[type="password"],
    body.admin-shell.dashboard-sync-shell textarea,
    body.admin-shell.dashboard-sync-shell select {
        font-size: 16px !important;
    }

    body.admin-shell.dashboard-sync-shell .modal-actions,
    body.admin-shell.dashboard-sync-shell .data-server-popup-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    body.admin-shell.dashboard-sync-shell .modal-actions > button,
    body.admin-shell.dashboard-sync-shell .data-server-popup-actions > button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    body.admin-shell.dashboard-sync-shell .data-toolbar-organized .toolbar-group,
    body.admin-shell.dashboard-sync-shell .recovery-toolbar .toolbar-group,
    body.admin-shell.dashboard-sync-shell .modal-actions,
    body.admin-shell.dashboard-sync-shell .data-server-popup-actions {
        grid-template-columns: 1fr;
    }

    body.admin-shell.dashboard-sync-shell .checker-run-actions {
        grid-template-columns: 1fr !important;
    }

    body.admin-shell.dashboard-sync-shell .checker-results-header .result-actions {
        grid-template-columns: 1fr !important;
    }

    body.admin-shell.dashboard-sync-shell .result-tabs {
        grid-template-columns: 1fr;
    }

    .dashboard-login-panel {
        padding-right: 18px;
        padding-left: 18px;
    }
}
