/* ═══════════════════════════════════════════════
   HAMZA admin — admin.css
   ═══════════════════════════════════════════════ */

:root {
  --ivory: #FFFDF4;
  --cream: #FAF5E9;
  --paper: #FFFFFF;
  --ink: #26262E;
  --ink-2: #3A3A46;
  --soft: #64646F;
  --faint: #97979F;
  --mint: #CFF2E5;
  --mint-deep: #6ED2B2;
  --mint-ink: #0E7A5F;
  --lav: #E9E3FF;
  --lav-deep: #B3A4FF;
  --peach: #FFE7D6;
  --peach-deep: #FFB18C;
  --sky: #DDEEFF;
  --lemon: #FFF4C9;
  --err: #E8574A;
  --line: #ECE4CF;
  --line-2: #E0D6BC;
  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow-s: 0 2px 10px rgba(38, 38, 46, .05);
  --shadow-m: 0 18px 44px -20px rgba(38, 38, 46, .25);
  --side-w: 246px;
}

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

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

body.admin {
  font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
::selection { background: var(--mint); }

h1 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }

.muted { color: var(--faint); font-size: 14px; }
.right { text-align: right; }
.inline-form { display: inline; }

/* ── sidebar ─────────────────────────────── */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  background: var(--ink);
  color: rgba(255, 253, 244, .82);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: transform .45s var(--e-out);
}

.side__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
}

.side__logo { display: flex; align-items: center; gap: 11px; }

.side__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--mint-deep);
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.side__name { font-weight: 800; font-size: 16px; color: var(--ivory); }
.side__name em {
  font-style: normal;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: var(--peach-deep);
  display: block;
  margin-top: 3px;
  letter-spacing: .06em;
}

.side__close {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 253, 244, .1);
  color: var(--ivory);
  font-size: 15px;
}

.side__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  overflow-y: auto;
}

.side__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14.5px;
  color: rgba(255, 253, 244, .72);
  transition: background .3s, color .3s, transform .35s var(--e-out);
}

.side__link svg { width: 19px; height: 19px; flex: none; }

.side__link:hover { background: rgba(255, 253, 244, .07); color: var(--ivory); transform: translateX(3px); }

.side__link.is-active {
  background: rgba(110, 210, 178, .16);
  color: var(--mint-deep);
}

.side__badge {
  margin-left: auto;
  background: var(--peach-deep);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

.side__foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 253, 244, .1);
  display: grid;
  gap: 4px;
}

.side__foot form { display: block; }
.side__link--out { color: rgba(255, 177, 140, .85); }
.side__link--out:hover { background: rgba(232, 87, 74, .14); color: #FF9C8F; }

.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(38, 38, 46, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
  z-index: 80;
}

/* ── shell + topbar ──────────────────────── */
.shell {
  margin-left: var(--side-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 253, 244, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--line);
  padding: 14px 26px;
}

.topbar__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ink);
}

.topbar__burger span { width: 17px; height: 2.2px; background: var(--ivory); border-radius: 2px; }

.topbar__title { flex: 1; }
.topbar__title p { font-size: 13px; color: var(--faint); }

.topbar__right { display: flex; align-items: center; gap: 12px; }

.topbar__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--soft);
}

.a-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-deep);
  animation: aPulse 1.7s ease-in-out infinite;
}

@keyframes aPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: .55; }
}

.topbar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--mint-deep), var(--lav-deep));
  color: var(--ink);
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
}

.content {
  flex: 1;
  padding: 26px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.a-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 26px 22px;
  color: var(--faint);
  font-size: 13px;
}

/* ── panels ──────────────────────────────── */
.panel {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-s);
}

.panel--flush { padding: 0; overflow: hidden; }

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel__head--sub { margin-top: 26px; }

.panel__meta { font-size: 13px; color: var(--faint); }

.panel__link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mint-ink);
  transition: transform .3s var(--e-out);
  display: inline-block;
}

.panel__link:hover { transform: translateX(4px); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ── stat cards ──────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  position: relative;
  border-radius: 20px;
  padding: 20px 22px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  transition: transform .45s var(--e-out), box-shadow .45s var(--e-out);
  display: grid;
  gap: 6px;
}

.stat-card::before {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 46% 54% 62% 38% / 48% 44% 56% 52%;
  opacity: .5;
}

