/* ============================================================================
   Traztech Portal + Admin CRM design system
   Tokens pulled verbatim from css/style.css so this feels like one brand.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f6f4ef;
  --bg-raised: #fdfcf9;
  --bg-hover: #efece4;
  --border: #e3dfd5;
  --border-hover: #cfcabe;
  --accent: #7c3aed;
  --accent-soft: #6d28d9;
  --accent-dim: rgba(124, 58, 237, 0.08);
  --accent-glow: rgba(124, 58, 237, 0.18);
  --text: #1c1b22;
  --text-dim: #4f4d5c;
  --text-muted: #6a6878;
  --nav-bg: rgba(246, 244, 239, 0.88);
  --overlay-bg: rgba(28, 27, 34, 0.55);
  --shadow-sm: 0 6px 20px rgba(28, 27, 34, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 27, 34, 0.08);
  --shadow-lg: 0 18px 50px rgba(28, 27, 34, 0.10);
  --shadow-modal: 0 24px 64px rgba(28, 27, 34, 0.16);
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 14px;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
}

[data-theme="dark"] {
  --bg: #08080c;
  --bg-raised: #111118;
  --bg-hover: #181822;
  --border: #1f1f2e;
  --border-hover: #2e2e44;
  --accent: #7c3aed;
  --accent-soft: #a78bfa;
  --accent-dim: rgba(124, 58, 237, 0.12);
  --accent-glow: rgba(124, 58, 237, 0.28);
  --text: #eeeef0;
  --text-dim: #9496a8;
  --text-muted: #5a5c72;
  --nav-bg: rgba(8, 8, 12, 0.92);
  --overlay-bg: rgba(8, 8, 12, 0.88);
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 24px 80px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Default size for any inline icon; specific contexts (.btn svg, .nav-a svg…) override. */
svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── App layout shell ─────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .55rem;
  padding: 1.15rem 1.25rem;
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { height: 22px; width: auto; }
.sidebar-brand .tag {
  font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  padding: .15rem .4rem; border-radius: 6px; margin-left: auto;
}
.sidebar-nav { padding: .85rem .75rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; overflow-y: auto; }
.nav-section { font-family: var(--mono); font-size: .64rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted); padding: .9rem .75rem .35rem; }
.nav-a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem; border-radius: 10px;
  color: var(--text-dim); font-weight: 500; font-size: .9rem;
  transition: background .15s, color .15s;
}
.nav-a:hover { background: var(--bg-hover); color: var(--text); }
.nav-a.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.nav-a svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-a .count { margin-left: auto; font-size: .72rem; font-weight: 600;
  background: var(--bg-hover); color: var(--text-dim); padding: .05rem .45rem; border-radius: 20px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: .85rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.3px; }
.topbar .spacer { flex: 1; }
.content { padding: 1.6rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.content.narrow { max-width: 920px; }

/* user chip */
.userchip { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border-radius: 10px; }
.userchip:hover { background: var(--bg-hover); }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .78rem; flex-shrink: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; border-radius: 7px; }
.avatar.lg { width: 44px; height: 44px; font-size: 1rem; border-radius: 12px; }
.userchip .who { line-height: 1.2; }
.userchip .who b { font-size: .85rem; font-weight: 600; }
.userchip .who span { font-size: .72rem; color: var(--text-muted); display: block; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: inherit; font-weight: 600; font-size: .88rem;
  padding: .65rem 1.4rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: all .25s; white-space: nowrap; line-height: 1;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,.15); box-shadow: 0 2px 12px rgba(124,58,237,.25); }
.btn-primary:hover { background: #9d6ff8; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(124,58,237,.4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-hover); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-soft); background: var(--accent-dim); transform: translateY(-2px); }
.btn-subtle { background: var(--bg-hover); color: var(--text-dim); border-color: var(--border); }
.btn-subtle:hover { color: var(--text); border-color: var(--border-hover); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--border); }
.btn-danger:hover { background: rgba(239,68,68,.08); border-color: var(--red); }
.btn-sm { padding: .45rem .85rem; font-size: .8rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 1.25rem 1.4rem; }
.card-head { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: .95rem; font-weight: 700; }
.card-head > svg { color: var(--accent); width: 17px; height: 17px; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 1rem; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stat { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.35rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: all .25s; }
.stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); opacity: 0; transition: opacity .25s; }
a.stat:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-md), 0 0 30px rgba(124,58,237,.06); }
a.stat:hover::before { opacity: 1; }
.stat .label { font-family: var(--mono); font-size: .68rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .14em; }
.stat .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -1px; margin-top: .4rem; }
.stat .sub { font-size: .8rem; color: var(--text-dim); margin-top: .15rem; }
.stat.accent .value { color: var(--accent); }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  padding: .25rem .6rem; border-radius: 20px; line-height: 1.3; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-overdue { background: rgba(239,68,68,.1); color: var(--red); }
.pill { font-family: var(--mono); font-size: .72rem; padding: .2rem .5rem; border-radius: 7px;
  background: var(--bg-hover); color: var(--text-dim); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tbl th { text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); padding: .7rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--bg-hover); }
