/* ==========================================================================
   Visbot Industries — admin panel
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --red: #e62e35;
  --red-600: #d2282f;
  --red-050: #fdecec;
  --ink: #191c20;
  --ink-700: #33383e;
  --muted: #6b7177;
  --faint: #99a0a7;
  --bg: #f2f4f6;
  --card: #ffffff;
  --line: #e3e6ea;
  --line-2: #eef0f3;
  --ok: #0b7a43;
  --ok-bg: #e6f5ec;
  --ok-line: #bfe3cd;
  --warn: #92610a;
  --warn-bg: #fcf4e4;
  --info: #1a5fb4;
  --info-bg: #eaf2fd;
  --side: #16181c;
  --side-2: #212429;
  --side-txt: #a9b0b8;
  --r: 12px;
  --r-sm: 8px;
  --r-xs: 6px;
  --sh-1: 0 1px 2px rgba(17, 24, 39, .05), 0 1px 3px rgba(17, 24, 39, .05);
  --sh-2: 0 8px 28px rgba(17, 24, 39, .10);
  --sidebar-w: 248px;
  --topbar-h: 62px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- sidebar ------------------------------------------------------ */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--side);
  color: var(--side-txt);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand .bn { color: #fff; font-size: .92rem; font-weight: 800; letter-spacing: .07em; line-height: 1.1; }
.brand .bn i { color: var(--red); font-style: normal; }
.brand .bs { display: block; color: #6d757e; font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; margin-top: 3px; }

.side-nav { flex: 1; overflow-y: auto; padding: .75rem .65rem 1rem; }
.side-label {
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5e666e;
  font-weight: 700;
  padding: .95rem .6rem .4rem;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .56rem .6rem;
  border-radius: var(--r-sm);
  color: var(--side-txt);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
}
.side-nav a .ico { opacity: .7; }
.side-nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.side-nav a:hover .ico { opacity: 1; }
.side-nav a.active {
  background: linear-gradient(90deg, rgba(230, 46, 53, .20), rgba(230, 46, 53, .02));
  box-shadow: inset 2px 0 0 var(--red);
  color: #fff;
  font-weight: 600;
}
.side-nav a.active .ico { opacity: 1; color: var(--red); }

.side-foot {
  padding: .7rem .65rem .9rem;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: grid;
  gap: .25rem;
}
.side-foot a, .side-foot button {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .5rem .6rem;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--side-txt);
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.side-foot a:hover, .side-foot button:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.side-foot form { margin: 0; }

.scrim { display: none; position: fixed; inset: 0; background: rgba(10, 12, 15, .45); z-index: 45; }

/* ---------- shell ------------------------------------------------------- */

.main { margin-left: var(--sidebar-w); min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .6rem 1.8rem;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 1.04rem; font-weight: 700; letter-spacing: -.01em; }
.topbar .sub { color: var(--muted); font-size: .81rem; margin-top: 1px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar .back {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--muted); font-size: .83rem; font-weight: 600;
}
.topbar .back:hover { color: var(--ink); text-decoration: none; }

.burger {
  display: none;
  align-items: center;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: #fff;
  color: var(--ink-700);
  cursor: pointer;
}

.content { padding: 1.5rem 1.8rem 4rem; width: 100%; }

/* ---------- buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid transparent;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: .55rem .95rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--red-600); color: #fff; text-decoration: none; }
.btn .ico { width: 17px; height: 17px; }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink-700); }
.btn--ghost:hover { background: #f7f8fa; border-color: #d4d8de; color: var(--ink); }
.btn--danger { background: #fff; border-color: #f0cfce; color: #b61f26; }
.btn--danger:hover { background: var(--red-050); border-color: #e4b6b5; color: #b61f26; }
.btn--sm { padding: .38rem .7rem; font-size: .82rem; }
.btn--icon { padding: .42rem; border-radius: var(--r-xs); }
.btn--icon .ico { width: 16px; height: 16px; }

/* ---------- flash ------------------------------------------------------- */

.flash {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .95rem;
  border: 1px solid var(--ok-line);
  border-radius: var(--r-sm);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  transition: opacity .3s;
}
.flash--err { background: var(--red-050); border-color: #f3cccc; color: #b61f26; }
.flash button {
  margin-left: auto; border: 0; background: none; color: inherit;
  cursor: pointer; padding: .1rem; opacity: .6; line-height: 1;
}
.flash button:hover { opacity: 1; }

/* ---------- panels ------------------------------------------------------ */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
}
.panel + .panel { margin-top: 1.15rem; }
.panel-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.15rem;
  border-bottom: 1px solid var(--line-2);
}
.panel-head h2 { margin: 0; font-size: .95rem; font-weight: 700; }
.panel-head .hint { color: var(--muted); font-size: .81rem; }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.panel-body { padding: 1.15rem; }

.cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.15rem; align-items: start; }

