﻿/* ============================================================
   Personal portal — per-user themeable space (.th-portal).
   The user's saved colours are injected as scoped CSS variables
   in layouts/master.blade.php; these are the default fallbacks so
   the portal renders in the purple palette out of the box.
   ============================================================ */
.th-portal{
  --brand:#7C3AED;
  --brand-2:#610EF1;
  --brand-soft:#EFE9FC;
  background:var(--paper);
  min-height:100vh;
  color:var(--text);
}

/* colour swatches (small rounded chips) */
.th-swatch{width:34px;height:34px;border-radius:9px;border:1px solid var(--line);flex-shrink:0;}
.th-swatch-primary{background:var(--brand);}
.th-swatch-primary-tint{background:color-mix(in srgb, var(--brand) 55%, #fff);}
.th-swatch-accent{background:var(--brand-2);}
.th-swatch-sky{background:var(--sky);}
.th-swatch-gold{background:var(--gold);}
.th-swatch-default-primary{background:#7C3AED;}
.th-swatch-default-accent{background:#610EF1;}

/* solid brand fills / progress */
.th-bg-brand-solid{background:var(--brand);}
.th-fill-66{width:66%;}
.th-bg-soft{background:#FBFAFE;}

/* progress fill widths in 10% steps (department completion bar, etc.) */
.th-fill-0{width:0;}
.th-fill-10{width:10%;}
.th-fill-20{width:20%;}
.th-fill-30{width:30%;}
.th-fill-40{width:40%;}
.th-fill-50{width:50%;}
.th-fill-60{width:60%;}
.th-fill-70{width:70%;}
.th-fill-80{width:80%;}
.th-fill-90{width:90%;}
.th-fill-100{width:100%;}

/* department selector chips */
.th-dept-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;}
.th-dept-chip{text-decoration:none;cursor:pointer;border:1px solid var(--line);color:var(--ink);}
.th-dept-chip:hover{border-color:var(--brand);color:var(--brand-2);}
.th-dept-chip.active{background:var(--brand);color:#fff;border-color:var(--brand);}

/* branding form rows */
.th-brand-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line);}
.th-color-chip{width:42px;height:42px;padding:0;border:1px solid var(--line);border-radius:10px;background:none;cursor:pointer;flex-shrink:0;}
.th-color-chip::-webkit-color-swatch-wrapper{padding:3px;}
.th-color-chip::-webkit-color-swatch{border:none;border-radius:7px;}
.th-color-chip::-moz-color-swatch{border:none;border-radius:7px;}
.th-hex-wrap{position:relative;width:122px;flex-shrink:0;}
.th-hex-hash{position:absolute;left:11px;top:10px;color:var(--muted);font-size:14px;}
.th-hex-input{padding-left:22px;text-transform:uppercase;}

/* quick preset dots (fixed palette swatches) */
.th-preset-dot{width:30px;height:30px;border-radius:9px;border:2px solid var(--line);cursor:pointer;padding:0;}
.th-preset-dot:hover{border-color:var(--ink);}
.th-preset-0{background:#7C3AED;}
.th-preset-1{background:#2563EB;}
.th-preset-2{background:#0E7C66;}
.th-preset-3{background:#C0392B;}
.th-preset-4{background:#E67E22;}
.th-preset-5{background:#0F172A;}
.th-preset-6{background:#E31E24;}
.th-preset-7{background:#0891B2;}

/* ============================================================
   "My Space" portal — top-nav home design (ported from the mockup).
   All brand colour comes from the per-user --brand* vars on .th-portal.
   ============================================================ */
.th-ms-header{position:sticky;top:0;z-index:50;background:var(--surface);border-bottom:1px solid var(--line);}
.th-ms-headinner{max-width:1280px;margin:0 auto;padding:12px 22px;display:flex;align-items:center;gap:18px;}
.th-ms-logo{display:flex;align-items:center;gap:10px;text-decoration:none;}
.th-ms-logo-box{width:34px;height:34px;border-radius:10px;background:var(--brand);display:grid;place-items:center;color:#fff;box-shadow:0 6px 16px -6px var(--brand);flex-shrink:0;}
.th-ms-brand{font-size:19px;font-weight:600;color:var(--ink);line-height:1;}
.th-ms-brandsub{font-size:10px;letter-spacing:.14em;color:var(--muted);font-weight:700;text-transform:uppercase;margin-top:3px;}
.th-ms-nav{display:flex;gap:4px;margin-left:14px;flex-wrap:wrap;}
.th-ms-navitem{display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:14px;padding:8px 12px;border-radius:10px;color:var(--muted);text-decoration:none;transition:all .15s ease;border:none;background:transparent;cursor:pointer;}
.th-ms-navitem:hover{color:var(--ink);background:var(--paper);}
.th-ms-navitem.active{color:var(--brand);background:var(--brand-soft);}
.th-ms-right{margin-left:auto;display:flex;align-items:center;gap:10px;}
.th-ms-seg{display:inline-flex;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:3px;}
.th-ms-seg span{padding:6px 14px;border-radius:8px;font-size:13px;font-weight:600;color:var(--muted);}
.th-ms-seg span.on{background:var(--brand);color:#fff;}
.th-ms-av{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--paper);display:grid;place-items:center;font-weight:700;font-size:14px;color:var(--ink);cursor:pointer;text-transform:uppercase;}

.th-ms-main{flex:1;min-height:0;overflow-y:auto;max-width:1600px;margin:0 auto;padding:26px 32px 70px;width:100%;}
/* Support page: tabs stay fixed, only the active panel (ticket list) scrolls. */
.th-ms-main:has(.th-sup-page){padding-bottom:26px;}
.th-sup-page{display:flex;flex-direction:column;height:100%;}
.th-sup-page .th-lr-tabs{flex-shrink:0;}
.th-sup-panel{flex:1;min-height:0;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none;}
.th-sup-panel::-webkit-scrollbar{width:0;height:0;display:none;}
.th-ms-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 1px 2px rgba(20,20,25,.05),0 8px 28px -12px rgba(20,20,25,.16);}

/* ===== My Space — sidebar shell layout ===== */
.th-ms-shell{display:flex;height:100vh;overflow:hidden;}
.th-ms-aside{width:258px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;padding:18px 14px;transition:width .22s ease,padding .22s ease;}
.th-ms-aside-logo{display:flex;align-items:center;gap:11px;text-decoration:none;padding:6px 8px 16px;overflow:hidden;white-space:nowrap;}
.th-ms-aside-logo-text{overflow:hidden;transition:opacity .15s ease,width .22s ease;}
.th-ms-aside-nav{display:flex;flex-direction:column;gap:3px;}
.th-ms-side-link{position:relative;display:flex;align-items:center;gap:11px;padding:10px 13px;border-radius:11px;color:var(--muted);font-size:14.5px;font-weight:600;text-decoration:none;cursor:pointer;transition:all .15s ease;white-space:normal;line-height:1.25;}
.th-ms-side-link > i{flex-shrink:0;}
.th-ms-side-link:hover{background:var(--paper);color:var(--ink);}
.th-ms-side-link.active{background:var(--brand-soft);color:var(--brand);box-shadow:inset 3px 0 0 var(--brand),0 4px 14px -8px var(--brand);font-weight:700;}
.th-ms-side-link.active i{color:var(--brand);}
.th-ms-shell.sidebar-collapsed .th-ms-side-link.active::before{display:none;}
.th-ms-side-link span{overflow:hidden;transition:opacity .15s ease,width .22s ease;}
.th-ms-side-sep{height:1px;background:var(--line);margin:14px 6px 10px;transition:margin .22s ease;}
.th-ms-side-label{font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:0 8px 6px;overflow:hidden;white-space:nowrap;transition:opacity .15s ease;}

/* collapsed sidebar */
.th-ms-shell.sidebar-collapsed .th-ms-aside{width:64px;padding:18px 8px;overflow:visible;}
.th-ms-shell.sidebar-collapsed .th-ms-aside-logo-text{opacity:0;width:0;pointer-events:none;}
.th-ms-shell.sidebar-collapsed .th-ms-aside-logo{justify-content:center;padding:6px 0 16px;}
.th-ms-shell.sidebar-collapsed .th-ms-aside-nav{overflow:visible;}
.th-ms-shell.sidebar-collapsed .th-ms-side-link{justify-content:center;padding:10px;gap:0;position:relative;}
.th-ms-shell.sidebar-collapsed .th-ms-side-link span.flex-grow-1{opacity:0;width:0;overflow:hidden;position:absolute;}
.th-ms-shell.sidebar-collapsed .th-ms-side-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;font-size:9px;}
.th-ms-shell.sidebar-collapsed .th-ms-side-sep{margin:10px 4px;}
.th-ms-shell.sidebar-collapsed .th-ms-side-label{opacity:0;height:0;padding:0;overflow:hidden;}
/* tooltip on hover when collapsed */
.th-ms-shell.sidebar-collapsed .th-ms-side-link[data-label]:hover::after{content:attr(data-label);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:var(--ink);color:#fff;font-size:12px;font-weight:600;padding:5px 10px;border-radius:8px;white-space:nowrap;z-index:200;pointer-events:none;}
/* profile button in the topbar-right */
.th-ms-userbtn{display:inline-flex;align-items:center;gap:9px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 12px 5px 5px;cursor:pointer;transition:border-color .15s,box-shadow .15s;}
.th-ms-userbtn:hover{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
.th-ms-userbtn .th-ms-av{width:32px;height:32px;flex-shrink:0;}
.th-ms-userbtn-name{font-size:14px;font-weight:600;color:var(--ink);white-space:nowrap;}
.th-ms-userbtn-caret{flex-shrink:0;}
/* dropdown */
.th-ms-usermenu{min-width:248px;overflow:hidden;}
.th-ms-usermenu-head{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--paper);}
.th-ms-usermenu-head .th-ms-av{width:38px;height:38px;flex-shrink:0;}
.th-ms-usermenu-body{padding:8px;}

.th-ms-maincol{flex:1;min-width:0;display:flex;flex-direction:column;height:100vh;overflow:hidden;}
/* A proper top bar across the content column. */
.th-ms-topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:14px;padding:0 26px;height:62px;background:var(--surface);border-bottom:1px solid var(--line);}
.th-ms-topbar-heading{font-size:20px;font-weight:600;color:var(--ink);}
.th-portal[data-theme="dark"] .th-ms-topbar{background:var(--surface);}

@media (max-width:980px){
  .th-ms-aside{position:fixed;left:0;top:0;z-index:70;transform:translateX(-105%);transition:transform .25s ease,width .22s ease,padding .22s ease;box-shadow:0 0 60px rgba(0,0,0,.4);}
  .th-ms-aside.open{transform:none;}
  .th-ms-shell.sidebar-collapsed .th-ms-aside{width:258px;padding:18px 14px;}
  .th-ms-shell.sidebar-collapsed .th-ms-aside-logo-text{opacity:1;width:auto;}
  .th-ms-shell.sidebar-collapsed .th-ms-aside-logo{justify-content:flex-start;padding:6px 8px 16px;}
  .th-ms-shell.sidebar-collapsed .th-ms-side-link{justify-content:flex-start;padding:10px 13px;gap:11px;}
  .th-ms-shell.sidebar-collapsed .th-ms-side-link span.flex-grow-1{opacity:1;width:auto;position:static;}
  .th-ms-shell.sidebar-collapsed .th-ms-side-label{opacity:1;height:auto;padding:0 8px 6px;}
}

/* hero */
.th-ms-hero{padding:26px 28px;position:relative;overflow:hidden;margin-bottom:26px;}
.th-ms-hero-glow{position:absolute;right:-40px;top:-40px;width:220px;height:220px;border-radius:50%;background:var(--brand-soft);opacity:.7;}
.th-ms-hero-row{position:relative;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:18px;}
.th-ms-eyebrow{color:var(--muted);font-weight:600;font-size:14px;}
.th-ms-hero-title{font-size:34px;font-weight:600;margin:2px 0 10px;color:var(--ink);letter-spacing:-.5px;}
.th-ms-hero-p{color:var(--text);max-width:520px;font-size:15px;margin:0;line-height:1.5;}
.th-ms-hero-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap;}
.th-ms-hero-av{width:64px;height:64px;border-radius:50%;border:1px solid var(--line);background:var(--paper);display:grid;place-items:center;font-weight:700;font-size:24px;color:var(--ink);flex-shrink:0;}
.th-c-brand-strong{color:var(--brand);font-weight:700;}

/* kpi grid */
.th-ms-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:14px;margin-bottom:30px;}
.th-ms-kpi{padding:18px 20px 16px;position:relative;overflow:hidden;border-left:4px solid var(--brand-soft);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;}
.th-ms-kpi:hover{transform:translateY(-3px);box-shadow:0 24px 60px -24px rgba(20,20,25,.30);border-left-color:var(--brand);}
.th-ms-kpi-glow{display:none;}
.th-ms-badge{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;color:var(--brand);background:var(--brand-soft);margin-bottom:14px;position:relative;}
.th-ms-num{font-size:32px;font-weight:700;line-height:1;color:var(--ink);position:relative;}
.th-ms-kpi-label{color:var(--muted);font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-top:6px;position:relative;}
/* 5-up KPI row + clickable card with top-right arrow */
.th-ms-kpis-5{grid-template-columns:repeat(5,1fr);}
.th-ms-kpi-top{display:flex;align-items:flex-start;justify-content:space-between;position:relative;}
.th-ms-kpi-top .th-ms-badge{margin-bottom:0;}
.th-ms-kpi-arrow{color:var(--muted);opacity:.45;transition:opacity .15s,transform .15s;}
.th-ms-kpi:hover .th-ms-kpi-arrow{opacity:1;transform:translateX(2px);color:var(--brand);}
.th-ms-kpi .th-ms-num{margin-top:14px;}
@media (max-width:1100px){ .th-ms-kpis-5{grid-template-columns:repeat(3,1fr);} }
@media (max-width:680px){ .th-ms-kpis-5{grid-template-columns:repeat(2,1fr);} }

/* section heading */
.th-ms-sec{margin-bottom:34px;}
.th-ms-sec-head{margin-bottom:14px;}
.th-ms-sec-head-row{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.th-ms-viewall{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--brand);text-decoration:none;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:7px 13px;}
.th-ms-viewall:hover{border-color:var(--brand);background:var(--brand-soft);}

/* sidebar nav badge (e.g. Approvals count) */
.th-ms-side-badge{flex-shrink:0;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--brand);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;}

/* Portal uses Hanken Grotesk — same clean font as the screenshot */
.th-portal, .th-portal *{font-family:'Hanken Grotesk',sans-serif;}

/* ===== User Edit page ===== */
.th-ue-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 24px;}
.th-ue-actions{display:flex;gap:12px;align-items:center;}
@media(max-width:540px){.th-ue-grid{grid-template-columns:1fr;}}

/* ===== User Profile page ===== */
.th-up-header{display:flex;align-items:center;gap:20px;flex-wrap:wrap;overflow:hidden;}
.th-up-head-left{display:flex;align-items:center;gap:18px;flex:1;min-width:0;overflow:hidden;}
.th-up-head-right{display:flex;gap:10px;flex-shrink:0;}
.th-up-av{width:56px;height:56px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:18px;font-weight:700;display:grid;place-items:center;flex-shrink:0;text-transform:uppercase;}
.th-up-meta{display:flex;align-items:center;gap:40px;flex-wrap:wrap;}
.th-up-meta-item{display:flex;flex-direction:column;gap:5px;}
.th-up-meta-k{font-size:10px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);}
.th-up-meta-v{font-size:14px;font-weight:600;color:var(--ink);}
.th-up-name{font-size:14px;font-weight:700;}
/* Active = solid brand, Inactive = plain grey — no border */
.th-pill-active{background:var(--brand);color:#fff;font-weight:700;border:none;}
.th-pill-inactive{background:#EBEBF0;color:#888;font-weight:600;border:none;}
.th-up-tabcard{padding:0;overflow:hidden;}
.th-up-tabs{display:flex;gap:0;padding:0 20px;border-bottom:none;margin-bottom:0;}
.th-up-tabcard [data-uppanel]{padding:16px 0 0;}
.th-up-tabcard .th-table thead tr{background:var(--surface) !important;border-bottom:1px solid var(--line);}
.th-up-tabcard .th-table th{background:transparent !important;color:var(--muted);}
.th-up-tab{font-size:14px;font-weight:600;color:var(--muted);background:none;border:none;border-bottom:2px solid transparent;padding:14px 18px;cursor:pointer;transition:color .15s,border-color .15s;}
.th-up-tab:hover{color:var(--ink);}
.th-up-tab.active{color:var(--brand);border-bottom-color:var(--brand);}
.th-up-tabcard [data-uppanel] .th-table thead tr{background:transparent;}
.th-up-tabcard [data-uppanel] .th-table th{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);background:transparent;}
.th-up-tabcard [data-uppanel] .th-table td.strong{font-weight:700;}

/* ===== Account: Settings page (side-tabs) ===== */
.th-set2{display:flex;gap:18px;align-items:flex-start;}
.th-set2-side{width:240px;flex-shrink:0;padding:10px;display:flex;flex-direction:column;gap:4px;}
.th-set2-tab{display:flex;align-items:center;gap:10px;border:none;background:transparent;font-size:14px;font-weight:600;color:var(--muted);padding:11px 13px;border-radius:11px;cursor:pointer;text-align:left;}
.th-set2-tab:hover{background:var(--paper);color:var(--ink);}
.th-set2-tab.active{background:var(--brand-soft);color:var(--brand);}
.th-set2-main{flex:1;min-width:0;}
.th-set2-label{font-size:13px;font-weight:600;color:var(--ink);margin-bottom:8px;}
.th-set2-themes{display:flex;gap:10px;flex-wrap:wrap;}
.th-set2-logo{display:flex;align-items:center;gap:12px;margin-bottom:18px;}
.th-set2-swatch-row{display:flex;gap:40px;flex-wrap:wrap;margin-bottom:18px;}
.th-set2-swatches{display:flex;gap:8px;align-items:center;}
.th-set2-swatch{width:32px;height:32px;border-radius:9px;border:2px solid var(--line);cursor:pointer;padding:0;}
.th-set2-swatch:hover{border-color:var(--ink);}
.th-set2-swatch-custom{background:conic-gradient(red,orange,yellow,lime,cyan,blue,magenta,red);overflow:hidden;position:relative;}
.th-set2-swatch-custom input{position:absolute;inset:-6px;opacity:0;cursor:pointer;}
.th-set2-preview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;margin-top:6px;}
.th-set2-prev-bar{flex:1;min-width:160px;}
@media (max-width:760px){ .th-set2{flex-direction:column;} .th-set2-side{width:100%;flex-direction:row;flex-wrap:wrap;} }

/* ===== Account: Profile page ===== */
.th-prof-head{display:flex;align-items:center;gap:16px;margin-bottom:18px;}
.th-prof-av{width:64px;height:64px;border-radius:50%;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-size:22px;font-weight:700;flex-shrink:0;text-transform:uppercase;}
.th-prof-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;align-items:start;}
@media (max-width:980px){ .th-prof-grid{grid-template-columns:1fr;} }
.th-prof-side{display:flex;flex-direction:column;gap:18px;}
.th-prof-acc{display:flex;flex-wrap:wrap;gap:20px 34px;}
.th-prof-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.th-prof-stat{padding:14px;border-left:4px solid var(--brand-soft);}
.th-prof-stat-top{display:flex;align-items:center;gap:9px;}
.th-prof-stat-top .th-ms-badge{width:32px;height:32px;margin:0;}
.th-prof-stat-label{font-size:11px;font-weight:700;letter-spacing:.04em;color:var(--muted);}
.th-prof-stat-num{font-size:24px;font-weight:700;color:var(--ink);margin-top:8px;}

/* ===== Reports ===== */
.th-rep-tabbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.th-rep-util{min-width:220px;}
.th-rep-barwrap{display:flex;flex-direction:column;gap:4px;max-width:240px;}
.th-rep-bar{height:7px;border-radius:999px;background:var(--line);overflow:hidden;}
.th-rep-bar > span{display:block;height:100%;border-radius:999px;background:var(--brand);}
.th-rep-pct{font-size:12px;color:var(--muted);font-weight:600;}

/* ===== Orders (pass cards) ===== */
.th-ord-toolbar{display:flex;justify-content:flex-end;margin-bottom:16px;}
.th-ord-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
@media (max-width:1200px){ .th-ord-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px){ .th-ord-grid{grid-template-columns:1fr;} }
.th-ord-card{display:flex;flex-direction:column;gap:12px;text-decoration:none;}
.th-ord-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.th-ord-title{font-size:16px;font-weight:700;color:var(--ink);line-height:1.3;}
.th-ord-tag{flex-shrink:0;font-size:11px;font-weight:700;color:var(--brand);background:var(--brand-soft);border-radius:999px;padding:3px 9px;}
.th-ord-barhead{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--ink);}
.th-ord-foot{display:flex;align-items:center;justify-content:space-between;}

/* ===== Order detail ===== */
.th-od-head-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px;}
.th-od-bar-row{margin-top:14px;}
.th-od-bar-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--ink);margin-bottom:7px;}
.th-od-count{display:block;font-size:16px;margin:20px 0 10px;}
.th-od-group{margin-bottom:22px;}
.th-od-group-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;}