table.tbl a.link { color: var(--accent); font-weight: 600; }
.row-overdue td { background: rgba(239,68,68,.035); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-dim); margin-bottom: .35rem; }
.field .hint { font-size: .76rem; color: var(--text-muted); margin-top: .3rem; }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: .9rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: .62rem .8rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.input-group { display: flex; gap: .6rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Kanban ───────────────────────────────────────────────────────────────── */
.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.kcol { flex: 0 0 290px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.kcol-head { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; position: sticky; top: 0; }
.kcol-head .stage-dot { width: 9px; height: 9px; border-radius: 50%; }
.kcol-head b { font-size: .82rem; font-weight: 700; }
.kcol-head .meta { margin-left: auto; font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.kcol-body { padding: 0 .6rem .6rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; min-height: 60px; }
.kcol-body.dragover { background: var(--accent-dim); border-radius: 10px; }
.dcard { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 11px; padding: .8rem .9rem; cursor: grab; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .1s; }
.dcard:hover { border-color: var(--border-hover); }
.dcard.dragging { opacity: .45; }
.dcard .t { font-weight: 600; font-size: .88rem; line-height: 1.35; }
.dcard .o { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.dcard .b { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.dcard .v { font-weight: 700; font-size: .85rem; }
.dcard .stale { margin-left: auto; font-size: .7rem; color: var(--amber); }

/* ── Timeline (project milestones) ────────────────────────────────────────── */
.timeline { position: relative; padding-left: 8px; }
.tl-item { position: relative; padding: 0 0 1.6rem 2rem; }
.tl-item:before { content: ''; position: absolute; left: 7px; top: 22px; bottom: -4px; width: 2px; background: var(--border); }
.tl-item:last-child:before { display: none; }
.tl-dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-raised); display: grid; place-items: center; }
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); }
.tl-item.done .tl-dot svg { width: 9px; height: 9px; color: #fff; }
.tl-item.active .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.tl-item.active .tl-dot:after { content:''; width:6px;height:6px;border-radius:50%;background:#fff; }
.tl-item .tl-name { font-weight: 600; font-size: .95rem; }
.tl-item.done .tl-name { color: var(--text-dim); }
.tl-item .tl-meta { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

/* ── Activity feed ────────────────────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: none; }
.feed-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.feed-ic svg { width: 15px; height: 15px; }
.feed-body { flex: 1; min-width: 0; }
.feed-body .m { font-size: .88rem; }
.feed-body .t { font-size: .76rem; color: var(--text-muted); margin-top: .1rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; overflow-x: auto; }
.tab { padding: .65rem 1rem; font-size: .88rem; font-weight: 600; color: var(--text-dim); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head .titles h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.9px; }
.page-head .titles p { color: var(--text-dim); font-size: .95rem; margin-top: .2rem; line-height: 1.6; }
.eyebrow { font-family: var(--mono); font-size: .68rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .2em; color: var(--accent); display: block; margin-bottom: .5rem; }
.page-head .actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--mono); }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty svg { width: 40px; height: 40px; margin-bottom: .8rem; opacity: .5; }
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }
.flash { padding: .85rem 1.1rem; border-radius: 11px; font-size: .88rem; font-weight: 500; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.flash-ok { background: rgba(16,185,129,.1); color: #047857; }
.flash-err { background: rgba(239,68,68,.1); color: var(--red); }
.flash-info { background: var(--accent-dim); color: var(--accent); }
[data-theme="dark"] .flash-ok { color: #34d399; }
.list-reset { list-style: none; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.tright { text-align: right; }
.nowrap { white-space: nowrap; }
.fileitem { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.fileitem:last-child { border-bottom: none; }
.fileitem .fi-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.fileitem .fi-meta { font-size: .78rem; color: var(--text-muted); }

/* ── Payment methods ──────────────────────────────────────────────────────── */
.cur-head { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 1.1rem 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.cur-head:first-child { margin-top: 0; }
.paymethod { border: 1px solid var(--border); border-radius: 11px; margin-bottom: .6rem; overflow: hidden; background: var(--bg-raised); }
.paymethod > summary { cursor: pointer; padding: .75rem .95rem; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .5rem; list-style: none; }
.paymethod > summary::-webkit-details-marker { display: none; }
.paymethod > summary .chev { margin-left: auto; color: var(--text-muted); transition: transform .15s; }
.paymethod[open] > summary .chev { transform: rotate(90deg); }
.paymethod[open] > summary { border-bottom: 1px solid var(--border); }
.paymethod .pm-body { padding: .5rem .95rem .85rem; }
.paymethod .pm-note { font-size: .78rem; color: var(--text-muted); margin-top: .5rem; }
.payfields { display: flex; flex-direction: column; }
.payfield { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.payfield:last-child { border-bottom: none; }
.payfield .k { flex: 0 0 40%; font-size: .76rem; color: var(--text-muted); }
.payfield .v { flex: 1; font-size: .85rem; word-break: break-word; }
.payfield .copy { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 7px; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--text-dim); flex-shrink: 0; font-size: .8rem; }
.payfield .copy:hover { color: var(--accent); border-color: var(--accent); }
.payfield .copy svg { width: 13px; height: 13px; }
.paynote { font-size: .78rem; color: var(--text-muted); padding: .4rem 0; }

/* ── Dropzone ─────────────────────────────────────────────────────────────── */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  text-align: center; padding: 1.6rem 1rem; border: 1.5px dashed var(--border-hover); border-radius: 12px;
  background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--accent); }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.dropzone svg { width: 26px; height: 26px; color: var(--accent); }
.dropzone .dz-msg { font-weight: 600; font-size: .9rem; }
.dropzone .dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 5vh 1rem; overflow-y: auto; }
.modal-bg.open { display: flex; }
.modal { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-modal); width: 100%; max-width: 520px; }
.modal-head { display: flex; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.05rem; font-weight: 700; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-muted); background: none; border: none; font-size: 1.4rem; line-height: 1; }
.modal-body { padding: 1.4rem; }
.modal-foot { display: flex; gap: .6rem; justify-content: flex-end; padding: 1rem 1.4rem; border-top: 1px solid var(--border); }

