:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #182230;
  --ink-soft: #48566a;
  --muted: #718096;
  --line: #dfe5ec;
  --brand: #07569d;
  --brand-dark: #06447c;
  --brand-soft: #edf4fa;
  --cyan: #25a9d6;
  --danger: #c93636;
  --danger-soft: #fff0f0;
  --success: #147a52;
  --success-soft: #eaf7f1;
  --warning: #98610b;
  --warning-soft: #fff6df;
  --shadow: 0 10px 28px rgba(30, 53, 76, .065);
  --sans: "Segoe UI Variable", Aptos, "Segoe UI", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101112;
  --surface: #18191b;
  --surface-soft: #202123;
  --ink: #eeeeef;
  --ink-soft: #c3c4c6;
  --muted: #96989c;
  --line: #303236;
  --brand: #3688b2;
  --brand-dark: #28749c;
  --brand-soft: #21313a;
  --cyan: #55a9cd;
  --danger: #ee747c;
  --danger-soft: #392528;
  --success: #54c58e;
  --success-soft: #20352c;
  --warning: #dca34f;
  --warning-soft: #382f22;
  --shadow: 0 14px 38px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(37, 169, 214, .38); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: white; text-decoration: none; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.kicker { margin: 0 0 9px; color: var(--brand); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup > span:last-child { display: grid; gap: 2px; }
.brand-lockup strong { font-size: 15px; font-weight: 760; letter-spacing: -.02em; }
.brand-lockup small { color: var(--muted); font-size: 11px; font-weight: 600; }
.brand-logo { display: block; width: 46px; height: 46px; object-fit: contain; }
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .signin-brand img { filter: url("/assets/images/logo-outline.svg#white-stroke"); }

.app-header { position: sticky; top: 0; z-index: 20; height: 68px; border-bottom: 1px solid rgba(220, 227, 235, .92); background: rgba(255, 255, 255, .97); box-shadow: 0 3px 16px rgba(30, 53, 76, .07); backdrop-filter: blur(14px); }
.header-inner { position: relative; display: flex; align-items: center; width: min(1400px, calc(100% - 64px)); height: 100%; margin: 0 auto; }
.brand-lockup.compact { flex: 0 0 auto; min-height: 42px; padding-right: 24px; border-right: 1px solid var(--line); }
.brand-lockup.compact .brand-logo { width: 42px; height: 42px; }
.navigation-shell { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; height: 52px; margin-left: 18px; padding: 5px 6px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: #104f7e; box-shadow: 0 7px 18px rgba(16, 79, 126, .16), inset 0 1px 0 rgba(255, 255, 255, .08); }
.main-nav { display: flex; align-items: center; gap: 3px; margin-left: 0; }
.main-nav a { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 7px; color: rgba(255, 255, 255, .8); text-decoration: none; font-size: 12px; font-weight: 650; transition: background-color .15s ease, color .15s ease; }
.main-nav a:hover { background: rgba(255, 255, 255, .12); color: white; }
.main-nav a[aria-current="page"] { background: rgba(255, 255, 255, .16); color: white; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.nav-toggle { display: none; place-items: center; width: 40px; height: 40px; margin-left: 0; border: 1px solid rgba(255, 255, 255, .24); border-radius: 8px; background: rgba(255, 255, 255, .08); color: white; cursor: pointer; font-size: 15px; }
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { border-color: rgba(255, 255, 255, .58); background: rgba(255, 255, 255, .17); color: white; }
.header-actions { position: relative; margin-left: auto; }
.profile-button { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 9px; max-width: 245px; min-height: 42px; padding: 3px 8px 3px 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: white; cursor: pointer; text-align: left; }
.profile-button:hover, .profile-button[aria-expanded="true"] { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: rgba(255, 255, 255, .92); color: var(--brand); font-size: 11px; font-weight: 800; }
.profile-copy { display: grid; min-width: 0; gap: 2px; }
.profile-copy strong { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { overflow: hidden; color: rgba(255, 255, 255, .7); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-toggle-icon { display: grid; width: 16px; height: 16px; place-items: center; color: rgba(255, 255, 255, .7); font-size: 9px; transition: color .16s ease, transform .16s ease; }
.profile-button:hover .profile-toggle-icon, .profile-button[aria-expanded="true"] .profile-toggle-icon { color: white; }
.profile-button[aria-expanded="true"] .profile-toggle-icon { transform: rotate(180deg); }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 210px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.profile-menu a { display: block; padding: 10px 12px; border-radius: 7px; color: var(--danger); text-decoration: none; font-size: 12px; font-weight: 650; }
.profile-menu a i { width: 17px; text-align: center; }
.profile-menu a:hover { background: var(--danger-soft); }
.theme-preference { margin: -1px -1px 6px; padding: 11px 10px 12px; border-bottom: 1px solid var(--line); }
.theme-preference-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .07em; text-transform: uppercase; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.theme-options button { display: grid; min-width: 0; min-height: 34px; place-items: center; gap: 3px; padding: 4px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 680; }
.theme-options button i { font-size: 10px; }
.theme-options button:hover { color: var(--ink); }
.theme-options button.active { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px rgba(18, 36, 54, .12); }
.theme-preference.compact { position: absolute; top: 24px; right: 28px; z-index: 2; width: 228px; margin: 0; padding: 0; border: 0; }
.theme-preference.compact .theme-preference-label { text-align: right; }

.app-main { width: min(1400px, calc(100% - 64px)); min-height: calc(100dvh - 68px); margin: 0 auto; padding: 30px 0 52px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 18px; padding: 24px 28px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 5px 18px rgba(30, 53, 76, .035); }
.page-heading > div:first-child { min-width: 0; }
.page-heading h1 { margin: 0; font-size: clamp(30px, 3.4vw, 40px); font-weight: 720; letter-spacing: -.04em; line-height: 1.08; }
.page-heading > div > p:last-child { max-width: 680px; margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.page-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.button { min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease; }
.button:hover { border-color: #b8c5d3; background: var(--surface-soft); }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.primary { border-color: var(--brand); background: var(--brand); color: white; }
.button.primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.button.secondary { background: var(--surface); }
.button.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button.quiet:hover { background: var(--surface-soft); color: var(--ink); }
.button i, .scope-tab i, .detail-button i, .delete-button i, .copy-button i, .close-button i { margin-right: 3px; }
.button.danger-action { border-color: var(--danger); background: var(--danger); color: white; }
.button.danger-action:hover { border-color: #a72626; background: #a72626; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.dashboard-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 36px; margin-bottom: 18px; padding: 30px 32px 31px; overflow: hidden; border: 1px solid #d8e2eb; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px rgba(30, 53, 76, .045); }
.dashboard-hero::after { content: ""; position: absolute; top: -90px; right: 15%; width: 260px; height: 260px; border: 42px solid rgba(7, 86, 157, .035); border-radius: 50%; pointer-events: none; }
.dashboard-hero-copy, .dashboard-actions { position: relative; z-index: 1; }
.dashboard-hero h1 { margin: 0; font-size: clamp(34px, 3.8vw, 48px); font-weight: 735; letter-spacing: -.052em; line-height: 1; }
.dashboard-hero-copy > p:not(.kicker) { max-width: 680px; margin: 13px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; text-wrap: pretty; }
.dashboard-context { display: flex; flex-wrap: wrap; gap: 9px 20px; margin-top: 19px; }
.dashboard-context span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.dashboard-context i { color: var(--brand); }
.dashboard-context b { font-weight: 650; }
.dashboard-actions { justify-content: flex-end; }
.dashboard-period-panel { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.period-heading { display: grid; flex: 0 0 auto; gap: 4px; }
.period-heading span { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .045em; text-transform: uppercase; }
.period-heading strong { font-size: 13px; font-weight: 700; }
.period-form { display: flex; align-items: end; justify-content: flex-end; gap: 8px; min-width: 0; }
.period-form > label, .period-range-fields label { display: grid; min-width: 138px; gap: 5px; }
.period-form label > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.period-form select, .period-form input { height: 38px; background: var(--surface); }
.period-range-fields { display: flex; align-items: end; gap: 8px; }
.period-form .button { min-height: 38px; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dashboard-metrics.user-view { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-metric { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 13px; min-width: 0; min-height: 126px; padding: 19px 18px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.dashboard-metric.metric-primary { border-color: #c9dce9; background: #f3f8fc; }
.dashboard-metric > div { min-width: 0; }
.metric-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 14px; }
.metric-icon.success-icon { background: var(--success-soft); color: var(--success); }
.metric-icon.danger-icon { background: var(--danger-soft); color: var(--danger); }
.dashboard-metric div > span, .dashboard-metric strong, .dashboard-metric small { display: block; }
.dashboard-metric div > span { color: var(--ink-soft); font-size: 11px; font-weight: 680; }
.dashboard-metric strong { margin-top: 9px; font-size: 29px; font-weight: 735; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-metric small { margin-top: 10px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-metric small b { color: inherit; font-weight: 760; }

.dashboard-insights { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(260px, .75fr); gap: 14px; margin-bottom: 18px; }
.insight-card { min-width: 0; padding: 21px 22px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.insight-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.insight-heading .kicker { margin-bottom: 5px; font-size: 9px; }
.insight-heading h2 { margin: 0; font-size: 17px; font-weight: 720; letter-spacing: -.025em; }
.insight-heading > a { margin-top: 17px; color: var(--brand); font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.insight-heading > a:hover { text-decoration: underline; }
.insight-period, .role-mark { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 760; letter-spacing: .04em; }
.week-overview { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.week-overview strong { font-size: 38px; font-weight: 735; letter-spacing: -.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.week-overview span { color: var(--success); text-align: right; font-size: 9px; font-weight: 680; line-height: 1.45; }
.week-overview span.negative { color: var(--danger); }
.performance-progress { height: 6px; margin: 17px 0 18px; overflow: hidden; border-radius: 999px; background: #e8eef4; }
.performance-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--success); transition: width .35s ease; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.mini-stats > div { padding-left: 13px; border-left: 1px solid var(--line); }
.mini-stats > div:first-child { padding-left: 0; border-left: 0; }
.mini-stats span, .mini-stats strong { display: block; }
.mini-stats span { color: var(--muted); font-size: 9px; font-weight: 650; }
.mini-stats strong { margin-top: 5px; font-size: 16px; font-weight: 720; font-variant-numeric: tabular-nums; }
.top-url-list { display: grid; }
.top-url-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 47px; border-top: 1px solid #e9eef3; color: inherit; text-decoration: none; }
.top-url-item:first-child { border-top: 0; }
.top-url-item:hover .top-url-copy strong { color: var(--brand); }
.top-url-rank { color: #9aa7b6; font: 9px var(--mono); }
.top-url-copy { display: grid; min-width: 0; gap: 3px; }
.top-url-copy strong, .top-url-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-url-copy strong { font-size: 11px; font-weight: 720; transition: color .15s ease; }
.top-url-copy small { color: var(--muted); font-size: 9px; }
.top-url-clicks { color: var(--ink-soft); font-size: 9px; font-weight: 700; white-space: nowrap; }
.insight-empty { margin: 24px 0; color: var(--muted); text-align: center; font-size: 11px; }
.dashboard-inventory { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.dashboard-inventory.user-view { grid-template-columns: 1fr; }
.dashboard-inventory .insight-heading { margin-bottom: 9px; }
.inventory-description { margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.recent-url-list { display: grid; }
.recent-url-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 61px; padding-block: 10px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.recent-url-item:first-child { border-top: 0; }
.recent-url-item:hover .top-url-copy strong { color: var(--brand); }
.recent-url-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-size: 11px; }
.recent-url-meta { display: grid; gap: 5px; color: var(--ink-soft); text-align: right; font-size: 9px; font-variant-numeric: tabular-nums; }
.recent-url-meta small { color: var(--muted); font-size: 9px; }
.quota-overview { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 9px; padding: 12px 13px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 10px; }
.quota-overview b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.quota-user-item { padding: 13px 0; border-top: 1px solid var(--line); }
.quota-user-item:first-child { border-top: 0; }
.quota-user-heading, .quota-user-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.quota-user-heading strong { color: var(--ink); font-size: 11px; font-weight: 700; }
.quota-user-heading > span { color: var(--ink-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
.quota-progress { display: block; width: 100%; height: 5px; margin: 9px 0 7px; overflow: hidden; border: 0; border-radius: 8px; appearance: none; background: var(--line); color: var(--warning); accent-color: var(--warning); }
.quota-progress::-webkit-progress-bar { border-radius: 8px; background: var(--line); }
.quota-progress::-webkit-progress-value { border-radius: 8px; background: var(--warning); }
.quota-progress::-moz-progress-bar { border-radius: 8px; background: var(--warning); }
.quota-full .quota-progress { color: var(--danger); accent-color: var(--danger); }
.quota-full .quota-progress::-webkit-progress-value { background: var(--danger); }
.quota-full .quota-progress::-moz-progress-bar { background: var(--danger); }
.quota-user-footer { color: var(--muted); font-size: 9px; }
.quota-user-footer > span:first-child { color: var(--warning); }
.quota-full .quota-user-footer > span:first-child { color: var(--danger); }
.quota-empty { display: flex; align-items: center; gap: 9px; min-height: 90px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.quota-empty i { color: var(--success); font-size: 17px; }
.quota-enik-button { padding: 3px 0; border: 0; border-radius: 3px; background: transparent; color: var(--brand); cursor: pointer; font: 700 11px var(--sans); text-align: left; }
.quota-enik-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.quota-panel-footer { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.quota-panel-footer .button { display: inline-flex; align-items: center; gap: 9px; }
.quota-drawer-pagination { padding-inline: 0; }
.quota-personnel-backdrop { z-index: 50; }
.quota-personnel-drawer { z-index: 51; }
.access-card { background: #f7f9fc; }
.access-facts { display: grid; margin: 0; }
.access-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-top: 1px solid #e2e8ef; }
.access-facts > div:first-child { border-top: 0; }
.access-facts dt { color: var(--muted); font-size: 10px; }
.access-facts dd { margin: 0; color: var(--ink); font-size: 11px; font-weight: 720; text-align: right; font-variant-numeric: tabular-nums; }
.access-card > p { margin: 17px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.admin-command-panel { margin-bottom: 18px; overflow: hidden; border: 1px solid #cbd9e5; border-radius: 12px; background: var(--surface); }
.admin-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #f3f7fb; }
.admin-command-heading .kicker { margin-bottom: 5px; font-size: 9px; }
.admin-command-heading h2 { margin: 0; font-size: 19px; font-weight: 730; letter-spacing: -.025em; }
.admin-command-heading p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.admin-command-heading > span { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border: 1px solid #c9dce9; border-radius: 7px; background: var(--surface); color: var(--brand); font-size: 9px; font-weight: 720; white-space: nowrap; }
.admin-command-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-stat-grid article { min-height: 128px; padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-stat-grid article:nth-child(3), .admin-stat-grid article:nth-child(4) { border-bottom: 0; }
.admin-stat-grid span, .admin-stat-grid strong, .admin-stat-grid small { display: block; }
.admin-stat-grid span { color: var(--ink-soft); font-size: 10px; font-weight: 680; }
.admin-stat-grid strong { margin-top: 11px; font-size: 29px; font-weight: 735; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.admin-stat-grid small { margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.admin-stat-grid small b { color: var(--danger); }
.admin-problem-card { padding: 20px 22px; background: #fbfcfe; }
.admin-problem-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.admin-problem-heading > div { display: grid; gap: 4px; }
.admin-problem-heading span { color: var(--muted); font-size: 9px; font-weight: 680; }
.admin-problem-heading strong { font-size: 13px; font-weight: 720; }
.admin-problem-heading > span { display: grid; place-items: center; min-width: 34px; height: 30px; border-radius: 7px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 760; }
.admin-problem-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px 0 5px; }
.admin-problem-breakdown span { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.admin-problem-breakdown i { color: var(--danger); }
.admin-problem-breakdown b { margin-left: auto; color: var(--ink); font-size: 9px; }
.admin-problem-list { display: grid; }
.admin-problem-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 44px; border-bottom: 1px solid #e7edf3; }
.admin-problem-item > span { color: #9aa7b6; font: 9px var(--mono); }
.admin-problem-item strong { overflow: hidden; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.admin-problem-item b { color: var(--danger); font-size: 9px; font-weight: 700; white-space: nowrap; }
.admin-problem-empty { display: flex; align-items: center; gap: 9px; min-height: 82px; margin: 0; color: var(--success); font-size: 10px; line-height: 1.5; }
.admin-problem-empty i { font-size: 16px; }

.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 5px 18px rgba(30, 53, 76, .035); }
.metric-strip article { min-width: 0; min-height: 126px; padding: 18px 20px; border-left: 1px solid var(--line); background: var(--surface); }
.metric-strip article:first-child { border-left: 0; background: var(--brand-soft); }
.metric-strip span, .metric-strip strong, .metric-strip small { display: block; }
.metric-strip span { color: var(--ink-soft); font-size: 12px; font-weight: 680; }
.metric-strip strong { margin-top: 13px; font-size: 32px; font-weight: 720; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-strip small { margin-top: 12px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

.activity-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 19px; font-weight: 730; letter-spacing: -.025em; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.scope-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.scope-tab { min-height: 36px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.scope-tab:hover { color: var(--brand); }
.scope-tab.active { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px rgba(31, 55, 78, .09); }
.filters { display: grid; grid-template-columns: minmax(250px, 1.6fr) minmax(160px, .65fr) auto auto; align-items: end; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.filters label { display: grid; min-width: 0; gap: 7px; }
.filters label span { color: var(--ink-soft); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
input, select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cad4df; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; }
input::placeholder { color: #929dae; opacity: 1; }
input:hover, select:hover { border-color: #aebccc; }
input:focus, select:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px rgba(7, 89, 170, .1); }
.filters > .button { min-height: 42px; }
.table-meta { display: flex; justify-content: space-between; min-height: 45px; padding: 14px 22px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 620; }
.table-wrap { min-height: 360px; overflow-x: auto; }
table { width: 100%; min-width: 1100px; border-collapse: collapse; table-layout: fixed; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; color: #66758a; text-align: left; font-size: 10px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { width: 86px; padding-right: 22px; }
th:last-child { position: sticky; right: 0; z-index: 3; background: #f8fafc; box-shadow: -8px 0 12px -12px rgba(30, 53, 76, .5); }
td:last-child:not(.state-cell) { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: -8px 0 12px -12px rgba(30, 53, 76, .42); }
tbody tr:hover td:last-child:not(.state-cell) { background: #f8fbfe; }
td { padding: 14px; border-bottom: 1px solid #e8edf2; color: var(--ink-soft); vertical-align: top; font-size: 11px; line-height: 1.45; }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: #f8fbfe; }
.cell-main, .cell-sub, .cell-code { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main { color: var(--ink); font-weight: 680; }
.cell-sub { margin-top: 5px; color: var(--muted); font-size: 10px; }
.cell-code { margin-top: 5px; color: var(--muted); font: 9px var(--mono); }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--brand-soft); color: var(--brand); }
.detail-button { min-height: 31px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--brand); cursor: pointer; font-size: 10px; font-weight: 700; }
.detail-button:hover { border-color: var(--brand); background: var(--brand-soft); }
.icon-only-button { display: inline-grid; place-items: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; }
.icon-only-button i { margin: 0; }
.skeleton-line { display: block; width: 78%; height: 9px; border-radius: 5px; background: #dce5ed; }
.skeleton-1 { width: 58%; }
.skeleton-2 { width: 88%; }
.state-cell { height: 260px; padding: 54px 24px; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 68px; padding: 12px 22px; }
.pagination span { min-width: 120px; color: var(--muted); text-align: center; font-size: 11px; font-weight: 620; }
.pagination .pagination-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(16, 29, 45, .48); backdrop-filter: blur(2px); }
.detail-drawer { position: fixed; top: 0; right: 0; z-index: 40; width: min(620px, 100vw); height: 100dvh; overflow-y: auto; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -18px 0 46px rgba(18, 36, 54, .15); transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
.detail-drawer.open { transform: translateX(0); visibility: visible; }
.detail-drawer > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.detail-drawer h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.close-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: 11px; font-weight: 700; }
.close-button:hover { border-color: #b8c5d3; background: var(--surface-soft); }
.drawer-content { padding: 26px 24px 54px; }
.detail-section { margin-bottom: 30px; }
.detail-section h3 { margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 155px minmax(0, 1fr); margin: 0; }
.detail-grid dt, .detail-grid dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #e8edf2; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { color: var(--ink); }
.json-block { margin: 0; padding: 15px; overflow: auto; border-radius: 9px; background: #162335; color: #dce7f3; font: 10px/1.65 var(--mono); white-space: pre-wrap; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: min(430px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid #9fd2b9; border-radius: 9px; background: #f0faf5; color: #125f42; box-shadow: var(--shadow); font-size: 11px; font-weight: 650; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.manage-heading { align-items: center; }
.url-summary { display: grid; grid-template-columns: 1.25fr 1fr .8fr .8fr; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.url-summary > div { min-width: 0; padding: 18px 20px 20px; border-left: 1px solid var(--line); }
.url-summary > div:first-child { border-left: 0; background: var(--brand-soft); color: var(--ink); }
.url-summary span, .url-summary strong { display: block; }
.url-summary span { color: var(--muted); font-size: 10px; font-weight: 730; letter-spacing: .045em; text-transform: uppercase; }
.url-summary > div:first-child span { color: var(--brand); }
.url-summary strong { margin-top: 9px; overflow: hidden; font-size: 24px; font-weight: 740; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.manage-panel .panel-heading { min-height: 88px; }
.compact-search { display: grid; grid-template-columns: minmax(230px, 340px) auto auto; align-items: center; gap: 8px; }
.compact-search input { min-width: 0; }
.url-table { min-width: 1320px; }
.url-table th:first-child { width: 190px; }
.url-table th:nth-child(2) { width: 28%; }
.url-table th:nth-child(3) { width: 110px; }
.url-table th:nth-child(4) { width: 80px; }
.url-table th:nth-child(6) { width: 155px; }
.url-table th:nth-child(7) { width: 155px; }
.url-table th:last-child, .url-table td:last-child { width: 145px; }
.url-link-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.url-link { display: block; min-width: 0; overflow: hidden; color: var(--brand); font-size: 12px; font-weight: 720; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.url-link:hover { text-decoration: underline; }
.copy-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; min-height: 27px; padding: 0 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.copy-button i { margin: 0; }
.copy-button:hover { color: var(--brand); }
.enik-detail-button { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--brand); cursor: pointer; font: 700 10px var(--mono); }
.enik-detail-button:hover { border-color: var(--line); background: var(--brand-soft); }
.enik-detail-button i { font-size: 11px; }
.row-actions { display: flex; gap: 6px; }
.delete-button { min-height: 31px; padding: 0 9px; border: 1px solid #efc7c7; border-radius: 7px; background: var(--surface); color: var(--danger); cursor: pointer; font-size: 10px; font-weight: 700; }
.delete-button:hover { border-color: var(--danger); background: var(--danger-soft); }
.detail-button.icon-only-button, .delete-button.icon-only-button { padding: 0; }
.url-editor { width: min(560px, 100vw); }
.url-form { display: grid; gap: 21px; padding: 28px 24px 44px; }
.url-form label { display: grid; gap: 7px; }
.url-form label > span { color: var(--ink-soft); font-size: 11px; font-weight: 720; }
.url-form label > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.url-form input, .url-form textarea { width: 100%; border: 1px solid #cad4df; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; }
.url-form input { height: 44px; padding: 0 12px; }
.url-form textarea { min-height: 100px; padding: 11px 12px; resize: vertical; font-family: inherit; line-height: 1.55; }
.url-form input:focus, .url-form textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px rgba(7, 89, 170, .1); }
.alias-input { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid #cad4df; border-radius: 8px; background: var(--surface-soft); }
.alias-input > span { color: var(--muted); text-align: center; font-size: 15px; }
.alias-input input { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.alias-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7, 89, 170, .1); }
.alias-input input:focus { box-shadow: none; }
.form-message { padding: 11px 13px; border: 1px solid #efc7c7; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 11px; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.redirect-log-drawer { width: min(720px, 100vw); }
.redirect-log-content { padding: 22px 24px 40px; }
.redirect-url-overview { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.redirect-url-overview > div { min-width: 0; padding: 14px 15px; background: var(--surface-soft); }
.redirect-url-overview span, .redirect-url-overview strong { display: block; }
.redirect-url-overview span { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.redirect-url-overview strong { margin-top: 6px; overflow: hidden; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.redirect-log-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.redirect-log-summary > div { padding: 15px; border-left: 1px solid var(--line); }
.redirect-log-summary > div:first-child { border-left: 0; }
.redirect-log-summary span, .redirect-log-summary strong { display: block; }
.redirect-log-summary span { color: var(--muted); font-size: 9px; font-weight: 680; }
.redirect-log-summary strong { margin-top: 6px; font-size: 22px; font-weight: 730; font-variant-numeric: tabular-nums; }
.redirect-log-summary > div:nth-child(2) strong { color: var(--success); }
.redirect-log-summary > div:nth-child(3) strong { color: var(--danger); }
.redirect-log-heading { display: flex; justify-content: space-between; margin-bottom: 10px; }
.redirect-log-heading h3 { margin: 0; font-size: 15px; font-weight: 720; }
.redirect-log-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.redirect-log-list { display: grid; gap: 10px; }
.redirect-log-item { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.redirect-log-item > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.redirect-log-item > header > div { display: grid; min-width: 0; gap: 3px; }
.redirect-log-item > header strong { font-size: 11px; font-weight: 700; }
.redirect-log-item > header span:not(.badge) { overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.redirect-log-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 13px 15px; }
.redirect-log-facts > div { min-width: 0; padding-left: 12px; border-left: 1px solid #e5ebf1; }
.redirect-log-facts > div:first-child { padding-left: 0; border-left: 0; }
.redirect-log-agent { display: grid; gap: 10px; padding: 0 15px 14px; }
.redirect-log-facts span, .redirect-log-agent span { display: block; color: var(--muted); font-size: 8px; font-weight: 680; letter-spacing: .035em; text-transform: uppercase; }
.redirect-log-facts strong, .redirect-log-agent strong { display: block; margin-top: 4px; overflow: hidden; color: var(--ink-soft); font-size: 9px; font-weight: 620; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.redirect-log-facts .mono-value { font-family: var(--mono); }
.redirect-log-state { display: grid; place-items: center; min-height: 220px; padding: 28px; color: var(--muted); text-align: center; }
.redirect-log-state i { margin-bottom: 13px; color: var(--brand); font-size: 22px; }
.redirect-log-state strong { color: var(--ink); font-size: 13px; }
.redirect-log-state span { margin-top: 6px; font-size: 10px; }
.redirect-log-state.error { color: var(--danger); font-size: 11px; }
.redirect-log-pagination { min-height: 58px; padding-inline: 0; }
.personnel-drawer { width: min(620px, 100vw); }
.personnel-content { display: grid; gap: 24px; padding: 24px 24px 48px; }
.personnel-identity { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.personnel-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 19px; }
.personnel-identity h3 { margin: 0; font-size: 17px; font-weight: 740; letter-spacing: -.025em; }
.personnel-identity p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.personnel-identity div > span { display: block; margin-top: 7px; color: var(--muted); font: 9px var(--mono); }
.personnel-section h3 { margin: 0 0 10px; color: var(--ink-soft); font-size: 10px; font-weight: 760; letter-spacing: .055em; text-transform: uppercase; }
.personnel-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.personnel-facts > div { min-width: 0; padding: 14px 15px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.personnel-facts > div:nth-child(-n + 2) { border-top: 0; }
.personnel-facts > div:nth-child(odd) { border-left: 0; }
.personnel-facts dt, .personnel-facts dd { margin: 0; }
.personnel-facts dt { color: var(--muted); font-size: 9px; font-weight: 680; }
.personnel-facts dd strong { display: block; margin-top: 7px; overflow-wrap: anywhere; color: var(--ink); font-size: 11px; font-weight: 680; line-height: 1.5; }
.personnel-state { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.personnel-state i { margin-bottom: 5px; color: var(--brand); font-size: 23px; }
.personnel-state strong { color: var(--ink); font-size: 13px; }
.personnel-state span { max-width: 330px; font-size: 10px; line-height: 1.55; }
.personnel-state.error i, .personnel-state.error span { color: var(--danger); }

.admin-page-heading { min-height: 150px; }
.admin-security-mark { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-security-mark i { color: var(--brand); }
.admin-access-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.admin-access-summary > div { padding: 18px 20px 20px; border-left: 1px solid var(--line); }
.admin-access-summary > div:first-child { border-left: 0; background: var(--brand-soft); }
.admin-access-summary span, .admin-access-summary strong { display: block; }
.admin-access-summary span { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.admin-access-summary strong { margin-top: 9px; font-size: 28px; font-weight: 740; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.admin-assign-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr); align-items: center; gap: 36px; margin-bottom: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.admin-assign-copy h2 { margin: 0; font-size: 19px; font-weight: 730; letter-spacing: -.025em; }
.admin-assign-copy > p:last-child { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.admin-assign-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.admin-assign-form label { display: grid; gap: 6px; }
.admin-assign-form label > span { color: var(--ink-soft); font-size: 10px; font-weight: 720; }
.admin-assign-form .button { min-height: 42px; }
.admin-form-message { grid-column: 1 / -1; margin: 2px 0 0; }
.admin-table { min-width: 940px; }
.admin-table th:first-child { width: 130px; }
.admin-table th:nth-child(3) { width: 110px; }
.admin-table th:nth-child(4), .admin-table th:nth-child(5) { width: 175px; }
.admin-table th:last-child, .admin-table td:last-child { width: 86px; }
.delete-button:disabled, .detail-button:disabled { cursor: not-allowed; opacity: .42; }

.confirm-dialog { width: min(440px, calc(100% - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(18, 36, 54, .24); }
.confirm-dialog::backdrop { background: rgba(16, 29, 45, .58); backdrop-filter: blur(4px); }
.confirm-dialog-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px 24px 22px; }
.confirm-dialog-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 20px; }
.confirm-dialog[data-kind="danger"] .confirm-dialog-icon, .confirm-dialog[data-kind="logout"] .confirm-dialog-icon { background: var(--danger-soft); color: var(--danger); }
.confirm-dialog .kicker { margin-bottom: 6px; font-size: 9px; }
.confirm-dialog h2 { margin: 0; font-size: 21px; font-weight: 740; letter-spacing: -.03em; }
.confirm-dialog-body p:last-child { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--surface-soft); }

.login-page { min-height: 100dvh; overflow-x: hidden; background: var(--surface); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); min-height: 100dvh; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: clamp(32px, 5vw, 72px); overflow: hidden; background: var(--brand); color: white; }
.login-brand::before { content: ""; position: absolute; right: -15%; bottom: -32%; width: min(650px, 75vw); aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255, 255, 255, .035), 0 0 0 180px rgba(255, 255, 255, .025); }
.login-brand::after { content: ""; position: absolute; inset: 0; opacity: .11; background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .brand-lockup small { color: rgba(255, 255, 255, .72); }
.login-logo { width: 80px; height: 80px; padding: 4px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 17px; background: white; box-shadow: 0 10px 24px rgba(0, 24, 61, .18); }
.login-message { max-width: 740px; margin: 10vh 0; }
.login-message .kicker { color: #8bdcf4; }
.login-message h1 { margin: 0; font-size: clamp(48px, 6.4vw, 88px); font-weight: 720; letter-spacing: -.06em; line-height: .98; }
.login-message > p:last-child { max-width: 540px; margin: 26px 0 0; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.7; }
.login-assurance { display: flex; flex-wrap: wrap; gap: 9px; }
.login-assurance span { padding: 8px 11px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .78); font-size: 10px; font-weight: 650; }
.login-panel { position: relative; display: grid; place-items: center; padding: 64px clamp(32px, 6vw, 94px); background: var(--surface); }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: 0; font-size: clamp(38px, 4.2vw, 56px); font-weight: 730; letter-spacing: -.05em; line-height: 1; }
.login-card > p:not(.kicker) { margin: 20px 0 30px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.sso-button { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; min-height: 58px; border: 1px solid var(--brand); border-radius: 9px; background: var(--brand); color: white; text-decoration: none; font-size: 13px; font-weight: 720; box-shadow: 0 9px 24px rgba(7, 89, 170, .18); transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.sso-button:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.sso-button:active { transform: translateY(1px); }
.sso-mark { display: grid; place-items: center; align-self: stretch; border-right: 1px solid rgba(255, 255, 255, .25); font-size: 10px; font-weight: 800; }
.sso-button > span:last-child { padding-right: 18px; font-size: 20px; font-weight: 400; }
.login-card .login-note { margin: 17px 0 0 !important; color: var(--muted) !important; font-size: 10px !important; line-height: 1.55 !important; }
.login-help { position: absolute; right: 32px; bottom: 26px; left: 32px; margin: 0; color: var(--muted); text-align: center; font-size: 10px; }

@media (max-width: 1120px) {
  .dashboard-period-panel { align-items: stretch; flex-direction: column; }
  .period-form { flex-wrap: wrap; justify-content: flex-start; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics.user-view { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-card { grid-column: 1 / -1; }
  .access-facts { grid-template-columns: repeat(3, 1fr); }
  .access-facts > div { display: grid; justify-content: start; min-height: auto; padding: 11px 16px; border-top: 0; border-left: 1px solid #e2e8ef; }
  .access-facts > div:first-child { padding-left: 0; border-left: 0; }
  .access-facts dd { text-align: left; }
  .admin-command-body { grid-template-columns: 1fr; }
  .admin-problem-card { border-top: 1px solid var(--line); }
  .filters { grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 1fr) auto auto; }
  .filters > .button { min-height: 42px; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip article:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .metric-strip article:nth-child(4), .metric-strip article:nth-child(5) { border-top: 1px solid var(--line); }
  .url-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .url-summary > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .url-summary > div:nth-child(4) { border-top: 1px solid var(--line); }
  .admin-assign-panel { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  .app-header { height: 64px; }
  .header-inner { width: calc(100% - 28px); }
  .brand-lockup.compact { order: 2; min-height: 40px; padding-right: 0; border-right: 0; }
  .brand-lockup.compact .brand-logo { display: none; }
  .brand-lockup.compact > span:last-child { display: grid; gap: 1px; }
  .brand-lockup.compact strong { font-size: 15px; letter-spacing: -.025em; }
  .brand-lockup.compact small { display: block; font-size: 9px; }
  .profile-copy { display: none; }
  .navigation-shell { display: contents; }
  .nav-toggle { display: grid; order: 1; margin-right: 10px; border-color: #104f7e; background: #104f7e; box-shadow: 0 5px 13px rgba(16, 79, 126, .16); }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { border-color: var(--brand-dark); background: var(--brand-dark); }
  .main-nav { position: absolute; top: calc(100% + 8px); right: 14px; left: 14px; display: none; align-items: stretch; gap: 4px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 16px 38px rgba(30, 53, 76, .16); }
  .main-nav.open { display: grid; }
  .main-nav a { min-height: 44px; padding: 0 13px; color: var(--ink-soft); }
  .main-nav a:hover { background: var(--surface-soft); color: var(--brand); }
  .main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
  .header-actions { order: 3; margin-left: auto; }
  .profile-button { grid-template-columns: 36px 14px; gap: 5px; min-height: 44px; padding: 3px 7px 3px 3px; border-color: #104f7e; background: #104f7e; box-shadow: 0 5px 13px rgba(16, 79, 126, .16); }
  .profile-button:hover, .profile-button[aria-expanded="true"] { border-color: var(--brand-dark); background: var(--brand-dark); }
  .app-main { width: calc(100% - 28px); min-height: calc(100dvh - 64px); padding: 28px 0 40px; }
  .dashboard-hero { grid-template-columns: 1fr; align-items: stretch; gap: 22px; padding: 23px 20px 24px; }
  .dashboard-hero h1 { font-size: 36px; }
  .dashboard-context { display: grid; gap: 8px; }
  .dashboard-actions { width: 100%; justify-content: stretch; }
  .dashboard-actions .button { flex: 1; padding-inline: 10px; }
  .dashboard-period-panel { display: grid; gap: 15px; padding: 16px; }
  .period-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .period-form > label, .period-range-fields label { min-width: 0; }
  .period-range-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics.user-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics.user-view .dashboard-metric:nth-child(3) { grid-column: 1 / -1; }
  .dashboard-metric { grid-template-columns: 36px minmax(0, 1fr); min-height: 118px; padding: 16px 14px; }
  .metric-icon { width: 36px; height: 36px; }
  .dashboard-metric strong { font-size: 26px; }
  .dashboard-insights { grid-template-columns: 1fr; }
  .dashboard-inventory { grid-template-columns: 1fr; }
  .access-card { grid-column: auto; }
  .access-facts { grid-template-columns: 1fr; }
  .access-facts > div { display: flex; justify-content: space-between; min-height: 44px; padding: 0; border-top: 1px solid #e2e8ef; border-left: 0; }
  .access-facts > div:first-child { padding-left: 0; border-top: 0; }
  .access-facts dd { text-align: right; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 20px; padding: 21px 20px 22px; }
  .page-heading h1 { font-size: 34px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .admin-security-mark { align-self: flex-start; }
  .admin-access-summary > div { padding: 16px; }
  .admin-assign-panel { padding: 19px 16px 21px; }
  .admin-assign-form { grid-template-columns: 1fr; }
  .admin-assign-form .button { width: 100%; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .metric-strip article { min-height: 128px; padding: 17px 15px; }
  .metric-strip strong { font-size: 30px; }
  .panel-heading { align-items: stretch; flex-direction: column; padding: 18px 16px; }
  .compact-search { grid-template-columns: 1fr auto auto; }
  .scope-tabs { width: 100%; }
  .scope-tab { flex: 1; }
  .filters { grid-template-columns: 1fr 1fr; padding: 16px; }
  .filter-search { grid-column: span 2; }
  .table-meta { padding-inline: 16px; }
  .table-wrap { min-height: 280px; overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  thead { display: none; }
  tbody { padding: 12px; }
  tbody tr { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  tbody td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 11px; min-height: 40px; padding: 10px 12px; border-bottom: 1px solid #e8edf2; }
  tbody td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
  tbody td:first-child, tbody td:last-child { width: auto; padding: 10px 12px; }
  tbody td:last-child { border-bottom: 0; }
  th:last-child, td:last-child:not(.state-cell) { position: static; right: auto; box-shadow: none; }
  td:last-child:not(.state-cell), tbody tr:hover td:last-child:not(.state-cell) { background: var(--surface); }
  .state-cell { display: block; height: auto; padding: 45px 18px; }
  .state-cell::before { display: none; }
  .pagination { justify-content: stretch; padding: 12px; }
  .pagination span { flex: 1; min-width: 0; }
  .pagination .pagination-button { flex: 0 0 36px; }
  .detail-grid { grid-template-columns: 115px minmax(0, 1fr); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 48dvh; padding: 28px 22px 32px; }
  .login-logo { width: 58px; height: 58px; border-radius: 13px; }
  .login-message { margin: 9vh 0 5vh; }
  .login-message h1 { font-size: clamp(42px, 13vw, 62px); }
  .login-message > p:last-child { margin-top: 18px; font-size: 13px; }
  .login-panel { min-height: 52dvh; padding: 62px 22px 76px; }
  .login-card h2 { font-size: 38px; }
  .url-summary > div { padding: 15px; }
  .url-summary strong { font-size: 20px; }
  .url-table { min-width: 0; }
  .url-table th:first-child, .url-table th:nth-child(2), .url-table th:nth-child(3), .url-table th:nth-child(4), .url-table th:nth-child(6), .url-table th:nth-child(7), .url-table th:last-child, .url-table td:last-child { width: auto; }
  .admin-table { min-width: 0; }
  .admin-table th:first-child, .admin-table th:nth-child(3), .admin-table th:nth-child(4), .admin-table th:nth-child(5), .admin-table th:last-child, .admin-table td:last-child { width: auto; }
  .url-link-group { justify-content: flex-start; gap: 7px; }
  .copy-button { display: grid; width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; place-items: center; border-color: var(--line); background: var(--surface-soft); font-size: 11px; }
  .copy-button:hover { border-color: #b8c5d3; background: var(--brand-soft); }
  .copy-label { display: none; }
  .row-actions { justify-content: flex-start; }
  .redirect-log-content { padding: 18px 15px 30px; }
  .personnel-content { padding: 18px 15px 34px; }
  .personnel-facts { grid-template-columns: 1fr; }
  .personnel-facts > div { border-left: 0; }
  .personnel-facts > div:nth-child(2) { border-top: 1px solid var(--line); }
  .redirect-url-overview { grid-template-columns: 1fr; }
  .redirect-log-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 0; }
  .redirect-log-facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
}

[data-theme="dark"] .app-header { border-color: #2b2d30; background: rgba(24, 25, 27, .97); box-shadow: 0 4px 18px rgba(0, 0, 0, .3); }
[data-theme="dark"] .navigation-shell { border-color: #303236; background: #000000; box-shadow: 0 8px 22px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .035); }
[data-theme="dark"] .profile-menu { background: #000000; }
[data-theme="dark"] .main-nav a { color: #adafb2; }
[data-theme="dark"] .main-nav a:hover { background: #232527; color: #f4f4f5; }
[data-theme="dark"] .main-nav a[aria-current="page"] { background: #2b2c2f; color: #ffffff; box-shadow: inset 0 0 0 1px #3a3c40; }
[data-theme="dark"] .profile-button:hover,
[data-theme="dark"] .profile-button[aria-expanded="true"] { border-color: #3b3d40; background: #25272a; }
[data-theme="dark"] .avatar { background: #eeeeef; color: #276d92; }
[data-theme="dark"] .page-heading,
[data-theme="dark"] .dashboard-hero,
[data-theme="dark"] .metric-strip { border-color: var(--line); box-shadow: 0 7px 24px rgba(0, 0, 0, .16); }
[data-theme="dark"] .dashboard-hero::after { border-color: rgba(255, 255, 255, .025); }
[data-theme="dark"] .dashboard-period-panel,
[data-theme="dark"] .admin-command-heading,
[data-theme="dark"] th,
[data-theme="dark"] th:last-child,
[data-theme="dark"] .redirect-log-item > header { background: var(--surface-soft); color: var(--muted); }
[data-theme="dark"] .dashboard-metric.metric-primary { border-color: #36383c; background: #1d1e20; }
[data-theme="dark"] .performance-progress { background: #2c2e31; }
[data-theme="dark"] .top-url-item,
[data-theme="dark"] .access-facts > div,
[data-theme="dark"] .admin-problem-item,
[data-theme="dark"] td,
[data-theme="dark"] .detail-grid dt,
[data-theme="dark"] .detail-grid dd,
[data-theme="dark"] .redirect-log-facts > div { border-color: var(--line); }
[data-theme="dark"] .top-url-rank,
[data-theme="dark"] .admin-problem-item > span { color: #7f8185; }
[data-theme="dark"] .access-card,
[data-theme="dark"] .admin-problem-card { background: var(--surface-soft); }
[data-theme="dark"] .admin-command-panel { border-color: var(--line); }
[data-theme="dark"] .admin-command-heading > span { border-color: #3a3c40; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] .url-form input,
[data-theme="dark"] .url-form textarea,
[data-theme="dark"] .alias-input { border-color: #3b3d41; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #777a7f; }
[data-theme="dark"] input:hover,
[data-theme="dark"] select:hover,
[data-theme="dark"] .url-form input:hover,
[data-theme="dark"] .url-form textarea:hover { border-color: #54575c; }
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .url-form input:focus,
[data-theme="dark"] .url-form textarea:focus,
[data-theme="dark"] .alias-input:focus-within { box-shadow: 0 0 0 3px rgba(54, 136, 178, .2); }
[data-theme="dark"] tbody tr:hover,
[data-theme="dark"] tbody tr:hover td:last-child:not(.state-cell) { background: #222426; }
[data-theme="dark"] th:last-child,
[data-theme="dark"] td:last-child:not(.state-cell) { box-shadow: -8px 0 14px -12px rgba(0, 0, 0, .85); }
[data-theme="dark"] .skeleton-line { background: #2f3134; }
[data-theme="dark"] .drawer-backdrop,
[data-theme="dark"] .confirm-dialog::backdrop { background: rgba(4, 9, 14, .7); }
[data-theme="dark"] .detail-drawer { box-shadow: -18px 0 46px rgba(0, 0, 0, .32); }
[data-theme="dark"] .detail-drawer > header { background: rgba(24, 25, 27, .97); }
[data-theme="dark"] .toast { border-color: #37624f; background: #20352c; color: #7dd6ad; }
[data-theme="dark"] .delete-button,
[data-theme="dark"] .form-message { border-color: #633a3e; }
[data-theme="dark"] .json-block { border: 1px solid #303236; background: #111214; color: #d5d6d8; }
[data-theme="dark"] .login-brand { background: #151617; }
[data-theme="dark"] .login-brand::before { border-color: rgba(255, 255, 255, .1); box-shadow: 0 0 0 90px rgba(255, 255, 255, .018), 0 0 0 180px rgba(255, 255, 255, .012); }
[data-theme="dark"] .login-message .kicker { color: #5aa8cf; }
[data-theme="dark"] .login-assurance span { border-color: #383a3d; background: #202123; }
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.88); }
[data-theme="dark"] .theme-options button.active { box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }

html.theme-transitioning,
html.theme-transitioning body,
html.theme-transitioning body *,
html.theme-transitioning body *::before,
html.theme-transitioning body *::after {
  transition-property: background-color, border-color, color, box-shadow, fill, stroke, outline-color !important;
  transition-duration: 280ms !important;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1) !important;
}

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; animation: theme-wipe-in 520ms cubic-bezier(.2, 0, 0, 1) both; }

@keyframes theme-wipe-in {
  from { clip-path: circle(0 at var(--theme-wipe-x) var(--theme-wipe-y)); }
  to { clip-path: circle(var(--theme-wipe-radius) at var(--theme-wipe-x) var(--theme-wipe-y)); }
}

@media (max-width: 760px) {
  [data-theme="dark"] .main-nav { background: #000000; }
  [data-theme="dark"] .nav-toggle,
  [data-theme="dark"] .profile-button { border-color: #303236; background: #000000; box-shadow: 0 5px 14px rgba(0, 0, 0, .34); }
  [data-theme="dark"] .nav-toggle:hover,
  [data-theme="dark"] .nav-toggle[aria-expanded="true"],
  [data-theme="dark"] .profile-button:hover,
  [data-theme="dark"] .profile-button[aria-expanded="true"] { border-color: #4a4d51; background: #303236; }
  [data-theme="dark"] tbody tr:hover td:last-child:not(.state-cell) { background: var(--surface); }
  .theme-preference.compact { top: 18px; right: 18px; width: 205px; }
}

@media (max-width: 480px) {
  .recent-url-item { grid-template-columns: 30px minmax(0, 1fr); gap: 7px 10px; }
  .recent-url-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 12px; text-align: left; }
  .dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-actions .button-link { grid-column: 1 / -1; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-metrics.user-view { grid-template-columns: 1fr; }
  .dashboard-metrics.user-view .dashboard-metric:nth-child(3) { grid-column: auto; }
  .period-form { grid-template-columns: 1fr; }
  .period-range-fields { grid-column: auto; grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-stat-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-stat-grid article:nth-child(3) { border-bottom: 1px solid var(--line); }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip article { border-top: 1px solid var(--line); border-left: 0; }
  .metric-strip article:first-child { border-top: 0; }
  .filters { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .login-assurance span { font-size: 9px; }
  .url-summary { grid-template-columns: 1fr; }
  .url-summary > div { border-top: 1px solid var(--line); border-left: 0; }
  .url-summary > div:first-child { border-top: 0; }
  .admin-access-summary { grid-template-columns: 1fr; }
  .admin-access-summary > div { border-top: 1px solid var(--line); border-left: 0; }
  .admin-access-summary > div:first-child { border-top: 0; }
  .compact-search { grid-template-columns: 1fr 1fr; }
  .compact-search input { grid-column: 1 / -1; }
  .redirect-log-summary > div { padding: 12px 10px; }
  .redirect-log-summary strong { font-size: 18px; }
}

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

@media (prefers-reduced-motion: no-preference) {
  .skeleton-line { animation: skeleton-pulse 1.15s ease-in-out infinite alternate; }
}

@keyframes skeleton-pulse {
  from { opacity: .35; }
  to { opacity: .9; }
}
