/* =========================================================================
   Timents God-Mode admin panel — dark theme.
   A single, dependency-free stylesheet. Variables drive the whole palette so
   the look stays cohesive. Layout is a fixed left sidebar + sticky top bar +
   scrollable content column.
   ========================================================================= */

:root {
  /* Surfaces (dark slate) */
  --bg-0: #0b0f17;        /* app background */
  --bg-1: #111726;        /* sidebar / cards */
  --bg-2: #161e30;        /* raised panels, table headers */
  --bg-3: #1d2740;        /* hover / inputs */
  --bg-4: #26324f;        /* active / borders-strong */

  --line: #232d44;        /* hairline borders */
  --line-2: #2e3a57;

  /* Text */
  --txt-0: #eef2fb;       /* primary */
  --txt-1: #aab4cc;       /* secondary */
  --txt-2: #76819c;       /* muted */

  /* Accent (indigo/violet) */
  --accent: #6d8bff;
  --accent-2: #8a6dff;
  --accent-soft: rgba(109, 139, 255, 0.14);
  --accent-line: rgba(109, 139, 255, 0.45);

  /* Semantic */
  --green: #38d39f;
  --green-soft: rgba(56, 211, 159, 0.14);
  --red: #ff6b7d;
  --red-soft: rgba(255, 107, 125, 0.14);
  --amber: #ffc15e;
  --amber-soft: rgba(255, 193, 94, 0.15);
  --blue: #5cc4ff;
  --blue-soft: rgba(92, 196, 255, 0.14);
  --purple: #c08bff;
  --purple-soft: rgba(192, 139, 255, 0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --sidebar-w: 232px;
  --topbar-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--txt-0);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

#app { min-height: 100%; }

/* ---------------------------------------------------------------- scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; border: 3px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #324066; }

/* ======================================================================= */
/* LOGIN                                                                    */
/* ======================================================================= */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(109, 139, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(138, 109, 255, 0.16), transparent 55%),
    var(--bg-0);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 30px 28px;
  box-shadow: var(--shadow);
}
.login-brand {
  display: flex; align-items: center; gap: 11px; margin-bottom: 22px;
}
.login-brand .logo { width: 36px; height: 36px; }
.login-brand h1 { font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.login-brand .sub { font-size: 12px; color: var(--txt-2); margin-top: 1px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.login-card .form-field { gap: 6px; }

/* ======================================================================= */
/* SHELL                                                                    */
/* ======================================================================= */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
}
.sidebar-brand .logo { width: 28px; height: 28px; }
.sidebar-brand b { font-size: 15px; letter-spacing: -0.01em; }
.sidebar-brand .tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 6px; border-radius: 5px; font-weight: 700;
}
.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-section {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--txt-2); margin: 14px 10px 6px; font-weight: 700;
}
.nav-section:first-child { margin-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  color: var(--txt-1); cursor: pointer; user-select: none;
  font-weight: 500; margin-bottom: 1px;
}
.nav-item:hover { background: var(--bg-2); color: var(--txt-0); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--txt-0); }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { width: 18px; height: 18px; flex: 0 0 18px; color: var(--txt-2); }
.nav-item.active .nav-ico, .nav-item:hover .nav-ico { color: var(--accent); }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--red); color: #1a0c10; border-radius: 999px;
  min-width: 19px; text-align: center; padding: 1px 6px;
}

.main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 30;
  background: rgba(17, 23, 38, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
}
.topbar h2 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.topbar .crumb { color: var(--txt-2); font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25;
}
.who .email { font-size: 12.5px; color: var(--txt-0); font-weight: 550; }
.who .role { font-size: 10px; }
.menu-btn {
  display: none; background: none; border: 0; color: var(--txt-0); cursor: pointer;
  padding: 6px; border-radius: 8px;
}
.menu-btn:hover { background: var(--bg-3); }

.content { padding: 22px; flex: 1; max-width: 1320px; width: 100%; }

/* ======================================================================= */
/* GENERIC: cards, grids, sections                                          */
/* ======================================================================= */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.card-head .spacer { flex: 1; }

