/* ==========================================================================
   Vidyadeep Pathshala — admin panel
   Same brand as the public site, tuned for daily work: calm, dense, legible.
   ========================================================================== */
:root {
  --paper: #f2ede3;
  --paper-2: #e8e1d3;
  --paper-3: #ddd4c2;
  --card: #fbf9f4;
  --ink: #15201b;
  --ink-2: #34413a;
  --muted: #6b7369;
  --line: rgba(21, 32, 27, 0.12);
  --line-strong: rgba(21, 32, 27, 0.28);
  --flame: #c4472b;
  --saffron: #e5a03a;
  --sulphate: #2b5f75;
  --olive: #5d6b37;
  --green: #2f8a55;
  --amber: #b7791f;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --deva: "Tiro Devanagari Hindi", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --side: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--flame); color: var(--paper); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; border-radius: 6px; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fill, .ic--fill { fill: currentColor; stroke: none; }
.ic--sm { width: 15px; height: 15px; }
.ic--lg { width: 22px; height: 22px; }

.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 14.5px;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s, opacity 0.2s;
}
.btn:hover { background: #253229; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn--flame { background: var(--flame); }
.btn--flame:hover { background: #a93a21; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--danger { background: transparent; color: var(--flame); box-shadow: inset 0 0 0 1px rgba(196, 71, 43, 0.4); }
.btn--danger:hover { background: var(--flame); color: #fff; }
.btn--wa { background: #1f8f4e; }
.btn--wa:hover { background: #187a41; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.iconbtn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.iconbtn--danger:hover { background: rgba(196, 71, 43, 0.12); color: var(--flame); }
.iconbtn:disabled { opacity: 0.25; pointer-events: none; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login__art {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(242, 237, 227, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242, 237, 227, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(80% 70% at 30% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 70% at 30% 40%, #000, transparent);
}
.login__art > * { position: relative; }
.login__mark { font-family: var(--serif); font-weight: 320; font-size: clamp(64px, 9vw, 140px); letter-spacing: -0.05em; line-height: 0.85; }
.login__mark em { font-style: italic; color: var(--saffron); font-variation-settings: "SOFT" 100, "WONK" 1; }
.login__deva { font-family: var(--deva); font-size: 22px; color: rgba(242, 237, 227, 0.5); margin-top: 14px; }
.login__art p { max-width: 34ch; color: rgba(242, 237, 227, 0.7); font-size: 16px; margin: 0; }
.login__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.login__list li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: rgba(242, 237, 227, 0.85); }
.login__list li .ic { color: var(--saffron); }
.login__form { display: grid; place-items: center; padding: 40px 24px; }
.login__card { width: min(400px, 100%); }
.login__card h1 { font-family: var(--serif); font-weight: 380; font-size: 40px; letter-spacing: -0.02em; line-height: 1.05; margin: 22px 0 6px; }
.login__card h1 em { font-style: italic; color: var(--flame); }
.login__card > p { margin: 0 0 28px; color: var(--muted); }
.login__row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 14px; }
.login__err { display: none; margin: -6px 0 16px; padding: 10px 14px; border-radius: 10px; background: rgba(196, 71, 43, 0.1); color: var(--flame); font-size: 14px; }
.login__err.is-on { display: block; }
.login__card.shake { animation: shake 0.45s; }
.login__demo { margin-top: 12px; }
.login__note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; gap: 10px; }
.login__back { display: inline-flex; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.login__back:hover { color: var(--flame); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* ---------- brand tile ---------- */
.tile {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid currentColor;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
}
.tile i {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 5px;
  height: 7px;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: var(--flame);
  box-shadow: 0 0 6px var(--saffron);
}

/* ---------- shell ---------- */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  background: var(--ink);
  color: rgba(242, 237, 227, 0.86);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.45s var(--ease);
}
.side__brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; color: var(--paper); }
.side__brand b { display: block; font-family: var(--serif); font-weight: 450; font-size: 18px; line-height: 1.1; }
.side__brand div span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--saffron); }
.side nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.side__group { padding: 18px 12px 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(242, 237, 227, 0.4); }
.side__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
.side__link:hover { background: rgba(242, 237, 227, 0.07); color: var(--paper); }
.side__link.is-active { background: var(--paper); color: var(--ink); }
.side__link .badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--flame);
  color: #fff;
  font-size: 11.5px;
  font-family: var(--mono);
  display: grid;
  place-items: center;
}
.side__link .count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; opacity: 0.5; }
.side__foot { padding: 14px 12px 18px; border-top: 1px solid rgba(242, 237, 227, 0.1); display: grid; gap: 4px; }
.side__note { margin: 4px 12px 8px; font-size: 12px; color: rgba(242, 237, 227, 0.45); line-height: 1.45; }
.scrim { position: fixed; inset: 0; background: rgba(21, 32, 27, 0.45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity 0.3s; }

.main { margin-left: var(--side); min-height: 100dvh; display: flex; flex-direction: column; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 32px;
  background: rgba(242, 237, 227, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__burger { display: none; }
.top__title { flex: 1; min-width: 0; }
.top__title span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.top__title h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.015em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.saved.is-flash { color: var(--green); }
.saved.is-flash::before { animation: ping 0.9s; }
.page { width: 100%; max-width: 1160px; padding: 28px 32px 80px; animation: pageIn 0.45s var(--ease); }
.page__lede { margin: 0 0 24px; color: var(--ink-2); max-width: 70ch; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  margin-bottom: 20px;
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 0; }
.card__head h2 { margin: 0; font-family: var(--serif); font-weight: 420; font-size: 21px; letter-spacing: -0.01em; }
.card__head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card__body { padding: 18px 22px 22px; }
.card__foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(251, 249, 244, 0.95);
  border-radius: 0 0 16px 16px;
}
.card__foot .dirty { margin-right: auto; font-size: 13.5px; color: var(--amber); display: none; }
.card.is-dirty .card__foot .dirty { display: inline; }

/* ---------- dashboard ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.hello h2 { margin: 0; font-family: var(--serif); font-weight: 340; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; line-height: 1.05; }
.hello h2 em { font-style: italic; color: var(--flame); }
.hello p { margin: 6px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s, transform 0.4s var(--ease);
}
.stat:hover { box-shadow: inset 0 0 0 1px var(--line-strong); transform: translateY(-2px); }
.stat--hot { background: var(--ink); color: var(--paper); box-shadow: none; }
.stat__top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.stat--hot .stat__top { color: rgba(242, 237, 227, 0.6); }
.stat b { font-family: var(--serif); font-weight: 360; font-size: 42px; letter-spacing: -0.03em; line-height: 1; }
.stat small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat--hot small { color: var(--saffron); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick a, .quick button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 500;
  text-align: left;
  transition: background 0.2s, box-shadow 0.2s;
}
.quick a:hover, .quick button:hover { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.quick .qi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--paper); flex: none; }
.dash2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo li .ic { color: var(--amber); }
.todo li.ok .ic { color: var(--green); }
.todo li a { margin-left: auto; font-weight: 500; color: var(--flame); white-space: nowrap; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.mini li:first-child { border-top: 0; padding-top: 0; }
.mini b { font-weight: 500; }
.mini .grow { flex: 1; min-width: 0; }
.mini .grow span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

/* ---------- toolbar + rows ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 38px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  outline: none;
}
.search input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.sel {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2315201b' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  max-width: 100%;
}
.sel:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.tabs button:hover { background: var(--paper-2); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tabs button .n { font-family: var(--mono); font-size: 11px; opacity: 0.6; margin-left: 4px; }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}
.row:first-child { border-top: 0; }
.row:hover { background: rgba(229, 160, 58, 0.06); }
.row.is-off .row__main, .row.is-off .row__lead { opacity: 0.45; }
.row__lead {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--c, var(--ink));
  text-align: center;
  line-height: 1.1;
}
.row__lead--date b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 400; color: var(--ink); }
.row__lead--big { font-family: var(--serif); font-size: 18px; font-weight: 400; color: var(--ink); }
.row__main { min-width: 0; cursor: pointer; }
.row__main b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__main span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row__acts { display: flex; gap: 2px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--paper-2);
  color: var(--ink-2);
}
.pill--ok { background: rgba(47, 138, 85, 0.12); color: var(--green); }
.pill--warn { background: rgba(183, 121, 31, 0.13); color: var(--amber); }
.pill--hot { background: var(--flame); color: #fff; }
.pill--blue { background: rgba(43, 95, 117, 0.12); color: var(--sulphate); }
.pill--off { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line); }
.list-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* enquiries */
.lead { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.lead .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-family: var(--serif); font-size: 17px; }
.lead.is-new .avatar { background: var(--flame); color: #fff; }
.status-sel { height: 34px; font-size: 13.5px; padding-right: 30px; }
.status-sel[data-s="new"] { box-shadow: inset 0 0 0 1.5px var(--flame); color: var(--flame); }
.status-sel[data-s="contacted"] { box-shadow: inset 0 0 0 1.5px var(--sulphate); color: var(--sulphate); }
.status-sel[data-s="enrolled"] { box-shadow: inset 0 0 0 1.5px var(--green); color: var(--green); }
.detail { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0 0 20px; font-size: 14.5px; }
.detail dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 3px; }
.detail dd { margin: 0; word-break: break-word; }

/* ---------- forms ---------- */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.f { display: grid; gap: 6px; align-content: start; min-width: 0; }
.f--full, .f--h { grid-column: 1 / -1; }
.f__l { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.f__l .req { color: var(--flame); }
.f__hint { font-size: 12.5px; color: var(--muted); }
.f__err { font-size: 12.5px; color: var(--flame); display: none; }
.f.is-error .f__err { display: block; }
.f input[type="text"], .f input[type="url"], .f input[type="date"], .f input[type="tel"], .f input[type="email"], .f input[type="password"], .f select, .f textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  outline: none;
  transition: box-shadow 0.2s;
}
.f select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2315201b' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center; padding-right: 34px; }
.f textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.f input:focus, .f select:focus, .f textarea:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.f.is-error input, .f.is-error select, .f.is-error textarea { box-shadow: inset 0 0 0 2px var(--flame); }
.f--h { margin: 8px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.f--h:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* toggle */
.f--toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; }
.f--toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sw { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: var(--paper-3); transition: background 0.25s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.35s var(--ease); }
.f--toggle input:checked + .sw { background: var(--green); }
.f--toggle input:checked + .sw::after { transform: translateX(18px); }
.f--toggle input:focus-visible + .sw { outline: 2px solid var(--flame); outline-offset: 2px; }
.f--toggle .f__l { font-weight: 500; }

/* file */
.drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-strong);
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.drop.is-over { border-color: var(--flame); background: rgba(196, 71, 43, 0.04); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; flex: none; }
.drop__txt b { display: block; font-weight: 500; font-size: 14.5px; word-break: break-all; }
.drop__txt span { font-size: 13px; color: var(--muted); }
.drop__x { position: relative; z-index: 2; margin-left: auto; }
.drop--img { align-items: center; }
.drop--img img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }

