:root{--bg:#f3f6fb;--panel:#fff;--text:#152033;--muted:#66758a;--line:#dce4ef;--brand:#1f4fbf;--brand2:#122f72;--gold:#d6a83c;--ok:#16834a;--warn:#b86600;--bad:#bd2b2b;--shadow:0 10px 30px #14213d12}
html[data-theme=dark]{--bg:#0c1220;--panel:#141d2c;--text:#edf3ff;--muted:#9badc6;--line:#29364a;--brand:#5d82ff;--brand2:#3155c8;--shadow:0 10px 30px #0004}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
header{background:linear-gradient(135deg,var(--brand2),var(--brand));border-bottom:3px solid var(--gold);color:white;padding:17px}.head{max-width:1500px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{font-size:23px;font-weight:800}.brand small{display:block;font-size:12px;font-weight:400;opacity:.85}
main{max-width:1500px;margin:18px auto;padding:0 12px}.card{background:var(--panel);border:1px solid var(--line);border-radius:15px;padding:17px;margin-bottom:14px;box-shadow:var(--shadow)}h2,h3{margin:0 0 12px}.muted{color:var(--muted)}
.nav{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.btn{border:1px solid transparent;border-radius:9px;padding:9px 13px;font-weight:700;background:#e4eaf3;color:#152033}.btn.primary,.btn.active{background:var(--brand);color:white}.btn.success{background:var(--ok);color:white}.btn.warning{background:var(--warn);color:white}.btn.danger{background:var(--bad);color:white}.btn.ghost{background:var(--panel);border-color:var(--line);color:var(--text)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:11px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:11px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:14px}.stat b{font-size:26px;display:block;margin-top:5px}
label{font-weight:700;font-size:12px;display:block;margin:0 0 5px}input,select,textarea{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text)}textarea{min-height:70px}.actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.auth{max-width:650px;margin:45px auto}.tabs{display:flex;gap:5px;margin-bottom:15px}.tabs button{flex:1}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:11px}table{width:100%;border-collapse:collapse;min-width:1050px}th,td{padding:8px;border-bottom:1px solid var(--line);text-align:left}th{background:color-mix(in srgb,var(--brand) 10%,var(--panel));position:sticky;top:0}.weekend{background:color-mix(in srgb,#f59e0b 8%,var(--panel))}.badge{display:inline-block;padding:4px 8px;border-radius:999px;font-weight:800;font-size:11px}.draft{background:#dfe6ef;color:#334155}.submitted{background:#fff0b8;color:#7b4b00}.approved{background:#cdefdb;color:#115c34}.rejected{background:#ffd8d8;color:#8d1e1e}.sent_to_accountant{background:#d9e5ff;color:#193e98}
.notice{padding:10px;border-radius:8px;background:#e7f0ff;margin-top:9px;color:#173a72}.notice.error{background:#ffe0e0;color:#8b1d1d}.listitem{border:1px solid var(--line);border-radius:11px;padding:13px;margin:9px 0}.listhead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
dialog{border:0;border-radius:15px;padding:0;background:var(--panel);color:var(--text);width:min(720px,95vw);box-shadow:0 25px 80px #0006}dialog::backdrop{background:#0008}.modal{padding:18px}.mobilecards{display:none}
@media(max-width:760px){.brand{font-size:19px}.desktopTable{display:none}.mobilecards{display:block}.card{padding:13px}.head{align-items:flex-start}.user{font-size:12px;text-align:right}}
@media print{header,.nav,.no-print{display:none!important}body{background:white}.card{box-shadow:none;border:0}}

.app-footer{
  max-width:1500px;
  margin:10px auto 24px;
  padding:0 12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  font-size:13px;
}


.brand::before{
  content:"U";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin-right:10px;
  border-radius:10px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.28);
  font-weight:900;
  vertical-align:middle;
}

/* Uurpaleis 2.0 aanvullingen */
:focus-visible{
  outline:3px solid color-mix(in srgb,var(--gold) 75%,white);
  outline-offset:2px;
}
button:disabled,input:disabled,select:disabled,textarea:disabled{
  opacity:.65;
  cursor:not-allowed;
}
.loading::after{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin-left:8px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  animation:spin .7s linear infinite;
  vertical-align:-2px;
}
@keyframes spin{to{transform:rotate(360deg)}}

.legal-card{max-width:1050px;margin:0 auto;line-height:1.65}.legal-card h3{margin-top:26px}.legal-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.legal-warning{padding:14px 16px;margin:18px 0;border:1px solid #f0c36d;border-radius:10px;background:#fff8e7;color:#6f4e00}
.cookie-banner{position:fixed;left:18px;right:18px;bottom:18px;z-index:10000;padding:18px;border:1px solid #cbd5e1;border-radius:16px;background:#fff;color:#111827;box-shadow:0 16px 45px rgba(15,23,42,.25)}
.cookie-banner.hidden{display:none!important}.cookie-content{max-width:1200px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:24px}.cookie-content h3{margin:0 0 7px}.cookie-content p{margin:0;max-width:760px;line-height:1.5}
.cookie-actions{display:flex;gap:10px;flex-shrink:0}.cookie-links,.legal-footer-links{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:9px}
.link-button{border:0;padding:0;background:transparent;color:#1d4ed8;text-decoration:underline;cursor:pointer;font:inherit}.cookie-settings-dialog{max-width:620px;width:calc(100% - 32px)}
.cookie-setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid #e5e7eb}.cookie-setting-row input{width:22px;height:22px}
@media(max-width:760px){.cookie-banner{left:10px;right:10px;bottom:10px;padding:15px}.cookie-content{align-items:stretch;flex-direction:column}.cookie-actions{display:grid;grid-template-columns:1fr}.cookie-actions .btn{width:100%}.legal-heading{flex-direction:column}.legal-card{padding:16px}}

.switch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:18px 0}
.switch-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--border,#dbe3ef);border-radius:12px;background:var(--card,#fff)}
.switch-card input{width:22px;height:22px}
.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;padding:12px;border:1px solid #dbe3ef;border-radius:12px}
.signature-canvas{width:100%;height:220px;border:2px dashed #94a3b8;border-radius:12px;background:#fff;touch-action:none}
.wide-modal{max-width:1000px}
.rtl{direction:rtl;text-align:right}.rtl .listhead,.rtl .actions,.rtl .cookie-content{flex-direction:row-reverse}.rtl input,.rtl textarea,.rtl select{text-align:right}
.audit-page pre, #auditList pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f8fafc;padding:10px;border-radius:8px}

.timesheet-review-dialog{
  width:min(1180px,calc(100% - 24px));
  max-width:none;
  border:0;
  padding:0;
  border-radius:18px;
}
.timesheet-review-dialog::backdrop{
  background:rgba(15,23,42,.62);
}
.summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
  margin:18px 0;
}
.summary-card{
  padding:14px;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#f8fafc;
}
.summary-card span{
  display:block;
  font-size:13px;
  color:#64748b;
  margin-bottom:4px;
}
.summary-card b{
  font-size:18px;
}
.table-wrap{
  overflow:auto;
  border:1px solid #dbe3ef;
  border-radius:12px;
}
.review-table{
  width:100%;
  border-collapse:collapse;
  min-width:850px;
}
.review-table th,
.review-table td{
  padding:12px 14px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  vertical-align:top;
}
.review-table th{
  position:sticky;
  top:0;
  background:#eef3f9;
  z-index:1;
}
.review-table tr:last-child td{
  border-bottom:0;
}
.review-table .empty-row{
  color:#94a3b8;
  background:#fafafa;
}
.signature-review{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
  margin-top:18px;
}
.signature-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#fff;
}
.signature-card img{
  width:150px;
  max-height:70px;
  object-fit:contain;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}
.review-actions{
  position:sticky;
  bottom:0;
  padding-top:16px;
  background:linear-gradient(to top,#fff 75%,rgba(255,255,255,0));
}
@media(max-width:700px){
  .timesheet-review-dialog{
    width:calc(100% - 10px);
  }
  .timesheet-review-dialog .modal{
    padding:14px;
  }
}

#hourRows tr.locked-row{background:#f1f5f9;color:#64748b}
#hourRows tr.locked-row input{background:#e8edf3;cursor:not-allowed}

/* Uurpaleis 3.1 UI */
#nav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
#nav .btn{
  margin:0;
  white-space:nowrap;
}
.consent-box{
  margin-top:16px;
  padding:15px;
  border:1px solid var(--border,#dbe3ef);
  border-radius:12px;
  background:var(--soft,#f8fafc);
}
.consent-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:10px 0;
  font-size:14px;
  line-height:1.45;
  color:inherit;
}
.consent-row input{
  width:20px;
  height:20px;
  flex:0 0 auto;
  margin-top:1px;
}
.consent-row .link-button{
  display:inline;
}
.permissions-dialog{
  width:min(760px,calc(100% - 24px));
  max-width:none;
  border:0;
  border-radius:18px;
}
.bookkeeping-shell{
  padding:18px;
}
#bookkeepingFrame{
  width:100%;
  height:78vh;
  min-height:720px;
  border:1px solid var(--border,#dbe3ef);
  border-radius:14px;
  background:#fff;
}
@media(max-width:800px){
  header{
    align-items:flex-start;
  }
  #nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:8px;
    scrollbar-width:thin;
  }
  #nav .btn{
    flex:0 0 auto;
  }
  .stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #bookkeepingFrame{
    min-height:650px;
    height:75vh;
  }
}
@media(max-width:520px){
  .stats{
    grid-template-columns:1fr;
  }
  .card,.listitem{
    border-radius:12px;
  }
  .grid{
    grid-template-columns:1fr!important;
  }
}

.weekday-checks{display:flex;gap:8px;flex-wrap:wrap}
.weekday-checks label{display:flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid var(--border,#dbe3ef);border-radius:8px}
.weekday-checks input{width:auto}
.fixed-days-box{grid-column:span 2}
.auto-hours-row{background:#f8fbff}
.auto-hours-row .normal{font-weight:700}
#hourRows .daytype{min-width:110px}
@media(max-width:700px){.fixed-days-box{grid-column:1/-1}}

#bookkeepingFrame{
  display:block;
  width:100%;
  min-height:760px;
  height:80vh;
  border:1px solid var(--border,#dbe3ef);
  border-radius:14px;
  background:#fff;
}
@media(max-width:700px){
  #bookkeepingFrame{height:72vh;min-height:600px}
}

.account-gate-icon{font-size:44px;text-align:center;margin-bottom:8px}
.pending-employee-card{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:14px 18px;
  margin-bottom:14px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.pending-employee-card b{font-size:24px}
.pending-employee-card.has-pending{
  border-color:#e7b844;
  background:#fff9e8;
}
.approval-request-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
}
.approval-request-grid>div{
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
.approval-request-grid span{display:block;font-size:12px;margin-bottom:4px}
.approval-request-grid b{display:block;overflow-wrap:anywhere}

#hourRows tr.locked-row{
  background:#f1f5f9;
  color:#64748b;
}
#hourRows tr.locked-row input,
#hourRows tr.locked-row select{
  background:#e8edf3;
  cursor:not-allowed;
}

.pending-hours-banner{
  margin:14px 20px 0;
  padding:12px 16px;
  border:1px solid #f0c36d;
  background:#fff8e6;
  border-radius:12px;
  color:#5f4500;
}
.pending-hours-banner div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.pending-hours-banner.hidden{display:none}


/* ================================================================
   TIMNEXA 3.4.7 — Professional SaaS / admin layout
   Functional behaviour is unchanged.
   ================================================================ */

:root{
  --sidebar-width:248px;
  --surface-soft:#f8fafc;
  --surface-hover:#eef4ff;
  --nav-text:#42526b;
  --nav-active:#1f4fbf;
  --nav-active-soft:#e9f0ff;
}

body{
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  letter-spacing:-.005em;
}

/* Compact professional top bar */
header{
  padding:0;
  min-height:88px;
  display:flex;
  align-items:center;
  background:linear-gradient(110deg,#14377f 0%,#2456c7 100%);
  border-bottom:1px solid rgba(255,255,255,.12);
  box-shadow:0 3px 15px rgba(15,23,42,.12);
}
.head{
  width:100%;
  max-width:none;
  padding:16px 28px;
}
.brand{
  font-size:24px;
  letter-spacing:.01em;
}
.brand small{
  margin-top:3px;
  font-size:12px;
}
.brand::before{
  width:38px;
  height:38px;
  border-radius:11px;
}
.user{
  display:grid;
  grid-template-columns:auto auto;
  grid-template-areas:
    "language language"
    "identity theme";
  align-items:center;
  column-gap:12px;
  row-gap:2px;
  min-width:260px;
}
.user select{
  grid-area:language;
  min-width:200px;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.25);
  background:#fff;
  color:#162033;
  border-radius:10px;
  font-weight:650;
}
.user > div:not(:last-child){
  grid-area:identity;
}
.user .btn,
.user button{
  grid-area:theme;
}

/* Full-width app canvas */
main{
  max-width:none;
  margin:0;
  padding:0;
}

/* App becomes a genuine sidebar layout on desktop. */
#app{
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  column-gap:0;
  min-height:calc(100vh - 88px);
}

/* Every application page occupies the content column. */
#app > section:not(#nav),
#app > div:not(#nav){
  grid-column:2;
  min-width:0;
  margin:0;
  padding:24px 28px 34px;
}

/* Left navigation */
#nav{
  grid-column:1;
  grid-row:1 / span 100;
  position:sticky;
  top:0;
  align-self:start;
  height:calc(100vh - 88px);
  overflow-y:auto;
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:4px;
  padding:20px 14px;
  margin:0;
  background:var(--panel);
  border-right:1px solid var(--line);
  box-shadow:5px 0 20px rgba(15,23,42,.035);
  z-index:20;
  scrollbar-width:thin;
}

#nav .btn{
  position:relative;
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:0;
  padding:10px 13px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--nav-text);
  font-size:14px;
  font-weight:650;
  text-align:left;
  white-space:normal;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
#nav .btn:hover{
  background:var(--surface-hover);
  color:#173a72;
}
#nav .btn.active,
#nav .btn.primary.active{
  background:var(--nav-active-soft);
  color:var(--nav-active);
  box-shadow:none;
}
#nav .btn.active::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:var(--nav-active);
}
#nav .btn.danger{
  margin-top:8px;
  background:transparent;
  color:#b42318;
}
#nav .btn.danger:hover{
  background:#fff0ee;
}

