/* Telegrph — Neumorphic Light (inverse of inboxd) */

:root {
  --bg: #e0e5ec;
  --bg-soft: #e6ebf2;
  --shadow-dark: #a3b1c6;
  --shadow-light: #ffffff;
  --text: #2d3748;
  --text-dim: #5b6478;
  --text-faint: #8a93a6;
  --accent: #3b4a66;
  --accent-dim: #5b6478;
  --brand: #4a6cf7;
  --brand-dim: #6b85f5;
  --gold: #c89030;
  --red: #c25555;
  --green: #4ea36a;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --r-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
  --r-shadow-sm: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  --s-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --s-shadow-sm: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
::selection { background: var(--brand); color: white; }

/* ── Primitives ─────────────────────────────────────────────────── */
.neu-raised { background: var(--bg); border-radius: var(--radius); box-shadow: var(--r-shadow); }
.neu-sunken { background: var(--bg); border-radius: var(--radius); box-shadow: var(--s-shadow); }

.neu-btn {
  background: var(--bg);
  color: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: var(--r-shadow-sm);
  transition: box-shadow 0.15s ease, color 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.neu-btn:hover { color: var(--text); }
.neu-btn:active { box-shadow: var(--s-shadow-sm); }
.neu-btn-primary { color: var(--brand); }
.neu-btn-primary:hover { color: var(--brand-dim); }
.neu-btn-lg { padding: 15px 28px; font-size: 14px; }
.neu-btn:disabled { color: var(--text-faint); cursor: not-allowed; }
.neu-btn.danger { color: var(--red); }

/* ────────────────────────────────────────────────────────────────── */
/*                          MARKETING                                 */
/* ────────────────────────────────────────────────────────────────── */
body.marketing { background: var(--bg); }

.m-nav { padding: 22px 0; position: sticky; top: 0; background: rgba(224,229,236,0.85); backdrop-filter: blur(12px); z-index: 50; }
.m-nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 32px; }
.m-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.4px; color: var(--text); }
.m-brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--r-shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.m-brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 5px;
  box-shadow: var(--s-shadow-sm);
}
.m-brand-mark::after {
  content: "t";
  position: relative;
  z-index: 1;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--bg);
  text-shadow:
    1px 1px 1px var(--shadow-dark),
    -1px -1px 1px var(--shadow-light);
  margin-top: -1px;
}
/* Variant in the small auth-brand context */
.auth-brand .m-brand-mark { width: 28px; height: 28px; }
.auth-brand .m-brand-mark::after { font-size: 18px; }
.m-nav-links { display: flex; gap: 26px; flex: 1; }
.m-nav-links a { color: var(--text-dim); font-size: 13.5px; font-weight: 500; }
.m-nav-links a:hover { color: var(--text); }
.m-nav-cta { display: flex; gap: 12px; align-items: center; }
.m-link { color: var(--text-dim); font-size: 13.5px; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.m-link:hover { color: var(--text); }

@media (max-width: 720px) {
  .m-nav-links { display: none; }
  .m-nav { padding: 14px 0; }
  .m-nav-inner { gap: 12px; padding: 0 18px; }
  .m-nav-cta { gap: 8px; flex-shrink: 0; }
  .m-link { font-size: 12.5px; padding: 0 4px; }
  .m-nav-cta .neu-btn { padding: 10px 14px; font-size: 12.5px; }
  .m-brand { font-size: 16px; gap: 8px; }
  .m-brand-mark { width: 26px; height: 26px; }
}

.m-hero { max-width: 1180px; margin: 0 auto; padding: 70px 28px 90px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 960px) { .m-hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px 60px; } }
.m-eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg); box-shadow: var(--s-shadow-sm); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 22px; }
.m-hero h1 { font-size: 54px; line-height: 1.05; letter-spacing: -1.5px; margin: 0 0 22px; color: var(--text); font-weight: 800; }
@media (max-width: 720px) { .m-hero h1 { font-size: 36px; letter-spacing: -1px; } }
.m-lede { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin: 0 0 32px; max-width: 480px; }
.m-lede code { background: var(--bg); padding: 2px 8px; border-radius: 6px; box-shadow: var(--s-shadow-sm); font-size: 14px; color: var(--text); }
.m-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.m-hero-meta { margin-top: 22px; color: var(--text-faint); font-size: 12.5px; }