.stat-card--mint::before { background: var(--mint); }
.stat-card--peach::before { background: var(--peach); }
.stat-card--lav::before { background: var(--lav); }
.stat-card--sky::before { background: var(--sky); }

.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); }

.stat-card__label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stat-card b {
  font-family: 'Press Start 2P', monospace;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -.02em;
}

.stat-card__go { font-size: 13px; font-weight: 700; color: var(--soft); }

/* ── chart ───────────────────────────────── */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 190px;
  padding-top: 10px;
}

.chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 100%;
}

.chart__col i {
  display: block;
  width: 100%;
  max-width: 46px;
  height: var(--h, 10%);
  background: linear-gradient(180deg, var(--mint-deep), #A9E7D2);
  border: 1.5px solid var(--ink);
  border-radius: 10px 10px 6px 6px;
  transition: transform .4s var(--e-out), filter .3s;
}

.chart__col:hover i { transform: scaleY(1.04); filter: saturate(1.3); }

.chart__val { font-size: 12.5px; font-weight: 800; }
.chart__day { font-size: 11.5px; color: var(--faint); font-weight: 600; }

/* ── quick actions ───────────────────────── */
.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick__btn {
  background: var(--cream);
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  padding: 13px 15px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .35s var(--e-out), background .3s, border-color .3s;
}

.quick__btn:hover {
  transform: translateY(-3px);
  background: var(--mint);
  border-color: var(--mint-deep);
}

/* ── feeds ───────────────────────────────── */
.feed { list-style: none; display: grid; gap: 4px; }

.feed li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 6px;
  border-radius: 12px;
  transition: background .3s;
}

.feed li:hover { background: var(--cream); }

.feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lav-deep);
  margin-top: 7px;
  flex: none;
}

.feed li b { font-size: 14px; }
.feed li p { font-size: 13px; color: var(--soft); }
.feed li time { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.feed__empty { color: var(--faint); font-size: 14px; padding: 10px 6px !important; }

/* ── message lists ───────────────────────── */
.msglist { list-style: none; display: grid; gap: 6px; }

.msglist li a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: background .3s, border-color .3s, transform .3s var(--e-out);
}

.msglist li a:hover { background: var(--cream); transform: translateX(4px); }
.msglist li b { font-size: 14.5px; }
.msglist li span { grid-column: 1 / 3; font-size: 13px; color: var(--soft); }
.msglist li time { grid-row: 1; grid-column: 3; font-size: 12px; color: var(--faint); }

.msglist li.is-unread a {
  background: rgba(207, 242, 229, .4);
  border-color: rgba(110, 210, 178, .55);
}

.msglist li.is-unread b::after {
  content: '•';
  color: var(--peach-deep);
  margin-left: 7px;
}

/* ── toolbar + search ────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.asearch {
  display: flex;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}

.asearch:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(110, 210, 178, .3);
}

.asearch input { padding: 11px 18px; min-width: 230px; outline: none; font-size: 14.5px; }
.asearch button { padding: 11px 18px; background: var(--ink); color: var(--ivory); font-weight: 700; font-size: 14px; }
.asearch button:hover { background: var(--ink-2); }

/* ── buttons ─────────────────────────────── */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14.5px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: var(--paper);
  transition: transform .35s var(--e-out), background .3s, color .3s, border-color .3s, box-shadow .3s;
}

.a-btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.a-btn:active { transform: scale(.97); }

.a-btn--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
  box-shadow: 0 10px 22px -12px rgba(38, 38, 46, .7);
}

.a-btn--solid:hover { background: var(--ink-2); border-color: var(--ink-2); }

.a-btn--ghost { background: transparent; }
.a-btn--danger { color: var(--err); border-color: rgba(232, 87, 74, .5); }
.a-btn--danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

.a-btn--tiny { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.a-btn--full { width: 100%; }
.a-btn--lg { padding: 14px 26px; font-size: 15.5px; }

/* ── tables ──────────────────────────────── */
.atable { width: 100%; border-collapse: collapse; }

.atable th {
  text-align: left;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
  letter-spacing: .06em;
  padding: 14px 16px;
  background: var(--cream);
  border-bottom: 1.5px solid var(--line);
}

.atable td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14.5px;
}

.atable tr:last-child td { border-bottom: none; }
.atable tbody tr { transition: background .25s; }
.atable tbody tr:hover { background: rgba(250, 245, 233, .7); }

.atable td b { display: block; font-size: 15px; }

