/* ============================================================
   Wa by Elivate — Screen styles
   ============================================================ */

/* ---------- Connection ---------- */
.conn-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.conn-status-card, .conn-qr-card { padding: 30px; }
.conn-status-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.02em; }
.conn-status-card p { font-size: 13.5px; line-height: 1.55; max-width: 420px; }
.conn-ok-ring { width: 58px; height: 58px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 0 0 6px rgba(52,210,123,0.06); }
.conn-meta { margin-top: 22px; border-top: 1px solid var(--border); }
.conn-meta-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.conn-meta-row span { color: var(--text-3); }
.conn-meta-row b { font-weight: 500; }
.conn-side { display: flex; flex-direction: column; gap: 16px; }
.conn-qr-card { display: flex; flex-direction: column; align-items: center; }
.qr-frame { position: relative; padding: 16px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 264px; height: 264px; display: grid; place-items: center; overflow: hidden; }
.qr-scanning { position: absolute; inset: 0; background: rgba(11,11,13,0.78); display: grid; place-items: center; }
.qr-scan-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); box-shadow: 0 0 14px var(--brand-glow); animation: scanY 1.5s ease-in-out infinite; }
@keyframes scanY { 0%,100% { top: 8%; } 50% { top: 92%; } }
.qr-scan-label { color: var(--brand-bright); font-size: 13px; font-weight: 500; }
.qr-status { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); margin: 18px 0 14px; }
.step-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.step-row:last-child { border-bottom: none; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-2); font-size: 12px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.step-row b { display: block; font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.step-row .muted { font-size: 12.5px; line-height: 1.45; }
.endpoint-row { display: flex; align-items: center; gap: 10px; }
.endpoint-row code { font-size: 13px; color: var(--text); }
.status-json { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; font-size: 12px; color: var(--text-2); white-space: pre; line-height: 1.6; margin-top: 12px; }
.safety-mini { background: linear-gradient(180deg, rgba(245,181,68,0.05), transparent); }

/* ---------- Dashboard ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card { padding: 17px 18px; }
.stat-top { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.stat-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.stat-ic.brand { background: var(--brand-soft); color: var(--brand); }
.stat-ic.green { background: var(--green-soft); color: var(--green); }
.stat-ic.blue { background: var(--blue-soft); color: var(--blue); }
.stat-ic.violet { background: var(--violet-soft); color: var(--violet); }
.stat-ic.amber { background: var(--amber-soft); color: var(--amber); }
.stat-ic.red { background: var(--red-soft); color: var(--red); }
.stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.stat-value { font-size: 27px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; margin-bottom: 7px; }
.stat-sub { font-size: 11.5px; color: var(--text-3); }
.cap-bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px 0; }
.cap-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-bright)); }

.dash-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.card-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 14.5px; font-weight: 600; flex: 1; }
.activity-list { padding: 6px; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); transition: background .12s; }
.activity-row:hover { background: var(--surface-2); }
.act-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.act-ic.brand { background: var(--brand-soft); color: var(--brand); }
.act-ic.green { background: var(--green-soft); color: var(--green); }
.act-ic.blue { background: var(--blue-soft); color: var(--blue); }
.act-ic.red { background: var(--red-soft); color: var(--red); }
.act-ic.amber { background: var(--amber-soft); color: var(--amber); }
.act-body { flex: 1; min-width: 0; }
.act-text { font-size: 13px; font-weight: 450; }
.act-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.act-time { font-size: 11.5px; color: var(--text-4); flex-shrink: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; }
.quick-btn { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--text); transition: background .12s; text-align: left; }
.quick-btn:hover { background: var(--surface-2); }
.quick-btn:hover .qb-arrow { color: var(--text-2); transform: translateX(2px); }
.qb-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.qb-ic.brand { background: var(--brand-soft); color: var(--brand); }
.qb-ic.blue { background: var(--blue-soft); color: var(--blue); }
.qb-ic.violet { background: var(--violet-soft); color: var(--violet); }
.qb-arrow { margin-left: auto; color: var(--text-4); transition: transform .12s, color .12s; }
.safety-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.safety-row b { font-weight: 500; font-size: 12.5px; }

/* ---------- List toolbar / segmented ---------- */
.list-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-3); transition: background .12s, color .12s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface-3); color: var(--text); }
.seg-n { font-size: 11px; color: var(--text-4); }
.seg-btn.active .seg-n { color: var(--brand-bright); }