/* Dashboard: stronger visual hierarchy */
#dashboardPage{
  background:var(--bg);
}
#dashboardPage > .card:first-of-type{
  border:1px solid var(--line);
  box-shadow:0 2px 8px rgba(15,23,42,.035);
}

.stats{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px;
}
.stat{
  position:relative;
  min-height:108px;
  padding:18px 18px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  box-shadow:0 2px 8px rgba(15,23,42,.035);
  overflow:hidden;
}
.stat::after{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:3px;
  background:linear-gradient(90deg,var(--brand),color-mix(in srgb,var(--brand) 45%,white));
  opacity:.82;
}
.stat > span,
.stat:not(:has(span)) {
  color:inherit;
}
.stat{
  color:var(--muted);
  font-size:14px;
  line-height:1.35;
}
.stat b{
  color:var(--text);
  font-size:27px;
  font-weight:750;
  letter-spacing:-.025em;
  margin-top:8px;
}

/* General cards less "bubbly", more enterprise */
.card{
  border-radius:12px;
  padding:20px;
  margin-bottom:16px;
  border-color:var(--line);
  box-shadow:0 2px 9px rgba(15,23,42,.035);
}
.card h2{
  font-size:22px;
  letter-spacing:-.02em;
}
.card h3{
  font-size:17px;
}