/* ===== Invoices ===== */
.th-inv-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px;}
.th-inv-search{flex:1;min-width:240px;max-width:520px;}
.th-inv-filters{display:flex;gap:8px;flex-wrap:wrap;}
.th-nowrap{white-space:nowrap;}
/* invoice detail */
.th-invd{max-width:720px;}
.th-invd-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px;}
.th-invd-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 24px;}
@media (max-width:680px){ .th-invd-grid{grid-template-columns:1fr 1fr;} }
.th-invd-k{font-size:11px;font-weight:700;letter-spacing:.05em;color:var(--muted);}
.th-invd-v{font-size:14.5px;font-weight:600;color:var(--ink);margin-top:3px;}
.th-invd-line{display:flex;justify-content:space-between;font-size:14px;color:var(--muted);padding:7px 0;}
.th-invd-total{font-size:17px;font-weight:700;color:var(--ink);border-top:1px solid var(--line);margin-top:6px;padding-top:12px;}
.th-invd-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;flex-wrap:wrap;}

/* ===== Learning / course detail ===== */
.th-ld-head{display:flex;flex-direction:column;gap:12px;margin-bottom:18px;}
.th-ld-pills{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.th-ld-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;align-items:start;}
@media (max-width:980px){ .th-ld-grid{grid-template-columns:1fr;} }
.th-ld-col{display:flex;flex-direction:column;gap:18px;}
.th-ld-card-title{font-size:17px;font-weight:700;color:var(--ink);margin:0 0 16px;}
.th-ld-kv{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 24px;}
@media (max-width:680px){ .th-ld-kv{grid-template-columns:1fr 1fr;} }
.th-ld-k{font-size:11px;font-weight:700;letter-spacing:.05em;color:var(--muted);text-transform:uppercase;}
.th-ld-v{font-size:14.5px;font-weight:600;color:var(--ink);margin-top:4px;word-break:break-word;}
.th-ld-full{grid-column:1/-1;}
.th-ld-res{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
@media (max-width:520px){ .th-ld-res{grid-template-columns:1fr;} }
.th-ld-res-btn{display:flex;align-items:center;gap:9px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;transition:border-color .15s,background .15s;}
.th-ld-res-btn:hover{border-color:var(--brand);background:var(--brand-soft);}
.th-ld-res-btn i{color:var(--muted);flex-shrink:0;}
.th-ld-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;}
.th-ld-row-text{font-size:14px;color:var(--muted);margin:0;flex:1;min-width:200px;}
.th-ld-locked{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--muted);}
.th-ld-locked i{color:var(--muted);}

