/* Afkrydsning V2 - samlet UI og PHP-backend (test). Baseline: PWA prototype v0.8. */
:root{--green:#087b67;--mint:#087b67;--line:#dce5e9;--ink:#162b34;--muted:#667a85}
html{scrollbar-gutter:stable;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden;font-size:15px}
.prototype-ribbon{letter-spacing:.025em}
.app-shell{min-height:calc(100vh - 28px)}
.sidebar .brand{text-decoration:none;color:#fff;line-height:1.35}
.sidebar .brand small{display:block;color:#b1cdd4;font-weight:400}
.side-nav a{display:flex;align-items:center;gap:11px;text-decoration:none;color:#d6e7eb;border-radius:10px;padding:12px 14px;font-weight:650}
.side-nav a:hover,.side-nav a.active{background:#2a5663;color:#fff}
.sidebar-bottom .avatar{flex-shrink:0}
.main-shell{width:100%;min-width:0}
.main-shell .content{max-width:none;width:100%;margin:0;padding:28px 30px 95px}
.main-shell .page-header{margin-bottom:20px}
.main-shell .page-header h1{font-size:clamp(24px,2.3vw,30px);margin:0}
.main-shell .card{margin-bottom:17px;border:1px solid #e2e9eb;padding:23px;border-radius:15px;min-width:0;box-shadow:0 10px 24px rgba(22,46,58,.045)}
.main-shell .card h2{font-size:18px;margin:0 0 18px}
.main-shell .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.main-shell .grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.main-shell .field{display:flex;flex-direction:column;gap:7px;font-weight:650;margin-bottom:17px;min-width:0;width:100%}
.main-shell .field span{font-size:13px;color:#48616c;font-weight:720}
.main-shell .field input,.main-shell .field select,.main-shell .field textarea{font-size:16px;width:100%;max-width:100%;min-width:0;min-height:49px;box-sizing:border-box}
.main-shell input[type=date],.main-shell input[type=time]{min-width:0;width:100%;max-width:100%}
.main-shell .btn,.public-content .btn{font-size:14px;min-height:46px;background:#087b67;color:white}
.main-shell .btn.ghost,.public-content .btn.ghost{background:white;color:#163b48;border:1px solid #cedce1}
.main-shell .check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.main-shell .check-row{background:white;min-height:52px;gap:11px;font-size:14px;border-radius:10px}
.main-shell .check-row input{accent-color:#087b67;min-width:22px;min-height:22px}
.main-shell .split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.main-shell .notice{display:block;margin-bottom:15px}
.main-shell .toolbar{justify-content:initial}
.main-shell .table-wrapper{overflow-x:auto;min-width:0}
.main-shell table:not(.attendance-matrix){min-width:520px}
.main-shell .narrow{max-width:580px}
.main-shell .card:has(#meeting-dept){border-left:4px solid var(--mint)}
.main-shell .card:has(#meeting-dept) .field{margin-bottom:0}
.main-shell .card:has(#badge-search){padding-top:16px}
.main-shell .card:has(#badge-search) h2{margin-bottom:9px}
.main-shell .card:has(#badge-search) .badge-tile{background:#f7faf9}
.main-shell .card:has(#badge-search) #badge-selected{margin-top:14px}
.main-shell .card:has(#use-rooms) .check-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.main-shell .card:has(#scout-list) .check-grid,.main-shell .card:has(#leaders-list) .check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.main-shell .card:has(#meeting-form){max-width:none}
.main-shell .actions{justify-content:flex-end}
.main-shell .attendance-matrix{min-width:900px}
.public-bar{padding:0 24px}
.brand-public{text-decoration:none;color:var(--ink)}
.brand-public .top-logo{display:flex}
.public-content{width:min(100% - 30px,580px);margin:7vh auto 45px;padding:0}
.public-content .card{width:100%;max-width:580px;border-radius:16px}
.public-content .field input,.public-content .field select{font-size:16px}
.top-actions form{margin:0}
.top-actions .user-chip{font-weight:650;color:#234753;text-decoration:none;font-size:13px}
.top-actions .signout{background:#fff;color:#163b48;min-height:37px;font-size:12px;padding:6px 10px}
.topbar .top-logo{display:flex}
.topbar .top-left strong{font-size:17px}
.mobile-tabs a{text-decoration:none;min-height:63px;border:0;background:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;font-size:10px;font-weight:750;color:var(--muted)}
.mobile-tabs a span{font-size:22px;line-height:27px;font-weight:400}
.mobile-tabs a.active{color:var(--mint)}
@media(max-width:1100px){.main-shell .content{padding:23px 21px 95px}}
@media(max-width:760px){
  .main-shell .content{padding:20px 13px 105px}
  .main-shell .card{padding:17px 14px;margin-bottom:13px}
  .main-shell .grid,.main-shell .grid.three{grid-template-columns:1fr}
  .main-shell .check-grid,.main-shell .card:has(#scout-list) .check-grid,.main-shell .card:has(#leaders-list) .check-grid{grid-template-columns:1fr}
  .main-shell .card:has(#use-rooms) .check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .main-shell .split{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .main-shell .field input[type=date]{max-width:100%;padding-left:4px;padding-right:4px}
  .main-shell .page-header{margin-bottom:16px}
  .main-shell .card:has(#meeting-form) .actions{position:sticky;bottom:68px;background:#fff}
  .top-actions{gap:6px}
  .top-actions .user-chip,.top-actions .connectivity span:last-child{display:none}
  .top-actions .signout{font-size:12px;padding:7px}
  .topbar{padding:0 12px}
  .public-content{margin:28px auto;padding:0 0 30px}
}
@media(max-width:370px){.main-shell .card:has(#use-rooms) .check-grid{grid-template-columns:1fr}}
/* Tours and joint-event registration v1.0 */
[hidden]{display:none!important}
.event-day-tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 14px;scrollbar-width:thin}
.event-day-tab{flex:0 0 auto;min-width:74px;background:#f5faf9;border:1px solid #c6d8d6;padding:10px 12px;border-radius:10px;font:inherit;color:#294a50;cursor:pointer}
.event-day-tab.active{background:#087f6d;color:white;border-color:#087f6d;font-weight:700}
.event-actions{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.event-actions .field{margin:0;min-width:145px}
.event-day-title,.event-group-heading,.event-day-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin:15px 0}
.event-day-title h3{margin:0}
.event-group-heading{margin:14px 0 8px}
.event-group-heading button{font-size:14px;padding:7px 10px}
.event-department{margin-bottom:18px}
.event-alphabetical{grid-template-columns:repeat(2,minmax(0,1fr))}
.event-day-panel .check-grid{margin:12px 0}
.event-day-panel .check-row{background:#fff}
.event-day-footer{border-top:1px solid #d7e2e7;padding-top:16px}
.event-day-tab:focus-visible{outline:3px solid #3ba98f}
@media(max-width:700px){.event-actions .field{min-width:100%;}.event-day-title h3{font-size:20px}.event-alphabetical{grid-template-columns:1fr}.event-day-tab{min-width:64px;padding:8px}}

/* Stable 50/50 date controls on Safari/iOS: text is fixed-width, native picker remains accessible. */
.event-date-control{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-width:100%;min-width:0;height:49px;border:1px solid #bfd0d8;border-radius:10px;overflow:hidden;background:#fff;isolation:isolate}
.event-date-control:focus-within{outline:2px solid #087b67;outline-offset:1px}
.event-date-display{display:block;min-width:0;max-width:100%;pointer-events:none;font-size:16px;line-height:1.2;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px;font-variant-numeric:tabular-nums}
.main-shell .event-date-control input[type=date]{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;max-width:100%;padding:0;border:0;margin:0;opacity:0;z-index:1;cursor:pointer;font-size:16px}
@media(max-width:370px){.event-date-display{font-size:14px;letter-spacing:-.02em}}

/* Afkrydsning V2 - R3 UX corrections */
.main-shell .more-admin-links{display:grid;gap:10px}
.main-shell .more-admin-link{display:grid;grid-template-columns:minmax(0,1fr) 20px;gap:0 10px;padding:15px 14px;border:1px solid #d7e2e7;border-radius:12px;text-decoration:none;color:#183941;background:#f9fcfb}
.main-shell .more-admin-link strong{grid-column:1;font-size:16px}
.main-shell .more-admin-link span{grid-column:1;font-size:13px;color:#59727c}
.main-shell .more-admin-link b{grid-column:2;grid-row:1/span 2;font-size:26px;align-self:center;color:#087b67}
.main-shell .event-save-card #event-save:disabled{background:#d8e0e3!important;color:#637782!important;border:1px solid #c7d2d7!important;box-shadow:none;opacity:1;cursor:not-allowed}
.main-shell .event-save-card #event-save:not(:disabled){background:#087b67!important;color:#fff!important}
.main-shell .event-save-card #event-progress{font-weight:750;margin-bottom:4px}
.main-shell .event-save-card #event-save-help{margin:0 0 14px}
.main-shell .event-day-validation{margin:12px 0}
/* Desktop: show real native date control and calendar picker icon, not an invisible overlay. */
@media (pointer:fine){
  .main-shell .event-date-control{overflow:visible}
  .main-shell .event-date-control .event-date-display{display:none}
  .main-shell .event-date-control input[type=date]{position:relative;inset:auto;opacity:1;width:100%;height:49px;background:transparent;border:0;display:block;padding:8px 12px;cursor:text}
}
/* A mobile keyboard must not obscure the badge search. */
#badge-search,#leader-search,#event-search,.event-leader-search{scroll-margin-top:110px;scroll-margin-bottom:40vh}
#badge-results,#leader-results{max-height:min(240px,30dvh);overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){body.search-keyboard-open .mobile-tabs{visibility:hidden;pointer-events:none}}

.main-shell .event-basic-dates.single-date{grid-template-columns:minmax(0,1fr);max-width:430px}

@media(max-width:760px){body.search-keyboard-open .main-shell .content{padding-bottom:calc(var(--afk-keyboard-inset,300px) + 125px)}}

/* R4: meeting date must occupy exactly one input row on iOS Safari and desktop. */
.main-shell #meeting-form .meeting-date-control{display:flex;width:100%;height:49px;min-height:49px;max-height:49px;min-width:0;padding:0;margin:0;box-sizing:border-box}
.main-shell #meeting-form .meeting-date-control input[type=date]{height:100%;min-height:0;max-height:49px;line-height:normal;box-sizing:border-box}
.main-shell #meeting-form .field:has(#meeting-date){min-width:0;max-width:100%;}
.main-shell .import-ready{background:#f1faf5}.main-shell .import-skip{background:#f8f8f8}.main-shell .import-error{background:#fff2ef}
.main-shell .import-skip .hint,.main-shell .import-error .hint{font-size:12px;margin:4px 0 0}
.main-shell #member-import-form textarea{height:auto;min-height:140px;font:14px/1.5 ui-monospace,monospace;resize:vertical}
@media(max-width:760px){.prototype-ribbon{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* R7: programme cards and scout activity history */
.badge-programme-row{border-bottom:1px solid #d7e2e7;padding:14px 0;display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.badge-programme-row details{min-width:min(100%,230px)}
.stats-event-details{border-bottom:1px solid #d7e2e7;padding:12px 0}
.stats-event-details summary{cursor:pointer;white-space:normal}
.stats-event-details li{margin:7px 0}
.main-shell .toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px}

/* R8: persistent working department. A filter, never an authorization check. */
.department-context-bar{background:#f8fbfb;border-bottom:1px solid #d8e4e7;padding:8px 28px;position:relative;z-index:5}
.department-context-bar form{display:flex;align-items:center;justify-content:flex-end;gap:11px;margin:0}
.department-context-bar label{font-size:13px;color:#47646d;font-weight:750;white-space:nowrap}
.department-context-bar select{font:600 14px system-ui,-apple-system,sans-serif;min-height:38px;border:1px solid #afc6ca;border-radius:9px;background:#fff;color:#173d43;min-width:130px;max-width:320px;width:min(34vw,270px);padding:6px 12px}
.optional-leader-search{border:1px solid #d7e2e7;border-radius:12px;margin-top:14px;padding:12px 15px;background:#f8fbfa}
.optional-leader-search summary{cursor:pointer;font-weight:700;color:#087b67}
.optional-leader-search>div{margin-top:15px}
.attendance-filters .field{margin-bottom:12px}
.register-actions{display:flex;gap:9px;align-items:center;flex-wrap:nowrap}
.register-actions .btn{padding:7px 12px;min-height:38px;font-size:13px}
.department-table .btn{padding:8px 12px;min-height:38px;font-size:13px}
@media(max-width:760px){
  .department-context-bar{padding:7px 13px}
  .department-context-bar form{justify-content:space-between}
  .department-context-bar select{width:min(63vw,260px);max-width:none}
  .attendance-register-table{min-width:720px}
}
@media(min-width:761px) and (max-width:1100px){.app-shell{overflow-x:clip}}

/* R9: Luft mellem desktop-menuens hover- og active-flader. */
@media(min-width:901px){.side-nav>a{margin:3px 0;padding:9px 12px;min-height:37px}.side-nav .nav-ico{font-size:19px;width:23px}.side-nav>.nav-group-title{margin-top:7px}}

/* R9 kontaktpersoner */
.contact-rows{display:grid;gap:12px;margin:12px 0}.contact-row{border:1px solid #dce5e9;padding:13px;border-radius:11px}.contact-row strong{display:block;margin-bottom:9px}.contact-row>.field{margin-top:10px}

/* R9 HF2 / v1.0.11 – statistik og mobilheader */
/* Lad tabelkolonner beregnes af deres indhold. Navnekolonnen fastlåses,
   men procentkolonnen skal følge de øvrige kolonner ved vandret scroll. */
.main-shell .stats-matrix-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.main-shell .stats-matrix-scroll:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
.main-shell .attendance-matrix{width:max-content;min-width:0;max-width:none;table-layout:auto;border-spacing:3px}
.main-shell .attendance-matrix th,.main-shell .attendance-matrix td{padding:8px 7px;white-space:nowrap}
.main-shell .attendance-matrix .sticky-name{position:sticky;left:0;min-width:0;max-width:none;width:1%;padding:8px 11px;text-align:left;white-space:nowrap;z-index:4;overflow:visible;text-overflow:clip;box-shadow:2px 0 5px rgba(22,46,58,.09)}
.main-shell .attendance-matrix .sticky-percent{position:static;left:auto;min-width:0;max-width:none;width:1%;padding:8px 6px;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums;box-shadow:none;z-index:auto}
.main-shell .attendance-matrix thead .sticky-name{z-index:5}
.main-shell .attendance-matrix thead .sticky-percent{z-index:auto}
/* To selvstændige rækker giver identiske inputhøjder, også i iOS Safari. */
.main-shell .stats-filter-form{display:block}
.main-shell .stats-filter-dates,.main-shell .stats-filter-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.main-shell .stats-filter-dates{margin-bottom:12px}
.main-shell .stats-filter-dates .field{margin:0;min-width:0}
.main-shell .stats-filter-dates input[type=date]{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:44px;height:44px;max-height:44px;margin:0;padding:7px 9px;line-height:normal;font-size:16px;-webkit-appearance:auto;appearance:auto}
.main-shell .stats-filter-actions .btn{min-width:0;min-height:44px;white-space:normal;text-align:center}
/* Profilmenuen er mobil-only; desktop har fortsat normal konto og log ud. */
.mobile-profile-menu{display:none;position:relative}
@media(max-width:760px){
  .main-shell>.topbar{background:#087b67;border-bottom-color:#066d5a;color:#fff}
  .main-shell>.topbar .top-left strong,.main-shell>.topbar .top-left small{color:#fff}
  .main-shell>.topbar .top-left small{opacity:.83}
  .main-shell>.topbar .top-logo{background:#fff;color:#087b67}
  .main-shell>.topbar .connectivity{color:#fff}
  .main-shell>.topbar .connectivity .dot{background:#c6f7e1}
  .main-shell>.topbar .connectivity.offline .dot{background:#ffb89c}
  .main-shell>.topbar .connectivity.offline{color:#fff}
  .main-shell .top-actions .desktop-signout{display:none}
  .main-shell .top-actions .mobile-profile-menu{display:block}
  .main-shell .mobile-profile-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid rgba(255,255,255,.65);background:rgba(255,255,255,.12);color:#fff;border-radius:50%;cursor:pointer;touch-action:manipulation}
  .main-shell .mobile-profile-menu>summary::-webkit-details-marker{display:none}
  .main-shell .mobile-profile-menu>summary:focus-visible{outline:3px solid #fff;outline-offset:3px}
  .main-shell .mobile-profile-menu[open]>summary{background:#fff;color:#087b67}
  .main-shell .mobile-profile-dropdown{position:absolute;top:calc(100% + 11px);right:0;width:min(280px,calc(100vw - 24px));z-index:60;background:#fff;color:#173d43;border:1px solid #cddce0;border-radius:12px;box-shadow:0 12px 35px rgba(0,0,0,.21);padding:6px}
  .main-shell .mobile-profile-identity{padding:11px 12px 12px;border-bottom:1px solid #dce5e9;margin-bottom:5px;overflow-wrap:anywhere}
  .main-shell .mobile-profile-identity strong,.main-shell .mobile-profile-identity small{display:block}
  .main-shell .mobile-profile-identity small{color:#617781;font-size:12px;margin-top:3px}
  .main-shell .mobile-profile-dropdown>a,.main-shell .mobile-profile-dropdown button{display:block;width:100%;background:transparent;border:0;padding:12px;color:#183941;font-size:14px;font-weight:650;text-align:left;text-decoration:none;border-radius:7px}
  .main-shell .mobile-profile-dropdown>a:hover,.main-shell .mobile-profile-dropdown button:hover,.main-shell .mobile-profile-dropdown>a:focus-visible,.main-shell .mobile-profile-dropdown button:focus-visible{background:#edf6f2}
  .main-shell .mobile-profile-dropdown form{margin:0}
  .main-shell .stats-export-button{display:none}
  .main-shell .stats-filter-dates,.main-shell .stats-filter-actions{gap:10px}
  .main-shell .stats-filter-dates .field{margin:0}
  .main-shell .stats-filter-dates input[type=date]{height:44px;min-height:44px;max-height:44px;padding:7px 5px}
  .main-shell .stats-filter-actions .btn{padding:9px 6px;font-size:13px}
  .main-shell .attendance-matrix .sticky-name{min-width:0;max-width:none;width:1%;white-space:nowrap}
  .main-shell .attendance-matrix .sticky-percent{min-width:0;max-width:none;width:1%;white-space:nowrap;padding:8px 5px}
}

/* R10 v1.0.12: stable compact date fields in room usage, promotions and badge forms. */
.main-shell .afk-date-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.main-shell .afk-date-pair>.field{min-width:0;max-width:100%;margin:0}
.main-shell .afk-date-pair input[type="date"],
.main-shell .promotion-date-form input[type="date"]{
  display:block;box-sizing:border-box;inline-size:100%;max-inline-size:100%;min-inline-size:0;
  block-size:46px;min-block-size:46px;max-block-size:46px;
  margin:0;padding:7px 9px;line-height:normal;font-size:16px;
  -webkit-appearance:auto;appearance:auto;
}
.main-shell .room-summary-total th,.main-shell .room-summary-total td{font-variant-numeric:tabular-nums;background:#edf7f2;color:#115c50;font-weight:800;border-top:2px solid #a9cdc0}
.main-shell .room-summary-total th:first-child{text-align:left}
@media(max-width:760px){
  .main-shell .afk-date-pair{gap:10px;margin-bottom:14px}
  .main-shell .afk-date-pair input[type="date"],.main-shell .promotion-date-form input[type="date"]{block-size:44px;min-block-size:44px;max-block-size:44px;padding:7px 5px}
  .main-shell .promotion-date-form>.field{min-width:0;max-width:100%}
  .main-shell .promotion-date-form #promotion-date{width:100%}
}
/* R10 menu: clear hierarchy, do not place adjacent hover backgrounds together. */
@media(min-width:761px){.main-shell .dashboard-kpi{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}
.dashboard-kpi{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.main-shell .dashboard-kpi .card{margin:0;padding:16px}
.dashboard-kpi strong{display:block;font-size:25px;color:#0b6956;font-variant-numeric:tabular-nums}
.dashboard-kpi span{display:block;font-size:12px;color:#556e76;margin-top:5px}
.dashboard-actions{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:760px){.dashboard-kpi{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.main-shell .dashboard-kpi .card{padding:13px}.dashboard-kpi strong{font-size:22px}}

/* R10 navigation: scrolling sidebar on small-height desktop windows. */
@media(min-width:761px){
 .sidebar>.side-nav{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1;overscroll-behavior:contain;padding-bottom:10px;scrollbar-width:thin}
 .sidebar .side-nav>a{margin:4px 0;padding:9px 12px;min-height:37px}
 .sidebar .side-nav>.nav-group-title{padding:15px 11px 6px;margin-top:3px}
 .sidebar .sidebar-bottom{flex-shrink:0}
}

/* All three room-summary columns should remain visible on narrow phones. */
.main-shell table.room-usage-table{width:100%;min-width:0;table-layout:auto}
.main-shell table.room-usage-table th,.main-shell table.room-usage-table td{padding:9px 7px}
.main-shell table.room-usage-table th:not(:first-child),.main-shell table.room-usage-table td:not(:first-child){text-align:right;white-space:nowrap}
@media(max-width:400px){.main-shell table.room-usage-table{font-size:12px}.main-shell table.room-usage-table th,.main-shell table.room-usage-table td{padding:9px 5px}}

/* R11 v1.0.13: korte, sammenklappelige desktopgrupper i stedet for en lang scrollbar. */
@media(min-width:761px){
 .sidebar>.side-nav{scrollbar-width:none;overflow-y:auto;overflow-x:hidden;min-height:0;}
 .sidebar>.side-nav::-webkit-scrollbar{display:none}
 .sidebar .side-nav>a{min-height:36px;padding:9px 12px;margin:4px 0}
 .sidebar .nav-dropdown{margin:5px 0;border-radius:10px}
 .sidebar .nav-dropdown>summary{display:flex;align-items:center;gap:11px;padding:9px 12px;min-height:36px;border-radius:10px;font-size:14px;font-weight:700;color:#d6e7eb;cursor:pointer;list-style:none}
 .sidebar .nav-dropdown>summary::-webkit-details-marker{display:none}
 .sidebar .nav-dropdown>summary:hover,.sidebar .nav-dropdown[open]>summary{background:#2a5663;color:#fff}
 .sidebar .nav-chevron{margin-left:auto;display:inline-block;transition:transform .18s}
 .sidebar .nav-dropdown[open] .nav-chevron{transform:rotate(180deg)}
 .sidebar .nav-dropdown-items{display:grid;gap:2px;padding:3px 0 4px 25px}
 .sidebar .nav-dropdown-items a{display:block;min-height:33px;padding:8px 10px;font-size:13px;border-radius:8px;font-weight:580;color:#d6e7eb;text-decoration:none}
 .sidebar .nav-dropdown-items a:hover,.sidebar .nav-dropdown-items a.active{background:#2a5663;color:#fff}
 .sidebar .nav-dropdown>summary:focus-visible,.sidebar .nav-dropdown-items a:focus-visible{outline:2px solid #c9f2e6;outline-offset:1px}
}
/* R11 dashboard: 2 x 2 datadrevne diagrammer. */
.dashboard-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:18px 0 20px}
.main-shell .dashboard-chart-card{padding:18px 18px 12px;margin:0}
.dashboard-chart-card h2{margin-bottom:4px!important;font-size:17px!important}
.dashboard-chart-card>.hint{font-size:12px;min-height:19px;margin:0 0 12px}
.dashboard-chart-scroll{width:100%;overflow-x:auto;overflow-y:hidden}
.dashboard-chart-scroll svg{min-width:550px;width:100%;height:auto;display:block}
.dashboard-chart-scroll .axis{fill:#627783;font-size:11px;font-family:system-ui,sans-serif}
.dashboard-chart-scroll .label-strong{fill:#214b55;font-weight:700}
.dashboard-chart-scroll:focus-visible{outline:2px solid #087b67}
.dashboard-chart-legend{display:flex;gap:9px 14px;flex-wrap:wrap;margin:0 0 8px;color:#506974;font-size:11px}
.dashboard-chart-legend span,.dashboard-donut-legend span{display:inline-flex;align-items:center;gap:6px}
.dashboard-chart-legend i,.dashboard-donut-legend i{display:inline-block;width:11px;height:11px;border-radius:2px;flex:none}
.dashboard-donut{display:grid;grid-template-columns:minmax(145px,.88fr) minmax(150px,1fr);gap:14px;align-items:center}
.dashboard-donut>svg{width:100%;max-height:225px}
.dashboard-donut-legend{min-width:0;font-size:13px}
.dashboard-donut-legend>div{display:flex;justify-content:space-between;gap:10px;margin:9px 0}
.dashboard-donut-legend strong{font-variant-numeric:tabular-nums}
.dashboard-donut .axis{font:13px system-ui,sans-serif;fill:#75838b}
.dashboard-donut .donut-number{font:700 32px system-ui,sans-serif;fill:#173d43}
@media(max-width:1080px){.dashboard-charts{grid-template-columns:1fr}}
@media(max-width:760px){.dashboard-charts{gap:12px}.main-shell .dashboard-chart-card{padding:14px 12px}.dashboard-donut{grid-template-columns:minmax(130px,.9fr) minmax(130px,1fr);gap:8px}.dashboard-donut-legend{font-size:11px}}
/* R13 TTLock people autocomplete */
.ttlock-person-picker{position:relative;max-width:36rem;margin-bottom:1rem}
.ttlock-person-results{position:relative;max-height:17rem;overflow-y:auto;background:var(--surface,#fff);border:1px solid #b9cbc8;border-radius:10px;margin:.4rem 0;box-shadow:0 7px 22px rgba(0,0,0,.1);z-index:10}
.ttlock-person-choice{display:block;width:100%;font:inherit;text-align:left;padding:.7rem .8rem;border:0;background:transparent;color:inherit;cursor:pointer}
.ttlock-person-choice:hover,.ttlock-person-choice:focus{background:#e2f4ef;outline:2px solid #087b67;outline-offset:-2px}
