:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e6e8ec;
  --border-strong: #d6dae1;
  --ink: #171d28;
  --ink-soft: #596072;
  --ink-faint: #949aa8;
  --navy: #14233d;
  --navy-2: #24365a;
  --accent: #2f6df6;
  --accent-hover: #245fe0;
  --accent-soft: #eaf1ff;
  --danger: #c23b3b;
  --danger-soft: rgba(194, 59, 59, .1);
  --shadow-sm: 0 1px 2px rgba(23, 29, 40, .05);
  --shadow-md: 0 1px 2px rgba(23, 29, 40, .04), 0 6px 20px rgba(23, 29, 40, .06);
  --radius: 14px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1119;
    --surface: #161c28;
    --surface-2: #1b2331;
    --border: #29313f;
    --border-strong: #37414f;
    --ink: #eef1f6;
    --ink-soft: #a6afbe;
    --ink-faint: #6f7887;
    --navy: #0a1526;
    --navy-2: #1b2c4c;
    --accent: #5a8bff;
    --accent-hover: #6f9bff;
    --accent-soft: #18233a;
    --danger: #e2726f;
    --danger-soft: rgba(226, 114, 111, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .38);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--accent); }

/* ---------------- Brand ---------------- */
.brand { display: flex; align-items: center; gap: 14px; }
.signin-brand { flex-direction: column; align-items: flex-start; gap: 14px; }
.brand-logo { width: 220px; max-width: 100%; height: auto; border-radius: 8px; display: block; }
.brand-sub { margin: 0; color: var(--ink-soft); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.topbar-logo { height: 26px; width: auto; border-radius: 5px; display: block; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
  color: #fff; font-weight: 700; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none;
}

/* ---------------- Sign in ---------------- */
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.signin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-md);
  padding: 40px 38px; width: 100%; max-width: 400px;
}
.signin-lead { margin: 28px 0 20px; color: var(--ink-soft); font-size: 15px; }
.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 18px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.google-btn:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.google-btn:active { transform: translateY(1px); }
.g-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #4285f4; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  border: 1px solid #dadce0;
}
.signin-note { margin: 24px 0 0; font-size: 12.5px; color: var(--ink-faint); text-align: center; }
.signin-error { margin: 16px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; }
.demo-banner { margin: 20px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; text-align: center; }

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 24px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-weight: 600; font-size: 14.5px; color: var(--ink-soft); }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.user-email { font-size: 13px; color: var(--ink-soft); }
.role-switcher-wrap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-faint); }
.role-switcher-wrap select {
  font: inherit; font-size: 12.5px; padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
}

/* ---------------- Buttons ---------------- */
.ghost-btn {
  font: inherit; font-size: 13px; font-weight: 500; padding: 8px 15px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface-2); }
.ghost-btn.danger { color: var(--danger); }
.ghost-btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.pill-btn {
  font: inherit; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.pill-btn:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(47, 109, 246, .28); }
.preview-badge { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------------- Portal ---------------- */
.portal { max-width: 1120px; margin: 0 auto; padding: 40px 24px 72px; }
.welcome { font-size: 26px; font-weight: 680; letter-spacing: -.02em; margin: 0 0 22px; }

.section { margin-bottom: 44px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 3px; color: var(--ink-soft); }
.section-sub { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-faint); }

/* ---------------- Cards ---------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; align-items: stretch; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card:has(.card-link:hover) { border-color: var(--accent); }

.card-link {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 17px; text-decoration: none; color: inherit; flex: 1;
}
a.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.card:hover .card-icon { border-color: var(--border-strong); }
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-title { font-weight: 640; font-size: 14.5px; letter-spacing: -.01em; line-height: 1.3; }
.card-desc { font-size: 12.8px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.card-tag {
  align-self: flex-start; margin-top: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px;
}
.card-stamp { margin-top: 8px; font-size: 11px; color: var(--ink-faint); }

/* footer chips live inside the card, above the stretched link */
.card-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; padding: 0 17px 14px; margin-top: -2px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
  background: var(--surface); transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }

