:root {
  color-scheme: light;
  --bg: #f6f6f2;
  --surface: #ffffff;
  --surface-2: #f0f2ed;
  --surface-3: #e8ece5;
  --text: #24342e;
  --muted: #78827b;
  --line: #e4e8e1;
  --primary: #244b40;
  --primary-strong: #173a32;
  --primary-soft: #e6eee9;
  --accent: #c18e63;
  --accent-soft: #f5ede5;
  --danger: #b95450;
  --danger-soft: #f8e8e6;
  --warning: #a87835;
  --warning-soft: #f8f0df;
  --success: #397b5b;
  --success-soft: #e5f1e9;
  --shadow: 0 18px 55px rgba(28, 52, 43, .08);
  --radius: 16px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111b18;
  --surface: #1a2823;
  --surface-2: #22332c;
  --surface-3: #2a3b33;
  --text: #eaf0eb;
  --muted: #a0afa5;
  --line: #30433a;
  --primary: #8ab6a1;
  --primary-strong: #a8d0b9;
  --primary-soft: #263c32;
  --accent: #d5a77d;
  --accent-soft: #3b3028;
  --danger: #ef918b;
  --danger-soft: #442b2a;
  --warning: #e1b46d;
  --warning-soft: #403725;
  --success: #8ac6a2;
  --success-soft: #253e31;
  --shadow: 0 18px 55px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); letter-spacing: .16em; font-size: 10px; font-weight: 700; margin: 0 0 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px 14px 14px 4px; background: var(--primary-strong); color: #fff; display: grid; place-items: center; font: 700 27px 'Playfair Display', serif; flex: 0 0 auto; }