.atable__sub { font-size: 12.5px; color: var(--faint); display: block; }
.atable__tags { font-size: 13px; color: var(--soft); max-width: 190px; }

.atable__thumb { width: 56px; }

.atable__thumb img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
}

.atable__actions { white-space: nowrap; }
.atable__actions > * { margin-left: 6px; }
.atable__actions .inline-form { display: inline-block; }

.atable__empty { text-align: center; color: var(--faint); padding: 40px 16px !important; }

.atable--compact td { padding: 10px 14px; }

.star {
  font-size: 19px;
  color: var(--line-2);
  transition: transform .35s var(--e-spring), color .3s;
  line-height: 1;
}

.star:hover { transform: scale(1.25) rotate(12deg); }
.star.is-on { color: #F5B83D; text-shadow: 0 0 12px rgba(245, 184, 61, .5); }

.dot-unread {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint-deep);
  box-shadow: 0 0 0 3px rgba(110, 210, 178, .3);
}

tr.is-unread td { background: rgba(207, 242, 229, .32); }
tr.is-unread td b { color: var(--ink); }

.msg-subject b { display: block; font-size: 14.5px; }
.msg-subject span { font-size: 13px; color: var(--soft); }
.msg-subject:hover b { color: var(--mint-ink); }

.a-tag {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  text-transform: uppercase;
  background: var(--mint);
  color: var(--mint-ink);
  border: 1px solid rgba(110, 210, 178, .6);
  padding: 6px 9px;
  border-radius: 999px;
}

.a-tag--dark { background: var(--ink); color: var(--lemon); border-color: var(--ink); }

/* ── forms ───────────────────────────────── */
.a-form { display: grid; gap: 16px; }
.a-form--wide { gap: 0; display: block; }

.a-field { display: grid; gap: 7px; margin-bottom: 15px; }

.a-field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.a-field input, .a-field textarea, .a-field select {
  width: 100%;
  background: var(--ivory);
  border: 1.5px solid var(--line-2);
  border-radius: 13px;
  padding: 12.5px 15px;
  font-size: 15px;
  outline: none;
  transition: border-color .3s, box-shadow .3s, background .3s;
}

.a-field textarea { resize: vertical; min-height: 90px; }
.a-field textarea.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; }

.a-field input:focus, .a-field textarea:focus, .a-field select:focus {
  background: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(110, 210, 178, .3);
}

.a-field.is-err input, .a-field.is-err textarea {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(232, 87, 74, .14);
}

.a-err { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--err); }

.a-field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.a-field-row--3 { grid-template-columns: repeat(3, 1fr); }
.a-field-row--2 { grid-template-columns: 1fr 1fr; }

.a-alert {
  border-radius: 13px;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 14.5px;
}

.a-alert--err {
  background: rgba(232, 87, 74, .1);
  border: 1.5px solid rgba(232, 87, 74, .5);
  color: #B23A30;
}

.check {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  margin-bottom: 15px;
}

.check input { width: 18px; height: 18px; accent-color: var(--mint-ink); }
.check label { font-weight: 700; font-size: 14.5px; cursor: pointer; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 22px;
  align-items: start;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.img-preview {
  aspect-ratio: 16 / 10;
  background: var(--cream);
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 15px;
  color: var(--faint);
  font-size: 13.5px;
}

.img-preview img { width: 100%; height: 100%; object-fit: cover; }

.a-note {
  margin-top: 18px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px;
}

.a-note b { font-size: 14px; }
.a-note p { font-size: 13.5px; color: var(--soft); margin-top: 6px; }

/* ── upload + media ──────────────────────── */
.upload-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.upload-row input[type="file"] {
  flex: 1;
  min-width: 220px;
  background: var(--ivory);
  border: 1.5px dashed var(--line-2);
  border-radius: 13px;
  padding: 13px 15px;
  font-size: 14.5px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 15px;
}

.media-card {
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .4s var(--e-out), box-shadow .4s var(--e-out);
}

.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }

.media-card__preview {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper);
}

.media-card__preview img, .media-card__preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(38, 38, 46, .85);
  color: var(--ivory);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 5px 7px;
  border-radius: 999px;
}

.media-card figcaption { padding: 11px 12px 13px; display: grid; gap: 4px; }

.media-card figcaption b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card figcaption > span { font-size: 11.5px; color: var(--faint); }
.media-card__acts { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

/* ── message open view ───────────────────── */
.msg-open__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 20px;
}