.empty-note { font-size: 13.5px; color: var(--ink-faint); font-style: italic; }

/* ---------- Company SOPs ---------- */
.division-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-faint); margin: 26px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sops-top { margin-bottom: 8px; }

/* ---------- announcement banner ---------- */
.announce {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink); border-radius: 12px; padding: 13px 16px;
  font-size: 14.5px; margin-bottom: 24px;
}
.announce::before { content: "📣"; font-size: 16px; }

/* ---------- search ---------- */
.search-wrap { display: flex; gap: 10px; align-items: center; margin: 0 0 28px; }
.search {
  flex: 1; max-width: 480px; font: inherit; font-size: 14.5px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); outline: none; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search::placeholder { color: var(--ink-faint); }
.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* deep search results */
.deep-results { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: -14px 0 26px; font-size: 14px; box-shadow: var(--shadow-sm); }
.deep-results h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.deep-hit { display: block; padding: 6px 0; color: var(--accent); text-decoration: none; }
.deep-hit:hover { text-decoration: underline; }

/* ---------- request access ---------- */
.card-locked .card-icon { opacity: .8; }
.card-locked .card-title { color: var(--ink-soft); }
.req-btn {
  position: relative; z-index: 1; font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); cursor: pointer; transition: background .15s;
}
.req-btn:hover { background: var(--accent-soft); }
.req-btn:disabled { opacity: .6; cursor: default; }

/* ---------------- Footer ---------------- */
.portal-footer { text-align: center; padding: 28px; font-size: 12px; color: var(--ink-faint); border-top: 1px solid var(--border); }

/* ---------------- Admin: tabs & panes ---------------- */
.admin-tabs { display: flex; gap: 4px; max-width: 1120px; margin: 22px auto 0; padding: 0 24px; }
.admin-tab {
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 18px;
  border: 1px solid transparent; border-bottom: none; border-radius: 10px 10px 0 0;
  background: transparent; color: var(--ink-faint); cursor: pointer; transition: color .15s, background .15s;
}
.admin-tab:hover { color: var(--ink-soft); background: var(--surface-2); }
.admin-tab.selected { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: 0 -1px 0 var(--accent) inset; }
.admin-pane { max-width: 1120px; margin: 0 auto; padding: 24px; }
.pane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pane-head h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.pane-sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin: 24px 0 10px; }

/* catalog editor */
.app-rows { display: flex; flex-direction: column; gap: 6px; }
.app-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; transition: border-color .15s;
}
.app-row:hover { border-color: var(--border-strong); }
.app-row-move { display: inline-flex; gap: 2px; flex: none; }
.mv-btn {
  font: inherit; font-size: 12px; line-height: 1; width: 24px; height: 24px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
  color: var(--ink-soft); cursor: pointer; padding: 0;
}
.mv-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mv-btn:disabled { opacity: .3; cursor: default; }
.app-row-icon { width: 24px; text-align: center; font-size: 16px; }
.app-row-title { flex: 1; font-weight: 600; }
.app-row-title em { font-weight: 400; font-style: normal; color: var(--ink-faint); font-size: 12.5px; }
.app-row-scope { font-size: 11.5px; color: var(--ink-faint); }

/* drag-and-drop catalog editor — cards look exactly like the staff view */
.edit-grid { margin-bottom: 22px; }
.edit-card { cursor: grab; }
.edit-card:active { cursor: grabbing; }
.edit-card .card-link { cursor: inherit; }
.edit-card.dragging { opacity: .45; outline: 2px dashed var(--accent); outline-offset: 2px; }
.edit-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.edit-card-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 13px; margin-top: auto;
}
.edit-card-bar .drag-cue { color: var(--ink-faint); font-size: 17px; line-height: 1; letter-spacing: -3px; cursor: grab; }
.edit-card-bar .edit-scope { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }
.edit-card-bar .app-edit { flex: none; }
.app-form { background: var(--surface); border: 1px solid var(--accent); border-radius: 14px; padding: 20px 22px; margin-bottom: 22px; box-shadow: var(--shadow-md); }
.app-form h4 { margin: 0 0 14px; font-size: 15px; }
.af-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin: 12px 0; }
.af-label input, .af-label select {
  display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 14px;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.af-label input:focus, .af-label select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.af-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.due-badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--danger); border: 1px solid var(--danger); border-radius: 6px; padding: 1px 6px; margin-left: 8px; }