.brand-mark.large { width: 54px; height: 54px; font-size: 34px; margin: 0 auto 18px; }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 26px; }
.setup-card { max-width: 510px; width: 100%; text-align: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 42px; border-radius: 24px; }
.setup-card h1 { font: 600 30px 'Playfair Display', serif; margin: 0 0 12px; }
.setup-steps { display: grid; gap: 10px; text-align: left; background: var(--surface-2); padding: 17px; border-radius: 13px; margin-top: 22px; color: var(--muted); font-size: 13px; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; color: var(--primary); }
.auth-layout { max-width: 980px; width: 100%; min-height: 590px; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; overflow: hidden; }
.auth-brand-panel { padding: 54px; color: #f5f6f0; background: radial-gradient(circle at 90% 5%, rgba(210,168,126,.35), transparent 32%), linear-gradient(145deg, #173a32, #315e4c); display: flex; flex-direction: column; justify-content: center; }
.auth-brand-panel .brand-mark { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); margin-bottom: 24px; }
.auth-brand-panel .eyebrow { color: #d8b18c; }
.auth-brand-panel h1 { font: 600 clamp(38px, 5vw, 56px)/1.07 'Playfair Display', serif; margin: 0 0 20px; }
.auth-brand-panel h1 em { color: #e5c19f; }
.auth-brand-panel p:not(.eyebrow) { color: rgba(255,255,255,.76); line-height: 1.7; max-width: 330px; }
.auth-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.auth-pills span { border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 7px 12px; color: #f1e9df; font-size: 11px; }
.auth-form-panel { padding: 64px 54px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-panel h2 { font: 600 34px 'Playfair Display', serif; margin: 0 0 8px; }
.stack-form { display: grid; gap: 17px; margin-top: 28px; }
label { display: grid; gap: 8px; color: var(--text); font-weight: 600; font-size: 12px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 11px 12px; border-radius: 10px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
input::placeholder, textarea::placeholder { color: #9aa49c; }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.btn { border: 0; border-radius: 10px; padding: 11px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 12px; transition: transform .15s, opacity .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-secondary { background: var(--primary-soft); color: var(--primary-strong); }
.btn-ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.btn-danger { color: var(--danger); background: var(--danger-soft); }
.btn-full { width: 100%; padding: 14px; }
.text-button { background: transparent; border: 0; padding: 14px 0; color: var(--primary); font-size: 12px; font-weight: 700; text-align: left; }
.auth-footnote { margin-top: 30px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; flex: 0 0 248px; background: var(--surface); border-right: 1px solid var(--line); padding: 25px 16px 17px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; gap: 11px; align-items: center; padding: 0 10px 34px; }
.sidebar-brand strong { display: block; font: 700 19px 'Playfair Display', serif; letter-spacing: -.02em; }
.sidebar-brand small { display: block; font-size: 8px; letter-spacing: .17em; color: var(--muted); margin-top: 4px; }
.workspace-label { color: var(--muted); font-size: 9px; letter-spacing: .16em; font-weight: 700; padding: 0 12px 11px; }
.main-nav { display: grid; gap: 4px; }
.nav-link { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 12px 13px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-strong); }
.nav-icon { width: 18px; font-size: 17px; text-align: center; }
.nav-divider { height: 1px; background: var(--line); margin: 13px 9px; }
.sidebar-bottom { margin-top: auto; }
.secure-note { display: flex; align-items: flex-start; gap: 9px; background: var(--surface-2); padding: 12px; border-radius: 11px; margin-bottom: 17px; }
.secure-dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; margin-top: 4px; box-shadow: 0 0 0 4px var(--success-soft); }
.secure-note strong, .secure-note small { display: block; }
.secure-note strong { font-size: 10px; }
.secure-note small { color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.4; }
.profile-chip { border-top: 1px solid var(--line); padding: 16px 3px 0; display: flex; align-items: center; gap: 9px; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.profile-text { min-width: 0; flex: 1; }
.profile-text strong, .profile-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text strong { font-size: 11px; }
.profile-text small { color: var(--muted); font-size: 10px; margin-top: 3px; text-transform: capitalize; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: 15px; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }
.main-area { min-width: 0; flex: 1; }
.topbar { min-height: 75px; padding: 0 36px; background: color-mix(in srgb, var(--surface) 90%, transparent); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.breadcrumb b { color: var(--line); }
.breadcrumb strong { color: var(--text); font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.today-label { color: var(--muted); font-size: 11px; }
.mobile-menu { display: none; }
.page-content { padding: 30px 36px 50px; max-width: 1600px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.page-heading h1 { font: 600 30px 'Playfair Display', serif; letter-spacing: -.025em; margin: 0; }
.page-heading p { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 20px rgba(30,50,40,.025); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 15px; }
.stat-value { font: 600 29px 'Playfair Display', serif; margin-top: 14px; }
.stat-foot { color: var(--muted); font-size: 10px; margin-top: 4px; }
.stack-column { display: grid; gap: 14px; align-content: start; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(260px,.9fr); gap: 18px; }
.section-card { padding: 19px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.section-title h3 { margin: 0; font: 600 17px 'Playfair Display', serif; }
.section-title p { margin: 5px 0 0; font-size: 10px; color: var(--muted); }
.inline-link { color: var(--primary); background: none; border: 0; font-weight: 700; font-size: 10px; }
.video-list { display: grid; gap: 9px; }
.video-row { padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.video-thumb { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 9px; background: linear-gradient(145deg, var(--primary-soft), var(--accent-soft)); display: grid; place-items: center; color: var(--primary); overflow: hidden; font-size: 19px; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-row-main { min-width: 0; flex: 1; }
.video-row-main strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.video-row-main small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.video-row-end { display: grid; justify-items: end; gap: 7px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill.idea { background: var(--surface-2); color: var(--muted); }
.pill.script_ready, .pill.filming { background: var(--warning-soft); color: var(--warning); }
.pill.editing, .pill.review { background: var(--accent-soft); color: var(--accent); }
.pill.approved, .pill.scheduled { background: var(--primary-soft); color: var(--primary); }
.pill.published { background: var(--success-soft); color: var(--success); }
.pill.rejected { background: var(--danger-soft); color: var(--danger); }
.progress-wrap { margin-top: 5px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.progress-track { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #91b69b); }
.mini-list { display: grid; gap: 13px; }
.mini-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.mini-left { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.mini-item strong { font-size: 12px; }
.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.week-toolbar h2 { font: 600 18px 'Playfair Display', serif; margin: 0; }
.week-controls { display: flex; align-items: center; gap: 6px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(145px,1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.day-column { min-height: 350px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px; }
.day-column.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.day-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px; }
.day-heading strong { font-size: 11px; }
.day-heading span { font-size: 10px; color: var(--muted); }
.day-add { width: 23px; height: 23px; border-radius: 7px; border: 1px dashed var(--line); background: var(--surface); color: var(--muted); }
.day-videos { display: grid; gap: 8px; }
.calendar-video { padding: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 9px; cursor: pointer; }
.calendar-video:hover { border-color: var(--primary); }
.calendar-video strong { display: block; font-size: 10px; line-height: 1.4; }
.calendar-video small { color: var(--muted); font-size: 9px; display: block; margin-top: 6px; }
.calendar-video .pill { margin-top: 8px; font-size: 8px; }
.board-wrap { overflow-x: auto; padding-bottom: 10px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(218px, 1fr); gap: 11px; align-items: start; min-width: max-content; }
.board-column { width: 218px; border-radius: 13px; background: var(--surface-2); padding: 11px; min-height: 330px; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 2px 12px; }
.board-count { color: var(--muted); background: var(--surface); padding: 3px 7px; border-radius: 99px; font-size: 9px; }
.board-cards { display: grid; gap: 8px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px; cursor: pointer; }
.board-card:hover { border-color: var(--primary); }
.board-card strong { display: block; font-size: 11px; line-height: 1.4; }
.board-card p { font-size: 9px; color: var(--muted); margin: 7px 0; }
.board-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: var(--muted); }
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 15px; }
.search-field { max-width: 280px; position: relative; flex: 1; }
.search-field input { padding-left: 34px; }
.search-field span { position: absolute; left: 12px; top: 9px; color: var(--muted); }
.toolbar select { width: auto; min-width: 135px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 12px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; text-align: left; background: var(--surface-2); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.video-title-cell { min-width: 180px; }
.video-title-cell strong { display: block; font-size: 11px; }
.video-title-cell small { display: block; color: var(--muted); margin-top: 4px; font-size: 9px; }
.table-action { background: none; border: 0; color: var(--primary); font-size: 10px; font-weight: 700; }
.analytics-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.metric-list { display: grid; gap: 14px; }
.metric-row { display: grid; grid-template-columns: 95px 1fr 38px; gap: 10px; align-items: center; font-size: 10px; }
.metric-row > span:first-child { color: var(--muted); }
.metric-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.metric-bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 12px; }
.team-card { padding: 16px; }
.team-person { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.team-person .avatar { width: 40px; height: 40px; }
.team-person strong { display: block; font-size: 12px; }
.team-person small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.team-card label { margin-top: 9px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.settings-card { padding: 20px; }
.settings-card h3 { font: 600 17px 'Playfair Display', serif; margin: 0 0 7px; }
.settings-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.empty-state { text-align: center; padding: 35px 16px; color: var(--muted); }
.empty-state .empty-icon { font-size: 28px; color: var(--accent); margin-bottom: 10px; }
.empty-state strong { display: block; color: var(--text); font: 600 17px 'Playfair Display', serif; margin-bottom: 6px; }
.empty-state p { font-size: 11px; margin: 0 0 15px; }
.loading-state { min-height: 300px; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: 12px; }
.spinner { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; right: 22px; top: 18px; z-index: 1000; display: grid; gap: 8px; }
.toast { background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 11px; max-width: 340px; animation: toastIn .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,20,16,.55); z-index: 100; display: grid; place-items: center; padding: 22px; overflow-y: auto; }
.modal { width: min(850px,100%); max-height: min(92vh,1000px); overflow-y: auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.modal.small { width: min(470px,100%); }
.modal-header { padding: 20px 23px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-header h2 { font: 600 21px 'Playfair Display', serif; margin: 0; }
.modal-header p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.modal-body { padding: 21px 23px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; font: 600 14px 'Playfair Display', serif; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 15px 23px; background: var(--surface); position: sticky; bottom: 0; }
.modal-footer .right-actions { display: flex; gap: 8px; }
.link-editor { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(180px,1.3fr) 34px; gap: 8px; margin-bottom: 8px; }
.link-editor input { font-size: 11px; }
.comment-list { display: grid; gap: 9px; margin: 12px 0; }
.comment-item { padding: 10px; border-radius: 9px; background: var(--surface-2); font-size: 10px; }
.comment-item strong { display: inline-block; margin-right: 7px; }
.comment-item small { color: var(--muted); }
.comment-item p { margin: 6px 0 0; line-height: 1.5; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea { min-height: 42px; }
.notice { padding: 11px 13px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 10px; line-height: 1.5; }
.notice.success { background: var(--success-soft); color: var(--success); }
.inline-links { display: flex; flex-wrap: wrap; gap: 7px; }
.inline-links a { color: var(--primary); font-size: 10px; text-decoration: none; border-bottom: 1px solid currentColor; }
.inline-links a:hover { opacity: .75; }
@media (max-width: 1100px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .page-content { padding: 25px 24px 40px; }
  .topbar { padding: 0 24px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 22px 16px 35px; }
  .dashboard-grid, .analytics-grid { grid-template-columns: 1fr; }
  .today-label { display: none; }
  .auth-layout { grid-template-columns: 1fr; max-width: 520px; }
  .auth-brand-panel { padding: 35px; min-height: 300px; }
  .auth-form-panel { padding: 38px 35px; }
  .auth-brand-panel h1 { font-size: 43px; }
}
@media (max-width: 560px) {
  .top-add span { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 27px; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-value { font-size: 24px; }
  .stat-top { font-size: 9px; }
  .stat-foot { font-size: 9px; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full, .form-section-title { grid-column: auto; }
  .link-editor { grid-template-columns: 1fr; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
  .modal-backdrop { padding: 8px; }
  .modal-header, .modal-body { padding-left: 16px; padding-right: 16px; }
  .modal-footer { padding: 12px 16px; }
  .week-toolbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { gap: 7px; }
}

/* Sales & customer relations workspace */
.nav-link { min-height: 40px; }
.chart-bars { display:flex; align-items:stretch; gap:7px; min-height:190px; padding:16px 2px 0; overflow-x:auto; }
.chart-bar-col { min-width:26px; flex:1 0 26px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:7px; font-size:9px; color:var(--muted); }
.chart-bar-col strong { font-size:9px; color:var(--text); font-weight:700; white-space:nowrap; }
.chart-bar-track { height:125px; width:min(25px,80%); display:flex; align-items:flex-end; background:var(--surface-2); border-radius:8px 8px 4px 4px; overflow:hidden; }
.chart-bar-track i { width:100%; min-height:0; display:block; border-radius:8px 8px 3px 3px; background:linear-gradient(180deg,var(--accent),var(--primary)); }
.chart-bar-col small { font-size:8px; white-space:nowrap; }
.sales-chart-card { min-width:0; }
.segmented-control { display:inline-flex; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--surface); gap:3px; }
.segmented-control button { border:0; background:transparent; color:var(--muted); padding:8px 12px; border-radius:7px; font-size:10px; font-weight:700; }
.segmented-control button.active { background:var(--primary-soft); color:var(--primary-strong); }
.customer-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.customer-summary-grid > div { background:var(--surface-2); border-radius:10px; padding:12px; min-width:0; }
.customer-summary-grid small { display:block; color:var(--muted); font-size:9px; margin-bottom:6px; }
.customer-summary-grid strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.privacy-note { color:var(--muted); font-size:10px; line-height:1.6; margin:13px 0 0; }
.checkline { display:flex; align-items:center; gap:9px; }
.checkline input { width:16px; height:16px; }
.checkline { grid-template-columns:auto 1fr; }
.checkline input { margin:0; }
.nav-divider { height:1px; background:var(--line); margin:11px 9px; }
@media (max-width: 560px) {
  .customer-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .chart-bars { min-height:165px; }
  .chart-bar-track { height:105px; }
  .segmented-control { max-width:100%; }
  .segmented-control button { padding:7px 9px; }
}
.mini-right { display:block; text-align:right; flex:0 0 auto; }
.mini-right small { font-size:9px; color:var(--muted); }

/* Reporting, planning and archive components */
.report-filter { padding: 16px; margin-bottom: 14px; }
.report-filter-title { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.report-filter-title strong { font-size:12px; }
.report-filter-title small { color:var(--muted); font-size:10px; }
.report-filter-fields { display:flex; align-items:flex-end; flex-wrap:wrap; gap:10px; }
.report-filter-fields label { min-width:145px; flex:1 1 145px; }
.report-filter-fields .btn { min-height:38px; }
.report-filter-fields select { min-width:200px; }
.report-summary-strip { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 13px; margin:12px 0; border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:10px; }
.report-summary-strip strong { color:var(--text); font-size:11px; }
.summary-dot { width:8px; height:8px; border-radius:50%; background:var(--success); display:inline-block; }
.comparison-note { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding:12px 14px; margin:12px 0; border-radius:11px; background:var(--surface-2); font-size:10px; }
.comparison-note strong { color:var(--text); }
.comparison-note span,.comparison-note small { color:var(--muted); }
.comparison-note small { flex-basis:100%; line-height:1.5; }
.report-stats { margin:14px 0; }
.insights-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.report-sections { margin-top:14px; }
.report-kv { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px 12px; align-items:center; font-size:10px; }
.report-kv > span { color:var(--muted); }
.report-kv > strong { text-align:right; font-size:11px; font-variant-numeric:tabular-nums; }
.section-card h3 { margin-top:0; }
.goal-list { display:grid; gap:13px; }
.goal-row { display:grid; grid-template-columns:minmax(150px,.9fr) minmax(180px,1.1fr); align-items:center; gap:18px; padding:11px 0; border-bottom:1px solid var(--line); }
.goal-row:last-child { border-bottom:0; }
.goal-row strong { display:block; font-size:11px; }
.goal-row small { display:block; margin-top:4px; color:var(--muted); font-size:9px; }
.target-progress { min-width:145px; }
.target-progress-meta { display:flex; justify-content:space-between; gap:8px; margin-bottom:6px; color:var(--muted); font-size:9px; }
.target-progress-meta strong { color:var(--text); }
.target-track { height:7px; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.target-track i { display:block; height:100%; max-width:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--accent)); }
.compact-select { min-width:145px; padding:7px 9px; font-size:10px; }
.meeting-notes-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0; }
.meeting-notes-grid > div { padding:13px; border-radius:10px; background:var(--surface-2); }
.meeting-notes-grid strong { display:block; font-size:11px; margin-bottom:6px; }
.meeting-notes-grid p { white-space:pre-wrap; color:var(--muted); font-size:10px; line-height:1.55; margin:0; }
.report-footnote { margin-top:14px; }
.report-footnote p { color:var(--muted); font-size:10px; line-height:1.6; margin-bottom:0; }
.report-json-preview { overflow:auto; max-height:420px; padding:14px; background:var(--surface-2); color:var(--muted); border-radius:10px; font:10px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre-wrap; }
.settings-admin-card { border-color:color-mix(in srgb,var(--primary) 35%,var(--line)); }
.field-help { display:block; color:var(--muted); font-size:9px; font-weight:400; line-height:1.45; }
.danger-link { color:var(--danger); }
.privacy-note { max-width:100%; }

@media (max-width:820px) {
  .insights-grid { grid-template-columns:1fr; }
  .report-filter-fields { align-items:stretch; }
  .report-filter-fields label { flex-basis:calc(50% - 6px); }
}
@media (max-width:560px) {
  .report-filter-title { align-items:flex-start; flex-direction:column; }
  .report-filter-fields label,.report-filter-fields select { min-width:100%; flex-basis:100%; }
  .goal-row { grid-template-columns:1fr; gap:9px; }
  .meeting-notes-grid { grid-template-columns:1fr; }
  .comparison-note { align-items:flex-start; flex-direction:column; }
  .comparison-note small { flex-basis:auto; }
}
