/* ================================================================
   DTTASA Portal — Head of IT Centre
   ----------------------------------------------------------------
   Mirrors css/it-board.css visual language (gold accents, glass
   panels, sidebar layout). Adds it-head-specific layout pieces.
   Only styles unique to this page live here — shared tokens come
   from utilities.css + responsive.css + the linked it-board.css.
   ================================================================ */

/* Clearance gate (HoIT-only) */
#clearance-screen {
  position:fixed; inset:0; z-index:99999;
  background:rgba(5,9,5,.97);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  display:flex; align-items:center; justify-content:center;
  padding:24px; font-family:'DM Sans',sans-serif;
}
#clearance-screen .clr-box {
  background:rgba(15,22,12,.95);
  border:1px solid rgba(232,64,64,.3);
  border-radius:20px; padding:40px 32px;
  max-width:520px; width:100%; text-align:center;
}
#clearance-screen .clr-box i { font-size:48px; color:#ff4848; margin-bottom:18px; display:block; }
#clearance-screen .clr-box h2 {
  font-family:'Cinzel',serif; font-size:22px; font-weight:700;
  color:#f2f7ee; margin-bottom:12px; letter-spacing:.5px;
}
#clearance-screen .clr-box p { font-size:14px; color:rgba(242,247,238,.65); margin-bottom:24px; line-height:1.55; }
#clearance-screen .clr-box .btn { margin:6px; }

/* App shell */
#it-app { min-height:100vh; }

/* Header — NOT inherited from it-board.css (which uses #it-nav-outer instead
   of #hdr). Mirrors the my-hub / hr-head pattern so the back button, brand,
   page pill, user chip, role badge and sign-out align left-right on one row. */