/* ---------- toolbar ----------------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.05rem; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 220px; max-width: 340px; }
.search .ico {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--faint); pointer-events: none;
}
.search input {
  width: 100%;
  padding: .52rem .8rem .52rem 2.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
  font-size: .88rem;
}
.toolbar select {
  padding: .52rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font: inherit; font-size: .88rem; color: var(--ink-700);
}
.toolbar .count { color: var(--muted); font-size: .83rem; }
.toolbar .spacer { margin-left: auto; }
.search input:focus, .toolbar select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 46, 53, .13); }

/* ---------- tables ------------------------------------------------------ */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.data th {
  text-align: left;
  font-size: .67rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: .68rem 1rem;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfcfd; }
table.data .name { font-weight: 600; }
table.data .sub { color: var(--muted); font-size: .79rem; }
table.data .num { color: var(--faint); font-variant-numeric: tabular-nums; width: 1%; }
.col-actions { text-align: right; width: 1%; }
.row-actions { display: inline-flex; gap: .35rem; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; display: inline-flex; }

.thumb {
  width: 54px; height: 40px; object-fit: cover;
  border-radius: var(--r-xs); border: 1px solid var(--line); background: #f6f7f8; display: block;
}
.thumb--empty { display: grid; place-items: center; color: var(--faint); }
.thumb--empty .ico { width: 15px; height: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .73rem; font-weight: 700; padding: .2rem .52rem; border-radius: 999px;
  background: #f0f2f5; color: var(--ink-700); white-space: nowrap;
}
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--muted { background: #f0f2f5; color: var(--muted); }

.empty { text-align: center; padding: 2.8rem 1.5rem; color: var(--muted); }
.empty .ico { width: 32px; height: 32px; color: var(--faint); }
.empty h3 { margin: .55rem 0 .25rem; color: var(--ink); font-size: 1rem; }
.empty p { margin: 0 0 1rem; font-size: .89rem; }

/* ---------- dashboard --------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.stat {
  display: flex; align-items: center; gap: .85rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.1rem; box-shadow: var(--sh-1);
  color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.stat:hover { border-color: #d2d7de; box-shadow: var(--sh-2); transform: translateY(-1px); text-decoration: none; color: inherit; }
.stat .ico-box {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--red-050); color: var(--red);
}
.stat .ico-box .ico { width: 20px; height: 20px; }
.stat .txt { display: block; min-width: 0; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.stat .cap { display: block; color: var(--muted); font-size: .81rem; }

.bars { display: grid; gap: .8rem; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 160px) 1fr auto; gap: .8rem; align-items: center; font-size: .87rem; }
.bar-row a { color: var(--ink-700); font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: #eceff2; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.bar-row .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .83rem; }

.list-links { display: grid; gap: .1rem; }
.list-links a {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .6rem; border-radius: var(--r-xs);
  color: var(--ink-700); font-size: .88rem; font-weight: 500;
}
.list-links a:hover { background: #f7f8fa; text-decoration: none; }
.list-links a .chip { margin-left: auto; }

.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; }
.action-card {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .75rem .85rem; color: var(--ink-700); font-size: .88rem; font-weight: 600;
}
.action-card:hover { border-color: var(--red); color: var(--red); text-decoration: none; background: var(--red-050); }
.action-card .ico { color: var(--red); }

/* ---------- forms ------------------------------------------------------- */

form.panel { display: block; }
.form-section { padding: 1.15rem; border-bottom: 1px solid var(--line-2); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > header { margin-bottom: .95rem; }
.form-section h3 { margin: 0; font-size: .93rem; font-weight: 700; }
.form-section header p { margin: .22rem 0 0; color: var(--muted); font-size: .82rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.stack { display: grid; gap: .9rem; }

.field { display: grid; gap: .3rem; min-width: 0; align-content: start; }
.field .lbl { font-weight: 600; font-size: .83rem; color: var(--ink-700); }
.field .hint { color: var(--faint); font-size: .78rem; font-weight: 400; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: .9rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 46, 53, .13);
}
.field--mono textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .83rem; }
.counter { color: var(--faint); font-size: .76rem; }

.switch {
  display: flex; align-items: center; gap: .55rem;
  background: #fafbfc; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .55rem .7rem; font-size: .87rem; font-weight: 600; color: var(--ink-700);
  cursor: pointer;
}
.switch input { width: 16px; height: 16px; accent-color: var(--red); margin: 0; }

.form-foot {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem 1.15rem;
  background: #fafbfc;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r) var(--r);
  position: sticky; bottom: 0; z-index: 5;
}
.form-foot .spacer { margin-left: auto; }

/* image picker */
.img-pick { display: grid; grid-template-columns: 124px 1fr; gap: 1rem; align-items: start; }
.img-prev-box {
  width: 124px; height: 92px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #f6f7f8; overflow: hidden; position: relative; display: grid; place-items: center;
}
.img-prev-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-prev-box .ph { color: var(--faint); font-size: .72rem; text-align: center; padding: .4rem; display: grid; gap: .25rem; justify-items: center; }
input[type=file] { font: inherit; font-size: .84rem; width: 100%; }
input[type=file]::file-selector-button {
  font: inherit; font-size: .84rem; font-weight: 600; margin-right: .6rem;
  padding: .42rem .7rem; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: #fff; color: var(--ink-700); cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: #f7f8fa; }

/* pair (label | value) row editor */
.pairs { display: grid; gap: .45rem; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; gap: .45rem; align-items: center; }
.pair input {
  width: 100%; font: inherit; font-size: .88rem; padding: .48rem .65rem;
  border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; min-width: 0;
}
.pair input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 46, 53, .13); }
.pairs-foot { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.pairs-raw { display: none !important; }
.pairs-raw.is-shown { display: block !important; margin-top: .55rem; }

/* ---------- lead management --------------------------------------------- */

.chip--plain { background: #eceff2; color: var(--ink-700); }

.stat--accent { border-color: #f3cfd1; background: linear-gradient(180deg, #fffafa, #fff); }
.stat--accent .ico-box { background: var(--red); color: #fff; }
.stat--danger .ico-box { background: var(--warn-bg); color: var(--warn); }

/* status tabs */
.tabs { display: flex; gap: .3rem; margin-bottom: 1.1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .8rem; border-radius: var(--r-sm) var(--r-sm) 0 0;
  color: var(--muted); font-size: .88rem; font-weight: 600;
  border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); background: #fafbfc; text-decoration: none; }
.tab.active { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: inset 0 2px 0 var(--red); }
.tab .ico { width: 15px; height: 15px; }
.tab-n {
  font-size: .72rem; font-weight: 700; padding: .08rem .4rem;
  border-radius: 999px; background: #eceff2; color: var(--ink-700); min-width: 20px; text-align: center;
}
.tab.active .tab-n { background: var(--red-050); color: var(--red); }

/* lead header */
.lead-head {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-1); padding: 1.1rem 1.25rem; margin-bottom: 1.15rem;
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--red-050); color: var(--red);
  font-weight: 800; font-size: 1.02rem; letter-spacing: .02em;
}
.lead-head-txt { min-width: 0; flex: 1 1 240px; }
.lead-head-txt h2 { margin: 0 0 .35rem; font-size: 1.22rem; letter-spacing: -.015em; }
.lead-head-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.lead-head-meta .muted { display: inline-flex; align-items: center; gap: .25rem; }
.lead-head-meta .muted .ico { width: 14px; height: 14px; }
.lead-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }

.cols--lead { grid-template-columns: 1.4fr 1fr; }

/* status picker */
.status-picker { display: flex; gap: .45rem; flex-wrap: wrap; }
.status-picker form { margin: 0; }
.status-btn {
  font: inherit; font-size: .86rem; font-weight: 600;
  padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-700); cursor: pointer;
}
.status-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-050); }
.status-btn.is-current {
  background: var(--ink); border-color: var(--ink); color: #fff; cursor: default;
}

