
:root {
  --ink: #14201b;
  --muted: #69736e;
  --soft: #8f9893;
  --line: #dfe6e2;
  --line-strong: #cdd8d2;
  --paper: #f4f7f5;
  --surface: #fbfcfb;
  --white: #ffffff;
  --dark: #10231c;
  --accent: #16875f;
  --accent-dark: #0f6d4b;
  --accent-soft: #e7f3ed;
  --danger: #b54c43;
  --warning: #b27a2e;
  --radius: 20px;
  --shadow: 0 22px 60px -34px rgba(24, 50, 39, .28);
  font-family: "Avenir Next", "Geist", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(22, 135, 95, .24); outline-offset: 2px; }
[hidden] { display: none !important; }

.ambient { position: fixed; border-radius: 999px; pointer-events: none; filter: blur(1px); opacity: .5; }
.ambient-a { width: 420px; height: 420px; left: 44%; top: -300px; background: rgba(113, 170, 142, .16); }
.ambient-b { width: 360px; height: 360px; right: -260px; bottom: -200px; background: rgba(174, 195, 184, .18); }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 720; letter-spacing: -.035em; }
.brand-mark { width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.brand-mark span { display: block; width: 6px; border-radius: 999px; background: #fff; transform: rotate(15deg); }
.brand-mark span:first-child { height: 9px; opacity: .72; }
.brand-mark span:last-child { height: 16px; }
.brand-light { color: #fff; }

.eyebrow, .kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; line-height: 1.2; font-weight: 800; color: var(--accent); }
.eyebrow-light { color: #a8dec9; }

.auth-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr); min-height: 100dvh; }
.auth-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: clamp(30px, 5vw, 68px); color: #eef6f2; background: var(--dark); }
.auth-story::before { content: ""; position: absolute; inset: auto -8% -25% auto; width: min(46vw, 650px); aspect-ratio: 1; border: 1px solid rgba(151, 207, 181, .13); border-radius: 50%; box-shadow: 0 0 0 75px rgba(151, 207, 181, .025), 0 0 0 150px rgba(151, 207, 181, .018); }
.auth-story-copy { position: relative; max-width: 680px; margin: auto 0 36px; }
.auth-story h1 { max-width: 650px; margin: 0; font-size: clamp(42px, 5.1vw, 76px); line-height: .98; letter-spacing: -.065em; font-weight: 590; }
.auth-story-copy > p:last-child { max-width: 560px; margin: 30px 0 0; color: #b9c9c2; line-height: 1.65; font-size: 16px; }
.signal-board { position: relative; width: min(520px, 82%); padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.13); }
.signal-line { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; color: #bed0c8; font-size: 12px; opacity: 0; animation: reveal-up .6s cubic-bezier(.16,1,.3,1) forwards; }
.signal-line-2 { animation-delay: .14s; }
.signal-line-3 { animation-delay: .28s; }
.signal-line i { width: 6px; height: 6px; border-radius: 50%; background: #68c39f; box-shadow: 0 0 0 5px rgba(104,195,159,.08); }
.signal-line b { font-weight: 600; color: #f4faf7; }
.auth-footnote { position: absolute; right: 30px; bottom: 30px; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; letter-spacing: .1em; color: #6f867c; }
.auth-panel { position: relative; display: grid; place-items: center; padding: 48px; background: #f8faf9; }
.auth-form-wrap { width: min(100%, 430px); }
.auth-form-wrap h2 { margin: 0; font-size: 38px; line-height: 1.06; letter-spacing: -.05em; font-weight: 650; }
.form-intro { margin: 16px 0 30px; color: var(--muted); line-height: 1.65; }
.form-intro strong { color: var(--ink); }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 52px; font-weight: 750; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .event-field legend { font-size: 13px; font-weight: 720; }
.field label span { color: var(--soft); font-weight: 500; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.label-row span { font-size: 11px; color: var(--soft); }
.field input { width: 100%; height: 52px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 15px; color: var(--ink); background: var(--white); transition: border-color .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1); }
.field input::placeholder { color: #a7afab; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22,135,95,.08); outline: 0; }
.field small { color: var(--soft); font-size: 11px; line-height: 1.45; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 66px; }
.input-action { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); border: 0; padding: 7px; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; }
.btn { min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 720; cursor: pointer; transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-primary { color: #fff; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.btn-wide { width: 100%; min-height: 54px; justify-content: space-between; padding: 0 17px 0 20px; }
.btn-arrow { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--accent); background: rgba(255,255,255,.92); }
.btn-compact { min-height: 40px; }
.plus { font-size: 19px; font-weight: 400; line-height: 1; }
.inline-error { min-height: 18px; margin: -6px 0 12px; color: var(--danger); font-size: 12px; line-height: 1.45; }
.inline-error:empty { display: none; }
.inline-error.centered { text-align: center; }
.auth-switch { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch button, .back-link { border: 0; padding: 0; color: var(--accent); background: transparent; font-weight: 720; cursor: pointer; }
.admin-access-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; color: var(--soft); font-size: 11px; line-height: 1.5; }
.admin-access-note .status-dot { width: 6px; height: 6px; }
.back-link { margin: 0 0 40px; font-size: 12px; }
.otp-symbol { display: flex; gap: 7px; margin-bottom: 28px; }
.otp-symbol span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.otp-symbol span:nth-child(2) { opacity: .56; }
.otp-symbol span:nth-child(3) { opacity: .24; }
.otp-input { font-family: "SFMono-Regular", Consolas, monospace !important; font-size: 23px !important; letter-spacing: .34em; text-align: center; padding-left: calc(15px + .34em) !important; }

.app-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 18px 18px; border-right: 1px solid var(--line); background: rgba(250,252,251,.92); backdrop-filter: blur(14px); }
.sidebar .brand { padding: 0 10px 28px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 45px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 0 12px; color: #66716c; background: transparent; text-decoration: none; text-align: left; font-size: 13px; font-weight: 620; cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.nav-item:hover { color: var(--ink); background: #edf2ef; transform: translateX(2px); }
.nav-item.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.nav-item svg, .icon-button svg, .security-note svg, .user-menu svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:first-child svg { fill: currentColor; stroke: none; }
.nav-item b { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: var(--muted); background: #e7ece9; text-align: center; font: 600 10px "SFMono-Regular", Consolas, monospace; }
.nav-item i { font-style: normal; font-size: 12px; }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 15px; }
.service-mini { display: flex; align-items: center; gap: 11px; padding: 8px 11px 16px; }
.service-mini div, .user-menu > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.service-mini strong, .user-menu strong { font-size: 11px; font-weight: 700; }
.service-mini small, .user-menu small { color: var(--soft); font-size: 10px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(22,135,95,.09); animation: breathe 2.4s ease-in-out infinite; }
.status-dot.is-down { background: var(--danger); box-shadow: 0 0 0 5px rgba(181,76,67,.09); animation: none; }
.user-menu { width: 100%; display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 9px; border: 0; border-radius: 12px; padding: 8px; background: transparent; text-align: left; cursor: pointer; }
.user-menu:hover { background: #edf2ef; }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--dark); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.workspace { min-width: 0; height: 100dvh; overflow: hidden; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(18px, 3vw, 42px); border-bottom: 1px solid var(--line); background: rgba(244,247,245,.88); backdrop-filter: blur(16px); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.breadcrumb span, .breadcrumb i { color: var(--soft); font-style: normal; }
.breadcrumb strong { font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-label { margin-right: 4px; color: var(--soft); font-size: 10px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.7); cursor: pointer; transition: transform .2s, color .2s, background .2s; }
.icon-button:hover { color: var(--ink); background: #fff; transform: translateY(-1px); }
.icon-button:active { transform: translateY(1px) scale(.97); }
.icon-button.small { width: 34px; height: 34px; }
.icon-button.small svg { width: 16px; }
.mobile-menu { display: none; }
.workspace-scroll { height: calc(100dvh - 72px); overflow-y: auto; overflow-x: hidden; }
.content-wrap { width: min(100%, 1420px); margin: 0 auto; padding: 45px clamp(20px, 3vw, 46px) 70px; }
.page-section { display: none; animation: reveal-up .42s cubic-bezier(.16,1,.3,1) both; }
.page-section.is-active { display: block; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.page-heading h1 { margin: 0; font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -.055em; font-weight: 630; }
.page-heading > div > p:last-child { max-width: 620px; margin: 14px 0 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.heading-status { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-bottom: 6px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.62); font-size: 11px; }
.compact-heading { align-items: center; }
.metric-rail { display: grid; grid-template-columns: 1fr 1fr 1fr 1.15fr; margin-bottom: 22px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.metric-rail article { position: relative; display: grid; align-content: center; min-height: 128px; padding: 22px 28px; border-right: 1px solid var(--line); }
.metric-rail article:first-child { padding-left: 0; }
.metric-rail article:last-child { border-right: 0; padding-right: 0; }
.metric-rail span { color: var(--muted); font-size: 11px; }
.metric-rail strong { margin: 8px 0 5px; font: 610 31px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: -.04em; }
.metric-rail small { color: var(--soft); font-size: 10px; }
.metric-service strong { color: var(--accent-dark); font-family: inherit; font-size: 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .85fr); gap: 22px; align-items: start; }
.panel { border: 1px solid rgba(205,216,210,.88); border-radius: var(--radius); background: rgba(255,255,255,.78); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.7); }
.accounts-panel, .activity-panel, .webhook-summary-panel, .pulse-panel { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; font-weight: 680; }
.panel-head .kicker { margin-bottom: 7px; color: var(--soft); font-size: 9px; }
.text-button { border: 0; padding: 6px 0; color: var(--accent-dark); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.account-list, .webhook-mini-list, .activity-list { display: grid; }
.account-row { display: grid; grid-template-columns: 44px minmax(120px, 1.2fr) minmax(100px, .8fr) auto; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.account-row:first-child { border-top: 0; }
.channel-avatar { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent-dark); background: var(--accent-soft); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.channel-avatar i { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--soft); }
.channel-avatar i.is-active { background: var(--accent); }
.account-main, .account-meta { min-width: 0; display: grid; gap: 4px; }
.account-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.account-main small, .account-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); font: 10px "SFMono-Regular", Consolas, monospace; }
.account-meta b { color: var(--muted); font-size: 10px; font-weight: 650; }
.account-actions { display: flex; justify-content: end; gap: 7px; }
.row-button { min-height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .2s, color .2s; }
.row-button:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-1px); }
.row-button:active { transform: translateY(1px); }
.row-button.danger:hover { border-color: #d9a7a2; color: var(--danger); }
.pulse-panel { position: relative; min-height: 292px; overflow: hidden; background: var(--dark); color: #f2f8f5; }
.pulse-panel .kicker { color: #86c8aa; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #a8c5b8; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.live-pill i { width: 5px; height: 5px; border-radius: 50%; background: #67c49c; animation: breathe 2s ease-in-out infinite; }
.pulse-visual { position: relative; display: grid; place-items: center; height: 126px; }
.pulse-core { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(165,220,194,.25); border-radius: 50%; background: rgba(76,157,120,.12); }
.pulse-core i { width: 11px; height: 11px; border-radius: 50%; background: #72cba5; box-shadow: 0 0 0 7px rgba(114,203,165,.08); }
.pulse-orbit { position: absolute; border: 1px solid rgba(165,220,194,.11); border-radius: 50%; animation: orbit-pulse 3.6s ease-in-out infinite; }
.orbit-a { width: 92px; height: 92px; }
.orbit-b { width: 138px; height: 138px; animation-delay: .8s; }
.pulse-copy { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.pulse-copy strong { font-size: 12px; }
.pulse-copy span { color: #8da39a; font-size: 10px; line-height: 1.5; }
.activity-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 11px; align-items: start; padding: 13px 0; border-top: 1px solid var(--line); }
.activity-item:first-child { border-top: 0; }
.activity-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.activity-copy { display: grid; gap: 3px; }
.activity-copy strong { font-size: 11px; }
.activity-copy span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.activity-item time { color: var(--soft); font: 9px "SFMono-Regular", Consolas, monospace; }
.webhook-mini { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
.webhook-mini:first-child { border-top: 0; }
.webhook-mini > i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.webhook-mini div { min-width: 0; display: grid; gap: 3px; }
.webhook-mini strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px "SFMono-Regular", Consolas, monospace; }
.webhook-mini small { color: var(--soft); font-size: 9px; }
.webhook-mini > span { color: var(--muted); font-size: 9px; }
.empty-state { min-height: 185px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 28px; text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border: 1px dashed var(--line-strong); border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: 23px; }
.empty-state strong { font-size: 13px; }
.empty-state span { max-width: 330px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty-state .btn { margin-top: 10px; }
.skeleton-stack { gap: 12px; }
.skeleton-line { height: 64px; border-radius: 12px; background: linear-gradient(90deg, #edf1ef 25%, #f7f9f8 45%, #edf1ef 65%); background-size: 250% 100%; animation: shimmer 1.6s ease-in-out infinite; }

.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-toolbar > span { color: var(--muted); font-size: 11px; }
.filter-group { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.6); }
.filter { min-height: 33px; border: 0; border-radius: 8px; padding: 0 13px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.filter.is-active { color: var(--ink); background: #fff; box-shadow: 0 3px 10px rgba(25,50,39,.07); }
.accounts-table, .webhook-table { overflow: hidden; }
.table-head, .full-account-row, .webhook-head, .full-webhook-row { display: grid; align-items: center; gap: 16px; padding: 16px 22px; }
.table-head { grid-template-columns: minmax(190px,1.25fr) minmax(110px,.75fr) minmax(120px,.75fr) minmax(120px,.75fr) auto; color: var(--soft); border-bottom: 1px solid var(--line); background: rgba(239,244,241,.55); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.full-account-row { grid-template-columns: minmax(190px,1.25fr) minmax(110px,.75fr) minmax(120px,.75fr) minmax(120px,.75fr) auto; border-top: 1px solid var(--line); }
.full-account-row:first-of-type { border-top: 0; }
.table-account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table-account .channel-avatar { width: 38px; height: 38px; border-radius: 12px; }
.table-account-copy { min-width: 0; display: grid; gap: 3px; }
.table-account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.table-account-copy small, .mono-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); font: 10px "SFMono-Regular", Consolas, monospace; }
.state-pill { width: fit-content; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: #eef1ef; font-size: 9px; font-weight: 700; }
.state-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--soft); }
.state-pill.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.state-pill.is-active i { background: var(--accent); }
.webhook-explainer { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.48); }
.flow-node { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; align-items: center; }
.flow-node > span { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--accent-dark); background: var(--accent-soft); font: 800 8px "SFMono-Regular", Consolas, monospace; }
.flow-node strong { font-size: 11px; }
.flow-node small { color: var(--soft); font-size: 9px; }
.webhook-explainer > i { color: var(--line-strong); font-style: normal; }
.webhook-head { grid-template-columns: minmax(220px,1.4fr) minmax(140px,1fr) 110px 115px auto; color: var(--soft); border-bottom: 1px solid var(--line); background: rgba(239,244,241,.55); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.full-webhook-row { grid-template-columns: minmax(220px,1.4fr) minmax(140px,1fr) 110px 115px auto; border-top: 1px solid var(--line); }
.endpoint-cell { min-width: 0; display: grid; gap: 4px; }
.endpoint-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px "SFMono-Regular", Consolas, monospace; }
.endpoint-cell small { color: var(--soft); font-size: 9px; }
.event-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.event-tag { padding: 4px 7px; border-radius: 7px; color: var(--muted); background: #edf1ef; font: 8px "SFMono-Regular", Consolas, monospace; }

.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12,27,21,.58); backdrop-filter: blur(8px); animation: fade-in .2s ease-out; }
.modal-card { position: relative; width: min(100%, 460px); max-height: calc(100dvh - 44px); overflow-y: auto; border: 1px solid rgba(255,255,255,.45); border-radius: 24px; padding: 31px; background: #fbfcfb; box-shadow: 0 30px 90px -28px rgba(6,20,14,.55), inset 0 1px 0 rgba(255,255,255,.8); animation: modal-in .38s cubic-bezier(.16,1,.3,1); }
.modal-wide { width: min(100%, 570px); }
.modal-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
.modal-icon { margin-bottom: 25px; }
.modal-card h2 { margin: 0; font-size: 29px; letter-spacing: -.045em; }
.modal-intro { margin: 12px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.qr-stage { display: grid; place-items: center; min-height: 264px; margin: 20px 0; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.qr-placeholder { display: grid; justify-items: center; gap: 7px; text-align: center; }
.qr-placeholder strong { margin-top: 6px; font-size: 12px; }
.qr-placeholder small { color: var(--soft); font-size: 10px; }
.qr-corners { position: relative; width: 112px; height: 112px; background-image: radial-gradient(#d8e2dd 1px, transparent 1px); background-size: 8px 8px; }
.qr-corners i { position: absolute; width: 24px; height: 24px; border-color: var(--accent); }
.qr-corners i:nth-child(1) { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.qr-corners i:nth-child(2) { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.qr-corners i:nth-child(3) { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.qr-corners i:nth-child(4) { right: 0; bottom: 0; border-right: 2px solid; border-bottom: 2px solid; }
.scan-line { position: absolute; left: 5px; right: 5px; top: 50%; height: 1px; background: var(--accent); opacity: .7; animation: scan 2.4s ease-in-out infinite; }
#qr-image { width: 210px; height: 210px; object-fit: contain; }
.qr-status { display: flex; align-items: center; gap: 12px; margin: -8px 0 18px; }
.qr-status div { display: grid; gap: 2px; }
.qr-status strong { font-size: 11px; }
.qr-status small { color: var(--soft); font-size: 9px; }
.security-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; color: var(--soft); font-size: 9px; line-height: 1.5; }
.security-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--accent); }
.event-field { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; border: 0; }
.event-field legend { margin-bottom: 9px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-option { cursor: pointer; }
.check-option input { position: absolute; opacity: 0; pointer-events: none; }
.check-option > span { min-height: 46px; display: grid; grid-template-columns: 17px 1fr; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: #fff; }
.check-option input:checked + span { border-color: #97c7b1; background: var(--accent-soft); }
.check-option i { position: relative; display: block; width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.check-option input:checked + span i { border-color: var(--accent); background: var(--accent); }
.check-option input:checked + span i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 7px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(40deg); }
.check-option b { font-size: 10px; }
.check-all > span { grid-template-columns: 17px 1fr; }
.check-all small { grid-column: 2; color: var(--soft); font-size: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 3px; }
.toast-region { position: fixed; z-index: 40; right: 24px; bottom: 24px; display: grid; gap: 10px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 40px)); display: grid; grid-template-columns: 9px 1fr auto; align-items: start; gap: 12px; padding: 14px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; color: #eff7f3; background: #183129; box-shadow: 0 18px 45px -18px rgba(8,24,17,.5), inset 0 1px 0 rgba(255,255,255,.08); pointer-events: auto; animation: toast-in .4s cubic-bezier(.16,1,.3,1); }
.toast > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #67c49c; }
.toast.is-error > i { background: #e1847b; }
.toast div { display: grid; gap: 3px; }
.toast strong { font-size: 11px; }
.toast span { color: #9fb4aa; font-size: 9px; line-height: 1.4; }
.toast button { border: 0; padding: 0; color: #94a99f; background: transparent; cursor: pointer; }

@keyframes reveal-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px) scale(.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(.86); } 50% { opacity: 1; transform: scale(1); } }
@keyframes orbit-pulse { 0%,100% { opacity: .45; transform: scale(.93); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes scan { 0%,100% { transform: translateY(-43px); opacity: 0; } 15%,85% { opacity: .7; } 50% { transform: translateY(43px); } }

@media (max-width: 1050px) {
  .auth-story h1 { font-size: 52px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(250px, .85fr); }
  .table-head, .full-account-row { grid-template-columns: minmax(180px,1fr) 110px 120px auto; }
  .table-head span:nth-child(3), .full-account-row > :nth-child(3) { display: none; }
  .webhook-head, .full-webhook-row { grid-template-columns: minmax(210px,1.2fr) minmax(130px,1fr) 100px auto; }
  .webhook-head span:nth-child(4), .full-webhook-row > :nth-child(4) { display: none; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100dvh; padding: 32px 22px; }
  .mobile-brand { display: flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 15; left: 0; top: 0; width: 246px; transform: translateX(-103%); box-shadow: 20px 0 50px rgba(20,38,30,.15); transition: transform .35s cubic-bezier(.16,1,.3,1); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .breadcrumb { margin-right: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pulse-panel { grid-row: auto; min-height: 280px; }
  .metric-rail { grid-template-columns: 1fr 1fr; }
  .metric-rail article { padding: 20px; border-bottom: 1px solid var(--line); }
  .metric-rail article:nth-child(2) { border-right: 0; }
  .metric-rail article:nth-child(3) { padding-left: 0; border-bottom: 0; }
  .metric-rail article:nth-child(4) { border-bottom: 0; }
  .webhook-explainer { grid-template-columns: 1fr; }
  .webhook-explainer > i { display: none; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 14px; }
  .topbar .sync-label, .breadcrumb span, .breadcrumb i { display: none; }
  .btn-compact { width: 40px; padding: 0; font-size: 0; }
  .btn-compact .plus { font-size: 20px; }
  .content-wrap { padding: 30px 15px 55px; }
  .page-heading, .compact-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 28px; }
  .page-heading h1 { font-size: 38px; }
  .heading-status { align-self: flex-start; }
  .metric-rail article { min-height: 112px; padding: 17px 14px; }
  .metric-rail article:first-child { padding-left: 0; }
  .metric-rail article:nth-child(3) { padding-left: 0; }
  .metric-rail strong { font-size: 26px; }
  .accounts-panel, .activity-panel, .webhook-summary-panel, .pulse-panel { padding: 19px; }
  .account-row { grid-template-columns: 39px minmax(0,1fr) auto; }
  .account-row .account-meta { display: none; }
  .account-actions .danger { display: none; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .table-head { display: none; }
  .full-account-row { grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; padding: 17px; }
  .full-account-row > :nth-child(1) { display: contents; }
  .full-account-row .channel-avatar { grid-column: 1; }
  .full-account-row .table-account-copy { grid-column: 2; }
  .full-account-row > :nth-child(2), .full-account-row > :nth-child(3), .full-account-row > :nth-child(4) { display: none; }
  .full-account-row .account-actions { grid-column: 3; }
  .webhook-head { display: none; }
  .full-webhook-row { grid-template-columns: 1fr auto; padding: 17px; }
  .full-webhook-row > :nth-child(2), .full-webhook-row > :nth-child(3), .full-webhook-row > :nth-child(4) { display: none; }
  .modal { padding: 10px; }
  .modal-card { max-height: calc(100dvh - 20px); border-radius: 20px; padding: 25px 20px; }
  .check-grid { grid-template-columns: 1fr; }
  .toast-region { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