/* ---------- Summary line (tokens) ---------- */
.summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 13px; line-height: 1.7; }
.sum-plain { color: var(--text-3); }
.sum-token { padding: 1px 8px; border-radius: 6px; font-weight: 500; font-size: 12.5px; border: 1px solid transparent; }
.sum-match { background: var(--brand-soft); color: var(--brand-bright); border-color: var(--brand-line); }
.sum-scope { background: var(--violet-soft); color: var(--violet); border-color: rgba(169,139,255,0.25); }
.sum-action { background: var(--blue-soft); color: var(--blue); border-color: rgba(91,157,255,0.25); }
.sum-trigger { background: var(--green-soft); color: var(--green); border-color: rgba(52,210,123,0.25); }
.sum-quote { color: var(--text); background: var(--surface-2); border-color: var(--border-2); }
.sum-mono { font-family: var(--mono); color: var(--text-2); background: var(--surface-2); border-color: var(--border-2); }
.sum-arrow { color: var(--brand); font-weight: 600; padding: 0 2px; }

/* ---------- Rule cards ---------- */
.rule-list { display: flex; flex-direction: column; gap: 11px; }
.rule-card { display: flex; align-items: stretch; transition: border-color .14s, background .14s; }
.rule-card:hover { border-color: var(--border-strong); }
.rule-card.paused { opacity: 0.66; }
.rule-main { flex: 1; padding: 16px 18px; cursor: pointer; min-width: 0; }
.rule-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rule-trig { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.rule-trig.brand { background: var(--brand-soft); color: var(--brand); }
.rule-trig.green { background: var(--green-soft); color: var(--green); }
.rule-trig.violet { background: var(--violet-soft); color: var(--violet); }
.rule-name { font-size: 14.5px; font-weight: 550; }
.rule-action-tag { margin-left: 8px; }
.rule-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 12px; color: var(--text-3); }
.rf-item { display: inline-flex; align-items: center; gap: 5px; }
.rf-dot { color: var(--text-4); }
.rule-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; padding: 16px 18px; border-left: 1px solid var(--border); gap: 14px; }
.rule-actions { display: flex; gap: 4px; }
.empty-state { text-align: center; padding: 60px; color: var(--text-4); }
.empty-state svg { margin-bottom: 10px; }

/* ---------- Builder ---------- */
.builder { display: flex; flex-direction: column; height: 100%; }
.builder-bar { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--sidebar); }
.builder-name { background: transparent; border: none; outline: none; color: var(--text); font-size: 15px; font-weight: 600; padding: 6px 10px; border-radius: 7px; min-width: 220px; }
.builder-name:hover { background: var(--surface); }
.builder-name:focus { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-2); }
.builder-name::placeholder { color: var(--text-4); }
.builder-body { flex: 1; display: grid; grid-template-columns: 1fr 392px; min-height: 0; }
.canvas { display: flex; flex-direction: column; min-width: 0; background:
  radial-gradient(circle at center, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 22px 22px,
  var(--bg-2); position: relative; }
.canvas-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; display: flex; align-items: center; justify-content: safe center; padding: 28px 32px; }
.flow-row { display: flex; align-items: center; }
.flow-node { width: 166px; min-height: 132px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 14px; text-align: left; transition: border-color .14s, box-shadow .14s, transform .12s; position: relative; flex-shrink: 0; }
.flow-node:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.flow-node.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-md); }
.flow-node.dim { opacity: 0.5; }
.fn-step { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); margin-bottom: 12px; }
.flow-node.active .fn-step { color: var(--brand); }
.fn-head { margin-bottom: 12px; }
.fn-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.fn-ic.brand { background: var(--brand-soft); color: var(--brand); }
.fn-ic.green { background: var(--green-soft); color: var(--green); }
.fn-ic.violet { background: var(--violet-soft); color: var(--violet); }
.fn-ic.blue { background: var(--blue-soft); color: var(--blue); }
.fn-ic.amber { background: var(--amber-soft); color: var(--amber); }
.fn-ic.red { background: var(--red-soft); color: var(--red); }
.fn-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.fn-value { font-size: 12px; color: var(--text-3); line-height: 1.4; word-break: break-word; }
.connector { flex-shrink: 0; display: grid; place-items: center; width: 48px; }
.connector svg { width: 48px; }
.flow-dash { animation: dashMove 1s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -14; } }
.summary-bar { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface); padding: 16px 24px; display: flex; align-items: center; gap: 16px; }
.summary-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); flex-shrink: 0; }