/* key/value details */
.kv { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: .1rem .9rem; margin: 0; font-size: .89rem; }
.kv dt { color: var(--muted); padding: .42rem 0; font-size: .82rem; }
.kv dd { margin: 0; padding: .42rem 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd .chip { margin-left: .35rem; }

.quote {
  margin: 0; padding: .85rem 1rem; border-left: 3px solid var(--red);
  background: #fafbfc; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink-700); font-size: .9rem; white-space: pre-line;
}

/* activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line-2);
}
.tl-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: .8rem; padding: .25rem 0 .9rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--muted); z-index: 1;
}
.tl-dot .ico { width: 14px; height: 14px; }
.tl-created .tl-dot { border-color: #cfe0f5; background: var(--info-bg); color: var(--info); }
.tl-status .tl-dot { border-color: #f0cfd1; background: var(--red-050); color: var(--red); }
.tl-followup .tl-dot { border-color: #e9ddba; background: var(--warn-bg); color: var(--warn); }
.tl-call .tl-dot { border-color: #bfe3cd; background: var(--ok-bg); color: var(--ok); }
.tl-body p { margin: .25rem 0 .15rem; font-size: .9rem; white-space: pre-line; }
.tl-body time { color: var(--faint); font-size: .78rem; }

/* pager */
.pager { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.15rem; border-top: 1px solid var(--line-2); font-size: .86rem; }
.pager .spacer { margin-left: auto; }

@media (max-width: 1040px) {
  .cols--lead { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { padding-bottom: 0; }
  .kv dd { padding-top: .1rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line-2); }
  .lead-head-actions { margin-left: 0; }
}

/* ---------- integration setup ------------------------------------------- */

.inline-form { display: flex; align-items: flex-end; gap: .7rem; flex-wrap: wrap; }
.inline-form .field { margin: 0; }

.rule { border: 0; border-top: 1px solid var(--line-2); margin: .4rem 0; }

.callout {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; border-radius: var(--r-sm);
  border: 1px solid #e9ddba; background: var(--warn-bg); color: #6b4a08;
  font-size: .87rem; line-height: 1.5; margin-bottom: 1.1rem;
}
.callout .ico { flex: none; color: var(--warn); margin-top: 2px; }
.callout b { color: #52390a; }
.callout--info { border-color: #cfe0f5; background: var(--info-bg); color: #16416f; }
.callout--info .ico { color: var(--info); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84em;
  background: #f1f3f6;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: .08em .36em;
  overflow-wrap: anywhere;
}

.code-block {
  margin: .6rem 0 0;
  background: var(--side);
  border-radius: var(--r-sm);
  padding: .8rem .95rem;
  overflow-x: auto;
}
.code-block code {
  background: none; border: 0; padding: 0;
  color: #d7dbe0; font-size: .8rem; line-height: 1.6;
  white-space: pre;
}

.kv-code {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  gap: .35rem .8rem;
  align-items: center;
  margin: .6rem 0 .2rem;
  font-size: .84rem;
}
.kv-code span { color: var(--muted); font-weight: 600; }
.kv-code code { background: #fff; border-color: var(--line); padding: .3rem .5rem; display: block; }

.steps { margin: 0; padding-left: 1.35rem; display: grid; gap: 1rem; font-size: .89rem; line-height: 1.55; }
.steps li { padding-left: .2rem; }
.steps li::marker { color: var(--red); font-weight: 700; }
.steps b { color: var(--ink); }

/* ---------- login ------------------------------------------------------- */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 520px at 12% -12%, rgba(230, 46, 53, .26), transparent 62%),
    radial-gradient(700px 500px at 112% 112%, rgba(230, 46, 53, .14), transparent 60%),
    #14161a;
}
.login-card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .42);
  padding: 2rem 1.85rem;
  display: grid;
  gap: 1rem;
}
.login-card .lhead { display: grid; justify-items: center; gap: .5rem; text-align: center; margin-bottom: .3rem; }
.login-card .lhead img { width: 46px; height: 46px; object-fit: contain; }
.login-card .lhead h1 { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: .06em; }
.login-card .lhead h1 i { color: var(--red); font-style: normal; }
.login-card .lhead p { margin: 0; color: var(--muted); font-size: .85rem; }
.login-card .btn { justify-content: center; padding: .68rem; font-size: .95rem; }
.login-foot { text-align: center; color: var(--faint); font-size: .78rem; }

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 1040px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sh-2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; }
  .main { margin-left: 0; }
  .burger { display: inline-flex; }
  .cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 1.1rem 1rem 3.5rem; }
  .topbar { padding: .6rem 1rem; }
  .img-pick { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr auto; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