/* ===== User Management topbar ===== */
.th-um-topbar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:16px;}
.th-um-topactions{display:flex;gap:10px;flex-shrink:0;}
.th-um-actions{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center;}

/* ===== DataTables — user management ===== */
/* DT wraps the table in dataTables_wrapper — that becomes the card */
#umTable_wrapper{background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;}

/* Strip DT default table chrome so th-table styles win */
table.dataTable{width:100% !important;border-collapse:collapse !important;margin:0 !important;}
table.dataTable.no-footer{border-bottom:none !important;}
table.dataTable thead th{border:none !important;background:#fff !important;padding:12px 16px !important;font-size:11.5px !important;letter-spacing:.4px !important;text-transform:uppercase !important;color:var(--muted) !important;font-weight:700 !important;white-space:nowrap !important;}
table.dataTable thead .dt-column-order{opacity:.3;}
table.dataTable thead th.dt-ordering-asc .dt-column-order,
table.dataTable thead th.dt-ordering-desc .dt-column-order{opacity:1;color:var(--brand);}

/* Top bar: count left, search right */
.th-dt-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--line);}
.th-dt-count{font-size:14px;font-weight:600;color:var(--ink);}
.th-dt-search .dt-search label{display:none;}
.th-dt-search .dt-search input{width:260px;border:1px solid var(--line);border-radius:9px;padding:8px 14px;font-size:14px;font-family:inherit;color:var(--ink);background:var(--surface);outline:none;}
.th-dt-search .dt-search input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
.th-dt-search .dt-search input::placeholder{color:var(--muted);}

/* Bottom bar: show N / info / pagination */
.th-dt-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 18px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);}
.th-dt-bottom .dt-length{display:flex;align-items:center;gap:6px;}
.th-dt-bottom .dt-length select{border:1px solid var(--line);border-radius:8px;padding:5px 8px;font-size:13px;font-family:inherit;color:var(--ink);background:var(--surface);cursor:pointer;outline:none;}
.th-dt-bottom .dt-length select:focus{border-color:var(--brand);}
.th-dt-bottom .dt-paging .dt-pager{display:flex;gap:3px;list-style:none;margin:0;padding:0;}
.th-dt-bottom .dt-paging .dt-pager .dt-paging-button{display:grid;place-items:center;min-width:32px;height:32px;padding:0 6px;border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;color:var(--ink);background:none;border:1px solid transparent;user-select:none;transition:background .15s,color .15s;}
.th-dt-bottom .dt-paging .dt-pager .dt-paging-button:hover:not(.disabled){background:var(--brand-soft);color:var(--brand);}
.th-dt-bottom .dt-paging .dt-pager .dt-paging-button.current{background:var(--brand);color:#fff;border-color:var(--brand);}
.th-dt-bottom .dt-paging .dt-pager .dt-paging-button.disabled{opacity:.3;cursor:default;pointer-events:none;}

/* ===== Department Management header ===== */
.th-info-bar{display:flex;align-items:center;gap:10px;background:var(--brand-soft);border:1px solid var(--line);border-radius:12px;padding:13px 16px;margin-bottom:16px;font-size:13.5px;color:var(--ink-2);}
.th-info-bar i{color:var(--brand);flex-shrink:0;}
.th-dept-create-row{display:flex;justify-content:flex-end;margin-bottom:20px;}
.th-btn-create{background:var(--brand);color:#fff;border:none;}
.th-btn-create:hover{background:var(--brand-2);color:#fff;}

/* ===== Department detail page ===== */
.th-dept-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
.th-dept-detail-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.th-dept-detail-actions{display:flex;gap:10px;flex-wrap:wrap;}
.th-btn-soft{background:var(--paper);color:var(--ink);border-color:transparent;}
.th-btn-soft:hover{background:var(--line);color:var(--ink);}
.th-dept-back{margin-bottom:16px;border:1px solid var(--line);}
/* Right slide-in modal (drawer) */
.modal-dialog.th-modal-right{position:fixed;top:0;right:0;margin:0;height:100%;max-width:440px;width:100%;}
.modal.fade .modal-dialog.th-modal-right{transform:translateX(100%);transition:transform .28s ease-out;}
.modal.show .modal-dialog.th-modal-right{transform:translateX(0);}
.th-modal-right .modal-content{height:100%;border-radius:0;border:0;}
.th-modal-right .modal-body{overflow-y:auto;}
.th-dept-kpi{padding:18px 20px;margin-bottom:22px;}
.th-dept-kpi-top{display:flex;align-items:center;gap:12px;margin-bottom:12px;}
.th-dept-kpi-num{font-size:34px;}
.th-dept-mem-title{font-size:20px;font-weight:700;color:var(--ink);margin:0 0 12px;}
/* Members table — clean white rows, dark names, soft action buttons */
.th-mem-table thead tr{background:transparent;}
.th-mem-table tbody tr:hover,.th-mem-table .th-row:hover{background:#FAFAFB;}
.th-mem-name{color:var(--ink);font-weight:700;}
.th-mem-remove{color:var(--rose);}
.th-mem-remove:hover{color:var(--rose);background:var(--rose-bg);}
.th-assign-panel{margin-bottom:22px;}
.th-assign-panel-title{font-size:19px;font-weight:700;color:var(--ink);margin:0 0 14px;}
.th-assign-row{display:flex;align-items:center;gap:12px;}
.th-assign-row .th-input{flex:1;min-width:0;}
.th-assign-row .th-btn{flex-shrink:0;white-space:nowrap;}
@media (max-width:640px){ .th-assign-row{flex-direction:column;align-items:stretch;} }

/* ===== Course Management (manager) ===== */
.th-cm-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap;}
.th-cm-search{display:flex;align-items:center;gap:9px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 14px;width:100%;max-width:420px;}
.th-cm-search i{color:var(--muted);flex-shrink:0;}
.th-cm-search-input{border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;color:var(--ink);width:100%;}
.th-cm-count{font-size:13.5px;color:var(--muted);white-space:nowrap;}
.th-cm-count span{font-weight:700;color:var(--ink);}
.th-cm-list{display:flex;flex-direction:column;gap:12px;}
.th-cm-row{display:flex;align-items:center;gap:14px;padding:16px 18px;text-decoration:none;color:inherit;transition:border-color .15s ease,box-shadow .15s ease;}
.th-cm-row:hover{border-color:var(--brand);box-shadow:0 6px 20px -12px rgba(20,20,25,.25);}
.th-cm-ic{width:44px;height:44px;border-radius:11px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex-shrink:0;}
.th-cm-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1;}
.th-cm-title{font-size:15.5px;font-weight:700;color:var(--ink);}
.th-cm-meta{font-size:13px;color:var(--muted);}
.th-cm-right{display:flex;align-items:center;gap:14px;flex-shrink:0;margin-left:auto;}
.th-cm-enrolled{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap;}
.th-cm-chev{color:var(--muted);}
/* Course detail (manager) */
.th-cm-detail-head{margin-bottom:20px;}
.th-cm-section-label{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--muted);text-transform:uppercase;margin-bottom:12px;}
.th-cm-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px;}
@media (max-width:1100px){ .th-cm-kpis{grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .th-cm-kpis{grid-template-columns:1fr;} }
.th-cm-kpi{position:relative;padding:17px 18px 16px;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;}
.th-cm-kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--brand);opacity:.9;}
.th-cm-kpi:hover{transform:translateY(-3px);box-shadow:0 24px 60px -24px rgba(20,20,25,.30);}
.th-cm-kpi.is-active{border:2px solid var(--brand);}
.th-cm-kpi-top{display:flex;align-items:center;gap:11px;}
.th-cm-kpi-ic{width:34px;height:34px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand);flex-shrink:0;}
.th-cm-kpi-label{font-size:11.5px;font-weight:600;letter-spacing:.04em;color:var(--muted);text-transform:uppercase;}
.th-cm-kpi-num{font-size:28px;font-weight:700;color:var(--ink);line-height:1;letter-spacing:-.02em;margin-top:auto;padding-top:12px;}
.th-cm-deleg-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px;}
.th-cm-deleg-title{font-size:18px;font-weight:700;color:var(--ink);}
.th-cm-deleg-sub{font-size:13px;color:var(--muted);white-space:nowrap;}
.th-cm-pill-progress{background:#E8950C;color:#fff;}
.th-cm-pill-done{background:var(--brand);color:#fff;}
.th-cm-pill-upcoming{background:var(--paper);color:var(--muted);}

/* ===== Team Management cards ===== */
.th-team-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
@media (max-width:1200px){ .th-team-grid{grid-template-columns:repeat(3,1fr);} }
@media (max-width:900px){ .th-team-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .th-team-grid{grid-template-columns:1fr;} }
.th-team-card{display:flex;flex-direction:column;gap:12px;}
.th-team-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.th-team-name{font-size:17px;font-weight:700;color:var(--ink);}
.th-team-desc{margin-top:2px;}
.th-team-meta{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);white-space:nowrap;}
.th-team-meta span{display:inline-flex;align-items:center;gap:6px;}
.th-team-dot{opacity:.6;}
.th-team-actions{display:flex;gap:8px;margin-top:auto;}
/* Solid Active/Inactive status pills for department cards */
.th-pill-status-on{background:var(--brand);color:#fff;}
.th-pill-status-off{background:var(--rose);color:#fff;}

/* ===== Approvals ===== */
.th-ap-card{margin-bottom:16px;}
.th-ap-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;}
.th-ap-who{display:flex;align-items:center;gap:12px;min-width:0;}
.th-ap-who .th-ms-av{width:42px;height:42px;flex-shrink:0;}
.th-ap-name{font-size:15px;font-weight:700;color:var(--ink);}
.th-ap-dept{color:var(--muted);font-weight:500;}
.th-ap-course{font-size:13.5px;color:var(--muted);margin-top:1px;}
.th-ap-status{flex-shrink:0;}
.th-ap-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;}
.th-ap-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--text);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:5px 11px;}
.th-ap-actions{display:flex;gap:10px;}