.page-head {
  display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h1 { font-size: 21px; margin: 0; letter-spacing: -0.02em; }
.page-head p { margin: 2px 0 0; color: var(--txt-2); font-size: 13px; }
.page-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid-metrics { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-detail { grid-template-columns: 340px 1fr; align-items: start; }
@media (max-width: 920px) { .grid-detail { grid-template-columns: 1fr; } }

/* Metric cards */
.metric {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.metric::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: 0.85;
}
.metric.green::before { background: var(--green); }
.metric.red::before { background: var(--red); }
.metric.amber::before { background: var(--amber); }
.metric.blue::before { background: var(--blue); }
.metric .label { font-size: 11.5px; color: var(--txt-2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.metric .value { font-size: 27px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.1; }
.metric .meta { font-size: 12px; color: var(--txt-1); }
.metric.clickable { cursor: pointer; transition: border-color 0.12s, transform 0.08s; }
.metric.clickable:hover { border-color: var(--accent-line); transform: translateY(-1px); }

/* Definition list (detail views) */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0; }
.dl dt { color: var(--txt-2); font-size: 12.5px; }
.dl dd { margin: 0; color: var(--txt-0); font-size: 13px; word-break: break-word; }
.dl dd.mono, .mono { font-family: var(--mono); font-size: 12px; }

/* ======================================================================= */
/* BUTTONS                                                                   */
/* ======================================================================= */
.btn {
  appearance: none; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--txt-0); font: inherit; font-weight: 550; font-size: 13px;
  padding: 8px 13px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.btn:hover { background: var(--bg-3); border-color: var(--bg-4); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-primary { background: var(--accent); border-color: transparent; color: #0a1024; font-weight: 650; }
.btn-primary:hover { background: #809cff; }
.btn-danger { background: var(--red-soft); border-color: rgba(255,107,125,0.35); color: var(--red); }
.btn-danger:hover { background: rgba(255,107,125,0.22); }
.btn-success { background: var(--green-soft); border-color: rgba(56,211,159,0.35); color: var(--green); }
.btn-success:hover { background: rgba(56,211,159,0.22); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt-1); }
.btn-ghost:hover { background: var(--bg-2); color: var(--txt-0); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ======================================================================= */
/* FORMS                                                                     */
/* ======================================================================= */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; color: var(--txt-1); font-weight: 550; }
.form-field .hint { font-size: 11.5px; color: var(--txt-2); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 130px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], select, textarea {
  appearance: none; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--txt-0);
  padding: 9px 11px; border-radius: var(--radius-sm); font: inherit; font-size: 13px;
  transition: border-color 0.12s, background 0.12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-line); background: var(--bg-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2376819c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--txt-2); }
.char-count { font-size: 11px; color: var(--txt-2); text-align: right; }
.char-count.over { color: var(--red); }

/* Filter bar */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px;
}
.filters .form-field { gap: 4px; }
.filters .grow { flex: 1; min-width: 180px; }
.filters input, .filters select { padding: 7px 10px; font-size: 13px; }

/* ======================================================================= */
/* TABLES                                                                    */
/* ======================================================================= */
.table-wrap {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: auto;
}
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-2); color: var(--txt-1);
  text-align: left; font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 10px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.data tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.1s; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--bg-2); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.nowrap { white-space: nowrap; }
table.data td .sub { color: var(--txt-2); font-size: 11.5px; }
.cell-strong { font-weight: 600; }

.pager {
  display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  padding: 10px 4px 0; color: var(--txt-2); font-size: 12.5px;
}

/* ======================================================================= */
/* BADGES                                                                    */
/* ======================================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 2.5px 8px; border-radius: 999px;
  background: var(--bg-3); color: var(--txt-1); border: 1px solid transparent;
  text-transform: capitalize; white-space: nowrap; letter-spacing: 0.01em;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.gray { background: var(--bg-3); color: var(--txt-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* ======================================================================= */
/* TABS                                                                      */
/* ======================================================================= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 9px 14px; color: var(--txt-1); cursor: pointer; font-weight: 550; font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.tab:hover { color: var(--txt-0); }
.tab.active { color: var(--txt-0); border-bottom-color: var(--accent); }

/* ======================================================================= */
/* STATES: loading / empty / error                                          */
/* ======================================================================= */
.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 54px 24px; color: var(--txt-2); gap: 10px;
}
.state .ico { width: 40px; height: 40px; color: var(--bg-4); }
.state h4 { margin: 0; color: var(--txt-1); font-size: 15px; font-weight: 600; }
.state p { margin: 0; font-size: 13px; max-width: 380px; }
.state.error .ico { color: var(--red); }
.state.error h4 { color: var(--red); }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--bg-4); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
.spinner.lg { width: 38px; height: 38px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--txt-2); font-size: 13px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ======================================================================= */
/* CHART (SVG, no library)                                                   */
/* ======================================================================= */
.chart-toggle { display: flex; gap: 4px; }
.chart-toggle .btn-sm { padding: 4px 11px; }
.chart-toggle .btn-sm.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chart-box { padding: 8px 12px 4px; }
.chart-svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart-bar { fill: var(--accent); transition: fill 0.12s; }
.chart-bar:hover { fill: var(--accent-2); }
.chart-gridline { stroke: var(--line); stroke-width: 1; }
.chart-axis-label { fill: var(--txt-2); font-size: 10px; }
.chart-legend { display: flex; gap: 16px; padding: 4px 14px 12px; font-size: 12px; color: var(--txt-1); }