/* repeater */
.rep { display: grid; gap: 10px; }
.rep__row { display: grid; grid-template-columns: 26px 1fr 1.6fr auto; gap: 8px; align-items: start; }
.rep__row > span { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 14px; }
.rep__row input, .rep__row textarea { min-height: 44px; }
.rep__row textarea { min-height: 44px; height: 44px; }
.rep__add { justify-self: start; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__bg { position: absolute; inset: 0; background: rgba(21, 32, 27, 0.4); opacity: 0; transition: opacity 0.3s; }
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
}
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; flex: 1; font-family: var(--serif); font-weight: 400; font-size: 23px; letter-spacing: -0.01em; }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px; overscroll-behavior: contain; }
.drawer__foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.drawer__foot .grow { flex: 1; }

/* ---------- confirm ---------- */
.confirm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.confirm__bg { position: absolute; inset: 0; background: rgba(21, 32, 27, 0.5); animation: fade 0.25s; }
.confirm__box { position: relative; width: min(420px, 100%); padding: 24px; border-radius: 18px; background: var(--paper); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4); animation: pop 0.35s var(--ease); }
.confirm__box h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.confirm__box p { margin: 0 0 22px; color: var(--ink-2); }
.confirm__acts { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- settings bits ---------- */
.backup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.backup > div { padding: 16px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; }
.backup b { font-weight: 500; }
.backup p { margin: 0; font-size: 13.5px; color: var(--muted); flex: 1; }
.backup label.btn { position: relative; overflow: hidden; }
.backup label.btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(229, 160, 58, 0.14); color: var(--ink-2); font-size: 14px; margin-bottom: 20px; }
.note .ic { color: var(--amber); margin-top: 1px; }
.syl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.syl-tabs button { height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 500; }
.syl-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px 11px 11px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 30px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.45s var(--ease), opacity 0.3s, visibility 0s 0.45s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 0.45s var(--ease), opacity 0.3s; }
.toast i { width: 26px; height: 26px; border-radius: 8px; background: var(--green); display: grid; place-items: center; flex: none; }
.toast.is-error i { background: var(--flame); }
.toast i::before { content: "✓"; font-style: normal; font-size: 13px; color: #fff; }
.toast.is-error i::before { content: "!"; }

@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 138, 85, 0.5); } 100% { box-shadow: 0 0 0 8px rgba(47, 138, 85, 0); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .dash2 { grid-template-columns: 1fr; }
  .backup { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); }
  .side-open .side { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.3); }
  .side-open .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .top { padding: 10px 16px; min-height: 64px; }
  .top__burger { display: grid; }
  .top__title h1 { font-size: 21px; }
  .top .btn { display: none; }
  .page { padding: 20px 16px 96px; }
  .login { grid-template-columns: 1fr; }
  .login__art { padding: 28px 22px; min-height: 0; }
  .login__mark { font-size: 64px; }
  .login__art p, .login__list { display: none; }
}
@media (max-width: 640px) {
  .saved span { display: none; }
  .fgrid { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat b { font-size: 32px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick a, .quick button { flex-direction: column; align-items: flex-start; font-size: 13.5px; }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; }
  .row__meta { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .row__acts { grid-column: 3; grid-row: 1; }
  .row__acts .hide-sm { display: none; }
  .lead .status-sel { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
  .toolbar { padding: 12px 14px; }
  .toolbar .sel { flex: 1 1 40%; }
  .card__head, .card__body { padding-left: 16px; padding-right: 16px; }
  .card__foot { padding: 12px 16px; }
  .drawer__panel { width: 100%; }
  .drawer__body { padding: 18px 16px; }
  .rep__row { grid-template-columns: 1fr auto; }
  .rep__row > span { display: none; }
  .rep__row > :nth-child(3) { grid-column: 1; }
  .detail { grid-template-columns: 1fr; gap: 2px; }
  .detail dd { margin-bottom: 10px; }
  .toast { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