/* ===== Training Wallet ===== */
.th-tw-tabs{flex-wrap:wrap;}
.th-tw-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:14px;}
@media (max-width:1100px){ .th-tw-kpis{grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .th-tw-kpis{grid-template-columns:1fr;} }
.th-tw-kpi{padding:16px 18px;border-left:4px solid var(--brand-soft);}
.th-tw-kpi-top{margin-bottom:10px;}
.th-tw-kpi-top .th-ms-badge{margin:0;width:38px;height:38px;}
.th-tw-kpi-label{font-size:11px;font-weight:700;letter-spacing:.05em;color:var(--muted);}
.th-tw-kpi-num{font-size:26px;font-weight:700;color:var(--ink);margin-top:5px;line-height:1;}
/* utilisation bar */
.th-tw-bar-card{margin-bottom:14px;}
.th-tw-bar-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--muted);margin-bottom:8px;}
.th-tw-bar-head b{color:var(--ink);}
.th-tw-bar{height:8px;border-radius:999px;background:var(--line);overflow:hidden;}
.th-tw-bar > span{display:block;height:100%;border-radius:999px;background:var(--brand);}
/* completion summary */
.th-tw-summary{display:flex;flex-wrap:wrap;gap:34px;margin-top:14px;}
.th-tw-sum-k{font-size:11px;font-weight:700;letter-spacing:.05em;color:var(--muted);}
.th-tw-sum-v{font-size:24px;font-weight:700;color:var(--ink);margin-top:4px;}
/* pass header (KnowledgePass) */
.th-tw-pass-head{position:relative;}
.th-tw-pass-main{display:flex;align-items:center;gap:13px;}
.th-tw-pass-badge{background:var(--brand);color:#fff;width:46px;height:46px;}
.th-tw-pass-title{font-size:20px;font-weight:600;color:var(--ink);}
.th-tw-pass-pct{position:absolute;right:24px;top:22px;text-align:right;}
.th-tw-pass-pct .th-serif{font-size:26px;font-weight:700;color:var(--ink);display:block;line-height:1;}
.th-tw-pass-bar{margin-top:16px;}
.th-tw-grouplabel{font-size:11.5px;font-weight:700;letter-spacing:.07em;color:var(--muted);margin:18px 0 10px;}
/* flexi cards */
.th-tw-flexi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
@media (max-width:1100px){ .th-tw-flexi-grid{grid-template-columns:1fr;} }
.th-tw-flexi{display:flex;flex-direction:column;gap:14px;}
.th-tw-flexi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.th-tw-flexi-title{font-size:16px;font-weight:700;color:var(--ink);line-height:1.3;}
.th-tw-flexi-figs{display:flex;justify-content:space-between;gap:10px;}
.th-tw-flexi-fig{font-size:18px;font-weight:700;color:var(--ink);}
.th-tw-flexi-del{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--muted);}
.th-tw-flexi-del b{color:var(--ink);}
.th-tw-flexi-btn{justify-content:center;width:100%;}
/* extra pill tones used in the orders table */
.th-pill-rose{background:var(--rose-bg);color:var(--rose);}