/* usage */
.usage-table { border-collapse: collapse; width: 100%; max-width: 660px; font-size: 14px; }
.usage-table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.usage-table th, .usage-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.danger-text { color: var(--danger); }

/* pending requests bar — spans both columns of the access grid */
#req-bar { grid-column: 1 / -1; }
#req-bar:empty { display: none; }
.req-panel { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 12px; padding: 16px 18px; margin: 0 0 4px; }
.req-panel h4 { margin: 0 0 12px; font-size: 14px; }
.req-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.req-row:first-of-type { border-top: none; }

/* settings */
.ann-text { width: 100%; max-width: 660px; font: inherit; font-size: 14.5px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); resize: vertical; }
.ann-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------------- Admin: access panel ---------------- */
.admin { max-width: 1120px; margin: 0 auto; padding: 26px 24px 44px; display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.admin-users { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.admin-users-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--border); }
.admin-users-head h3 { margin: 0; font-size: 14px; }
.user-list { list-style: none; margin: 0; padding: 6px; }
.user-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.user-item:hover { background: var(--surface-2); }
.user-item.selected { background: var(--accent-soft); }
.user-item-main { min-width: 0; }
.user-item-name { display: block; font-weight: 600; font-size: 13.5px; }
.user-item-email { display: block; font-size: 11.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; }
.user-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.admin-badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; }
.app-count { font-size: 11px; color: var(--ink-faint); }
.admin-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; min-height: 300px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.detail-head h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.detail-email { margin: 3px 0 0; font-size: 13px; color: var(--ink-soft); }
.detail-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.switch { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.perm-group { margin-bottom: 22px; }
.perm-group h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
.perm-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13.5px; transition: border-color .12s; }
.perm-row:hover { border-color: var(--accent); }
.perm-row.locked { cursor: default; opacity: .65; }
.perm-row.locked:hover { border-color: var(--border); }
.perm-row input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.perm-icon { font-size: 15px; }
.perm-title { flex: 1; min-width: 0; }
.perm-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* ---------------- Briefing strip ---------------- */
.briefing {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; border-radius: var(--radius); padding: 16px 20px; margin: 0 0 24px;
  box-shadow: var(--shadow-md);
}
.briefing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.briefing-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.briefing-when { font-size: 11.5px; color: rgba(255,255,255,.6); }
.briefing-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.briefing-item {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 10px 13px; text-decoration: none; color: #fff;
  display: flex; flex-direction: column; gap: 3px; transition: background .15s;
}
a.briefing-item:hover { background: rgba(255,255,255,.16); }
.bi-label { font-size: 11.5px; color: rgba(255,255,255,.68); }
.bi-value { font-size: 17px; font-weight: 680; letter-spacing: -.01em; }

