@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 1 1000;
  src: url("/fonts/google-sans-flex-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 1 1000;
  src: url("/fonts/google-sans-flex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0f2742;
  --navy-2: #173b62;
  --blue: #1976ed;
  --blue-soft: #eaf3ff;
  --orange: #f47a32;
  --green: #19a974;
  --green-soft: #e8f8f1;
  --red: #e14d5a;
  --red-soft: #fff0f1;
  --violet: #7b61e8;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --line: #e7ebf1;
  --text: #172235;
  --muted: #758197;
  --shadow: 0 14px 40px rgba(22, 42, 68, 0.07);
  --radius: 16px;
}

.row-action-group { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.row-action { min-height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--blue); font-size: 11px; font-weight: 600; }
.row-action:hover { border-color: var(--line); background: #f5f5f5; }
.row-action:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.campaign-row-actions .text-button { min-height: 28px; padding: 0 7px; border-radius: 4px; }
.campaign-pause-reason { max-width: 360px; color: #b42318 !important; }
.campaign-row-actions .text-button:hover { background: #f5f5f5; }
.account-menu-wrap { position: relative; }
.account-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.account-popover[hidden] { display: none; }
.account-popover > div { padding: 8px; border-bottom: 1px solid var(--line); }
.account-popover strong, .account-popover span { display: block; }
.account-popover strong { font-size: 12px; }.account-popover span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-popover button { width: 100%; margin-top: 6px; padding: 9px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--text); text-align: left; font-size: 12px; }
.account-popover button:hover { background: #f5f5f5; color: #a4262c; }
.settings-storage { grid-column: 1 / -1; }
.storage-status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.storage-status-grid > div { min-height: 76px; padding: 14px; border-right: 1px solid var(--line); background: #fafafa; }
.storage-status-grid > div:last-child { border-right: 0; }
.storage-status-grid span, .storage-status-grid strong { display: block; }
.storage-status-grid span { color: var(--muted); font-size: 10px; }.storage-status-grid strong { margin-top: 8px; font-size: 13px; }
.storage-note { margin-top: 12px; }
.system-status-actions { display: flex; align-items: center; gap: 8px; }
.system-health-summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; margin: 2px 0 12px; padding: 14px 15px; border: 1px solid #d9e8f7; border-radius: 16px; background: linear-gradient(135deg,#f7fbff,#fff); }
.system-health-summary.warning { border-color: #f1d49c; background: linear-gradient(135deg,#fffaf0,#fff); }
.system-health-summary.offline { border-color: #f1c2c2; background: linear-gradient(135deg,#fff5f5,#fff); }
.system-health-dot { width: 11px; height: 11px; border-radius: 50%; background: #2baa69; box-shadow: 0 0 0 5px rgba(43,170,105,.12); }
.system-health-summary.warning .system-health-dot { background: #d99119; box-shadow: 0 0 0 5px rgba(217,145,25,.12); }
.system-health-summary.offline .system-health-dot { background: #d94b4b; box-shadow: 0 0 0 5px rgba(217,75,75,.12); }
.system-health-summary > div { display: grid; gap: 3px; }
.system-health-summary strong { color: #24364b; font-size: 14px; }
.system-health-summary small { color: #748397; font-size: 11px; }
.system-runtime-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.system-runtime-grid > div { min-height: 82px; display: grid; align-content: center; gap: 4px; padding: 12px 13px; border: 1px solid #e4ebf2; border-radius: 14px; background: #fbfdff; }
.system-runtime-grid span,.system-runtime-grid small { color: #7b8898; font-size: 10.5px; }
.system-runtime-grid strong { color: #26384d; font-size: 13px; }
.system-runtime-grid strong.ok { color: #188752; }
.system-runtime-grid strong.warning { color: #b36f0c; }
.system-runtime-grid strong.offline { color: #c33f3f; }
.system-health-notice { margin-bottom: 12px; }
@media (max-width: 720px) { .system-runtime-grid { grid-template-columns: 1fr; } .system-status-actions { align-items: stretch; flex-direction: column; } }
.campaign-table td small.campaign-performance { margin-top: 5px; color: #0f6cbd; }
@media (max-width: 900px) { .storage-status-grid { grid-template-columns: repeat(2, 1fr); }.storage-status-grid > div { border-bottom: 1px solid var(--line); }.storage-status-grid > div:nth-child(2n) { border-right: 0; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "Google Sans Flex", "Google Sans", system-ui, sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.app-icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button-with-icon .app-icon { width: 17px; height: 17px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: linear-gradient(180deg, #0d223b 0%, #102c4b 100%); color: white; padding: 24px 16px; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: transparent; box-shadow: none; overflow: visible; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; }
.brand span { font-size: 12px; margin-top: 2px; color: #9eb0c4; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #aebfd1; padding: 12px 14px; border-radius: 10px; display: flex; align-items: center; gap: 12px; text-align: left; transition: .2s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(25,118,237,.28), rgba(25,118,237,.12)); box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.nav-icon .app-icon { width: 19px; height: 19px; }
.sidebar-foot { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.05); display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot span { font-size: 10px; color: #98abc0; margin-top: 3px; line-height: 1.45; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffbf4d; box-shadow: 0 0 0 4px rgba(255,191,77,.13); margin-top: 3px; }
.main-content { margin-left: 248px; min-width: 0; width: calc(100% - 248px); }
.topbar { height: 88px; padding: 0 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 24px; margin: 3px 0 0; }
.eyebrow { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.connection-badge { padding: 8px 12px; background: var(--green-soft); color: #157657; border-radius: 999px; font-size: 12px; font-weight: 600; }
.connection-badge i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--navy); color: white; font-weight: 700; }
.view { display: none; padding: 28px 32px 48px; animation: fadeIn .2s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.welcome-card { background: linear-gradient(120deg, #102d4e 0%, #174d82 72%, #1f69a9 100%); border-radius: 20px; padding: 32px; color: white; display: flex; justify-content: space-between; align-items: center; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.welcome-card::after { content: ""; position: absolute; width: 280px; height: 280px; border: 55px solid rgba(255,255,255,.06); border-radius: 50%; right: -70px; top: -120px; }
.welcome-card h2 { font-size: 25px; margin: 13px 0 8px; position: relative; z-index: 1; }
.welcome-card p { margin: 0; max-width: 680px; color: #c8d9ea; line-height: 1.6; font-size: 13px; position: relative; z-index: 1; }
.pill { font-size: 11px; padding: 6px 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; }
.primary-button, .secondary-button, .text-button { border-radius: 9px; padding: 10px 15px; font-size: 12px; font-weight: 600; transition: .18s ease; }
.primary-button { background: var(--blue); color: white; border: 1px solid var(--blue); box-shadow: 0 7px 18px rgba(25,118,237,.2); position: relative; z-index: 2; }
.primary-button:hover { background: #0869da; transform: translateY(-1px); }
.secondary-button { background: white; color: var(--text); border: 1px solid #d9e0ea; }
.secondary-button:hover { border-color: var(--blue); color: var(--blue); }
.text-button { background: transparent; color: var(--blue); border: 0; box-shadow: none; }
.text-button:hover { background: var(--blue-soft); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.stat-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 25px rgba(22,42,68,.04); display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.stat-card div:nth-child(2) span, .stat-card div:nth-child(2) strong { display: block; }
.stat-card span { font-size: 11px; color: var(--muted); }
.stat-card strong { font-size: 23px; margin-top: 3px; }
.stat-card small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; }
.stat-icon .app-icon { width: 21px; height: 21px; stroke-width: 1.9; }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }.stat-icon.violet { background: #f0edff; color: var(--violet); }.stat-icon.green { background: var(--green-soft); color: var(--green); }.stat-icon.orange { background: #fff1e8; color: var(--orange); }
.content-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.content-grid.two-thirds { grid-template-columns: 2fr 1fr; }.content-grid.two { grid-template-columns: repeat(2, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 7px 22px rgba(22,42,68,.035); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel h3 { margin: 0; font-size: 15px; }.panel p { color: var(--muted); margin: 5px 0 0; font-size: 11px; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 102px; }
.flow-step { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 13px; display: flex; gap: 10px; align-items: center; background: #fbfcfe; }
.flow-step b { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 8px; font-size: 11px; }
.flow-step strong, .flow-step small { display: block; }.flow-step strong { font-size: 11px; }.flow-step small { font-size: 9px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.flow-arrow { color: #bac4d1; }
.oa-compact { text-align: center; display: flex; flex-direction: column; align-items: center; }.oa-compact .panel-head { width: 100%; text-align: left; }.oa-compact > strong { font-size: 12px; margin: 12px 0 5px; }.oa-compact > small { color: var(--muted); font-size: 9px; margin-top: 6px; }
.oa-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #1689ff, #0068e6); color: white; font-size: 11px; font-weight: 700; box-shadow: 0 8px 18px rgba(0,105,230,.22); }.oa-logo.large { width: 62px; height: 62px; font-size: 14px; border-radius: 17px; }
.success-text { color: var(--green); font-size: 9px; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }.section-toolbar h2 { margin: 0; font-size: 20px; }.section-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }.button-row { display: flex; gap: 9px; }.file-button { display: inline-flex; align-items: center; }
.table-panel { padding: 0; overflow: hidden; }.table-tools { padding: 15px 18px; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }.search-box { flex: 1; display: flex; align-items: center; gap: 9px; border: 1px solid #dce2eb; border-radius: 9px; padding: 0 12px; color: var(--muted); }.search-box input { width: 100%; border: 0; outline: 0; padding: 9px 0; font-size: 11px; }.select-control { min-width: 175px; border: 1px solid #dce2eb; border-radius: 9px; padding: 8px 10px; background: white; font-size: 11px; color: var(--text); }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; min-width: 800px; } th { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: #8b96a8; background: #fafbfc; padding: 12px 14px; text-align: left; } td { padding: 13px 14px; border-top: 1px solid var(--line); font-size: 10px; vertical-align: middle; } tbody tr:hover { background: #fafcff; }
.status-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-weight: 600; font-size: 9px; }.status-badge.ready { background: #edf1f7; color: #617084; }.status-badge.success { background: var(--green-soft); color: #137653; }.status-badge.failed { background: var(--red-soft); color: var(--red); }.status-badge.processing { background: #fff6e5; color: #a26800; }
.row-menu { border: 0; background: transparent; color: var(--muted); font-size: 17px; padding: 4px 8px; border-radius: 6px; }.row-menu:hover { background: #eef2f7; }
.empty-state { padding: 48px 20px; text-align: center; display: none; }.empty-state.show, .empty-state:only-child { display: block; }.empty-state.compact { display: block; padding: 25px; }.empty-state.large { padding: 70px 20px; }.empty-icon { width: 48px; height: 48px; border-radius: 15px; margin: 0 auto 13px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 20px; }.empty-state h3 { font-size: 14px; margin: 0; }.empty-state p { margin: 7px 0 17px; }
.empty-icon .app-icon { width: 23px; height: 23px; }
.campaign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.campaign-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 7px 22px rgba(22,42,68,.035); }.campaign-card-top { display: flex; justify-content: space-between; gap: 12px; }.campaign-card h3 { font-size: 13px; margin: 0 0 5px; }.campaign-card p { color: var(--muted); font-size: 10px; margin: 0; }.campaign-meta { margin: 17px 0; padding: 12px 0; border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }.campaign-meta span, .campaign-meta strong { display: block; }.campaign-meta span { color: var(--muted); font-size: 9px; }.campaign-meta strong { font-size: 10px; margin-top: 4px; }.campaign-card-foot { display: flex; align-items: center; justify-content: space-between; }.campaign-card-foot small { color: var(--muted); font-size: 9px; }
.tag { display: inline-flex; background: #f0f3f7; color: #536074; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 600; }.tag.success { background: var(--green-soft); color: #147552; }.tag.blue { background: var(--blue-soft); color: var(--blue); }.tag.draft { background: #fff6e5; color: #946000; }.tag-row, .title-with-badge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }.oa-detail { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }.oa-detail-main { display: flex; gap: 16px; align-items: center; }.oa-detail-main h3 { font-size: 16px; }.oa-detail-main p { font-size: 10px; margin: 6px 0 10px; }
.form-stack { display: grid; gap: 14px; }.form-stack label, .form-grid label { display: grid; gap: 7px; }.form-stack label > span, .form-grid label > span, .field-group > span { font-size: 10px; font-weight: 600; color: #4b586b; }.form-stack input, .form-stack select, .form-grid input, .form-grid select { width: 100%; border: 1px solid #dce2eb; border-radius: 9px; padding: 10px 11px; outline: none; background: white; color: var(--text); font-size: 11px; }.form-stack input:focus, .form-stack select:focus, .form-grid input:focus, .form-grid select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,237,.08); }.copy-field { display: grid; grid-template-columns: 1fr auto; }.copy-field input { border-radius: 9px 0 0 9px; background: #f8fafc; }.copy-field button { border: 1px solid #dce2eb; border-left: 0; border-radius: 0 9px 9px 0; background: white; color: var(--blue); font-size: 10px; font-weight: 600; padding-inline: 12px; }
.notice { padding: 12px; border-radius: 10px; display: grid; gap: 4px; font-size: 10px; }.notice strong { font-size: 10px; }.notice.warning { background: #fff8e9; color: #7c5b12; }.notice.info { background: var(--blue-soft); color: #205f9e; margin-top: 15px; }
.template-list { display: grid; gap: 9px; }.template-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; }.template-item strong, .template-item span { display: block; }.template-item strong { font-size: 10px; }.template-item span { font-size: 9px; color: var(--muted); margin-top: 4px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }.setting-row:first-of-type { border-top: 0; }.setting-row strong, .setting-row span { display: block; }.setting-row strong { font-size: 11px; }.setting-row span { color: var(--muted); font-size: 9px; margin-top: 4px; }.switch input { display: none; }.switch i { width: 38px; height: 21px; display: block; background: #c9d1dc; border-radius: 999px; position: relative; transition: .2s; }.switch i::after { content: ""; width: 17px; height: 17px; border-radius: 50%; background: white; position: absolute; left: 2px; top: 2px; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .2s; }.switch input:checked + i { background: var(--blue); }.switch input:checked + i::after { transform: translateX(17px); }
.modal-backdrop { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(10,24,42,.53); backdrop-filter: blur(4px); padding: 20px; z-index: 100; }.modal-backdrop.open { display: flex; }.modal { width: min(760px, 96vw); max-height: 91vh; overflow-y: auto; background: white; border-radius: 18px; box-shadow: 0 25px 80px rgba(8,23,42,.28); }.small-modal { width: min(620px, 96vw); }.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }.modal-head h2 { margin: 0; font-size: 17px; }.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }.icon-button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f0f3f7; color: #526074; display: grid; place-items: center; font-size: 18px; }.form-grid { padding: 21px 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }.form-grid .full { grid-column: 1/-1; }.modal-actions { border-top: 1px solid var(--line); padding: 15px 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }.form-grid .modal-actions { padding: 15px 0 0; }.modal-actions > div { display: flex; align-items: center; gap: 8px; }
.stepper { display: flex; align-items: center; justify-content: center; padding: 17px 22px 5px; }.stepper span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #edf1f6; color: var(--muted); font-size: 10px; font-weight: 700; }.stepper span.active { background: var(--blue); color: white; box-shadow: 0 0 0 5px var(--blue-soft); }.stepper i { height: 2px; width: 90px; background: #e4e8ef; }.stepper i.active { background: var(--blue); }.campaign-step { display: none; padding: 16px 22px 22px; }.campaign-step.active { display: block; }.campaign-step .form-grid { padding: 0; }.field-group { display: grid; gap: 8px; }.channel-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.channel-card { border: 1px solid #dce2eb; border-radius: 12px; padding: 13px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }.channel-card.selected { border-color: var(--blue); background: var(--blue-soft); }.channel-card input { display: none; }.channel-card b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: white; }.channel-card strong, .channel-card small { display: block; }.channel-card strong { font-size: 10px; }.channel-card small { color: var(--muted); font-size: 8px; margin-top: 4px; line-height: 1.35; }.mapping-head h3 { margin: 0; font-size: 13px; }.mapping-head p { margin: 5px 0 15px; color: var(--muted); font-size: 10px; }.mapping-list { display: grid; gap: 9px; }.mapping-row { display: grid; grid-template-columns: 160px 1fr 1.3fr; gap: 9px; align-items: center; }.mapping-row code { font-size: 10px; color: var(--violet); background: #f4f1ff; padding: 8px 10px; border-radius: 8px; }.mapping-row select, .mapping-row input { border: 1px solid #dce2eb; border-radius: 8px; padding: 9px; font-size: 10px; min-width: 0; }.toast { position: fixed; right: 24px; bottom: 24px; background: var(--navy); color: white; border-radius: 11px; padding: 12px 17px; box-shadow: 0 14px 40px rgba(0,0,0,.22); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; z-index: 200; }.toast.show { opacity: 1; transform: none; }.mobile-only { display: none; }

.campaign-create-modal { width: min(820px, 96vw); }
.campaign-source-step { padding: 22px; }
.campaign-create-intro strong, .campaign-create-intro span { display: block; }
.campaign-create-intro strong { font-size: 13px; }.campaign-create-intro span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.campaign-source-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.campaign-source-options > button { min-height: 116px; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 17px; border: 1px solid #d7d5df; border-radius: 12px; background: #fff; color: var(--text); text-align: left; transition: .15s ease; }
.campaign-source-options > button:hover { border-color: var(--blue); background: #f8f7ff; box-shadow: 0 7px 20px rgba(61,57,105,.08); transform: translateY(-1px); }
.campaign-source-options b, .campaign-selected-source > b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #fff; }
.campaign-source-options b.datahub, .campaign-selected-source > b.datahub { background: linear-gradient(145deg, #54cef6, #5167df); }
.campaign-source-options b.webhook, .campaign-selected-source > b.webhook { background: linear-gradient(145deg, #ff9e6d, #da4d86); }
.campaign-source-options b.miniapp, .campaign-selected-source > b.miniapp { background: linear-gradient(145deg, #52a8ff, #1967d2); }
.campaign-source-options b .app-icon, .campaign-selected-source > b .app-icon { width: 21px; height: 21px; }
.campaign-source-options span strong, .campaign-source-options span small { display: block; }
.campaign-source-options span strong { font-size: 12px; }.campaign-source-options span small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.campaign-source-options i { color: var(--blue); font-size: 9px; font-style: normal; font-weight: 600; }
.campaign-details-step { display: grid; gap: 17px; padding: 22px; }
.campaign-details-step[hidden] { display: none; }
.campaign-details-step > label { display: grid; gap: 7px; }
.campaign-details-step > label > span { color: #4b586b; font-size: 10px; font-weight: 600; }
.campaign-details-step input, .campaign-details-step textarea { width: 100%; border: 1px solid #d1d1d1; border-radius: 7px; padding: 10px 11px; background: #fff; color: var(--text); font: inherit; font-size: 11px; outline: none; resize: vertical; }
.campaign-details-step input:focus, .campaign-details-step textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(91,95,199,.12); }
.campaign-selected-source { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid #cfd4f2; border-radius: 10px; background: linear-gradient(135deg, #f4fbff, #f7f4ff); }
.campaign-selected-source span small, .campaign-selected-source span strong { display: block; }.campaign-selected-source span small { color: var(--muted); font-size: 8px; }.campaign-selected-source span strong { margin-top: 3px; font-size: 11px; }
.campaign-selected-source button { border: 0; background: transparent; color: var(--blue); font-size: 9px; font-weight: 600; }
.campaign-details-step .modal-actions { margin: 2px -22px -22px; }
.live-send-body { display: grid; gap: 14px; padding: 20px 22px; }
.live-send-body > label { display: grid; gap: 7px; }
.live-send-body > label > span { color: #4b586b; font-size: 10px; font-weight: 600; }
.live-send-body select { width: 100%; border: 1px solid #d1d1d1; border-radius: 7px; padding: 10px 11px; background: #fff; color: var(--text); font-size: 11px; }
.live-send-preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 13px; border: 1px solid #d9d8e3; border-radius: 9px; background: #f8f8fb; }
.live-send-preview div { display: grid; gap: 3px; }
.live-send-preview span { color: var(--muted); font-size: 8px; }
.live-send-preview strong { font-size: 10px; overflow-wrap: anywhere; }
.live-send-preview .full { grid-column: 1 / -1; }
.danger-confirm-button { border: 0; border-radius: 6px; padding: 10px 15px; background: #c42b1c; color: white; font-size: 10px; font-weight: 650; }
.danger-confirm-button:disabled { opacity: .42; cursor: not-allowed; }

.datahub-workspace { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
.datahub-tree-panel { position: sticky; top: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-small); }
.datahub-tree-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-bottom: 1px solid var(--border); }
.datahub-tree-head > div { display: grid; gap: 2px; }
.datahub-tree-head strong { font-size: 11px; }
.datahub-tree-head span { color: var(--muted); font-size: 9px; }
.datahub-tree-head button, .datahub-group-head button { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--blue); cursor: pointer; }
.datahub-tree { padding: 8px; }
.datahub-space { margin: 3px 0 10px; overflow: hidden; border: 1px solid #e2e7ee; border-radius: 9px; background: #fbfcfe; }
.datahub-space-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 8px; border-bottom: 1px solid #e8ecf2; background: #f5f8fc; color: #26364d; }
.datahub-space-head > span { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: 10px; font-weight: 700; }
.datahub-space-head > span > span { min-width: 0; display: grid; gap: 2px; }
.datahub-space-head small { color: #75839a; font-size: 8px; font-weight: 500; }
.datahub-space-head .app-icon { width: 14px; height: 14px; color: #4f67c8; }
.datahub-space-head button { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid #d9e0e9; border-radius: 6px; background: #fff; color: var(--blue); cursor: pointer; }
.datahub-space-content { padding: 3px 6px 6px 15px; }
.datahub-tree-empty { padding: 10px 8px; color: var(--muted); font-size: 9px; }
.datahub-group { padding: 4px 0; }
.datahub-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; color: #3b4658; }
.datahub-group-head > span { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 10px; font-weight: 650; }
.datahub-group-head svg { width: 14px; height: 14px; }
.datahub-table-button { display: flex; align-items: center; gap: 8px; width: 100%; margin: 2px 0; border: 0; border-radius: 6px; padding: 8px 10px 8px 29px; background: transparent; color: #566174; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.datahub-table-button:hover { background: #f3f5f9; }
.datahub-table-button.active { background: #eaf3ff; color: #185abd; font-weight: 650; }
.datahub-table-button svg { width: 13px; height: 13px; flex: 0 0 auto; }
.campaign-datahub-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campaign-datahub-levels label { display: grid; gap: 7px; }
.campaign-datahub-levels label > span { color: #4b586b; font-size: 10px; font-weight: 600; }
.campaign-datahub-levels select { width: 100%; border: 1px solid #d1d1d1; border-radius: 7px; padding: 10px 11px; background: #fff; color: var(--text); font-size: 11px; }
.campaign-miniapp-levels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); gap: 12px; align-items: stretch; }
.campaign-miniapp-levels label { display: grid; gap: 7px; }
.campaign-miniapp-levels label > span { color: #4b586b; font-size: 10px; font-weight: 600; }
.campaign-miniapp-levels select { width: 100%; border: 1px solid #d1d1d1; border-radius: 7px; padding: 10px 11px; background: #fff; color: var(--text); font-size: 11px; }
.campaign-miniapp-levels p { display: grid; align-content: center; gap: 3px; margin: 0; padding: 10px 12px; border: 1px solid #cfe0f8; border-radius: 8px; background: #f4f8ff; }
.campaign-miniapp-levels p strong { color: #18549a; font-size: 10px; }.campaign-miniapp-levels p span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.workflow-builder.read-only .workflow-palette { opacity: .48; pointer-events: none; }
.workflow-builder.read-only .workflow-node { cursor: default; }
.workflow-builder.read-only [data-connect-from], .workflow-builder.read-only .workflow-step-picker { display: none !important; }
.workflow-readonly-banner { display: none; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #d9d8e3; border-radius: 7px; background: #f7f7fa; color: #4b586b; font-size: 10px; }
.workflow-builder.read-only .workflow-readonly-banner { display: inline-flex; }
.workflow-safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.workflow-config-note.safe { background: #edf8f3; color: #176b4d; }
.customer-custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding-top: 2px; }
.datahub-columns-body { display: grid; gap: 16px; padding: 20px 22px; }
.datahub-base-columns { display: grid; gap: 5px; padding: 13px; border: 1px solid #d9d8e3; border-radius: 8px; background: #f8f8fb; }
.datahub-base-columns strong { font-size: 11px; }.datahub-base-columns span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.datahub-custom-column-list { display: grid; gap: 7px; }
.datahub-custom-column { display: grid; grid-template-columns: minmax(0, 1fr) 130px 72px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; }
.datahub-custom-column > span { display: flex; align-items: center; gap: 8px; min-width: 0; }.datahub-custom-column svg { width: 15px; height: 15px; color: var(--blue); }.datahub-custom-column strong { font-size: 10px; }
.datahub-custom-column code { color: #5b5fc7; font-size: 9px; overflow-wrap: anywhere; }.datahub-custom-column em { color: var(--muted); font-size: 9px; font-style: normal; text-align: right; }
.datahub-no-custom-column { padding: 18px; border: 1px dashed #d1d1d1; border-radius: 7px; color: var(--muted); font-size: 10px; text-align: center; }
.datahub-column-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 10px; align-items: end; padding-top: 13px; border-top: 1px solid var(--border); }
.datahub-column-form label { display: grid; gap: 6px; }.datahub-column-form label span { color: #4b586b; font-size: 9px; font-weight: 600; }.datahub-column-form input, .datahub-column-form select { width: 100%; min-height: 34px; border: 1px solid #d1d1d1; border-radius: 6px; padding: 7px 9px; background: #fff; font: inherit; font-size: 10px; }
.csv-mapping-modal { width: min(720px, 96vw); }.csv-mapping-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; padding: 20px 22px; }
.csv-automation-warning { margin: 18px 22px 0; }
.csv-mapping-row { display: grid; grid-template-columns: minmax(0, 1fr) 1.2fr; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; }
.csv-mapping-row > span { display: flex; gap: 7px; align-items: center; min-width: 0; }.csv-mapping-row strong { font-size: 10px; }.csv-mapping-row em { padding: 2px 5px; border-radius: 4px; background: #fff1f0; color: #b42318; font-size: 7px; font-style: normal; }
.csv-mapping-row select { min-width: 0; width: 100%; border: 1px solid #d1d1d1; border-radius: 6px; padding: 7px 8px; background: #fff; font-size: 9px; }
.csv-mapping-modal .modal-actions > span { color: var(--muted); font-size: 10px; }

@media (max-width: 1050px) { .stat-grid { grid-template-columns: repeat(2, 1fr); }.content-grid.two-thirds { grid-template-columns: 1fr; }.campaign-grid { grid-template-columns: repeat(2, 1fr); }.flow { flex-wrap: wrap; }.flow-arrow { display: none; }.flow-step { flex-basis: calc(50% - 8px); }.datahub-workspace { grid-template-columns: 1fr; }.datahub-tree-panel { position: static; } }
@media (max-width: 780px) { .sidebar { transform: translateX(-100%); transition: .25s; }.sidebar.open { transform: none; box-shadow: 18px 0 50px rgba(0,0,0,.2); }.main-content { margin-left: 0; width: 100%; }.mobile-only { display: grid; }.topbar { height: 76px; padding: 0 16px; justify-content: flex-start; gap: 12px; }.topbar-actions { margin-left: auto; }.connection-badge { display: none; }.view { padding: 20px 16px 40px; }.welcome-card { align-items: flex-start; flex-direction: column; gap: 20px; padding: 24px; }.stat-grid, .content-grid.two, .campaign-grid { grid-template-columns: 1fr; }.section-toolbar, .oa-detail { align-items: flex-start; flex-direction: column; }.form-grid, .channel-options, .campaign-source-options, .campaign-miniapp-levels, .customer-custom-fields, .workflow-safety-grid, .csv-mapping-list, .datahub-column-form { grid-template-columns: 1fr; }.form-grid label, .form-grid .full { grid-column: 1; }.mapping-row { grid-template-columns: 1fr; }.flow-step { flex-basis: 100%; }.table-tools { flex-direction: column; }.select-control { width: 100%; }.campaign-modal { max-height: 96vh; } }

/* Production sign-in gate */
.app-shell { visibility: hidden; }
body.authenticated .app-shell { visibility: visible; }
.auth-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: #f5f5f5; }
body.authenticated .auth-gate { display: none; }
.auth-card { width: min(420px, 100%); padding: 32px; border: 1px solid #e1dfdd; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-brand > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: transparent; color: #fff; overflow: visible; }
.auth-brand-logo img { width: 100%; height: 100%; display: block; }
.auth-brand strong, .auth-brand small { display: block; }.auth-brand strong { font-size: 16px; }.auth-brand small { margin-top: 2px; color: #616161; font-size: 12px; }
.auth-loading { padding: 24px 0; color: #616161; font-size: 13px; }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-form h1 { margin: 4px 0 8px; font-size: 24px; line-height: 1.25; }
.auth-form p { margin: 0; color: #616161; font-size: 13px; line-height: 1.5; }
.auth-form label { display: grid; gap: 6px; color: #323130; font-size: 12px; font-weight: 600; }
.auth-form input { height: 40px; padding: 0 11px; border: 1px solid #8a8886; border-radius: 4px; background: #fff; font: inherit; font-weight: 400; outline: none; }
.auth-form input:focus { border-color: #0f6cbd; box-shadow: 0 0 0 1px #0f6cbd; }
.auth-form label small { color: #616161; font-size: 11px; font-weight: 400; }
.auth-form .primary-button { min-height: 40px; margin-top: 4px; }
.auth-form .auth-error { min-height: 18px; color: #a4262c; font-size: 12px; }
@media (max-width: 520px) { .auth-gate { padding: 0; background: #fff; }.auth-card { width: 100%; min-height: 100vh; padding: 28px 22px; border: 0; border-radius: 0; box-shadow: none; } }

/* Local-only Zalo credential configuration */
.form-stack textarea { width: 100%; border: 1px solid #dce2eb; border-radius: 9px; padding: 10px 11px; outline: none; background: white; color: var(--text); font: inherit; font-size: 11px; line-height: 1.5; resize: vertical; min-height: 68px; }
.form-stack textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,237,.08); }
.config-status-grid { display: flex; flex-wrap: wrap; gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.config-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: #edf1f7; color: #69768a; font-size: 9px; font-weight: 600; }
.config-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #aeb8c6; }
.config-chip.configured { background: var(--green-soft); color: #147552; }
.config-chip.configured::before { background: var(--green); }
.config-save-button { justify-self: start; min-width: 140px; }
.config-save-button:disabled { opacity: .65; cursor: wait; transform: none; }
.connection-badge.not-ready { background: #fff6e5; color: #946000; }
.connection-badge.not-ready i { background: #e5a526; }
.success-text.not-ready { color: #a26800; }
.campaign-policy { border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; background: #fafbfc; }
.campaign-policy .setting-row { cursor: pointer; }
.campaign-rule-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: -7px 0 13px; }
.campaign-rule-summary span { padding: 5px 8px; border-radius: 999px; background: #f3f5f8; color: #68758a; font-size: 9px; font-weight: 600; }
.campaign-rule-summary span:first-child { background: #fff6e5; color: #946000; }
.settings-notice { margin-top: 12px; }

/* Visual workflow builder */
.workflow-builder[hidden] { display: none; }
.workflow-builder { margin: -28px -32px -48px; background: #eef2f7; height: calc(100vh - 88px); min-height: 560px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.workflow-toolbar { min-height: 72px; padding: 12px 18px; background: white; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(260px, 520px) 1fr; align-items: center; gap: 16px; }
.workflow-name-field { display: grid; gap: 5px; }
.workflow-name-field span { color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.workflow-name-field input { width: 100%; border: 1px solid #dce2eb; border-radius: 9px; padding: 9px 11px; color: var(--text); outline: none; font-size: 12px; font-weight: 600; }
.workflow-name-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,237,.08); }
.workflow-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.workflow-workspace { display: grid; grid-template-columns: 170px minmax(0, 1fr) 260px; min-height: 0; min-width: 0; overflow: hidden; }
.workflow-palette, .workflow-config { background: white; padding: 17px 14px; overflow-y: auto; }
.workflow-palette { border-right: 1px solid var(--line); }
.workflow-config { border-left: 1px solid var(--line); }
.workflow-palette > div { display: grid; gap: 5px; padding: 3px 4px 14px; }
.workflow-palette > div > strong { font-size: 12px; }
.workflow-palette > div > span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.workflow-palette > button { width: 100%; display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 10px; margin-bottom: 8px; text-align: left; color: var(--text); }
.workflow-palette > button:hover { border-color: var(--blue); background: var(--blue-soft); }
.workflow-palette > button b { width: 27px; height: 27px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.workflow-palette > button b .app-icon { width: 17px; height: 17px; }
.workflow-palette > button span, .workflow-palette > button strong, .workflow-palette > button small { display: block; }
.workflow-palette > button strong { font-size: 10px; }
.workflow-palette > button small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.workflow-palette.connecting { box-shadow: inset 3px 0 var(--blue); }
.workflow-canvas-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.workflow-canvas-wrap { position: absolute; inset: 0; overflow: auto; min-width: 0; max-width: 100%; cursor: grab; overscroll-behavior: contain; touch-action: none; scrollbar-color: #c9c8d1 transparent; scrollbar-width: thin; }
.workflow-canvas-wrap.panning { cursor: grabbing; user-select: none; }
.workflow-canvas-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.workflow-canvas-wrap::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #c9c8d1; background-clip: padding-box; }
.workflow-canvas-wrap::-webkit-scrollbar-corner { background: transparent; }
.workflow-canvas { min-width: 1100px; min-height: 680px; position: relative; background-color: #f7f9fc; background-image: radial-gradient(#cbd4e0 1px, transparent 1px); background-size: 18px 18px; }
.workflow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.workflow-line { fill: none; stroke: #52a0ff; stroke-width: 2; }
.workflow-line-label { fill: #66758a; font-size: 9px; font-weight: 600; paint-order: stroke; stroke: #f7f9fc; stroke-width: 5px; stroke-linejoin: round; }
.workflow-node { position: absolute; width: 220px; z-index: 2; }
.workflow-node-main { width: 100%; padding: 0; border: 1px solid #d7dee8; border-radius: 11px; background: white; color: var(--text); text-align: left; box-shadow: 0 7px 20px rgba(23,43,68,.08); overflow: hidden; }
.workflow-node-main:hover { border-color: #8ebfff; }
.workflow-node.selected .workflow-node-main { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,237,.12), 0 8px 22px rgba(23,43,68,.1); }
.workflow-node-head { min-height: 38px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); cursor: grab; }
.workflow-node-head:active { cursor: grabbing; }
.workflow-node.fixed-start .workflow-node-head { cursor: default; }
.workflow-node-number { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: white; font-size: 9px; font-weight: 700; }
.workflow-node-icon { width: 25px; height: 25px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; }
.workflow-node-icon .app-icon { width: 20px; height: 20px; }
.workflow-node-head strong { font-size: 10px; }
.workflow-fixed-badge { margin-left: auto; padding: 3px 6px; border-radius: 999px; background: #edf7ff; color: #286f9d; font-size: 7px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.workflow-node-body { padding: 10px; min-height: 65px; }
.workflow-node-body strong, .workflow-node-body span { display: block; }
.workflow-node-body strong { font-size: 9px; line-height: 1.45; }
.workflow-node-body span { color: var(--muted); font-size: 8px; margin-top: 5px; line-height: 1.45; }
.workflow-node.condition .workflow-node-icon { background: #fff4dd; color: #a76800; }
.workflow-node.send .workflow-node-icon { background: #e8f8f1; color: #147552; }
.workflow-node.delay .workflow-node-icon { background: #f0edff; color: var(--violet); }
.workflow-node.update .workflow-node-icon { background: #fff0e8; color: #b85d20; }
.workflow-node.end .workflow-node-icon { background: #edf1f6; color: #66758a; }
.workflow-node-outputs { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.workflow-node-outputs button { border: 1px solid #b8d5fa; background: white; color: var(--blue); border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 600; }
.workflow-node-outputs button:hover, .workflow-node-outputs button.active { background: var(--blue); color: white; }
.workflow-step-picker { position: absolute; z-index: 30; width: 236px; padding: 8px; border: 1px solid rgba(207,205,217,.96); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 14px 38px rgba(48,43,65,.18); transform: translateX(-50%); backdrop-filter: blur(18px); }
.workflow-step-picker[hidden] { display: none; }
.workflow-step-picker-head { padding: 4px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.workflow-step-picker-head strong, .workflow-step-picker-head span { display: block; }
.workflow-step-picker-head strong { font-size: 10px; }
.workflow-step-picker-head span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.workflow-step-picker > button { width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: center; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; }
.workflow-step-picker > button:hover { background: #f3f2ff; }
.workflow-step-picker > button b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #5ecbf5, #5b5fc7); }
.workflow-step-picker > button.condition b { background: linear-gradient(145deg, #ffbd5d, #ef6c57); }
.workflow-step-picker > button.send b { background: linear-gradient(145deg, #59d7ef, #6555dd); }
.workflow-step-picker > button.delay b { background: linear-gradient(145deg, #b986f0, #7063db); }
.workflow-step-picker > button.update b { background: linear-gradient(145deg, #a8db50, #31a270); }
.workflow-step-picker > button.end b { background: linear-gradient(145deg, #737986, #343841); }
.workflow-step-picker > button b .app-icon { width: 16px; height: 16px; }
.workflow-step-picker > button span { font-size: 9px; font-weight: 600; }
.workflow-pan-hint { position: absolute; left: 50%; bottom: 18px; z-index: 18; transform: translateX(-50%); padding: 6px 10px; border: 1px solid rgba(210,208,218,.9); border-radius: 999px; background: rgba(255,255,255,.9); color: #6d6a75; font-size: 9px; pointer-events: none; box-shadow: 0 3px 12px rgba(49,44,62,.08); transition: opacity .25s; }
.workflow-pan-hint.used { opacity: 0; }
.workflow-viewport-controls { position: absolute; right: 18px; bottom: 16px; z-index: 20; display: flex; align-items: center; padding: 4px; border: 1px solid rgba(207,205,217,.94); border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: 0 6px 20px rgba(48,43,65,.12); backdrop-filter: blur(16px); }
.workflow-viewport-controls button { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: #555363; }
.workflow-viewport-controls button:hover { background: #f0f0ff; color: var(--blue); }
.workflow-viewport-controls button .app-icon { width: 16px; height: 16px; }
.workflow-viewport-controls button span { font-size: 9px; font-weight: 600; }
.workflow-viewport-controls > span { min-width: 42px; color: #555363; font-size: 9px; font-weight: 600; text-align: center; }
.workflow-viewport-controls > i { width: 1px; height: 20px; margin: 0 3px; background: var(--line); }
.workflow-config-empty { min-height: 240px; display: grid; align-content: center; justify-items: center; gap: 7px; text-align: center; color: var(--muted); }
.workflow-config-empty b { color: var(--text); font-size: 11px; }
.workflow-config-empty span { max-width: 190px; font-size: 9px; line-height: 1.5; }
.workflow-config-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.workflow-config-head strong, .workflow-config-head span { display: block; }
.workflow-config-head strong { font-size: 12px; }
.workflow-config-head span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.workflow-config-form { display: grid; gap: 12px; }
.workflow-config-form label { display: grid; gap: 6px; }
.workflow-config-form label > span, .workflow-mapping-title { color: #4b586b; font-size: 9px; font-weight: 600; }
.workflow-config-form input, .workflow-config-form select { width: 100%; min-width: 0; border: 1px solid #dce2eb; border-radius: 8px; padding: 9px 10px; outline: none; background: white; color: var(--text); font-size: 10px; }
.workflow-config-form input:focus, .workflow-config-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,237,.08); }
.workflow-config-form .setting-row { padding: 10px 0; }
.workflow-config-note { border-radius: 8px; padding: 9px 10px; background: #fff8e9; color: #7c5b12; font-size: 9px; line-height: 1.5; }
.workflow-fixed-start-info { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid #dfe4f4; border-radius: 10px; background: linear-gradient(135deg, #f5fbff, #f4f2ff); }
.workflow-fixed-start-info strong, .workflow-fixed-start-info span { display: block; }
.workflow-fixed-start-info strong { font-size: 10px; }
.workflow-fixed-start-info div > span { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.workflow-fixed-start-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(145deg, #54cef6, #5167df); }
.workflow-fixed-start-info.webhook .workflow-fixed-start-icon { background: linear-gradient(145deg, #ff9e6d, #da4d86); }
.workflow-fixed-start-info.miniapp .workflow-fixed-start-icon { background: linear-gradient(145deg, #52a8ff, #1967d2); }
.workflow-fixed-start-icon .app-icon { width: 18px; height: 18px; }
.workflow-mappings { display: grid; gap: 7px; padding-top: 2px; }
.workflow-mapping-row { display: grid; gap: 5px; }
.workflow-mapping-row code { color: var(--violet); font-size: 8px; }
.delete-node-button { border: 0; background: var(--red-soft); color: var(--red); border-radius: 7px; padding: 6px 8px; font-size: 9px; }
.test-runner-modal { width: min(720px, 96vw); }
.test-runner-body { padding: 18px 22px; display: grid; gap: 14px; }
.test-runner-body > label { display: grid; gap: 7px; }
.test-runner-body > label > span { color: #4b586b; font-size: 10px; font-weight: 600; }
.test-runner-body select { width: 100%; border: 1px solid #dce2eb; border-radius: 9px; padding: 10px 11px; outline: none; background: white; color: var(--text); font-size: 11px; }
.test-safe-notice { margin-top: 0 !important; }
.test-runner-summary { padding: 11px 12px; border-radius: 9px; background: #f3f6fa; color: #526074; font-size: 10px; line-height: 1.5; }
.test-runner-summary.success { background: var(--green-soft); color: #147552; }
.test-runner-summary.failed { background: var(--red-soft); color: var(--red); }
.test-trace { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.test-trace-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.test-trace-step > b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 9px; }
.test-trace-step > b .app-icon { width: 15px; height: 15px; }
.test-trace-step strong, .test-trace-step span { display: block; }
.test-trace-step strong { font-size: 10px; }
.test-trace-step span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.test-trace-step .tag { align-self: center; }
.test-trace-step.failed > b { background: var(--red-soft); color: var(--red); }

/* Workflow execution history and CNV-style step reports */
.history-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.history-overview article { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; box-shadow: 0 6px 20px rgba(22,42,68,.035); }
.history-overview span, .history-overview strong { display: block; }
.history-overview span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.history-overview strong { margin-top: 5px; font-size: 21px; }
.history-panel { padding: 0; overflow: hidden; }
.history-tools { padding: 14px 16px; display: grid; grid-template-columns: minmax(240px, 1fr) 210px 180px; gap: 10px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.run-history-list { display: grid; }
.run-card { border-bottom: 1px solid var(--line); background: white; }
.run-card:last-child { border-bottom: 0; }
.run-summary { width: 100%; border: 0; background: white; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(150px, .7fr) auto auto; align-items: center; gap: 12px; text-align: left; color: var(--text); }
.run-summary:hover, .run-card.expanded .run-summary { background: #f8fbff; }
.run-result-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.run-result-icon .app-icon { width: 17px; height: 17px; }
.run-result-icon.success { color: #147552; background: var(--green-soft); }.run-result-icon.failed { color: var(--red); background: var(--red-soft); }.run-result-icon.ready { color: #68758a; background: #edf1f6; }
.run-summary-main, .run-summary-meta { display: grid; gap: 4px; }
.run-summary-main strong { font-size: 11px; }.run-summary-main small, .run-summary-meta small, .run-summary-meta time { color: var(--muted); font-size: 9px; }
.run-summary-meta { justify-items: end; }
.run-chevron { color: var(--muted); transition: transform .2s; }
.run-chevron .app-icon { width: 16px; height: 16px; }
.run-card.expanded .run-chevron { transform: rotate(180deg); }
.run-detail { padding: 0 16px 18px 58px; background: #fbfcfe; }
.run-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; color: var(--muted); font-size: 9px; }
.run-detail-head code { color: var(--violet); background: #f0edff; border-radius: 6px; padding: 4px 6px; }
.run-steps-timeline { list-style: none; margin: 0; padding: 0; }
.run-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; min-height: 66px; }
.run-step-marker { position: relative; display: flex; justify-content: center; }
.run-step-marker span { position: relative; z-index: 1; width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; }
.run-step-marker span .app-icon { width: 15px; height: 15px; }
.run-step.failed .run-step-marker span { background: var(--red-soft); color: var(--red); }.run-step.branch .run-step-marker span { background: #fff6e5; color: #946000; }
.run-step-marker i { position: absolute; top: 25px; bottom: 0; width: 1px; background: #dce3ed; }
.run-step:last-child .run-step-marker i { display: none; }
.run-step-content { padding-bottom: 14px; }
.run-step-content > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }.run-step-content strong { font-size: 10px; }
.run-step-content p { margin: 5px 0 3px; color: #536074; font-size: 9px; line-height: 1.5; }.run-step-content small, .run-step > time { color: var(--muted); font-size: 8px; }

.workflow-node-report { margin-top: 7px; padding: 8px 9px; border: 1px solid #dfe6ee; border-radius: 9px; background: rgba(255,255,255,.97); box-shadow: 0 4px 14px rgba(23,43,68,.06); }
.workflow-node-report > div:first-child { display: flex; justify-content: space-between; color: #4d5a6d; font-size: 8px; }
.workflow-node-progress { height: 7px; margin: 6px 0 7px; overflow: hidden; border-radius: 99px; background: #e9eef4; }
.workflow-node-progress i { display: block; height: 100%; border-radius: inherit; background: #55c98a; }
.workflow-node-report button { width: 100%; border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 7px; padding: 6px; font-size: 8px; font-weight: 600; }
.workflow-node-report button:hover { background: #dbeaff; }

.step-report-modal { width: min(1180px, 97vw); }
.step-report-body { padding: 18px 20px 22px; display: grid; gap: 18px; }
.step-report-summary { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
.step-report-counts, .step-report-chart { min-height: 190px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.step-report-counts { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.step-report-counts article { min-height: 130px; display: grid; align-content: center; justify-items: center; gap: 9px; border-right: 1px solid var(--line); }
.step-report-counts article:last-child { border-right: 0; }
.step-report-counts article > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.step-report-counts article > span .app-icon { width: 21px; height: 21px; }
.step-report-counts article.success > span { color: var(--green); background: var(--green-soft); }.step-report-counts article.failed > span { color: var(--red); background: var(--red-soft); }.step-report-counts article.other > span { color: #9aa6b6; background: #f1f3f6; }
.step-report-counts article div { text-align: center; }.step-report-counts small, .step-report-counts strong { display: block; }.step-report-counts small { color: #536074; font-size: 9px; }.step-report-counts strong { margin-top: 5px; font-size: 17px; }
.step-report-chart { display: flex; align-items: center; justify-content: center; gap: 28px; }
.donut-chart { width: 150px; height: 150px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.donut-chart::after { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: white; }
.donut-chart strong { position: relative; z-index: 1; font-size: 13px; }
.chart-legend { display: grid; gap: 9px; }.chart-legend span { display: flex; align-items: center; gap: 7px; color: #536074; font-size: 9px; }.chart-legend i { width: 8px; height: 8px; border-radius: 50%; }.chart-legend i.success { background: var(--green); }.chart-legend i.failed { background: var(--red); }.chart-legend i.other { background: #f2b622; }
.step-report-table-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; }.step-report-table-head h3 { margin: 0; font-size: 13px; }.step-report-table-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.step-report-filters { display: flex; gap: 9px; min-width: min(560px, 60%); }.step-report-filters .search-box { min-height: 38px; }
.step-report-table { min-width: 980px; border: 1px solid var(--line); }.step-report-table th { background: #f0faff; }

@media (max-width: 900px) {
  .history-tools { grid-template-columns: 1fr; }.history-tools .select-control { width: 100%; }
  .run-summary { grid-template-columns: auto 1fr auto; }.run-summary-meta { grid-column: 2; justify-items: start; }.run-summary .status-badge { grid-column: 3; grid-row: 1; }.run-chevron { grid-column: 3; grid-row: 2; }
  .step-report-summary { grid-template-columns: 1fr; }.step-report-table-head { align-items: stretch; flex-direction: column; }.step-report-filters { min-width: 0; width: 100%; }
}
@media (max-width: 600px) {
  .history-overview { grid-template-columns: 1fr; }.run-detail { padding-left: 16px; }.step-report-counts { grid-template-columns: 1fr; }.step-report-counts article { min-height: 92px; border-right: 0; border-bottom: 1px solid var(--line); }.step-report-counts article:last-child { border-bottom: 0; }.step-report-chart { flex-direction: column; padding: 18px; }.step-report-filters { flex-direction: column; }.step-report-filters .select-control { width: 100%; }
}

/* Fluent 2 product shell */
:root {
  --navy: #242424;
  --navy-2: #424242;
  --blue: #0f6cbd;
  --blue-hover: #115ea3;
  --blue-pressed: #0c3b5e;
  --blue-soft: #ebf3fc;
  --orange: #ca5010;
  --green: #107c10;
  --green-soft: #f1faf1;
  --red: #d13438;
  --red-soft: #fdf3f4;
  --violet: #5c2e91;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --line: #e0e0e0;
  --text: #242424;
  --muted: #616161;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --radius: 8px;
}

html { color-scheme: light; }
body { font-family: "Google Sans Flex", "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; background: var(--bg); color: var(--text); }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #242424; outline-offset: 2px; }

.sidebar { width: 224px; padding: 12px 8px; background: #fff; color: var(--text); border-right: 1px solid var(--line); box-shadow: none; }
.brand { min-height: 48px; padding: 4px 8px 16px; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: transparent; box-shadow: none; }
.brand strong { font-size: 14px; font-weight: 600; }.brand span { margin-top: 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.main-nav { gap: 2px; }
.nav-item { min-height: 40px; padding: 8px 10px; border-radius: 4px; color: #424242; gap: 10px; font-size: 13px; transition: background-color .1s, color .1s; position: relative; }
.nav-item:hover { color: var(--text); background: #f0f0f0; }
.nav-item.active { color: var(--text); background: #e5f1fb; box-shadow: none; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--blue); }
.nav-icon { width: 20px; height: 20px; color: var(--blue); }
.sidebar-foot { padding: 12px; border-color: var(--line); border-radius: 6px; background: #fafafa; }
.sidebar-foot strong { color: var(--text); font-size: 11px; }.sidebar-foot span { color: var(--muted); font-size: 10px; }.status-dot { background: #f7630c; box-shadow: none; }

.main-content { margin-left: 224px; width: calc(100% - 224px); }
.topbar { height: 64px; padding: 0 32px; background: rgba(255,255,255,.96); border-bottom-color: var(--line); backdrop-filter: blur(18px); }
.topbar h1 { margin-top: 1px; font-size: 20px; font-weight: 600; }.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .04em; text-transform: none; }
.topbar-actions { gap: 12px; }.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); font-size: 11px; }
.connection-badge { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: #0e700e; font-size: 11px; font-weight: 500; }
.connection-badge.not-ready { background: #fff4ce; color: #8a3707; }

.view { padding: 24px 32px 48px; animation: none; }
.section-toolbar { margin-bottom: 16px; min-height: 44px; }.section-toolbar h2 { font-size: 20px; font-weight: 600; }.section-toolbar p { margin-top: 3px; font-size: 12px; }
.welcome-card { padding: 20px 24px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: #fff; color: var(--text); box-shadow: var(--shadow); }
.welcome-card::after { display: none; }.welcome-card h2 { margin: 8px 0 4px; font-size: 20px; font-weight: 600; }.welcome-card p { color: var(--muted); font-size: 13px; }.pill { padding: 3px 7px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 4px; font-size: 10px; font-weight: 600; }

.primary-button, .secondary-button, .text-button { min-height: 32px; padding: 5px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; transition: background-color .1s, border-color .1s, color .1s; }
.primary-button { border-color: var(--blue); background: var(--blue); box-shadow: none; }.primary-button:hover { background: var(--blue-hover); border-color: var(--blue-hover); transform: none; }.primary-button:active { background: var(--blue-pressed); }
.secondary-button { border-color: #d1d1d1; background: #fff; color: var(--text); }.secondary-button:hover { border-color: #b3b3b3; background: #f5f5f5; color: var(--text); }
.text-button { color: var(--blue); }.text-button:hover { background: var(--blue-soft); }
.icon-button { border-radius: 4px; background: #f5f5f5; }.icon-button:hover { background: #e0e0e0; }

.stat-grid { gap: 12px; margin: 16px 0; }.stat-card { padding: 16px; border-radius: 8px; box-shadow: none; }.stat-card strong { font-size: 22px; font-weight: 600; }.stat-card span { font-size: 11px; }.stat-card small { border-top: 0; padding-top: 0; font-size: 10px; }.stat-icon { width: 36px; height: 36px; border-radius: 6px; }
.content-grid { gap: 16px; margin-bottom: 16px; }.panel { padding: 16px; border-radius: 8px; box-shadow: var(--shadow); }.panel-head { margin-bottom: 14px; }.panel h3 { font-size: 14px; font-weight: 600; }.panel p { font-size: 11px; }
.flow { gap: 12px; }.flow-step { border-radius: 6px; background: #fafafa; padding: 12px; }.flow-step b { border-radius: 4px; }.flow-arrow { color: #8a8886; }
.oa-logo { border-radius: 6px; box-shadow: none; background: var(--blue); }.oa-logo.large { border-radius: 8px; }

.table-panel, .campaign-list-shell, .history-panel { border-radius: 8px; box-shadow: var(--shadow); }
.table-tools, .campaign-list-tools, .history-tools { padding: 12px 16px; background: #fafafa; border-bottom: 1px solid var(--line); }
.search-box { min-height: 32px; border-color: #d1d1d1; border-radius: 4px; background: #fff; }.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }.search-box input { padding: 6px 0; font-size: 12px; background: transparent; }
.select-control { min-height: 32px; padding: 5px 9px; border-color: #d1d1d1; border-radius: 4px; font-size: 12px; }
table { min-width: 840px; } th { padding: 10px 12px; background: #fafafa; color: #616161; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; } td { padding: 11px 12px; border-top-color: var(--line); font-size: 12px; } tbody tr:hover { background: #f5f9fd; }
.status-badge, .tag { padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }.status-badge.success, .tag.success { background: #dff6dd; color: #0e700e; }.status-badge.failed { background: #fde7e9; color: #a4262c; }.status-badge.processing, .tag.draft { background: #fff4ce; color: #8a3707; }.status-badge.ready, .tag { background: #f0f0f0; color: #424242; }.tag.blue { background: var(--blue-soft); color: var(--blue); }
.empty-icon { border-radius: 6px; }.notice { border-radius: 6px; }.template-item { border-radius: 6px; }

.campaign-tabs { display: flex; gap: 2px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.campaign-tabs button { min-height: 36px; padding: 6px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }
.campaign-tabs button:hover { color: var(--text); background: #f0f0f0; }.campaign-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }.campaign-tabs button span { margin-left: 4px; padding: 1px 5px; border-radius: 10px; background: #e8e8e8; color: #424242; font-size: 10px; }
.campaign-list-shell { padding: 0; overflow: hidden; }.campaign-list-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 220px; gap: 12px; }.campaign-table { min-width: 1080px; }.campaign-table td:nth-child(2) { min-width: 240px; }.campaign-table td:nth-child(8) { min-width: 220px; }
.campaign-name-link { display: block; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 600; text-align: left; }.campaign-name-link:hover { text-decoration: underline; }.campaign-table td > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }.campaign-type-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }.owner-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border-radius: 50%; background: #e8e8e8; color: #424242; font-size: 9px; font-weight: 600; }.campaign-row-actions { display: flex; flex-wrap: wrap; gap: 2px; }

.workflow-builder { margin: -24px -32px -48px; height: calc(100vh - 64px); min-height: 560px; background: #f5f5f5; }
.workflow-toolbar { min-height: 64px; padding: 10px 16px; grid-template-columns: auto minmax(260px, 440px) 1fr; gap: 12px; }.workflow-name-field input { border-radius: 4px; border-color: #d1d1d1; font-size: 13px; }.workflow-context-tabs { height: 40px; display: flex; align-items: end; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }.workflow-context-tabs button { height: 36px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }.workflow-context-tabs button:hover { background: #f5f5f5; }.workflow-context-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.workflow-workspace { grid-template-columns: 184px minmax(0, 1fr) 296px; min-height: 0; }.workflow-palette, .workflow-config { padding: 16px 12px; }.workflow-palette > button { border-radius: 4px; padding: 8px; margin-bottom: 6px; }.workflow-palette > button:hover { border-color: var(--blue); background: var(--blue-soft); }.workflow-palette > button b { border-radius: 4px; }.workflow-canvas { background-color: #fafafa; background-image: radial-gradient(#d1d1d1 1px, transparent 1px); background-size: 20px 20px; }.workflow-line { stroke: var(--blue); }.workflow-line-label { fill: #424242; stroke: #fafafa; }
.workflow-node-main { border-radius: 6px; border-color: #d1d1d1; box-shadow: 0 2px 4px rgba(0,0,0,.08); }.workflow-node-main:hover { border-color: var(--blue); }.workflow-node.selected .workflow-node-main { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 2px 4px rgba(0,0,0,.08); }.workflow-node-head { background: #fafafa; }.workflow-node-number, .workflow-node-icon { border-radius: 4px; }.workflow-node-number { background: var(--blue); }.workflow-node-report { border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,.06); }.workflow-node-report button { border-radius: 4px; }.workflow-node-outputs button { border-radius: 4px; }.workflow-config-form input, .workflow-config-form select { border-radius: 4px; border-color: #d1d1d1; }
.modal { border-radius: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.22); }.modal-head { background: #fafafa; }.donut-chart::after { background: #fff; }.history-overview article { border-radius: 8px; box-shadow: var(--shadow); }.run-result-icon { border-radius: 50%; }.run-step-marker span { border-radius: 4px; }.run-detail-head code { border-radius: 4px; }
.toast { border-radius: 6px; background: #292929; box-shadow: 0 8px 16px rgba(0,0,0,.2); font-size: 12px; }

@media (max-width: 780px) {
  .sidebar { width: 224px; }.main-content { margin-left: 0; width: 100%; }.topbar { height: 56px; }.view { padding: 16px; }.workflow-builder { margin: -16px -16px -40px; min-height: calc(100vh - 56px); }.campaign-list-tools { grid-template-columns: 1fr; }.workflow-context-tabs { overflow-x: auto; }.workflow-workspace { min-height: 520px; }
}
.test-trace-step.branch > b { background: #fff4dd; color: #a76800; }

@media (max-width: 1180px) {
  .workflow-workspace { grid-template-columns: 155px minmax(0, 1fr) 235px; }
  .workflow-node { width: 205px; }
}
@media (max-width: 780px) {
  .workflow-builder { margin: -20px -16px -40px; }
  .workflow-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .workflow-toolbar-actions { justify-content: space-between; }
  .workflow-workspace { display: flex; flex-direction: column; }
  .workflow-palette { border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .workflow-palette > div { grid-column: 1/-1; }
  .workflow-palette > button { margin: 0; }
  .workflow-canvas-stage { min-height: 520px; }
  .workflow-canvas { min-height: 520px; }
  .workflow-config { border-left: 0; border-top: 1px solid var(--line); }
}

/* Lark Flow layout with expressive Fluent color */
:root {
  --blue: #5b5fc7;
  --blue-hover: #4f52b2;
  --blue-pressed: #3f418d;
  --blue-soft: #f0f0ff;
  --bg: #f6f4f1;
  --line: #e6e3e1;
  --shadow: 0 4px 14px rgba(61, 52, 46, .07);
}
body { background: var(--bg); }
.main-content { background:
  radial-gradient(circle at 86% 4%, rgba(104, 196, 255, .10), transparent 24rem),
  radial-gradient(circle at 18% 16%, rgba(255, 181, 112, .10), transparent 22rem),
  var(--bg);
}
.brand-mark { background: transparent; box-shadow: none; }
.nav-item.active { background: linear-gradient(90deg, #eeeeff, #f6f3ff); }
.nav-item.active::before { background: linear-gradient(#5b5fc7, #b167d6); }
.primary-button { border-color: transparent; background: linear-gradient(135deg, #5b5fc7, #7067d9); box-shadow: 0 2px 6px rgba(91,95,199,.18); }
.primary-button:hover { border-color: transparent; background: linear-gradient(135deg, #4f52b2, #6259c9); }
.panel { border-color: rgba(211, 205, 201, .82); background: rgba(255,255,255,.88); box-shadow: 0 5px 18px rgba(61,52,46,.055); backdrop-filter: blur(14px); }
.welcome-card { border: 1px solid rgba(218,208,201,.86); border-left: 0; background:
  radial-gradient(circle at 92% 10%, rgba(94,194,245,.28), transparent 24%),
  radial-gradient(circle at 80% 110%, rgba(191,112,230,.22), transparent 32%),
  radial-gradient(circle at 7% 10%, rgba(255,174,93,.20), transparent 27%),
  rgba(255,255,255,.91); box-shadow: 0 8px 28px rgba(95,76,61,.08); }
.stat-icon.blue { background: linear-gradient(145deg, #dff5ff, #506ff0); color: #fff; box-shadow: 0 5px 12px rgba(70,117,222,.18); }
.stat-icon.violet { background: linear-gradient(145deg, #f8d9f3, #9a55d7); color: #fff; box-shadow: 0 5px 12px rgba(154,85,215,.18); }
.stat-icon.green { background: linear-gradient(145deg, #e5ffb6, #32a86b); color: #fff; box-shadow: 0 5px 12px rgba(50,168,107,.18); }
.stat-icon.orange { background: linear-gradient(145deg, #ffe7b7, #ff7043); color: #fff; box-shadow: 0 5px 12px rgba(255,112,67,.18); }

.workflow-builder { background:
  radial-gradient(circle at 8% 4%, rgba(255,183,111,.18), transparent 24rem),
  radial-gradient(circle at 90% 14%, rgba(92,194,245,.17), transparent 28rem),
  radial-gradient(circle at 58% 88%, rgba(187,116,229,.10), transparent 24rem),
  #f5f5f7; }
.workflow-toolbar, .workflow-context-tabs { background: rgba(255,255,255,.88); backdrop-filter: blur(20px) saturate(1.25); }
.workflow-workspace { grid-template-columns: 180px minmax(0, 1fr) 310px; }
.workflow-palette, .workflow-config { background: rgba(255,255,255,.82); backdrop-filter: blur(22px) saturate(1.2); }
.workflow-palette > button { min-height: 48px; border-color: rgba(211,211,220,.86); border-radius: 10px; background: rgba(255,255,255,.72); box-shadow: 0 2px 8px rgba(54,48,77,.035); }
.workflow-palette > button:hover { border-color: #898bd7; background: #f7f6ff; box-shadow: 0 4px 12px rgba(91,95,199,.10); }
.workflow-palette > button b { width: 30px; height: 30px; border-radius: 9px; color: #fff; background: linear-gradient(145deg, #5ecbf5, #5b5fc7); box-shadow: 0 3px 8px rgba(91,95,199,.18); }
.workflow-palette > button:nth-of-type(1) b { background: linear-gradient(145deg, #ffbd5d, #ef6c57); }
.workflow-palette > button:nth-of-type(2) b { background: linear-gradient(145deg, #59d7ef, #6555dd); }
.workflow-palette > button:nth-of-type(3) b { background: linear-gradient(145deg, #b986f0, #7063db); }
.workflow-palette > button:nth-of-type(4) b { background: linear-gradient(145deg, #a8db50, #31a270); }
.workflow-palette > button:nth-of-type(5) b { background: linear-gradient(145deg, #737986, #343841); }
.workflow-canvas-wrap { background: transparent; }
.workflow-canvas {
  min-width: 900px;
  min-height: 760px;
  background-color: #fcfcfd;
  background-image: radial-gradient(circle, rgba(177, 186, 196, .38) 1px, transparent 1.2px);
  background-position: 0 0;
  background-size: 24px 24px;
}
.workflow-canvas::before { content: "Bắt đầu workflow"; position: absolute; top: 24px; left: var(--workflow-root-center, 50%); transform: translateX(-50%); padding: 5px 10px; border: 1px solid rgba(216,214,222,.9); border-radius: 999px; background: rgba(255,255,255,.85); color: #77737f; font-size: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.workflow-line { stroke: #bfc0ca; stroke-width: 1.4; }
.workflow-line-label { fill: #73717a; stroke: #f6f6f8; stroke-width: 7px; font-size: 10px; }
.workflow-node { width: 328px; }
.workflow-node-main { min-height: 92px; border: 1px solid rgba(222,220,225,.92); border-radius: 12px; background: rgba(255,255,255,.92); box-shadow: 0 7px 22px rgba(58,53,71,.075); backdrop-filter: blur(18px) saturate(1.2); overflow: visible; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.workflow-node-main:hover { transform: translateY(-1px); border-color: #aaa9dc; box-shadow: 0 10px 28px rgba(58,53,71,.11); }
.workflow-node.selected .workflow-node-main { border-color: #686bd1; box-shadow: 0 0 0 3px rgba(91,95,199,.13), 0 10px 26px rgba(58,53,71,.11); }
.workflow-node-head { position: relative; min-height: 50px; padding: 16px 16px 5px 64px; border: 0; background: transparent; cursor: grab; }
.workflow-node.fixed-start .workflow-node-head { cursor: default; }
.workflow-node-head strong { font-size: 13px; font-weight: 600; }
.workflow-node-number { position: absolute; left: -36px; top: 29px; width: 22px; height: 22px; border-radius: 50%; background: transparent; color: #96939c; font-size: 11px; }
.workflow-node-icon { position: absolute; left: 16px; top: 17px; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-size: 12px; box-shadow: 0 4px 10px rgba(57,57,88,.17); }
.workflow-node.datahub .workflow-node-icon { background: linear-gradient(145deg, #54cef6, #5167df); color: #fff; }
.workflow-node.webhook .workflow-node-icon { background: linear-gradient(145deg, #ff9e6d, #da4d86); color: #fff; }
.workflow-node.miniapp .workflow-node-icon { background: linear-gradient(145deg, #52a8ff, #1967d2); color: #fff; }
.workflow-node.condition .workflow-node-icon { background: linear-gradient(145deg, #ffbd58, #ef6b55); color: #fff; }
.workflow-node.send .workflow-node-icon { background: linear-gradient(145deg, #62dded, #6354da); color: #fff; }
.workflow-node.delay .workflow-node-icon { background: linear-gradient(145deg, #d698f2, #7162d9); color: #fff; }
.workflow-node.update .workflow-node-icon { background: linear-gradient(145deg, #b5e763, #2aa26e); color: #fff; }
.workflow-node.end .workflow-node-icon { background: linear-gradient(145deg, #757b88, #343842); color: #fff; }
.workflow-node-body { display: block; box-sizing: border-box; width: 100%; min-height: 42px; padding: 0 16px 16px 64px; }
.workflow-node-body strong { font-size: 11px; font-weight: 500; }.workflow-node-body span { margin-top: 3px; font-size: 10px; }
.workflow-node-outputs { justify-content: center; min-height: 30px; margin-top: 8px; }
.workflow-node:not(.condition) .workflow-node-outputs button { width: 28px; height: 28px; padding: 0; border: 1px solid #c8c7d0; border-radius: 50%; background: rgba(255,255,255,.95); color: #65637b; font-size: 0; box-shadow: 0 2px 7px rgba(0,0,0,.06); }
.workflow-node:not(.condition) .workflow-node-outputs button::before { content: "+"; font-size: 17px; font-weight: 400; line-height: 1; }
.workflow-node.condition .workflow-node-outputs { justify-content: space-between; padding: 0 32px; }
.workflow-node.condition .workflow-node-outputs button { min-height: 28px; padding: 4px 10px; border-color: #d6d4df; border-radius: 999px; background: rgba(255,255,255,.95); color: #5b5fc7; font-size: 10px; box-shadow: 0 2px 7px rgba(0,0,0,.05); }
.workflow-node-outputs button:hover, .workflow-node-outputs button.active { border-color: #5b5fc7; background: #5b5fc7; color: #fff; }
.workflow-node-report { margin-top: 8px; border-color: rgba(218,216,224,.92); border-radius: 10px; background: rgba(255,255,255,.88); box-shadow: 0 4px 14px rgba(58,53,71,.055); }
.workflow-node-progress i { background: linear-gradient(90deg, #49b976, #7cd393); }
.workflow-node-report button { background: #f0f0ff; color: #4f52b2; }
.workflow-config { box-shadow: -8px 0 26px rgba(55,48,73,.035); }
.workflow-config-form input, .workflow-config-form select { min-height: 36px; border-radius: 6px; background: rgba(255,255,255,.9); }

@media (max-width: 1180px) {
  .workflow-workspace { grid-template-columns: 155px minmax(0, 1fr) 260px; }
}
@media (max-width: 760px) {
  .workflow-node { width: 300px; }
  .workflow-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
}

/* UX/UI 2026 — Fluent hierarchy, readable density, responsive workspaces */
:root {
  --blue: #5b5fc7;
  --blue-hover: #4f52b2;
  --blue-pressed: #3f418d;
  --blue-soft: #f1f1ff;
  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-subtle: #fafafd;
  --line: #e2e2e9;
  --line-strong: #cbcbd5;
  --text: #24242b;
  --muted: #6e6e7a;
  --green: #16875b;
  --green-soft: #eaf8f1;
  --orange: #c65f14;
  --red: #c4314b;
  --red-soft: #fdf0f3;
  --violet: #7746a8;
  --shadow: 0 2px 8px rgba(36, 36, 43, .055), 0 12px 32px rgba(52, 48, 73, .035);
  --shadow-hover: 0 5px 14px rgba(36, 36, 43, .08), 0 18px 42px rgba(52, 48, 73, .06);
  --radius: 12px;
}

html { background: var(--bg); }
body { min-width: 320px; font-size: 14px; line-height: 1.45; background: var(--bg); text-rendering: optimizeLegibility; }
::selection { background: #dcdcff; color: #24242b; }
.app-shell { background: var(--bg); }
.app-icon { stroke-width: 1.75; }

.sidebar { width: 240px; padding: 14px 12px; border-right-color: rgba(219,219,228,.9); background: rgba(255,255,255,.96); box-shadow: 8px 0 28px rgba(52,48,73,.025); backdrop-filter: blur(24px); }
.brand { min-height: 54px; padding: 4px 8px 22px; gap: 11px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }.brand span { margin-top: 1px; font-size: 10px; letter-spacing: .08em; }
.main-nav { gap: 3px; }
.nav-section-label { margin: 12px 10px 5px; color: #9695a2; font-size: 10px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.nav-section-label:first-child { margin-top: 0; }
.nav-item { min-height: 42px; padding: 9px 11px; border-radius: 8px; color: #4f4f59; gap: 11px; font-size: 13px; }
.nav-item:hover { background: #f4f4f8; }
.nav-item.active { background: linear-gradient(90deg, #ededff, #f7f5ff); color: #34347e; }
.nav-item.active::before { top: 10px; bottom: 10px; width: 3px; background: linear-gradient(#686bd1, #9b62ca); }
.nav-icon { color: #686bd1; }.nav-icon .app-icon { width: 19px; height: 19px; }
.sidebar-foot { padding: 13px; border: 1px solid #e2e2e9; border-radius: 10px; background: linear-gradient(135deg, #fbfbff, #f7f7fb); }
.sidebar-foot strong { font-size: 12px; }.sidebar-foot span { margin-top: 3px; font-size: 10px; line-height: 1.4; }
.status-dot { width: 9px; height: 9px; margin-top: 4px; background: #e76e19; box-shadow: 0 0 0 4px #fff0e5; }

.main-content { margin-left: 240px; width: calc(100% - 240px); background: radial-gradient(circle at 96% 0, rgba(91,188,238,.10), transparent 26rem), radial-gradient(circle at 5% 0, rgba(255,178,102,.07), transparent 23rem), var(--bg); }
.topbar { height: 72px; padding: 0 36px; border-bottom-color: rgba(219,219,228,.86); background: rgba(255,255,255,.82); box-shadow: 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(24px) saturate(1.25); }
.topbar h1 { margin-top: 2px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }.eyebrow { color: #858491; font-size: 10px; font-weight: 550; letter-spacing: .04em; }
.connection-badge { min-height: 28px; display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid #d7efdf; border-radius: 999px; background: #effaf3; font-size: 11px; font-weight: 600; }
.connection-badge.not-ready { border-color: #f3dfb8; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(145deg, #686bd1, #7956b0); box-shadow: 0 4px 11px rgba(91,95,199,.20); }

.view { padding: 28px 36px 52px; }
.section-toolbar { min-height: 48px; margin-bottom: 18px; gap: 24px; }
.section-toolbar h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; }.section-toolbar p { margin-top: 4px; color: var(--muted); font-size: 12px; }
#campaigns-view .section-toolbar h2, #zalo-view .section-toolbar h2, #reports-view .section-toolbar h2, #logs-view .section-toolbar h2, #settings-view .section-toolbar h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.record-count-badge { display: inline-flex; align-content: center; padding: 4px 8px; border: 1px solid #dddded; border-radius: 999px; background: #f5f5ff; color: #5759b5; font-size: 10px; font-weight: 650; }
.button-row { flex-wrap: wrap; }

.primary-button, .secondary-button, .text-button { min-height: 36px; padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 650; }
.primary-button { background: linear-gradient(135deg, #5b5fc7, #6d63d7); box-shadow: 0 3px 8px rgba(91,95,199,.18); }
.primary-button:hover { background: linear-gradient(135deg, #4f52b2, #5d54c2); box-shadow: 0 5px 13px rgba(91,95,199,.22); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }
.secondary-button { border-color: var(--line-strong); background: rgba(255,255,255,.9); }.secondary-button:hover { border-color: #9797a5; background: #f7f7fa; }
.button-with-icon .app-icon { width: 16px; height: 16px; }
.icon-button { width: 36px; height: 36px; border-radius: 8px; }

.welcome-card { min-height: 148px; padding: 26px 28px; border: 1px solid #dad9e3; border-radius: 16px; background: radial-gradient(circle at 92% 6%, rgba(89,197,245,.29), transparent 25%), radial-gradient(circle at 79% 112%, rgba(183,106,224,.24), transparent 36%), radial-gradient(circle at 4% 8%, rgba(255,178,101,.22), transparent 30%), rgba(255,255,255,.93); box-shadow: 0 12px 38px rgba(78,68,96,.07); }
.welcome-card h2 { margin: 11px 0 6px; font-size: 24px; font-weight: 680; letter-spacing: -.025em; }.welcome-card p { max-width: 650px; font-size: 13px; line-height: 1.6; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(242,242,255,.9); color: #5254ad; }.pill .app-icon { width: 14px; height: 14px; }
.welcome-actions { position: relative; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.quick-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.quick-action-grid > button { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.88); color: var(--text); text-align: left; box-shadow: 0 2px 7px rgba(36,36,43,.035); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.quick-action-grid > button:hover { transform: translateY(-2px); border-color: #bbb9d4; box-shadow: var(--shadow-hover); }
.quick-action-grid > button > span:nth-child(2), .quick-action-grid strong, .quick-action-grid small { display: block; }.quick-action-grid strong { font-size: 13px; }.quick-action-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }.quick-action-grid i { color: #858491; font-size: 16px; font-style: normal; }
.quick-action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; }.quick-action-icon .app-icon { width: 18px; height: 18px; }.quick-action-icon.data { background: linear-gradient(145deg, #43bce9, #5570dc); }.quick-action-icon.campaign { background: linear-gradient(145deg, #8e78e8, #6a55c7); }.quick-action-icon.history { background: linear-gradient(145deg, #4bc790, #25865e); }

.stat-grid { gap: 12px; margin: 16px 0; }.stat-card { min-height: 106px; padding: 17px; border-color: var(--line); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(36,36,43,.035); transition: border-color .15s ease, box-shadow .15s ease; }.stat-card:hover { border-color: #d1d0dc; box-shadow: var(--shadow); }.stat-card strong { margin-top: 2px; font-size: 26px; letter-spacing: -.03em; }.stat-card span { font-size: 12px; }.stat-card small { font-size: 10px; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; }.stat-icon .app-icon { width: 20px; height: 20px; }
.panel { border-color: var(--line); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.panel h3 { font-size: 15px; }.panel p { font-size: 11px; }
.flow-step { min-height: 72px; border-radius: 9px; background: var(--surface-subtle); }.flow-step b { width: 28px; height: 28px; border-radius: 7px; }.flow-step strong { font-size: 12px; }.flow-step small { font-size: 10px; }

.datahub-workspace { grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
.datahub-tree-panel { top: 88px; min-height: 360px; border-color: var(--line); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.datahub-tree-head { min-height: 62px; padding: 14px 15px; }.datahub-tree-head strong { font-size: 13px; }.datahub-tree-head span { font-size: 10px; }
.datahub-tree-head button, .datahub-group-head button { width: 30px; height: 30px; border-radius: 7px; }.datahub-tree-head button .app-icon, .datahub-group-head button .app-icon { width: 15px; height: 15px; }
.datahub-tree { padding: 9px; }.datahub-group { padding: 4px 0 7px; }.datahub-group-head { padding: 7px 8px; }.datahub-group-head > span { align-items: flex-start; font-size: 11px; }.datahub-group-head > span > span { min-width: 0; display: grid; gap: 1px; }.datahub-group-head small { color: #9695a2; font-size: 9px; font-weight: 500; }.datahub-group-head svg { margin-top: 1px; }
.datahub-table-button { min-height: 36px; justify-content: space-between; margin: 2px 0; padding: 8px 9px 8px 28px; border-radius: 8px; font-size: 11px; }.datahub-table-button > span { min-width: 0; display: flex; align-items: center; gap: 8px; }.datahub-table-button > small { min-width: 20px; padding: 2px 5px; border-radius: 999px; background: #efeff3; color: #777682; font-size: 9px; text-align: center; }.datahub-table-button.active { background: linear-gradient(90deg, #e9efff, #f3f1ff); color: #4547a4; }.datahub-table-button.active > small { background: #fff; color: #5557b2; }
.table-panel, .campaign-list-shell, .history-panel { border-radius: 12px; }.table-tools, .campaign-list-tools, .history-tools { padding: 14px 16px; background: rgba(250,250,253,.9); }
.search-box, .select-control { min-height: 38px; border-radius: 8px; }.search-box input, .select-control { font-size: 12px; }.search-box .app-icon { width: 17px; height: 17px; }
.table-wrap { scrollbar-color: #c9c8d2 transparent; scrollbar-width: thin; }
.table-wrap thead { position: sticky; top: 0; z-index: 3; }.table-wrap th { height: 42px; padding: 10px 13px; background: #f8f8fb; color: #666570; font-size: 10px; }.table-wrap td { height: 54px; padding: 11px 13px; font-size: 12px; }.table-wrap tbody tr { transition: background-color .12s ease; }.table-wrap tbody tr:hover { background: #f7f8ff; }
.table-tools + .table-wrap { border-top: 0; }
.table-tools:has(+ .table-wrap[style*="block"]) { border-bottom-color: transparent; }
.table-tools select { flex: 0 0 auto; }
.table-panel { min-height: 360px; }
.table-panel .empty-state { min-height: 280px; align-content: center; }
.table-panel .empty-state.show { display: grid; }
.table-panel .empty-state button { justify-self: center; }
.table-panel .table-wrap { max-height: calc(100vh - 275px); min-height: 250px; }
.table-panel .customer-code { font-size: 11px; color: #555465; }
.customer-identity { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }.customer-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #eeecff, #ddd9ff); color: #5557b2; font-size: 10px; font-weight: 700; }.customer-identity > strong { font-size: 12px; font-weight: 600; }