/* ===== Support page ===== */
.th-sup-grid{display:grid;grid-template-columns:1fr 360px;gap:18px;align-items:start;}
.th-sup-side{display:flex;flex-direction:column;gap:18px;}
.th-sup-group-label{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--muted);margin:10px 0 6px;}
.th-sup-chips{display:flex;flex-wrap:wrap;gap:8px;}
.th-sup-chip{border:1px solid var(--line);background:var(--paper);color:var(--text);font-size:13px;font-weight:500;padding:7px 13px;border-radius:999px;cursor:pointer;transition:all .15s ease;}
.th-sup-chip:hover{border-color:var(--brand);}
.th-sup-chip.is-on{background:var(--brand-soft);border-color:var(--brand);color:var(--brand-2);font-weight:600;}
/* help panel (gradient banner + rows) */
.th-sup-help{padding:0;overflow:hidden;}
.th-sup-help-banner{background:linear-gradient(120deg,var(--brand),var(--brand-2));color:#fff;padding:18px 20px;}
.th-sup-help-title{display:block;font-size:16px;color:#fff;}
.th-sup-help-sub{font-size:13px;color:rgba(255,255,255,.85);margin:4px 0 0;}
.th-sup-help-row{display:flex;align-items:center;gap:12px;padding:13px 20px;border-top:1px solid var(--line);}
.th-sup-help-ic{width:36px;height:36px;border-radius:10px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex-shrink:0;}
.th-sup-help-k{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);}
.th-sup-help-v{font-size:13.5px;font-weight:600;color:var(--ink);word-break:break-word;}
/* what happens next */
.th-sup-steps{display:flex;flex-direction:column;gap:16px;margin-top:14px;}
.th-sup-step{display:flex;gap:12px;align-items:flex-start;}
.th-sup-step-n{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:13px;font-weight:700;display:grid;place-items:center;}
.th-sup-step-t{font-weight:600;color:var(--ink);font-size:14px;}
.th-sup-step-d{font-size:13px;color:var(--muted);margin-top:1px;}
/* tickets */
.th-sup-tickets{display:flex;flex-direction:column;gap:16px;}
.th-sup-ticket-top{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.th-sup-ticket-subj{font-size:17px;font-weight:700;color:var(--ink);}
.th-sup-ticket-msg{color:var(--text);font-size:14px;margin:10px 0 16px;}
.th-sup-stepper{display:flex;align-items:center;gap:0;}
.th-sup-stepper-node{display:flex;align-items:center;gap:7px;}
.th-sup-dot{width:9px;height:9px;border-radius:50%;background:var(--line);flex-shrink:0;}
.th-sup-stepper-node.is-done .th-sup-dot{background:var(--brand);}
.th-sup-stepper-label{font-size:12.5px;color:var(--muted);white-space:nowrap;}
.th-sup-stepper-node.is-done .th-sup-stepper-label{color:var(--ink);font-weight:600;}
.th-sup-stepper-line{flex:1;height:2px;background:var(--line);margin:0 8px;}
.th-sup-stepper-line.is-done{background:var(--brand);}
@media (max-width:980px){ .th-sup-grid{grid-template-columns:1fr;} }

/* ===== Certificate Center v2 (gradient cards + list) ===== */
.th-certg{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:18px;}
.th-cert2{padding:0;overflow:hidden;display:flex;flex-direction:column;}
.th-cert2-head{padding:20px 22px;background:linear-gradient(120deg,var(--brand),color-mix(in srgb,var(--brand) 55%,#fff));color:#fff;}
.th-cert2-type{font-size:11px;font-weight:700;letter-spacing:.1em;color:rgba(255,255,255,.8);}
.th-cert2-title{font-size:21px;font-weight:600;margin:6px 0 8px;line-height:1.2;}
.th-cert2-sub{font-size:12.5px;color:rgba(255,255,255,.85);line-height:1.5;}
.th-cert2-actions{display:flex;flex-wrap:wrap;gap:8px;padding:14px 18px;}

/* ===== Catalogue v2 cards + list ===== */
.th-cat-card2{position:relative;overflow:hidden;padding:22px 18px 18px;display:flex;flex-direction:column;gap:11px;--cat:var(--brand);--cat-soft:var(--brand-soft);}
.th-cat-card2::before{content:"";position:absolute;top:0;left:0;right:0;height:5px;background:var(--cat);}
.th-cat-c1{--cat:#7C3AED;--cat-soft:#EDE9FE;}
.th-cat-c2{--cat:#2563EB;--cat-soft:#DBEAFE;}
.th-cat-c3{--cat:#059669;--cat-soft:#D1FAE5;}
.th-cat-c4{--cat:#D97706;--cat-soft:#FEF3C7;}
.th-cat-c5{--cat:#EA580C;--cat-soft:#FFEDD5;}
.th-cat-c6{--cat:#0891B2;--cat-soft:#CFFAFE;}
.th-cat-c7{--cat:#DB2777;--cat-soft:#FCE7F3;}
.th-cat2-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.th-cat2-title{font-size:18px;font-weight:700;color:var(--ink);line-height:1.25;margin:0;}
.th-cat2-desc{font-size:13.5px;color:var(--muted);line-height:1.5;margin:0;flex:1;}
.th-cat2-foot{margin-top:0;padding-top:14px;border-top:none;}
.th-cat-nom{width:100%;justify-content:center;}
.th-cat-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
.th-cat-toolbar-search{flex:1;min-width:240px;max-width:520px;}
.th-cat-toolbar-actions{display:flex;align-items:center;gap:10px;margin-left:auto;}
.th-cat-filterbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:20px;}
.th-cat-filterbar .th-lr-pill{text-decoration:none;}
.th-cat2-meta{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);font-weight:500;}
.th-cat-listcard{padding:0;overflow:hidden;}

/* ===== Learning & Requests page ===== */
.th-lr-tabs{display:flex;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:5px;margin-bottom:18px;width:fit-content;}
.th-lr-tab{border:none;background:transparent;font-size:14px;font-weight:600;color:var(--muted);padding:8px 16px;border-radius:9px;cursor:pointer;}
.th-lr-tab:hover{color:var(--ink);}
.th-lr-tab.active{background:var(--brand-soft);color:var(--brand);}
.th-lr-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.th-lr-filters{display:flex;gap:8px;flex-wrap:wrap;}
.th-lr-pill{border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:13px;font-weight:600;padding:7px 14px;border-radius:999px;cursor:pointer;transition:all .15s ease;}
.th-lr-pill:hover{border-color:var(--brand);color:var(--ink);}
.th-lr-pill.active{background:var(--brand);border-color:transparent;color:#fff;}
.th-lr-viewtoggle{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:3px;}
.th-lr-view{border:none;background:transparent;color:var(--muted);padding:6px 9px;border-radius:8px;cursor:pointer;display:grid;place-items:center;}
.th-lr-view.active{background:var(--brand-soft);color:var(--brand);}

.th-lr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;}
.th-lr-grid--list{grid-template-columns:1fr;}
.th-lr-card{padding:18px;display:flex;flex-direction:column;gap:11px;}
.th-lr-grid--list .th-lr-card{flex-direction:row;align-items:center;gap:18px;}
.th-lr-grid--list .th-lr-card-top{flex:1;min-width:0;}
.th-lr-grid--list .th-lr-mode{margin:0;}
.th-lr-grid--list .th-lr-card-foot{margin:0;border:none;padding:0;}
.th-lr-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.th-lr-card-title{font-size:16px;font-weight:700;color:var(--ink);line-height:1.3;}
.th-lr-mode{display:inline-flex;align-items:center;gap:6px;width:fit-content;font-size:12px;font-weight:600;color:var(--muted);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:4px 10px;}
.th-lr-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:11px;border-top:1px solid var(--line);}
.th-lr-date{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);}
.th-lr-empty{font-size:13.5px;color:var(--muted);padding:14px 2px;}

/* request rows + track-progress timeline */
.th-req-list2{display:flex;flex-direction:column;gap:14px;}
.th-req-row{padding:0;overflow:hidden;}
.th-req-row-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;}
.th-req-row-title{font-size:16px;font-weight:700;color:var(--ink);}
.th-req-row-meta{font-size:12.5px;color:var(--muted);margin-top:3px;}
.th-req-row-right{display:flex;align-items:center;gap:14px;flex-shrink:0;}
.th-req-track{border:none;background:transparent;color:var(--brand);font-size:13.5px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;white-space:nowrap;}
.th-req-track .th-req-caret{transition:transform .2s ease;}
.th-req-track.is-open .th-req-caret{transform:rotate(180deg);}
.th-req-track-body{display:grid;grid-template-columns:1fr 240px;gap:24px;padding:18px 20px;border-top:1px solid var(--line);}
.th-req-timeline{display:flex;flex-direction:column;}
.th-req-tl-node{position:relative;padding-left:28px;padding-bottom:14px;}
.th-req-tl-node:last-child{padding-bottom:0;}
.th-req-tl-dot{position:absolute;left:0;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;border:2px solid var(--line);z-index:1;}
.th-req-tl-node.is-done .th-req-tl-dot{background:var(--brand);border-color:var(--brand);}
.th-req-tl-node.is-current .th-req-tl-dot{background:#fff;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
.th-req-tl-line{position:absolute;left:6px;top:14px;bottom:-2px;width:2px;background:var(--line);}
.th-req-tl-line.is-done{background:var(--brand);}
.th-req-tl-label{font-size:14px;font-weight:600;color:var(--ink);line-height:1.3;}
.th-req-tl-node:not(.is-done):not(.is-current) .th-req-tl-label{color:var(--muted);font-weight:500;}
.th-req-tl-current{font-size:12.5px;font-weight:600;color:var(--brand);margin-top:2px;}
.th-req-tl-side-k{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);}
.th-req-tl-side-v{font-size:14px;color:var(--ink);margin-top:3px;}
@media (max-width:760px){ .th-req-track-body{grid-template-columns:1fr;} }

/* upcoming events — 4 per row */
.th-ms-events{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
@media (max-width:1100px){ .th-ms-events{grid-template-columns:repeat(2,1fr);} }
@media (max-width:680px){ .th-ms-events{grid-template-columns:1fr;} }
.th-ms-event{padding:18px;display:flex;flex-direction:column;gap:10px;}
.th-ms-event-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.th-ms-event-title{font-size:16px;font-weight:700;color:var(--ink);line-height:1.3;}
.th-ms-event-mode{display:inline-flex;align-items:center;gap:6px;width:fit-content;font-size:12px;font-weight:600;color:var(--muted);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:4px 10px;}
.th-ms-event-meta{display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:var(--muted);}
.th-ms-event-meta span{display:inline-flex;align-items:center;gap:6px;}
.th-ms-event-btn{align-self:flex-start;margin-top:2px;}
.th-ms-sec-title{font-size:22px;font-weight:600;margin:0;color:var(--ink);letter-spacing:-.3px;}
.th-ms-sec-sub{margin:4px 0 0;color:var(--muted);font-size:14px;}

/* quick actions */
.th-ms-qarow{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;}
.th-ms-qa{padding:18px;display:flex;align-items:center;gap:14px;text-decoration:none;}
.th-ms-qa-badge{width:42px;height:42px;border-radius:13px;background:var(--brand);display:grid;place-items:center;color:#fff;flex-shrink:0;}
.th-ms-qa-label{font-weight:600;font-size:15px;color:var(--ink);}
.th-ms-qa-arrow{margin-left:auto;color:var(--muted);}

/* charts */
.th-ms-charts{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;margin-bottom:18px;}
.th-ms-chart-card{padding:20px;}
.th-ms-chart-title{font-size:15px;font-weight:700;color:var(--ink);}
.th-ms-chart-box{height:230px;margin-top:12px;}
.th-ms-chart-box-sm{height:200px;margin-top:12px;}
.th-ms-chart-empty{display:flex;align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:13.5px;padding:0 24px;}
.th-ms-legend{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:8px;}
.th-ms-legend span{font-size:11.5px;display:flex;align-items:center;gap:5px;color:var(--text);}
.th-ms-legend .dot{width:8px;height:8px;border-radius:50%;display:inline-block;}

/* manager dashboard — compliance panel */
.th-ms-comp-title{display:flex;align-items:center;gap:7px;}
.th-ms-comp{margin-top:14px;display:flex;flex-direction:column;gap:12px;}
.th-ms-comp-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:var(--brand-soft);border:1px solid var(--line);border-radius:14px;}
.th-ms-comp-label{font-size:13.5px;color:var(--text);}
.th-ms-comp-val{font-size:24px;font-weight:600;line-height:1;}
.th-ms-comp-warn{color:var(--amber);}
.th-ms-comp-ok{color:var(--emerald);}

/* manager — user management */
.th-um-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:20px;overflow-x:auto;}
.th-um-tab{font-weight:600;font-size:14px;padding:10px 2px;color:var(--muted);border:none;background:none;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;}
.th-um-tab:hover{color:var(--ink);}
.th-um-tab.active{color:var(--ink);border-bottom-color:var(--brand);}
.th-um-search{display:flex;align-items:center;gap:10px;padding:10px 16px;margin-bottom:16px;}
.th-um-search .th-input{border:none;padding:0;background:transparent;}
.th-um-search .th-input:focus{box-shadow:none;}
.th-um-name{display:flex;align-items:center;gap:12px;}
.th-um-avatar{width:36px;height:36px;border-radius:50%;background:var(--brand-soft);color:var(--brand-2);display:grid;place-items:center;font-weight:600;font-size:13px;flex-shrink:0;}
.th-um-actions{display:flex;align-items:center;gap:8px;}
.th-um-actions form{margin:0;}
.th-um-status{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--brand-2);}
.th-um-dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:var(--brand);}
.th-um-status.is-inactive{color:var(--muted);}
.th-um-status.is-inactive .th-um-dot{background:var(--muted);}
.th-um-link{display:inline-flex;align-items:center;gap:5px;margin-top:8px;background:none;border:none;padding:0;color:var(--brand-2);font-size:13px;font-weight:600;cursor:pointer;}
.th-um-link:hover{color:var(--brand);}
.th-um-modal-title{font-size:22px;margin:0;}
.th-um-modal-x{background:none;border:none;padding:4px;cursor:pointer;line-height:0;}

/* manager — user profile drawer */
.th-drawer-overlay{position:fixed;inset:0;background:rgba(15,18,49,.45);z-index:60;display:flex;justify-content:flex-end;}
.th-drawer-overlay.th-hidden{display:none;}
.th-drawer{width:560px;max-width:94vw;height:100%;background:var(--surface);border-left:1px solid var(--line);box-shadow:-24px 0 70px -30px rgba(15,18,49,.5);display:flex;flex-direction:column;animation:thdrawer .28s ease;}
@keyframes thdrawer{from{transform:translateX(36px);opacity:.5;}to{transform:none;opacity:1;}}
.th-drawer-head{display:flex;align-items:center;gap:14px;padding:20px 22px;border-bottom:1px solid var(--line);}
.th-drawer-av{width:52px;height:52px;border-radius:50%;background:var(--brand-soft);color:var(--brand-2);display:grid;place-items:center;font-weight:700;font-size:18px;flex-shrink:0;}
.th-drawer-name{font-size:20px;font-weight:600;color:var(--ink);}
.th-drawer-x{margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;line-height:0;}
.th-drawer-tabs{display:flex;gap:20px;padding:0 22px;border-bottom:1px solid var(--line);overflow-x:auto;}
.th-drawer-body{flex:1;overflow-y:auto;padding:22px;}
.th-drawer-row{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);}
.th-drawer-k{color:var(--muted);font-size:13.5px;}
.th-drawer-v{font-weight:600;color:var(--ink);text-align:right;}
.th-drawer-progress-head{font-size:13.5px;font-weight:600;color:var(--ink);}
.th-drawer-stack{display:flex;flex-direction:column;gap:10px;}
.th-drawer-mini{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:13.5px;}
.th-drawer-table{min-width:0;}
.th-drawer-inline{margin:0;}
.th-drawer-select{max-width:240px;padding:7px 30px 7px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;font-family:inherit;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;outline:none;}
.th-drawer-select:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}

/* manager — orders */
.th-om-usage{min-width:90px;}
.th-om-subtitle{font-size:18px;font-weight:600;color:var(--ink);margin:30px 0 14px;}

/* manager — enrol-against-order wizard */
.th-stepper{display:flex;align-items:center;gap:6px;margin:6px 0 22px;}
.th-stepper-dot{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;border:2px solid var(--line);color:var(--muted);background:#fff;flex-shrink:0;}
.th-stepper-dot.active{border-color:var(--brand);color:var(--brand);}
.th-stepper-dot.done{background:var(--brand);border-color:var(--brand);color:#fff;}
.th-stepper-line{flex:1;height:2px;background:var(--line);}
.th-enroll-heading{display:block;font-size:15px;font-weight:700;color:var(--ink);margin-bottom:14px;}
.th-enroll-list{display:flex;flex-direction:column;gap:8px;max-height:320px;overflow-y:auto;}
.th-enroll-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:320px;overflow-y:auto;}
.th-enroll-opt{display:flex;align-items:center;gap:12px;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);cursor:pointer;transition:border-color .15s,background .15s;}
.th-enroll-opt:hover{border-color:var(--brand);}
.th-enroll-opt.selected{border-color:var(--brand);background:var(--brand-soft);}
.th-enroll-opt-col{flex-direction:column;align-items:flex-start;gap:3px;position:relative;}
.th-enroll-av{width:36px;height:36px;border-radius:50%;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;font-weight:600;font-size:13px;color:var(--brand-2);flex-shrink:0;}
.th-enroll-opt-name{font-weight:600;color:var(--ink);font-size:14px;}
.th-enroll-check{display:none;margin-left:auto;color:var(--brand-2);flex-shrink:0;}
.th-enroll-opt.selected .th-enroll-check{display:block;}
.th-enroll-opt-col .th-enroll-check{position:absolute;top:10px;right:12px;margin:0;}
.th-enroll-methods{display:flex;flex-wrap:wrap;gap:10px;}
.th-enroll-method{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:104px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--paper);cursor:pointer;font-weight:600;font-size:13px;color:var(--ink);transition:border-color .15s,background .15s,color .15s;}
.th-enroll-method:hover{border-color:var(--brand);}
.th-enroll-method.selected{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-2);}
.th-enroll-review{padding:4px 16px;}
.th-enroll-footer{display:flex;align-items:center;gap:8px;}

/* manager — enrol delegates page (multi-select) */
.th-back-link{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-weight:600;font-size:13px;text-decoration:none;margin-bottom:12px;}
.th-back-link:hover{color:var(--brand-2);}
.th-enrol-sec{margin-bottom:24px;}
.th-enrol-sec-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.th-enrol-sec-head .th-enroll-heading{margin-bottom:0;}
.th-enrol-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;}
.th-enrol-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;}
.th-check-col{width:46px;text-align:center;}
.th-check-col input[type="checkbox"]{accent-color:var(--brand);width:16px;height:16px;cursor:pointer;vertical-align:middle;}
.th-dot-emerald{background:var(--emerald);}