/* Media preview grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-tile {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; display: flex; flex-direction: column;
}
.media-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-3); display: block; }
.media-tile .ph {
  width: 100%; aspect-ratio: 1; display: grid; place-items: center; color: var(--txt-2);
  background: var(--bg-3); font-size: 12px; text-align: center; padding: 8px;
}
.media-tile .cap { padding: 7px 9px; font-size: 11px; color: var(--txt-2); display: flex; gap: 6px; flex-wrap: wrap; }

/* Expandable JSON cell */
.json-toggle { cursor: pointer; color: var(--accent); font-size: 12px; user-select: none; }
.json-block {
  margin: 6px 0 0; padding: 10px 12px; background: var(--bg-0); border: 1px solid var(--line);
  border-radius: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--txt-1);
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto;
}

/* Status chips row (ops) */
.chip-row { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 13px;
}
.chip .k { font-size: 11px; color: var(--txt-2); text-transform: capitalize; }
.chip .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.danger { border-color: rgba(255,107,125,0.35); }
.chip.danger .v { color: var(--red); }

.big-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; gap: 4px;
}
.big-stat .v { font-size: 44px; font-weight: 760; line-height: 1; font-variant-numeric: tabular-nums; }
.big-stat.danger .v { color: var(--red); }
.big-stat.ok .v { color: var(--green); }
.big-stat .k { font-size: 12px; color: var(--txt-2); text-transform: uppercase; letter-spacing: 0.06em; }

.health-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.health-dot.ok { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.health-dot.bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

/* Progress bar (broadcast) */
.progress { height: 7px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.progress.done > span { background: var(--green); }
.progress.fail > span { background: var(--red); }

.warn-box {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid rgba(255,193,94,0.3);
  border-radius: var(--radius-sm); padding: 12px 14px; color: #ffd99a; font-size: 13px;
}
.warn-box.danger { background: var(--red-soft); border-color: rgba(255,107,125,0.3); color: #ffb3bd; }
.warn-box .ico { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }

.notice {
  font-size: 12px; color: var(--blue); background: var(--blue-soft);
  border: 1px solid rgba(92,196,255,0.25); border-radius: 7px; padding: 8px 11px;
  display: flex; gap: 8px; align-items: flex-start;
}
.notice .ico { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }

/* ======================================================================= */
/* TOASTS                                                                    */
/* ======================================================================= */
.toast-host {
  position: fixed; right: 18px; bottom: 18px; z-index: 9000;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  background: var(--bg-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: flex-start;
  animation: toast-in 0.18s ease-out; font-size: 13px; color: var(--txt-0);
}
.toast.toast-out { animation: toast-out 0.2s ease-in forwards; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast .ico { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.toast.success .ico { color: var(--green); }
.toast.error .ico { color: var(--red); }
.toast.info .ico { color: var(--blue); }
.toast .x { margin-left: auto; cursor: pointer; color: var(--txt-2); flex: 0 0 auto; }
.toast .x:hover { color: var(--txt-0); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ======================================================================= */
/* MODAL                                                                     */
/* ======================================================================= */
.modal-host {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(4, 7, 13, 0.66); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 22px;
  animation: fade-in 0.14s ease-out;
}
/* The `display: grid` above otherwise overrides the [hidden] attribute's UA
   display:none, so the backdrop covered (and blocked clicks on) the whole page,
   including the login screen. This makes the hidden attribute win. */
.modal-host[hidden] { display: none !important; }
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 14px;
  width: 100%; max-width: 460px; box-shadow: var(--shadow);
  animation: modal-in 0.16s ease-out; max-height: 90vh; overflow: auto;
}
.modal.wide { max-width: 620px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head .ico { width: 20px; height: 20px; }
.modal-head.danger .ico { color: var(--red); }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-body p { margin: 0; color: var(--txt-1); font-size: 13.5px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ======================================================================= */
/* RESPONSIVE                                                                */
/* ======================================================================= */
.scrim { display: none; }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform 0.2s ease; box-shadow: var(--shadow);
  }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .shell.nav-open .scrim {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,0.5);
  }
  .menu-btn { display: inline-flex; }
  .grid-detail { grid-template-columns: 1fr; }
  .who .email { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) {
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .who { display: none; }
}

.muted { color: var(--txt-2); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.gap-lg { gap: 16px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.kbd-hint { font-size: 11px; color: var(--txt-2); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { text-decoration: underline; }