#hdr {
  position:fixed; top:0; left:0; right:0;
  height:var(--hdh, 66px);
  background:rgba(15,23,12,.92);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border, rgba(255,255,255,.21));
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px; gap:12px;
  z-index:600;
  animation:hdrDrop .5s cubic-bezier(.16,1,.3,1) both;
}
@keyframes hdrDrop { from { transform:translateY(-12px); opacity:0; } to { transform:none; opacity:1; } }
.hdr-left, .hdr-right { display:flex; align-items:center; gap:12px; min-width:0; }
.hdr-right { flex-shrink:0; }
.hdr-back-btn {
  display:flex; align-items:center; gap:7px; cursor:pointer;
  color:rgba(242,247,238,.62); font-size:13px; font-weight:600;
  padding:7px 12px; border-radius:8px;
  border:1px solid var(--border, rgba(255,255,255,.21));
  background:var(--panel, rgba(255,255,255,.10));
  transition:.25s cubic-bezier(.16,1,.3,1);
  flex-shrink:0; white-space:nowrap;
}
.hdr-back-btn:hover { color:#f2f7eb; background:var(--panel2, rgba(255,255,255,.23)); }
.brand-logo-wrap { display:flex; align-items:center; flex-shrink:0; }
.brand-logo { font-family:'Cinzel',serif; font-size:18px; font-weight:900; letter-spacing:4px; color:#f0c832; }
.page-pill {
  display:inline-flex; align-items:center; gap:7px;
  font-size:11px; font-weight:700; color:rgba(242,247,238,.78);
  background:var(--panel, rgba(255,255,255,.10));
  border:1px solid var(--border, rgba(255,255,255,.21));
  padding:5px 12px; border-radius:20px;
  white-space:nowrap;
}
.page-pill i { color:#f0c832; }
.hdr-user-chip {
  display:flex; align-items:center; gap:9px;
  background:var(--panel, rgba(255,255,255,.10));
  border:1px solid var(--border, rgba(255,255,255,.21));
  border-radius:30px;
  padding:5px 14px 5px 6px;
  max-width:240px; min-width:0;
}
.hdr-user-chip span {
  font-size:13px; font-weight:600; color:rgba(242,247,238,.85);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hdr-user-av {
  width:32px; height:32px; border-radius:50%;
  background:rgba(212,175,55,.18);
  border:1px solid rgba(212,175,55,.3);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:#f0c832;
  overflow:hidden; flex-shrink:0;
}
.hdr-icon-btn {
  background:var(--panel, rgba(255,255,255,.10));
  border:1px solid var(--border, rgba(255,255,255,.21));
  border-radius:8px; color:rgba(242,247,238,.62);
  width:36px; height:36px;
  cursor:pointer; font-size:14px;
  transition:.25s cubic-bezier(.16,1,.3,1);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.hdr-icon-btn:hover { color:#ff7878; border-color:rgba(255,72,72,.4); }
.badge-it-head {
  background:rgba(240,200,50,.18); color:#f0c832;
  border:1px solid rgba(240,200,50,.36);
  font-size:10px; font-weight:800; letter-spacing:.9px;
  padding:5px 10px; border-radius:6px;
  white-space:nowrap; flex-shrink:0;
}

@media (max-width:820px) {
  #hdr { padding:0 14px; }
  .page-pill { display:none; }
  .hdr-user-chip { max-width:160px; }
  .hdr-user-chip span { display:none; }
  .hdr-back-btn span { display:none; }
  .badge-it-head { display:none; }
}

/* Sidebar */
#ith-sidebar {
  position:fixed; left:0; top:var(--hdh, 70px); bottom:0;
  width:var(--sbw, 278px); overflow-y:auto;
  background:rgba(12,17,9,.92);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-right:1px solid var(--border, rgba(255,255,255,.21));
  padding:18px 14px 60px;
  z-index:500;
  animation:sbIn .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes sbIn { from { transform:translateX(-12px); opacity:0; } to { transform:none; opacity:1; } }
.ith-nav-div {
  font-size:10px; font-weight:800; letter-spacing:1.5px;
  text-transform:uppercase; color:rgba(242,247,238,.42);
  padding:14px 12px 6px; border-bottom:1px solid rgba(255,255,255,.06);
  margin-bottom:6px;
}
.ith-nav-div:not(:first-child) { margin-top:14px; }
.ith-nav-item {
  display:flex; align-items:center; gap:10px;
  padding:11px 12px; margin-bottom:3px; border-radius:9px;
  font-size:13px; font-weight:600; color:rgba(242,247,238,.78);
  cursor:pointer; transition:background .25s ease, color .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
  min-height:44px;
}
.ith-nav-item i { width:18px; text-align:center; color:#f0c832; font-size:13px; }
.ith-nav-item span { flex:1; }
.ith-nav-item:hover { background:rgba(212,175,55,.08); color:#f2f7eb; }
.ith-nav-item.active { background:rgba(212,175,55,.16); color:#f0c832; border:1px solid rgba(212,175,55,.3); }
.ith-nav-item.danger i { color:#ff4848; }
.ith-nav-item.danger:hover { background:rgba(232,64,64,.10); color:#ff7575; }

/* Main */
#ith-main {
  margin-left:var(--sbw, 278px);
  padding:calc(var(--hdh, 70px) + 24px) 28px 60px;
  min-height:100vh;
}
.ith-section { display:none; animation:cvIn .4s cubic-bezier(.16,1,.3,1) both; }
.ith-section.active { display:block; }
@keyframes cvIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.sec-head { margin-bottom:20px; }
.sec-head h2 {
  font-family:'Cinzel',serif; font-size:22px; font-weight:700;
  color:#f2f7ee; margin-bottom:6px; display:flex; align-items:center; gap:10px;
}
.sec-head .sec-desc { font-size:13px; color:rgba(242,247,238,.62); line-height:1.55; max-width:780px; }

/* KPI strip on dashboard */
.kpi-grid {
  display:grid; gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom:24px;
}
.kpi-pill {
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.21);
  border-radius:14px; padding:18px 20px;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  transition:transform .25s, background .25s;
}
.kpi-pill.u-click { cursor:pointer; }
.kpi-pill.u-click:hover { transform:translateY(-2px); background:rgba(212,175,55,.10); }
.kpi-pill .kpi-label { font-size:11px; font-weight:700; color:rgba(242,247,238,.55); letter-spacing:.8px; text-transform:uppercase; }
.kpi-pill .kpi-val   { font-size:30px; font-weight:800; color:#f0c832; margin:6px 0 4px; font-family:'IBM Plex Mono',monospace; }
.kpi-pill .kpi-sub   { font-size:12px; color:rgba(242,247,238,.62); }

/* Cards grid (dashboard secondary) */
.ith-cards-grid {
  display:grid; gap:16px;
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
}
.ith-card.glass {
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.21);
  border-radius:16px; padding:22px;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
}
.ith-card h3 {
  font-family:'Cinzel',serif; font-size:15px; font-weight:600;
  color:#f2f7ee; margin-bottom:14px; display:flex; align-items:center; gap:8px;
}

.quick-actions { display:flex; flex-direction:column; gap:8px; }
.btn-full { width:100%; justify-content:flex-start; }

/* Live tasks list on dashboard */
.ith-live-tasks { display:flex; flex-direction:column; gap:8px; max-height:340px; overflow-y:auto; }
.ith-live-task-row {
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:10px;
  background:rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.06);
}
.ith-live-task-row .name { font-weight:700; color:#f2f7ee; flex:1; font-size:13px; }
.ith-live-task-row .status { font-size:11px; font-weight:700; padding:3px 9px; border-radius:5px; letter-spacing:.5px; text-transform:uppercase; }
.ith-live-task-row .status.activated { background:rgba(76,214,87,.15); color:#4cd657; border:1px solid rgba(76,214,87,.3); }
.ith-live-task-row .status.inactive  { background:rgba(160,160,160,.12); color:rgba(242,247,238,.55); border:1px solid rgba(255,255,255,.08); }
.ith-live-task-row .pips { display:inline-flex; gap:3px; }
.ith-live-task-row .pip {
  width:9px; height:9px; border-radius:50%;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16);
}
.ith-live-task-row .pip.done { background:#4cd657; border-color:#4cd657; }
.ith-live-empty { font-size:13px; color:rgba(242,247,238,.55); text-align:center; padding:20px; }

/* Filters bar */
.ith-filters {
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px;
}
.ith-filters .gi {
  flex:1; min-width:200px;
  padding:11px 13px; border-radius:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.18);
  color:#f2f7ee; font-size:14px;
}
.ith-filters .gi:focus { outline:none; border-color:#f0c832; }

/* Activation list */
.ith-list { display:flex; flex-direction:column; gap:8px; }
.ith-list-row {
  display:flex; align-items:center; gap:14px;
  padding:14px 16px; border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.16);
  transition:background .2s, transform .2s;
}
.ith-list-row:hover { background:rgba(255,255,255,.10); }
.ith-list-row .row-av {
  width:42px; height:42px; border-radius:50%;
  background:rgba(212,175,55,.18); color:#f0c832;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; flex-shrink:0; overflow:hidden;
}
.ith-list-row .row-av img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.ith-list-row .row-meta { flex:1; min-width:0; }
.ith-list-row .row-meta .name { font-weight:700; font-size:14px; color:#f2f7ee; }
.ith-list-row .row-meta .sub  { font-size:11px; color:rgba(242,247,238,.55); margin-top:2px; }
.ith-list-row .row-state {
  font-size:11px; font-weight:800; letter-spacing:.7px; text-transform:uppercase;
  padding:5px 10px; border-radius:6px;
}
.ith-list-row .row-state.active   { background:rgba(76,214,87,.16); color:#4cd657; border:1px solid rgba(76,214,87,.32); }
.ith-list-row .row-state.inactive { background:rgba(160,160,160,.14); color:rgba(242,247,238,.55); border:1px solid rgba(255,255,255,.10); }
.ith-list-row .row-action button {
  font-size:12px; padding:8px 14px; border-radius:9px;
  font-weight:700; cursor:pointer; border:none;
  transition:all .2s;
}
.ith-list-row .row-action .activate {
  background:rgba(76,214,87,.16); color:#4cd657; border:1px solid rgba(76,214,87,.32);
}
.ith-list-row .row-action .activate:hover { background:rgba(76,214,87,.26); }
.ith-list-row .row-action .deactivate {
  background:rgba(232,64,64,.12); color:#ff7878; border:1px solid rgba(232,64,64,.28);
}
.ith-list-row .row-action .deactivate:hover { background:rgba(232,64,64,.20); }

/* Stub cards for sections being migrated in Phase 2 */
.ith-stub-card {
  background:rgba(255,255,255,.06);
  border:1px solid rgba(212,175,55,.22);
  border-radius:16px;
  padding:36px 28px;
  text-align:center;
}
.ith-stub-card i.u-fs28 { font-size:30px; margin-bottom:14px; display:block; opacity:.8; }
.ith-stub-card h3 {
  font-family:'Cinzel',serif; font-size:17px; font-weight:600;
  color:#f2f7ee; margin-bottom:8px;
}
.ith-stub-card p { font-size:13px; color:rgba(242,247,238,.62); margin-bottom:18px; line-height:1.6; max-width:520px; margin-left:auto; margin-right:auto; }

/* Skeletons */
.skel { display:block; min-height:48px; border-radius:10px;
  background:linear-gradient(90deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.06) 100%);
  background-size:200% 100%; animation:shim 1.5s ease-in-out infinite;
}
.skel.s-tasks { min-height:80px; }
.skel.s-list  { min-height:160px; }
@keyframes shim { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }

/* Loading screen */
#loading-screen {
  position:fixed; inset:0; z-index:99998;
  background:#0c1109;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-family:'DM Sans',sans-serif;
}
#loading-screen .loading-logo {
  font-family:'Cinzel',serif; font-size:36px; font-weight:900;
  color:#f0c832; letter-spacing:6px; margin-bottom:24px;
}
#loading-screen .loading-ring {
  width:44px; height:44px; border:3px solid rgba(240,200,50,.18);
  border-top-color:#f0c832; border-radius:50%;
  animation:spin 0.9s linear infinite; margin-bottom:18px;
}
@keyframes spin { to { transform:rotate(360deg); } }
#loading-screen .loading-label { font-size:12px; color:rgba(242,247,238,.55); letter-spacing:.8px; }

/* Hamburger / overlay for mobile */
#hamburger {
  display:none; position:fixed; top:18px; left:18px; z-index:600;
  width:44px; height:44px; border-radius:10px;
  background:rgba(15,22,12,.95); border:1px solid rgba(255,255,255,.18);
  align-items:center; justify-content:center; cursor:pointer; color:#f0c832;
}
#sb-overlay { display:none; position:fixed; inset:0; z-index:400; background:rgba(0,0,0,.55); }

/* Mobile ≤820px */
@media (max-width:820px) {
  #ith-sidebar { transform:translateX(-100%); width:280px; transition:transform .3s cubic-bezier(.16,1,.3,1); }
  body.ith-sb-open #ith-sidebar { transform:none; }
  body.ith-sb-open #sb-overlay { display:block; }
  #ith-main { margin-left:0; padding:calc(var(--hdh, 70px) + 18px) 16px 60px; }
  #hamburger { display:flex; }
  #hdr .hdr-left .page-pill { display:none; }
}
@media (max-width:540px) {
  .kpi-grid { grid-template-columns:repeat(2, 1fr); }
  .ith-cards-grid { grid-template-columns:1fr; }
  .ith-list-row { flex-wrap:wrap; }
  .ith-list-row .row-action { width:100%; margin-top:6px; }
  .ith-list-row .row-action button { width:100%; }
}

/* ── Team Accountability rows ── */
.ith-acc-row {
  flex-wrap:wrap;
  align-items:flex-start;
}
.ith-acc-row .row-meta { width:100%; flex:1; }
.ith-acc-summary {
  display:flex; flex-wrap:wrap; gap:14px;
  font-size:12px; color:rgba(242,247,238,.72);
  margin-top:8px;
}
.ith-acc-summary i { margin-right:5px; }
.ith-acc-notes {
  margin-top:14px;
  padding:14px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
}
.ith-acc-notes-hd {
  font-size:11px; font-weight:800; letter-spacing:.8px;
  text-transform:uppercase; color:rgba(242,247,238,.62);
  margin-bottom:10px;
}
.ith-acc-note {
  padding:10px 12px;
  border-radius:8px;
  background:rgba(240,200,50,.04);
  border:1px solid rgba(240,200,50,.14);
  margin-bottom:8px;
}
.ith-acc-note:last-child { margin-bottom:0; }
.ith-acc-note-task {
  font-size:12px; font-weight:700; color:#f0c832;
  text-transform:uppercase; letter-spacing:.6px;
  margin-bottom:4px;
}
.ith-acc-note-body {
  font-size:13px; color:#f2f7ee; line-height:1.55;
}
.ith-acc-actions {
  margin-top:14px;
  display:flex; justify-content:flex-end; gap:8px;
}

/* ── System config rows ── */
.ith-cfg-row {
  display:flex; align-items:center; gap:14px;
  padding:14px 0;
}
.ith-cfg-meta { flex:1; min-width:0; }
.ith-cfg-label {
  font-size:13px; font-weight:700; color:#f2f7ee;
  margin-bottom:4px;
}
.ith-cfg-label code {
  background:rgba(0,0,0,.4);
  padding:1px 6px; border-radius:4px;
  font-size:11px; color:#f0c832;
}
.ith-cfg-sub {
  font-size:12px; color:rgba(242,247,238,.62); line-height:1.5;
}
.ith-cfg-sub code {
  background:rgba(0,0,0,.4);
  padding:1px 5px; border-radius:4px;
  font-size:10.5px; color:#f0c832;
}
.ith-cfg-foot {
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.08);
  line-height:1.55;
}
.ith-cfg-foot code {
  background:rgba(0,0,0,.4);
  padding:1px 5px; border-radius:4px;
  font-size:10.5px; color:#f0c832;
}

/* ── Escalation rows ── */
.ith-pill {
  display:inline-block;
  font-size:10px; font-weight:800; letter-spacing:.6px; text-transform:uppercase;
  padding:2px 7px; border-radius:5px;
  margin-right:4px;
}
.ith-pill.red   { background:rgba(232,64,64,.16); color:#ff7575; border:1px solid rgba(232,64,64,.32); }
.ith-pill.amber { background:rgba(245,158,11,.16); color:#ffb74d; border:1px solid rgba(245,158,11,.32); }
.ith-pill.gold  { background:rgba(240,200,50,.16); color:#f0c832; border:1px solid rgba(240,200,50,.32); }
.ith-pill.grey  { background:rgba(160,160,160,.16); color:rgba(242,247,238,.65); border:1px solid rgba(255,255,255,.10); }
.ith-esc-row .row-meta .sub { display:flex; flex-wrap:wrap; gap:4px 6px; align-items:center; }
.ith-esc-note {
  margin-top:8px; padding:8px 12px;
  background:rgba(245,158,11,.07); border:1px solid rgba(245,158,11,.18);
  border-radius:7px; font-size:12.5px; color:#f2f7ee; line-height:1.55;
}
.ith-esc-actions { display:flex; flex-direction:column; gap:6px; flex-shrink:0; min-width:140px; }
.ith-esc-actions a, .ith-esc-actions button {
  font-size:11.5px; padding:7px 10px; border-radius:8px;
  font-weight:700; text-decoration:none; text-align:center;
  background:rgba(76,214,87,.10); color:#4cd657; border:1px solid rgba(76,214,87,.26);
  cursor:pointer; display:inline-flex; align-items:center; gap:5px; justify-content:center;
}
.ith-esc-actions button.deactivate { background:rgba(232,64,64,.10); color:#ff7878; border-color:rgba(232,64,64,.26); }
.ith-esc-actions a { background:rgba(212,175,55,.10); color:#f0c832; border-color:rgba(212,175,55,.26); }

/* ── Audit table ── */
.ith-audit-table-wrap {
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.14);
  border-radius:11px;
  overflow:hidden;
}
.ith-audit-table {
  width:100%; border-collapse:collapse;
  font-size:12.5px; color:#f2f7ee;
  font-family:'DM Sans', sans-serif;
}
.ith-audit-table thead th {
  background:rgba(0,0,0,.32);
  text-align:left; padding:11px 14px;
  font-size:10px; font-weight:800; letter-spacing:1px;
  color:rgba(242,247,238,.55); text-transform:uppercase;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.ith-audit-table tbody td {
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,.05);
  vertical-align:top;
}
.ith-audit-table tbody tr:hover { background:rgba(212,175,55,.04); }
.ith-audit-action { color:#f0c832; font-weight:700; }
.ith-audit-target { color:rgba(242,247,238,.78); }
.ith-audit-reason { font-size:11px; color:rgba(242,247,238,.50); margin-top:3px; font-style:italic; }
@media (max-width:640px) {
  .ith-audit-table thead { display:none; }
  .ith-audit-table tbody td { display:block; padding:5px 12px; border-bottom:none; }
  .ith-audit-table tbody tr { padding:10px 0; border-bottom:1px solid rgba(255,255,255,.08); display:block; }
}

/* ── Deep-link cards (Esc / Audit / Bulk Ops) ── */
.ith-deeplink-row {
  display:flex; align-items:center; gap:18px;
  padding:8px 0 4px;
}
.ith-deeplink-meta { flex:1; }
.ith-deeplink-count {
  font-size:36px; font-weight:800; color:#f0c832;
  font-family:'IBM Plex Mono', monospace;
  line-height:1; margin-bottom:4px;
}
.ith-deeplink-label {
  font-size:12px; color:rgba(242,247,238,.62);
}
@media (max-width:540px) {
  .ith-deeplink-row { flex-direction:column; align-items:flex-start; }
  .ith-deeplink-row .btn { width:100%; justify-content:center; }
}