.listitem{
  border-radius:10px;
  background:var(--panel);
  box-shadow:0 1px 3px rgba(15,23,42,.025);
}

.btn{
  border-radius:8px;
  padding:9px 14px;
  font-weight:650;
  box-shadow:none;
}
.btn.primary,.btn.active{
  box-shadow:0 1px 2px rgba(15,23,42,.09);
}
.btn:hover:not(:disabled){
  transform:translateY(-1px);
}

input,select,textarea{
  border-radius:8px;
  min-height:40px;
}
textarea{
  min-height:82px;
}

/* Dashboard introduction card */
#dashboardPage .card:last-child{
  padding:22px;
}
#dashboardPage .card:last-child h2{
  font-size:21px;
}

/* Pending employee banner */
.pending-employee-card{
  margin:0 0 16px;
  min-height:62px;
  padding:15px 18px;
  border-radius:11px;
  box-shadow:0 2px 8px rgba(15,23,42,.03);
}
.pending-employee-card b{
  font-size:22px;
}

/* Content pages have a consistent readable width but still use space well. */
#app > section:not(#dashboardPage):not(#nav){
  width:100%;
}

/* Footer lines up with desktop content instead of full page. */
.app-footer{
  max-width:none;
  margin:0;
  padding:18px 28px 24px calc(var(--sidebar-width) + 28px);
  border-top:1px solid var(--line);
  background:var(--bg);
}