@media (max-width: 980px){
  .th-ms-charts{grid-template-columns:1fr;}
}
@media (max-width: 860px){
  .th-ms-nav{display:none;}
  .th-ms-seg{display:none;}
  .th-ms-headinner{padding:12px 16px;}
  .th-ms-main{padding:22px 16px 60px;}
}

/* ===== Settings modal (tabbed, opened from the avatar menu) ===== */
.th-set-overlay{position:fixed;inset:0;background:rgba(15,18,49,.55);backdrop-filter:blur(3px);z-index:90;display:grid;place-items:center;padding:20px;}
.th-set-overlay.th-hidden{display:none;}
.th-set-modal{width:820px;max-width:96vw;height:600px;max-height:92vh;background:var(--surface);border-radius:22px;border:1px solid var(--line);box-shadow:0 30px 80px -30px rgba(15,18,49,.6);display:flex;overflow:hidden;}
.th-set-side{width:240px;flex-shrink:0;background:var(--paper);border-right:1px solid var(--line);padding:18px;}
.th-set-side-title{font-size:20px;font-weight:600;margin:0 0 16px;color:var(--ink);}
.th-set-tab{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:10px 13px;border-radius:10px;font-weight:600;font-size:14px;color:var(--muted);border:none;background:transparent;cursor:pointer;margin-bottom:4px;}
.th-set-tab:hover{background:var(--surface);color:var(--ink);}
.th-set-tab.active{background:var(--brand-soft);color:var(--brand);}
.th-set-main{flex:1;min-width:0;display:flex;flex-direction:column;}
.th-set-head{display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-bottom:1px solid var(--line);}
.th-set-head b{font-size:16px;color:var(--ink);}
.th-set-x{background:none;border:none;cursor:pointer;color:var(--muted);display:grid;place-items:center;}
.th-set-body{flex:1;overflow-y:auto;padding:22px;}
.th-set-panel{display:none;}
.th-set-panel.active{display:block;}
.th-set-avatarbig{width:64px;height:64px;border-radius:50%;background:var(--paper);border:1px solid var(--line);display:grid;place-items:center;font-weight:700;font-size:24px;color:var(--ink);flex-shrink:0;}
.th-set-grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width: 720px){
  .th-set-modal{flex-direction:column;height:auto;max-height:92vh;}
  .th-set-side{width:100%;border-right:none;border-bottom:1px solid var(--line);display:flex;flex-wrap:wrap;gap:6px;}
  .th-set-side-title{width:100%;}
  .th-set-tab{width:auto;margin-bottom:0;}
  .th-set-grid2{grid-template-columns:1fr;}
}

/* ===== My Space catalogue (top-nav portal) ===== */
.th-cat-seg{display:inline-flex;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:3px;}
.th-cat-seg-btn{padding:6px 12px;border-radius:8px;color:var(--muted);display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;border:none;background:transparent;cursor:pointer;}
.th-cat-seg-btn.on{background:var(--surface);color:var(--brand);box-shadow:0 1px 2px rgba(0,0,0,.08);}

