:root {
  --bg: #08080c;
  --sidebar: #0d0d13;
  --surface: #111118;
  --surface-2: #16161f;
  --surface-3: #1c1c27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f6f8;
  --muted: #8d8b98;
  --muted-2: #62616c;
  --crimson: #e8214f;
  --crimson-light: #ff5176;
  --crimson-soft: rgba(232, 33, 79, 0.13);
  --green: #29cf79;
  --green-soft: rgba(41, 207, 121, 0.12);
  --amber: #f5b743;
  --violet: #8e6eff;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.hidden { display: none !important; }

.ambient { position: fixed; z-index: -1; width: 460px; height: 460px; border-radius: 50%; filter: blur(130px); pointer-events: none; opacity: .16; }
.ambient-one { top: -200px; right: -120px; background: var(--crimson); }
.ambient-two { bottom: -260px; left: -200px; background: #5420a4; }

.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 800; letter-spacing: .23em; }
.brand-large { font-size: 17px; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 31px; height: 31px; border: 2px solid var(--crimson); border-radius: 50%; box-shadow: 0 0 0 5px var(--crimson-soft); }
.brand-mark::before, .brand-mark span { content: ""; position: absolute; width: 2px; height: 8px; border-radius: 2px; background: var(--crimson-light); transform-origin: bottom center; bottom: 14px; }
.brand-mark span { height: 6px; transform: rotate(105deg); }
.brand-mark::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #fff; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(520px, 1.05fr); }
.auth-story { position: relative; overflow: hidden; display: flex; min-height: 100vh; padding: 54px clamp(48px, 7vw, 110px); flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(circle at 18% 72%, rgba(232,33,79,.19), transparent 33%), linear-gradient(150deg, #12121a, #09090e 70%); }
.auth-story::after { content: ""; position: absolute; width: 540px; height: 540px; right: -245px; bottom: -235px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 65px rgba(255,255,255,.018), 0 0 0 130px rgba(255,255,255,.012); }
.story-copy { position: relative; z-index: 1; max-width: 590px; }
.eyebrow, .panel-kicker { color: var(--crimson-light); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.story-copy h1 { margin: 18px 0 20px; max-width: 580px; font-size: clamp(42px, 5vw, 72px); line-height: .99; letter-spacing: -.055em; }
.story-copy h1 em { display: block; color: var(--crimson-light); font-style: normal; }
.story-copy p { max-width: 500px; color: #aaa8b2; font-size: 17px; line-height: 1.65; }
.story-funnel { position: relative; z-index: 1; display: flex; max-width: 500px; align-items: center; gap: 17px; }
.story-funnel div { display: flex; flex-direction: column; gap: 3px; }
.story-funnel strong { font-size: 26px; letter-spacing: -.04em; }
.story-funnel span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.story-funnel i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--crimson), var(--line-strong)); }
.story-foot { position: absolute; right: 48px; bottom: 24px; color: var(--muted-2); font-size: 10px; letter-spacing: .16em; writing-mode: vertical-rl; }

.auth-panel { display: grid; min-height: 100vh; place-items: center; padding: 48px 32px; }
.auth-card { width: min(100%, 430px); }
.mobile-brand { display: none; margin-bottom: 44px; }
.access-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 7px 11px; color: #bbb9c3; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.access-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.auth-card h2 { margin: 0 0 9px; font-size: 34px; letter-spacing: -.04em; }
.auth-subtitle { margin: 0 0 34px; color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 9px; margin-bottom: 18px; color: #cbc9d1; font-size: 13px; font-weight: 650; }
.input-wrap { display: flex; height: 52px; align-items: center; gap: 11px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap:focus-within { border-color: rgba(232,33,79,.7); background: #15151d; box-shadow: 0 0 0 4px var(--crimson-soft); }
.input-wrap > svg { width: 18px; color: var(--muted); }
.input-wrap input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.input-wrap input::placeholder { color: #565560; }
.icon-button { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: transparent; transition: .2s ease; }
.icon-button:hover, .icon-button.active { color: #fff; border-color: var(--line-strong); background: var(--surface-3); }
.icon-button svg { width: 18px; height: 18px; }
.password-toggle { width: 32px; height: 32px; border: 0; }
.clear-button { padding: 0; color: var(--crimson-light); border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.primary-button, .secondary-button, .whatsapp-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 0 17px; border-radius: 11px; font-weight: 750; transition: transform .2s, background .2s, border-color .2s; }
.primary-button { width: 100%; color: white; border: 1px solid var(--crimson); background: linear-gradient(135deg, #ef315a, #cb143d); box-shadow: 0 12px 30px rgba(232,33,79,.2); }
.primary-button:hover:not(:disabled), .whatsapp-button:hover:not(:disabled) { transform: translateY(-1px); }
.primary-button svg, .secondary-button svg, .whatsapp-button svg { width: 17px; height: 17px; }
.primary-button.small { width: auto; min-height: 42px; }
.secondary-button { color: #d5d3da; border: 1px solid var(--line-strong); background: var(--surface); }
.secondary-button:hover { border-color: rgba(255,255,255,.22); background: var(--surface-2); }
.form-error { min-height: 19px; margin: -9px 0 9px; color: #ff6f89; font-size: 12px; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 26px; color: var(--muted-2); font-size: 11px; text-align: center; }
.security-note svg { width: 15px; }
.password-requirements { display: grid; gap: 6px; margin: -2px 0 18px; padding: 13px 13px 13px 30px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 10px; line-height: 1.4; }
.password-actions { display: grid; grid-template-columns: .55fr 1.45fr; gap: 9px; }
.password-actions .primary-button { min-width: 0; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 238px; padding: 27px 18px 20px; flex-direction: column; border-right: 1px solid var(--line); background: rgba(13,13,19,.97); backdrop-filter: blur(20px); }
.sidebar-brand { padding: 4px 10px 31px; }
.nav-list { display: grid; gap: 7px; }
.nav-item { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; color: var(--muted); border: 1px solid transparent; border-radius: 11px; background: transparent; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #dddbe1; background: rgba(255,255,255,.03); }
.nav-item.active { color: white; border-color: rgba(232,33,79,.18); background: var(--crimson-soft); }
.nav-item.active svg { color: var(--crimson-light); }
.nav-count { margin-left: auto; padding: 3px 7px; color: #c9c7ce; border-radius: 7px; background: var(--surface-3); font-size: 10px; }
.sidebar-bottom { display: grid; gap: 10px; margin-top: auto; }
.system-sidebar-card { display: flex; align-items: center; gap: 10px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.system-sidebar-card div { display: grid; gap: 3px; }
.system-sidebar-card strong { font-size: 11px; }
.system-sidebar-card small { color: var(--muted-2); font-size: 9px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.logout-button { color: #ce778a; }

.main-content { min-height: 100vh; margin-left: 238px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: 70px; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(8,8,12,.87); backdrop-filter: blur(18px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted-2); font-size: 12px; }
.breadcrumb i { font-style: normal; }
.breadcrumb strong { color: #c7c5cc; }
.topbar-actions { display: flex; align-items: center; gap: 19px; }
.live-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.live-status > span:first-child { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.avatar-button { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; text-align: left; }
.avatar-button > span { display: grid; width: 35px; height: 35px; place-items: center; color: white; border: 1px solid rgba(232,33,79,.28); border-radius: 10px; background: var(--crimson-soft); font-size: 11px; font-weight: 800; }
.avatar-button div { display: grid; gap: 2px; }
.avatar-button strong { font-size: 11px; }
.avatar-button small { color: var(--muted-2); font-size: 9px; }
.menu-button { display: none; }

.page-wrap { width: min(100%, 1480px); margin: 0 auto; padding: 38px 34px 24px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 29px; }
.page-heading h1 { margin: 8px 0 7px; font-size: 32px; letter-spacing: -.04em; }
.page-heading h1 span[aria-hidden="true"] { font-size: 25px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 13px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(22,22,31,.84), rgba(15,15,22,.92)); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.metric-card { position: relative; overflow: hidden; display: flex; min-height: 180px; padding: 19px; flex-direction: column; }
.metric-card.featured { border-color: rgba(232,33,79,.24); background: radial-gradient(circle at 90% 0%, rgba(232,33,79,.12), transparent 35%), linear-gradient(145deg, #19141d, #111118); }
.metric-card.featured::after { content: ""; position: absolute; right: -28px; bottom: -40px; width: 100px; height: 100px; border: 1px solid rgba(232,33,79,.16); border-radius: 50%; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { display: inline-grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; }
.metric-icon svg { width: 18px; }
.metric-icon.crimson, .metric-icon.rose { color: var(--crimson-light); background: var(--crimson-soft); }
.metric-icon.violet { color: #ad9aff; background: rgba(142,110,255,.13); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.trend { padding: 5px 7px; border-radius: 7px; font-size: 9px; font-weight: 750; }
.trend.positive { color: var(--green); background: var(--green-soft); }
.metric-label { margin-top: 19px; color: #aaa8b2; font-size: 11px; font-weight: 650; }
.metric-value { margin-top: 4px; font-size: 32px; letter-spacing: -.05em; }
.metric-card > small { margin-top: auto; color: var(--muted-2); font-size: 9px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 13px; margin-bottom: 13px; }
.panel { padding: 21px; }
.panel-heading, .forms-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2, .forms-header h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.025em; }
.date-chip { padding: 6px 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.funnel-list { display: grid; gap: 14px; margin-top: 21px; }
.funnel-row { display: grid; grid-template-columns: 155px 1fr; align-items: center; gap: 15px; }
.funnel-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.funnel-meta span { color: #aaa8b2; font-size: 10px; }
.funnel-meta strong { font-size: 11px; }
.funnel-meta strong small { margin-left: 4px; color: var(--muted-2); font-size: 8px; font-weight: 600; }
.bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.045); }
.bar-track progress { display: block; width: 100%; height: 100%; appearance: none; border: 0; background: transparent; }
.bar-track progress::-webkit-progress-bar { border-radius: 99px; background: transparent; }
.bar-track progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #bb163a, var(--crimson-light)); }
.bar-track progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #bb163a, var(--crimson-light)); }
.bar-track progress.green-bar::-webkit-progress-value { background: linear-gradient(90deg, #159d57, var(--green)); }
.bar-track progress.green-bar::-moz-progress-bar { background: linear-gradient(90deg, #159d57, var(--green)); }
.bar-track progress.failed-bar::-webkit-progress-value { background: linear-gradient(90deg, #b46b17, var(--amber)); }
.bar-track progress.failed-bar::-moz-progress-bar { background: linear-gradient(90deg, #b46b17, var(--amber)); }
.source-list { display: grid; margin-top: 14px; }
.source-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.source-row:last-child { border: 0; }
.source-rank { color: var(--muted-2); font-size: 9px; }
.source-row div { display: grid; gap: 3px; }
.source-row strong { font-size: 10px; }
.source-row small { color: var(--muted-2); font-size: 8px; }
.source-row b { display: grid; width: 25px; height: 25px; place-items: center; color: var(--crimson-light); border-radius: 8px; background: var(--crimson-soft); font-size: 9px; }
.panel-message { margin: 20px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.error-message { color: #ff7f97; }

.forms-panel { padding: 0; overflow: hidden; }
.forms-header { padding: 21px 21px 16px; }
.forms-header p { margin: 5px 0 0; color: var(--muted-2); font-size: 9px; }
.view-actions { display: flex; gap: 6px; }
.filters-bar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, .32fr)) auto; gap: 8px; padding: 12px 21px; border-block: 1px solid var(--line); background: rgba(255,255,255,.012); }
.search-field { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.search-field svg { width: 15px; color: var(--muted-2); }
.search-field input { width: 100%; border: 0; outline: 0; color: #dddbe1; background: transparent; font-size: 10px; }
.search-field input::placeholder { color: var(--muted-2); }
.filters-bar select { min-width: 0; padding: 0 28px 0 10px; color: #a9a7b0; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface); font-size: 9px; }
.clear-button { padding: 0 8px; color: #9997a1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 12px; color: var(--muted-2); background: rgba(255,255,255,.008); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { height: 69px; padding: 9px 12px; border-top: 1px solid var(--line); color: #b8b6bf; font-size: 9px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,.022); }
.date-cell { display: grid; gap: 3px; white-space: nowrap; }
.date-cell strong { color: #c9c7ce; font-size: 9px; }
.date-cell span { color: var(--muted-2); font-size: 8px; }
.person-cell { display: flex; min-width: 155px; align-items: center; gap: 10px; }
.person-avatar { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; color: #fff; border: 1px solid rgba(232,33,79,.2); border-radius: 9px; background: var(--crimson-soft); font-size: 8px; font-weight: 800; }
.person-cell div { display: grid; gap: 3px; }
.person-cell strong { color: #e3e1e6; font-size: 10px; }
.person-cell span { color: var(--muted-2); font-size: 8px; }
.investment-cell { max-width: 160px; line-height: 1.35; }
.origin-chip { display: inline-flex; padding: 5px 7px; color: #c7bdfd; border: 1px solid rgba(142,110,255,.15); border-radius: 7px; background: rgba(142,110,255,.09); font-size: 8px; font-weight: 750; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 7px; font-size: 8px; font-weight: 750; white-space: nowrap; }
.status-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.status-chip.redirected { color: var(--green); background: var(--green-soft); }
.status-chip.redirected::before { background: var(--green); }
.status-chip.pending { color: var(--amber); background: rgba(245,183,67,.11); }
.status-chip.pending::before { background: var(--amber); }
.status-chip.failed { color: #ff7f97; background: var(--crimson-soft); }
.status-chip.failed::before { background: var(--crimson-light); }
.row-action { width: 31px; height: 31px; }
.empty-state { display: grid; min-height: 300px; place-items: center; align-content: center; padding: 40px; text-align: center; }
.empty-icon { display: grid; width: 45px; height: 45px; place-items: center; color: var(--muted); border-radius: 14px; background: var(--surface-2); }
.empty-icon svg { width: 20px; }
.empty-state h3 { margin: 15px 0 5px; font-size: 15px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 10px; }
.empty-state .secondary-button { min-height: 35px; font-size: 9px; }
.pagination-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 13px 21px; border-top: 1px solid var(--line); }
.pagination-bar span { color: var(--muted); font-size: 9px; }
.pagination-bar .secondary-button { min-height: 34px; padding-inline: 12px; font-size: 9px; }
.page-footer { display: flex; justify-content: space-between; padding: 22px 2px 0; color: var(--muted-2); font-size: 8px; }

.drawer-overlay { position: fixed; z-index: 59; inset: 0; background: rgba(0,0,0,.58); backdrop-filter: blur(3px); }
.lead-drawer { position: fixed; z-index: 60; top: 0; right: 0; display: flex; width: min(470px, 100%); height: 100vh; flex-direction: column; border-left: 1px solid var(--line-strong); background: #101017; box-shadow: -30px 0 70px rgba(0,0,0,.45); transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.lead-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 6px 0 0; font-size: 21px; }
.drawer-body { overflow-y: auto; flex: 1; padding: 22px 25px; }
.drawer-profile { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer-avatar { display: grid; width: 48px; height: 48px; place-items: center; color: #fff; border: 1px solid rgba(232,33,79,.25); border-radius: 14px; background: var(--crimson-soft); font-size: 13px; font-weight: 800; }
.drawer-profile div { display: grid; gap: 4px; }
.drawer-profile strong { font-size: 14px; }
.drawer-profile span { color: var(--muted); font-size: 10px; }
.detail-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border: 0; }
.detail-section h3 { margin: 0 0 13px; color: var(--muted-2); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.detail-item { display: grid; gap: 4px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item span { color: var(--muted-2); font-size: 8px; }
.detail-item strong { color: #d2d0d7; font-size: 10px; line-height: 1.45; }
.drawer-footer { display: grid; grid-template-columns: .72fr 1fr 1.25fr; gap: 9px; padding: 18px 25px; border-top: 1px solid var(--line); background: #0d0d13; }
.whatsapp-button { color: #08120d; border: 1px solid var(--green); background: var(--green); }
.danger-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 14px; color: #ff8299; border: 1px solid rgba(232,33,79,.3); border-radius: 11px; background: var(--crimson-soft); font-weight: 750; }
.danger-button:hover:not(:disabled) { border-color: rgba(232,33,79,.55); background: rgba(232,33,79,.19); }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }

.toast { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: flex; min-width: 260px; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: #191922; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.toast p { margin: 0; color: #d3d1d8; font-size: 10px; }
.toast.error span { background: var(--crimson-light); box-shadow: 0 0 9px var(--crimson); }

body.compact .metric-card { min-height: 153px; }
body.compact td { height: 54px; }
body.compact .page-wrap { padding-top: 27px; }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .filters-bar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, .45fr)) auto; }
  #deadlineFilter { display: none; }
  th:nth-child(5), td:nth-child(5) { display: none; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { padding: 35px 22px; }
  .mobile-brand { display: flex; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-button { display: inline-grid; }
  .breadcrumb { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 22px; }
  .page-wrap { padding-inline: 22px; }
}

@media (max-width: 680px) {
  .topbar { height: 62px; }
  .live-status, .avatar-button div { display: none; }
  .page-wrap { padding: 25px 14px 20px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .secondary-button, .heading-actions .primary-button { flex: 1; padding-inline: 10px; font-size: 10px; }
  .page-heading h1 { font-size: 27px; }
  .metrics-grid { gap: 9px; }
  .metric-card { min-height: 156px; padding: 15px; }
  .metric-value { font-size: 28px; }
  .metric-label { font-size: 10px; }
  .overview-grid { gap: 9px; }
  .funnel-row { grid-template-columns: 120px 1fr; }
  .filters-bar { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .search-field { grid-column: 1 / -1; }
  #investmentFilter, #deadlineFilter { display: none; }
  .forms-header { padding-inline: 14px; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 9px; padding: 10px; }
  tbody tr { position: relative; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  td { height: auto; padding: 5px 0; border: 0; }
  td:nth-child(3), td:nth-child(4), td:nth-child(5) { display: none; }
  td:nth-child(1) { position: absolute; top: 15px; right: 13px; }
  td:nth-child(6), td:nth-child(7) { display: inline-block; margin: 6px 5px 0 0; }
  td:last-child { position: absolute; right: 12px; bottom: 12px; }
  .person-cell { min-width: 0; padding-right: 90px; }
  .date-cell strong { font-size: 8px; }
  .date-cell span { text-align: right; }
  .drawer-footer { grid-template-columns: 1fr; }
  .page-footer { gap: 5px; flex-direction: column; text-align: center; }
}

@media (max-width: 430px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 145px; }
  .auth-card h2 { font-size: 29px; }
}