/* Dark mode refinements */
html[data-theme=dark]{
  --surface-soft:#111a29;
  --surface-hover:#1c2940;
  --nav-text:#b7c5da;
  --nav-active-soft:#20345f;
}
html[data-theme=dark] #nav{
  box-shadow:5px 0 20px rgba(0,0,0,.08);
}
html[data-theme=dark] .stat::after{
  opacity:.9;
}

/* Medium desktop/tablet */
@media (max-width:1180px) and (min-width:801px){
  :root{--sidebar-width:218px}
  #app > section:not(#nav),
  #app > div:not(#nav){
    padding:20px 22px 30px;
  }
  .stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* Mobile/tablet keeps a compact horizontal navigation. */
@media(max-width:800px){
  header{
    min-height:auto;
  }
  .head{
    padding:13px 15px;
  }
  .user{
    display:flex;
    min-width:0;
    flex-direction:column;
    align-items:flex-end;
  }
  .user select{
    min-width:185px;
  }

  #app{
    display:block;
    min-height:0;
  }

  #nav{
    position:sticky;
    top:0;
    height:auto;
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    gap:6px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:10px 12px;
    border-right:0;
    border-bottom:1px solid var(--line);
    box-shadow:0 4px 12px rgba(15,23,42,.04);
    background:var(--panel);
  }
  #nav .btn{
    width:auto;
    min-width:max-content;
    min-height:38px;
    padding:8px 12px;
    white-space:nowrap;
  }
  #nav .btn.active::before{
    left:10px;
    right:10px;
    top:auto;
    bottom:0;
    width:auto;
    height:3px;
    border-radius:3px 3px 0 0;
  }
  #nav .btn.danger{
    margin-top:0;
  }

  #app > section:not(#nav),
  #app > div:not(#nav){
    padding:16px 12px 26px;
  }

  .stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .stat{
    min-height:94px;
    padding:15px;
  }
  .stat b{
    font-size:23px;
  }

  .app-footer{
    padding:16px 12px 22px;
  }
}