.th-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;align-items:stretch;}
.th-cat-list{display:flex;flex-direction:column;gap:10px;}
.th-cat-card{padding:18px;display:flex;flex-direction:column;text-decoration:none;}
.th-cat-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px;}
.th-cat-chip{display:inline-flex;align-items:center;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:5px 11px;border-radius:999px;background:var(--cat-soft,var(--brand-soft));color:var(--cat,var(--brand));}
.th-cat-mode{font-size:12px;font-weight:600;color:var(--muted);display:flex;align-items:center;gap:4px;text-transform:capitalize;flex-shrink:0;}
.th-cat-headblock{display:flex;flex-direction:column;gap:6px;}
.th-cat-title{font-size:18px;font-weight:600;line-height:1.25;margin:0;color:var(--ink);}
.th-cat-desc{font-size:13px;color:var(--muted);line-height:1.5;margin:10px 0 14px;flex:1;}
.th-cat-meta{display:flex;gap:14px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--muted);font-weight:500;}
.th-cat-meta span{display:flex;align-items:center;gap:5px;}
.th-cat-rating{color:var(--ink);font-weight:600;}
.th-cat-star{color:#f5a623;fill:#f5a623;}
.th-cat-cat{color:var(--muted-2,#9aa3b2);}
.th-cat-methods{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 2px;flex:1;align-content:flex-end;}
.th-cat-method{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:5px 11px;border-radius:999px;color:var(--ink);background:#fff;border:1px solid var(--line);text-transform:capitalize;}
.th-cat-method i{color:var(--cat,var(--brand));}
.th-cat-btn{justify-content:center;margin-top:auto;}

/* list view variant — title + meta stacked on the left, methods + button pushed right (matches mockup) */
.th-cat-list .th-cat-card{flex-direction:row;align-items:center;gap:16px;padding:16px 18px;}
.th-cat-list .th-cat-top,
.th-cat-list .th-cat-desc{display:none;}
.th-cat-list .th-cat-headblock{flex:1;min-width:0;gap:8px;}
.th-cat-list .th-cat-title{font-size:16px;}
.th-cat-list .th-cat-meta{margin:0;}
.th-cat-list .th-cat-methods{margin:0;flex-shrink:0;justify-content:flex-end;}
.th-cat-list .th-cat-btn{margin-top:0;flex-shrink:0;width:auto;min-width:74px;padding-left:18px;padding-right:18px;}
@media (max-width: 820px){
  .th-cat-list .th-cat-card{flex-wrap:wrap;}
  .th-cat-list .th-cat-headblock{flex-basis:100%;}
}

.th-cat-dummy-note{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--muted);background:var(--brand-soft);border-radius:10px;padding:8px 13px;margin-bottom:14px;width:fit-content;}

/* ===== Certificate Center (top-nav portal) ===== */
.th-cert-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:18px;}
.th-cert-card{padding:18px;display:flex;flex-direction:column;}
.th-cert-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.th-cert-badge{flex-shrink:0;width:38px;height:38px;border-radius:10px;background:var(--brand-soft);color:var(--brand);display:flex;align-items:center;justify-content:center;}
.th-cert-type{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);}
.th-cert-title{font-size:18px;font-weight:600;line-height:1.25;margin:0 0 4px;color:var(--ink);}
.th-cert-meta{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.th-cert-dot{opacity:.7;}
.th-cert-code{font-family:'Spline Sans Mono','SFMono-Regular',ui-monospace,monospace;letter-spacing:0;}
.th-cert-expiry{display:flex;align-items:center;gap:5px;font-size:12.5px;color:#b45309;margin-top:4px;}
.th-cert-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
/* manager certificates table: delegate cell + search input padding */
.th-cert-who{display:flex;align-items:center;gap:10px;min-width:0;}
.th-cert-who .th-ms-av{width:30px;height:30px;font-size:12px;flex-shrink:0;cursor:default;background:var(--brand-soft);color:var(--brand);border-color:transparent;}
.th-cert-name{color:var(--brand);font-weight:700;text-decoration:none;}
.th-cert-name:hover{text-decoration:underline;}
.th-cert-rowact{display:inline-flex;gap:8px;justify-content:flex-end;}
.th-pl-36{padding-left:36px;}

/* ---- Notes & Productivity Hub ------------------------------------------ */
.th-notes-h{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;color:var(--ink);margin:0 0 16px;}
.th-notes-card,.th-notes-side{height:100%;}

/* quick-add row */
.th-note-add{display:flex;gap:10px;margin-bottom:16px;}
.th-note-input{flex:1;}
.th-note-add-btn{flex-shrink:0;width:48px;padding:0;display:flex;align-items:center;justify-content:center;}

/* note cards */
.th-note-list{display:flex;flex-direction:column;gap:10px;}
.th-note{display:flex;align-items:flex-start;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:14px 16px;transition:border-color .15s,box-shadow .15s;}
.th-note:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(0,0,0,.05);}
.th-note-body{flex:1;min-width:0;}
.th-note-title{font-weight:600;color:var(--ink);font-size:14.5px;}
.th-note-text{color:var(--muted);font-size:13px;margin-top:3px;line-height:1.5;}
.th-note-del{flex-shrink:0;border:none;background:transparent;color:var(--muted);cursor:pointer;opacity:0;transition:opacity .15s,color .15s;padding:2px;border-radius:6px;}
.th-note:hover .th-note-del{opacity:1;}
.th-note-del:hover{color:#dc2626;}
.th-note-empty{text-align:center;color:var(--muted);padding:30px 10px;}
.th-note-empty p{margin:8px 0 0;font-size:13.5px;}
.th-note-empty .lucide{color:var(--line);}

/* learning goals */
.th-goals{display:flex;flex-direction:column;gap:16px;}
.th-goal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;}
.th-goal-label{font-size:14px;font-weight:600;color:var(--ink);}
.th-goal-pct{font-size:13px;font-weight:600;color:var(--muted);}
.th-goal-bar{height:8px;border-radius:999px;background:var(--line);overflow:hidden;}
.th-goal-fill{display:block;height:100%;border-radius:999px;background:var(--brand);transition:width .4s ease;}
.th-goal-w-0{width:0;}.th-goal-w-5{width:5%;}.th-goal-w-10{width:10%;}.th-goal-w-15{width:15%;}
.th-goal-w-20{width:20%;}.th-goal-w-25{width:25%;}.th-goal-w-30{width:30%;}.th-goal-w-35{width:35%;}
.th-goal-w-40{width:40%;}.th-goal-w-45{width:45%;}.th-goal-w-50{width:50%;}.th-goal-w-55{width:55%;}
.th-goal-w-60{width:60%;}.th-goal-w-65{width:65%;}.th-goal-w-70{width:70%;}.th-goal-w-75{width:75%;}
.th-goal-w-80{width:80%;}.th-goal-w-85{width:85%;}.th-goal-w-90{width:90%;}.th-goal-w-95{width:95%;}
.th-goal-w-100{width:100%;}

/* bookmarks */
.th-bookmarks{display:flex;flex-direction:column;gap:9px;}
.th-bookmark{display:flex;align-items:center;justify-content:space-between;gap:10px;text-decoration:none;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:12px 15px;color:var(--ink);font-size:14px;font-weight:500;transition:border-color .15s,color .15s;}
.th-bookmark:hover{border-color:var(--brand);color:var(--brand);}
.th-bookmark .lucide{color:var(--muted);flex-shrink:0;}
.th-bookmark:hover .lucide{color:var(--brand);}

/* ---- Admin: switch user (impersonation) ------------------------------- */
.th-switch-trigger{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;}
.th-switch-menu{width:320px;max-width:88vw;overflow:hidden;}
.th-switch-head{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:13px 15px 9px;}
.th-switch-search-wrap{position:relative;padding:0 12px 10px;border-bottom:1px solid var(--line);}
.th-switch-search-ic{position:absolute;left:23px;top:9px;color:var(--muted);pointer-events:none;}
.th-switch-search{width:100%;padding-left:34px;}
.th-switch-list{max-height:300px;overflow-y:auto;padding:6px;}
.th-switch-item{margin:0;}
.th-switch-row{display:flex;align-items:center;gap:11px;width:100%;border:none;background:transparent;text-align:left;padding:9px 10px;border-radius:10px;cursor:pointer;}
.th-switch-row:hover{background:var(--brand-soft);}
.th-switch-av{flex-shrink:0;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;font-size:12.5px;font-weight:700;display:flex;align-items:center;justify-content:center;}
.th-switch-meta{flex:1;min-width:0;display:flex;flex-direction:column;}
.th-switch-name{font-size:14px;font-weight:600;color:var(--ink);line-height:1.2;}
.th-switch-email{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.th-switch-go{color:var(--muted);flex-shrink:0;opacity:0;transition:opacity .15s;}
.th-switch-row:hover .th-switch-go{opacity:1;color:var(--brand);}
.th-switch-empty{padding:18px 14px;text-align:center;color:var(--muted);font-size:13px;}

/* impersonation banner */
.th-impersonate{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 18px;background:#fef3c7;color:#92400e;border-bottom:1px solid #fcd34d;padding:9px 18px;font-size:13.5px;font-weight:500;}
.th-impersonate-msg{display:inline-flex;align-items:center;gap:7px;}
.th-impersonate-msg strong{font-weight:700;}

/* "Exit impersonation" button (top bar) */
.th-exit-btn{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:700;color:#fff;background:#dc2626;border:1px solid #b91c1c;}
.th-exit-btn:hover{background:#b91c1c;color:#fff;}

/* toggles (settings) */
.th-toggle{background:var(--line);}
.th-toggle .knob{left:3px;}
.th-toggle.on{background:var(--brand);}
.th-toggle.on .knob{left:21px;}
.th-set-rowflex{display:flex;justify-content:space-between;align-items:center;padding:9px 0;}

/* ===== Delegate blocks (row + per-delegate course checklist) ===== */
.th-delegate-block{padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line);}
.th-delegate-block:last-child{border-bottom:none;margin-bottom:8px;}
.th-delegate-courses{margin:8px 0 0;}
.th-delegate-courses-label{font-size:11.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);margin-bottom:6px;}
.th-delegate-courses-list{display:flex;flex-wrap:wrap;gap:8px 16px;}
.th-dc-item{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--text);cursor:pointer;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:6px 11px;}
.th-dc-item input{accent-color:var(--brand);width:15px;height:15px;cursor:pointer;}
.th-dc-meta{color:var(--muted);}
.th-delegate-courses-empty{font-size:12.5px;color:var(--muted);margin:0;}

/* ===== Assign-courses modal ===== */
.th-assign-box{width:760px;max-width:96vw;max-height:88vh;background:var(--surface);border-radius:20px;border:1px solid var(--line);box-shadow:0 40px 90px -34px rgba(15,18,49,.65);display:flex;flex-direction:column;overflow:hidden;}

/* header — gradient banner with icon + subtitle */
.th-assign-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:20px 22px;background:linear-gradient(120deg,var(--ink),var(--brand-2));color:#fff;}
.th-assign-head-main{display:flex;align-items:center;gap:13px;}
.th-assign-head-ic{width:42px;height:42px;border-radius:12px;background:rgba(255,255,255,.14);display:grid;place-items:center;color:#fff;flex-shrink:0;}
.th-assign-head b{font-size:17px;color:#fff;line-height:1.2;display:block;}
.th-assign-head-sub{font-size:12.5px;color:#D6D2EC;margin-top:3px;}
.th-assign-head .th-set-x{color:#D6D2EC;}
.th-assign-head .th-set-x:hover{color:#fff;}

.th-assign-body{padding:20px 24px;overflow-y:auto;flex:1;}

/* table */
.th-assign-table{min-width:0;width:100%;}
.th-assign-table td,.th-assign-table th{white-space:normal;padding:14px 18px;vertical-align:middle;}
.th-assign-table th{font-size:11.5px;}
.th-assign-table tbody td{font-size:14px;}
.th-assign-table tbody tr{transition:background .12s ease;}
.th-assign-table tbody tr:hover{background:#FBFAF6;}
.th-assign-table tbody tr:last-child td{border-bottom:none;}
.th-assign-table tbody tr.th-assign-selected{background:var(--brand-soft);}
.th-assign-table tbody tr.th-assign-selected:hover{background:var(--brand-soft);}
.th-assign-table tbody tr.th-assign-selected td.strong{color:var(--brand-2);}
.th-assign-check-col{width:56px;text-align:center;padding-left:20px;padding-right:8px;}
.th-assign-check-col input{accent-color:var(--brand);width:17px;height:17px;cursor:pointer;}
.th-assign-cell-label{cursor:pointer;margin:0;}

/* footer */
.th-assign-foot{display:flex;justify-content:space-between;align-items:center;padding:14px 22px;border-top:1px solid var(--line);background:#FBFAFE;}
.th-assign-count{font-size:13px;color:var(--muted);font-weight:600;}
.th-assign-foot-actions{display:flex;gap:10px;}

/* inline button spinner */
.th-spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:th-spin .6s linear infinite;vertical-align:-2px;}
@keyframes th-spin{to{transform:rotate(360deg);}}

/* ===== Appearance: theme picker (light / dark) ===== */
.th-theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.th-theme-opt{display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden;background:var(--surface);border:2px solid var(--line);border-radius:14px;cursor:pointer;text-align:left;transition:border-color .15s,box-shadow .15s;}
.th-theme-opt:hover{border-color:var(--brand);}
.th-theme-opt.is-selected{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
.th-theme-preview{display:flex;gap:6px;padding:14px;height:64px;align-items:stretch;}
.th-theme-preview span{flex:1;border-radius:7px;}
.th-theme-preview-light{background:#F3F2F8;}
.th-theme-preview-light span:first-child{background:#fff;border:1px solid #E4E2EF;}
.th-theme-preview-light span:last-child{background:var(--brand);}
.th-theme-preview-dark{background:#15172B;}
.th-theme-preview-dark span:first-child{background:#222545;}
.th-theme-preview-dark span:last-child{background:var(--brand);}
.th-theme-row{display:flex;align-items:center;gap:8px;padding:11px 13px;font-size:14px;color:var(--ink);border-top:1px solid var(--line);}
.th-theme-active{display:none;}
.th-theme-opt.is-selected .th-theme-active{display:inline-flex;}

/* ===== Dark theme — overrides the portal palette vars ===== */
.th-portal[data-theme="dark"]{
  --paper:#0F1124; --surface:#1A1C33; --ink:#F4F4FA; --ink-2:#E7E7F2;
  --line:#2C2F4D; --muted:#9B9AB5; --text:#E7E7F2;
  --brand-soft:#2A2550;
  --slate-bg:#26283f; --emerald-bg:#16321f; --amber-bg:#3a2c12; --rose-bg:#3a1f27;
  --indigo-bg:#241f45; --sky-bg:#13283a;
}
.th-portal[data-theme="dark"] .th-ms-header{background:var(--surface);}
.th-portal[data-theme="dark"] .th-table thead tr,
.th-portal[data-theme="dark"] .th-assign-table thead th{background:#20223c;}
.th-portal[data-theme="dark"] .th-row:hover,
.th-portal[data-theme="dark"] .th-table tbody tr:hover{background:#22243f;}
.th-portal[data-theme="dark"] .th-input,
.th-portal[data-theme="dark"] .th-card{background:var(--surface);}
.th-portal[data-theme="dark"] .th-bg-soft{background:#20223c;}

/* ===== My Requests modal ===== */
.th-req-box{width:820px;}
/* Branded header — uses the user's portal brand colours (inherited from .th-portal). */
.th-req-box .th-assign-head{background:linear-gradient(120deg,var(--brand),var(--brand-2));}
.th-req-box .th-assign-head-ic{background:rgba(255,255,255,.18);}
/* status pill dots */
.th-pill .pdot.th-dot-emerald{background:var(--emerald);}
.th-pill .pdot.th-dot-amber{background:var(--amber);}
.th-pill .pdot.th-dot-brand{background:var(--brand);}
.th-pill .pdot.th-dot-slate{background:var(--slate);}
/* rows that can't be requested read as muted */
#th-req-courselist tr:has(input:disabled) td.strong{color:var(--muted);font-weight:500;}
#th-req-courselist tr:has(input:disabled){background:#FCFCFE;}
#th-req-courselist .th-assign-check-col input:disabled{opacity:.4;cursor:not-allowed;}
.th-req-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.th-req-section-title{font-size:15px;font-weight:700;color:var(--ink);}
.th-req-section-note{font-size:12.5px;color:var(--muted);}
.th-req-divider{height:1px;background:var(--line);margin:20px 0 16px;}
.th-req-list{display:flex;flex-direction:column;gap:8px;}
.th-req-item{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:11px 14px;}
.th-req-item-main{display:flex;flex-direction:column;gap:2px;min-width:0;}
.th-req-item-title{font-size:14px;font-weight:600;color:var(--ink);}
.th-req-item-date{font-size:12px;color:var(--muted);}

/* DataTables controls themed to match the app (shared by assign + requests modals) */
.th-assign-box .dt-container{width:100%;}
.th-assign-box .dt-layout-row{margin:0;align-items:center;}
.th-assign-box .dt-layout-top{display:block;margin-bottom:18px;}
.th-assign-box .dt-layout-top > div,
.th-assign-box .dt-layout-cell{width:100%;max-width:100%;flex:1 1 100%;}
.th-assign-box .dt-search{text-align:left;position:relative;width:100%;margin-bottom:0;}
.th-assign-box .dt-search label{display:none;}
.th-assign-box .dt-search input,
.th-assign-box input.dt-input{font-family:inherit;font-size:14px;padding:10px 14px 10px 38px !important;border:1px solid var(--line);border-radius:10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6A85' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center;color:var(--text);outline:none;margin:0;width:100%;box-sizing:border-box;}
.th-assign-box .dt-search input:focus,
.th-assign-box input.dt-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
/* frame the table in a rounded bordered card */
.th-assign-box table.dataTable{border:1px solid var(--line);border-radius:14px;overflow:hidden;border-collapse:separate;border-spacing:0;box-shadow:0 1px 2px rgba(20,20,25,.04);}
.th-assign-box table.dataTable thead th{border-bottom:1px solid var(--line);background:#FBFAF6;}
/* bottom row: info left, paging right */
.th-assign-box .dt-layout-bottom{margin-top:12px;}
.th-assign-box .dt-info{font-size:13px;color:var(--muted);padding-top:0;}
.th-assign-box .dt-paging .dt-paging-button{padding:5px 11px;margin-left:4px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--brand);font-size:13px;cursor:pointer;}
.th-assign-box .dt-paging .dt-paging-button.current{background:var(--brand);border-color:transparent;color:#fff;}
.th-assign-box .dt-paging .dt-paging-button.disabled{opacity:.5;cursor:not-allowed;}
.th-assign-box table.dataTable thead th .dt-column-order{opacity:.45;}

/* ===== Order course rows (course + price + delivery type + remove) ===== */
.th-oc-head{align-items:center;gap:12px;padding:0 2px 6px;font-size:11.5px;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);font-weight:700;}
.th-oc-row{display:flex;align-items:flex-start;gap:12px;margin-bottom:10px;flex-wrap:wrap;}
.th-oc-col-course{flex:1 1 260px;min-width:0;}
.th-oc-col-currency{flex:0 0 150px;}
.th-oc-col-price{flex:0 0 160px;}
.th-oc-col-delivery{flex:0 0 180px;}
.th-oc-col-action{flex:0 0 44px;}
.th-oc-head .th-oc-col-action{flex:0 0 44px;}
/* centre the currency + price header labels over their inputs */
.th-oc-head .th-oc-col-currency,
.th-oc-head .th-oc-col-price{display:block;text-align:center;}
@media (max-width:760px){
  .th-oc-col-course,.th-oc-col-currency,.th-oc-col-price,.th-oc-col-delivery{flex:1 1 100%;}
}

/* lightweight toast */
.th-toast-wrap{position:fixed;top:22px;right:22px;z-index:120;display:flex;flex-direction:column;gap:12px;align-items:flex-end;pointer-events:none;}
.th-toast{display:flex;align-items:center;gap:13px;padding:15px 22px 15px 18px;border-radius:14px;font-size:15px;font-weight:600;box-shadow:0 28px 70px -24px rgba(15,18,49,.35);min-width:300px;max-width:440px;border:1px solid transparent;opacity:0;transform:translateX(20px) scale(.98);transition:opacity .25s ease,transform .25s cubic-bezier(.2,.8,.3,1);}
.th-toast.th-toast-in{opacity:1;transform:translateX(0) scale(1);}
.th-toast-success{background:var(--brand-soft);color:var(--brand-2);border-color:color-mix(in srgb,var(--brand) 30%,#fff);}
.th-toast-error{background:var(--rose-bg);color:var(--rose);border-color:#f3c6d1;}
.th-toast-ic{flex-shrink:0;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;}
.th-toast-ic .lucide{width:20px;height:20px;}
.th-toast-success .th-toast-ic{background:#fff;color:var(--brand);}
.th-toast-error .th-toast-ic{background:#fff;color:var(--rose);}
.th-toast-msg{line-height:1.4;}

/* inline form alert (validation errors) */
.th-alert{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:10px;font-size:13.5px;font-weight:500;line-height:1.4;border:1px solid transparent;}
.th-alert-ic{flex-shrink:0;width:24px;height:24px;border-radius:7px;display:grid;place-items:center;background:#fff;}
.th-alert-ic .lucide{width:15px;height:15px;}
.th-alert-body{display:flex;flex-direction:column;gap:2px;}
.th-alert-error{background:var(--rose-bg);color:var(--rose);border-color:#f3c6d1;}
.th-alert-error .th-alert-ic{color:var(--rose);}
.th-alert-x{flex-shrink:0;margin-left:auto;border:none;background:transparent;color:inherit;cursor:pointer;padding:3px;border-radius:6px;display:grid;place-items:center;opacity:.6;transition:opacity .15s ease,background .15s ease;}
.th-alert-x:hover{opacity:1;background:rgba(0,0,0,.06);}
.th-alert-x .lucide{width:15px;height:15px;}

