:root {
    --ink: #102a27;
    --muted: #667874;
    --paper: #f5f8f7;
    --surface: #ffffff;
    --line: #dfe8e3;
    --green-950: #082f2a;
    --green-800: #115e52;
    --green-600: #168c72;
    --green-500: #1aae83;
    --green-100: #dff5ec;
    --red: #c74242;
    --red-soft: #fde8e6;
    --gold: #b7791f;
    --gold-soft: #fff2d6;
    --blue: #3274a8;
    --blue-soft: #e5f0fa;
    --shadow: 0 10px 30px rgba(16, 42, 39, .065);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(26,174,131,.25); outline-offset: 2px; }
.skip-link { position: fixed; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--green-950); border-radius: 8px; font-size: 12px; font-weight: 800; transform: translateY(-160%); transition: transform .15s; z-index: 100; }
.skip-link:focus { transform: translateY(0); }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px; color: #dcece7; background: linear-gradient(165deg, #092f2a 0%, #0b4037 65%, #092f2a 100%); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 29px; color: white; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; color: var(--green-950); background: #52d8ad; border-radius: 12px 12px 12px 4px; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: #91b8ae; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: #a9cbc1; border-radius: 11px; font-size: 14px; font-weight: 600; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(82,216,173,.16); box-shadow: inset 3px 0 #52d8ad; }
.nav-icon { display: block; flex: 0 0 22px; width: 22px; height: 22px; color: #79c7b0; fill: currentColor; }
.logout-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.logout-form button { width: 100%; border: 0; text-align: left; cursor: pointer; }
.sidebar-note { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px; background: rgba(0,0,0,.14); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { color: #dcece7; font-size: 12px; }
.sidebar-note small { margin-top: 2px; color: #83aa9f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.live-dot { width: 9px; height: 9px; background: #52d8ad; border-radius: 50%; box-shadow: 0 0 0 5px rgba(82,216,173,.12); }

.main-column { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 12px clamp(22px, 4vw, 52px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.topbar > div strong, .topbar > div span { display: block; }
.topbar > div strong { font-size: 15px; }
.topbar .eyebrow { margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topbar-action { margin-left: auto; }
.menu-button { display: none; place-content: center; gap: 4px; width: 40px; height: 40px; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.menu-button span { display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .18s, opacity .18s; }
.menu-button[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; padding: 0; background: rgba(5,24,21,.42); border: 0; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 19; }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 42px clamp(22px, 4vw, 52px) 56px; }
.footer { margin-top: auto; padding: 20px 40px; color: #879692; border-top: 1px solid var(--line); font-size: 12px; text-align: center; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 4vw, 46px); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: 4px; font-size: 20px; letter-spacing: -.025em; }
h3 { margin-bottom: 7px; }
p { color: var(--muted); line-height: 1.55; }
.kicker { display: block; margin-bottom: 10px; color: var(--green-600); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 32px; }
.hero p { max-width: 660px; margin: 0; font-size: 16px; }
.connection-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--gold); background: var(--gold-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.connection-chip span { width: 8px; height: 8px; background: currentColor; border-radius: 50%; }
.connection-chip.ready { color: var(--green-800); background: var(--green-100); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; min-height: 157px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--green-500); }
.stat-card.accent-blue::before { background: var(--blue); }
.stat-card.accent-gold::before { background: #d49b42; }
.stat-card.accent-red::before { background: var(--red); }
.stat-label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-card > strong { display: block; margin: 9px 0 13px; font-size: 37px; line-height: 1; letter-spacing: -.04em; }
.stat-card a, .stat-foot { color: var(--green-600); font-size: 12px; font-weight: 750; }
.stat-card.accent-blue a { color: var(--blue); }
.stat-card.accent-red a { color: var(--red); }
.stat-foot { color: var(--gold); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.panel-heading .kicker { margin-bottom: 6px; }
.text-link { color: var(--green-600); font-size: 12px; font-weight: 800; }
.quick-panel { padding: 25px; }
.quick-panel h2 { margin-bottom: 22px; }
.setup-list { margin: 0 0 23px; padding: 0; list-style: none; }
.setup-list li { display: flex; align-items: center; gap: 12px; position: relative; padding: 0 0 20px; }
.setup-list li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 3px; width: 1px; background: var(--line); }
.setup-list li > span { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; color: #80908c; background: #eef2f0; border-radius: 50%; font-size: 11px; font-weight: 900; z-index: 1; }
.setup-list li.done > span { color: var(--green-800); background: var(--green-100); }
.setup-list strong, .setup-list small { display: block; }
.setup-list strong { font-size: 13px; }
.setup-list small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 26px; }
.page-heading h1 { margin-bottom: 8px; }
.page-heading p { max-width: 690px; margin-bottom: 0; }
.page-heading.compact { align-items: start; }
.toolbar { display: flex; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 520px; padding: 0 13px; background: #f8faf8; border: 1px solid var(--line); border-radius: 10px; }
.search-box span { color: var(--muted); }
.search-box input { width: 100%; padding: 10px 0; background: transparent; border: 0; outline: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green-800); box-shadow: 0 8px 18px rgba(17,94,82,.16); }
.button-primary:hover { background: var(--green-950); }
.button-secondary { color: var(--ink); background: white; border-color: var(--line); }
.button-secondary:hover { background: #f6f9f7; }
.button-small { min-height: 32px; padding: 6px 10px; }
.button-block { width: 100%; }

.table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #bdcbc6 transparent; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 19px; color: #7a8985; background: #f8faf8; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 19px; border-bottom: 1px solid #edf1ef; color: #344b47; font-size: 13px; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfdfc; }
tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td strong { color: var(--ink); font-size: 13px; }
td small { max-width: 270px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.identity { display: flex; align-items: center; gap: 10px; }
.identity > span { display: grid; place-items: center; width: 32px; height: 32px; color: var(--green-800); background: var(--green-100); border-radius: 10px; font-size: 12px; font-weight: 900; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.row-actions form { margin: 0; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--green-800); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.icon-button:hover { background: var(--green-100); }
.icon-button.danger { color: var(--red); }
.icon-button.danger:hover { background: var(--red-soft); }
.status-pill, .direction { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; text-transform: capitalize; }
.status-success { color: var(--green-800); background: var(--green-100); }
.status-pending { color: var(--gold); background: var(--gold-soft); }
.status-failed { color: var(--red); background: var(--red-soft); }
.direction { color: var(--blue); background: var(--blue-soft); }
.direction.inbound { color: var(--green-800); background: var(--green-100); }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-detail { max-width: 220px; overflow: hidden; color: var(--red); text-overflow: ellipsis; white-space: nowrap; }

.empty-state { padding: 58px 25px; text-align: center; }
.empty-state p { max-width: 440px; margin: 0 auto 20px; font-size: 13px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 15px; color: var(--green-800); background: var(--green-100); border-radius: 15px; font-size: 22px; font-weight: 900; }
.filter-tabs { display: flex; gap: 5px; padding: 15px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.filter-tabs a { padding: 7px 12px; color: var(--muted); border-radius: 8px; font-size: 11px; font-weight: 800; }
.filter-tabs a.active { color: var(--green-800); background: var(--green-100); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; color: var(--muted); background: #fbfcfb; border-top: 1px solid var(--line); font-size: 11px; }
.pagination > div { display: flex; align-items: center; gap: 12px; }
.pager-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 750; }
.pager-button:hover { color: var(--green-800); border-color: #b8d6cc; }
.pager-button.disabled { opacity: .45; pointer-events: none; }

.form-panel { padding: 28px; }
.form-panel form { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.field { margin-bottom: 19px; }
.form-grid .field { margin-bottom: 0; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #273f3b; font-size: 12px; font-weight: 800; }
.field input, .field textarea, .field select { display: block; width: 100%; padding: 11px 12px; color: var(--ink); background: #fbfcfb; border: 1px solid #cedbd6; border-radius: 9px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { background: white; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.11); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.field > span { display: block; margin-top: 5px; color: var(--red); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 350px); gap: 22px; align-items: start; }
.guidance-panel { padding: 27px; }
.guidance-panel h2 { margin-bottom: 22px; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; color: #465b57; border-bottom: 1px solid #edf1ef; font-size: 12px; line-height: 1.45; }
.check-list li > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; color: var(--green-800); background: var(--green-100); border-radius: 50%; font-size: 10px; font-weight: 900; }
.info-note { margin-top: 22px; padding: 16px; background: var(--gold-soft); border-radius: 12px; }
.info-note strong { color: var(--gold); font-size: 12px; }
.info-note p { margin: 5px 0 0; color: #765e33; font-size: 11px; }
.validation-summary { margin-bottom: 19px; padding: 13px 15px; color: #8b2e2e; background: var(--red-soft); border-radius: 10px; font-size: 12px; }
.validation-summary:empty, .validation-summary-valid { display: none; }
.validation-summary ul { margin: 0; padding-left: 17px; }

.alert { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 13px 16px; border-radius: 11px; font-size: 12px; }
.alert strong, .alert span { display: block; }
.alert strong { flex: 0 0 auto; }
.alert-success { color: #115f50; background: var(--green-100); border: 1px solid #bce8d8; }
.alert-error { align-items: flex-start; color: #843838; background: var(--red-soft); border: 1px solid #f5c9c5; }
.alert-error span { overflow-wrap: anywhere; }
.token-diagnostic { display: flex; align-items: flex-start; gap: 12px; margin: -6px 0 20px; padding: 14px 16px; color: #774f13; background: #fff6dc; border: 1px solid #efd99c; border-radius: 11px; }
.token-diagnostic > span { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: #fff; background: #bd8120; border-radius: 50%; font-size: 11px; font-weight: 900; }
.token-diagnostic strong { font-size: 11px; }
.token-diagnostic p { margin: 4px 0 0; color: #795f35; font-size: 9px; }
.config-source { display: block; max-width: 260px; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 500; text-align: right; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.settings-list { margin: 0; padding: 5px 25px 17px; }
.settings-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid #edf1ef; }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list dt { color: var(--muted); font-size: 11px; font-weight: 750; }
.settings-list dd { margin: 0; font-size: 12px; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.config-state { display: inline-flex; padding: 5px 9px; color: var(--red); background: var(--red-soft); border-radius: 999px; }
.config-state.configured { color: var(--green-800); background: var(--green-100); }
.code-panel { padding: 25px; }
.code-panel h2 { margin-bottom: 16px; }
.code-panel pre { overflow-x: auto; padding: 18px; color: #bcebdc; background: var(--green-950); border-radius: 12px; font-size: 12px; line-height: 1.75; }
.code-panel p { margin-bottom: 0; font-size: 12px; }
code { padding: 2px 5px; color: var(--green-800); background: #edf5f1; border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-panel pre code { padding: 0; color: inherit; background: transparent; }
.error-page { padding: 70px 30px; text-align: center; }
.error-page p { margin-bottom: 18px; }

.auth-body { background: var(--green-950); }
.auth-shell { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); min-height: 100vh; }
.auth-intro { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: clamp(35px, 6vw, 80px); color: white; background: radial-gradient(circle at 20% 75%, rgba(82,216,173,.18), transparent 34%), linear-gradient(145deg, #082f2a, #0c493e); }
.auth-brand { padding: 0; }
.auth-intro h1 { max-width: 600px; font-size: clamp(44px, 5vw, 74px); }
.auth-intro p { max-width: 540px; color: #a9c8c0; font-size: 16px; }
.auth-foot { color: #789d93; font-size: 11px; }
.auth-form-wrap { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: #f1f6f2; }
.auth-card { width: min(100%, 440px); padding: 40px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 70px rgba(8,47,42,.14); }
.auth-card h2 { margin-bottom: 8px; font-size: 28px; }
.auth-card > p { margin-bottom: 28px; font-size: 13px; }
.auth-card .button { margin-top: 7px; }
.auth-hint { display: block; margin-top: 20px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: 1fr; }
    .quick-panel { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
    .quick-panel > .kicker, .quick-panel > h2 { grid-column: 1; }
    .quick-panel .setup-list { grid-column: 2; grid-row: 1 / span 3; }
    .quick-panel .button { grid-column: 1; align-self: end; }
}

@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 250px; transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.22); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { display: block; }
    .sidebar-backdrop.visible { opacity: 1; pointer-events: auto; }
    body.nav-open { overflow: hidden; }
    .menu-button { display: grid; place-items: center; }
    .topbar { padding-inline: 18px; }
    .content { padding: 28px 18px 45px; }
    .form-layout, .settings-grid { grid-template-columns: 1fr; }
    .auth-shell { display: block; }
    .auth-intro { display: none; }
}

@media (max-width: 620px) {
    h1 { font-size: 34px; }
    .hero, .page-heading { align-items: stretch; flex-direction: column; }
    .hero .connection-chip { align-self: flex-start; }
    .page-heading > .button { align-self: flex-start; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { min-height: 135px; padding: 18px; }
    .stat-card > strong { font-size: 31px; }
    .quick-panel { display: block; }
    .topbar > div { display: none; }
    .topbar-action { min-height: 38px; padding: 8px 12px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .form-panel { padding: 20px; }
    .auth-form-wrap { padding: 18px; }
    .auth-card { padding: 28px 22px; }
    .toolbar { flex-direction: column; }
    .search-box { max-width: none; }
    .pagination { align-items: stretch; flex-direction: column; }
    .pagination > div { justify-content: space-between; }
    .table-wrap table { min-width: 700px; }
}

.webhook-report-panel { margin-top: 20px; overflow: hidden; }
.webhook-last-seen { color: var(--muted); font-size: 9px; font-weight: 700; }
.webhook-setup-warning { display: flex; gap: 13px; margin: 0 24px 20px; padding: 16px 18px; color: #765414; background: var(--gold-soft); border: 1px solid #efd89c; border-radius: 12px; }
.webhook-setup-warning > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; color: #fff; background: #d89b25; border-radius: 50%; font-weight: 900; }
.webhook-setup-warning strong, .webhook-setup-warning p { display: block; margin: 0; }
.webhook-setup-warning strong { font-size: 11px; }
.webhook-setup-warning p { margin-top: 4px; color: #7b673d; font-size: 9px; line-height: 1.55; }
.webhook-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 24px 20px; }
.webhook-stat-grid article { padding: 16px; background: #f7faf8; border: 1px solid var(--line); border-radius: 11px; }
.webhook-stat-grid span, .webhook-stat-grid strong, .webhook-stat-grid small { display: block; }
.webhook-stat-grid span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.webhook-stat-grid strong { margin: 6px 0 4px; color: var(--green-800); font-size: 22px; }
.webhook-stat-grid small { color: var(--muted); font-size: 8px; }
.webhook-checklist { margin: 0 24px 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.webhook-checklist > strong { display: block; margin-bottom: 14px; font-size: 11px; }
.webhook-checklist ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; margin: 0; padding: 0; list-style: none; }
.webhook-checklist li { display: flex; gap: 10px; }
.webhook-checklist li > span { display: grid; place-items: center; flex: 0 0 24px; height: 24px; color: var(--green-800); background: var(--green-100); border-radius: 50%; font-size: 8px; font-weight: 900; }
.webhook-checklist b, .webhook-checklist small { display: block; }
.webhook-checklist b { font-size: 9px; }
.webhook-checklist small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.webhook-delivery-table { border-top: 1px solid var(--line); }

@media (max-width: 760px) {
    .webhook-stat-grid, .webhook-checklist ol { grid-template-columns: 1fr; }
    .webhook-last-seen { display: none; }
}

/* Template Studio */
.template-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.template-page-heading h1 { margin-bottom: 8px; }
.template-page-heading p { max-width: 760px; margin: 0; }
.back-link { display: inline-flex; margin-bottom: 22px; color: var(--muted); font-size: 12px; font-weight: 750; }
.back-link:hover { color: var(--green-800); }
.review-chip { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 11px 15px; color: #5e6f6b; background: white; border: 1px solid var(--line); border-radius: 12px; font-size: 11px; font-weight: 700; box-shadow: var(--shadow); }
.review-chip span { display: grid; place-items: center; width: 21px; height: 21px; color: var(--green-800); background: var(--green-100); border-radius: 50%; }
.template-builder-layout { display: grid; grid-template-columns: minmax(560px, 1fr) minmax(340px, 405px); gap: 24px; align-items: start; }
.template-builder-form { display: flex; min-width: 0; flex-direction: column; gap: 18px; }
.builder-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 9px 26px rgba(16,42,39,.05); }
.builder-card-head { display: flex; align-items: center; gap: 13px; min-height: 79px; padding: 18px 22px; background: linear-gradient(180deg, #fff, #fbfcfb); border-bottom: 1px solid var(--line); }
.builder-card-head h2 { margin: 0 0 3px; font-size: 17px; }
.builder-card-head p { margin: 0; font-size: 11px; }
.builder-card-head .add-template-button { margin-left: auto; }
.builder-step { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: white; background: var(--green-800); border-radius: 11px; font-size: 12px; font-weight: 900; box-shadow: 0 7px 16px rgba(17,94,82,.18); }
.builder-card-body { padding: 24px; }
.builder-card-body > .field:last-child { margin-bottom: 0; }
.field-label-row, .field-help-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.field-label-row label { margin-bottom: 7px; }
.field-required { color: var(--green-700, #147864); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.field-help-row small { margin-top: 6px; }
.field-help-row > span { flex: 0 0 auto; margin-top: 6px; color: #8a9995; font-size: 9px; font-weight: 700; }
.field-compact { max-width: 370px; }
.template-name-input { display: flex; align-items: stretch; overflow: hidden; background: #fbfcfb; border: 1px solid #cedbd6; border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
.template-name-input:focus-within { background: white; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.11); }
.template-name-input > span { display: flex; align-items: center; padding: 0 11px; color: #79908a; background: #eff4f1; border-right: 1px solid #d8e3de; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.template-name-input input { border: 0; border-radius: 0; box-shadow: none !important; }
.category-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.category-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 13px; background: #fbfcfb; border: 1px solid #d9e3df; border-radius: 12px; cursor: pointer; transition: .15s ease; }
.category-option:hover { border-color: #9cc8ba; }
.category-option:has(input:checked) { background: #f4fbf8; border-color: var(--green-500); box-shadow: 0 0 0 2px rgba(26,174,131,.08); }
.category-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.category-icon { display: grid; place-items: center; flex: 0 0 35px; height: 35px; color: var(--green-800); background: var(--green-100); border-radius: 10px; font-weight: 900; }
.category-icon.marketing { color: #876015; background: var(--gold-soft); }
.category-option strong, .category-option small { display: block; }
.category-option strong { margin-bottom: 3px; font-size: 12px; }
.category-option small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.category-option i { position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; background: white; border: 1px solid #bdcac6; border-radius: 50%; }
.category-option:has(input:checked) i { background: var(--green-600); border: 4px solid #dff5ec; box-shadow: 0 0 0 1px var(--green-600); }
.content-block { padding: 0 0 25px; margin-bottom: 25px; border-bottom: 1px solid #e7eeea; }
.content-block:last-child { padding: 0; margin: 0; border: 0; }
.content-block > span[data-valmsg-for] { display: block; margin-top: 6px; color: var(--red); font-size: 10px; }
.content-block-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.content-block-title strong, .content-block-title span { display: block; }
.content-block-title strong { margin-bottom: 2px; font-size: 12px; }
.content-block-title span { color: var(--muted); font-size: 9px; }
.segment-control { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: #eef3f0; border-radius: 9px; }
.segment-control label { cursor: pointer; }
.segment-control input { position: absolute; opacity: 0; pointer-events: none; }
.segment-control span { display: block; min-width: 94px; padding: 7px 12px; color: #647671; border-radius: 7px; font-size: 10px; font-weight: 800; text-align: center; }
.segment-control label:has(input:checked) span { color: var(--green-800); background: white; box-shadow: 0 2px 7px rgba(16,42,39,.08); }
.editor-shell { display: flex; align-items: center; background: #fbfcfb; border: 1px solid #cedbd6; border-radius: 9px; }
.editor-shell:focus-within { background: white; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.11); }
.editor-shell input { border: 0; box-shadow: none !important; }
.editor-action { flex: 0 0 auto; margin-right: 6px; padding: 6px 9px; color: var(--green-800); background: var(--green-100); border: 0; border-radius: 7px; font-size: 9px; font-weight: 850; cursor: pointer; }
.variable-example { padding: 13px; background: #f5faf7; border: 1px dashed #bcd8cf; border-radius: 10px; }
.variable-example code { font-size: 10px; }
.message-editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 7px 8px; background: #f4f7f5; border: 1px solid #cedbd6; border-bottom: 0; border-radius: 10px 10px 0 0; }
.message-editor-toolbar button { display: grid; place-items: center; min-width: 29px; height: 27px; padding: 0 8px; color: #536762; background: transparent; border: 0; border-radius: 6px; font-size: 11px; cursor: pointer; }
.message-editor-toolbar button:hover { color: var(--green-800); background: white; }
.message-editor-toolbar > span { width: 1px; height: 17px; margin: 0 4px; background: #d2ddd8; }
.message-editor-toolbar .variable-button { margin-left: auto; color: var(--green-800); font-size: 9px; font-weight: 850; }
.field textarea.message-editor { min-height: 170px; border-radius: 0 0 10px 10px; }
.message-editor { display: block; width: 100%; min-height: 170px; padding: 13px; color: var(--ink); background: #fff; border: 1px solid #cedbd6; border-radius: 0 0 10px 10px; outline: none; resize: vertical; line-height: 1.55; }
.message-editor:focus { border-color: var(--green-500); box-shadow: 0 2px 0 rgba(26,174,131,.1); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.variable-examples { margin-top: 15px; overflow: hidden; background: #f8fbf9; border: 1px solid #dce8e3; border-radius: 11px; }
.variable-examples-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; background: #f0f7f4; border-bottom: 1px solid #dce8e3; }
.variable-examples-head strong, .variable-examples-head span { display: block; }
.variable-examples-head strong { font-size: 10px; }
.variable-examples-head span, .variable-examples-head small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.variable-example-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.variable-example-field > span { display: block; margin-bottom: 5px; color: #4e625d; font-size: 9px; font-weight: 750; }
.variable-example-field input { display: block; width: 100%; padding: 9px 10px; color: var(--ink); background: white; border: 1px solid #cedbd6; border-radius: 8px; outline: none; font-size: 11px; }
.variable-example-field input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.09); }
.footer-block > input { display: block; width: 100%; padding: 11px 12px; color: var(--ink); background: #fbfcfb; border: 1px solid #cedbd6; border-radius: 9px; outline: none; }
.footer-block > input:focus { background: white; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.11); }
.button-builder-body { padding-top: 18px; }
.button-empty { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 84px; color: var(--muted); background: #f8faf9; border: 1px dashed #cddbd6; border-radius: 11px; }
.button-empty > span { display: grid; place-items: center; width: 35px; height: 35px; color: var(--green-800); background: var(--green-100); border-radius: 10px; font-size: 18px; }
.button-empty strong, .button-empty small { display: block; }
.button-empty strong { color: var(--ink); font-size: 11px; }
.button-empty small { margin-top: 2px; font-size: 9px; }
.template-button-list { display: flex; flex-direction: column; gap: 10px; }
.template-button-row { padding: 14px; background: #fafcfb; border: 1px solid #dce6e2; border-radius: 11px; }
.template-button-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.template-button-row-head strong { font-size: 10px; }
.template-button-row-head button { display: grid; place-items: center; width: 25px; height: 25px; color: var(--red); background: var(--red-soft); border: 0; border-radius: 7px; cursor: pointer; }
.template-button-fields { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; }
.template-button-row .field { margin-bottom: 10px; }
.template-button-row .field:last-child { margin-bottom: 0; }
.template-button-row .field label { font-size: 9px; }
.template-button-row .field input, .template-button-row .field select { padding: 9px 10px; font-size: 11px; }
.button-limit-note { margin-top: 10px; color: var(--muted); font-size: 9px; text-align: right; }
.add-template-button:disabled { color: #8d9996; background: #f0f3f1; cursor: not-allowed; transform: none; }
.builder-submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; background: #e8f4ef; border: 1px solid #cfe5dc; border-radius: 14px; }
.builder-submit-bar > div:first-child strong, .builder-submit-bar > div:first-child span { display: block; }
.builder-submit-bar > div:first-child strong { margin-bottom: 3px; font-size: 11px; }
.builder-submit-bar > div:first-child span { color: var(--muted); font-size: 9px; }
.builder-submit-bar > div:last-child { display: flex; gap: 8px; }
.submit-template { min-width: 145px; }
.submit-template:disabled { opacity: .7; cursor: wait; transform: none; }

.template-preview-column { min-width: 0; }
.template-preview-sticky { position: sticky; top: 94px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 13px; }
.preview-heading .kicker { margin-bottom: 4px; }
.preview-heading h2 { font-size: 17px; }
.live-preview-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--green-800); background: var(--green-100); border-radius: 999px; font-size: 9px; font-weight: 850; }
.live-preview-chip i { width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; box-shadow: 0 0 0 3px rgba(26,174,131,.13); }
.phone-preview { position: relative; overflow: hidden; width: 100%; min-height: 590px; padding: 12px 9px 13px; background: #111b1e; border: 1px solid #283538; border-radius: 30px; box-shadow: 0 24px 55px rgba(8,47,42,.2); }
.phone-speaker { width: 62px; height: 5px; margin: 0 auto 9px; background: #283538; border-radius: 999px; }
.whatsapp-bar { display: flex; align-items: center; gap: 8px; height: 55px; padding: 6px 10px; color: white; background: #075e54; border-radius: 15px 15px 0 0; }
.wa-back { font-size: 24px; line-height: 1; }
.wa-avatar { display: grid; place-items: center; width: 34px; height: 34px; color: #075e54; background: #e2f3ed; border-radius: 50%; font-size: 12px; font-weight: 900; }
.wa-business { min-width: 0; flex: 1; }
.wa-business strong, .wa-business small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-business strong { font-size: 11px; }
.wa-business small { color: #b7d5cf; font-size: 8px; }
.wa-actions { letter-spacing: 7px; font-size: 15px; white-space: nowrap; }
.whatsapp-chat { min-height: 456px; padding: 17px 13px 30px; background-color: #efeae2; background-image: radial-gradient(rgba(82,76,68,.07) 1px, transparent 1px), radial-gradient(rgba(82,76,68,.04) 1px, transparent 1px); background-position: 0 0, 10px 10px; background-size: 20px 20px; }
.encryption-note { width: fit-content; max-width: 90%; margin: 0 auto 12px; padding: 5px 9px; color: #856f3c; background: #fff7d8; border-radius: 6px; font-size: 7px; text-align: center; }
.chat-date { width: fit-content; margin: 0 auto 15px; padding: 5px 9px; color: #5c7774; background: #e2f0f1; border-radius: 6px; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: 7px; font-weight: 700; }
.message-bubble { position: relative; width: min(88%, 310px); min-height: 56px; padding: 10px 12px 19px; color: #202a28; background: white; border-radius: 2px 9px 9px 9px; box-shadow: 0 1px 2px rgba(0,0,0,.13); font-size: 11px; line-height: 1.48; overflow-wrap: anywhere; }
.message-bubble::before { content: ""; position: absolute; top: 0; left: -8px; border-top: 9px solid white; border-left: 9px solid transparent; }
.preview-message-header { display: block; margin-bottom: 5px; font-size: 12px; }
.preview-message-body { display: block; padding-right: 13px; white-space: pre-wrap; }
.preview-message-footer { display: block; margin-top: 7px; padding-right: 28px; color: #7a8583; font-size: 9px; }
.preview-time { position: absolute; right: 7px; bottom: 5px; color: #8a9592; font-size: 7px; }
.preview-buttons { width: min(88%, 310px); margin-top: 3px; overflow: hidden; background: white; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.preview-buttons > div { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; color: #0088cc; border-bottom: 1px solid #edf0ef; font-size: 10px; }
.preview-buttons > div:last-child { border-bottom: 0; }
.preview-buttons strong { font-weight: 650; }
.whatsapp-compose { display: flex; align-items: center; gap: 7px; height: 48px; padding: 7px 9px; color: #6f7a78; background: #f0f2f2; border-radius: 0 0 15px 15px; font-size: 15px; }
.whatsapp-compose div { display: flex; align-items: center; flex: 1; height: 33px; padding: 0 12px; color: #9aa3a1; background: white; border-radius: 999px; font-size: 9px; }
.whatsapp-compose b { display: grid; place-items: center; width: 33px; height: 33px; color: white; background: #00a884; border-radius: 50%; font-size: 12px; }
.phone-home { width: 90px; height: 4px; margin: 10px auto 0; background: #536064; border-radius: 999px; }
.preview-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-top: 14px; background: var(--line); border: 1px solid var(--line); border-radius: 11px; }
.preview-summary > div { min-width: 0; padding: 10px; background: white; text-align: center; }
.preview-summary span, .preview-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-summary span { margin-bottom: 3px; color: var(--muted); font-size: 7px; text-transform: uppercase; }
.preview-summary strong { font-size: 9px; }
.preview-tip { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 12px; background: var(--gold-soft); border: 1px solid #f0dcae; border-radius: 10px; }
.preview-tip > span { font-size: 13px; }
.preview-tip p { margin: 0; color: #735f36; font-size: 9px; line-height: 1.45; }
.preview-tip strong { color: #70541f; }

@media (max-width: 1180px) {
    .template-builder-layout { grid-template-columns: 1fr; }
    .template-preview-sticky { position: static; display: grid; grid-template-columns: minmax(300px, 390px) 1fr; gap: 16px 22px; align-items: start; }
    .preview-heading { grid-column: 1 / -1; }
    .phone-preview { grid-row: 2 / span 3; }
    .preview-summary, .preview-tip { margin-top: 0; }
}

@media (max-width: 720px) {
    .template-page-heading { align-items: stretch; flex-direction: column; }
    .review-chip { align-self: flex-start; }
    .template-preview-sticky { display: block; }
    .phone-preview { width: min(100%, 390px); margin: 0 auto; }
    .preview-summary, .preview-tip { margin-top: 12px; }
    .builder-submit-bar { align-items: stretch; flex-direction: column; }
    .builder-submit-bar > div:last-child { justify-content: flex-end; }
}

@media (max-width: 560px) {
    .builder-card-head { align-items: flex-start; padding: 16px; }
    .builder-card-head .add-template-button { margin-left: auto; white-space: nowrap; }
    .builder-card-head p { display: none; }
    .builder-card-body { padding: 18px 16px; }
    .category-options, .variable-example-grid, .template-button-fields { grid-template-columns: 1fr; }
    .category-option { min-height: 72px; }
    .field-compact { max-width: none; }
    .builder-submit-bar > div:last-child { flex-direction: column-reverse; }
    .builder-submit-bar .button { width: 100%; }
    .review-chip { font-size: 9px; }
    .phone-preview { min-height: 560px; border-radius: 24px; }
    .whatsapp-chat { min-height: 427px; }
}

/* WhatsApp-style conversation workspace */
.content.conversation-content { max-width: none; height: calc(100vh - 72px); min-height: 560px; padding: 0; overflow: hidden; }
.conversation-workspace-page { position: relative; display: grid; grid-template-columns: 310px minmax(420px, 1fr) 330px; width: 100%; height: 100%; color: #111b21; background: #f0f2f5; overflow: hidden; }
.conversation-list-pane, .conversation-details-pane, .chat-pane { min-width: 0; min-height: 0; }
.conversation-list-pane { display: flex; flex-direction: column; background: #fff; border-right: 1px solid #d9e0e3; z-index: 2; }
.conversation-list-head { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 14px 18px 10px 21px; }
.conversation-eyebrow { display: block; margin-bottom: 2px; color: #008069; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.conversation-list-head h1 { margin: 0; color: #111b21; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; }
.conversation-list-head h1 span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 4px; color: #008069; background: #d9fdd3; border-radius: 999px; font-size: 10px; vertical-align: 3px; }
.round-action { display: grid; place-items: center; width: 38px; height: 38px; color: #54656f; border-radius: 50%; font-size: 21px; transition: background .15s; }
.round-action:hover { background: #f0f2f5; }
.round-action.primary { color: white; background: #00a884; box-shadow: 0 6px 16px rgba(0,168,132,.22); }
.round-action.primary:hover { background: #008f72; }
.conversation-search { display: flex; align-items: center; gap: 18px; height: 38px; margin: 0 12px 8px; padding: 0 14px; color: #54656f; background: #f0f2f5; border-radius: 8px; }
.conversation-search:focus-within { box-shadow: inset 0 0 0 1px #cbd7d5; }
.conversation-search > span { font-size: 21px; line-height: 1; transform: rotate(-15deg); }
.conversation-search input { min-width: 0; flex: 1; color: #3b4a54; background: transparent; border: 0; outline: 0; font-size: 11px; }
.conversation-search input::placeholder { color: #667781; }
.conversation-search-form { display: flex; align-items: stretch; gap: 6px; padding: 0 12px 8px; }
.conversation-search-form .conversation-search { min-width: 0; flex: 1; margin: 0; }
.conversation-search-form > button { flex: 0 0 38px; width: 38px; color: #fff; background: #008069; border: 0; border-radius: 8px; font-size: 17px; cursor: pointer; }
.conversation-search-form > button:hover { background: #006f5b; }
.conversation-filters { display: flex; gap: 6px; padding: 2px 12px 9px; border-bottom: 1px solid #eef1f2; }
.conversation-filters a { padding: 6px 11px; color: #54656f; background: #f0f2f5; border: 0; border-radius: 999px; font-size: 10px; font-weight: 700; cursor: pointer; }
.conversation-filters a:hover { background: #e7ebed; }
.conversation-filters a.active { color: #008069; background: #e7fce9; }
.conversation-list { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c7cdd0 transparent; }
.conversation-list-item { display: flex; align-items: center; min-height: 71px; padding-left: 13px; background: #fff; }
.conversation-list-item:hover { background: #f5f6f6; }
.conversation-list-item.active { background: #f0f2f5; }
.contact-avatar { display: grid; place-items: center; flex: 0 0 47px; width: 47px; height: 47px; color: #fff; background: #6a8893; border-radius: 50%; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.contact-avatar.avatar-0 { background: linear-gradient(145deg, #2f80a0, #65aabd); }
.contact-avatar.avatar-1 { background: linear-gradient(145deg, #7b6baa, #9a8bc7); }
.contact-avatar.avatar-2 { background: linear-gradient(145deg, #b2763d, #d99d5e); }
.contact-avatar.avatar-3 { background: linear-gradient(145deg, #257b6d, #50aa91); }
.contact-avatar.avatar-4 { background: linear-gradient(145deg, #a64e68, #cd7991); }
.conversation-list-copy { min-width: 0; align-self: stretch; flex: 1; padding: 13px 13px 10px 12px; border-bottom: 1px solid #eef1f2; }
.conversation-list-title, .conversation-list-preview { display: flex; align-items: center; min-width: 0; }
.conversation-list-title strong { min-width: 0; flex: 1; overflow: hidden; color: #111b21; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list-title time { margin-left: 8px; color: #667781; font-size: 9px; }
.conversation-list-preview { gap: 4px; margin-top: 5px; color: #667781; }
.conversation-list-preview > span { min-width: 0; flex: 1; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list-preview b { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; color: #008069; background: #d9fdd3; border-radius: 999px; font-size: 8px; }
.delivery-ticks { color: #7a8a93; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: -3px; white-space: nowrap; }
.delivery-ticks.read { color: #53bdeb; }
.conversation-empty, .conversation-no-results { padding: 55px 24px; color: #667781; text-align: center; }
.conversation-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 15px; color: #008069; background: #e7fce9; border-radius: 50%; font-size: 20px; }
.conversation-empty strong { display: block; color: #111b21; font-size: 13px; }
.conversation-empty p { margin: 6px 0 18px; font-size: 10px; }
.conversation-no-results { font-size: 11px; }
.conversation-pager { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; padding: 5px 12px; color: #667781; background: #fff; border-top: 1px solid #eef1f2; font-size: 9px; }
.conversation-pager a { display: grid; place-items: center; width: 29px; height: 29px; color: #008069; background: #e7fce9; border-radius: 50%; font-size: 18px; }
.conversation-pager a.disabled { opacity: .4; pointer-events: none; }

.chat-pane { display: flex; flex-direction: column; position: relative; background: #efeae2; }
.chat-header { display: flex; align-items: center; gap: 12px; flex: 0 0 62px; min-height: 62px; padding: 8px 14px; background: #f0f2f5; border-bottom: 1px solid #dfe3e5; z-index: 3; }
.chat-header .contact-avatar { flex-basis: 40px; width: 40px; height: 40px; font-size: 12px; }
.chat-contact { min-width: 0; flex: 1; }
.chat-contact strong, .chat-contact span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact strong { color: #111b21; font-size: 13px; font-weight: 600; }
.chat-contact span { margin-top: 2px; color: #667781; font-size: 9px; }
.chat-head-action, .mobile-pane-action { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; color: #54656f; background: transparent; border: 0; border-radius: 50%; font-size: 20px; cursor: pointer; }
.chat-head-action:hover, .mobile-pane-action:hover { background: #e1e5e7; }
.mobile-pane-action { display: none; font-size: 31px; }
.chat-message-search { display: flex; align-items: center; gap: 12px; flex: 0 0 46px; padding: 6px 13px; color: #54656f; background: #fff; border-bottom: 1px solid #dfe3e5; z-index: 2; }
.chat-message-search input { min-width: 0; flex: 1; padding: 8px 10px; color: #111b21; background: #f0f2f5; border: 0; border-radius: 7px; outline: 0; font-size: 11px; }
.chat-message-search button { width: 29px; height: 29px; color: #54656f; background: transparent; border: 0; border-radius: 50%; font-size: 19px; cursor: pointer; }
.chat-canvas { position: relative; min-height: 0; flex: 1; padding: 15px clamp(20px, 6vw, 72px) 20px; overflow-y: auto; background-color: #efeae2; background-image: radial-gradient(rgba(68,61,53,.055) 1px, transparent 1.2px), radial-gradient(rgba(68,61,53,.035) 1px, transparent 1.2px); background-position: 0 0, 11px 11px; background-size: 22px 22px; scrollbar-width: thin; scrollbar-color: #aeb6b8 transparent; }
.history-limit-note { width: fit-content; margin: 0 auto 12px; padding: 6px 10px; color: #5f583e; background: rgba(255,248,215,.92); border-radius: 7px; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-size: 8px; text-align: center; }
.chat-canvas::before { content: ""; position: fixed; pointer-events: none; opacity: .05; }
.chat-encryption-note { width: fit-content; max-width: 440px; margin: 0 auto 13px; padding: 6px 11px; color: #7a6a3c; background: #ffeecd; border-radius: 7px; box-shadow: 0 1px 1px rgba(17,27,33,.08); font-size: 8px; text-align: center; }
.chat-day-separator { display: flex; justify-content: center; margin: 13px 0; }
.chat-day-separator span { padding: 6px 11px; color: #54656f; background: #fff; border-radius: 7px; box-shadow: 0 1px 1px rgba(17,27,33,.12); font-size: 8px; font-weight: 650; text-transform: uppercase; }
.chat-message-row { display: flex; width: 100%; margin: 3px 0; padding: 0; background: transparent; border: 0; text-align: left; cursor: pointer; }
.chat-message-row.outbound { justify-content: flex-end; }
.chat-message-row.inbound { justify-content: flex-start; }
.inbox-bubble { position: relative; display: block; min-width: 115px; max-width: min(72%, 530px); padding: 7px 9px 6px; color: #111b21; background: #fff; border-radius: 7px; box-shadow: 0 1px 1px rgba(17,27,33,.14); font-size: 11px; line-height: 1.42; overflow-wrap: anywhere; transition: box-shadow .15s, transform .15s; }
.chat-message-row.outbound .inbox-bubble { background: #d9fdd3; }
.chat-message-row:hover .inbox-bubble { box-shadow: 0 2px 5px rgba(17,27,33,.19); }
.chat-message-row.selected .inbox-bubble { box-shadow: 0 0 0 2px rgba(0,128,105,.45), 0 2px 5px rgba(17,27,33,.17); }
.bubble-type { display: block; margin: -1px 0 5px; color: #008069; font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.bubble-content { white-space: pre-wrap; }
.bubble-meta { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 -2px 13px; color: #667781; font-size: 8px; }
.bubble-meta .delivery-ticks { font-size: 8px; }
.bubble-failed { display: block; clear: both; margin-top: 5px; color: #d43b3b; font-size: 8px; font-weight: 700; }
.message-no-results { width: fit-content; margin: 35px auto; padding: 9px 14px; color: #54656f; background: #fff; border-radius: 8px; font-size: 10px; box-shadow: 0 1px 2px rgba(17,27,33,.12); }
.conversation-compose { display: flex; align-items: center; gap: 12px; flex: 0 0 58px; min-height: 58px; padding: 9px 13px; color: #667781; background: #f0f2f5; border-top: 1px solid #dfe3e5; }
.compose-placeholder { min-width: 0; flex: 1; padding: 11px 15px; overflow: hidden; color: #667781; background: #fff; border-radius: 9px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-compose b { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; color: #fff; background: #00a884; border-radius: 50%; font-size: 12px; }
.chat-welcome { display: grid; place-items: center; align-content: center; height: 100%; padding: 35px; background: #f8fafa; border-bottom: 5px solid #25d366; text-align: center; }
.welcome-mark { display: grid; place-items: center; width: 105px; height: 105px; margin-bottom: 25px; color: #fff; background: linear-gradient(145deg, #25d366, #008069); border-radius: 50% 50% 50% 18%; font-size: 43px; font-weight: 800; box-shadow: 0 18px 50px rgba(0,128,105,.17); }
.chat-welcome h2 { margin-bottom: 8px; color: #41525d; font-size: 25px; font-weight: 300; }
.chat-welcome p { max-width: 510px; margin-bottom: 24px; color: #667781; font-size: 11px; }
.chat-welcome small { color: #8696a0; font-size: 9px; }

.conversation-details-pane { background: #f0f2f5; border-left: 1px solid #d9e0e3; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c7cdd0 transparent; z-index: 4; }
.details-head { display: flex; align-items: center; gap: 16px; min-height: 62px; padding: 9px 14px; background: #f0f2f5; border-bottom: 1px solid #dfe3e5; }
.details-head button { display: grid; place-items: center; width: 34px; height: 34px; color: #54656f; background: transparent; border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; }
.details-head button:hover { background: #e1e5e7; }
.details-head strong { color: #111b21; font-size: 13px; font-weight: 600; }
.contact-profile-card { padding: 25px 20px 22px; background: #fff; text-align: center; }
.contact-avatar.large { width: 76px; height: 76px; margin: 0 auto 13px; font-size: 22px; }
.contact-profile-card h2 { margin-bottom: 3px; color: #111b21; font-size: 18px; font-weight: 500; }
.contact-profile-card p { margin-bottom: 10px; color: #667781; font-size: 11px; }
.business-label { display: inline-flex; padding: 5px 9px; color: #008069; background: #e7fce9; border-radius: 999px; font-size: 8px; font-weight: 700; }
.detail-section { margin-top: 9px; padding: 16px; background: #fff; }
.detail-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.detail-section-title strong { color: #008069; font-size: 10px; font-weight: 650; }
.detail-section-title span { color: #8696a0; font-size: 8px; }
.conversation-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.conversation-stat-grid div { padding: 9px 5px; background: #f6f8f8; border-radius: 8px; text-align: center; }
.conversation-stat-grid strong, .conversation-stat-grid span { display: block; }
.conversation-stat-grid strong { color: #111b21; font-size: 15px; }
.conversation-stat-grid span { margin-top: 2px; color: #667781; font-size: 7px; text-transform: uppercase; }
.contact-data-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid #eef1f2; font-size: 8px; }
.contact-data-row span { color: #8696a0; }
.contact-data-row strong { max-width: 67%; color: #3b4a54; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.message-status-card { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px; background: #e7fce9; border: 1px solid #c9efcf; border-radius: 9px; }
.message-status-card > span { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: #00a884; border-radius: 50%; font-size: 13px; font-weight: 900; }
.message-status-card small, .message-status-card strong { display: block; }
.message-status-card small { color: #667781; font-size: 7px; text-transform: uppercase; }
.message-status-card strong { margin-top: 2px; color: #006c58; font-size: 11px; text-transform: capitalize; }
.message-status-card.pending { background: #fff7df; border-color: #f0dfa9; }
.message-status-card.pending > span { background: #c58a21; }
.message-status-card.pending strong { color: #8b6118; }
.message-status-card.danger { background: #fff0ef; border-color: #f4cecb; }
.message-status-card.danger > span { background: #d64040; }
.message-status-card.danger strong { color: #b32c2c; }
.delivery-journey { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; margin: 5px 0 16px; }
.delivery-journey::before { content: ""; position: absolute; left: 17%; right: 17%; top: 11px; height: 1px; background: #d8dfe1; }
.delivery-journey div { position: relative; display: grid; place-items: center; gap: 4px; color: #a2adb3; font-size: 7px; text-align: center; z-index: 1; }
.delivery-journey i { display: grid; place-items: center; width: 23px; height: 23px; color: #a2adb3; background: #f0f2f5; border: 2px solid #fff; border-radius: 50%; font-size: 8px; font-style: normal; }
.delivery-journey div.done { color: #008069; }
.delivery-journey div.done i { color: #fff; background: #00a884; }
.message-detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin: 0; }
.message-detail-list > div { min-width: 0; padding: 8px 0; border-top: 1px solid #eef1f2; }
.message-detail-list > div.full { grid-column: 1 / -1; }
.message-detail-list dt { margin-bottom: 3px; color: #8696a0; font-size: 7px; font-weight: 650; text-transform: uppercase; }
.message-detail-list dd { margin: 0; color: #3b4a54; font-size: 9px; overflow-wrap: anywhere; }
.copy-value { display: flex; align-items: center; gap: 7px; }
.copy-value code { min-width: 0; flex: 1; padding: 5px 6px; overflow: hidden; color: #3b4a54; background: #f5f7f7; border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.copy-value button { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; color: #008069; background: #e7fce9; border: 0; border-radius: 6px; cursor: pointer; }
.message-detail-content { max-height: 90px; padding: 7px 8px; overflow-y: auto; background: #f5f7f7; border-radius: 6px; line-height: 1.45; white-space: pre-wrap; }
.message-error-card { margin-top: 10px; padding: 10px; color: #a12d2d; background: #fff0ef; border: 1px solid #f4cecb; border-radius: 8px; }
.message-error-card strong, .message-error-card span { display: block; }
.message-error-card strong { margin-bottom: 3px; font-size: 8px; }
.message-error-card span { font-size: 8px; line-height: 1.4; }
.message-error-card.is-hidden { display: none; }
.details-empty { display: grid; place-items: center; align-content: center; height: calc(100% - 62px); color: #8696a0; text-align: center; }
.details-empty span { font-size: 28px; }
.details-empty p { margin-top: 7px; font-size: 10px; }

@media (max-width: 1320px) {
    .conversation-workspace-page { grid-template-columns: 310px minmax(420px, 1fr); }
    .conversation-details-pane { position: absolute; inset: 0 0 0 auto; width: min(350px, 92%); transform: translateX(102%); box-shadow: -16px 0 40px rgba(17,27,33,.16); transition: transform .2s ease; }
    .conversation-workspace-page.details-open .conversation-details-pane { transform: translateX(0); }
}

@media (max-width: 820px) {
    .content.conversation-content { height: calc(100dvh - 72px); min-height: 480px; padding: 0; }
    .conversation-workspace-page { grid-template-columns: 290px minmax(390px, 1fr); }
}

@media (max-width: 700px) {
    .conversation-workspace-page { display: block; }
    .conversation-list-pane, .chat-pane { width: 100%; height: 100%; }
    .chat-pane { display: none; }
    .conversation-workspace-page.mobile-chat-open .conversation-list-pane { display: none; }
    .conversation-workspace-page.mobile-chat-open .chat-pane { display: flex; }
    .mobile-pane-action { display: grid; }
    .chat-canvas { padding-inline: 16px; }
    .inbox-bubble { max-width: 86%; }
    .conversation-details-pane { width: min(350px, 100%); }
}

@media (max-width: 480px) {
    .topbar-action { font-size: 0; }
    .topbar-action::after { content: "+"; font-size: 20px; }
    .conversation-list-head { min-height: 68px; }
    .chat-header { padding-inline: 8px; }
    .chat-head-action { flex-basis: 31px; width: 31px; }
    .compose-placeholder { padding-inline: 11px; }
}

/* Multi-school provider API management */
.provider-page-heading p, .provider-create-heading p { max-width: 760px; }
.provider-stat-grid .money-stat { font-size: 28px; }
.provider-list-panel { overflow: hidden; }
.provider-search-form { display: flex; align-items: center; gap: 8px; }
.provider-table-search { display: flex; align-items: center; gap: 8px; width: min(300px, 100%); padding: 0 11px; color: var(--muted); background: #f5f8f6; border: 1px solid var(--line); border-radius: 9px; }
.provider-table-search input { min-width: 0; flex: 1; padding: 9px 0; background: transparent; border: 0; outline: 0; font-size: 11px; }
.provider-table td { padding-block: 14px; }
.provider-school-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.provider-school-cell > span { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; color: #fff; background: linear-gradient(145deg, #168c72, #52c8a4); border-radius: 10px; font-size: 13px; font-weight: 900; }
.provider-key-prefix { display: block; width: fit-content; padding: 5px 7px; color: #36554d; background: #f2f6f4; border: 1px solid #e1e9e5; border-radius: 5px; font-size: 9px; }
.provider-balance { color: var(--green-800); font-size: 15px; }
.provider-no-results { padding: 38px; color: var(--muted); font-size: 12px; text-align: center; }

.provider-create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.provider-create-form { padding: 0; overflow: hidden; }
.provider-create-form form { max-width: none; }
.provider-form-section { padding: 25px 27px 7px; border-bottom: 1px solid var(--line); }
.provider-form-section-head { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.provider-form-section-head > span { display: grid; place-items: center; width: 29px; height: 29px; color: var(--green-800); background: var(--green-100); border-radius: 9px; font-size: 10px; font-weight: 900; }
.provider-form-section-head strong, .provider-form-section-head small { display: block; }
.provider-form-section-head strong { font-size: 13px; }
.provider-form-section-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.provider-form-section .field > span[data-valmsg-for] { display: block; margin-top: 5px; color: var(--red); font-size: 9px; }
.money-field > div { display: flex; align-items: center; overflow: hidden; background: #fbfcfb; border: 1px solid #cedbd6; border-radius: 9px; }
.money-field > div:focus-within { background: #fff; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.11); }
.money-field > div > span { padding-left: 12px; color: var(--green-800); font-size: 13px; font-weight: 800; }
.money-field > div input { border: 0; box-shadow: none !important; }
.provider-create-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 27px; background: #f5faf7; }
.provider-create-submit strong, .provider-create-submit span { display: block; }
.provider-create-submit strong { font-size: 11px; }
.provider-create-submit span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.provider-create-guide { display: flex; flex-direction: column; gap: 14px; }
.provider-guide-card { padding: 25px; background: linear-gradient(155deg, #fff 50%, #eff9f5); }
.provider-guide-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; color: #fff; background: linear-gradient(145deg, var(--green-500), var(--green-800)); border-radius: 14px; font-size: 20px; box-shadow: 0 10px 25px rgba(22,140,114,.2); }
.provider-guide-card h2 { margin-bottom: 22px; font-size: 18px; }
.provider-guide-card ol { margin: 0; padding: 0; list-style: none; }
.provider-guide-card li { display: flex; gap: 10px; position: relative; padding-bottom: 18px; }
.provider-guide-card li:not(:last-child)::after { content: ""; position: absolute; top: 27px; bottom: 4px; left: 12px; width: 1px; background: #cfe2da; }
.provider-guide-card li > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; color: var(--green-800); background: var(--green-100); border-radius: 50%; font-size: 8px; font-weight: 900; z-index: 1; }
.provider-guide-card li strong, .provider-guide-card li small { display: block; }
.provider-guide-card li strong { font-size: 10px; }
.provider-guide-card li small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.provider-security-note { display: flex; gap: 10px; padding: 15px; color: #70541f; background: var(--gold-soft); border: 1px solid #efdba9; border-radius: 12px; }
.provider-security-note strong { font-size: 10px; }
.provider-security-note p { margin: 3px 0 0; color: #786641; font-size: 8px; line-height: 1.45; }

.provider-back-link { display: block; width: fit-content; margin-bottom: 13px; color: var(--green-600); font-size: 10px; font-weight: 800; }
.provider-detail-actions { display: flex; align-items: center; gap: 9px; }
.provider-detail-actions form { margin: 0; }
.provider-api-state { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.provider-api-state i { width: 7px; height: 7px; border-radius: 50%; }
.provider-api-state.active { color: var(--green-800); background: var(--green-100); }
.provider-api-state.active i { background: var(--green-500); box-shadow: 0 0 0 3px rgba(26,174,131,.13); }
.provider-api-state.paused { color: var(--red); background: var(--red-soft); }
.provider-api-state.paused i { background: var(--red); }
.provider-secret-banner { display: grid; grid-template-columns: auto minmax(280px, .8fr); align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 17px 20px; color: #5f4a20; background: #fff7dd; border: 1px solid #efd798; border-radius: 14px; box-shadow: 0 8px 24px rgba(183,121,31,.07); }
.provider-secret-banner > div:first-child { display: flex; align-items: center; gap: 12px; }
.provider-secret-banner > div:first-child > span { font-size: 22px; }
.provider-secret-banner strong, .provider-secret-banner p { display: block; margin: 0; }
.provider-secret-banner strong { font-size: 12px; }
.provider-secret-banner p { margin-top: 2px; color: #816e47; font-size: 9px; }
.provider-secret-value { display: flex; align-items: center; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e6d29c; border-radius: 9px; }
.provider-secret-value code { min-width: 0; flex: 1; padding: 11px; overflow: hidden; color: #453b27; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.provider-secret-value button, .provider-endpoint-block button { align-self: stretch; padding: 0 13px; color: #fff; background: var(--green-800); border: 0; font-size: 9px; font-weight: 800; cursor: pointer; }
.provider-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }
.provider-detail-stats article { padding: 17px 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.provider-detail-stats span, .provider-detail-stats strong, .provider-detail-stats small { display: block; }
.provider-detail-stats span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.provider-detail-stats strong { margin: 7px 0 5px; color: var(--ink); font-size: 23px; letter-spacing: -.035em; }
.provider-detail-stats small { color: var(--muted); font-size: 8px; }
.provider-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 20px; align-items: start; }
.provider-detail-main, .provider-detail-sidebar { display: flex; min-width: 0; flex-direction: column; gap: 20px; }
.provider-integration-card, .provider-activity-card, .provider-ledger-card { overflow: hidden; }
.provider-endpoint-block { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 14px; padding: 20px 23px; }
.provider-endpoint-block > label { align-self: center; color: var(--muted); font-size: 9px; font-weight: 800; }
.provider-endpoint-block > div { display: flex; min-width: 0; overflow: hidden; background: #f5f8f6; border: 1px solid var(--line); border-radius: 8px; }
.provider-endpoint-block code { min-width: 0; flex: 1; padding: 10px 11px; overflow: hidden; color: #314d46; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.provider-code-tabs { display: flex; align-items: center; justify-content: space-between; padding: 11px 17px; color: #d9eee7; background: #123b35; border-bottom: 1px solid #244f48; font-size: 9px; font-weight: 800; }
.provider-code-tabs small { color: #82aaa0; font-size: 8px; }
.provider-code-sample { margin: 0; padding: 18px 20px; overflow-x: auto; color: #bce8d8; background: #092f2a; font-size: 9px; line-height: 1.7; }
.provider-api-note { display: flex; gap: 9px; padding: 13px 18px; color: #4f665f; background: #f4f8f6; border-top: 1px solid var(--line); }
.provider-api-note p { margin: 0; color: inherit; font-size: 8px; }
.provider-record-count { color: var(--muted); font-size: 9px; }
.id-preview { max-width: 150px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.compact-empty { padding-block: 30px; }
.ledger-type { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.ledger-type.positive { color: var(--green-800); background: var(--green-100); }
.ledger-type.negative { color: var(--red); background: var(--red-soft); }
.money-positive { color: var(--green-800); font-weight: 800; }
.money-negative { color: var(--red); font-weight: 800; }
.balance-manager-card { padding: 22px; }
.balance-manager-card h2 { font-size: 17px; }
.balance-manager-card > p { margin-bottom: 17px; font-size: 9px; }
.balance-operation { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 15px; padding: 4px; background: #eef3f0; border-radius: 9px; }
.balance-operation label { cursor: pointer; }
.balance-operation input { position: absolute; opacity: 0; pointer-events: none; }
.balance-operation span { display: block; padding: 8px; color: var(--muted); border-radius: 7px; font-size: 9px; font-weight: 800; text-align: center; }
.balance-operation label:has(input:checked) span { color: var(--green-800); background: #fff; box-shadow: 0 2px 7px rgba(16,42,39,.08); }
.provider-account-card { overflow: hidden; }
.provider-account-card dl { margin: 0; padding: 4px 21px 12px; }
.provider-account-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf1ef; }
.provider-account-card dt { color: var(--muted); font-size: 8px; }
.provider-account-card dd { max-width: 65%; margin: 0; color: var(--ink); font-size: 8px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.provider-account-card form { margin: 10px 20px 0; }
.regenerate-warning { display: block; padding: 9px 20px 17px; color: var(--muted); font-size: 7px; text-align: center; }

@media (max-width: 1180px) {
    .provider-create-layout, .provider-detail-layout { grid-template-columns: 1fr; }
    .provider-create-guide { display: grid; grid-template-columns: 1fr 1fr; }
    .provider-security-note { align-self: start; }
    .provider-detail-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .provider-secret-banner { grid-template-columns: 1fr; }
    .provider-detail-stats { grid-template-columns: 1fr 1fr; }
    .provider-detail-sidebar, .provider-create-guide { display: flex; }
    .provider-endpoint-block { grid-template-columns: 1fr; }
    .provider-endpoint-block > label:not(:first-child) { margin-top: 5px; }
}

@media (max-width: 620px) {
    .provider-list-panel .panel-heading { align-items: stretch; flex-direction: column; }
    .provider-search-form, .provider-table-search { width: 100%; }
    .provider-search-form .provider-table-search { flex: 1; }
    .provider-detail-actions { align-items: stretch; flex-direction: column; }
    .provider-detail-actions form .button { width: 100%; }
    .provider-detail-stats { gap: 9px; }
    .provider-detail-stats article { padding: 14px; }
    .provider-detail-stats strong { font-size: 19px; }
    .provider-form-section { padding-inline: 18px; }
    .provider-create-submit { align-items: stretch; flex-direction: column; padding-inline: 18px; }
    .provider-create-submit .button { width: 100%; }
    .provider-secret-value { align-items: stretch; flex-direction: column; }
    .provider-secret-value button { min-height: 34px; }
}