/* Inspector */
.inspector { border-left: 1px solid var(--border); background: var(--sidebar); display: flex; flex-direction: column; min-height: 0; }
.insp-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.insp-step-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--brand); display: grid; place-items: center; }
.insp-title { font-size: 14.5px; font-weight: 600; }
.insp-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.insp-body { flex: 1; overflow-y: auto; padding: 20px; }
.radio-cards { display: flex; flex-direction: column; gap: 7px; }
.radio-card { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border-2); color: var(--text-2); font-size: 13px; transition: border-color .12s, background .12s, color .12s; text-align: left; }
.radio-card:hover { border-color: var(--border-strong); color: var(--text); }
.radio-card.on { border-color: var(--brand-line); background: var(--brand-soft); color: var(--text); }
.rc-ic { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); flex-shrink: 0; }
.radio-card.on .rc-ic { background: var(--brand-soft-2); color: var(--brand); }
.rc-label { flex: 1; font-weight: 450; }
.rc-check { color: var(--brand); display: flex; }
.insp-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: 9px; }
.insp-hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text-2); }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.checkbox { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface-2); display: grid; place-items: center; color: #1A0E08; flex-shrink: 0; transition: background .12s, border-color .12s; }
.checkbox.on { background: var(--brand); border-color: transparent; }
.insp-callout { display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; padding: 12px; border-radius: var(--r-sm); background: var(--amber-soft); border: 1px solid rgba(245,181,68,0.25); color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.insp-callout svg { color: var(--amber); flex-shrink: 0; margin-top: 1px; }
.insp-callout b { color: var(--text); }
.message-composer { border: 1px solid var(--border-2); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.format-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); overflow-x: auto; }
.format-btn { height: 28px; min-width: 30px; padding: 0 8px; border-radius: 6px; color: var(--text-2); background: transparent; border: 1px solid transparent; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.format-btn:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-2); }
.format-btn code { font-family: var(--mono); font-size: 11px; }
.format-divider { width: 1px; height: 18px; background: var(--border-strong); margin: 0 3px; flex-shrink: 0; }
.message-textarea { border: 0; border-radius: 0; background: var(--bg-2); resize: vertical; }
.message-textarea:focus { box-shadow: inset 0 0 0 1px var(--brand-line); }
.format-help { padding: 8px 10px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 11.5px; line-height: 1.45; }
.format-help code { color: var(--text-2); background: var(--surface-3); border-radius: 4px; padding: 1px 4px; font-family: var(--mono); font-size: 11px; }
.composer-preview { border-top: 1px solid var(--border); padding: 10px; background: #0b141a; }
.composer-preview-title { color: rgba(233,237,239,0.68); font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.wa-rendered { white-space: normal; }
.wa-line { min-height: 1.45em; }
.wa-quote { padding-left: 8px; border-left: 3px solid rgba(233,237,239,0.28); color: rgba(233,237,239,0.86); }
.wa-list { display: grid; grid-template-columns: auto 1fr; gap: 7px; }
.wa-list-mark { color: rgba(233,237,239,0.7); }
.wa-rendered code { font-family: var(--mono); background: rgba(233,237,239,0.12); border-radius: 4px; padding: 1px 4px; font-size: 0.94em; }
.wa-code-block { display: block; white-space: pre-wrap; margin: 3px 0; padding: 7px 8px !important; }
.ai-action-panel { margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-2); }
.ai-panel-head { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 13px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.ai-panel-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; color: var(--violet); background: var(--violet-soft); }
.ai-panel-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.ai-panel-head p { margin: 0; color: var(--text-3); font-size: 11.5px; line-height: 1.45; }
.ai-field-group { margin-bottom: 14px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.field-row .field-label { margin: 0; }
.field-actions { display: flex; align-items: center; gap: 10px; }
.ai-prompt { min-height: 190px; resize: vertical; }
.ai-grid { display: grid; grid-template-columns: 1fr 118px; gap: 10px; align-items: end; }
.number-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.number-with-unit span { color: var(--text-3); font-size: 12px; }
.ai-test-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ai-test-row span { color: var(--text-3); font-size: 11.5px; line-height: 1.4; }
.test-output { margin-top: 16px; padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border-2); }
.test-output.error { border-color: rgba(255,107,107,0.35); background: var(--red-soft); }
.test-output-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 11.5px; font-weight: 600; margin-bottom: 9px; }
.test-output-head span { display: inline-flex; align-items: center; gap: 6px; }
.test-output pre { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.55; }
.mini-link { color: var(--text-3); font-size: 11.5px; }
.mini-link:hover { color: var(--text); }
.insp-foot { border-top: 1px solid var(--border); padding: 16px 20px; }

