:root {
  --orange: #ff6500;
  --orange-dark: #d94800;
  --orange-soft: #fff0e8;
  --ink: #202124;
  --muted: #6f7379;
  --line: #e9e7e3;
  --paper: #fffdf9;
  --green: #168463;
  --shadow: 0 18px 50px rgba(32, 33, 36, .09);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f7f5f1; font-family: "DM Sans", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; }
.sidebar { background: var(--ink); color: #fff; padding: 26px 18px; display: flex; flex-direction: column; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px; }
.brand img { width: 142px; height: auto; filter: brightness(0) invert(1); }
.side-label { color: #92949a; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; padding: 0 14px; }
.nav { display: grid; gap: 6px; }
.nav button { border: 0; background: transparent; color: #b8bbc0; text-align: left; border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nav button:hover, .nav button.active { background: #34363a; color: #fff; }
.nav-icon { width: 19px; text-align: center; color: var(--orange); font-weight: 800; }
.side-bottom { margin-top: auto; display: grid; gap: 14px; }
.plan-card { background: #303237; border-radius: 16px; padding: 16px; }
.plan-card p { color: #aeb1b5; font-size: 13px; line-height: 1.45; margin: 7px 0 14px; }
.progress { height: 5px; border-radius: 999px; background: #54565a; overflow: hidden; }
.progress span { display: block; width: 42%; height: 100%; background: var(--orange); }
.side-user { display: flex; align-items: center; gap: 10px; color: #cdd0d4; font-size: 13px; padding: 0 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font-weight: 700; }
.main { min-width: 0; }
.topbar { height: 76px; padding: 0 38px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 0; font: 700 23px "Space Grotesk", sans-serif; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.help { color: var(--muted); font-size: 13px; }
.button.help { color: var(--ink); }
.button.help:hover { color: var(--orange-dark); border-color: var(--orange); background: var(--orange-soft); }
.content { padding: 34px 38px 60px; max-width: 1400px; }
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.eyebrow { color: var(--orange); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h2, h3, p { margin-top: 0; }
h2 { font: 700 34px "Space Grotesk", sans-serif; letter-spacing: -.03em; margin-bottom: 8px; }
h3 { font: 700 18px "Space Grotesk", sans-serif; margin-bottom: 8px; }
.subtle { color: var(--muted); }
.button { border: 0; border-radius: 11px; padding: 12px 17px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.button.danger { color: #b42318; }
.tag-entry { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px; border: 1px solid #dad8d3; border-radius: 10px; background: #fff; }
.tag-entry input { flex: 1; min-width: 180px; border: 0; outline: 0; padding: 5px; }
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; }
.tag-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }
.campaign-link-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }
.campaign-link-row input { width: 100%; border: 1px solid #dad8d3; border-radius: 10px; padding: 11px; background: #fff; color: var(--ink); outline: 0; }
.content-builder { display: grid; gap: 10px; }
.content-block { border: 1px solid #dad8d3; border-radius: 12px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.block-toolbar { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.block-toolbar strong { margin-right: auto; color: var(--ink); }
.block-toolbar button { border: 0; background: var(--orange-soft); color: var(--orange-dark); border-radius: 7px; padding: 4px 8px; cursor: pointer; }
.content-block input, .content-block textarea, .content-block select { width: 100%; border: 1px solid #dad8d3; border-radius: 9px; padding: 10px; background: #fff; color: var(--ink); }
.block-add-menu { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--orange); color: #fff; }
.button.primary:hover { background: var(--orange-dark); }
.button.ghost { color: var(--ink); background: #f0eeea; }
.button.white { background: #fff; color: var(--orange-dark); }
.button.small { padding: 9px 12px; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.stat { padding: 20px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font: 700 30px "Space Grotesk", sans-serif; margin: 10px 0 5px; }
.stat .delta { font-size: 12px; color: var(--green); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1.22fr .78fr; gap: 18px; }
.panel { padding: 22px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-header h3 { margin: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: #8b8d90; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; padding: 0 10px 11px; }
.table td { border-top: 1px solid var(--line); padding: 14px 10px; font-size: 14px; }
.table td:first-child, .table th:first-child { padding-left: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.status:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.status.sent, .status.active { color: var(--green); }
.status.sent:before, .status.active:before { background: var(--green); }
.status.draft { color: #9a6b00; }
.status.draft:before { background: #e6ad27; }
.chart { height: 190px; display: flex; align-items: end; gap: 15px; padding: 22px 8px 4px; border-bottom: 1px solid var(--line); }
.bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; gap: 8px; text-align: center; color: #9b9da0; font-size: 11px; }
.bar { width: 100%; min-height: 10px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #ff8635, var(--orange)); }
.quick { display: grid; gap: 10px; }
.quick button { border: 1px solid var(--line); background: transparent; padding: 14px; border-radius: 12px; text-align: left; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.quick button:hover { background: var(--orange-soft); border-color: #ffc5a6; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.page-head h2 { margin: 0; }
.search { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fff; min-width: 220px; }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; background: var(--orange-soft); color: var(--orange-dark); }
.empty { text-align: center; padding: 54px 22px; color: var(--muted); }
.flow { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr; align-items: center; gap: 12px; margin-top: 25px; }
.flow-card { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 18px; min-height: 108px; }
.flow-card strong { display: block; margin-bottom: 9px; }
.flow-arrow { color: var(--orange); font-size: 25px; text-align: center; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); }
.auth-art { background: var(--orange); color: #fff; padding: 46px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .brand img { width: 184px; }
.auth-copy { max-width: 470px; padding-bottom: 40px; }
.auth-copy h1 { font: 700 62px "Space Grotesk", sans-serif; line-height: .98; letter-spacing: -.055em; margin-bottom: 20px; }
.auth-copy p { font-size: 18px; line-height: 1.55; color: #fff1e8; }
.pulse-art { width: min(420px, 90%); height: 160px; margin-top: 34px; position: relative; }
.pulse-line { position: absolute; inset: 0; background: url('/zappii-launch-envelope-mark.png') center / contain no-repeat; filter: brightness(0) invert(1); opacity: .75; }
.auth-panel { display: grid; place-items: center; padding: 35px; }
.auth-box { width: min(430px, 100%); }
.auth-box h2 { font-size: 38px; margin-bottom: 10px; }
.auth-box .subtle { line-height: 1.55; margin-bottom: 25px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #dad8d3; border-radius: 10px; padding: 13px; background: #fff; color: var(--ink); outline: 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,101,0,.12); }
.form .button { width: 100%; margin-top: 4px; }
.form-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }
.form-note a { color: var(--orange-dark); font-weight: 700; }
.notice { border-radius: 12px; padding: 13px 15px; background: var(--orange-soft); color: #9c3d0b; font-size: 13px; line-height: 1.45; margin-bottom: 18px; }
.preview-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(20, 20, 20, .58); }
.preview-card { width: min(680px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.preview-header h3 { margin: 0; }
.preview-meta { display: grid; gap: 4px; padding: 16px 22px; background: #fff7f0; color: var(--ink); }
.preview-meta .subtle { font-size: 12px; }
.email-preview { min-height: 260px; padding: 30px; color: var(--ink); line-height: 1.6; background: #fff; }
.email-preview img { display: inline-block; max-width: 100%; height: auto; }
.email-preview .preview-link { color: var(--orange-dark); font-weight: 700; }
.preview-empty { color: var(--muted); font-style: italic; }
.automation-source-field[hidden] { display: none !important; }
.table-scroll { overflow-x: auto; }
.engagement-panel { margin-top: 24px; }
.engagement-panel .table { min-width: 820px; }
.engagement-chart { display: grid; gap: 14px; padding: 4px 0 24px; }
.chart-row { display: grid; grid-template-columns: 76px 1fr 42px; align-items: center; gap: 12px; font-size: 13px; }
.chart-track { height: 13px; overflow: hidden; border-radius: 99px; background: #f2e8e0; }
.chart-fill { display: block; height: 100%; border-radius: inherit; min-width: 2px; }
.chart-fill.opened, .legend-dot.opened { background: var(--orange); }
.chart-fill.clicked, .legend-dot.clicked { background: #2f7f72; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 12px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.engagement-list-header { margin-top: 8px; }
.report-search { width: min(320px, 100%); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.engagement-row { cursor: pointer; }
.engagement-row:hover { background: #fff7f0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 24px; }
.detail-grid > div { display: grid; gap: 5px; }
.detail-grid .label { color: var(--muted); font-size: 12px; }
.api-key-list { display: grid; gap: 10px; margin: 18px 0; }
.api-key-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; }
.api-key-form { max-width: 460px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.help-card { min-width: 0; }
.help-card h3 { margin-top: 0; }
.help-card pre { overflow-x: auto; padding: 13px; border-radius: 10px; background: #211d1b; color: #fff7f0; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.help-card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.api-reference { margin-top: 20px; }
.api-reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.api-reference-grid h4 { margin: 0 0 8px; }
.api-reference-grid pre { overflow-x: auto; padding: 12px; border-radius: 10px; background: #211d1b; color: #fff7f0; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.help-search-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.help-search { width: min(520px, 100%); padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.help-search:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,101,0,.12); outline: none; }
.mobile-toggle { display: none; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .app-shell { display: block; } .sidebar { display: none; } .topbar { padding: 0 20px; } .content { padding: 26px 20px 42px; } .welcome { align-items: start; flex-direction: column; } .stats { grid-template-columns: 1fr 1fr; } .table { min-width: 620px; } .panel { overflow-x: auto; } .help-grid, .api-reference-grid { grid-template-columns: 1fr; } .auth-shell { grid-template-columns: 1fr; } .auth-art { min-height: 340px; padding: 28px; } .auth-copy h1 { font-size: 46px; } .auth-panel { padding: 30px 22px; } }