/* ── Auth screen ──────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; position: relative;
  background: radial-gradient(1100px 620px at 50% -18%, var(--accent-glow), transparent 62%), var(--bg); }
.auth-top { position: absolute; top: 1.1rem; right: 1.1rem; }
.auth-card { width: 100%; max-width: 430px; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg); padding: 2.6rem 2.4rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 800; font-size: 1.55rem; letter-spacing: -.5px; color: var(--text); margin-bottom: 1.7rem; }
.auth-brand img { height: 30px; width: auto; }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; text-align: center; letter-spacing: -.5px; margin-bottom: .45rem; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: .92rem; line-height: 1.55; margin-bottom: 1.7rem; }
.auth-card .field { margin-bottom: 1.1rem; }
.auth-card .field label { font-size: .82rem; }
.auth-icon { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 1.2rem; background: var(--accent-dim);
  color: var(--accent); display: grid; place-items: center; }
.auth-icon svg { width: 26px; height: 26px; }
.auth-foot { text-align: center; font-size: .82rem; color: var(--text-muted); line-height: 1.6;
  margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--border); }
.topsearch { display: flex; align-items: center; gap: .4rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 10px; padding: .35rem .65rem; flex: 0 1 320px; max-width: 320px; }
.topsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.topsearch svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.topsearch input { border: none; background: none; outline: none; color: var(--text); font-family: inherit; font-size: .85rem; width: 100%; }
@media (max-width: 860px) { .topsearch { display: none; } }
.bell { position: relative; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--border); background: var(--bg-hover); }
.bell:hover { color: var(--text); border-color: var(--border-hover); }
.bell svg { width: 17px; height: 17px; }
.bell-dot { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg-raised); }
.theme-toggle { background: var(--bg-hover); border: 1px solid var(--border); color: var(--text-dim); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
.menu-btn { display: none; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 9px; width: 36px; height: 36px; place-items: center; cursor: pointer; color: var(--text); }
.menu-btn svg { width: 18px; height: 18px; }
.scrim { display: none; position: fixed; inset: 0; background: var(--overlay-bg); z-index: 49; }
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .scrim.open { display: block; }
  .menu-btn { display: grid; }
  .content { padding: 1.1rem; }
  .field-row { grid-template-columns: 1fr; }
  .page-head .actions { margin-left: 0; width: 100%; }
}
