:root {
    color-scheme: light;
    --app-bg: #f8fafc;
    --app-surface: #ffffff;
    --app-surface-soft: #f1f5f9;
    --app-border: #e2e8f0;
    --app-text: #0f172a;
    --app-muted: #475569;
    --app-subtle: #64748b;
    --app-primary: #059669;
}

html.dark {
    color-scheme: dark;
    --app-bg: #020617;
    --app-surface: #0f172a;
    --app-surface-soft: #1e293b;
    --app-border: #1e293b;
    --app-text: #f8fafc;
    --app-muted: #cbd5e1;
    --app-subtle: #94a3b8;
    --app-primary: #34d399;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
}

button, input, select, textarea {
    font: inherit;
}

button, a, summary {
    -webkit-tap-highlight-color: transparent;
}

.app-sidebar { width: 240px; transition: width .2s ease, transform .2s ease; }
.app-content { transition: padding-left .2s ease; }
.sidebar-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.sidebar-brand { display: flex; min-height: 72px; align-items: center; gap: 8px; border-bottom: 1px solid var(--app-border); padding: 12px; }
.sidebar-brand-link { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; border-radius: 10px; }
.sidebar-logo,.sidebar-footer-mark { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: #10b981; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.02em; }
.sidebar-brand-copy,.sidebar-footer-copy { display: flex; min-width: 0; flex-direction: column; }
.sidebar-brand-copy strong,.sidebar-footer-copy strong { color: var(--app-text); font-size: 14px; line-height: 18px; }
.sidebar-brand-copy small,.sidebar-footer-copy small { overflow: hidden; color: var(--app-subtle); font-size: 10px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-collapse,.sidebar-mobile-close { display: inline-grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; color: var(--app-subtle); transition: background-color .15s ease, color .15s ease; }
.sidebar-collapse:hover,.sidebar-mobile-close:hover,.sidebar-collapse:focus-visible,.sidebar-mobile-close:focus-visible { background: var(--app-surface-soft); color: var(--app-text); outline: 2px solid rgba(16,185,129,.25); outline-offset: -2px; }
.sidebar-collapse svg,.sidebar-mobile-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-mobile-close { display: none; }
.sidebar-scroll { min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; padding: 12px 10px; scrollbar-width: thin; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-group { display: grid; gap: 3px; }
.sidebar-link,.sidebar-group-toggle { position: relative; display: flex; width: 100%; min-height: 44px; align-items: center; gap: 8px; border-radius: 10px; padding: 4px 8px; color: #475569; font-size: 14px; font-weight: 500; line-height: 20px; text-align: left; transition: background-color .15s ease,color .15s ease,box-shadow .15s ease; }
.sidebar-link:hover,.sidebar-group-toggle:hover,.sidebar-link:focus-visible,.sidebar-group-toggle:focus-visible { background: #f1f5f9; color: #0f172a; outline: 2px solid rgba(16,185,129,.22); outline-offset: -2px; }
.sidebar-link.is-active,.sidebar-group.is-current>.sidebar-group-toggle { background: #ecfdf5; color: #047857; box-shadow: inset 3px 0 0 #10b981; }
.sidebar-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; }
.sidebar-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-chevron { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .18s ease; }
.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron { transform: rotate(180deg); }
.sidebar-submenu { display: grid; gap: 2px; margin: 1px 0 5px 18px; padding-left: 9px; border-left: 1px solid var(--app-border); }
.sidebar-submenu[hidden] { display: none; }
.sidebar-submenu .sidebar-link { min-height: 40px; font-size: 13px; }
.sidebar-submenu .sidebar-icon { width: 30px; height: 30px; flex-basis: 30px; }
.sidebar-submenu .sidebar-icon svg { width: 17px; height: 17px; }
.sidebar-divider { height: 1px; margin: 7px 8px; background: var(--app-border); }
.sidebar-section-label { padding: 10px 10px 5px; color: var(--app-subtle); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-badge { min-width: 19px; height: 19px; border-radius: 10px; padding: 0 5px; background: #ef4444; color: #fff; font-size: 10px; line-height: 19px; text-align: center; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--app-border); padding: 12px 18px; }
.sidebar-footer-mark { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; font-size: 10px; }
.sidebar-tooltip { position: fixed; z-index: 80; pointer-events: none; border-radius: 7px; background: #0f172a; padding: 6px 9px; color: #fff; font-size: 12px; line-height: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.2); }
html.dark .sidebar-link,html.dark .sidebar-group-toggle { color: #cbd5e1; }
html.dark .sidebar-link:hover,html.dark .sidebar-group-toggle:hover,html.dark .sidebar-link:focus-visible,html.dark .sidebar-group-toggle:focus-visible { background: #1e293b; color: #fff; }
html.dark .sidebar-link.is-active,html.dark .sidebar-group.is-current>.sidebar-group-toggle { background: rgba(16,185,129,.12); color: #6ee7b7; }

/* Bridge de contraste para as views funcionais existentes. */
html:not(.dark) .bg-slate-950 { background-color: #f8fafc !important; }
html:not(.dark) .bg-slate-900 { background-color: #ffffff !important; }
html:not(.dark) .bg-slate-800 { background-color: #f1f5f9 !important; }
html:not(.dark) .border-slate-800 { border-color: #e2e8f0 !important; }
html:not(.dark) .border-slate-700 { border-color: #cbd5e1 !important; }
html:not(.dark) .text-slate-100 { color: #0f172a !important; }
html:not(.dark) .text-slate-200 { color: #1e293b !important; }
html:not(.dark) .text-slate-300 { color: #334155 !important; }
html:not(.dark) .text-slate-400 { color: #475569 !important; }
html:not(.dark) .text-slate-500 { color: #64748b !important; }
html:not(.dark) .text-emerald-300,
html:not(.dark) .text-emerald-400 { color: #047857 !important; }
html:not(.dark) .text-amber-200,
html:not(.dark) .text-amber-300 { color: #92400e !important; }
html:not(.dark) .text-rose-300,
html:not(.dark) .text-red-400 { color: #be123c !important; }

/* Consistência visual global inspirada no TailwindAdmin. */
main h1 {
    letter-spacing: -.025em;
    color: #0f172a;
}

html.dark main h1 {
    color: #f8fafc;
}

main table {
    background: transparent;
}

main th {
    font-weight: 600;
    color: #475569;
}

html.dark main th {
    color: #cbd5e1;
}

main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
main select,
main textarea {
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

html.dark main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html.dark main select,
html.dark main textarea {
    color: #f8fafc;
}

main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
main select:focus,
main textarea:focus {
    outline: none;
    border-color: var(--app-primary) !important;
    box-shadow: 0 0 0 3px var(--app-focus, rgba(16, 185, 129, .12));
}

main button,
main a {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease, transform .15s ease;
}

main button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 1023px) {
    .app-sidebar { width: min(300px, calc(100vw - 24px)); }
    #app-sidebar.is-mobile-open {
        display: flex !important;
    }

    .sidebar-collapse { display: none; }
    .sidebar-mobile-close { display: inline-grid; }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Atendimento: controles de 44px e superfícies alinhadas ao tema global. */
.cz-workspace { color: var(--app-text); color-scheme: light dark; min-width: 0; }
.cz-workspace h1 { color: var(--app-text); font-size: 1.5rem; font-weight: 700; }
.cz-workspace h2 { font-size: 1.1rem; font-weight: 600; }
.cz-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.cz-heading p,.cz-meta { color:var(--app-subtle); font-size:12px; }
.cz-heading p { margin-top:4px; color:var(--app-subtle); }
html:not(.dark) .cz-heading h1 { color:var(--app-surface); }
.cz-panel { background:var(--app-surface); border:1px solid var(--app-border); border-radius:16px; min-width:0; }
.cz-panel th { color:var(--app-muted); }
.cz-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:16px; padding:20px; margin-bottom:20px; }
.cz-search { grid-column:span 2; }
.cz-field { display:flex; flex-direction:column; gap:7px; min-width:0; }
.cz-field label { color:var(--app-muted); font-size:12px; font-weight:600; }
main .cz-workspace .cz-field input:not([type=hidden]),main .cz-workspace .cz-field select,main .cz-workspace .cz-field textarea { width:100%; min-width:0; border:1px solid var(--app-border); border-radius:8px; padding:0 12px; background:var(--app-bg); color:var(--app-text); height:44px; font-size:13px; }
main .cz-field textarea { height:auto; min-height:88px; padding:10px 12px; resize:vertical; }
main .cz-field input[type=file] { padding:9px; }
.cz-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border:1px solid var(--app-border); border-radius:8px; font-size:13px; font-weight:600; color:var(--app-text); background:var(--app-surface-soft); white-space:nowrap; }
.cz-button:hover { background:var(--app-border); }
.cz-button.cz-primary { background:#34d399; border-color:#34d399; color:#022c22; }
.cz-button.cz-danger { color:#fecaca; border-color:#7f1d1d; background:#450a0a; }
.cz-filter-actions { display:flex; gap:8px; }
.cz-layout { display:grid; grid-template-columns:clamp(250px,var(--conversation-list-width,300px),42vw) minmax(0,1fr); gap:20px; align-items:start; }
.cz-queue { overflow:hidden; max-height:850px; overflow-y:auto; }
.cz-section-title { display:flex; justify-content:space-between; padding:18px; font-weight:600; border-bottom:1px solid var(--app-border); }
.cz-queue-item { display:block; padding:16px 18px; border-bottom:1px solid var(--app-surface-soft); }
.cz-queue-item:hover,.cz-queue-item.is-selected { background:var(--app-surface-soft); }
.cz-queue-item.is-selected { box-shadow:inset 3px 0 #34d399; }
.cz-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cz-row strong { min-width:0; overflow-wrap:anywhere; }
.cz-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--app-subtle); font-size:13px; margin:8px 0; }
.cz-unread { flex-shrink:0; border-radius:20px; padding:2px 7px; background:#34d399; color:#022c22; font-size:11px; font-weight:700; }
.cz-badge { display:inline-flex; padding:3px 8px; border-radius:6px; background:var(--app-surface-soft); color:var(--app-muted); font-size:11px; }
.cz-conversation { overflow:hidden; }
.cz-conversation-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:20px; border-bottom:1px solid var(--app-border); }
.cz-conversation-header .cz-badge { margin-top:8px; }
.cz-tag-strip { display:flex; flex-wrap:wrap; gap:6px; padding:12px 20px 0; }
.cz-messages { display:flex; flex-direction:column; gap:12px; height:420px; overflow-y:auto; padding:20px; background:var(--app-bg); }
.cz-message { max-width:85%; align-self:flex-start; padding:12px 16px; border-radius:14px 14px 14px 4px; background:var(--app-surface-soft); overflow-wrap:anywhere; }
.cz-outbound { align-self:flex-end; background:#064e3b; border-radius:14px 14px 4px 14px; }
.cz-message-body { white-space:normal; font-size:14px; }
.cz-message footer { font-size:10px; color:var(--app-subtle); margin-top:7px; }
.cz-attachment { display:block; color:#6ee7b7; font-size:12px; text-decoration:underline; margin-bottom:6px; }
.cz-composer { padding:20px; border-top:1px solid var(--app-border); display:grid; gap:12px; }
.cz-composer-actions { display:flex; align-items:end; gap:12px; }
.cz-composer-actions .cz-field { flex:1; }
.cz-tools { border-top:1px solid var(--app-border); }
.cz-tool { padding:16px 20px; border-bottom:1px solid var(--app-surface-soft); }
.cz-tool summary { cursor:pointer; font-size:13px; font-weight:600; }
.cz-tool[open] summary { margin-bottom:16px; }
.cz-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.cz-align-end { justify-content:flex-end; align-items:flex-start; }
.cz-stack { display:grid; gap:16px; }
.cz-stack > .cz-button { justify-self:start; }
.cz-note { background:#1c1917; border-left:2px solid #fbbf24; padding:12px; margin:12px 0; border-radius:6px; font-size:13px; overflow-wrap:anywhere; }
.cz-note small,.cz-audit small { display:block; margin-top:6px; color:var(--app-subtle); font-size:11px; }
.cz-audit { padding:12px 0; border-bottom:1px solid var(--app-surface-soft); font-size:12px; }
.cz-checkbox-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; font-size:13px; }
.cz-checkbox-grid label { display:flex; align-items:center; gap:8px; }
.cz-notice { background:#064e3b; color:#d1fae5; border:1px solid #065f46; padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:13px; }
.cz-error { background:#450a0a; color:#fecaca; border-color:#7f1d1d; }
.cz-empty { color:var(--app-subtle); padding:24px; font-size:13px; }
.cz-no-selection { display:grid; min-height:420px; place-items:center; }
.cz-padding { padding:20px; margin-bottom:20px; }
.cz-reason { padding:12px 0; border-bottom:1px solid var(--app-border); }
@media(max-width:1100px) { .cz-layout { grid-template-columns:250px minmax(0,1fr); } .cz-composer-actions { flex-wrap:wrap; } .cz-composer-actions .cz-field { flex-basis:100%; } }
@media(max-width:767px) { .cz-heading { align-items:flex-start; flex-direction:column; } .cz-filters { grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px; } .cz-layout { grid-template-columns:1fr; } .cz-queue { max-height:280px; } .cz-form-grid { grid-template-columns:1fr; } .cz-message { max-width:95%; } .cz-conversation-header,.cz-composer,.cz-tool { padding:16px; } .cz-messages { padding:16px; height:380px; } }
.cz-admin-layout { display:grid; grid-template-columns:minmax(230px,1fr) minmax(0,2fr); gap:24px; align-items:start; }
.cz-hours-day { border:1px solid var(--app-border); border-radius:8px; padding:12px; }
.cz-hours-day legend { padding:0 6px; font-size:13px; font-weight:600; }
.cz-hours-period { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media(max-width:1100px) { .cz-admin-layout { grid-template-columns:1fr; } }

.cz-channel-choice { display:flex; align-items:center; min-height:44px; font-size:13px; }
.cz-schedule-dialog input, .cz-schedule-dialog select, .cz-schedule-dialog textarea { color:var(--app-text); }
.cz-schedule-dialog::backdrop { background:rgba(2,6,23,.55); }

.cz-workspace [hidden] { display:none !important; }

.cz-queue-pages { display:flex; gap:8px; justify-content:space-between; padding:12px; }

.cz-quick-picker { border:1px solid var(--app-border); border-radius:8px; padding:12px; }
.cz-quick-picker summary { cursor:pointer; font-size:13px; }
.cz-quick-results { display:grid; gap:6px; max-height:220px; overflow-y:auto; margin:10px 0; }
.cz-quick-result { padding:10px; text-align:left; border:1px solid var(--app-border); border-radius:6px; font-size:12px; overflow-wrap:anywhere; white-space:normal; }
.cz-quick-result:hover { background:var(--app-surface-soft); }
.cz-media-preview { display:block; width:auto; max-width:100%; max-height:280px; border-radius:8px; margin-bottom:8px; }
.cz-media-player { display:block; max-width:100%; margin-bottom:8px; }
.cz-document-preview { width:100%; min-width:220px; height:320px; border:1px solid var(--app-border); border-radius:6px; margin:8px 0; }

.cz-message-quote { border-left:3px solid #34d399; padding:8px 12px; margin:0 0 10px; max-height:110px; overflow:auto; background:rgba(52,211,153,.08); border-radius:6px; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
.cz-quote-action { min-height:32px; margin-top:8px; font-size:12px; }
.cz-message:target { outline:2px solid #34d399; outline-offset:3px; }
[data-quoted-selection] { display:flex; align-items:center; justify-content:space-between; gap:12px; }
[data-quoted-selection][hidden] { display:none; }
.cz-staged-media { border:1px solid var(--app-border); border-radius:8px; padding:12px; }
.cz-staged-meta,.cz-recorder,[data-upload-panel] { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.cz-staged-meta { justify-content:space-between; font-size:13px; overflow-wrap:anywhere; }
.cz-recorder .cz-button,.cz-staged-meta .cz-button,[data-upload-panel] .cz-button { min-height:44px; }
[data-upload-progress] { flex:1; min-width:140px; height:12px; accent-color:#34d399; }
.cz-create-conversation { padding:20px; margin-bottom:20px; }
.cz-create-conversation summary { cursor:pointer; font-weight:600; font-size:14px; }
.cz-contact-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:20px; }
.cz-contact-search { display:flex; gap:12px; align-items:flex-end; margin:20px 0; }
.cz-contact-search .cz-field { flex:1; }
.cz-contact-table { overflow-x:auto; }
.cz-contact-table th,.cz-contact-table td { padding:12px 16px; text-align:left; border-bottom:1px solid var(--app-border); }
.cz-contact-table th { background:var(--app-surface); }
.cz-contact-avatar { display:inline-grid; width:36px; height:36px; place-items:center; border-radius:50%; object-fit:cover; background:var(--app-surface-soft); color:var(--app-text); font-weight:700; }
.cz-table-detail { display:block; max-width:440px; margin-top:5px; color:var(--app-subtle); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-search-inline { display:flex; align-items:center; gap:8px; }
.workspace-search-inline input { width:min(320px,45vw); min-height:44px; border:1px solid var(--app-border); border-radius:8px; padding:0 12px; background:var(--app-surface); color:var(--app-text); }
@media(max-width:640px) { .workspace-search-inline { width:100%; } .workspace-search-inline input { width:100%; min-width:0; } }
.cz-contact-history { display:grid; gap:8px; margin-top:12px; }
.cz-template-picker { margin-top:16px; }
.cz-template-card { padding:16px; border:1px solid var(--app-border); border-radius:12px; }
.cz-template-card summary { cursor:pointer; overflow-wrap:anywhere; }
.cz-template-preview { white-space:pre-wrap; overflow-wrap:anywhere; padding:16px; border-radius:12px; background:var(--app-bg); border:1px solid var(--app-border); }
.cz-template-form .cz-button { min-height:44px; justify-self:start; }
.cz-variable-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.cz-variable-list .cz-button { min-height:44px; font-size:12px; }

/* Personal initial menu state; on desktop "closed" becomes an accessible icon rail. */
@media (min-width:1024px) {
    .app-content { padding-left: 240px; }
    html[data-menu="closed"] .app-sidebar { width: 76px; }
    html[data-menu="closed"] .app-content { padding-left: 76px; }
    html[data-menu="closed"] .sidebar-brand { justify-content: center; padding-inline: 10px; }
    html[data-menu="closed"] .sidebar-brand-copy,
    html[data-menu="closed"] .sidebar-collapse,
    html[data-menu="closed"] .sidebar-label,
    html[data-menu="closed"] .sidebar-chevron,
    html[data-menu="closed"] .sidebar-section-label,
    html[data-menu="closed"] .sidebar-submenu,
    html[data-menu="closed"] .sidebar-footer-copy { display: none; }
    html[data-menu="closed"] .sidebar-brand-link { flex: 0 0 36px; }
    html[data-menu="closed"] .sidebar-scroll { padding-inline: 10px; }
    html[data-menu="closed"] .sidebar-link,
    html[data-menu="closed"] .sidebar-group-toggle { justify-content: center; padding-inline: 0; }
    html[data-menu="closed"] .sidebar-footer { justify-content: center; padding-inline: 10px; }
    html[data-menu="closed"] .sidebar-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; line-height: 16px; }
}

.cz-responsible-badge {display:inline-block;border-radius:6px;padding:2px 6px;font-size:11px;line-height:18px;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.cz-profile-avatar {width:28px;height:28px;object-fit:cover;border-radius:8px;}
.cz-profile-preview {width:96px;height:96px;object-fit:cover;border-radius:16px;border:1px solid #64748b;}

html:not(.dark) .cz-account-heading h1 {color:var(--app-surface);}

html:not(.dark) .cz-personal-account .cz-panel .text-slate-400 {color:#94a3b8 !important;}
.cz-full-row {grid-column:1/-1;}

/* Shared operational components inherit the current ChatZap shell. */
.ops-page{--ops-border:#dbe3e9;--ops-surface:#fff;--ops-muted:#64748b}.dark .ops-page{--ops-border:#334155;--ops-surface:#0f172a;--ops-muted:#94a3b8}.ops-heading{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:1.2rem}.ops-heading h1{font-size:1.7rem;font-weight:700}.ops-heading p,.ops-page small{color:var(--ops-muted)}.ops-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.2rem}.ops-tabs a,.ops-pill{border:1px solid var(--ops-border);border-radius:.6rem;padding:.35rem .65rem;font-size:.85rem}.ops-tabs [aria-current]{background:#059669;color:white}.ops-grid{display:grid;grid-template-columns:minmax(270px,360px) minmax(0,1fr);gap:1.2rem}.ops-card{background:var(--ops-surface);border:1px solid var(--ops-border);border-radius:1rem;padding:1.2rem;min-width:0}.ops-card h2{font-size:1.1rem;font-weight:650;margin-bottom:1rem}.ops-page label{display:block;font-size:.85rem;margin-bottom:.8rem}.ops-page input,.ops-page textarea,.ops-page select{display:block;width:100%;margin-top:.3rem;padding:.65rem;border:1px solid var(--ops-border);border-radius:.55rem;background:var(--ops-surface);color:inherit}.ops-page button,.ops-page .btn-primary,.ops-page .btn-secondary{display:inline-block;border-radius:.55rem;padding:.55rem .85rem;border:1px solid var(--ops-border)}.ops-page .btn-primary{background:#059669;color:white}.ops-page details{margin-top:1rem;font-size:.85rem}.ops-page code{white-space:pre-wrap;overflow-wrap:anywhere}.ops-filters{display:flex;flex-wrap:wrap;gap:.5rem;align-items:end}.ops-filters label{min-width:130px;flex:1}.ops-table-wrap{overflow:auto;margin-top:1rem}.ops-page table{width:100%;border-collapse:collapse;text-align:left;font-size:.88rem}.ops-page td,.ops-page th{padding:.75rem;border-bottom:1px solid var(--ops-border);vertical-align:top}.ops-pill{display:inline-block;margin:.15rem}.ops-notice{padding:1rem;border:1px solid #10b981;border-radius:.6rem;margin-bottom:1rem}.ops-pagination{display:flex;gap:1rem;padding-top:1rem}.ops-board{display:flex;overflow:auto;gap:1rem;padding-bottom:1rem}.ops-column{min-width:270px;flex:1;background:var(--ops-surface);padding:.85rem;border:1px solid var(--ops-border);border-radius:.75rem}.ops-column h2{border-top:4px solid;padding:.65rem 0;font-weight:700}.ops-deal{display:grid;gap:.4rem;padding:.85rem;margin:.6rem 0;border:1px solid var(--ops-border);border-radius:.6rem}.ops-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem}.ops-stat-grid strong{font-size:1.6rem;display:block}@media(max-width:900px){.ops-grid{grid-template-columns:1fr}.ops-heading{align-items:start;flex-direction:column}}

.ops-page input[type="checkbox"]{display:inline-block;width:auto;padding:0;margin:0 .4rem 0 0;vertical-align:middle}

html:not(.dark) .cz-workspace {color-scheme:light}
html.dark .cz-workspace {color-scheme:dark}
html:not(.dark) .cz-outbound {background:#d1fae5;color:#064e3b}
html:not(.dark) .cz-note {background:#fffbeb;color:#78350f}
html:not(.dark) .cz-attachment {color:#047857}
.cz-quick-tabs,.cz-workspace-actions {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.cz-quick-tabs a {padding:9px 12px;background:var(--app-surface);border:1px solid var(--app-border);border-radius:9px;font-size:13px}
.cz-quick-tabs a[aria-current] {background:var(--app-primary);color:#fff;border-color:var(--app-primary)}
.cz-quick-tabs small {border-radius:16px;padding:1px 5px;background:var(--app-surface-soft);color:var(--app-text)}
.cz-filter-panel {margin-bottom:12px}.cz-filter-panel>summary {cursor:pointer;padding:12px}
.cz-filter-panel .cz-filters {margin:0;border:0}.cz-layout {gap:12px}
.ops-guide-note {background:var(--app-surface-soft);padding:12px;border-radius:8px;margin:12px 0}
.ops-editor-row {padding:12px;border:1px solid var(--app-border);border-radius:8px;margin:8px 0}
.ops-editor-row button {margin:4px}.ops-inline {display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.ops-inline label {flex:1;min-width:120px}.ops-help-link {font-size:13px;text-decoration:underline}
[data-tour-target] {outline:3px solid var(--app-primary);outline-offset:4px}
.cz-tour {width:min(92vw,500px);background:var(--app-surface);color:var(--app-text);border:1px solid var(--app-border);border-radius:14px;padding:24px}
.cz-tour::backdrop {background:rgba(15,23,42,.4)}.cz-tour p {margin:12px 0}.cz-tour button {margin:6px;padding:10px;border:1px solid var(--app-border);border-radius:8px}

.ops-page {--ops-border:var(--app-border);--ops-surface:var(--app-surface);--ops-muted:var(--app-subtle)}
main input:not([type=checkbox]):not([type=radio]):not([type=hidden]),main select {min-height:44px}
main :is(button,a,input,select,textarea):focus-visible {outline:2px solid var(--app-primary);outline-offset:2px}
main button:disabled {opacity:.5;cursor:not-allowed}