.m-hero-preview { padding: 0; overflow: hidden; border-radius: var(--radius-lg); }
.m-preview-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 0; }
.m-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: var(--r-shadow-sm); }
.m-preview-url { font-size: 11px; color: var(--text-faint); margin-left: 14px; }
.m-preview-body { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 0 14px 14px; }
.m-preview-sidebar { padding: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.m-preview-folder { font-size: 12px; padding: 8px 12px; border-radius: 8px; color: var(--text-dim); display: flex; justify-content: space-between; }
.m-preview-folder.active { box-shadow: var(--s-shadow-sm); color: var(--accent); font-weight: 600; }
.m-preview-folder span { color: var(--text-faint); font-size: 10px; }
.m-preview-list { display: flex; flex-direction: column; gap: 6px; }
.m-preview-msg { padding: 12px 14px; border-radius: var(--radius-sm); box-shadow: var(--r-shadow-sm); }
.m-preview-msg.unread b { color: var(--text); }
.m-preview-msg b { font-size: 12.5px; color: var(--text-dim); font-weight: 700; }
.m-preview-msg span { float: right; font-size: 10.5px; color: var(--text-faint); }
.m-preview-msg p { margin: 4px 0 0; font-size: 12px; color: var(--text-faint); }

.m-section { max-width: 1180px; margin: 0 auto; padding: 90px 28px; }
.m-section-alt { background: var(--bg-soft); max-width: none; padding-left: 0; padding-right: 0; }
.m-section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }
.m-section h2 { font-size: 38px; line-height: 1.15; letter-spacing: -1px; margin: 0 0 14px; text-align: center; font-weight: 800; }
.m-section-sub { text-align: center; color: var(--text-dim); font-size: 15px; max-width: 580px; margin: 0 auto 56px; line-height: 1.6; }

.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .m-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .m-grid { grid-template-columns: 1fr; } }
.m-card { padding: 32px 28px; }
.m-card-icon { font-size: 22px; width: 52px; height: 52px; border-radius: 14px; background: var(--bg); box-shadow: var(--s-shadow-sm); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--brand); }
.m-card h3 { font-size: 17px; margin: 0 0 10px; font-weight: 700; }
.m-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; margin: 0; }

.m-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .m-steps { grid-template-columns: 1fr; } }
.m-step { padding: 36px 30px; position: relative; }
.m-step-num { font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: 2px; }
.m-step h3 { font-size: 19px; margin: 12px 0 10px; font-weight: 700; }
.m-step p { color: var(--text-dim); line-height: 1.6; font-size: 13.5px; margin: 0; }

.m-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 980px; margin: 0 auto; }
@media (max-width: 900px) { .m-pricing { grid-template-columns: 1fr; } }
.m-price-card { padding: 36px 30px; text-align: center; position: relative; }
.m-price-card.featured { transform: scale(1.04); }
.m-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--bg); box-shadow: var(--r-shadow-sm); padding: 5px 14px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--brand); letter-spacing: 1.5px; text-transform: uppercase; }
.m-price-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }
.m-price { margin: 0 0 24px; }
.m-amt { font-size: 48px; font-weight: 800; letter-spacing: -1.5px; color: var(--text); }
.m-per { display: block; font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.m-price-card ul { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; }
.m-price-card li { padding: 9px 0; color: var(--text-dim); font-size: 13.5px; border-bottom: 1px solid rgba(0,0,0,0.04); }
.m-price-card li:last-child { border-bottom: 0; }
.m-price-card li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 10px; }
.m-price-card .neu-btn { width: 100%; }

.m-cta { max-width: 880px; margin: 0 auto 100px; padding: 60px 40px; text-align: center; }
.m-cta h2 { font-size: 34px; letter-spacing: -0.8px; margin: 0 0 14px; font-weight: 800; }
.m-cta p { color: var(--text-dim); font-size: 15px; margin: 0 0 28px; }

.m-footer { padding: 50px 0; background: var(--bg-soft); }
.m-footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.m-footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.m-footer-links a { color: var(--text-dim); font-size: 13px; font-weight: 500; }
.m-footer-links a:hover { color: var(--text); }
.m-footer-meta { color: var(--text-faint); font-size: 12px; }