.msg-open__who { display: flex; align-items: center; gap: 13px; }

.msg-open__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--peach), var(--lav));
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
}

.msg-open__who b { display: block; font-size: 16px; }
.msg-open__who span { font-size: 13.5px; color: var(--soft); overflow-wrap: anywhere; }
.msg-open__head time { font-size: 13px; color: var(--faint); }

.msg-open__subject { font-size: clamp(19px, 2.4vw, 25px); margin-bottom: 14px; }

.msg-open__body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-panel { margin-top: 20px; }
.reply-panel__head > div p { margin-top: 4px; color: var(--soft); font-size: 13.5px; }
.mail-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}
.mail-state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mail-state.is-ready { background: var(--mint); color: var(--mint-ink); }
.mail-state.is-missing { background: var(--peach); color: #9a4b1e; }
.reply-help {
  margin: -2px 0 18px;
  padding: 13px 15px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: var(--cream);
  color: var(--soft);
  font-size: 13.5px;
}
.reply-help code, .mail-settings code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
.reply-form { display: grid; gap: 3px; }
.reply-form textarea { min-height: 160px; resize: vertical; }
.reply-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.mail-settings__body { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mail-settings__body p { max-width: 680px; margin-top: 5px; color: var(--soft); font-size: 14px; }
.mail-settings .panel__head > div p { margin-top: 4px; color: var(--soft); font-size: 13.5px; }
.a-btn:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }

/* ── toast ───────────────────────────────── */
.a-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  transform: translate(-50%, 160%);
  background: var(--ink);
  color: var(--ivory);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
  opacity: 0;
  transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .35s;
  max-width: min(560px, calc(100vw - 40px));
  text-align: center;
  pointer-events: none;
}

.a-toast.is-show { transform: translate(-50%, 0); opacity: 1; }

/* ── login ───────────────────────────────── */
.login-body { background: var(--cream); }

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

.login__art {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.login__scene { position: absolute; inset: 0; }

.login__scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: .85;
}

.login__scene-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(38, 38, 46, .15) 30%, rgba(38, 38, 46, .92) 82%);
}

.login__quote {
  position: relative;
  z-index: 2;
  padding: 44px;
  color: var(--ivory);
}

.login__quote p {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  max-width: 22ch;
}

.login__quote span {
  display: block;
  margin-top: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--mint-deep);
}

.login__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 6vw, 80px);
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.login__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 34px;
  width: fit-content;
}

.login__mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--mint-deep);
  font-family: 'Press Start 2P', monospace;
  font-size: 17px;
  display: grid;
  place-items: center;
}

.login__logo em {
  font-style: normal;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--peach-deep);
  background: var(--cream);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 8px;
  margin-left: 4px;
}

.login__panel h1 { font-size: clamp(28px, 3.4vw, 38px); }
.login__sub { color: var(--soft); margin: 10px 0 26px; }

.login__hint {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--faint);
}

.login__hint code {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 2px 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.login__back {
  margin-top: 26px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--mint-ink);
  width: fit-content;
}

.login__back:hover { text-decoration: underline; }

/* ── login upgrades ──────────────────────── */
.login__dust { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.login__dust i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  background: var(--c);
  opacity: .5;
  animation: loginDust 3.6s steps(8) infinite;
  animation-delay: var(--d);
}

.login__dust i:nth-child(3n) { width: 7px; height: 7px; }
.login__dust i:nth-child(4n) { width: 13px; height: 13px; opacity: .32; }

@keyframes loginDust {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .28; }
  50% { transform: translateY(-24px) rotate(90deg); opacity: .7; }
}

.login { position: relative; z-index: 1; }

.login__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: var(--soft);
  letter-spacing: .04em;
}

.login__chip i {
  width: 8px;
  height: 8px;
  background: var(--mint-deep);
  animation: chipPulse 1.4s steps(2) infinite;
}

@keyframes chipPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.login__mark { animation: loginMark 2.4s var(--e-spring) infinite; }

@keyframes loginMark {
  0%, 88%, 100% { transform: rotate(0deg); border-radius: 13px; }
  92% { transform: rotate(-8deg) scale(1.08); border-radius: 8px; }
  96% { transform: rotate(8deg) scale(1.08); border-radius: 18px; }
}

.a-pass { position: relative; display: block; }

.a-pass input { width: 100%; padding-right: 64px; }

