:root { --ink: #1c1d1f; --muted: #626c7a; --line: #e4e7ec; --surface: #f3f4f6; --action: #407ff2; --bs-body-font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif; }
body { color: var(--ink); background: #fff; font-size: 15px; }
a { color: #235dc1; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #94b9ff; outline-offset: 3px; }
.shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.app-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 88px; flex-wrap: wrap; padding: 16px 0; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand-mark { display: grid; place-items: center; background: var(--ink); color: #fff; width: 36px; height: 36px; border-radius: 8px; font-size: 14px; }
nav { display: flex; gap: 20px; }
nav a { text-decoration: none; color: var(--muted); padding: 8px 0; }
.account { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
main { min-height: 70vh; padding-top: 48px; }
h1 { font-size: 30px; letter-spacing: -0.6px; font-weight: 650; text-wrap: balance; margin-bottom: 12px; }
h2 { font-size: 21px; font-weight: 600; }
.muted { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 1.2px; font-weight: 600; margin-bottom: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.page-heading p:last-child { margin: 0; }
.page-heading > .btn { flex-shrink: 0; white-space: nowrap; }
.page-heading > .channel { flex-shrink: 0; white-space: nowrap; }
.page-heading > div { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.panel { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.list-toolbar { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; }
.search input { width: 250px; }
.search .btn { flex-shrink: 0; white-space: nowrap; }
.btn { border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 500; min-height: 44px; }
.btn-primary { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: #35373d; --bs-btn-hover-border-color: #35373d; --bs-btn-active-bg: #35373d; --bs-btn-disabled-bg: #505967; --bs-btn-disabled-border-color: #505967; }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: #d3d8df; --bs-btn-hover-bg: var(--surface); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #b5bdc9; }
.form-control, .form-select { border-color: #d3d8df; border-radius: 7px; min-height: 44px; font-size: 15px; }
.table { --bs-table-border-color: var(--line); font-size: 14px; }
.table thead th { color: var(--muted); background: #fafbfc; font-size: 12px; font-weight: 500; }
.table td, .table th { padding: 18px 24px; }
.table tbody th { font-weight: 550; }
.table tbody tr:last-child > * { border-bottom: 0; }
.secondary-line { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.channel { background: var(--surface); padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.empty { text-align: center; padding: 64px 24px; }
.notice { background: var(--surface); border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; font-size: 14px; }
.success { color: #075a39; background: #edf7f1; }
.error { color: #772322; background: #fdf0ef; }
.field-error, .errorlist { color: #772322; font-size: 14px; margin-top: 8px; }
.edit-panel { max-width: 700px; padding: 32px; }
.field { margin-bottom: 24px; }
.field label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-check-input { width: 22px; height: 22px; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.login-panel { max-width: 450px; margin: 16px auto; padding: 32px; }
.login-panel form { margin-top: 32px; }
.pagination-bar { border-top: 1px solid var(--line); padding: 16px 24px; justify-content: center; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 24px 0; margin-top: 48px; }
.skip-link { position: absolute; left: 16px; top: -80px; background: #fff; padding: 12px; z-index: 10; }
.skip-link:focus { top: 8px; }
.sales-detail-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px; }
.detail-panel { padding: 32px; min-width: 0; }
.detail-values { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; margin: 24px 0; }
.detail-values dt { font-weight: 500; color: var(--muted); }
.detail-values dd { margin: 0; overflow-wrap: anywhere; }
.history-item { border-top: 1px solid var(--line); padding: 16px 0; }
.history-item p { margin-bottom: 8px; }
.note-body { overflow-wrap: anywhere; line-height: 1.7; }
.terms-title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.terms-source { padding: 16px 0; color: var(--muted); overflow-wrap: anywhere; }
.history-item summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.workspace-layout.authenticated { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
.workspace-layout main { min-width: 0; }
.sidebar { min-width: 0; border-right: 1px solid var(--line); padding: 40px 20px 32px 0; }
.app-nav { flex-direction: column; gap: 6px; position: sticky; top: 24px; }
.app-nav a { min-height: 48px; padding: 12px 16px; border-left: 2px solid transparent; border-radius: 6px; }
.app-nav a:hover { background: var(--surface); }
.app-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); border-left-color: var(--ink); font-weight: 600; }
.app-nav[hidden] { display: none; }
.nav-toggle { display: none; }
.nav-toggle[hidden] { display: none; }
.draft-actions { flex-wrap: wrap; }
.draft-heading > a { flex-shrink: 0; white-space: nowrap; }
.draft-document { max-width: 900px; }
.draft-body { line-height: 1.8; resize: vertical; }
.draft-document summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.dashboard-placeholder { padding: 64px 40px; background: var(--surface); }
.dashboard-placeholder p:last-child { margin: 16px 0 0; line-height: 1.8; }
.workflow-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.workflow-link { padding: 28px; text-decoration: none; color: var(--ink); }
.workflow-link:hover { background: var(--surface); }
.workflow-link h2 { font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.workflow-link p { font-size: 14px; line-height: 1.7; margin-bottom: 0; }
.business-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.detail-stack { display: grid; gap: 24px; min-width: 0; }
@media (max-width: 760px) { .workspace-layout.authenticated { grid-template-columns: 1fr; gap: 0; } .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; } .nav-toggle { display: block; } .app-nav { margin-top: 12px; position: static; } .workflow-links, .business-detail-grid { grid-template-columns: 1fr; } .dashboard-placeholder { padding: 40px 24px; } .workflow-link { padding: 24px; } }
@media (max-width: 760px) { .detail-panel > .page-heading { flex-direction: column; gap: 16px; } }
.sales-search select { width: 160px; max-width: 160px; flex-shrink: 0; }
@media (max-width: 760px) { .sales-detail-grid { grid-template-columns: 1fr; } .detail-panel { padding: 24px; } .sales-search select { max-width: none; flex: 1; } .header-inner nav { flex-wrap: wrap; gap: 16px; } }
.mobile-table-hint { display: none; }
@media (max-width: 760px) { .mobile-table-hint { display: block; padding: 12px 24px 0; color: var(--muted); font-size: 12px; } }
@media (prefers-color-scheme: dark) { .btn-outline-secondary { --bs-btn-color: #eceef1; --bs-btn-hover-color: #eceef1; --bs-btn-active-color: #eceef1; --bs-btn-hover-bg: #35373d; --bs-btn-active-bg: #35373d; color: #eceef1; border-color: #505967; } .btn-outline-secondary:hover, .btn-outline-secondary:focus-visible { color: #eceef1; background: #35373d; } }
@media (prefers-color-scheme: dark) {
  .form-control, .form-select { color-scheme: dark; }
  .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b5bdc9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
}
@media (max-width: 760px) { .shell { width: calc(100% - 32px); } .header-inner { gap: 16px; } .account { margin-left: 0; width: 100%; justify-content: space-between; } main { padding-top: 32px; } .page-heading { align-items: flex-start; } h1 { font-size: 26px; } .list-toolbar { align-items: flex-start; flex-direction: column; } .search { width: 100%; flex-wrap: wrap; } .search input { flex: 1; min-width: 150px; } .table td, .table th { padding: 16px; white-space: nowrap; } .edit-panel, .login-panel { padding: 24px; } }
@media (max-width: 760px) { .sales-search input { flex-basis: 100%; } .sales-search select { min-width: 140px; } }
@media (prefers-color-scheme: dark) { :root { --ink: #eceef1; --muted: #b5bdc9; --line: #35373d; --surface: #24262b; } body { background: #17181b; } a { color: #94b9ff; } .brand-mark { background: #eceef1; color: #17181b; } .table { --bs-table-bg: #17181b; --bs-table-color: var(--ink); } .table thead th { background: #24262b; } .form-control, .form-select { background-color: #202227; color: var(--ink); border-color: #505967; } .form-control:focus, .form-select:focus { background-color: #202227; color: var(--ink); } .form-control::placeholder { color: #b5bdc9; } .btn-primary { --bs-btn-color: #17181b; --bs-btn-hover-color: #17181b; --bs-btn-hover-bg: #d3d8df; --bs-btn-hover-border-color: #d3d8df; } .success { background: #153326; color: #abdbc1; } .error { background: #3a2121; color: #f3b7b7; } .field-error, .errorlist { color: #f3b7b7; } .skip-link { background: #17181b; } }
/* Report chart accent denotes the current week, never approval or delivery. */
.weekly-chart { margin: 24px 0; padding-top: 16px; border-top: 1px solid #ddd; }
.weekly-bars { display: flex; gap: 12px; margin: 20px 0; border-bottom: 1px solid #ddd; padding: 0 6px 10px; }
.weekly-bar-slot { flex: 1; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.weekly-bar-value { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.weekly-bar-track { height: 100px; display: flex; align-items: end; justify-content: center; }
.weekly-bar { width: min(36px, 75%); background: #595959; }
.weekly-bar-current { background: #e45b25; }
.weekly-bar-slot small { display: block; min-height: 1.4em; }
@media (prefers-color-scheme: dark) { .weekly-bar:not(.weekly-bar-current) { background: #b9bec6; } }

.notification-details summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
@media (max-width: 760px) { .notification-heading { flex-direction: column; gap: 16px; } .notification-actions { flex-direction: column; } .notification-actions .btn { width: 100%; } }

/* Staff shooting brief editor: preserve existing AP surfaces and text roles. */
.shooting-post { border: 1px solid var(--line); border-radius: 8px; }
.shooting-post > summary { min-height: 44px; padding: 12px 16px; cursor: pointer; overflow-wrap: anywhere; }
.shooting-post > summary:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.shooting-cut { border-top: 1px solid var(--line); padding: 16px 0; }
.shooting-cut input[type='number'] { max-width: 160px; }

.help-heading { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.help-heading > h1, .help-heading > h2, .help-heading > h3 { margin-bottom: 0; }
.context-help { display: inline-block; vertical-align: middle; font-size: 14px; font-weight: 400; letter-spacing: normal; }
.context-help > summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; list-style: none; border-radius: 6px; }
.context-help > summary::-webkit-details-marker { display: none; }
.help-symbol { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--muted); border-radius: 50%; color: var(--muted); font-size: 13px; line-height: 1; }
.context-help > summary:hover .help-symbol { color: var(--ink); border-color: var(--ink); }
.context-help-panel { width: min(340px, calc(100vw - 24px)); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-wrap: anywhere; line-height: 1.6; }
.context-help-panel strong { display: block; font-size: 14px; margin-bottom: 6px; }
.context-help-panel p { margin: 0; }
.context-help[data-help-ready] .context-help-panel { position: fixed; z-index: 1200; max-height: calc(100dvh - 24px); overflow: auto; }
.context-help-panel[hidden] { display: none; }

.context-help:not([data-help-ready])[open] { display: block; width: 100%; }
.context-help:not([data-help-ready]) .context-help-panel { width: 100%; }
