:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#17253a;background:#f3f6fb;--primary:#2467f5;--accent:#2467f5;--ink:#17253a;--muted:#748298;--line:#e4eaf2;--shadow:0 12px 35px rgba(27,46,78,.06)}*{box-sizing:border-box}body{margin:0;background:#f3f6fb;color:var(--ink);font-size:14px;line-height:1.55}a{color:#2467f5;text-decoration:none}a:hover{color:#154fd0}.app-shell{display:flex;min-height:100vh}.app-sidebar{width:248px;flex:0 0 248px;background:linear-gradient(160deg,#101b30,#1b3050);color:#b8c9e2;padding:30px 18px;position:sticky;top:0;height:100vh}.sidebar-brand{display:flex;align-items:center;gap:12px;color:white;font-size:20px;font-weight:850;letter-spacing:-.5px;margin:0 10px 45px}.sidebar-brand:hover{color:white}.sidebar-brand small{font-size:10px;color:#8da5ce}.brand-mark{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;background:linear-gradient(135deg,#4f91ff,#2e53d5);box-shadow:0 8px 20px #0c1d4d80;color:white}.sidebar-caption{font-size:10px;letter-spacing:1.7px;color:#7890b1;margin:0 13px 12px}.sidebar-nav{display:grid;gap:5px}.sidebar-link{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;color:#c4d2e8;font-weight:600}.sidebar-link span{font-size:18px;min-width:20px}.sidebar-link:hover,.sidebar-link.active{background:#ffffff17;color:white}.sidebar-foot{position:absolute;bottom:26px;left:25px;right:25px;border-top:1px solid #ffffff1a;padding-top:17px;color:#94aac8;font-size:12px}.app-main{min-width:0;flex:1}.app-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px clamp(18px,4vw,58px) 0;max-width:1600px;margin:auto}.topbar-location{font-size:12px;color:#8794a7}.topbar-location strong{color:#34435a}.separator{margin:0 10px;color:#c4cedc}.account{display:flex;align-items:center;gap:12px;font-size:12px;color:#64748b}.account form{margin:0}.account-avatar{width:36px;height:36px;display:grid;place-items:center;background:#e4ebfc;color:#3658ad;border-radius:50%;font-weight:800}.wrap{width:100%;max-width:1600px;margin:0 auto;padding:28px clamp(18px,4vw,58px) 55px}.heading,.actions{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.heading{margin-bottom:22px}h1{font-size:clamp(27px,3vw,37px);letter-spacing:-1.1px;line-height:1.18;margin:0 0 9px}h2{font-size:19px;letter-spacing:-.4px;margin:0 0 15px}h3{font-size:16px;margin:0 0 12px}p{line-height:1.6}.muted,.hint{color:#748298}.hint{font-size:12px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.8px;color:#5578b5;font-weight:800}.card{background:white;border:1px solid var(--line);border-radius:17px;padding:25px;margin:18px 0;box-shadow:var(--shadow)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}.grid .card{margin:0}.grid.admin{grid-template-columns:repeat(auto-fit,minmax(330px,1fr));margin:20px 0}.login{max-width:490px;margin:65px auto;padding:35px}.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin:20px 0}label{display:block;font-size:12px;font-weight:700;color:#526178;margin:14px 0}input,select,textarea{display:block;width:100%;margin-top:7px;padding:11px 12px;min-height:43px;border-radius:10px;background:#fafcff;border:1px solid #dce4ef;color:#23334b;font:inherit;font-size:13px;font-weight:500}textarea{min-height:100px;resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid #dce8ff;border-color:#6996f9}input[type=checkbox],input[type=radio]{width:auto;min-height:0;display:inline-block;margin-right:8px;accent-color:#2467f5}input[type=color]{height:45px;padding:4px;max-width:160px}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:#2467f5;color:white;border-radius:11px;padding:12px 18px;font-weight:750;cursor:pointer;font-size:13px;font-family:inherit;box-shadow:0 6px 14px #2467f52c}button:hover,.button:hover{background:#1757db;color:white}.secondary,.button.secondary,button.secondary{background:white;color:#375170;border:1px solid var(--line);box-shadow:none}.secondary:hover,.button.secondary:hover,button.secondary:hover{background:#f1f5fc;color:#1b477d}.danger,button.danger{background:#bd4152;color:white}.small,button.small{padding:8px 11px;font-size:12px}.alert,.warning{padding:14px 18px;border-radius:11px;background:#edf4ff;color:#34568d;margin:14px 0;border:1px solid #dbe7fb}.warning{border-left:4px solid #e2ac51;background:#fff9ed;color:#86622b}.alert.error{background:#fff0f0;border-color:#f3c8c8;color:#a42c2c}.alert.success{background:#e9f8f1;border-color:#c4eadb;color:#16835c}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}td,th{padding:13px 12px;border-bottom:1px solid #e9edf3;vertical-align:top}th{background:#f8faff;color:#60718a;font-size:11px;letter-spacing:.35px}tr:hover td{background:#fbfcff}footer{color:#91a0b3;font-size:12px;margin-top:24px}hr{border:0;border-top:1px solid var(--line);margin:22px 0}button:disabled{opacity:.5;cursor:not-allowed}a:focus-visible,button:focus-visible{outline:3px solid #91b2ff;outline-offset:2px}@media(max-width:850px){.app-sidebar{width:200px;flex-basis:200px;padding:20px 10px}.sidebar-brand{font-size:16px;margin-bottom:28px}.sidebar-link{font-size:12px}}@media(max-width:650px){.app-shell{display:block}.app-sidebar{height:auto;width:100%;position:static;padding:12px 15px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sidebar-brand{margin:0 10px 0 0;font-size:16px}.brand-mark{width:33px;height:33px}.sidebar-caption,.sidebar-foot{display:none}.sidebar-nav{display:flex;flex-wrap:wrap;gap:2px}.sidebar-link{padding:7px;font-size:11px}.sidebar-link span{font-size:14px;min-width:0}.app-topbar{padding:17px 16px 0}.account-name{display:none}.wrap{padding:20px 15px 40px}.card{padding:18px}.login{margin:20px auto}.heading{align-items:flex-start}h1{font-size:27px}.grid.admin{grid-template-columns:1fr}}
.sidebar-nav{display:flex;flex-direction:column;min-height:calc(100vh - 215px)}.sidebar-link-last{margin-top:auto;border-top:1px solid rgba(255,255,255,.15);padding-top:18px;line-height:1.4}.sidebar-link-last.active{background:rgba(255,255,255,.1);color:#fff}@media(max-width:650px){.sidebar-nav{min-height:0;flex-direction:row;flex-wrap:wrap}.sidebar-link-last{margin-top:0;border-top:0;padding-top:7px}}

/* Shared theme switcher across Avtovin PRO and GBO */
.theme-toggle{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:12px;padding:4px;background:#fff}.theme-toggle button{font:inherit;font-weight:700;font-size:12px;border:0;background:transparent;color:var(--muted);border-radius:9px;padding:8px 10px;cursor:pointer}.theme-toggle button[aria-pressed="true"]{background:var(--primary);color:#fff}
html[data-theme="dark"]{color-scheme:dark;--ink:#e8eef8;--muted:#9eafc5;--line:#30425b;--shadow:0 12px 35px rgba(0,0,0,.25);background:#0b1220;color:#e8eef8}html[data-theme="dark"] body{background:#0b1220;color:var(--ink)}html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .login,html[data-theme="dark"] .theme-toggle{background:#17263a;color:var(--ink);border-color:var(--line)}html[data-theme="dark"] .topbar-location strong,html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] label{color:var(--ink)}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#101c2d;color:#e8eef8;border-color:#40536e}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9eafc5}html[data-theme="dark"] .secondary,html[data-theme="dark"] button.secondary{background:#253c5a;color:#e8eef8;border-color:#40536e}html[data-theme="dark"] .account-avatar{background:#253c5a;color:#d9e8ff}html[data-theme="dark"] table,html[data-theme="dark"] th,html[data-theme="dark"] td{border-color:#30425b;color:var(--ink)}@media(max-width:650px){.theme-toggle button{padding:7px;font-size:11px}}

/* Avtovin PRO dashboard and compact navigation */
.app-sidebar{background:linear-gradient(165deg,#0d1930,#1a3053)}
.brand-mark{background:linear-gradient(145deg,#387aff,#2149b4);border:1px solid rgba(255,255,255,.18);box-shadow:0 8px 22px rgba(7,31,89,.35)}
.sidebar-brand{font-size:19px;letter-spacing:-.65px}
.sidebar-nav{min-height:0}
.sidebar-link-last{margin-top:0;border:0;padding-top:12px}
.topbar-location{color:var(--muted)}
.account{gap:10px}
.theme-toggle{border-radius:14px;gap:3px}
.theme-toggle button{font-size:16px;min-width:36px;height:34px;padding:5px}
.profile-menu{position:relative}
.profile-menu summary{list-style:none;cursor:pointer;border-radius:50%;outline-offset:3px}
.profile-menu summary::-webkit-details-marker{display:none}
.profile-menu summary:hover .account-avatar{box-shadow:0 0 0 3px rgba(36,103,245,.2)}
.profile-popover{position:absolute;right:0;top:48px;z-index:50;min-width:235px;padding:16px;background:white;border:1px solid var(--line);border-radius:15px;box-shadow:0 18px 50px rgba(15,34,68,.18);display:grid;gap:10px;color:var(--ink)}
.profile-popover strong{font-size:14px}.profile-popover>span{font-size:12px;color:var(--muted)}
.profile-popover form,.profile-popover button{width:100%;margin:0}
.dashboard-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin:10px 0 28px}
.dashboard-hero h1{margin:5px 0 4px}.dashboard-hero p{margin:0}
.dashboard-status{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;background:#eaf7f2;color:#12845d;font-size:12px;font-weight:750}
.status-dot{width:8px;height:8px;background:#15a879;border-radius:50%}
.dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 20px}
.metric-card{display:flex;flex-direction:column;gap:7px;padding:24px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow);color:var(--ink);transition:transform .18s,box-shadow .18s}
.metric-card:hover{transform:translateY(-2px);box-shadow:0 15px 35px rgba(26,57,106,.12);color:var(--ink)}
.metric-label{font-size:13px;color:var(--muted);font-weight:700}.metric-card strong{font-size:36px;line-height:1.2;letter-spacing:-1.3px}.metric-note{font-size:12px;color:var(--primary)}
.dashboard-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.dashboard-section{display:flex;align-items:center;gap:16px;padding:22px;background:white;border:1px solid var(--line);border-radius:17px;color:var(--ink);box-shadow:var(--shadow)}
.dashboard-section:hover{border-color:#a7bff5;color:var(--ink)}
.dashboard-section-icon{display:grid;place-items:center;flex:0 0 46px;height:46px;background:#eaf1ff;color:#2467f5;border-radius:13px;font-size:23px}
.dashboard-section>span:nth-child(2){display:grid;gap:5px}.dashboard-section strong{font-size:15px}.dashboard-section small{font-size:12px;color:var(--muted);line-height:1.5}.dashboard-arrow{margin-left:auto;font-size:20px;color:var(--primary)}
.dashboard-document-summary{margin:22px 0;padding:23px 25px;background:white;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}
.dashboard-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.dashboard-type-grid a{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f4f7fd;padding:14px;border-radius:12px;color:var(--ink)}
.dashboard-type-grid strong{font-size:21px}.dashboard-document-summary .hint{margin:15px 0 0}
.registry-filter{display:grid;grid-template-columns:minmax(240px,2fr) minmax(170px,1fr) auto;gap:16px;align-items:end}
.registry-filter label{margin:0}.filter-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.registry-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:24px 0 15px}.registry-heading h2{margin:0}.empty-registry{grid-column:1/-1}
html[data-theme="dark"] .profile-popover,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .dashboard-section,html[data-theme="dark"] .dashboard-document-summary{background:#17263a;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .dashboard-type-grid a{background:#223650;color:var(--ink)}
html[data-theme="dark"] .dashboard-section-icon{background:#253c5a;color:#9cbcff}
html[data-theme="dark"] .dashboard-status{background:#143a35;color:#74d7b3}
@media(max-width:950px){.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-sections{grid-template-columns:1fr}.registry-filter{grid-template-columns:1fr 1fr}.filter-actions{grid-column:1/-1}}
@media(max-width:650px){.dashboard-metrics,.dashboard-type-grid,.registry-filter{grid-template-columns:1fr}.filter-actions{grid-column:auto}.profile-popover{right:-10px}.dashboard-section{padding:17px}.dashboard-document-summary{padding:18px}}

/* 2026 visual system: navigation, clarity, accessible transitions */
:root{--surface:#fff;--surface-subtle:#f4f7fd;--surface-hover:#edf3ff;--focus:#9bbaff;--ink:#17253a;--muted:#60718a}
html[data-theme="dark"]{--surface:#17263a;--surface-subtle:#223650;--surface-hover:#2b4260;--primary:#82adff;--ink:#e8eef8;--muted:#b9c9df}
body,.app-main,.app-sidebar,.sidebar-link,.sidebar-link-label,.sidebar-brand-text,.metric-card,.dashboard-section,.card,.button,button,input,select,textarea,.profile-popover{transition:background-color .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease,transform .22s ease,width .24s ease,flex-basis .24s ease}
.app-sidebar{z-index:10;overflow-x:hidden;padding-top:75px}
.sidebar-brand{white-space:nowrap;margin:0 4px 32px;gap:10px}
.sidebar-brand-text,.sidebar-link-label{white-space:normal;overflow:hidden;transition:opacity .2s ease}
.sidebar-collapse-toggle{position:absolute;right:14px;top:20px;width:36px;height:36px;padding:0;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:11px;color:white;box-shadow:none}
.sidebar-collapse-toggle:hover{background:rgba(255,255,255,.23)}
.sidebar-link{min-height:48px;gap:13px;position:relative}
.sidebar-link:hover{transform:translateX(2px)}
.sidebar-link:focus-visible,.sidebar-collapse-toggle:focus-visible{outline:3px solid #94baff;outline-offset:2px}
html.sidebar-collapsed .app-sidebar{width:78px;flex-basis:78px;padding-left:10px;padding-right:10px}
html.sidebar-collapsed .sidebar-collapse-toggle{right:21px}
html.sidebar-collapsed .sidebar-brand{margin:0 0 30px;justify-content:center}
html.sidebar-collapsed .sidebar-brand-text,html.sidebar-collapsed .sidebar-caption,html.sidebar-collapsed .sidebar-foot,html.sidebar-collapsed .sidebar-link-label{display:none}
html.sidebar-collapsed .sidebar-link{justify-content:center;gap:0;padding:12px 8px;font-size:0}
html.sidebar-collapsed .sidebar-link>span:first-child{font-size:20px;min-width:22px;text-align:center}
html.sidebar-collapsed .sidebar-link:hover{transform:none}
.dashboard-metrics-featured{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-sections-featured .dashboard-section{min-height:112px}
.metric-card,.dashboard-section{position:relative;overflow:hidden}
.metric-card::before,.dashboard-section::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(#78a6ff,#2467f5);opacity:0;transition:opacity .2s ease}
.metric-card:hover::before,.dashboard-section:hover::before{opacity:1}
.dashboard-section:hover{transform:translateY(-2px);box-shadow:0 15px 35px rgba(26,57,106,.12)}
.metric-note,.dashboard-arrow{color:var(--primary)}
.muted,.hint,.metric-label,.dashboard-section small,.topbar-location,.account{color:var(--muted)}
.card,.metric-card,.dashboard-section,.dashboard-document-summary,.profile-popover{background:var(--surface)}
html[data-theme="dark"] .muted,html[data-theme="dark"] .hint,html[data-theme="dark"] .metric-label,html[data-theme="dark"] .dashboard-section small,html[data-theme="dark"] .topbar-location{color:var(--muted)}
html[data-theme="dark"] .eyebrow{color:#9dbbff}
html[data-theme="dark"] .metric-note,html[data-theme="dark"] .dashboard-arrow{color:#a5c3ff}
html[data-theme="dark"] .dashboard-status{color:#9cf2d0}
html[data-theme="dark"] .dashboard-section:hover,html[data-theme="dark"] .metric-card:hover{border-color:#6b8bb8;box-shadow:0 16px 35px rgba(0,0,0,.32)}
html[data-theme="dark"] .sidebar-link{color:#d0ddf0}
html[data-theme="dark"] .sidebar-link.active,html[data-theme="dark"] .sidebar-link:hover{color:white}
html[data-theme="dark"] .alert,html[data-theme="dark"] .warning{background:#253954;color:#dceaff;border-color:#506c92}
html[data-theme="dark"] .alert.error{background:#472a37;color:#ffd9df;border-color:#805062}
html[data-theme="dark"] .alert.success{background:#1c433c;color:#adf5d6;border-color:#356b5e}
html[data-theme="dark"] th{background:#20334c;color:#dce7f9}
html[data-theme="dark"] tr:hover td{background:#213550}
html[data-theme="dark"] a:not(.sidebar-link):not(.sidebar-brand):not(.button):not(.dashboard-section):not(.metric-card){color:#9dbfff}
html[data-theme="dark"] .theme-toggle button[aria-pressed="true"]{background:#396de0;color:white}
html[data-theme="dark"] .profile-popover{background:#17263a}
html[data-theme="dark"] .profile-popover a{color:#b8d1ff}
@media(max-width:850px){html.sidebar-collapsed .app-sidebar{width:68px;flex-basis:68px}html.sidebar-collapsed .sidebar-collapse-toggle{right:16px}}
@media(max-width:650px){.app-sidebar{padding-top:12px;overflow:visible}.sidebar-collapse-toggle{display:none}html.sidebar-collapsed .app-sidebar{width:100%;flex-basis:auto;padding:12px 15px}html.sidebar-collapsed .sidebar-brand-text,html.sidebar-collapsed .sidebar-link-label{display:inline}html.sidebar-collapsed .sidebar-link{font-size:11px;padding:7px}html.sidebar-collapsed .sidebar-caption{display:none}.dashboard-metrics-featured{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* Proportional dashboard activity visualization */
.metric-progress{display:block;width:100%;height:7px;background:var(--surface-subtle);border-radius:999px;overflow:hidden;margin-top:auto}
.metric-progress>span{display:block;height:100%;min-width:0;background:linear-gradient(90deg,#2467f5,#82b5ff);border-radius:999px;transition:width .5s ease}
.dashboard-metrics-featured .metric-card{min-height:164px}
html[data-theme="dark"] .metric-progress{background:#2b4361}
html[data-theme="dark"] .metric-progress>span{background:linear-gradient(90deg,#6c9aff,#b5d1ff)}
@media(prefers-reduced-motion:reduce){.metric-progress>span{transition:none}}

/* Compact sidebar typography — prevent labels overflowing the navigation */
@media(min-width:651px){
 .app-sidebar{width:232px;flex:0 0 232px;padding-left:12px;padding-right:12px}
 .sidebar-brand{font-size:17px;gap:9px;margin-left:3px;margin-right:3px}
 .sidebar-brand-text{min-width:0;white-space:nowrap;letter-spacing:-.7px}
 .sidebar-brand small{font-size:9px}
 .sidebar-nav{width:100%;min-width:0;gap:4px}
 .sidebar-link{width:100%;min-width:0;min-height:44px;padding:10px 11px;gap:10px;font-size:12px;font-weight:650;line-height:1.25}
 .sidebar-link>span:first-child{flex:0 0 19px;min-width:19px;font-size:17px;text-align:center}
 .sidebar-link-label{display:block;min-width:0;flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.12px}
 .sidebar-caption{font-size:9px;margin-left:10px;letter-spacing:1.3px}
 .sidebar-foot{left:16px;right:16px;font-size:11px}
 .sidebar-collapse-toggle{right:12px}
 html.sidebar-collapsed .app-sidebar{width:72px;flex-basis:72px;padding-left:9px;padding-right:9px}
 html.sidebar-collapsed .sidebar-collapse-toggle{right:18px}
 html.sidebar-collapsed .sidebar-link-label{display:none}
 html.sidebar-collapsed .sidebar-link{width:100%;justify-content:center;padding:11px 8px}
}
@media(min-width:651px) and (max-width:850px){
 .app-sidebar{width:212px;flex-basis:212px}
 .sidebar-link{font-size:11.5px;gap:8px;padding-left:9px;padding-right:9px}
 .sidebar-brand{font-size:15px}
 html.sidebar-collapsed .app-sidebar{width:68px;flex-basis:68px}
}


/* Sidebar & dashboard polish: full labels, clear groups and comfortable spacing */
@media (min-width:651px) {
  .app-sidebar {
    width:272px;flex:0 0 272px;padding:76px 16px 24px;
    overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#365579 transparent;
  }
  .sidebar-brand {gap:10px;padding:0 5px;margin:0 0 30px;font-size:18px;line-height:1.2}
  .brand-mark {flex:0 0 39px}
  .sidebar-caption {margin:0 12px 13px;font-size:10px;line-height:1.5;letter-spacing:1.35px}
  .sidebar-nav {display:flex;flex-direction:column;gap:5px;width:100%;min-width:0}
  .sidebar-link {
    display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;
    width:100%;min-width:0;min-height:48px;padding:11px 13px;gap:12px;
    border-radius:12px;font-size:13px;font-weight:650;line-height:1.4;
  }
  .sidebar-link > span:first-child {
    display:block;min-width:22px;width:22px;text-align:center;font-size:19px;line-height:1;
  }
  .sidebar-link-label {
    display:block;min-width:0;font-size:13px;line-height:1.4;letter-spacing:0;
    white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word;
  }
  .sidebar-nav-divider {
    margin:17px 10px 7px;padding:17px 2px 0;border-top:1px solid rgba(188,212,250,.16);
    color:#94abcc;font-size:10px;font-weight:800;letter-spacing:1.1px;line-height:1.45;
  }
  .sidebar-link.active {
    background:linear-gradient(90deg,rgba(111,159,247,.21),rgba(111,159,247,.09));
    box-shadow:inset 3px 0 #82b3ff;
  }
  .sidebar-link:hover {background:rgba(255,255,255,.13);transform:none}
  .sidebar-link.active:hover {background:linear-gradient(90deg,rgba(111,159,247,.26),rgba(111,159,247,.13))}
  .sidebar-foot {position:static;margin:32px 10px 0;padding:17px 0 0;line-height:1.45}
  html.sidebar-collapsed .app-sidebar {width:72px;flex:0 0 72px;padding:76px 9px 20px}
  html.sidebar-collapsed .sidebar-brand {justify-content:center;padding:0;margin:0 0 30px}
  html.sidebar-collapsed .sidebar-nav-divider {display:none}
  html.sidebar-collapsed .sidebar-link {display:flex;justify-content:center;min-height:48px;padding:10px 8px}
  html.sidebar-collapsed .sidebar-link-label {display:none}
}
@media (min-width:651px) and (max-width:1050px) {
  .app-sidebar {width:244px;flex-basis:244px;padding-left:12px;padding-right:12px}
  .sidebar-brand {font-size:16px}
  .sidebar-link {padding:10px;gap:9px}
  .sidebar-link-label {font-size:12px}
  html.sidebar-collapsed .app-sidebar {width:72px;flex-basis:72px}
}
@media (max-width:650px) {
  .app-sidebar {gap:10px;padding:13px 15px}
  .sidebar-brand {flex:1 1 100%;margin:0 0 3px}
  .sidebar-nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
  .sidebar-nav-divider {display:none}
  .sidebar-link {display:flex;align-items:center;gap:8px;min-height:44px;padding:9px}
  .sidebar-link > span:first-child {flex:0 0 18px;min-width:18px;text-align:center;font-size:17px}
  .sidebar-link-label {
    display:block;min-width:0;white-space:normal;overflow:visible;
    text-overflow:clip;overflow-wrap:break-word;font-size:12px;line-height:1.3;
  }
  html.sidebar-collapsed .sidebar-nav {display:grid}
  html.sidebar-collapsed .sidebar-link-label {display:block}
}
@media (min-width:1100px) {
  .app-main > .wrap,.app-main > .app-topbar {
    max-width:1800px;margin-left:0;margin-right:auto;
    padding-left:clamp(26px,2.8vw,52px);padding-right:clamp(26px,2.8vw,52px);
  }
}
.dashboard-hero {margin-top:8px;margin-bottom:25px}
.dashboard-metrics-featured {gap:18px;margin-bottom:18px}
.dashboard-metrics-featured .metric-card {padding:24px;min-height:164px}
.metric-card .metric-label {line-height:1.4}
.dashboard-sections-featured {gap:18px}
.dashboard-sections-featured .dashboard-section {min-height:110px;gap:16px}
.dashboard-section > span:nth-child(2) {min-width:0}
.dashboard-section strong,.dashboard-section small {overflow-wrap:break-word}
@media (max-width:950px) {
  .dashboard-metrics-featured {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:650px) {
  .dashboard-metrics-featured {grid-template-columns:1fr;gap:10px}
  .dashboard-sections-featured {gap:10px}
  .dashboard-metrics-featured .metric-card {min-height:135px;padding:19px}
}


/* Keep Administration on one line without clipping or widening the whole sidebar */
@media (min-width:651px) {
  .sidebar-link-admin {
    grid-template-columns:20px minmax(0,1fr);
    column-gap:8px;
    padding-left:10px;
    padding-right:10px;
  }
  .sidebar-link-admin .sidebar-link-label {
    font-size:12.5px;
    letter-spacing:-.25px;
    white-space:nowrap;
    word-break:normal;
    overflow-wrap:normal;
    overflow:visible;
  }
}
@media (min-width:651px) and (max-width:1050px) {
  .sidebar-link-admin {
    grid-template-columns:18px minmax(0,1fr);
    column-gap:7px;
    padding-left:8px;
    padding-right:8px;
  }
  .sidebar-link-admin .sidebar-link-label {font-size:12px}
}
@media (max-width:650px) {
  .sidebar-link-admin .sidebar-link-label {
    white-space:normal;
    overflow-wrap:break-word;
  }
}

/* Dashboard work area: balanced section hierarchy and responsive cards */
.dashboard-workspace{margin-top:30px}
.dashboard-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px 26px;margin-bottom:16px}
.dashboard-section-heading .eyebrow{font-size:10px;letter-spacing:1.35px}
.dashboard-section-heading h2{margin:3px 0 0;font-size:20px;line-height:1.3;letter-spacing:-.4px}
.dashboard-section-heading p{margin:0 0 2px;font-size:12px;line-height:1.5;text-align:right}
.dashboard-metrics-featured .metric-card{min-width:0;gap:9px}
.dashboard-metrics-featured .metric-card strong{font-variant-numeric:tabular-nums}
.dashboard-sections-featured .dashboard-section{min-width:0;align-items:center;padding:22px 24px}
.dashboard-sections-featured .dashboard-section > span:nth-child(2){flex:1 1 auto}
.dashboard-sections-featured .dashboard-arrow{flex:0 0 auto;align-self:center}
@media(max-width:1050px){
 .dashboard-section-heading{align-items:flex-start;flex-direction:column;gap:5px}
 .dashboard-section-heading p{text-align:left}
}
@media(max-width:650px){
 .dashboard-workspace{margin-top:24px}
 .dashboard-section-heading{margin-bottom:12px}
 .dashboard-section-heading h2{font-size:18px}
 .dashboard-sections-featured .dashboard-section{padding:17px 15px;gap:12px}
 .dashboard-sections-featured .dashboard-section-icon{flex-basis:40px;height:40px;font-size:20px}
 .dashboard-sections-featured .dashboard-section strong{font-size:14px;line-height:1.35}
 .dashboard-sections-featured .dashboard-section small{font-size:11px;line-height:1.45}
}


/* Mobile navigation: compact disclosure, desktop collapse persists without layout flash */
@media (max-width:650px) {
  html.nav-enhanced .app-sidebar {
    position:relative;
    padding:12px 15px;
    gap:8px;
  }
  html.nav-enhanced .app-sidebar .sidebar-brand {
    min-height:40px;
    padding-right:50px;
    margin:0;
  }
  html.nav-enhanced .app-sidebar .sidebar-collapse-toggle {
    display:grid;
    place-items:center;
    position:absolute;
    top:12px;
    right:15px;
    width:40px;
    height:40px;
    font-size:21px;
    line-height:1;
  }
  html.nav-enhanced .app-sidebar .sidebar-nav {
    width:100%;
    margin:8px 0 2px;
    min-height:0;
  }
  html.nav-enhanced:not(.mobile-menu-open) .app-sidebar .sidebar-nav {display:none}
  html.nav-enhanced.mobile-menu-open .app-sidebar .sidebar-nav {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  html.nav-enhanced.mobile-menu-open .app-sidebar .sidebar-link {
    min-height:46px;
    font-size:12px;
  }
}
@media (max-width:390px) {
  html.nav-enhanced.mobile-menu-open .app-sidebar .sidebar-nav {grid-template-columns:1fr}
}


/* Dashboard metrics: readable ratios and document-type breakdown */
.dashboard-metrics-featured .metric-card{min-height:190px}
.dashboard-metrics-featured .metric-card .metric-label{font-size:13px;line-height:1.45}
.dashboard-metrics-featured .metric-card .metric-note{font-size:12px;line-height:1.35}
.metric-footer{display:grid;gap:7px;margin-top:auto}
.metric-ratio{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;color:var(--muted);font-size:11px;line-height:1.35}
.metric-ratio-value{color:var(--ink);font-weight:800;font-size:13px;font-variant-numeric:tabular-nums}
.dashboard-metrics-featured .metric-progress{margin-top:0}
.metric-kinds{display:flex;flex-wrap:wrap;gap:5px;margin-top:-2px}
.metric-kind{display:inline-flex;align-items:center;padding:3px 7px;font-size:11px;font-weight:650;line-height:1.4;color:#42618e;background:#eef3fc;border:1px solid #dfebfb;border-radius:8px;font-variant-numeric:tabular-nums}
html[data-theme="dark"] .metric-kind{color:#bfd7ff;background:#203653;border-color:#3a5276}
@media(max-width:650px){
 .dashboard-metrics-featured .metric-card{min-height:152px}
 .metric-kinds{gap:5px}
}


/* Dashboard: directly accessible creation shortcuts */
.dashboard-hero-intro{min-width:0;flex:1 1 310px}
.dashboard-hero-tools{display:flex;flex-direction:column;align-items:flex-end;gap:14px;min-width:0}
.dashboard-create-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.dashboard-create-actions .button{min-height:42px;margin:0;white-space:nowrap;line-height:1.3;border-radius:11px;padding:11px 15px;font-weight:750;box-shadow:none}
.dashboard-create-actions .dashboard-create-primary{background:var(--primary);color:#fff}
.dashboard-create-actions .dashboard-create-primary:hover{background:#1757db;color:#fff}
.dashboard-create-actions .dashboard-create-secondary{background:var(--surface);border:1px solid var(--line);color:var(--ink)}
.dashboard-create-actions .dashboard-create-secondary:hover{background:var(--surface-hover);color:var(--ink)}
.dashboard-create-actions .button:focus-visible{outline:3px solid #94baff;outline-offset:3px}
@media(max-width:1050px){
 .dashboard-hero-tools{align-items:flex-start;width:100%}
 .dashboard-create-actions{justify-content:flex-start}
}
@media(max-width:650px){
 .dashboard-hero{align-items:flex-start;gap:15px}
 .dashboard-hero-tools{gap:12px}
 .dashboard-create-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .dashboard-create-actions .button{white-space:normal;text-align:center;min-height:46px;padding:10px}
}
@media(max-width:390px){
 .dashboard-create-actions{grid-template-columns:1fr}
}

/* Dashboard type filter navigation */
.dashboard-document-filters{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
  margin:0 0 26px;padding:0 1px;
}
.dashboard-filter-caption{
  display:inline-block;margin-right:5px;
  font-size:12px;font-weight:650;color:var(--muted);
}
.dashboard-filter-chip{
  display:inline-flex;align-items:center;justify-content:space-between;
  gap:10px;min-height:42px;padding:7px 8px 7px 13px;
  border-radius:11px;border:1px solid var(--line);
  background:var(--surface);color:var(--ink);
  font-size:12px;font-weight:750;line-height:1.2;
  box-shadow:0 3px 12px rgba(26,57,106,.04);
  transition:background-color .18s,border-color .18s,box-shadow .18s;
}
.dashboard-filter-chip:hover{
  background:var(--surface-hover);
  border-color:#8aaef5;color:var(--ink);
  box-shadow:0 6px 18px rgba(26,57,106,.08);
}
.dashboard-filter-chip:focus-visible{outline:3px solid #94baff;outline-offset:2px}
.dashboard-filter-count{
  display:inline-grid;place-items:center;
  min-width:26px;height:26px;padding:0 5px;
  border-radius:8px;background:var(--surface-subtle);
  color:var(--primary);font-size:12px;font-weight:800;
  font-variant-numeric:tabular-nums;
}
html[data-theme="dark"] .dashboard-filter-chip:hover{border-color:#699af5}
@media(max-width:650px){
 .dashboard-document-filters{gap:8px;margin-bottom:23px}
 .dashboard-filter-caption{flex:1 1 100%;margin:0 0 2px}
 .dashboard-filter-chip{flex:1 1 0;min-width:92px;max-width:170px}
}


/* Mobile menu ignores persisted desktop collapsed styling */
@media (max-width:650px) {
  html.sidebar-collapsed .app-sidebar .sidebar-brand-text {display:inline}
  html.sidebar-collapsed .app-sidebar .sidebar-link {
    justify-content:flex-start;
    gap:8px;
    padding:9px;
    font-size:12px;
  }
  html.sidebar-collapsed .app-sidebar .sidebar-link > span:first-child {
    flex:0 0 18px;
    min-width:18px;
    font-size:17px;
    text-align:center;
  }
  html.sidebar-collapsed .app-sidebar .sidebar-link-label {
    display:block;
  }
}
