@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800&display=swap");

/* Takade Mail v4 — Gumroad Neo-Brutalist Design System */
:root {
  --canvas: #f4f4f0;
  --ink: #000000;
  --white: #ffffff;
  --pink: #ff90e8;
  --pink-disabled: #f7d4ef;
  --yellow: #ffc900;
  --lime: #f1f333;
  --teal: #23a094;
  --periwinkle: #90a8ed;
  --red: #dc341e;
  --charcoal: #242423;
  --muted: #808080;
  --warn-fill: #f8efc4;
  --mint-toast: #d3ece8;
  --shadow-hard: 4px 4px 0px #000000;
  --shadow-lg: 6px 6px 0px #000000;
  --radius: 4px;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.4px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted-ink { color: var(--muted); font-size: 14px; letter-spacing: normal; }
.mt-12 { margin-top: 12px; }
.flex-1 { flex: 1; min-width: 140px; }
.flex-2 { flex: 2; min-width: 180px; }
.input-xs { max-width: 84px; }
.select-sm { max-width: 220px; }

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes floatSticker {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes brutalPop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes marqueeLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes toastSlide {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.pop-in { animation: brutalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── Public Header (80px Ruled White Header) ─────────────────────────── */
.pub-shell { min-height: 100vh; display: flex; flex-direction: column; }

.g-header {
  height: 80px;
  background: var(--white);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.g-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
}

.g-brand { display: flex; align-items: center; gap: 10px; }

.g-coin-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pink);
  border: 1px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  transition: transform 0.16s ease;
}

.g-coin-mark:hover { transform: rotate(-10deg) scale(1.06); }
.g-coin-sm { width: 28px; height: 28px; font-size: 14px; box-shadow: none; }

.g-wordmark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.6px;
}

.g-sticker-tag {
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 2px 2px 0px var(--ink);
}

.g-header-right { display: flex; align-items: stretch; }

.g-live-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-left: 1px solid var(--ink);
  font-size: 15px;
  font-weight: 600;
  background: var(--mint-toast);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  border: 1px solid var(--ink);
  animation: pulseDot 1.8s infinite;
}

.g-header-cta {
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-left: 1px solid var(--ink);
  padding: 0 28px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.g-header-cta:hover { background: var(--pink); color: var(--ink); }

/* ── Public Hero Entry (Marketing Style) ─────────────────────────────── */
.pub-main { flex: 1; display: flex; flex-direction: column; }

.hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px 48px;
  overflow-x: hidden;
}

.sticker {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.sticker-lime { top: 44px; left: 8%; animation: floatSticker 5.2s ease-in-out infinite; }
.sticker-pink { top: 68px; right: 9%; animation: floatSticker 6.1s ease-in-out infinite 0.5s; }
.sticker-periwinkle { top: 245px; left: 13%; animation: floatSticker 4.8s ease-in-out infinite 1.1s; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
  width: 100%;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.hero-headline {
  margin: 0 auto 22px;
  font-size: clamp(44px, 6.8vw, 84px);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.hl-pink {
  background: var(--pink);
  border: 1px solid var(--ink);
  padding: 0 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  display: inline-block;
}

.hero-lead {
  margin: 0 auto 32px;
  max-width: 620px;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.4px;
  color: var(--charcoal);
}

.hero-search-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
  align-items: stretch;
}

.hero-input-group {
  flex: 1;
  display: flex;
  min-width: 0;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.hero-input-group:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.hero-input {
  flex: 1;
  min-width: 0;
  height: 64px;
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 0 18px;
  font-family: inherit;
  font-size: 20px;
  outline: none;
}

.hero-domain-select {
  height: 64px;
  background: var(--canvas);
  color: var(--ink);
  border: 0;
  border-left: 1px solid var(--ink);
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.hero-domain-select:hover {
  background: var(--yellow);
}

.hero-submit-btn {
  height: 64px;
  padding: 0 30px;
  background: var(--pink);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.hero-submit-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.hero-submit-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--ink);
}

.g-error {
  margin: 12px auto 0;
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}

.g-warning-bar {
  margin: 22px auto 0;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 16px;
  background: var(--warn-fill);
  border: 1px solid var(--ink);
  border-left: 5px solid var(--yellow);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: normal;
}

.warn-icon { flex-shrink: 0; }
.warn-title { margin-right: 6px; font-weight: 700; }

.g-ok-bar {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--mint-toast);
  border: 1px solid var(--ink);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: normal;
}

/* Ticker Strip */
.ticker-bar {
  width: 100vw;
  margin-top: 48px;
  background: var(--ink);
  color: var(--white);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 12px 0;
}

.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  animation: marqueeLoop 26s linear infinite;
}

/* Bento Feature Cards */
.bento-grid {
  max-width: 1120px;
  width: 100%;
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bento-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px var(--ink);
}

.bento-pink { background: var(--pink); }
.bento-yellow { background: var(--yellow); }
.bento-teal { background: var(--teal); color: var(--white); }

.bento-art {
  background: var(--white);
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: center;
  padding: 16px;
}

.bento-copy { padding: 20px; }
.bento-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.bento-copy h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.bento-copy p { margin: 0; font-size: 15px; line-height: 22px; letter-spacing: normal; }
.bento-copy code {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--ink);
}