/* ────────────────────────────────────────────────────────────────── */
/*                          AUTH                                      */
/* ────────────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--bg); }
.auth-card { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); padding: 44px 40px; width: 100%; max-width: 420px; }
.auth-card .auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.3px; color: var(--text); margin-bottom: 28px; }
.auth-card .auth-brand .m-brand-mark { width: 26px; height: 26px; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.auth-card .tag { color: var(--text-dim); margin-bottom: 28px; font-size: 13.5px; line-height: 1.55; }
.auth-card .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.auth-card label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; padding-left: 4px; }
.auth-card input, .auth-card select {
  background: var(--bg); border: none; border-radius: var(--radius);
  padding: 13px 18px; color: var(--text); font-size: 14px;
  box-shadow: var(--s-shadow-sm); transition: box-shadow 0.2s ease;
}
.auth-card input:focus, .auth-card select:focus { outline: none; box-shadow: var(--s-shadow); }

.btn-primary {
  width: 100%; background: var(--bg); color: var(--brand);
  border: none; border-radius: var(--radius);
  padding: 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.4px;
  margin-top: 10px; box-shadow: var(--r-shadow);
  transition: box-shadow 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn-primary:hover { color: var(--brand-dim); }
.btn-primary:active { box-shadow: var(--s-shadow); color: var(--brand); }
.btn-primary:disabled { color: var(--text-faint); cursor: not-allowed; box-shadow: var(--r-shadow); }

.auth-card .switch { text-align: center; color: var(--text-dim); margin-top: 18px; font-size: 13px; }
.auth-card .switch a { cursor: pointer; color: var(--brand); font-weight: 600; }
.auth-card .err { background: var(--bg); box-shadow: var(--s-shadow-sm); color: var(--red); padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.auth-card .hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; padding-left: 4px; }

@media (max-width: 480px) {
  .auth-wrap { padding: 16px; }
  .auth-card { padding: 32px 22px; max-width: 100%; }
  .auth-card h1 { font-size: 23px; }
}

/* ────────────────────────────────────────────────────────────────── */
/*                          APP SHELL                                 */
/* ────────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 240px 380px 1fr; height: 100vh; gap: 18px; padding: 18px; background: var(--bg); }
.app.app-admin { grid-template-columns: 240px 1fr; }
.app.app-onboarding { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; height: auto; min-height: 100vh; padding: 60px 24px; }

/* Sidebar */
.sidebar { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); display: flex; flex-direction: column; padding: 22px 14px; }
.sidebar-head { padding: 4px 12px 18px; }
.sidebar-head .brand { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); display: inline-flex; align-items: center; gap: 10px; }
.sidebar-head .org { font-size: 11px; color: var(--text-faint); margin-top: 6px; letter-spacing: 0.3px; text-transform: uppercase; font-weight: 600; }
.sidebar-head .who { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.compose-btn { margin: 6px 8px 20px; padding: 14px 20px; background: var(--bg); color: var(--brand); border: none; border-radius: var(--radius); font-size: 14px; font-weight: 700; letter-spacing: 0.4px; box-shadow: var(--r-shadow-sm); transition: box-shadow 0.15s ease, color 0.15s ease; cursor: pointer; }
.compose-btn:hover { color: var(--brand-dim); }
.compose-btn:active { box-shadow: var(--s-shadow-sm); }

.folder-list { padding: 0 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-faint); padding: 12px 12px 6px; font-weight: 700; }
.folder { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-dim); font-size: 13.5px; font-weight: 500; letter-spacing: 0.2px; background: var(--bg); transition: color 0.15s ease, box-shadow 0.15s ease; }
.folder:hover { color: var(--text); }
.folder.active { color: var(--brand); box-shadow: var(--s-shadow-sm); }
.folder .count { font-size: 10px; color: var(--text-faint); background: var(--bg); padding: 3px 9px; border-radius: 10px; box-shadow: var(--s-shadow-sm); font-weight: 600; min-width: 22px; text-align: center; }
.folder.active .count { color: var(--brand); }

.sidebar-foot { padding: 10px 16px 0; font-size: 12px; color: var(--text-faint); }
.sidebar-foot button { background: transparent; border: none; color: var(--text-faint); cursor: pointer; padding: 6px 0; font-weight: 500; }
.sidebar-foot button:hover { color: var(--text); }

/* List pane */
.list-pane { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); overflow-y: auto; padding: 8px; }
.list-header { padding: 14px 14px 8px; position: sticky; top: -8px; background: var(--bg); z-index: 1; }
.list-header input { width: 100%; background: var(--bg); border: none; border-radius: var(--radius); padding: 11px 16px; color: var(--text); font-size: 13px; box-shadow: var(--s-shadow-sm); }
.list-header input::placeholder { color: var(--text-faint); }
.list-header input:focus { outline: none; box-shadow: var(--s-shadow); }