.schedule-box { margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-2); }
.schedule-mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 14px; }
.schedule-chip { height: 34px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: background .12s, border-color .12s, color .12s; }
.schedule-chip:hover { color: var(--text); border-color: var(--border-strong); }
.schedule-chip.on { color: var(--brand-bright); background: var(--brand-soft); border-color: var(--brand-line); }
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.weekday-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.weekday-pill { height: 30px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-3); font-size: 12px; font-weight: 500; }
.weekday-pill.on { color: var(--violet); background: var(--violet-soft); border-color: rgba(169,139,255,0.25); }
.cron-preview { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 11px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--border); }
.cron-preview span { color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.cron-preview code { color: var(--text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Groups ---------- */
.group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.group-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: border-color .14s; }
.group-card:hover { border-color: var(--border-strong); }
.gc-top { display: flex; gap: 12px; align-items: center; }
.gc-av { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.gc-av.lg { width: 52px; height: 52px; font-size: 17px; border-radius: 13px; }
.gc-meta { min-width: 0; }
.gc-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-sub { font-size: 11px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gc-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.gc-actions { display: flex; gap: 7px; align-items: center; padding-top: 4px; border-top: 1px solid var(--border); margin-top: 2px; padding-top: 14px; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); z-index: 50; animation: fadeUp .18s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; background: var(--bg); border-left: 1px solid var(--border-2); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideIn .28s cubic-bezier(.2,.7,.3,1); overflow-y: auto; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 13px; padding: 22px; border-bottom: 1px solid var(--border); }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-stats div { display: flex; flex-direction: column; gap: 3px; }
.drawer-stats b { font-size: 18px; font-weight: 600; }
.drawer-stats span { font-size: 11.5px; color: var(--text-3); }
.drawer-section { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.ds-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); margin-bottom: 13px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-tile { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 500; color: var(--text); transition: border-color .12s, background .12s; }
.action-tile:hover { border-color: var(--border-strong); background: var(--surface-2); }
.action-tile svg { color: var(--text-3); }
.action-tile.danger { color: var(--red); }
.action-tile.danger svg { color: var(--red); }
.action-tile.danger:hover { background: var(--red-soft); border-color: rgba(255,92,92,0.3); }
.member-list { display: flex; flex-direction: column; gap: 4px; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: var(--r-sm); }
.member-row:hover { background: var(--surface); }
.m-av { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.m-meta { flex: 1; }
.m-name { font-size: 13px; font-weight: 450; }
.m-phone { font-size: 11px; color: var(--text-4); }

/* ---------- Send ---------- */
.send-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.send-side { display: flex; flex-direction: column; gap: 16px; }
.send-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.btn.disabled { opacity: 0.45; pointer-events: none; }
.wa-preview { background: #0c1317; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.wap-head { background: #1f2c33; padding: 11px 14px; font-size: 12.5px; color: #e9edef; display: flex; align-items: center; gap: 8px; }
.wap-body { padding: 16px 14px; min-height: 120px; background-image: linear-gradient(rgba(11,15,17,0.92), rgba(11,15,17,0.92)); background-color: #0b141a; }
.wap-bubble { background: #144d37; color: #e9edef; font-size: 13px; line-height: 1.45; padding: 8px 10px 6px; border-radius: 9px 9px 2px 9px; max-width: 86%; margin-left: auto; position: relative; word-break: break-word; }
.wap-time { display: block; text-align: right; font-size: 10px; color: rgba(233,237,239,0.6); margin-top: 3px; }

/* ---------- Logs ---------- */
.log-card { overflow: hidden; }
.log-head-row { display: flex; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-4); }
.log-rows { font-size: 12.5px; }
.log-row { display: flex; gap: 14px; padding: 9px 18px; border-bottom: 1px solid var(--border); align-items: center; transition: background .1s; }
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: var(--surface-2); }
.lr-time { color: var(--text-3); }
.log-pill { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; }
.log-pill.brand { background: var(--brand-soft); color: var(--brand-bright); }
.log-pill.blue { background: var(--blue-soft); color: var(--blue); }
.log-pill.amber { background: var(--amber-soft); color: var(--amber); }
.log-pill.red { background: var(--red-soft); color: var(--red); }
.lr-dir { color: var(--text-3); display: flex; }
.lr-evt { color: var(--text-2); }
.lr-detail { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-rule { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Settings ---------- */
.set-card { padding: 4px 22px 8px; margin-bottom: 18px; }
.set-card-head { display: flex; gap: 13px; align-items: flex-start; padding: 20px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.set-head-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.set-head-ic.amber { background: var(--amber-soft); color: var(--amber); }
.set-head-ic.blue { background: var(--blue-soft); color: var(--blue); }
.set-head-ic.violet { background: var(--violet-soft); color: var(--violet); }
.set-card-head h2 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.set-card-head p { font-size: 12.5px; line-height: 1.5; max-width: 480px; }
.guard-card { background: linear-gradient(180deg, rgba(245,181,68,0.04), transparent 140px); }
.set-row { display: flex; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-row-text { flex: 1; }
.set-row-title { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.set-row-desc { font-size: 12px; color: var(--text-3); }
.set-row-control { flex-shrink: 0; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 2px; }
.stepper button { width: 26px; height: 26px; border-radius: 6px; color: var(--text-2); font-size: 15px; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface-3); color: var(--text); }
.stepper span { min-width: 38px; text-align: center; font-size: 13px; font-weight: 500; }
.set-code { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 5px 9px; border-radius: 6px; color: var(--text-2); }