/* ── Gumroad Buttons, Inputs, Panels ─────────────────────────────────── */
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.g-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.g-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--ink); }
.g-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.g-btn-sm { padding: 7px 14px; font-size: 14px; box-shadow: 2px 2px 0px var(--ink); }
.g-btn-xs { padding: 4px 10px; font-size: 12.5px; box-shadow: 2px 2px 0px var(--ink); }
.g-btn-block { width: 100%; }

.g-btn-pink { background: var(--pink); color: var(--ink); }
.g-btn-white { background: var(--white); color: var(--ink); }
.g-btn-black { background: var(--ink); color: var(--white); }
.g-btn-danger { background: var(--white); color: var(--red); border-color: var(--red); }
.g-btn-danger:hover { background: var(--red); color: var(--white); }

.g-btn-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.g-input {
  width: 100%;
  min-height: 48px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: normal;
  outline: none;
  transition: box-shadow 0.12s ease;
}

.g-input:focus { box-shadow: 3px 3px 0px var(--ink); }
.g-textarea { min-height: 82px; resize: vertical; }

.g-field { display: flex; flex-direction: column; gap: 6px; }
.g-field label { font-size: 14px; font-weight: 700; letter-spacing: normal; }
.g-stack { display: flex; flex-direction: column; gap: 14px; }
.g-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.g-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }

.g-panel {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: normal; }

/* ── Public State B: Inbox Product View ──────────────────────────────── */
.inbox-stage {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.inbox-topbar-panel {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.inbox-eyebrow { display: block; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 0.6px; }
.inbox-addr-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-addr { font-family: ui-monospace, monospace; font-size: 19px; font-weight: 700; }

.live-mint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mint-toast);
  border: 1px solid var(--teal);
}

.otp-ticket {
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.otp-ticket-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.otp-sticker {
  background: var(--ink);
  color: var(--white);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.otp-digits {
  font-family: ui-monospace, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 4px 12px;
  border-radius: var(--radius);
}

.otp-subject { font-size: 14px; font-weight: 600; }

.inbox-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  min-height: 560px;
  overflow: hidden;
  flex: 1;
}

.inbox-list-col {
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
}

.col-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  background: var(--canvas);
}

