/* The Adventures Company – Sales Portal */
:root {
  --teal-900: #10343C;
  --teal-800: #163F47;
  --teal-700: #1D5059;
  --teal: #215A63;
  --teal-600: #1F6470;
  --sea: #5A8289;
  --sea-100: #E5EFF0;
  --sea-50: #F0F6F6;
  --copper: #C4936A;
  --copper-700: #8A5A33;
  --copper-100: #F6EADF;
  --sand: #F6F4EF;
  --ink: #15262B;
  --ink-2: #33464C;
  --muted: #586A70;
  --line: #E1E6E6;
  --line-2: #CDD6D7;
  --white: #FFFFFF;
  --green: #1E6B3A;
  --green-100: #E4F4EA;
  --amber: #8A4B06;
  --amber-100: #FDF0DC;
  --red: #A1281F;
  --red-100: #FBE7E5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 52, 60, .06);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--sand);
}
a { color: var(--teal-600); }
a:hover { color: var(--teal-900); }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0; font-weight: 650; }
h3 { font-size: 14px; margin: 0; font-weight: 650; }
p { margin: 0 0 10px; }
img { max-width: 100%; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: var(--white); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar {
  flex: 1 1 236px; max-width: 100%; background: var(--teal-800); color: #DCE8EA;
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
}
.main { flex: 999 1 560px; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; }
.brand-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--white); display: grid; place-items: center; flex: none; }
.brand-icon img { width: 36px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--white); font-size: 14px; }
.brand-text span { color: #A9C2C6; font-size: 12px; }
.nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #93B0B5; padding: 14px 12px 4px; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 42px; padding: 0 12px; border-radius: 8px; color: #D2E1E3; text-decoration: none; font-size: 14px;
}
.nav-link:hover { background: var(--teal-700); color: var(--white); }
.nav-link.active { background: var(--teal); color: var(--white); font-weight: 650; box-shadow: inset 3px 0 0 var(--copper); }
.nav-badge { min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #2E6670; color: var(--white); }
.nav-badge.badge-copper { background: var(--copper); color: #2B1A0C; }
.nav-user { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid #27565F; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-user-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); min-width: 0; }
.nav-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav-user-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-text span { font-size: 12px; color: #A9C2C6; }
.nav-toggle { display: none; }
.link-button { background: none; border: 0; color: #C9DBDE; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 8px 4px; min-height: 36px; }
.link-button:hover { color: var(--white); }

@media (max-width: 860px) {
  .sidebar { flex-basis: 100%; padding: 12px 14px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .brand { padding: 0; }
  .nav-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid #3B6C75; background: transparent; color: var(--white); font: inherit; font-weight: 600; cursor: pointer; }
  .nav-links { flex-basis: 100%; display: none; padding-top: 10px; }
  .nav-links.open { display: flex; }
  .main { padding: 20px 16px 40px; }
}

/* ---------- Avatars, badges ---------- */
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--sea-100); color: var(--teal-900); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.avatar-dark { background: #2E6670; color: var(--white); }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-md { width: 46px; height: 46px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: #E8EEEF; color: #2C3D42; white-space: nowrap; }
.pill-teal { background: var(--sea-100); color: #18505A; }
.pill-green { background: var(--green-100); color: var(--green); }
.pill-amber { background: var(--amber-100); color: var(--amber); }
.pill-red { background: var(--red-100); color: var(--red); }
.pill-copper { background: var(--copper-100); color: var(--copper-700); }
.pill-sm { font-size: 11px; padding: 2px 8px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); display: inline-block; flex: none; }
.dot-off { background: transparent; border: 2px solid #8A9AA0; }
.dot-bad { background: var(--red); }
.dot-warn { background: #D08A2A; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink);
  font: inherit; font-weight: 650; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--sea); color: var(--ink); background: var(--sea-50); }
.btn-primary { background: var(--teal-600); border-color: var(--teal-600); color: var(--white); }
.btn-primary:hover { background: var(--teal-900); border-color: var(--teal-900); color: var(--white); }
.btn-danger { color: var(--red); border-color: #E5B9B4; }
.btn-danger:hover { background: var(--red-100); color: var(--red); border-color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); min-height: 34px; }
label.check input { width: 18px; height: 18px; accent-color: var(--teal-600); flex: none; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=url], input[type=tel], input:not([type]), select, textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; min-height: 42px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-600); outline: 2px solid rgba(31, 100, 112, .2); outline-offset: 0; }
input[readonly] { background: var(--sea-50); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 720px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }

/* ---------- Cards, layout ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.back { font-size: 13px; font-weight: 650; text-decoration: none; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head a { font-size: 13px; font-weight: 650; text-decoration: none; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-2 { flex: 2 1 460px; min-width: 0; }
.col-3 { flex: 3 1 520px; min-width: 0; }
.col-1 { flex: 1 1 300px; min-width: 0; }
.kpis { display: flex; flex-wrap: wrap; gap: 16px; }
.kpi { flex: 1 1 210px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.kpi .label { font-size: 13px; font-weight: 550; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 750; line-height: 1.1; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--muted); }
.kpi .note { font-size: 12.5px; color: var(--muted); }
.kpi .note.warn { color: var(--amber); font-weight: 650; }
.bar { height: 8px; border-radius: 999px; background: #E2E9EA; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--teal-600); border-radius: 999px; }
.bar.full > span { background: var(--copper); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid #EBEFEF; border-radius: 10px; }
.list-item + .list-item { margin-top: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.kv + .kv { border-top: 1px solid #F0F3F3; }
.connections { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.connections span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid #EEF2F2; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 0; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table a.strong, .strong { font-weight: 650; color: var(--ink); text-decoration: none; }
.table a.strong:hover { color: var(--teal-600); text-decoration: underline; }
.table-actions { text-align: right; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label { flex: 1 1 160px; }
.filters .btn { flex: none; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; }

/* ---------- Sandbox ---------- */
.sandbox-bar { background: var(--amber-100); border: 1px solid #E7B66B; color: #6E3C05; border-radius: 10px; padding: 10px 16px; font-size: 14px; }
.sandbox-bar a { color: #6E3C05; font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.update-bar { display: block; background: var(--sea-100); border: 1px solid #A9CBD0; color: #18444C; border-radius: 10px; padding: 10px 16px; font-size: 14px; text-decoration: none; }
.update-bar span { font-weight: 650; text-decoration: underline; }
.update-bar:hover { background: #D6E8EA; color: #18444C; }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash-success { background: var(--green-100); border-color: #B7DEC5; color: #164F2B; }
.flash-error { background: var(--red-100); border-color: #F0C2BD; color: #7A1E17; }
.flash-info { background: var(--sea-100); border-color: #C3D9DC; color: #18444C; }
.flash-warning { background: var(--amber-100); border-color: #F0D3A7; color: #6E3C05; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 14px; color: var(--muted); font-weight: 650; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--copper); }
.tabs a:hover { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink); font-size: 13px; font-weight: 650; text-decoration: none; }
.chip.active { background: var(--teal-800); border-color: var(--teal-800); color: var(--white); }

/* ---------- Inbox ---------- */
.inbox { display: flex; flex-wrap: wrap; margin: -28px -36px -48px; min-height: calc(100vh); align-items: stretch; }
.inbox-list { flex: 1 1 300px; min-width: 0; max-width: 100%; background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.inbox-list-head { padding: 22px 18px 12px; display: flex; flex-direction: column; gap: 12px; }
.conv-items { overflow-y: auto; flex: 1; }
.conv { display: flex; flex-direction: column; gap: 4px; padding: 13px 18px; text-decoration: none; color: var(--ink); border-top: 1px solid #EEF2F2; border-left: 3px solid transparent; }
.conv:hover { background: var(--sea-50); color: var(--ink); }
.conv.active { background: #E8F2F3; border-left-color: var(--teal-600); }
.conv .top { display: flex; justify-content: space-between; gap: 8px; }
.conv .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .name { font-weight: 800; }
.conv.unread .name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--copper); margin-right: 6px; vertical-align: 1px; }
.conv .time { font-size: 12px; color: var(--muted); flex: none; }
.conv .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.conv .preview { font-size: 13px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thread { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; }
.thread-head { padding: 18px 26px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.thread-head .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.thread-body { flex: 1; padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.msg { max-width: 620px; display: flex; flex-direction: column; gap: 6px; }
.msg .meta { font-size: 12px; color: var(--muted); }
.msg .bubble { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; }
.msg.out .meta { text-align: right; }
.msg.out .bubble { background: #EDF5F5; border-color: #CFE2E4; }
.msg.note { align-self: stretch; max-width: none; }
.msg.note .bubble { background: #FFF6E9; border: 1px dashed #D9A967; }
.msg.system { align-self: center; max-width: none; }
.msg.system .bubble { background: transparent; border: 0; padding: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.msg .status { font-size: 11.5px; font-weight: 650; }
.email-frame { width: 100%; border: 0; border-radius: 8px; background: #F3F1EC; min-height: 300px; }
.composer { margin: 0 26px 22px; background: var(--white); border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-direction: column; }
.composer-tabs { display: flex; gap: 4px; padding: 6px 8px 0; }
.composer-tabs button { min-height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.composer-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--teal-600); }
.composer textarea { border: 0; min-height: 110px; border-radius: 0; }
.composer textarea:focus { outline: none; }
.composer .composer-body { padding: 6px 12px; }
.composer.is-note { background: #FFFBF3; border-color: #E2BE8C; }
.composer-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid #EEF2F2; }
.side-panel { flex: 1 1 260px; min-width: 0; background: var(--white); border-left: 1px solid var(--line); padding: 22px 18px; display: flex; flex-direction: column; gap: 18px; }
.side-panel .section-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .inbox { margin: -20px -16px -40px; } }

/* ---------- Chat ---------- */
.chat { display: flex; flex-wrap: wrap; margin: -28px -36px -48px; min-height: 100vh; align-items: stretch; }
.chat-channels { flex: 1 1 240px; min-width: 0; background: var(--white); border-right: 1px solid var(--line); padding: 22px 12px; display: flex; flex-direction: column; gap: 2px; }
.chat-channels .section { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 8px 4px; }
.chat-channels a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.chat-channels a:hover { background: var(--sea-50); }
.chat-channels a.active { background: var(--sea-100); color: #18505A; font-weight: 650; }
.chat-channels a.has-unread { font-weight: 700; color: var(--ink); }
.chat-channels .count { margin-left: auto; background: var(--copper); color: #2B1A0C; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.chat-main { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; }
.chat-messages { flex: 1; padding: 20px 26px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 210px); }
.chat-msg { display: flex; gap: 12px; }
.chat-msg .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.chat-msg .who { font-weight: 700; }
.chat-msg .when { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.chat-msg.system .avatar { background: var(--copper-100); color: var(--copper-700); font-size: 10px; }
.mention { background: var(--sea-100); color: #18505A; font-weight: 650; padding: 0 3px; border-radius: 4px; }
.shared-card { display: flex; flex-direction: column; gap: 3px; max-width: 420px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--white); color: var(--ink); text-decoration: none; margin-top: 4px; }
.shared-card .label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chat-form { margin: 0 26px 22px; background: var(--white); border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px; }
.chat-form textarea { border: 0; min-height: 52px; flex: 1 1 260px; }
.chat-form textarea:focus { outline: none; }
.day-divider { text-align: center; font-size: 12px; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 12px; }
.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 860px) { .chat { margin: -20px -16px -40px; } .chat-messages { max-height: none; } }

/* ---------- Clients ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { position: relative; border-radius: 10px; overflow: hidden; background: var(--sea-100); aspect-ratio: 4 / 3; border: 3px solid transparent; }
.photo.is-memory { border-color: var(--teal-600); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .badge { position: absolute; left: 8px; top: 8px; }
.photo .actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 8px; background: linear-gradient(transparent, rgba(16,52,60,.75)); }
.photo .actions .btn { min-height: 30px; font-size: 12px; padding: 0 8px; }
.timeline-item { display: flex; gap: 12px; font-size: 14px; padding: 7px 0; }
.timeline-item + .timeline-item { border-top: 1px solid #F0F3F3; }
.timeline-item .when { width: 118px; flex: none; color: var(--muted); font-size: 12.5px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); }
.dropzone.drag { border-color: var(--teal-600); background: var(--sea-50); }

/* ---------- Automations / templates ---------- */
.step-num { width: 28px; height: 28px; border-radius: 999px; background: var(--teal-800); color: var(--white); font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.preview-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-head { padding: 12px 18px; background: #EDF2F2; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 650; }
.preview-subject { padding: 14px 18px 0; font-size: 15px; font-weight: 700; }
.fields-help { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; font-size: 12.5px; }
.fields-help button { font: inherit; font-size: 12.5px; text-align: left; background: var(--sea-50); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; color: var(--ink); }
.fields-help button:hover { border-color: var(--sea); }
.fields-help code { color: var(--teal); font-weight: 650; }
.switch-row { display: flex; align-items: center; gap: 12px; }
.rule-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px 0; }
.rule-card + .rule-card { border-top: 1px solid #EEF2F2; }
.rule-card .info { flex: 1 1 300px; min-width: 0; }

/* ---------- Settings ---------- */
.service-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.service-grid > .card { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.test-result { font-size: 13px; padding: 10px 12px; border-radius: 8px; }
.test-result.ok { background: var(--green-100); color: #164F2B; }
.test-result.bad { background: var(--red-100); color: #7A1E17; }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps-list li::marker { color: var(--teal-600); font-weight: 700; }
.log-box { background: #0F2C33; color: #D8E8EA; border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; }
details.card summary { cursor: pointer; font-weight: 650; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: baseline; }
.check-mark { width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.checks .ok .check-mark { background: var(--green-100); color: var(--green); }
.checks .bad .check-mark { background: var(--red-100); color: var(--red); }
.checks .warn .check-mark { background: var(--amber-100); color: var(--amber); }

/* ---------- Plain pages ---------- */
body.plain { background: var(--sand); }
.center-card { max-width: 420px; margin: 8vh auto 40px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.center-card h1 { text-align: center; font-size: 22px; }
.login-logo { width: 170px; height: auto; display: block; margin: 0 auto; }
.install { max-width: 760px; margin: 32px auto 60px; padding: 0 16px; display: flex; flex-direction: column; gap: 18px; }
.install h1 { text-align: center; }
.install > p { text-align: center; }
@media (max-width: 520px) { .center-card { margin: 16px; padding: 22px; } }