.a-pass__eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: var(--faint);
  background: var(--cream);
  border: 1.5px solid var(--line-2);
  border-radius: 8px;
  padding: 6px 8px;
  transition: color .2s, border-color .2s, background .2s;
}

.a-pass__eye:hover { color: var(--ink); border-color: var(--ink); }
.a-pass__eye.is-on { color: var(--mint-ink); border-color: var(--mint-deep); background: var(--mint); }

.login__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: 26px;
}

.login__ver {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--faint);
}

/* ── dashboard: welcome banner ───────────── */
.welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 26px 28px;
  margin-bottom: 22px;
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(110, 210, 178, .22), transparent 55%),
    radial-gradient(90% 130% at 0% 100%, rgba(179, 164, 255, .18), transparent 55%),
    var(--ink);
  color: var(--ivory);
  box-shadow: var(--shadow-m);
}

.welcome__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 253, 244, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 244, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(105deg, transparent 30%, #000 90%);
  pointer-events: none;
}

.welcome__text { position: relative; z-index: 1; }

.welcome__hi {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--mint-deep);
  letter-spacing: .05em;
}

.welcome__text h2 {
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 10px 0 7px;
}

.welcome__text p { font-size: 14.5px; color: rgba(255, 253, 244, .66); }

.welcome__alert {
  color: var(--peach-deep);
  font-weight: 700;
}

.welcome__chips { position: relative; z-index: 1; display: flex; gap: 9px; flex-wrap: wrap; }

.welcome__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: rgba(255, 253, 244, .85);
  background: rgba(255, 253, 244, .08);
  border: 1.5px solid rgba(255, 253, 244, .16);
  border-radius: 999px;
  padding: 8px 11px;
  backdrop-filter: blur(4px);
}

.welcome__chip--live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-deep);
  box-shadow: 0 0 0 0 rgba(110, 210, 178, .6);
  animation: livePulse 1.6s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 210, 178, .55); }
  70% { box-shadow: 0 0 0 8px rgba(110, 210, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 210, 178, 0); }
}

/* ── dashboard: stat card icons + trend ──── */
.stat-card__icon {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  opacity: .9;
}

.stat-card__icon svg { width: 19px; height: 19px; }

.stat-card--mint .stat-card__icon { background: var(--mint); color: var(--mint-ink); }
.stat-card--peach .stat-card__icon { background: var(--peach); color: #9A4B1E; }
.stat-card--lav .stat-card__icon { background: var(--lav); color: #5B4BC4; }
.stat-card--sky .stat-card__icon { background: var(--sky); color: #2E5F9E; }

.stat-card__trend {
  font-size: 12px;
  font-weight: 800;
}

.stat-card__trend.is-up { color: var(--mint-ink); }
.stat-card__trend.is-down { color: #C2571F; }

/* ── responsive ──────────────────────────── */
@media (max-width: 1120px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .side { transform: translateX(-100%); }
  .side.is-open { transform: translateX(0); }
  .side.is-open ~ .side-overlay { opacity: 1; visibility: visible; }
  .side__close { display: block; }
  .shell { margin-left: 0; }
  .topbar__burger { display: flex; }
  .a-field-row, .a-field-row--2, .a-field-row--3 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
}

@media (max-width: 640px) {
  .content { padding: 18px 14px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card b { font-size: 24px; }
  .panel { padding: 17px; border-radius: 16px; }
  .panel--flush { padding: 0; overflow-x: auto; }
  .atable { min-width: 620px; }
  .quick { grid-template-columns: 1fr; }
  .topbar { padding: 12px 14px; }
  .topbar__pill { display: none; }
  .asearch input { min-width: 150px; }
  .chart { height: 150px; gap: 7px; }
  .a-foot { padding: 14px; }
  .msg-open__body { padding: 16px; font-size: 15px; }
  .reply-form__foot { align-items: stretch; }
  .reply-form__foot .a-btn { width: 100%; justify-content: center; }
  .mail-settings__body { align-items: stretch; flex-direction: column; }
  .mail-settings__body .a-btn { align-self: flex-start; }
}

/* ── email page ── */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.a-field select { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--ink); }
.a-check__row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper); font-size: 13.5px; color: var(--soft); }
.a-check__row input { margin-top: 3px; accent-color: var(--mint-ink); }
.a-alert--ok { background: var(--mint); color: var(--mint-ink); border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-weight: 600; }