.g-count-badge {
  background: var(--pink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 13px;
}

.email-list { flex: 1; overflow-y: auto; }

.email-item {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 14px 18px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
  transition: background-color 0.1s ease;
}

.email-item:hover { background: var(--canvas); }
.email-item.active { background: var(--pink); }

.email-item-top { display: flex; justify-content: space-between; gap: 8px; }
.email-sender { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-time { font-size: 12px; color: var(--charcoal); white-space: nowrap; }
.email-subject { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-otp-chip {
  align-self: flex-start;
  margin-top: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  background: var(--yellow);
  border: 1px solid var(--ink);
  padding: 1px 8px;
  border-radius: var(--radius);
}

.inbox-reader-col {
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.g-empty-dashed {
  margin: 24px;
  flex: 1;
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 10px;
}

.empty-title { margin: 0; font-size: 18px; font-weight: 700; }
.empty-desc { margin: 0; font-size: 14px; color: var(--muted); max-width: 340px; letter-spacing: normal; }

.reader-content { display: flex; flex-direction: column; height: 100%; }
.reader-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.reader-subject { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.reader-from-line { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; letter-spacing: normal; }

.g-pill-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.g-pill-tab.active { background: var(--white); border-color: var(--ink); }

.reader-body { flex: 1; display: flex; flex-direction: column; }
.reader-iframe { width: 100%; flex: 1; min-height: 440px; border: 0; background: var(--white); }
.reader-text {
  margin: 0; padding: 22px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, monospace; font-size: 13.5px; line-height: 22px;
}

/* ── Admin Login ─────────────────────────────────────────────────────── */
.login-stage {
  min-height: 100vh;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-panel {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.login-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-title { margin: 0; font-size: 22px; font-weight: 700; }

/* ── Admin Product Shell (208px Black Sidebar + #f4f4f0 Canvas) ──────── */
.product-shell {
  min-height: 100vh;
  display: flex;
}

.product-sidebar {
  width: 208px;
  flex-shrink: 0;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo-block {
  height: 76px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--charcoal);
}

.sidebar-brand-txt { font-size: 18px; font-weight: 700; color: var(--white); }

.sidebar-nav { display: flex; flex-direction: column; flex: 1; }

.sidebar-row {
  min-height: 56px;
  width: 100%;
  background: transparent;
  color: var(--white);
  border: 0;
  border-bottom: 1px solid var(--charcoal);
  padding: 16px 22px;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: normal;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.sidebar-row:hover { color: var(--pink); background: #141414; }
.sidebar-row.active {
  color: var(--pink);
  font-weight: 700;
  border-left: 4px solid var(--pink);
  padding-left: 18px;
}
.sidebar-row-danger:hover { color: #ff7a6b; }

.sidebar-footer { border-top: 1px solid var(--charcoal); display: flex; flex-direction: column; }

.sidebar-user-row {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--charcoal);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.product-canvas {
  flex: 1;
  min-width: 0;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
}

.canvas-topbar {
  background: var(--canvas);
  border-bottom: 1px solid var(--ink);
  padding: 20px 32px;
}

.canvas-topbar-inner {
  max-width: 1220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.canvas-title { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: normal; }

.canvas-body {
  padding: 24px 32px 48px;
  max-width: 1284px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab-panel { display: flex; flex-direction: column; gap: 20px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
}

.kpi-panel {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 3px 3px 0px var(--ink);
}
.kpi-pink { background: var(--pink); }
.kpi-yellow { background: var(--yellow); }
.kpi-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; letter-spacing: normal; }
.kpi-val { font-size: 32px; line-height: 36px; font-weight: 800; }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

/* Dashboard Chart */
.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: end;
  height: 150px;
  padding-top: 12px;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  min-height: 6px;
  background: var(--pink);
  border: 1px solid var(--ink);
  border-radius: 3px 3px 0 0;
  transition: height 0.25s ease;
}

.chart-num { font-size: 13px; font-weight: 700; }
.chart-day { font-size: 12px; color: var(--muted); }

/* Lists & Rows */
.g-list { display: flex; flex-direction: column; gap: 10px; }

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.row-item.clickable { cursor: pointer; transition: transform 0.1s ease, background-color 0.1s ease; }
.row-item.clickable:hover { background: var(--white); box-shadow: 3px 3px 0px var(--ink); transform: translate(-1px, -1px); }

.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.row-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: normal; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: normal; }

.pill-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  background: var(--white);
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.cat-pill.active { background: var(--pink); font-weight: 700; box-shadow: 2px 2px 0px var(--ink); }

.bulk-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ink); }

.explorer-split {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  min-height: 460px;
}

.explorer-left { display: flex; flex-direction: column; gap: 12px; max-height: 620px; }
.admin-mb-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }

.mb-item {
  width: 100%;
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: inherit;
}

.mb-item.active { background: var(--pink); box-shadow: 3px 3px 0px var(--ink); }
.mb-item-addr { font-weight: 700; font-size: 14px; word-break: break-all; }
.mb-item-meta { font-size: 12px; color: var(--charcoal); }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-addr { margin: 0 0 2px; font-family: ui-monospace, monospace; font-size: 17px; }

.sim-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.sim-label { font-weight: 700; font-size: 14px; }
.sim-select { width: auto; min-width: 210px; min-height: 40px; }

.g-status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--canvas);
  font-size: 13px;
  font-weight: 700;
}
.g-status-pill.ok { background: var(--mint-toast); border-color: var(--teal); }

.health-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.health-chip {
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  background: var(--canvas);
}
.health-chip.ok { background: var(--mint-toast); border-color: var(--teal); }
.health-chip.warn { background: var(--warn-fill); border-color: var(--yellow); }
.health-chip.err { background: var(--pink-disabled); border-color: var(--red); }

.webhook-strip {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 13.5px;
  letter-spacing: normal;
  word-break: break-all;
}

.dns-box {
  margin-top: 14px;
  padding: 14px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 13.5px;
  letter-spacing: normal;
}

/* Hard-Shadow Popover Modal */
.g-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.g-modal-card {
  width: 100%;
  max-width: 840px;
  height: 82vh;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0px var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.g-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--canvas);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-title { margin: 0 0 2px; font-size: 18px; }
.modal-iframe { flex: 1; width: 100%; border: 0; background: var(--white); }

/* Gumroad Top-Center Mint/Pink Toasts */
.toast-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-hard);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
  animation: toastSlide 0.18s ease-out forwards;
}

.toast.ok { background: var(--mint-toast); border-color: var(--teal); color: var(--ink); }
.toast.err { background: var(--pink-disabled); border-color: var(--red); color: var(--ink); }

@media (max-width: 960px) {
  .bento-grid { grid-template-columns: 1fr; }
  .inbox-workspace, .explorer-split { grid-template-columns: 1fr; }
  .inbox-list-col { border-right: 0; border-bottom: 1px solid var(--ink); max-height: 280px; }
  .sticker { display: none; }
  .product-shell { flex-direction: column; }
  .product-sidebar { width: 100%; height: auto; position: static; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .sidebar-row { min-height: 48px; width: auto; white-space: nowrap; border-bottom: 0; border-right: 1px solid var(--charcoal); }
}

@media (max-width: 640px) {
  .hero-search-form { flex-direction: column; }
  .g-header-left { padding: 0 14px; }
  .g-sticker-tag { display: none; }
  .canvas-topbar, .canvas-body { padding: 16px; }
}

/* Admin 2FA & Password Reset Controls */
.login-aux-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.g-link-btn {
  background: none;
  border: 0;
  padding: 2px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.g-link-btn:hover { color: #b8008a; }

.otp-input {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 8px;
}

.security-ip-box {
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
}

/* Bulk Select, Stars, Guides & Code Snippets */
.bulk-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--canvas);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}

.select-xs {
  width: auto;
  min-width: 135px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}

.mb-item-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

.mb-item-row:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px var(--ink);
}

.mb-item-row.active {
  background: var(--pink);
  box-shadow: 3px 3px 0px var(--ink);
}

.mb-item-row.is-starred {
  border-left: 5px solid var(--yellow);
}

.mb-check-wrap {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mb-select-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mb-star-btn, .em-star-btn {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--muted);
  padding: 0 8px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mb-star-btn.starred, .em-star-btn.starred, .g-btn.starred {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.row-check-wrap {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.guide-steps {
  margin: 8px 0 12px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 22px;
}

.guide-steps li + li {
  margin-top: 6px;
}

.guide-steps.compact li + li {
  margin-top: 4px;
}

.guide-copy p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 21px;
}

.code-box {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
  line-height: 18px;
  overflow-x: auto;
  white-space: pre;
}

/* ── Alive Message Loading, Radar Waiting & Smooth Card Transitions ──── */
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes msgItemEntrance {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes justArrivedFlash {
  0% { background: var(--yellow); }
  100% { background: var(--white); }
}

@keyframes spinSync {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes radarPulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.75); opacity: 0; }
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0px) rotate(-1.5deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes scanBarMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

@keyframes bounceDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.sync-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.is-syncing .sync-icon {
  animation: spinSync 0.8s linear infinite;
}

.loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.loader-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: bounceDot 1.1s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.16s; }
.loader-dots span:nth-child(3) { animation-delay: 0.32s; }

.msg-skeleton-wrap {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-skeleton-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--mint-toast);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.msg-skeleton-card {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--white);
  box-shadow: 2px 2px 0px var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: msgItemEntrance 0.22s ease both;
  animation-delay: calc(var(--skel-idx, 0) * 60ms);
}

.skel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.skel-bar {
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: linear-gradient(90deg, #ecece6 20%, #ffd8f6 50%, #ecece6 80%);
  background-size: 220% 100%;
  animation: skeletonShimmer 1.35s ease-in-out infinite;
}

.skel-w-40 { width: 42%; }
.skel-w-25 { width: 24%; height: 10px; }
.skel-w-75 { width: 78%; height: 14px; }
.skel-w-55 { width: 56%; }

.skel-pill {
  width: 92px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, #fff1b8 20%, #ff90e8 50%, #fff1b8 80%);
  background-size: 220% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

.waiting-radar-card {
  margin: 16px;
  padding: 28px 18px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.radar-orb-wrap {
  position: relative;
  width: 92px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.radar-ring {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  background: rgba(35, 160, 148, 0.08);
  animation: radarPulse 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.radar-ring-2 {
  border-color: var(--pink);
  animation-delay: 1.2s;
}

.radar-envelope-card {
  position: relative;
  z-index: 2;
  animation: envelopeFloat 3.2s ease-in-out infinite;
}

.scan-track {
  width: 100%;
  max-width: 240px;
  height: 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
  margin-top: 4px;
}

.scan-bar {
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--pink), var(--yellow));
  border-right: 1px solid var(--ink);
  animation: scanBarMove 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.reader-alive-empty {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f0 100%);
}

.email-list {
  overflow-x: hidden;
}

.email-item {
  animation: msgItemEntrance 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: min(calc(var(--item-idx, 0) * 38ms), 260ms);
}

.email-item.just-arrived {
  animation: justArrivedFlash 1.8s ease forwards;
}

#adminMbEmails .row-item {
  animation: msgItemEntrance 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: min(calc(var(--item-idx, 0) * 35ms), 240ms);
}

.reader-body {
  position: relative;
}

.reader-skeleton-overlay {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Admin Panel Smooth Boot, Progress Bar & In-Place Refresh ────────── */
.product-canvas {
  position: relative;
}

.admin-boot-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-boot-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-top-loader {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--white);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  z-index: 60;
}

.admin-top-loader-bar {
  width: 36%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--teal));
  border-right: 1px solid var(--ink);
  animation: scanBarMove 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.admin-loading-box {
  padding: 22px 18px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.is-refreshing-list {
  opacity: 0.72;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

#adminMbEmails .row-item.just-arrived,
#dashRecentList .row-item.just-arrived {
  animation: justArrivedFlash 1.8s ease forwards;
}