/* ---------------- Notification bell ---------------- */
.bell-wrap { position: relative; }
.icon-btn {
  position: relative; font-size: 16px; line-height: 1; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  cursor: pointer; color: var(--ink-soft); transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bell-count {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}
.notif-panel {
  position: absolute; top: 46px; right: 0; width: 320px; max-width: 84vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 6px; z-index: 40; overflow: hidden;
}
.notif-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); padding: 10px 12px 6px; }
.notif-item { display: block; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink); text-decoration: none; }
a.notif-item:hover { background: var(--surface-2); }
.notif-action { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.notif-action:hover { background: var(--surface-2); }
.notif-empty { padding: 18px 12px; font-size: 13.5px; color: var(--ink-faint); text-align: center; }
.notif-foot { border-top: 1px solid var(--border); padding: 8px; }
.notif-foot button { width: 100%; }

/* ---------------- Favorite star on cards ---------------- */
.card-star {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border: none; background: transparent; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--ink-faint); border-radius: 7px;
  opacity: 0; transition: opacity .12s, color .12s, background .12s;
}
.card:hover .card-star, .card-star.on { opacity: 1; }
.card-star.on { color: #f0a929; }
.card-star:hover { background: var(--surface-2); color: #f0a929; }

/* ---------------- Ask documents note ---------------- */
.deep-note { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------------- SOP health / status / errors ---------------- */
.usage-total td { border-top: 2px solid var(--border-strong); }
.mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; vertical-align: middle; margin-left: 6px; }
.mini-bar span { display: block; height: 100%; background: var(--accent); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 6px; }
.status-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status-dot.up { background: #2fae5f; box-shadow: 0 0 0 3px rgba(47,174,95,.16); }
.status-dot.down { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.status-name { font-weight: 600; font-size: 14px; flex: 1; }
.status-meta { font-size: 11.5px; color: var(--ink-faint); }

/* ---------------- Detail footer: review + offboard ---------------- */
.detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.review-state { font-size: 12.5px; color: var(--ink-faint); }
.review-state.stale { color: var(--danger); }
.detail-foot-actions { display: flex; gap: 10px; }

/* ---------------- Modal (offboarding) ---------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,15,25,.5); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-md); padding: 26px 28px; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; }
.modal h3 { margin: 0 0 8px; }
.offboard-list { margin: 12px 0; padding-left: 18px; font-size: 14px; }
.offboard-list li { margin: 7px 0; }
.offboard-list label { cursor: pointer; }

/* approvals + roles */
.approval-panel { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.req-by { font-size: 11.5px; color: var(--ink-faint); font-style: normal; }
.role-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-row select {
  font: inherit; font-size: 13.5px; padding: 8px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
}
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: .9em; }

@media (max-width: 720px) {
  .admin { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .portal { padding: 28px 16px 60px; }
  .signin-card { padding: 32px 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .topbar { padding: 11px 16px; }
  .search-wrap { flex-wrap: wrap; }
  .welcome { font-size: 22px; }
}

/* ========================================================================== */
/* 2026 local redesign: persistent navigation + compact role-based workspaces */
/* ========================================================================== */
.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}
.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.app-sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 50;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  color: #f6f7f9; background: #0b0d10; border-right: 1px solid #1e2228;
}
.sidebar-brand { padding: 3px 8px 24px; }
.sidebar-brand img { width: 178px; max-width: 100%; height: auto; display: block; }
.sidebar-brand span { display: block; margin: 9px 0 0 2px; color: #9ca3af; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav, .admin-tabs { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link, .admin-tab {
  width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px;
  border: 0; border-radius: 9px; padding: 9px 11px; text-align: left;
  color: #bfc4cc; background: transparent; font: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer; transition: color .14s, background .14s;
}
.sidebar-link > span:first-child, .admin-tab > span:first-child { width: 18px; text-align: center; color: #8c949f; font-size: 16px; }
.sidebar-link:hover, .admin-tab:hover { color: #fff; background: #171a1f; }
.sidebar-link.selected, .admin-tab.selected { color: #fff; background: var(--accent); }
.sidebar-link.selected > span:first-child, .admin-tab.selected > span:first-child { color: #fff; }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.18); text-align: center; font-size: 10px; }
.sidebar-admin { margin-top: 18px; padding-top: 13px; border-top: 1px solid #24282e; }
.sidebar-admin p, .sidebar-label { margin: 0 10px 7px; color: #707783; font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-user { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid #24282e; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-user .avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #252a32; border: 1px solid #39404a; color: #fff; font-size: 11px; font-weight: 700; }
.sidebar-user > span:last-child { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #f5f6f7; font-size: 12px; }
.sidebar-user small { margin-top: 2px; color: #7f8792; font-size: 9.5px; }
.back-link { margin-bottom: 19px; }

.app-main > .topbar { min-height: 64px; padding: 12px 28px; background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.app-main .topbar-title { color: var(--ink); font-weight: 680; font-size: 15px; }
.sidebar-toggle { display: none; }
.portal { width: 100%; max-width: 1280px; padding: 32px 34px 72px; }
.portal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.eyebrow { margin: 0 0 4px; color: var(--ink-faint); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.welcome { margin: 0; font-size: 27px; }
.search-wrap { margin-bottom: 26px; }
.search { max-width: 700px; padding: 12px 15px; }
.section { margin-bottom: 34px; }
.section-title { color: var(--ink); font-size: 17px; text-transform: none; letter-spacing: -.015em; }
.section-sub { margin-top: 3px; margin-bottom: 14px; }
.section-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.section-head-row .section-sub { margin-bottom: 0; }
.text-btn { border: 0; background: transparent; color: var(--accent); padding: 5px 0; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
.text-btn:hover { text-decoration: underline; }

.card-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 11px; }
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { border-radius: 11px; box-shadow: none; }
.card-link { gap: 11px; padding: 13px 14px; }
.card-icon { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
.card-title { font-size: 13.25px; }
.card-desc { font-size: 11.5px; line-height: 1.35; }
.card-foot { padding: 0 14px 11px; }
.chip, .req-btn { font-size: 10.5px; padding: 3px 9px; }
.card-tag { margin-top: 6px; font-size: 9px; }
.home-section { margin-bottom: 30px; }
.home-panels { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 16px; }
.home-panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 20px; box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; }
.panel-heading .panel-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 2px 0 0; color: var(--ink-faint); font-size: 11.5px; }
.sop-guidelines ol { margin: 0 0 17px; padding-left: 26px; color: var(--ink-soft); font-size: 12.5px; }
.sop-guidelines li { padding: 4px 0 4px 3px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-actions a { text-decoration: none; }
.request-status-list { min-height: 126px; }
.request-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.request-status-row span, .request-status-row small { display: block; }
.request-status-row strong { font-size: 12.5px; }
.request-status-row small { color: var(--ink-faint); font-size: 10.5px; margin-top: 2px; }
.request-status-row em { padding: 3px 8px; border-radius: 999px; color: #9a6700; background: #fff4ce; font-size: 10px; font-style: normal; font-weight: 700; }

.admin-layout .app-sidebar { position: sticky; }
.admin-tabs { padding: 0; margin: 0; border: 0; background: transparent; }
.admin-tab { justify-content: flex-start; }
.admin-topbar .local-badge { padding: 5px 9px; border-radius: 7px; color: #25663c; background: #e9f7ee; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.admin { width: 100%; max-width: 1420px; padding: 24px 28px 46px; grid-template-columns: 278px minmax(0, 1fr); gap: 18px; margin: 0 auto; }
.admin-users { position: sticky; top: 88px; border-radius: 12px; }
.admin-users-head { padding: 16px; align-items: flex-start; gap: 10px; }
.admin-users-head h3 { font-size: 16px; }
.admin-users-head .pill-btn { padding: 7px 10px; font-size: 11px; }
.admin-search { margin: 10px 11px 4px; padding: 8px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--ink-faint); }
.admin-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; }
.admin-detail { border-radius: 12px; padding: 21px; }
.detail-head { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 2fr); }
.permission-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 18px; }
.permission-toolbar h4 { margin: 0; font-size: 14px; }
.permission-toolbar p { margin: 3px 0 0; color: var(--ink-faint); font-size: 11px; }
.permission-toolbar .admin-search { width: 230px; margin: 0; flex: none; }
.detail-actions { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; }
.detail-actions .af-label { margin: 0; }
.detail-actions .switch { align-self: end; min-height: 38px; }
.detail-actions #preview-user { align-self: end; }
.detail-actions #remove-user { justify-self: start; }
.perm-group { margin-bottom: 18px; }
.perm-rows { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 7px; }
.perm-row { padding: 8px 10px; font-size: 12px; border-radius: 8px; }
.admin-pane { width: calc(100% - 56px); max-width: 1360px; margin: 0 auto; padding: 28px 0 60px; }
#req-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.req-panel { margin: 0; }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head .icon-btn { border: 0; font-size: 23px; }
.member-modal { max-width: 780px; padding: 25px; }
.member-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.member-modal .af-label { margin-bottom: 11px; }
.member-modal input, .member-modal select { width: 100%; font: inherit; font-size: 13px; padding: 10px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.member-email-choice { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--ink-soft); cursor: pointer; }
.member-modal .member-email-choice input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.member-email-choice > span { min-width: 0; }
.member-email-choice strong, .member-email-choice small { display: block; }
.member-email-choice strong { color: var(--ink); font-size: 13px; line-height: 1.35; }
.member-email-choice small { margin-top: 3px; color: var(--ink-faint); font-size: 11px; font-weight: 400; line-height: 1.5; }
.member-form-error { margin: 10px 0 0; padding: 10px 12px; border: 1px solid #f3c7c2; border-radius: 8px; background: #fff4f2; line-height: 1.45; }
.member-form-actions { align-items: center; }
.member-form-actions #member-submit { min-width: 132px; }
.member-save-status { color: var(--ink-faint); font-size: 11px; }
.member-tools-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.member-tools-head strong, .member-tools-head small { display: block; }
.member-tools-head strong { font-size: 13px; }
.member-tools-head small { color: var(--ink-faint); font-size: 10.5px; margin-top: 2px; }
.member-tool-picker { max-height: 250px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; }
.member-tool-picker label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; cursor: pointer; }
.member-tool-picker label:hover { border-color: var(--accent); background: var(--accent-soft); }
.member-tool-picker input { width: 15px; height: 15px; padding: 0; accent-color: var(--accent); }

@media (max-width: 1080px) {
  .app-layout { grid-template-columns: 218px minmax(0, 1fr); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .admin { grid-template-columns: 245px minmax(0, 1fr); padding-inline: 20px; }
}
@media (max-width: 860px) {
  .app-layout { display: block; }
  .app-sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 244px; box-shadow: 18px 0 40px rgba(0,0,0,.26); transition: transform .2s ease; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(10,15,25,.42); }
  .sidebar-toggle { display: inline-block; }
  .home-panels { grid-template-columns: 1fr; }
  .admin { grid-template-columns: 1fr; }
  .admin-users { position: static; }
  .admin-layout .app-sidebar { transform: none; position: static; width: auto; height: auto; box-shadow: none; padding-bottom: 12px; }
  .admin-layout .sidebar-user { display: none; }
  .admin-layout .admin-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .admin-layout .sidebar-brand { display: none; }
}
@media (max-width: 620px) {
  .app-main > .topbar { padding: 10px 14px; }
  .topbar .user-email { display: none; }
  .portal { padding: 24px 16px 56px; }
  .welcome { font-size: 23px; }
  .card-grid, .compact-grid { grid-template-columns: 1fr; }
  .home-panels { gap: 11px; }
  .panel-actions > * { max-width: 100%; white-space: normal; text-align: center; }
  .section-head-row { align-items: flex-end; }
  .admin { padding: 14px 12px 40px; }
  .admin-layout .admin-tabs { grid-template-columns: repeat(2, 1fr); }
  .detail-head { grid-template-columns: 1fr; }
  .detail-actions, .member-fields, .member-tool-picker { grid-template-columns: 1fr; }
  #req-bar { grid-template-columns: 1fr; }
  .req-row { align-items: flex-start; flex-direction: column; }
  .signin { padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); }
  .signin-card { width: 100%; padding: 28px 20px; }
  .google-btn { min-height: 48px; }
  .topbar-right { gap: 7px; }
  .topbar .ghost-btn, .topbar .pill-btn { padding: 8px 10px; font-size: 11px; }
  .notif-panel { position: fixed; top: 66px; right: 10px; left: 10px; width: auto; max-width: none; max-height: calc(100dvh - 82px); overflow: auto; }
  .modal-overlay { padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)); align-items: flex-start; overflow-y: auto; }
  .modal { max-height: none; padding: 22px 18px; }
}

/* Local directory, catalog and settings refinements */
.sidebar-user-button { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sidebar-user-button:hover { background: #15191f; border-radius: 9px; }
.sidebar-user .avatar { overflow: hidden; }
.sidebar-user .avatar img, .detail-avatar img, .profile-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-edit-mark { margin-left: auto; color: #747e8c; font-size: 11px; }
.coming-soon-card { opacity: .72; }
.card-link.disabled-link { cursor: not-allowed; pointer-events: none; }
.coming-soon-card .card-title { color: var(--ink-soft); }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.notif-head strong { color: var(--ink-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.detail-person { display: flex; align-items: flex-start; gap: 13px; }
.detail-avatar, .profile-preview { width: 58px; height: 58px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--accent); color: white; font-weight: 750; }
.detail-person h3 { margin-bottom: 1px; }
.detail-person .text-btn { margin-top: 4px; padding: 0; font-size: 10.5px; }
.member-photo-row, .photo-picker { display: flex; align-items: center; gap: 11px; padding: 11px; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.member-photo-row small { color: var(--ink-faint); font-size: 10px; }
.photo-modal { max-width: 520px; }
.form-error { color: #b42318; font-size: 12px; }
.catalog-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 26px; }
.catalog-section-head .pane-sub { margin: 0 0 10px; }
.edit-card-bar { gap: 7px; }
.edit-card-bar .app-access, .edit-card-bar .app-edit { padding: 6px 8px; }
.access-modal { max-width: 650px; }
.access-everyone { padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.access-everyone strong, .access-everyone small { display: block; }
.access-everyone small { color: var(--ink-faint); margin-top: 2px; font-size: 10.5px; }
.access-modal .access-summary { display: flex; gap: 7px; margin: 14px 0 8px; color: var(--ink-faint); font-size: 11px; }
.access-people { max-height: 330px; overflow: auto; display: grid; gap: 6px; }
.access-person { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; }
.access-person-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: #303b4c; font-size: 10px; font-weight: 700; }
.access-person strong, .access-person small { display: block; }
.access-person strong { font-size: 12px; }.access-person small { color: var(--ink-faint); font-size: 10px; }
.access-person input { width: 17px; height: 17px; accent-color: var(--accent); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-card { padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-card-wide { grid-column: 1 / -1; }
.settings-card-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 16px; }
.settings-card-head > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); }
.settings-card-head > div { flex: 1; }
.settings-card-head h4, .settings-card-head p { margin: 0; }
.settings-card-head h4 { font-size: 14px; }.settings-card-head p { color: var(--ink-faint); font-size: 11px; margin-top: 2px; }
.announcement-history { display: grid; gap: 9px; }
.announcement-history-item { padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.announcement-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-faint); font-size: 10.5px; }
.announcement-history-meta span { color: var(--ink-soft); font-weight: 700; text-transform: capitalize; }
.announcement-history-item p { margin: 8px 0 9px; color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.announcement-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 700; }
.announcement-status.active { color: #22643f; background: #e8f5ed; }
.announcement-status.expired { color: var(--ink-faint); background: #e9edf2; }
.announcement-history-card > .text-btn { margin-top: 13px; }
.brief-editor-head, .brief-editor-row { display: grid; grid-template-columns: .8fr .65fr 1.35fr; gap: 8px; }
.brief-editor-head { color: var(--ink-faint); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 0 4px 5px; }
.brief-editor-rows { display: grid; gap: 7px; }
.brief-editor-row input, .role-template-card input, .role-template-card select { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12px; }
#role-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.role-template-card { position: relative; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.role-template-card .af-label { margin-bottom: 9px; }.role-template-card .role-remove { position: absolute; right: 7px; top: 7px; }
.role-template-card select { min-height: 115px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; }.settings-card-wide { grid-column: auto; }.brief-editor-head { display: none; }.brief-editor-row { grid-template-columns: 1fr; }.catalog-section-head { align-items: flex-start; flex-direction: column; } }

/* Restrained light visual system inspired by the KC operational dashboards. */
:root {
  color-scheme: light;
  --bg: #f2f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --border: #dfe4ea;
  --border-strong: #cbd3dc;
  --ink: #172033;
  --ink-soft: #566277;
  --ink-faint: #8995a8;
  --navy: #1b2636;
  --navy-2: #2c3a50;
  --accent: #4057a8;
  --accent-hover: #34498f;
  --accent-soft: #edf0fb;
  --danger: #c53b2c;
  --danger-soft: #fbecea;
  --shadow-sm: 0 1px 2px rgba(23,32,51,.06);
  --shadow-md: 0 8px 24px rgba(23,32,51,.08);
}
body { background: var(--bg); }
.app-sidebar { background: var(--navy); border-right-color: #2d3a4d; }
.sidebar-brand span, .sidebar-user small { color: #96a4b7; }
.sidebar-link, .admin-tab { color: #c7d0dc; }
.sidebar-link:hover, .admin-tab:hover { color: #fff; background: #263449; }
.sidebar-link.selected, .admin-tab.selected { background: #30405a; box-shadow: inset 3px 0 0 #7081ca; }
.sidebar-link > span:first-child, .admin-tab > span:first-child { color: #9eacc0; }
.nav-icon { width: 20px !important; display: inline-grid; place-items: center; font-family: "Segoe UI Symbol", sans-serif; font-size: 15px !important; line-height: 1; }
.pill-btn { background: var(--accent); border-color: var(--accent); }
.pill-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.card, .admin-users, .admin-detail, .settings-card, .req-panel { border-color: var(--border); box-shadow: var(--shadow-sm); }
.card:hover { border-color: #cbd3dc; box-shadow: 0 5px 16px rgba(23,32,51,.07); }
.admin-topbar .local-badge { color: #22643f; background: #e9f5ee; }
.detail-head { grid-template-columns: minmax(255px,.72fr) minmax(500px,1.6fr); gap: 36px; align-items: start; }
.detail-person { min-width: 0; gap: 15px; }
.detail-person > div { min-width: 0; }
.detail-person h3 { overflow-wrap: anywhere; }
.detail-person h3 { line-height: 1.25; margin-bottom: 5px; }
.detail-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.45; margin-bottom: 6px; }
.detail-actions { grid-template-columns: repeat(2,minmax(210px,1fr)); gap: 13px 14px; align-items: end; }
.detail-actions .af-label { min-width: 0; }
.detail-actions .switch { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.detail-actions #remove-user { align-self: center; }
.catalog-modal { max-width: 900px; padding: 26px 28px; }
.catalog-modal .app-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 15px; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.catalog-modal .app-form > .switch, .catalog-modal .app-form > .af-actions { grid-column: 1 / -1; }
.catalog-modal .af-actions { position: sticky; bottom: -26px; margin: 12px -28px -26px; padding: 14px 28px; background: #fff; border-top: 1px solid var(--border); }
.request-queue { display: grid; gap: 11px; }
.request-card { display: grid; grid-template-columns: minmax(260px,1fr) minmax(220px,.8fr) auto; align-items: center; gap: 22px; padding: 17px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.request-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.request-person > span:last-child, .request-tool { min-width: 0; }
.request-person strong, .request-person small, .request-tool strong, .request-tool small { display: block; overflow-wrap: anywhere; }
.request-person strong, .request-tool strong { font-size: 13px; }
.request-person small, .request-tool small { color: var(--ink-faint); font-size: 10.5px; margin-top: 2px; }
.request-actions { display: flex; gap: 7px; }
.empty-state { padding: 60px 20px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.empty-state > span { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; color: #23794b; background: #e8f4ed; font-weight: 800; }
.empty-state h4, .empty-state p { margin: 0; }.empty-state p { margin-top: 4px; color: var(--ink-faint); font-size: 12px; }
@media (max-width: 1050px) { .detail-head { grid-template-columns: 1fr; }.detail-actions { grid-template-columns: repeat(2,minmax(180px,1fr)); }.request-card { grid-template-columns: 1fr; gap: 12px; }.request-actions { justify-content: flex-start; } }
@media (max-width: 680px) { .detail-actions, .catalog-modal .app-form { grid-template-columns: 1fr; }.catalog-modal .app-form > .switch, .catalog-modal .app-form > .af-actions { grid-column: auto; }.catalog-modal { padding: 20px; }.catalog-modal .af-actions { margin: 12px -20px -20px; padding: 13px 20px; } }