.msg-item { padding: 14px 16px; margin: 4px 0; border-radius: var(--radius-sm); cursor: pointer; background: var(--bg); transition: box-shadow 0.15s ease; }
.msg-item:hover { box-shadow: var(--r-shadow-sm); }
.msg-item.unread .msg-from, .msg-item.unread .msg-subject { font-weight: 700; color: var(--text); }
.msg-item.unread::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.msg-item.selected { box-shadow: var(--s-shadow-sm); }
.msg-row { display: flex; align-items: baseline; gap: 10px; }
.msg-from { font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.msg-date { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.msg-subject { font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.msg-snippet { font-size: 12px; color: var(--text-faint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-list { padding: 80px 24px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Reader */
.reader { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); overflow-y: auto; }
.reader-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-faint); font-size: 13px; }
.reader-head { padding: 28px 32px 20px; position: sticky; top: 0; background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 1; }
.reader-subject { font-size: 24px; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.reader-meta { color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.reader-meta b { color: var(--text); font-weight: 600; }
.reader-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.reader-actions button { background: var(--bg); color: var(--text-dim); border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.3px; box-shadow: var(--r-shadow-sm); cursor: pointer; }
.reader-actions button:hover { color: var(--text); }
.reader-actions button:active { box-shadow: var(--s-shadow-sm); }
.reader-actions button.danger { color: var(--red); }
.reader-body { padding: 28px 32px; line-height: 1.65; color: var(--text); }
.reader-body pre { white-space: pre-wrap; word-wrap: break-word; font-family: inherit; margin: 0; background: var(--bg); padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--s-shadow-sm); }
.reader-body .html-frame { width: 100%; min-height: 400px; border: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--s-shadow-sm); padding: 4px; }
.attachments { padding: 0 32px 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.attachment { display: inline-flex; align-items: center; gap: 10px; background: var(--bg); color: var(--text-dim); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 12.5px; text-decoration: none; box-shadow: var(--r-shadow-sm); transition: box-shadow 0.15s ease, color 0.15s ease; }
.attachment:hover { color: var(--text); }
.attachment:active { box-shadow: var(--s-shadow-sm); }
.attachment .size { color: var(--text-faint); font-size: 11px; }

/* Compose */
.compose-overlay { position: fixed; bottom: 18px; right: 18px; width: 620px; max-width: calc(100vw - 36px); background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); display: flex; flex-direction: column; max-height: 80vh; z-index: 100; overflow: hidden; }
.compose-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; }
.compose-head .title { font-weight: 700; font-size: 13.5px; color: var(--text); letter-spacing: 0.3px; }
.compose-head .close { background: var(--bg); border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; box-shadow: var(--r-shadow-sm); }
.compose-head .close:active { box-shadow: var(--s-shadow-sm); }
.compose-body { padding: 0 22px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; overflow-y: auto; }
.compose-row { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: var(--radius-sm); padding: 6px 14px; box-shadow: var(--s-shadow-sm); }
.compose-row label { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; min-width: 36px; }
.compose-row input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 13.5px; padding: 8px 0; }
.compose-row input:focus { outline: none; }
.compose-body textarea { flex: 1; min-height: 240px; background: var(--bg); border: none; color: var(--text); font-size: 14px; line-height: 1.55; resize: none; padding: 16px 18px; border-radius: var(--radius-sm); box-shadow: var(--s-shadow-sm); }
.compose-body textarea:focus { outline: none; box-shadow: var(--s-shadow); }
.compose-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; }
.compose-foot .send-btn { background: var(--bg); color: var(--brand); border: none; border-radius: var(--radius); padding: 11px 28px; font-size: 13px; font-weight: 700; letter-spacing: 0.4px; box-shadow: var(--r-shadow-sm); cursor: pointer; }
.compose-foot .send-btn:hover { color: var(--brand-dim); }
.compose-foot .send-btn:active { box-shadow: var(--s-shadow-sm); }

/* ────────────────────────────────────────────────────────────────── */
/*                          ONBOARDING                                */
/* ────────────────────────────────────────────────────────────────── */
.onboard { width: 100%; }
.onboard-steps { display: flex; gap: 14px; margin-bottom: 32px; }
.onboard-step { flex: 1; padding: 14px 18px; background: var(--bg); border-radius: var(--radius); box-shadow: var(--s-shadow-sm); color: var(--text-faint); font-size: 12px; font-weight: 600; }
.onboard-step.active { box-shadow: var(--r-shadow-sm); color: var(--brand); }
.onboard-step.done { box-shadow: var(--r-shadow-sm); color: var(--green); }
.onboard-step b { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }

.onboard-card { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); padding: 40px 44px; }
.onboard-card h1 { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.onboard-card .tag { color: var(--text-dim); margin-bottom: 28px; font-size: 14px; line-height: 1.55; }
.onboard-card .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.onboard-card label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; padding-left: 4px; }
.onboard-card input { background: var(--bg); border: none; border-radius: var(--radius); padding: 14px 18px; color: var(--text); font-size: 15px; box-shadow: var(--s-shadow-sm); }
.onboard-card input:focus { outline: none; box-shadow: var(--s-shadow); }

.dns-table { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.dns-row { background: var(--bg); border-radius: var(--radius); box-shadow: var(--s-shadow-sm); padding: 16px 20px; display: grid; grid-template-columns: 70px 1fr 110px 96px; gap: 14px; align-items: center; }
@media (max-width: 760px) { .dns-row { grid-template-columns: 1fr; gap: 6px; } }
.dns-row .dns-type { font-weight: 800; font-size: 12px; color: var(--brand); letter-spacing: 1.2px; }
.dns-row .dns-val { font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.dns-row .dns-host { font-family: ui-monospace, "SF Mono", monospace; font-size: 11.5px; color: var(--text-dim); }
.dns-row .dns-status { font-size: 11px; padding: 5px 12px; border-radius: 999px; background: var(--bg); box-shadow: var(--s-shadow-sm); text-align: center; font-weight: 700; letter-spacing: 0.5px; }
.dns-row .dns-status.pending { color: var(--gold); }
.dns-row .dns-status.verified { color: var(--green); }
.dns-row .copy-btn { background: var(--bg); border: none; color: var(--text-dim); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; box-shadow: var(--r-shadow-sm); cursor: pointer; }
.dns-row .copy-btn:active { box-shadow: var(--s-shadow-sm); }
.dns-row .copy-btn.copied { color: var(--green); }

.onboard-actions { display: flex; gap: 12px; margin-top: 22px; justify-content: flex-end; }

/* ────────────────────────────────────────────────────────────────── */
/*                          ADMIN                                     */
/* ────────────────────────────────────────────────────────────────── */
.admin-pane { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); padding: 32px 36px; overflow-y: auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.admin-head .sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

.tbl { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.3px; color: var(--text-faint); font-weight: 700; padding: 4px 16px; }
.tbl td { padding: 16px; font-size: 13.5px; color: var(--text); background: var(--bg); }
.tbl td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.tbl td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tbl tr.row { box-shadow: var(--r-shadow-sm); border-radius: var(--radius-sm); }
.tbl tr.row:hover td { color: var(--text); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; background: var(--bg); box-shadow: var(--s-shadow-sm); }
.pill.active { color: var(--green); }
.pill.pending { color: var(--gold); }
.pill.failed { color: var(--red); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions button { background: var(--bg); border: none; color: var(--text-dim); padding: 7px 12px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600; box-shadow: var(--r-shadow-sm); cursor: pointer; }
.row-actions button:active { box-shadow: var(--s-shadow-sm); }
.row-actions button.danger { color: var(--red); }

.modal-bg { position: fixed; inset: 0; background: rgba(120,130,150,0.35); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.modal { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--r-shadow); padding: 36px 36px; width: 100%; max-width: 460px; }
.modal h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.modal .tag { color: var(--text-dim); font-size: 13.5px; margin-bottom: 22px; line-height: 1.5; }
.modal .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.modal label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; padding-left: 4px; }
.modal input, .modal select { background: var(--bg); border: none; border-radius: var(--radius); padding: 13px 18px; color: var(--text); font-size: 14px; box-shadow: var(--s-shadow-sm); }
.modal input:focus, .modal select:focus { outline: none; box-shadow: var(--s-shadow); }
.modal .at-row { display: flex; align-items: center; gap: 10px; }
.modal .at-row input { flex: 1; }
.modal .at-row .at-suffix { color: var(--text-dim); font-size: 13.5px; font-weight: 600; padding: 0 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ── Responsive collapse for app shell ────────────────────────── */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .app .sidebar { display: none; }
  .app .list-pane, .app .reader { min-height: 50vh; }
  .app.app-admin { grid-template-columns: 1fr; }
  .onboard-card { padding: 28px 22px; }
}
