:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --surface: #111318;
  --surface-2: #16181f;
  --surface-3: #1c1f27;
  --border: rgba(255, 255, 255, .075);
  --border-strong: rgba(255, 255, 255, .12);
  --text: #f0f1f5;
  --muted: #898d9b;
  --soft: #b7bac5;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --accent-soft: rgba(96, 165, 250, .13);
  --green: #64d9a0;
  --green-soft: rgba(100, 217, 160, .12);
  --yellow: #f4c66b;
  --yellow-soft: rgba(244, 198, 107, .12);
  --red: #ff7b88;
  --red-soft: rgba(255, 123, 136, .12);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: 0 0 248px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 22px 14px 16px; background: #0d0e13; border-right: 1px solid var(--border); }
.brand { display: flex; gap: 11px; align-items: center; padding: 1px 11px 26px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #bfdbfe, #2563eb); color: #0b1220; box-shadow: 0 5px 24px rgba(59, 130, 246, .28); }
.brand-name { font: 800 17px 'Manrope', sans-serif; letter-spacing: -.7px; }
.brand-name span { color: var(--accent); }
.brand-caption { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .3px; }
.workspace-picker { display: flex; align-items: center; gap: 10px; margin: 0 2px 22px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.workspace-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 700; }
.workspace-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; }
.workspace-sub { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.section-label { padding: 0 12px 8px; color: #696d7a; font-size: 9px; letter-spacing: 1.15px; font-weight: 700; text-transform: uppercase; }
.nav-list { display: grid; gap: 3px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border: 0; border-radius: 8px; color: #9295a2; background: transparent; text-align: left; cursor: pointer; transition: background .16s, color .16s; font-size: 12px; }
.nav-item { text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active { color: #bfdbfe; background: var(--accent-soft); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 17px; height: 17px; display: inline-flex; flex: 0 0 17px; }
.nav-icon svg, .icon svg { width: 100%; height: 100%; }
.nav-count { margin-left: auto; color: #a9c8f2; background: rgba(96,165,250,.14); padding: 2px 7px; border-radius: 20px; font-size: 9px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-help { display: flex; align-items: flex-start; gap: 9px; margin: 15px 3px 14px; padding: 12px 11px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(145deg, rgba(96,165,250,.08), rgba(17,19,24,.4)); }
.help-dot { width: 7px; height: 7px; margin-top: 4px; flex: 0 0 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(100,217,160,.5); }
.sidebar-help strong { font-size: 10px; font-weight: 600; }
.sidebar-help p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.profile { display: flex; align-items: center; gap: 10px; padding: 12px 7px 0; border-top: 1px solid var(--border); }
.profile-pic { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #bfdbfe; background: linear-gradient(145deg,#1d4ed8,#172554); font-size: 10px; font-weight: 700; }
.profile-name { font-size: 11px; font-weight: 600; }
.profile-role { margin-top: 3px; color: var(--muted); font-size: 9px; }
.main-area { min-width: 0; width: calc(100% - 248px); margin-left: 248px; }
.topbar { height: 67px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: rgba(10,11,15,.88); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px); }
.crumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.crumbs strong { color: var(--text); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.live-status { display: flex; align-items: center; gap: 7px; margin-right: 7px; color: #a4a7b2; font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(100,217,160,.6); }
.select-control { min-height: 34px; padding: 0 29px 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; color: #d6d7df; background-color: var(--surface); font-size: 10px; cursor: pointer; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; position: relative; border: 1px solid var(--border); border-radius: 8px; color: #a5a7b3; background: var(--surface); cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
.icon { width: 15px; height: 15px; display: inline-flex; }
.notification-dot { width: 5px; height: 5px; position: absolute; top: 7px; right: 7px; border: 1px solid var(--surface); border-radius: 50%; background: var(--accent); }
.mobile-menu { display: none; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 34px 54px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 25px; }
.eyebrow { margin-bottom: 8px; color: var(--accent); font-size: 9px; letter-spacing: 1.35px; text-transform: uppercase; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 700 25px 'Manrope', sans-serif; letter-spacing: -.85px; }
.page-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 35px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); color: #dcdeE6; font-size: 10px; font-weight: 600; text-decoration: none; cursor: pointer; transition: .16s ease; }
.button:hover { background: var(--surface-3); border-color: rgba(255,255,255,.2); transform: translateY(-1px); }
.button .icon { width: 13px; height: 13px; }
.button-primary { border-color: transparent; color: #0b1220; background: linear-gradient(110deg,#bfdbfe,#60a5fa); box-shadow: 0 5px 18px rgba(59,130,246,.16); }
.button-primary:hover { color: #0b1220; background: #dbeafe; border-color: transparent; }
.button-ghost { background: transparent; }
.button-danger { color: var(--red); }
.button-small { min-height: 29px; padding: 0 9px; font-size: 9px; }
.button-wide { width: 100%; min-height: 41px; }
.operator-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.operator-actions form { margin: 0; }
.operator-edit-summary { min-height: 29px; line-height: 29px; }
.button:disabled { opacity: .44; cursor: not-allowed; transform: none; }
.panel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.stat-card { min-height: 112px; padding: 15px 16px; position: relative; overflow: hidden; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-label { color: var(--muted); font-size: 10px; }
.stat-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.yellow { color: var(--yellow); background: var(--yellow-soft); }
.stat-icon.blue { color: #74baff; background: rgba(116,186,255,.12); }
.stat-icon .icon { width: 14px; height: 14px; }
.stat-value { margin: 12px 0 4px; font: 700 24px 'Manrope', sans-serif; letter-spacing: -.8px; }
.stat-foot { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.trend-up { color: var(--green); }
.content-grid { display: grid; grid-template-columns: minmax(0,1.52fr) minmax(290px,.92fr); gap: 14px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px 13px; }
.panel-title { margin: 0; font: 650 12px 'Manrope',sans-serif; letter-spacing: -.15px; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.text-link { border: 0; padding: 0; color: #b4a8ff; background: none; font-size: 9px; cursor: pointer; }
.text-link:hover { color: #bfdbfe; }
.chart-panel { min-height: 270px; }
.chart-wrap { padding: 0 16px 12px; }
.chart-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.legend-key { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legend-dot.secondary { background: #4a465d; }
.chart-svg { width: 100%; height: 176px; overflow: visible; }
.chart-gridline { stroke: rgba(255,255,255,.06); stroke-dasharray: 3 5; }
.chart-label { fill: #737786; font: 9px 'DM Sans', sans-serif; }
.chart-fill { fill: url(#chartGradient); }
.chart-line { fill: none; stroke: #60a5fa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-secondary { fill: none; stroke: #4a465d; stroke-width: 1.5; stroke-linecap: round; }
.activity-list { padding: 0 16px 8px; }
.activity-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border); }
.activity-symbol { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 29px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); }
.activity-symbol.green { color: var(--green); background: var(--green-soft); }
.activity-symbol.yellow { color: var(--yellow); background: var(--yellow-soft); }
.activity-symbol .icon { width: 13px; height: 13px; }
.activity-copy { min-width: 0; flex: 1; font-size: 10px; }
.activity-copy strong { font-weight: 600; }
.activity-copy p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { color: #737786; font-size: 9px; white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 14px; color: #7d818e; background: rgba(255,255,255,.018); font-size: 9px; font-weight: 600; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--border); color: #c6c8d1; font-size: 10px; white-space: nowrap; }
td:first-child, th:first-child { padding-left: 17px; }
.table-primary { color: var(--text); font-weight: 600; }
.table-secondary { margin-top: 3px; color: var(--muted); font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; color: #bfdbfe; background: var(--accent-soft); font-size: 8px; font-weight: 600; }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.yellow { color: var(--yellow); background: var(--yellow-soft); }
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.neutral { color: #b2b5c0; background: rgba(255,255,255,.07); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.table-panel { overflow: hidden; }
.table-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.workspace-hero { position: relative; overflow: hidden; margin-bottom: 17px; padding: 20px 21px; border: 1px solid rgba(96,165,250,.18); border-radius: 12px; background: radial-gradient(ellipse at 92% 20%,rgba(59,130,246,.16),transparent 36%),linear-gradient(125deg,#15151d,#111318 64%); }
.workspace-hero:after { content: ''; width: 220px; height: 220px; position: absolute; right: 40px; top: -150px; border: 1px solid rgba(96,165,250,.15); border-radius: 50%; box-shadow: 0 0 0 25px rgba(96,165,250,.025),0 0 0 50px rgba(96,165,250,.02); pointer-events: none; }
.hero-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.hero-label { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: .4px; }
.hero-title { margin: 10px 0 5px; font: 650 17px 'Manrope',sans-serif; letter-spacing: -.45px; }
.hero-copy { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.hero-select { min-width: 190px; }
.workspace-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.mini-stat { padding: 12px 14px; }
.mini-stat span { display: block; color: var(--muted); font-size: 9px; }
.mini-stat strong { display: block; margin-top: 8px; font: 700 19px 'Manrope',sans-serif; letter-spacing: -.5px; }
.call-layout { display: grid; grid-template-columns: minmax(0,1.42fr) minmax(270px,.82fr); align-items: start; gap: 14px; }
.contact-card { overflow: hidden; }
.contact-top { display: flex; justify-content: space-between; gap: 12px; padding: 17px 18px 14px; border-bottom: 1px solid var(--border); }
.contact-title { margin: 0; font: 650 12px 'Manrope',sans-serif; }
.contact-live { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 9px; }
.contact-empty { min-height: 238px; display: grid; place-items: center; padding: 24px; text-align: center; }
.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 12px; border: 1px solid rgba(96,165,250,.17); border-radius: 14px; color: var(--accent); background: var(--accent-soft); }
.empty-icon .icon { width: 20px; height: 20px; }
.contact-empty h3 { margin: 0 0 6px; font: 650 13px 'Manrope',sans-serif; }
.contact-empty p { max-width: 280px; margin: 0 auto 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.contact-body { padding: 18px; }
.contact-identity { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.contact-avatar { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; color: #bfdbfe; background: linear-gradient(145deg,#1e3a8a,#172554); font: 700 14px 'Manrope',sans-serif; }
.contact-name { margin: 0 0 5px; font: 700 17px 'Manrope',sans-serif; letter-spacing: -.4px; }
.contact-phone { display: flex; align-items: center; gap: 6px; color: #aeb1bd; font-size: 10px; }
.contact-phone .icon { width: 12px; height: 12px; color: var(--green); }
.timer-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid rgba(244,198,107,.14); border-radius: 9px; background: rgba(244,198,107,.055); }
.timer-label { color: #c7b78e; font-size: 9px; }
.timer-digits { color: var(--yellow); font: 700 16px 'Manrope',sans-serif; letter-spacing: 1px; }
.contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 3px 0 17px; }
.detail-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.detail-item strong { font-size: 10px; font-weight: 500; }
.form-label { display: block; margin: 0 0 7px; color: #c7c9d2; font-size: 9px; font-weight: 600; }
.form-control { width: 100%; min-height: 36px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); background: #0c0d12; font-size: 10px; }
textarea.form-control { min-height: 66px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 13px; }
.form-group { margin-bottom: 13px; }
.result-actions { display: flex; gap: 8px; padding-top: 5px; }
.result-actions .button-primary { flex: 1; }
.template-box { margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.018); }
.template-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.template-box-head strong { font-size: 9px; }
.template-preview { min-height: 44px; margin: 8px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.whatsapp-action { width: 100%; min-height: 35px; }
.queue-panel { overflow: hidden; }
.queue-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 14px 12px; }
.queue-metric { padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.018); }
.queue-metric span { color: var(--muted); font-size: 9px; }
.queue-metric strong { display: block; margin-top: 6px; font: 700 15px 'Manrope',sans-serif; }
.queue-divider { height: 1px; margin: 0 14px; background: var(--border); }
.queue-list { padding: 5px 14px 8px; }
.queue-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.queue-row:last-child { border-bottom: 0; }
.queue-number { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #a6a9b5; background: var(--surface-3); font-size: 9px; }
.queue-copy { min-width: 0; flex: 1; }
.queue-copy strong { display: block; overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.queue-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.history-empty { padding: 18px 4px; color: var(--muted); font-size: 9px; text-align: center; }
.tip-box { margin: 0 14px 14px; padding: 10px; border: 1px solid rgba(100,217,160,.12); border-radius: 8px; color: #a2b9ad; background: rgba(100,217,160,.045); font-size: 9px; line-height: 1.55; }
.tip-box strong { color: var(--green); font-weight: 600; }
.empty-state { padding: 38px 20px; color: var(--muted); text-align: center; font-size: 10px; }
.empty-state .empty-icon { margin-bottom: 10px; }
.worksheet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.worksheet-card { padding: 15px; }
.worksheet-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.worksheet-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); }
.worksheet-icon .icon { width: 15px; height: 15px; }
.worksheet-card h3 { margin: 0 0 5px; font: 650 12px 'Manrope',sans-serif; }
.worksheet-card p { margin: 0; color: var(--muted); font-size: 9px; }
.worksheet-progress { margin: 14px 0 9px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 8px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 4px; background: #262831; }
.progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#3b82f6,#93c5fd); }
.worksheet-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search-control { width: min(250px,100%); min-height: 33px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); background: var(--bg); font-size: 9px; }
.toolbar-right { display: flex; gap: 7px; align-items: center; }
.import-drop { min-height: 160px; display: grid; place-items: center; margin: 18px; padding: 18px; border: 1px dashed rgba(96,165,250,.35); border-radius: 10px; background: rgba(96,165,250,.035); text-align: center; }
.import-drop .empty-icon { width: 39px; height: 39px; }
.import-drop h3 { margin: 0 0 5px; font-size: 11px; }
.import-drop p { margin: 0 0 10px; color: var(--muted); font-size: 9px; }
.hidden-input { display: none; }
.import-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0 18px 18px; }
.import-summary .queue-metric { text-align: center; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-chip { min-height: 29px; padding: 0 10px; border: 1px solid var(--border); border-radius: 20px; color: var(--muted); background: transparent; font-size: 9px; cursor: pointer; }
.filter-chip.active { color: #bfdbfe; border-color: rgba(96,165,250,.25); background: var(--accent-soft); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.modal { width: min(460px,100%); padding: 18px; border: 1px solid var(--border-strong); border-radius: 13px; background: #15171e; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.modal-head h2 { margin: 0; font: 700 14px 'Manrope',sans-serif; }
.modal-close { border: 0; color: var(--muted); background: none; font-size: 20px; cursor: pointer; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; }
.toast { min-width: 225px; padding: 11px 14px; border: 1px solid rgba(100,217,160,.2); border-radius: 9px; color: #dceee4; background: #141c19; box-shadow: 0 12px 30px rgba(0,0,0,.35); font-size: 10px; animation: toast-in .18s ease-out; }
.toast.error { border-color: rgba(255,123,136,.25); color: #ffdfe2; background: #211518; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-overlay { display: none; }

body { min-width: 0; }
.app-shell { display: flex; min-height: 100vh; }
.main-area { min-height: 100vh; }
.content { width: 100%; }
.sidebar nav { display: grid; gap: 18px; }
.sidebar form { margin-top: 12px; }
.dashboard-layout { display: grid; gap: 14px; }
.dashboard-layout.two-column { grid-template-columns: minmax(0,1.5fr) minmax(280px,.85fr); }
.dashboard-layout.three-column { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-panel { padding: 18px; }
.form-panel .form-control { margin-bottom: 12px; }
.form-control option { background: var(--surface); }
select.form-control { min-height: 37px; }
.panel-flush { overflow: hidden; }
.table-wrap td { vertical-align: middle; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(300px,.85fr) minmax(420px,1.15fr); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 38px; border-right: 1px solid var(--border); background: radial-gradient(ellipse at 30% 35%,rgba(59,130,246,.22),transparent 46%),#0d0e13; }
.auth-aside:after { content: ''; width: 350px; height: 350px; position: absolute; right: -120px; bottom: -180px; border: 1px solid rgba(96,165,250,.16); border-radius: 50%; box-shadow: 0 0 0 35px rgba(96,165,250,.025),0 0 0 70px rgba(96,165,250,.02); pointer-events: none; }
.auth-aside-copy { position: relative; z-index: 1; max-width: 430px; margin: auto 0; }
.auth-mobile-copy { display: none; }
.auth-aside-copy h1 { margin: 0 0 15px; font-size: clamp(32px,4.2vw,52px); line-height: 1.12; letter-spacing: -2px; }
.auth-aside-copy p { max-width: 390px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.auth-aside-foot { position: relative; z-index: 1; color: var(--muted); font-size: 10px; }
.auth-content { display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(390px,100%); }
.auth-card h2 { margin: 0 0 8px; font: 700 22px 'Manrope',sans-serif; letter-spacing: -.5px; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.auth-card .form-group { margin-bottom: 15px; }
.auth-card .form-control { min-height: 40px; }
.auth-card .form-label { margin-bottom: 8px; }
.otp-input { min-height: 48px!important; font: 700 21px 'Manrope',sans-serif!important; text-align: center; letter-spacing: 8px; }
.secret-code { display: block; overflow-wrap: anywhere; margin: 12px 0; padding: 11px; border: 1px solid var(--border-strong); border-radius: 8px; color: #bfdbfe; background: var(--bg); font: 600 12px monospace; }
.flash-message { margin-bottom: 15px; padding: 10px 12px; border: 1px solid rgba(100,217,160,.2); border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 10px; }
.flash-message.error { border-color: rgba(255,123,136,.2); color: var(--red); background: var(--red-soft); }
.field-error { margin-top: 5px; color: var(--red); font-size: 9px; }
.contact-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-form .form-control { width: auto; margin: 0; }
.notice-box { padding: 12px; border: 1px solid rgba(244,198,107,.16); border-radius: 8px; color: #c7b78e; background: var(--yellow-soft); font-size: 10px; line-height: 1.6; }
.actions-cell { display: flex; align-items: center; gap: 5px; }
.token-value { color: #b7bac5; font: 10px monospace; }
.progress-track { overflow: hidden; }
.empty-state { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; flex: 0 0 6px; }
.field-help { margin-top: -6px; margin-bottom: 11px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.pagination { display: flex; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 25px; min-height: 25px; align-items: center; justify-content: center; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--soft); background: var(--surface-2); font-size: 9px; text-decoration: none; }
.pagination [aria-current="page"] span { color: #bfdbfe; border-color: rgba(96,165,250,.25); background: var(--accent-soft); }
.pagination [aria-disabled="true"] span { opacity: .45; }
.button[aria-disabled="true"] { opacity: .48; }
.app-notice { margin-bottom: 15px; }
.content-grid > .panel, .dashboard-layout > .panel { min-width: 0; }
@media (max-width: 820px) {
  .dashboard-layout.two-column { grid-template-columns: 1fr; }
  .dashboard-layout.three-column { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-page { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: #0d0e13; }
  .auth-page::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 35%,rgba(59,130,246,.22),transparent 46%),#0d0e13; pointer-events: none; }
  .auth-page::after { content: ''; width: 350px; height: 350px; position: fixed; z-index: -1; right: -120px; bottom: -180px; border: 1px solid rgba(96,165,250,.16); border-radius: 50%; box-shadow: 0 0 0 35px rgba(96,165,250,.025),0 0 0 70px rgba(96,165,250,.02); pointer-events: none; }
  .auth-aside { position: relative; inset: auto; display: block; flex: 0 0 auto; min-height: 0; padding: 20px 22px 0; border: 0; background: none; }
  .auth-aside:after { display: none; }
  .auth-aside-copy { display: none; }
  .auth-aside-foot { display: none; }
  .auth-content { position: relative; z-index: 1; inset: auto; display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 20px 22px 24px; transform: translateY(-34px); }
  .auth-mobile-copy { display: block; width: min(390px,100%); }
  .auth-mobile-copy .eyebrow { margin-bottom: 5px; font-size: 8px; }
  .auth-mobile-copy h1 { margin: 0 0 6px; font: 700 22px/1.15 'Manrope',sans-serif; letter-spacing: -.6px; }
  .auth-mobile-copy p { max-width: 380px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
}
@media (max-width: 540px) {
  .dashboard-layout.three-column { grid-template-columns: 1fr; }
  .auth-content { gap: 16px; }
  .inline-form { flex-wrap: wrap; }
}

@media (max-width: 1100px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .main-area { width: calc(100% - 220px); margin-left: 220px; }
  .content { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .content-grid { grid-template-columns: minmax(0,1.2fr) minmax(260px,.9fr); }
  .worksheet-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 250px; }
  .sidebar.open { transform: translateX(0); }
  .main-area { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; margin-right: 10px; }
  .topbar { justify-content: flex-start; padding: 0 18px; }
  .crumbs { flex: 1; }
  .live-status { display: none; }
  .content { padding: 24px 18px 40px; }
  .content-grid, .call-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mobile-overlay.show { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.56); }
}
@media (max-width: 540px) {
  .topbar { height: 58px; padding: 0 13px; }
  .content { padding: 20px 13px 34px; }
  .page-heading { flex-direction: column; margin-bottom: 18px; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .select-control { max-width: 105px; padding-left: 7px; font-size: 9px; }
  .topbar-actions > .icon-button { width: 31px; height: 31px; }
  .crumbs { gap: 5px; font-size: 9px; }
  .stat-grid { gap: 8px; }
  .stat-card { min-height: 105px; padding: 12px; }
  .stat-value { font-size: 21px; }
  .workspace-hero { padding: 16px; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .hero-select { width: 100%; }
  .contact-body { padding: 14px; }
  .worksheet-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-right { width: 100%; }
  .search-control { width: 100%; }
  .chart-panel { min-height: auto; }
  .chart-svg { height: 155px; }
}