@media(max-width:520px){
  .stats{
    grid-template-columns:1fr;
  }
}


/* ================================================================
   TIMNEXA 3.4.8 — Inklapbare zijbalk
   ================================================================ */
.sidebar-toggle{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:0 0 10px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-soft);
  color:var(--nav-text);
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.sidebar-toggle:hover{
  background:var(--surface-hover);
  color:var(--nav-active);
}
.sidebar-toggle-icon{
  font-size:22px;
  line-height:1;
  font-weight:500;
}

/* Desktop collapsed state */
@media(min-width:801px){
  html.sidebar-collapsed{
    --sidebar-width:76px;
  }

  html.sidebar-collapsed #nav{
    padding-left:10px;
    padding-right:10px;
  }

  html.sidebar-collapsed #nav .btn{
    min-height:44px;
    justify-content:center;
    padding:10px 7px;
    font-size:0;
    overflow:hidden;
  }

  /* Show a compact generated initial/icon when labels are hidden */
  html.sidebar-collapsed #nav .btn::after{
    content:attr(data-short);
    font-size:13px;
    font-weight:800;
    color:inherit;
  }

  html.sidebar-collapsed #nav .btn.active::before{
    top:8px;
    bottom:8px;
  }

  html.sidebar-collapsed .sidebar-toggle{
    width:44px;
    align-self:center;
    padding:7px;
  }

  html.sidebar-collapsed .sidebar-toggle-text{
    display:none;
  }

  html.sidebar-collapsed .app-footer{
    padding-left:104px;
  }
}

/* On mobile the side-menu behavior is intentionally disabled. */
@media(max-width:800px){
  .sidebar-toggle{
    display:none;
  }
}


/* TIMNEXA 3.4.9 — sidebar toggle fix */
@media(min-width:801px){
  #nav .sidebar-toggle{
    position:sticky;
    top:0;
    z-index:5;
    flex:0 0 auto;
    background:var(--panel);
    border-color:var(--line);
  }

  html.sidebar-collapsed #nav{
    width:76px;
    min-width:76px;
  }

  html.sidebar-collapsed #nav .btn:not(.sidebar-toggle){
    border-radius:9px;
  }

  html.sidebar-collapsed #nav .btn:not(.sidebar-toggle)::after{
    content:attr(data-short);
    display:flex;
    align-items:center;
    justify-content:center;
    width:28px;
    min-width:28px;
    height:28px;
    font-size:18px;
    line-height:1;
  }

  html.sidebar-collapsed .sidebar-toggle{
    position:relative;
    width:46px;
    min-width:46px;
    height:42px;
    margin:0 auto 10px;
    background:var(--nav-active-soft);
    color:var(--nav-active);
    border-color:color-mix(in srgb,var(--nav-active) 25%,var(--line));
  }

  html.sidebar-collapsed .sidebar-toggle-icon{
    font-size:28px;
  }
}

/* Let user immediately see the control on the expanded sidebar. */
.sidebar-toggle{
  color:var(--nav-active);
  background:var(--nav-active-soft);
}

/* TIMNEXA 3.5.1 compliance */
.compliance-ok{border-left:4px solid #14804a}
.compliance-attention{border-left:4px solid #b7791f}
.compliance-action{border-left:4px solid #b42318}
.metric small{display:block;margin-top:8px;color:var(--muted)}
@media print{
  #nav,header,.cookie-banner,.sidebar-toggle,.btn{display:none!important}
  #app{display:block!important}
  .page{display:block!important}
}
