:root {
  --brand-950: #31003f;
  --brand-900: #470052;
  --brand-800: #5c075f;
  --brand-700: #77106f;
  --brand-600: #98207f;
  --brand-500: #c12591;
  --brand-100: #f7e7f2;
  --brand-50: #fcf5fa;
  --ink-950: #1d1820;
  --ink-800: #352f38;
  --ink-600: #68616c;
  --ink-500: #827b86;
  --surface: #ffffff;
  --canvas: #f7f7f9;
  --canvas-strong: #f0eff3;
  --line: #e7e4e9;
  --line-strong: #d9d5dc;
  --success: #137a50;
  --success-soft: #e7f6ef;
  --danger: #b4233c;
  --danger-soft: #fcebee;
  --warning: #9a5b0a;
  --shadow-sm: 0 1px 2px rgba(35, 20, 40, .04), 0 5px 16px rgba(35, 20, 40, .035);
  --shadow-md: 0 14px 40px rgba(41, 16, 48, .09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  font-family: "Segoe UI", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-950);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink-950); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(193, 37, 145, .22); outline-offset: 2px; }

/* Application shell */
.app-body { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; inset: 0 auto 0 0; height: 100vh; padding: 18px 12px 14px; color: #fff; background: linear-gradient(180deg, var(--brand-950), #4b0756 58%, #390041); display: flex; flex-direction: column; z-index: 30; border-right: 1px solid rgba(255,255,255,.08); }
.brand { display: block; height: 92px; margin: 0 4px 20px; border-radius: var(--radius-md); overflow: hidden; background: #590160; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; padding: 5px; }
.sidebar nav { display: grid; gap: 3px; }
.nav-label { margin: 4px 11px 7px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 22px; }
.sidebar nav a { position: relative; min-height: 42px; padding: 0 11px; border-radius: 9px; display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.73); font-size: 13.5px; font-weight: 620; transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar nav a.active { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.055); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; width: 3px; height: 22px; border-radius: 0 5px 5px 0; background: #f1b6dd; }
.nav-icon { width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; color: rgba(255,255,255,.67); font-size: 17px; font-weight: 400; }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a.active .nav-icon { color: #fff; }
.sidebar-user { margin-top: auto; min-height: 62px; padding: 11px 8px 7px; border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 34px minmax(0,1fr) 28px; align-items: center; gap: 9px; }
.user-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 800; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12.5px; }
.user-copy small { margin-top: 2px; color: rgba(255,255,255,.52); font-size: 10.5px; }
.logout { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: rgba(255,255,255,.55); font-size: 15px; }
.logout:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-backdrop { display: none; }
.shell { min-width: 0; }
.topbar { height: 78px; padding: 0 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.page-heading { min-width: 0; flex: 1; }
.page-eyebrow { display: block; margin-bottom: 3px; color: var(--brand-600); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.today { padding-right: 14px; border-right: 1px solid var(--line); color: var(--ink-500); font-size: 12px; font-variant-numeric: tabular-nums; }
.icon-btn { display: none; border: 0; background: transparent; color: var(--ink-800); font-size: 21px; cursor: pointer; }
.content { width: min(100%, 1360px); margin: 0 auto; padding: 22px 26px 48px; }

/* Buttons and controls */
.btn { min-height: 40px; border: 1px solid transparent; border-radius: 9px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { color: #fff; background: linear-gradient(120deg, var(--brand-600), var(--brand-700)); box-shadow: 0 7px 18px rgba(119, 16, 111, .18); }
.btn.primary:hover { box-shadow: 0 9px 22px rgba(119, 16, 111, .24); }
.btn.secondary { color: var(--brand-800); background: var(--brand-50); border-color: #ead8e7; }
.btn.secondary:hover { background: var(--brand-100); }
.btn.ghost { color: var(--ink-800); background: #fff; border-color: var(--line); }
.btn.whatsapp { color: #146a48; background: #e9f7f0; border-color: #d0ecde; }
.btn.full { width: 100%; }
.link { border: 0; padding: 0; background: none; color: var(--brand-700); font-size: 12px; font-weight: 700; cursor: pointer; }
.danger { color: var(--danger) !important; }

input, select, textarea { width: 100%; min-height: 41px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--ink-950); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #aaa4ad; }
input:hover, select:hover, textarea:hover { border-color: #c9c3cc; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(193,37,145,.1); }
.form-grid { display: grid; gap: 14px; }
.form-grid label { display: grid; gap: 7px; color: var(--ink-800); font-size: 11.5px; font-weight: 700; }
.form-grid label > span { color: var(--brand-500); }
.two-col { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }

/* Cards and data */
.panel { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.panel > header, .panel-heading { min-height: 65px; padding: 16px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.panel header small, .panel-heading small, .muted { color: var(--ink-500); }
.panel header small { font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.metrics article { position: relative; min-height: 126px; padding: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.metrics article::after { content: ""; position: absolute; top: 0; right: 0; width: 58px; height: 58px; background: radial-gradient(circle at top right, rgba(193,37,145,.1), transparent 70%); }
.metrics span, .metrics small { display: block; color: var(--ink-500); font-size: 11.5px; }
.metrics span { font-weight: 650; }
.metrics strong { display: block; margin: 10px 0 6px; color: var(--ink-950); font-size: 25px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metrics small { font-size: 10.5px; }
.period-toolbar { min-height: 62px; margin-bottom: 14px; padding: 10px 13px 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; align-items: end; justify-content: flex-end; gap: 9px; box-shadow: var(--shadow-sm); }
.period-copy { margin-right: auto; align-self: center; }
.period-copy strong { display: block; margin-top: 3px; font-size: 12px; }
.period-toolbar label { display: grid; gap: 4px; color: var(--ink-500); font-size: 9.5px; font-weight: 700; }
.period-toolbar input { min-height: 36px; padding: 7px 9px; font-size: 11px; }
.metric-strip { margin: -3px 0 16px; padding: 0 4px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.metric-strip > div { min-width: 0; padding: 14px 17px; border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip span { color: var(--ink-500); font-size: 10.5px; }
.metric-strip strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dashboard-grid .span-2 { grid-column: span 2; }
.chart-wrap { height: 270px; padding: 17px; }
.chart-wrap.small { height: 225px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.server-chart { height: 270px; padding: 20px 22px 16px; }
.bar-chart { height: 100%; min-width: 0; display: flex; align-items: stretch; justify-content: space-around; gap: 10px; background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),#efedf1 25%); border-bottom: 1px solid var(--line-strong); }
.bar-column { min-width: 36px; max-width: 72px; height: 100%; flex: 1; display: grid; grid-template-rows: 20px minmax(0,1fr) 23px; align-items: end; justify-items: center; }
.bar-column em { color: var(--ink-600); font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.bar-column > span { width: min(34px,70%); min-height: 4px; border-radius: 5px 5px 1px 1px; background: linear-gradient(180deg,var(--brand-500),var(--brand-700)); box-shadow: 0 4px 10px rgba(119,16,111,.13); }
.revenue-bars .bar-column > span { background: linear-gradient(180deg,#d452a8,#9a1d7e); }
.bar-column small { align-self: end; padding-top: 7px; color: var(--ink-500); font-size: 9px; }
.chart-empty { height: 100%; display: grid; place-items: center; align-content: center; color: var(--ink-500); text-align: center; }
.chart-empty strong, .chart-empty span { display: block; }
.chart-empty strong { color: var(--ink-800); font-size: 11.5px; }
.chart-empty span { margin-top: 5px; font-size: 9.5px; }
.funnel-chart { min-height: 225px; padding: 20px 22px; display: grid; align-content: center; gap: 14px; }
.funnel-row { display: grid; grid-template-columns: minmax(150px,220px) 1fr; align-items: center; gap: 14px; }
.funnel-label { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.funnel-label > span { width: 8px; height: 8px; border-radius: 50%; background: var(--status); }
.funnel-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.funnel-label em { color: var(--ink-500); font-size: 9.5px; font-style: normal; }
.funnel-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--canvas-strong); }
.funnel-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--status); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.performance-panel { margin-top: 16px; overflow: hidden; }
.performance-highlights { display: grid; grid-template-columns: minmax(260px,1.35fr) repeat(3,minmax(155px,.75fr)); border-bottom: 1px solid var(--line); background: #fbfafb; }
.performance-highlights > article { min-height: 112px; padding: 17px 19px; border-right: 1px solid var(--line); display: grid; align-content: center; gap: 6px; }
.performance-highlights > article:last-child { border-right: 0; }
.performance-highlights > article > strong { font-size: 20px; letter-spacing: -.025em; }
.performance-highlights > article > small, .performance-label { color: var(--ink-500); font-size: 9.5px; }
.performance-label { font-weight: 750; }
.performance-leader { background: linear-gradient(135deg,#fff 25%,var(--brand-50)); }
.leader-identity, .member-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.leader-identity > span, .member-cell > span { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); font-size: 12px; font-weight: 800; }
.leader-identity strong, .leader-identity small, .member-cell strong, .member-cell small { display: block; }
.leader-identity strong, .member-cell strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; white-space: nowrap; }
.leader-identity small, .member-cell small { margin-top: 2px; color: var(--ink-500); font-size: 8.5px; }
.performance-leader > em { color: var(--brand-800); font-size: 17px; font-style: normal; font-weight: 800; }
.performance-empty strong, .performance-empty small { display: block; }
.performance-empty strong { font-size: 11.5px; }
.performance-empty small { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.performance-table th, .performance-table td { padding-top: 12px; padding-bottom: 12px; }
.performance-table tbody tr.is-leader { background: linear-gradient(90deg,var(--brand-50),#fff 28%); }
.rank-number { min-width: 29px; height: 27px; padding: 0 7px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--canvas-strong); color: var(--ink-700); font-size: 10px; font-weight: 800; }
.is-leader .rank-number { color: var(--brand-800); background: var(--brand-100); }
.share-cell { min-width: 118px; display: flex; align-items: center; gap: 8px; }
.share-cell > span { width: 68px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--canvas-strong); }
.share-cell i { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); }
.share-cell strong { min-width: 38px; color: var(--ink-600); font-size: 9.5px; }
.performance-note { padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink-500); background: #fbfafb; font-size: 9px; }
.quick-list { padding: 4px 19px; }
.quick-list > a { min-height: 62px; padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quick-list > a:last-child { border-bottom: 0; }
.quick-list span strong, .quick-list span small { display: block; }
.quick-list span strong { font-size: 13px; }
.quick-list span small { margin-top: 4px; color: var(--ink-500); font-size: 11px; }
.quick-list em { font-style: normal; font-size: 11px; font-weight: 750; }
.filterbar { margin-bottom: 16px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; align-items: end; gap: 9px; box-shadow: var(--shadow-sm); }
.filterbar label { display: grid; gap: 5px; color: var(--ink-500); font-size: 10.5px; font-weight: 650; }
.filterbar.compact { margin: 0; padding: 13px 19px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.filterbar.compact input { max-width: 310px; }
.lead-filters { display: grid; grid-template-columns: minmax(220px,1.5fr) minmax(150px,.75fr) minmax(170px,.85fr) auto; align-items: end; }
.lead-filters label { display: grid; gap: 4px; }
.lead-filters label > span { color: var(--ink-500); font-size: 9.5px; font-weight: 700; }
.lead-filters input { max-width: none !important; }
.clear-filters, .panel-link { color: var(--brand-700); font-size: 10.5px; font-weight: 700; }
.clear-filters:hover, .panel-link:hover { text-decoration: underline; }
.row-action { width: 27px; height: 27px; border-radius: 7px; display: grid; place-items: center; color: var(--brand-700); background: var(--brand-50); font-weight: 800; }
.table-empty { min-height: 220px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 13px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
th { background: #faf9fb; color: var(--ink-500); font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: #fcfafc; }
tbody tr:last-child td { border-bottom: 0; }
.lead-link strong, .lead-link small { display: block; }
.lead-link strong { color: var(--ink-950); font-size: 12.5px; }
.lead-link small { margin-top: 4px; color: var(--ink-500); font-size: 10.5px; }
.status { display: inline-flex; align-items: center; border: 1px solid color-mix(in srgb, var(--status) 22%, white); border-radius: 999px; padding: 5px 8px; background: color-mix(in srgb, var(--status) 8%, white); color: color-mix(in srgb, var(--status) 82%, #111); font-size: 10.5px; font-weight: 750; }
.pagination { display: flex; gap: 4px; padding: 13px 18px; border-top: 1px solid var(--line); }
.pagination a { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-600); font-size: 11px; font-weight: 650; }
.pagination a:hover { background: var(--canvas-strong); }
.pagination a.active { color: #fff; background: var(--brand-700); }
.empty { padding: 28px; text-align: center; color: var(--ink-500); font-size: 12px; }

/* Kanban */
.workspace-toolbar { min-height: 58px; margin-bottom: 12px; padding: 10px 12px 10px 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: var(--shadow-sm); }
.workspace-toolbar strong, .workspace-toolbar small { display: block; }
.workspace-toolbar strong { margin-top: 2px; font-size: 12px; }
.workspace-toolbar small { margin-top: 2px; color: var(--ink-500); font-size: 9.5px; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px,1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.lane { min-height: 520px; padding: 10px; background: #efedf1; border: 1px solid #e4e1e6; border-radius: var(--radius-md); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.lane.is-drop-target { border-color: var(--brand-500); background: var(--brand-50); box-shadow: inset 0 0 0 2px rgba(152,32,127,.08); }
.lane.is-saving { opacity: .72; pointer-events: none; }
.lane > header { min-height: 40px; padding: 5px 4px 11px; display: flex; align-items: center; justify-content: space-between; }
.lane > header div { display: flex; align-items: center; gap: 8px; }
.lane > header span, .status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--status); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status) 12%, transparent); }
.lane > header strong { font-size: 11.5px; }
.lane > header small { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.7); color: var(--ink-600); font-size: 10px; font-weight: 750; }
.lane-list { min-height: 450px; display: grid; align-content: start; gap: 8px; }
.lead-card { position: relative; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 3px 10px rgba(38,22,43,.04); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.lead-card:hover { transform: translateY(-1px); border-color: #d4c7d4; box-shadow: 0 7px 17px rgba(38,22,43,.07); }
.lead-card.is-dragging { opacity: .34; transform: scale(.98); }
.drag-handle { position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; padding: 6px; border-radius: 7px; display: grid; grid-template-columns: repeat(2,3px); grid-auto-rows: 3px; gap: 2px; cursor: grab; color: var(--ink-500); background: #f7f5f8; transition: color .15s ease, background .15s ease; }
.drag-handle:hover { color: var(--brand-700); background: var(--brand-50); }
.drag-handle:active { cursor: grabbing; }
.drag-handle i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.lead-card > a:first-of-type { display: block; padding-right: 28px; }
.lead-card a strong, .lead-card a small { display: block; }
.lead-card a strong { font-size: 12.5px; }
.lead-card a small { margin: 5px 0 11px; color: var(--ink-500); font-size: 10.5px; }
.lead-card-meta { margin: -2px 0 10px; padding-top: 9px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; color: var(--ink-500); font-size: 9px; }
.lead-card-meta a { color: var(--brand-700); font-weight: 750; }
.lead-card select { min-height: 33px; padding: 6px 8px; background: #faf9fb; font-size: 10.5px; }
.lane-empty { min-height: 78px; border: 1px dashed var(--line-strong); border-radius: 9px; display: grid; place-items: center; color: var(--ink-500); font-size: 9.5px; text-align: center; }

/* Lead details */
.page-context-bar { min-height: 32px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.back-link { color: var(--brand-700); font-size: 11.5px; font-weight: 700; }
.back-link:hover { text-decoration: underline; }
.record-id { color: var(--ink-500); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.lead-summary { margin-bottom: 14px; }
.lead-summary-main { min-height: 82px; padding: 15px 18px; display: flex; align-items: center; gap: 13px; }
.avatar { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); font-size: 17px; font-weight: 800; }
.avatar-large { width: 48px; height: 48px; flex-basis: 48px; }
.lead-identity { min-width: 0; }
.lead-identity h2 { margin: 2px 0 6px; font-size: 18px; line-height: 1.2; }
.section-kicker { display: block; color: var(--ink-500); font-size: 8.5px; font-weight: 800; letter-spacing: .11em; }
.lead-whatsapp { margin-left: auto; }
.lead-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 14px 18px; background: #fbfafb; border-top: 1px solid var(--line); }
.lead-facts > div { min-width: 0; padding: 0 16px; border-right: 1px solid var(--line); }
.lead-facts > div:first-child { padding-left: 0; }
.lead-facts > div:last-child { border-right: 0; }
.lead-facts small, .lead-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-facts small { margin-bottom: 5px; color: var(--ink-500); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.lead-facts strong { font-size: 11.5px; }
.text-danger { color: var(--danger); }
.lead-note { padding: 12px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.lead-note small { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.lead-note p { margin: 0; color: var(--ink-800); font-size: 11.5px; line-height: 1.5; }
.financial-pending { min-height: 54px; margin: -3px 0 14px; padding: 10px 14px; border: 1px solid #efd9b7; border-radius: var(--radius-md); background: #fffaf1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.financial-pending strong, .financial-pending span { display: block; }
.financial-pending strong { color: #7d4c0d; font-size: 11.5px; }
.financial-pending span { margin-top: 2px; color: #94682f; font-size: 9.5px; }
.financial-pending a { color: #7d4c0d; font-size: 10px; font-weight: 750; white-space: nowrap; }
.lead-workspace { display: grid; grid-template-columns: minmax(0,1fr) 360px; align-items: start; gap: 14px; }
.lead-main-column { display: grid; gap: 14px; }
.activity-panel > header, .sales-panel > header { min-height: 60px; }
.activity-panel > header h2, .sales-panel > header h2 { margin-top: 3px; }
.item-count { padding: 5px 8px; border-radius: 999px; background: var(--canvas-strong); color: var(--ink-600); font-size: 9.5px; font-weight: 700; }
.timeline { min-height: 170px; padding: 18px; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 10px; }
.timeline-marker { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline-item > article { padding: 0 0 20px 15px; border-left: 1px solid var(--line); }
.timeline-item > article > header { display: flex; justify-content: space-between; gap: 14px; }
.timeline-item header div strong, .timeline-item header div small { display: block; }
.timeline-item header strong { font-size: 12px; }
.timeline-item header small, .timeline-item time { margin-top: 2px; color: var(--ink-500); font-size: 9.5px; }
.timeline-item p { margin: 8px 0; color: var(--ink-800); font-size: 11.5px; line-height: 1.55; }
.timeline-item em { color: var(--brand-700); font-size: 10px; font-style: normal; font-weight: 650; }
.empty-state-compact { min-height: 132px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state-compact > span { width: 28px; height: 28px; margin-bottom: 8px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.empty-state-compact strong { font-size: 12px; }
.empty-state-compact p { margin: 4px 0 0; color: var(--ink-500); font-size: 10.5px; }
.empty-row { min-height: 74px; display: grid; place-items: center; color: var(--ink-500); font-size: 11px; }
.lead-action-panel { position: sticky; top: 94px; }
.lead-action-panel > header { min-height: 60px; }
.lead-action-panel > header h2 { margin-top: 3px; }
.action-block { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.action-heading { margin-bottom: 13px; display: flex; align-items: center; gap: 9px; }
.action-number { width: 23px; height: 23px; flex: 0 0 23px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-size: 10px; font-weight: 800; }
.action-heading strong, .action-heading small { display: block; }
.action-heading strong { font-size: 11.5px; }
.action-heading small { margin-top: 2px; color: var(--ink-500); font-size: 9.5px; }
.compact-action-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.compact-action-form .btn { min-width: 86px; }
.action-primary .form-grid { gap: 11px; }
.action-primary textarea { min-height: 92px; }
.action-primary label > small { margin-left: 4px; color: var(--ink-500); font-size: 9px; font-weight: 500; }
.action-disclosure { border-top: 0; }
.action-disclosure summary { min-height: 66px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.action-disclosure summary::-webkit-details-marker { display: none; }
.action-disclosure summary strong, .action-disclosure summary small { display: block; }
.action-disclosure summary strong { font-size: 11.5px; }
.action-disclosure summary small { margin-top: 3px; color: var(--ink-500); font-size: 9.5px; }
.action-disclosure summary > span:last-child { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; background: var(--canvas-strong); color: var(--ink-600); transition: transform .15s ease; }
.action-disclosure[open] summary > span:last-child { transform: rotate(45deg); }
.action-disclosure > form { padding: 0 18px 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cancelled { opacity: .5; text-decoration: line-through; }

/* Settings and team */
.team-toolbar .toolbar-actions { display: flex; gap: 8px; }
.team-panel { margin-bottom: 16px; }
.team-table .member-cell > span { width: 32px; height: 32px; flex-basis: 32px; }
.actions-column { width: 1%; text-align: right; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.row-actions form, .role-card footer form { margin: 0; }
.action-button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--brand-700); font-size: 9.5px; font-weight: 750; cursor: pointer; }
.action-button:hover { border-color: #d6c5d7; background: var(--brand-50); }
.action-button.danger { color: var(--danger); }
.action-button:disabled { opacity: .38; cursor: not-allowed; }
.roles-panel { overflow: hidden; }
.role-grid { padding: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; background: #fbfafb; }
.role-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; display: grid; gap: 14px; box-shadow: 0 3px 12px rgba(45,21,48,.035); }
.role-card-master { background: linear-gradient(145deg,#fff 55%,var(--brand-50)); border-color: #e5d5e6; }
.role-card-heading { min-width: 0; display: flex; align-items: center; gap: 9px; }
.role-symbol { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); font-size: 12px; font-weight: 800; }
.role-card-heading > div { min-width: 0; }
.role-card-heading strong, .role-card-heading small { display: block; }
.role-card-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.role-card-heading small { margin-top: 2px; color: var(--ink-500); font-size: 8.5px; }
.role-card-heading em { margin-left: auto; padding: 4px 6px; border-radius: 999px; background: var(--canvas-strong); color: var(--ink-500); font-size: 8px; font-style: normal; font-weight: 750; }
.role-stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 9px; background: #fbfafb; }
.role-stats > div { padding: 9px 10px; border-right: 1px solid var(--line); }
.role-stats > div:last-child { border-right: 0; }
.role-stats strong, .role-stats span { display: block; }
.role-stats strong { font-size: 13px; }
.role-stats span { margin-top: 2px; color: var(--ink-500); font-size: 8.5px; }
.permission-preview { min-height: 50px; display: flex; align-content: start; flex-wrap: wrap; gap: 4px; }
.permission-preview span, .permission-preview small { padding: 4px 6px; border-radius: 6px; background: var(--canvas-strong); color: var(--ink-600); font-size: 8px; }
.role-card footer { padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 5px; }
.toggle-field { grid-column: 1 / -1; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; display: flex !important; align-items: center; gap: 9px !important; background: #fbfafb; }
.toggle-field input { width: 16px; min-height: 16px; }
.toggle-field span { color: var(--ink-800); font-size: 10.5px; }
.wide-modal { width: min(840px,calc(100% - 28px)); }
.role-form { padding: 20px 22px; }
.role-form > .form-grid { margin-bottom: 18px; }
.permissions-editor { display: grid; gap: 12px; }
.permission-group { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.permission-group legend { padding: 0 6px; color: var(--ink-700); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.permission-group > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.permission-option { min-width: 0; min-height: 47px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: flex !important; align-items: center; gap: 9px !important; background: #fbfafb; cursor: pointer; }
.permission-option:has(input:checked) { border-color: #dcbddd; background: var(--brand-50); }
.permission-option input { width: 15px; min-height: 15px; flex: 0 0 15px; accent-color: var(--brand-700); }
.permission-option strong, .permission-option small { display: block; }
.permission-option strong { color: var(--ink-900); font-size: 9.5px; }
.permission-option small { margin-top: 2px; color: var(--ink-500); font-size: 7.5px; }
.split { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 16px; }
.split aside form { padding: 18px; }
.form-panel > form { padding: 18px; }
.form-grid label > small { color: var(--ink-500); font-size: 9px; font-weight: 500; }
.role-badge { padding: 5px 8px; border-radius: 999px; background: var(--canvas-strong); color: var(--ink-800); font-size: 10px; font-weight: 700; }
.availability { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: 10.5px; font-weight: 700; }
.availability::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #aaa4ad; }
.availability.is-active { color: var(--success); }
.availability.is-active::before { background: var(--success); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.settings-list { padding: 7px 18px; }
.settings-list > div { min-height: 49px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list strong { font-size: 12px; }
.settings-list small { margin-left: auto; color: var(--ink-500); font-size: 10.5px; }
.inline-form { padding: 17px; border-top: 1px solid var(--line); grid-template-columns: 2fr 1fr auto; }
.settings-disclosure { border-top: 1px solid var(--line); }
.settings-disclosure summary { min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; color: var(--brand-700); font-size: 11px; font-weight: 750; cursor: pointer; list-style: none; }
.settings-disclosure summary::-webkit-details-marker { display: none; }
.settings-disclosure summary span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-50); transition: transform .15s ease; }
.settings-disclosure[open] summary span { transform: rotate(45deg); }
.settings-disclosure > form { padding: 2px 18px 18px; }

/* Agenda */
.agenda-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.agenda-summary article { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.agenda-summary span, .agenda-summary small { display: block; color: var(--ink-500); font-size: 10px; }
.agenda-summary strong { display: block; margin: 5px 0 3px; font-size: 21px; }
.agenda-summary article.has-alert { border-color: #f1c8d0; background: #fffafb; }
.agenda-summary article.has-alert strong { color: var(--danger); }
.agenda-board { overflow: visible; }
.agenda-toolbar nav { display: flex; gap: 5px; }
.agenda-toolbar .btn { min-width: 38px; height: 36px; min-height: 36px; padding: 0 11px; }
.week-strip { display: grid; grid-template-columns: repeat(7,1fr); border-bottom: 1px solid var(--line); background: #fbfafb; }
.week-strip a { position: relative; min-height: 86px; padding: 12px; border-right: 1px solid var(--line); display: grid; place-items: center; align-content: center; color: var(--ink-500); }
.week-strip a:last-child { border-right: 0; }
.week-strip a:hover { background: var(--brand-50); }
.week-strip a.active { background: #fff; color: var(--brand-700); }
.week-strip a.active::after { content: ""; position: absolute; bottom: -1px; left: 20%; right: 20%; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-600); }
.week-strip a.today strong { box-shadow: 0 0 0 1px var(--brand-500); }
.week-strip span { font-size: 9px; font-weight: 750; text-transform: uppercase; }
.week-strip strong { width: 29px; height: 29px; margin: 3px 0; border-radius: 9px; display: grid; place-items: center; color: var(--ink-950); font-size: 13px; }
.week-strip small { font-size: 8.5px; }
.agenda-workspace { display: grid; grid-template-columns: minmax(0,1fr) 350px; }
.agenda-workspace.agenda-readonly { grid-template-columns: 1fr; }
.day-schedule { min-width: 0; padding: 18px; }
.schedule-heading { min-height: 45px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.schedule-heading h3 { margin: 3px 0 0; font-size: 15px; }
.appointment-list { display: grid; gap: 8px; }
.appointment-card { min-height: 94px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 13px; background: #fff; }
.appointment-card > time { align-self: stretch; padding-right: 12px; border-right: 1px solid var(--line); display: grid; align-content: center; }
.appointment-card > time strong, .appointment-card > time small { display: block; }
.appointment-card > time strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.appointment-card > time small { margin-top: 3px; color: var(--ink-500); font-size: 8.5px; }
.appointment-title { display: flex; align-items: center; gap: 8px; }
.appointment-title h4 { margin: 0; font-size: 12.5px; }
.appointment-type { padding: 4px 6px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.appointment-meta { margin-top: 6px; display: flex; gap: 12px; color: var(--ink-500); font-size: 9.5px; }
.appointment-meta a { color: var(--brand-700); font-weight: 700; }
.appointment-content p { margin: 7px 0 0; color: var(--ink-600); font-size: 10px; }
.appointment-actions { min-width: 78px; display: grid; justify-items: end; gap: 8px; }
.btn.small { min-height: 31px; padding: 0 10px; font-size: 10px; }
.success-button { color: var(--success); background: var(--success-soft); border-color: #cdebdc; }
.appointment-state { padding: 5px 8px; border-radius: 999px; background: var(--canvas-strong); color: var(--ink-500); font-size: 9px; font-weight: 750; }
.appointment-card.status-concluido { opacity: .72; background: #fafcfb; }
.appointment-card.status-cancelado { opacity: .5; }
.agenda-empty { min-height: 210px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.new-appointment { padding: 18px; border-left: 1px solid var(--line); background: #fbfafb; }
.new-appointment > form { gap: 11px; }
.new-appointment textarea { min-height: 72px; }

/* Feedback and modal */
.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 650; }
.alert.success { color: var(--success); background: var(--success-soft); border-color: #cdebdc; }
.alert.error { color: var(--danger); background: var(--danger-soft); border-color: #f5d1d8; }
.floating-alert { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 20; box-shadow: var(--shadow-md); }
dialog { width: min(610px, calc(100% - 28px)); max-height: calc(100vh - 40px); border: 0; border-radius: var(--radius-lg); padding: 0; box-shadow: 0 28px 80px rgba(36,8,42,.3); }
dialog::backdrop { background: rgba(31,10,34,.58); backdrop-filter: blur(3px); }
.modal-card > header, .modal-card > footer { padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-card > header { border-bottom: 1px solid var(--line); }
.modal-card > header small, .eyebrow { color: var(--brand-600); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; }
.modal-card > header h2 { margin: 3px 0 0; font-size: 19px; }
.modal-card > header p { margin: 5px 0 0; color: var(--ink-500); font-size: 11px; }
.modal-card > .form-grid { padding: 21px 22px; }
.modal-card > footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.close { width: 33px; height: 33px; flex: 0 0 33px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-500); font-size: 19px; cursor: pointer; }

/* Login */
.auth-body { min-height: 100vh; background: #f6f4f7; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(370px, 44%) 1fr; }
.login-brand-panel { position: relative; overflow: hidden; min-height: 100vh; padding: 44px 52px; background: linear-gradient(155deg, #32003f, #57005e 55%, #71105f); color: #fff; display: flex; flex-direction: column; }
.login-brand-panel::before { content: ""; position: absolute; width: 440px; height: 440px; right: -220px; top: 22%; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-brand-panel > img { position: relative; width: 184px; height: 184px; border-radius: 20px; object-fit: cover; box-shadow: 0 18px 46px rgba(0,0,0,.18); }
.login-brand-copy { position: relative; margin: auto 0; max-width: 520px; }
.login-brand-copy span { color: #e9b6dc; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.login-brand-copy h2 { margin: 14px 0 16px; font-size: clamp(30px,3.5vw,48px); line-height: 1.06; letter-spacing: -.045em; }
.login-brand-copy p { max-width: 440px; margin: 0; color: rgba(255,255,255,.64); font-size: 14px; line-height: 1.7; }
.login-brand-panel > small { position: relative; color: rgba(255,255,255,.38); font-size: 10px; }
.login-form-panel { min-height: 100vh; padding: 40px; display: grid; place-items: center; background: #fff; }
.login-form-wrap { width: min(390px,100%); }
.login-form-wrap h1 { margin: 10px 0 7px; font-size: 29px; letter-spacing: -.035em; }
.login-form-wrap > p { margin: 0; font-size: 12.5px; }
.login-form { margin-top: 28px; gap: 17px; }
.login-form input { min-height: 47px; }
.login-form .btn { min-height: 47px; margin-top: 4px; }
.login-help { margin-top: 23px !important; text-align: center; color: var(--ink-500); font-size: 10.5px !important; line-height: 1.5; }
.login-mobile-brand { display: none; }

/* Installer and empty state */
.install-card { width: min(620px,calc(100% - 30px)); margin: 40px auto; padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); text-align: center; }
.install-card .brand-mark { width: 92px; height: 92px; margin: 0 auto; border-radius: 16px; background: url('../img/logo-gio.png') center/cover; color: transparent; }
.install-card h1 { margin-bottom: 7px; }
.install-card form { margin-top: 24px; text-align: left; }
.install-card h2 { margin: 14px 0 0; font-size: 14px; }
.empty-state { padding: 60px; text-align: center; }
.empty-state > strong { color: #decfdf; font-size: 58px; }

@media (max-width: 1120px) {
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .performance-highlights { grid-template-columns: 1fr 1fr; }
  .performance-highlights > article:nth-child(2) { border-right: 0; }
  .performance-highlights > article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .lead-workspace { grid-template-columns: 1fr; }
  .lead-action-panel { position: static; }
  .lead-facts { grid-template-columns: repeat(2,1fr); row-gap: 14px; }
  .lead-facts > div:nth-child(2) { border-right: 0; }
  .lead-facts > div:nth-child(n+3) { padding-top: 14px; border-top: 1px solid var(--line); }
  .lead-action-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .lead-action-panel > header { grid-column: 1 / -1; }
  .action-block { border-right: 1px solid var(--line); }
  .action-disclosure { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .agenda-workspace { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .new-appointment { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 860px) {
  .app-body { display: block; }
  .sidebar { position: fixed; width: 224px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 45px rgba(24,8,27,.18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(26,11,29,.38); opacity: 0; pointer-events: none; display: block; transition: opacity .2s ease; }
  .sidebar.open + .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .icon-btn { width: 38px; height: 38px; display: grid; place-items: center; }
  .topbar { padding: 0 18px; }
  .content { padding: 20px 18px 40px; }
  .split, .settings-grid, .dashboard-grid, .quick-grid { grid-template-columns: 1fr; }
  .dashboard-grid .span-2 { grid-column: auto; }
  .lead-filters { grid-template-columns: 1fr 1fr; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .agenda-summary { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 28px; background: linear-gradient(180deg,#f8f3f7,#fff 45%); }
  .login-mobile-brand { display: block; margin-bottom: 32px; text-align: center; }
  .login-mobile-brand img { width: 112px; height: 112px; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow-md); }
}

@media (max-width: 620px) {
  .topbar { height: 70px; gap: 10px; }
  .page-eyebrow, .today { display: none; }
  .topbar h1 { font-size: 17px; }
  .topbar-actions { gap: 0; }
  .topbar .btn.primary { width: 40px; padding: 0; font-size: 0; }
  .topbar .btn.primary span { font-size: 20px; }
  .content { padding: 15px 12px 35px; }
  .metrics { gap: 9px; }
  .metrics article { min-height: 112px; padding: 15px; }
  .metrics strong { font-size: 21px; }
  .server-chart { height: 235px; padding: 15px; overflow-x: auto; }
  .bar-chart { min-width: 360px; }
  .funnel-chart { padding: 16px; }
  .funnel-row { grid-template-columns: 1fr; gap: 6px; }
  .filterbar { flex-wrap: wrap; }
  .filterbar > * { flex: 1 1 130px; }
  .filterbar.compact input { max-width: none; }
  .period-toolbar { flex-wrap: wrap; align-items: end; }
  .period-copy { flex: 1 1 100%; margin: 0 0 3px; }
  .period-toolbar label { flex: 1 1 120px; }
  .period-toolbar .btn { flex: 1 1 100%; }
  .lead-filters { display: grid; grid-template-columns: 1fr; }
  .lead-filters > * { width: 100%; }
  .metric-strip > div { padding: 12px; display: grid; gap: 5px; }
  .performance-highlights { grid-template-columns: 1fr; }
  .performance-highlights > article { min-height: 94px; border-right: 0; border-bottom: 1px solid var(--line); }
  .performance-highlights > article:last-child { border-bottom: 0; }
  .workspace-toolbar { align-items: flex-end; }
  .team-toolbar { align-items: stretch; flex-direction: column; }
  .team-toolbar .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .role-grid, .permission-group > div { grid-template-columns: 1fr; }
  .agenda-summary { gap: 8px; }
  .week-strip { overflow-x: auto; grid-template-columns: repeat(7,minmax(74px,1fr)); }
  .week-strip a { min-height: 76px; padding: 9px; }
  .day-schedule, .new-appointment { padding: 13px; }
  .appointment-card { grid-template-columns: 50px minmax(0,1fr); }
  .appointment-actions { grid-column: 1 / -1; width: 100%; padding-top: 9px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; }
  .lead-summary-main { flex-wrap: wrap; }
  .lead-whatsapp { width: 100%; margin-left: 0; }
  .lead-facts { grid-template-columns: 1fr; padding: 8px 16px; row-gap: 0; }
  .lead-facts > div { padding: 11px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .lead-facts > div:nth-child(n+3) { padding-top: 11px; border-top: 0; }
  .lead-facts > div:last-child { border-bottom: 0; }
  .lead-note { grid-template-columns: 1fr; gap: 5px; }
  .financial-pending { align-items: flex-start; display: grid; }
  .lead-action-panel { display: block; }
  .action-block { border-right: 0; }
  .compact-action-form { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .inline-form { grid-template-columns: 1fr; }
  .timeline-item > article > header { display: grid; gap: 3px; }
  .login-form-panel { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
