:root {
  --red: #e52420;
  --red-dark: #b91512;
  --ink: #111215;
  --charcoal: #202124;
  --panel: #ffffff;
  --canvas: #f3f4f5;
  --line: #dfe2e4;
  --muted: #70747a;
  --green: #1f8f4e;
  --amber: #b26a00;
  --blue: #2f67c8;
  --purple: #7552b8;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--ink);
}
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 52px;
  color: #fff;
  background:
    radial-gradient(circle at 25% 20%, rgba(229,36,32,.36), transparent 30%),
    linear-gradient(145deg, #0b0c0e, #242427);
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
}
.login-brand { position: relative; z-index: 2; width: 130px; }
.login-copy { position: relative; z-index: 2; max-width: 650px; margin-top: 20vh; }
.login-copy small { color: var(--red); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
.login-copy h1 { margin: 14px 0 18px; font-size: clamp(3rem, 6vw, 6.2rem); line-height: .95; letter-spacing: -.065em; }
.login-copy p { color: #c4c8cc; font-size: 1.1rem; max-width: 560px; }
.login-point-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 36px; }
.login-point { padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.035); }
.login-point strong { display: block; margin-bottom: 4px; }
.login-point span { color: #aeb3b7; font-size: .84rem; }
.login-panel { display: grid; place-items: center; padding: 36px; background: #000; color:#f6f7f8; }
.login-card { width: min(100%, 470px); padding: 38px; border-radius: 24px; background:linear-gradient(145deg,#111318,#08090b); border: 1px solid rgba(255,255,255,.13); box-shadow: 0 28px 90px rgba(0,0,0,.5),0 0 70px rgba(229,36,32,.07); }
.login-card h2 { margin: 0 0 8px; font-size: 2rem; }
.login-card > p { color: #aeb4bb; margin-top: 0; }
.login-field { display: grid; gap: 8px; margin-top: 18px; }
.login-field label { font-weight: 800; font-size: .9rem; }
.login-field input { width:100%; padding: 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 13px; outline: 0; color:#fff; background:#090a0d; }
.login-field input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(229,36,32,.1); }
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus { -webkit-text-fill-color:#f6f7f8; caret-color:#f6f7f8; -webkit-box-shadow:0 0 0 1000px #090a0d inset; box-shadow:0 0 0 1000px #090a0d inset; transition:background-color 9999s ease-out 0s; }
.password-control { position:relative; }
.password-control input { padding-right:52px; }
.password-toggle { position:absolute; z-index:2; top:50%; right:6px; width:40px; height:40px; padding:0; transform:translateY(-50%); display:grid; place-items:center; box-sizing:border-box; overflow:hidden; border:1px solid #4b515c; border-radius:10px; color:#fff; background:#171a20; box-shadow:0 2px 8px rgba(0,0,0,.36); appearance:none; cursor:pointer; }
.password-toggle:hover,.password-toggle:focus-visible { color:#fff; background:rgba(229,36,32,.22); border-color:rgba(229,36,32,.58); outline:0; }
.password-toggle svg { display:block; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.password-toggle[aria-pressed="true"]::after { content:""; position:absolute; width:22px; height:1.5px; transform:rotate(-42deg); background:currentColor; box-shadow:0 0 0 1px rgba(9,10,13,.55); }
.login-btn { width: 100%; margin-top: 22px; border: 0; border-radius: 999px; padding: 14px; background: var(--red); color: #fff; font-weight: 900; }
.login-btn:hover { background: var(--red-dark); }
.login-btn:disabled { opacity:.62; cursor:wait; }
.login-btn--link { display:block; text-align:center; text-decoration:none; box-sizing:border-box; }
.demo-note { margin-top: 20px; padding: 14px; border-radius: 13px; background: rgba(255,183,77,.08); border: 1px solid rgba(255,183,77,.24); color: #ffd59a; font-size: .85rem; }
.login-error { display: none; margin-top: 14px; padding: 12px; border-radius: 12px; background: rgba(229,36,32,.11); color: #ffb8b5; border: 1px solid rgba(229,36,32,.38); }
.login-error.show { display: block; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  background: #101114;
  color: #fff;
  z-index: 900;
}
.sidebar-brand { height: 78px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { width: 92px; height: 46px; object-fit: contain; object-position: left; }
.sidebar-brand span { font-size: .72rem; color: #aeb2b7; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-nav {
  padding: 18px 12px;
  display: grid;
  gap: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  border: 0;
  border-radius: 12px;
  color: #c9cdd1;
  background: transparent;
  text-align: left;
  font-weight: 750;
}
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { box-shadow: inset 3px 0 0 var(--red); }
.nav-icon { width: 24px; text-align: center; color: var(--red); }
.nav-badge { margin-left: auto; min-width: 24px; padding: 3px 7px; border-radius: 999px; background: rgba(229,36,32,.18); color: #ffaaa7; font-size: .72rem; text-align: center; }
.nav-badge--green { background:#1f8b4c;color:#fff; }
.nav-badge--amber { background:#ba7215;color:#fff; }
.nav-badge--red { background:#c72b27;color:#fff; }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-powered { display:block; margin-top:14px; color:#777; font-size:.64rem; line-height:1.5; text-align:center; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.05); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 900; }
.profile-chip strong { display: block; font-size: .88rem; }
.profile-chip span { color: #aeb2b7; font-size: .74rem; }

.admin-main { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 800;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.4rem; }
.page-heading h1 { margin: 0; font-size: 1.35rem; }
.page-heading p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }
.primary-btn, .secondary-btn, .danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 850;
  border: 1px solid transparent;
}
.primary-btn { color: #fff; background: var(--red); }
.primary-btn:hover { background: var(--red-dark); }
.secondary-btn { background: #fff; border-color: var(--line); color: var(--ink); }
.danger-btn { background: #fff0f0; border-color: #f0bcbc; color: #981d1d; }
.small-btn { min-height: 34px; padding-inline: 12px; font-size: .8rem; border-radius: 10px; }

.admin-content { padding: 28px; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 13px 16px; border-radius: 14px; background: #fff4df; color: #714500; border: 1px solid #efd09a; font-size: .86rem; }
.demo-banner button { border: 0; background: transparent; color: inherit; font-weight: 900; }
.view { display: none; }
.view.active { display: block; }
.view-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.view-header h2 { margin: 0; font-size: 1.7rem; }
.view-header p { margin: 5px 0 0; color: var(--muted); }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 15px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.kpi-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: .82rem; font-weight: 800; }
.kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: rgba(229,36,32,.09); color: var(--red); }
.kpi-value { margin-top: 13px; font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.kpi-meta { margin-top: 5px; color: var(--muted); font-size: .78rem; }
.positive { color: var(--green); }
.negative { color: #b12828; }

.dashboard-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; margin-top: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 1rem; }
.panel-header span { color: var(--muted); font-size: .8rem; }
.panel-body { padding: 20px; }

.chart-bars { height: 250px; display: flex; align-items: flex-end; gap: 18px; padding-top: 20px; }
.chart-column { flex: 1; min-width: 0; text-align: center; }
.chart-bar-wrap { height: 190px; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar { width: min(42px, 70%); min-height: 6px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--red), #a81411); position: relative; }
.chart-bar::after { content: attr(data-value); position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-size: .72rem; font-weight: 850; }
.chart-column span { display: block; margin-top: 8px; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.source-list { display: grid; gap: 15px; }
.source-row { display: grid; grid-template-columns: 92px 1fr 42px; gap: 10px; align-items: center; font-size: .82rem; }
.progress { height: 9px; background: #eceeef; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.source-row b { text-align: right; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: .82rem; }
th { color: var(--muted); font-weight: 850; background: #fafafa; }
tbody tr:hover { background: #fbfbfc; }
.name-cell strong { display: block; }
.name-cell span { color: var(--muted); font-size: .74rem; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new { background: #e9f1ff; color: #295ea8; }
.status-contacted { background: #f1ecff; color: #6e4aae; }
.status-qualified { background: #e8f8ed; color: #287645; }
.status-proposal { background: #fff4df; color: #926000; }
.status-won { background: #e2f8ec; color: #126a3a; }
.status-lost { background: #f8e8e8; color: #9c2525; }
.score { width: 42px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f1f2f3; font-weight: 900; }

.activity-list { display: grid; gap: 14px; }
.activity { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; }
.activity-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #f0f1f2; color: var(--red); }
.activity strong { font-size: .86rem; }
.activity p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.activity time { color: #979ba0; font-size: .72rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select, .form-control { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; outline: 0; }
.filters input:focus, .filters select:focus, .form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,36,32,.08); }
.search-input { flex: 1 1 260px; }

.quick-form { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.quick-form textarea { min-height: 90px; padding: 12px; resize: vertical; }
.quick-form .wide { grid-column: span 2; }
.quick-form .full { grid-column: 1 / -1; }
.field-label { display: grid; gap: 6px; font-size: .78rem; color: var(--muted); font-weight: 800; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(240px,1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kanban-col { min-height: 520px; padding: 12px; border-radius: 16px; background: #e9ebed; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; font-weight: 900; }
.kanban-count { min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: #fff; font-size: .74rem; }
.deal-card { padding: 14px; border-radius: 13px; background: #fff; border: 1px solid #d9dcde; margin-bottom: 10px; box-shadow: 0 7px 18px rgba(0,0,0,.05); }
.deal-card strong { display: block; }
.deal-card p { margin: 5px 0 10px; color: var(--muted); font-size: .78rem; }
.deal-meta { display: flex; justify-content: space-between; gap: 8px; color: #686c71; font-size: .73rem; }

.helper-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 18px; }
.helper-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.helper-card h3 { margin: 0 0 6px; }
.helper-card > p { margin-top: 0; color: var(--muted); font-size: .86rem; }
.helper-form { display: grid; gap: 13px; margin-top: 20px; }
.helper-field { display: grid; gap: 6px; }
.helper-field label { font-size: .78rem; color: var(--muted); font-weight: 850; }
.helper-field input, .helper-field select, .helper-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; }
.helper-field textarea { min-height: 90px; resize: vertical; }
.helper-field input:focus, .helper-field select:focus, .helper-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,36,32,.08); }
.guardrail { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: #f5f5f6; color: #565a5f; font-size: .78rem; }
.guardrail strong { color: var(--ink); }
.prospect-results { display: grid; gap: 12px; }
.prospect { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prospect-top { display: flex; justify-content: space-between; gap: 12px; }
.prospect h4 { margin: 0; }
.prospect p { margin: 6px 0; color: var(--muted); font-size: .82rem; }
.fit-score { min-width: 56px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #e9f7ee; color: #1f7440; font-weight: 900; font-size: .78rem; }
.reason-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.reason-list span { padding: 5px 8px; border-radius: 999px; background: #f0f1f2; color: #5c6065; font-size: .7rem; font-weight: 750; }
.prospect-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.message-preview { padding: 16px; border: 1px dashed #bdc1c4; border-radius: 14px; background: #fafafa; white-space: pre-wrap; color: #3b3d40; font-size: .86rem; }
.helper-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.helper-stat { padding: 14px; border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.helper-stat strong { display: block; font-size: 1.35rem; }
.helper-stat span { color: var(--muted); font-size: .72rem; }

.inbox-layout { display: grid; grid-template-columns: 320px 1fr; min-height: 620px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.thread-list { border-right: 1px solid var(--line); }
.thread-search { padding: 14px; border-bottom: 1px solid var(--line); }
.thread-search input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; }
.thread { padding: 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread:hover, .thread.active { background: #f6f7f7; }
.thread strong { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; }
.thread p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation { display: flex; flex-direction: column; min-width: 0; }
.conversation-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.conversation-head h3 { margin: 0; }
.conversation-head span { color: var(--muted); font-size: .78rem; }
.messages { flex: 1; padding: 20px; background: #f7f8f8; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 72%; padding: 12px 14px; border-radius: 15px; background: #fff; border: 1px solid var(--line); font-size: .84rem; }
.bubble.out { margin-left: auto; background: #ffe9e8; border-color: #f4c3c0; }
.message-compose { padding: 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.message-compose textarea { flex: 1; min-height: 54px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }

.calendar-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.content-card { padding: 16px; border-radius: 15px; background: #fff; border: 1px solid var(--line); }
.content-card time { color: var(--red); font-weight: 900; font-size: .74rem; }
.content-card h3 { margin: 10px 0 6px; font-size: 1rem; }
.content-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.content-status { display: inline-flex; margin-top: 12px; padding: 5px 8px; border-radius: 999px; background: #f0f1f2; font-size: .7rem; font-weight: 850; }

.report-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.report-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.report-card h3 { margin: 0; }
.report-card p { color: var(--muted); font-size: .82rem; }
.metric-list { display: grid; gap: 11px; margin-top: 18px; }
.metric-row { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .82rem; }
.metric-row:last-child { border-bottom: 0; }

.settings-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.settings-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.settings-card h3 { margin-top: 0; }
.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.integration-status { padding: 5px 8px; border-radius: 999px; background: #f4f4f5; color: #666a70; font-size: .7rem; font-weight: 850; }
.toggle { width: 44px; height: 24px; padding: 3px; border-radius: 999px; background: #c9cccf; }
.toggle::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.on { background: var(--red); }
.toggle.on::after { transform: translateX(20px); }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 1200; min-width: 280px; max-width: 420px; padding: 14px 16px; border-radius: 13px; background: #111215; color: #fff; box-shadow: 0 18px 45px rgba(0,0,0,.28); transform: translateY(120px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.code-note { padding: 14px; border-radius: 12px; background: #f5f5f6; border: 1px solid var(--line); color: #555a60; font-size: .8rem; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .calendar-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 1000px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 520px; }
  .login-copy { margin-top: 12vh; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: .22s; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { grid-column: 1; }
  .menu-toggle { display: block; }
  .dashboard-grid, .helper-layout { grid-template-columns: 1fr; }
  .quick-form { grid-template-columns: repeat(2,1fr); }
  .report-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .login-visual { padding: 24px; min-height: 310px; }
  .login-brand { width:118px; }
  .login-copy { margin-top:72px; }
  .login-copy h1 { margin:9px 0 10px; font-size:2.15rem; line-height:1; }
  .login-copy p { margin:0; font-size:.92rem; line-height:1.5; }
  .login-point-grid { display:none; }
  .login-panel { padding: 18px; }
  .login-card { padding: 26px; }
  .topbar { padding-inline: 14px; }
  .page-heading p { display: none; }
  .topbar-actions .secondary-btn { display: none; }
  .admin-content { padding: 16px; }
  .kpi-grid, .helper-stats, .calendar-grid { grid-template-columns: repeat(2,1fr); }
  .quick-form { grid-template-columns: 1fr; }
  .quick-form .wide, .quick-form .full { grid-column: auto; }
  .view-header { flex-direction: column; }
  .inbox-layout { grid-template-columns: 1fr; }
  .thread-list { display: none; }
  .bubble { max-width: 90%; }
}
@media (max-width: 480px) {
  .kpi-grid, .helper-stats, .calendar-grid { grid-template-columns: 1fr; }
  .topbar-actions .icon-btn { display: none; }
}

/* Dashboard additions */
.status { display:inline-flex; align-items:center; min-height:26px; padding:4px 8px; border-radius:999px; font-size:.7rem; font-weight:850; background:#eef0f1; color:#555b60; }
.status.new { background:#eaf1ff; color:#275da8; }
.status.contacted { background:#f4efff; color:#6743a5; }
.status.qualified { background:#e7f6ed; color:#1f7440; }
.status.opportunity { background:#fff2dc; color:#8a5100; }
.status.quoted { background:#ffe8e6; color:#a32a24; }
.status.won { background:#dff5e7; color:#126b34; }
.status.lost { background:#f2f2f3; color:#75797e; }
.score { display:inline-grid; place-items:center; min-width:40px; height:28px; border-radius:9px; font-size:.72rem; font-weight:900; background:#f2f3f4; }
.score.high { background:#e4f5ea; color:#19713a; }
.score.medium { background:#fff2dc; color:#875100; }
.score.low { background:#fdebea; color:#942723; }
.action-link { border:0; background:transparent; color:var(--red); font-weight:850; }
.task-list { display:grid; gap:12px; }
.task { display:flex; gap:11px; align-items:flex-start; padding:12px; border:1px solid var(--line); border-radius:13px; }
.task-dot { width:11px; height:11px; margin-top:5px; flex:0 0 auto; border-radius:50%; background:var(--red); box-shadow:0 0 0 4px rgba(229,36,32,.1); }
.task-dot.amber { background:#d38517; box-shadow:0 0 0 4px rgba(211,133,23,.12); }
.task-dot.green { background:#2d9958; box-shadow:0 0 0 4px rgba(45,153,88,.12); }
.task strong { display:block; font-size:.83rem; }
.task small { display:block; margin-top:3px; color:var(--muted); }
.helper-funnel { display:grid; gap:8px; }
.helper-funnel div { position:relative; display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; overflow:hidden; padding:11px 13px; border-radius:11px; background:#f5f6f6; }
.helper-funnel div::before { content:""; position:absolute; inset:0 auto 0 0; width:var(--fill,70%); background:linear-gradient(90deg,rgba(229,36,32,.12),rgba(229,36,32,.02)); }
.helper-funnel span,.helper-funnel b { position:relative; }
.donut-wrap { display:grid; grid-template-columns:150px 1fr; gap:20px; align-items:center; }
.donut { width:150px; height:150px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--red) 0 36%, var(--blue) 36% 61%, var(--amber) 61% 78%, var(--green) 78% 90%, #a4a8ac 90% 100%); position:relative; }
.donut::after { content:""; width:88px; height:88px; border-radius:50%; background:#fff; position:absolute; }
.donut span { position:relative; z-index:2; font-weight:900; }
.legend { display:grid; gap:9px; }
.legend-row { display:grid; grid-template-columns:10px 1fr auto; gap:8px; align-items:center; font-size:.78rem; }
.legend-dot { width:10px; height:10px; border-radius:3px; background:var(--dot); }
.funnel-list { display:grid; gap:10px; }
.funnel-list div { position:relative; display:grid; grid-template-columns:1fr auto; gap:12px; padding-bottom:15px; }
.funnel-list i { position:absolute; left:0; bottom:0; height:8px; border-radius:99px; background:linear-gradient(90deg,var(--red),#ff7670); }
.analytics-bars { display:grid; gap:14px; }
.analytics-row { display:grid; grid-template-columns:130px 1fr 70px; gap:12px; align-items:center; font-size:.8rem; }
.analytics-track { height:12px; background:#eceeef; border-radius:999px; overflow:hidden; }
.analytics-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--red),#ff7a73); }
.modal { width:min(760px,calc(100% - 28px)); border:0; padding:0; border-radius:22px; box-shadow:0 28px 80px rgba(0,0,0,.28); }
.modal::backdrop { background:rgba(0,0,0,.55); backdrop-filter:blur(3px); }
.modal-card { padding:0; }
.modal-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; padding:22px 24px; border-bottom:1px solid var(--line); }
.modal-head h2 { margin:0; }
.modal-head p { margin:5px 0 0; color:var(--muted); }
.modal-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; padding:24px; }
.modal-grid textarea { min-height:100px; padding:12px; }
.modal-full { grid-column:1/-1; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; padding:18px 24px; border-top:1px solid var(--line); }
@media (max-width:720px){.donut-wrap{grid-template-columns:1fr}.modal-grid{grid-template-columns:1fr}.modal-full{grid-column:auto}.analytics-row{grid-template-columns:100px 1fr 52px}}

/* Secure account and shared footer */
.login-options { display:flex; justify-content:flex-end; margin-top:9px; }
.login-options a { color:var(--red); font-size:.8rem; font-weight:850; }
.powered-note { margin:18px 0 0!important; text-align:center; color:#8a8e93!important; font-size:.7rem!important; }
.powered-note a { color:var(--red); font-weight:850; }
.account-page { min-height:calc(100vh - 52px); display:grid; place-items:center; padding:30px 16px; color:#f6f7f8; background:radial-gradient(circle at 18% 4%,rgba(229,36,32,.18),transparent 27%),linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),#000; background-size:auto,34px 34px,34px 34px,auto; }
.account-card { width:min(100%,520px); padding:36px; border:1px solid rgba(255,255,255,.13); border-radius:24px; background:linear-gradient(145deg,rgba(20,22,26,.98),rgba(7,8,10,.98)); box-shadow:0 28px 90px rgba(0,0,0,.58),0 0 80px rgba(229,36,32,.08); }
.account-logo { width:148px;height:58px;object-fit:contain;object-position:left;margin-bottom:22px;filter:none; }
.account-kicker { margin:0 0 8px;color:var(--red)!important;font-size:.72rem;font-weight:900;letter-spacing:.11em; }
.account-card h1 { margin:0;font-size:2.2rem;letter-spacing:-.04em; }
.account-card > p { color:#aeb4bb; }
.account-form { display:grid;gap:4px;margin-top:24px; }
.account-back { margin:20px 0 0!important;text-align:center;font-size:.8rem; }
.account-back a { color:var(--red);font-weight:850; }
.account-help { margin:18px 0 0!important; padding-top:16px; border-top:1px solid rgba(255,255,255,.09); color:#8f969e!important; font-size:.78rem; line-height:1.55; }
.account-help a { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.login-feedback { display:none; margin-top:14px; padding:14px; border-radius:13px; font-size:.86rem; line-height:1.55; }
.login-feedback.show { display:block; }
.login-feedback.success { color:#c9f7d7; background:rgba(31,143,78,.14); border:1px solid rgba(66,194,117,.35); }
.login-feedback.error { color:#ffb8b5; background:rgba(229,36,32,.11); border:1px solid rgba(229,36,32,.38); }
.legal-footer { padding:18px;text-align:center;color:#777;background:#000;font-size:.78rem; }
.legal-footer a { color:var(--red);font-weight:800; }
@media(max-width:560px){.account-card{padding:25px}.account-page{padding:14px}.login-copy h1{font-size:2.6rem}}
@media(max-width:720px){
  .topbar-actions [data-open-sue] { display:inline-grid!important; min-width:44px; min-height:44px; place-items:center; padding:0 13px; }
}
