/* Figma Make parity overrides for the shared shell, Dashboard, and Inbox. */
.topbar { height:64px; }
#app-content { min-height:calc(100vh - 64px); padding:24px; }
.sidebar { padding:12px 12px 16px; }
.brand { min-height:56px; margin:0 8px 16px; }
.nav-link { height:44px; }
.dashboard-frame { max-width:1500px; margin:0 auto; }
.inbox-frame { max-width:1600px; margin:0 auto; }
.data-table td.cell-main { display:table-cell; }

/* Dashboard */
.dashboard-frame .page-header { margin-bottom:16px; }
.dashboard-frame .kpi-card { min-height:154px; padding:20px; box-shadow:none; }
.dashboard-frame .kpi-top { margin-bottom:16px; }
.dashboard-frame .kpi-icon { width:36px; height:36px; }
.dashboard-frame .kpi-value { margin-top:0; font-size:24px; }
.dashboard-frame .kpi-trend { margin-top:8px; display:flex; align-items:center; gap:6px; }
.dashboard-frame .card { box-shadow:none; }
.pipeline { gap:8px; }
.stage { position:relative; min-height:92px; border-left-width:4px; padding:16px; }
.stage.quoting { border-color:var(--mid); background:#eef0f2; }
html[data-theme="dark"] .stage.quoting { background:rgba(255,255,255,.1); }
.stage span { font-weight:500; }
.stage strong { font-size:20px; }
.stage small { margin-top:16px; opacity:.7; }
.stage-arrow { position:absolute; top:50%; right:-12px; z-index:2; width:16px; height:16px; display:grid; place-items:center; border-radius:50%; color:var(--mid); background:var(--card); transform:translateY(-50%); }
.stage-arrow svg { width:16px; height:16px; }
.dashboard-lower { grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); }
.bar-chart { display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; padding:20px; }
.bar-axis { height:192px; display:flex; flex-direction:column; justify-content:space-between; padding-bottom:24px; color:var(--mid); font-size:11px; text-align:right; }
.bar-plot { position:relative; height:192px; display:flex; align-items:flex-end; justify-content:space-around; gap:12px; padding-bottom:24px; }
.gridline { position:absolute; left:0; right:0; height:.5px; background:var(--border); }
.gridline.g1 { top:0; }.gridline.g2 { top:56px; }.gridline.g3 { top:112px; }.gridline.g4 { bottom:24px; }
.bar-group { position:relative; z-index:1; height:100%; min-width:0; flex:1; display:flex; flex-direction:column; justify-content:flex-end; }
.bar-stack { display:flex; align-items:flex-end; justify-content:center; gap:4px; }
.bar-stack i { width:14px; display:block; border-radius:3px 3px 0 0; }
.bar-email { background:var(--blue); }.bar-whatsapp { background:var(--success); }.bar-instagram { background:var(--warning); }
.bar-group>span { position:absolute; bottom:-1px; left:50%; color:var(--mid); font-size:10px; white-space:nowrap; transform:translateX(-50%); }
.legend i { border-radius:2px; }
.activity-list { padding:0 20px; }
.activity-row { min-height:0; grid-template-columns:32px 1fr; align-items:start; padding:14px 0; }
.activity-row>span:first-child { width:32px; height:32px; }
.activity-row time { grid-column:2; margin-top:-4px; }
.activity-row strong { font-size:14px; line-height:20px; }
.activity-row small { font-size:12px; }
.activity-footer { height:44px; }
.attention-card { margin-top:16px; }
.attention-card .data-table th { height:40px; padding-inline:20px; text-transform:none; letter-spacing:0; font-size:12px; font-weight:500; }
.attention-card .data-table td { height:64px; padding-inline:20px; }
.attention-card .button.text { min-height:32px; border:.5px solid color-mix(in srgb,var(--blue) 30%,transparent); border-radius:8px; padding-inline:12px; }
.agent-summary { min-height:44px; margin-top:16px; border:.5px solid color-mix(in srgb,var(--blue) 20%,transparent); border-radius:12px; padding:12px 16px; color:var(--blue-deep); background:color-mix(in srgb,var(--blue-tint) 60%,transparent); font-size:14px; }
html[data-theme="dark"] .agent-summary { color:#bfdbfe; background:rgba(43,108,176,.1); }

/* Sales flow used by the exported Inbox screen. */
.flow-progress { display:flex; align-items:center; gap:4px; margin-bottom:20px; border:.5px solid var(--border); border-radius:12px; padding:8px; background:var(--card); overflow-x:auto; scrollbar-width:none; }
.flow-progress>span { display:flex; align-items:center; min-width:max-content; }
.flow-progress button { height:36px; display:inline-flex; align-items:center; gap:8px; border:0; border-radius:8px; padding:0 12px; color:var(--charcoal); background:transparent; cursor:pointer; font-size:12px; font-weight:500; }
.flow-progress button i { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:var(--mid); background:var(--app); font-size:10px; font-style:normal; }
.flow-progress button.active { color:white; background:var(--red); }
.flow-progress button.active i { color:var(--red); background:white; }
.flow-progress button.complete { color:var(--success); }
.flow-progress button.complete i { color:white; background:var(--success); }
.flow-progress b { margin:0 2px; color:var(--mid); font-size:19px; font-weight:400; }

/* Inbox */
.inbox-frame .page-header { margin-bottom:20px; }
.inbox-workspace { min-height:760px; display:grid; grid-template-columns:310px minmax(440px,1fr) 330px; box-shadow:none; }
.inbox-list { min-width:0; border-right:.5px solid var(--border); background:var(--card); }
.inbox-list-head { padding:16px; border-bottom:.5px solid var(--border); }
.inbox-search { height:40px; margin:0; padding:0 12px; }
.inbox-filters { gap:6px; padding:12px 0 0; }
.inbox-filters button { height:28px; border-radius:999px; padding:0 10px; }
.inbox-workspace .thread-list { border-right:0; }
.inbox-workspace .thread { min-height:112px; grid-template-columns:40px minmax(0,1fr); gap:12px; padding:16px; }
.inbox-workspace .thread.active { box-shadow:inset 3px 0 0 var(--blue); }
.thread-avatar { position:relative; width:40px; height:40px; }
.channel-dot { position:absolute; right:-3px; bottom:-3px; width:18px; height:18px; display:grid; place-items:center; border:2px solid var(--card); border-radius:50%; color:white; background:var(--blue); }
.channel-dot.whatsapp { background:var(--success); }.channel-dot.instagram { background:#c13584; }
.channel-dot svg { width:10px; height:10px; }
.thread-meta strong { font-size:13px; }
.thread-preview { margin-top:6px!important; color:var(--charcoal)!important; font-size:11px!important; }
.thread-bottom { display:flex!important; align-items:center; justify-content:space-between; margin-top:9px!important; }
.inbox-workspace .thread em { display:inline-flex; align-items:center; gap:4px; margin-top:0; padding:3px 7px; }
.inbox-workspace .thread em svg { width:11px; height:11px; }
.unread-dot { width:7px; height:7px; border-radius:50%; background:var(--blue); }
.no-conversations { padding:28px 16px; color:var(--mid); font-size:12px; text-align:center; }
.conversation-pane { min-width:0; min-height:760px; background:color-mix(in srgb,var(--app) 70%,transparent); }
.conversation-pane .conversation-head { min-height:72px; padding:12px 20px; }
.conversation-head h2 { font-size:14px; }
.conversation-head p { font-size:11px; }
.conversation-scroll { min-height:240px; flex:1 1 auto; padding:20px; }
.day-label { margin-bottom:20px; }
.customer-message { grid-template-columns:36px minmax(0,1fr); gap:10px; max-width:88%; }
.customer-message .avatar { width:36px; height:36px; }
.customer-message>div>p { padding:16px; font-size:13px; line-height:24px; }
.customer-message time { font-size:10px; }
.attachment { max-width:420px; min-height:56px; margin-top:10px; }
.ai-draft { flex:0 0 auto; margin:0; border:0; border-top:.5px solid var(--border); border-radius:0; padding:16px; background:var(--card); }
.ai-draft>header { grid-template-columns:32px 1fr; border:1px solid color-mix(in srgb,var(--blue) 35%,var(--border)); border-bottom:0; border-radius:12px 12px 0 0; padding:12px 14px; }
.ai-draft textarea { min-height:144px; border:1px solid color-mix(in srgb,var(--blue) 35%,var(--border)); border-top:.5px solid var(--border); border-bottom:.5px solid var(--border); padding:14px; font-family:inherit; font-size:12px; line-height:1.55; }
.ai-draft>footer { display:flex; justify-content:space-between; gap:12px; border:1px solid color-mix(in srgb,var(--blue) 35%,var(--border)); border-top:0; border-radius:0 0 12px 12px; padding:10px 12px; }
.ai-draft>footer>div { display:flex; align-items:center; gap:7px; }
.draft-tool { height:34px; display:inline-flex; align-items:center; gap:6px; border:.5px solid var(--border); border-radius:8px; padding:0 10px; background:var(--card); cursor:pointer; font-size:11px; }
.draft-tool svg { width:14px; height:14px; }
.extract-pane { min-width:0; border-left:.5px solid var(--border); padding:0; background:var(--card); }
.extract-pane>header { min-height:72px; margin:0; padding:12px 20px; border-bottom:.5px solid var(--border); }
.extract-spark { width:34px; height:34px; display:grid; place-items:center; border-radius:8px; color:var(--blue-deep); background:var(--blue-tint); }
.extract-spark svg { width:17px; height:17px; }
.extract-form { gap:12px; padding:16px 20px 0; }
.extract-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.extract-form label { font-size:11px; }
.extract-form input,.extract-form select,.extract-form textarea { min-height:40px; margin-top:6px; padding:9px 10px; background:var(--card); font-size:11px; }
.extract-form textarea { min-height:72px; }
.missing-info { margin:16px 20px 0; padding:14px 16px; }
.missing-info strong { display:flex; align-items:center; gap:6px; }
.missing-info strong svg { width:14px; height:14px; }
.review-state { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:16px 20px 0; border:.5px solid var(--border); border-radius:8px; padding:11px 12px; background:var(--app); }
.review-state strong,.review-state span { display:block; }
.review-state strong { color:var(--blue-deep); font-size:11px; }
.review-state span { color:var(--mid); font-size:10px; text-align:right; }
.review-actions { display:grid; grid-template-columns:auto 1fr 1fr; gap:7px; margin:12px 20px 0; }
.review-actions .button { min-width:0; padding-inline:10px; }
.review-actions .button:disabled,.ai-draft .button:disabled { opacity:.48; cursor:not-allowed; }
.review-note { margin:8px 20px 16px; line-height:1.45; }

@media (max-width:1279px) {
  .inbox-workspace { grid-template-columns:280px minmax(430px,1fr); }
  .extract-pane { grid-column:1 / -1; border-top:.5px solid var(--border); border-left:0; }
  .extract-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .extract-pair { display:contents; }
  .extract-form label:last-child { grid-column:1 / -1; }
}

@media (max-width:1120px) {
  .dashboard-lower { grid-template-columns:1fr; }
  .pipeline { grid-template-columns:repeat(3,1fr); }
  .stage-arrow { display:none; }
}

@media (max-width:820px) {
  .inbox-workspace { grid-template-columns:1fr; }
  .inbox-list,.conversation-pane,.extract-pane { border:0; }
  .conversation-pane,.extract-pane { border-top:.5px solid var(--border); }
  .extract-form { grid-template-columns:1fr; }
  .extract-form label:last-child { grid-column:auto; }
  .customer-message { max-width:100%; }
  .review-actions { grid-template-columns:1fr; }
}

@media (max-width:560px) {
  .topbar { min-height:64px; }
  #app-content { padding:18px 14px 82px; }
  .bar-chart { padding:16px 12px; }
  .bar-plot { gap:5px; }
  .bar-stack { gap:2px; }
  .bar-stack i { width:9px; }
  .dashboard-frame .kpi-grid { grid-template-columns:1fr; }
  .pipeline { grid-template-columns:1fr; }
  .ai-draft>footer { align-items:stretch; flex-direction:column; }
  .ai-draft>footer .button.primary { width:100%; }
  .conversation-scroll { padding:14px; }
}
