:root {
  --ink: #17231f;
  --muted: #75817c;
  --line: #e5eae7;
  --surface: #fff;
  --canvas: #f5f7f5;
  --green: #176b51;
  --green-dark: #112f28;
  --mint: #e6f3ed;
  --amber: #b76d16;
  --blue: #31719c;
  --shadow: 0 8px 30px rgba(30, 54, 45, .07);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-screen { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 15% 20%, #244c41 0, #112f28 42%, #0b211c 100%); display: grid; place-items: center; padding: 24px; }
.login-screen[hidden] { display: none; }
.login-language { position: absolute; right: 28px; top: 26px; display: flex; align-items: center; gap: 6px; color: white; font-size: 12px; }
.login-language select { min-width: 82px; height: 36px; margin: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: white; background: rgba(255,255,255,.1); }
.login-brand { position: absolute; left: 34px; top: 30px; display: flex; align-items: center; gap: 11px; color: white; }
.login-brand > span:last-child { display: grid; }
.login-brand strong { font: 700 17px Manrope; }
.login-brand small { color: #9fb5ad; font-size: 10px; margin-top: 2px; }
.login-card { width: min(410px, 100%); background: white; border-radius: 20px; padding: 34px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.login-card h1 { font-size: 29px; }
.login-intro { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 24px; }
.login-card label { display: block; color: #52605b; font-size: 11px; font-weight: 700; margin-top: 14px; }
.login-card input, .login-card select { width: 100%; height: 44px; margin-top: 7px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; background: white; color: var(--ink); }
.login-hint { color: var(--muted); font-size: 10px; margin: 11px 0 0; }
.login-error { min-height: 17px; color: #a64332; font-size: 11px; margin: 7px 0; }
.login-button { width: 100%; }
.demo-divider { display: flex; align-items: center; gap: 10px; margin: 21px 0 12px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-logins { display: grid; gap: 7px; }
.demo-login { width: 100%; display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); background: #f9fbf9; border-radius: 9px; padding: 8px 10px; text-align: left; color: var(--ink); }
.demo-login:hover { border-color: #8bb7a5; background: var(--mint); }
.demo-login i { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #dce9d7; color: var(--green-dark); font-style: normal; font-size: 8px; font-weight: 700; }
.demo-login span { display: grid; }
.demo-login strong { font-size: 11px; }
.demo-login small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.demo-login b { color: var(--green); font-size: 17px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--green-dark); color: white; display: flex; flex-direction: column; padding: 30px 18px 22px; z-index: 5; }
.brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 12px; padding: 0 10px 32px; line-height: 1.05; letter-spacing: -.02em; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: #cae25d; color: var(--green-dark); display: grid; place-items: center; font: 700 14px Manrope; }
.brand strong { font-family: Manrope; font-size: 17px; }
.nav { display: grid; gap: 7px; }
.nav-item { width: 100%; border: 0; color: #b9c8c3; background: transparent; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; text-align: left; font-weight: 500; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.1); }
.nav-item.active { box-shadow: inset 3px 0 #cce45e; }
.nav-icon { width: 20px; text-align: center; font-size: 20px; }
.sidebar-bottom { margin-top: auto; }
.profile { border-top: 1px solid rgba(255,255,255,.12); margin-top: 12px; padding: 20px 4px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #dbe99c; color: var(--green-dark); font-size: 12px; font-weight: 700; }
.profile div:nth-child(2) { display: grid; font-size: 12px; }
.profile span { color: #9eafa9; margin-top: 3px; }
.profile button { border: 0; background: transparent; color: #b9c8c3; margin-left: auto; }
main { margin-left: 236px; min-height: 100vh; }
.topbar { min-height: 104px; padding: 25px 36px 20px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: sticky; top: 0; z-index: 4; backdrop-filter: blur(10px); }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 700 27px Manrope; margin-bottom: 0; letter-spacing: -.04em; }
h2 { font: 700 20px Manrope; margin-bottom: 5px; letter-spacing: -.03em; }
.eyebrow { margin-bottom: 5px; color: var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.header-actions { display: flex; align-items: center; gap: 11px; }
.language-control { height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--green); }
.language-control span { font-weight: 700; font-size: 13px; }
.language-control select { min-width: 76px; height: 34px; margin: 0; padding: 0 5px; border: 0; background: transparent; font-size: 12px; }
.search { width: 255px; height: 42px; border: 1px solid var(--line); background: #fafbfa; border-radius: 11px; display: flex; align-items: center; padding: 0 12px; gap: 8px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 13px; }
.icon-button { width: 42px; height: 42px; position: relative; border: 1px solid var(--line); background: white; border-radius: 11px; color: var(--ink); }
.icon-button i { position: absolute; width: 6px; height: 6px; background: #d87948; border-radius: 50%; top: 8px; right: 9px; }
.icon-button b { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; background: #d26743; color: white; border: 2px solid white; font-size: 8px; }
.notification-wrap { position: relative; }
.notification-panel { position: absolute; right: 0; top: 50px; width: 330px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(23,43,36,.18); overflow: hidden; z-index: 20; }
.notification-panel[hidden] { display: none; }
.notification-head { display: flex; justify-content: space-between; padding: 15px; border-bottom: 1px solid var(--line); font-size: 12px; }
.notification-head span { color: var(--muted); font-size: 10px; }
.notification-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notification-item:hover { background: #f7faf8; }
.notification-item:last-child { border-bottom: 0; }
.notification-item div { display: grid; }
.notification-item strong { font-size: 11px; }
.notification-item small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.notification-item time { color: var(--green); font-size: 10px; font-weight: 700; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; min-height: 42px; padding: 0 17px; font-weight: 600; }
.primary-button { color: white; background: var(--green); box-shadow: 0 5px 12px rgba(23,107,81,.18); }
.primary-button:hover { background: #105f48; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.view { display: none; padding: 28px 36px 42px; }
.view.active { display: block; }
.overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px; }
.pipeline-summary { display: none; }
.stat-card { min-height: 126px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.stat-card p { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.stat-card strong { display: block; font: 700 23px Manrope; letter-spacing: -.04em; }
.stat-card small { display: block; color: var(--muted); margin-top: 6px; font-size: 11px; }
.stat-icon { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 18px; }
.stat-icon.green { color: var(--green); background: var(--mint); }
.stat-icon.amber { color: var(--amber); background: #fff1df; }
.stat-icon.blue { color: var(--blue); background: #e7f2f8; }
.progress-card { display: block; }
.progress { height: 7px; margin-top: 14px; background: #e9edeb; border-radius: 9px; overflow: hidden; }
.progress span { display: block; height: 100%; background: #cae25d; border-radius: inherit; transition: width .3s; }
.section-toolbar { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; gap: 20px; }
.section-toolbar p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.filters { display: flex; gap: 9px; }
.filters { flex-wrap: wrap; justify-content: flex-end; }
.filters label { color: var(--muted); font-size: 11px; font-weight: 600; }
select { display: block; min-width: 140px; height: 36px; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--ink); background: white; outline: none; }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); align-items: start; gap: 13px; overflow-x: auto; padding-bottom: 12px; }
.column { min-width: 230px; background: #edf1ee; border: 1px solid #e2e7e4; border-radius: 14px; padding: 12px; min-height: 360px; }
.column.drag-over { outline: 2px solid #6cae94; background: #e7f0eb; }
.column-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 12px; }
.column-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.column-title i { width: 8px; height: 8px; border-radius: 50%; }
.column-count { color: var(--muted); background: rgba(255,255,255,.8); border-radius: 20px; min-width: 23px; height: 23px; display: grid; place-items: center; font-size: 11px; }
.lead-list { display: grid; gap: 10px; min-height: 290px; }
.lead-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 3px 12px rgba(31,50,43,.04); cursor: grab; transition: transform .15s, box-shadow .15s; }
.lead-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31,50,43,.08); }
.lead-card.dragging { opacity: .45; }
.lead-top { display: flex; align-items: start; gap: 10px; }
.company-logo { flex: 0 0 34px; height: 34px; border-radius: 9px; background: #e9efe9; display: grid; place-items: center; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.lead-top h3 { font-size: 13px; margin: 0 0 3px; }
.lead-top p { color: var(--muted); font-size: 11px; margin: 0; }
.priority { margin-left: auto; font-size: 9px; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; padding: 4px 6px; border-radius: 5px; }
.card-actions { display: flex; gap: 3px; margin-left: auto; }
.mini-action { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: #f0f3f1; color: #64706b; font-size: 11px; padding: 0; }
.mini-action:hover { background: #dfe8e3; color: var(--green); }
.mini-action.delete:hover { color: #a54232; background: #fbe7e3; }
.lead-card .priority { margin: 8px 0 0; }
.priority.high { color: #af4d30; background: #ffebe4; }
.priority.medium { color: #9b6a17; background: #fff4d8; }
.priority.low { color: #56716a; background: #edf3f1; }
.brand-badge { display: inline-flex; align-items: center; width: fit-content; margin-top: 9px; padding: 4px 7px; border-radius: 6px; background: #f0f3ef; color: #46564f; font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.brand-badge.uncle-james { background: #e8f2df; color: #52702c; }
.brand-badge.dollee { background: #fff0df; color: #a25e1d; }
.brand-badge.samy { background: #e5f0f6; color: #346a87; }
.brand-badge.boss-chilli { background: #fee7e1; color: #a8442e; }
.type-badge { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 6px; background: #eceff5; color: #536078; font-size: 9px; font-weight: 700; }
.type-badge.existing { background: #e2f1eb; color: #28664f; }
.lead-note { color: #52605b; font-size: 11px; line-height: 1.45; padding: 12px 0; margin: 0; min-height: 45px; }
.lead-location { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.lead-meta { border-top: 1px solid #edf0ee; padding-top: 11px; display: flex; justify-content: space-between; align-items: center; }
.lead-meta strong { font-size: 12px; }
.owner { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.mini-avatar { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #dce9d7; color: var(--green-dark); font-size: 8px; font-weight: 700; }
.followup { margin-top: 9px; color: var(--muted); font-size: 10px; display: flex; gap: 5px; }
.table-card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { text-align: left; padding: 13px 17px; color: var(--muted); background: #fafbfa; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
td { border-top: 1px solid var(--line); padding: 14px 17px; font-size: 12px; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover { background: #f8faf8; }
.table-actions { display: flex; gap: 4px; justify-content: flex-end; }
.customer-cell { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.stage-pill { color: var(--green); background: var(--mint); padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.team-card { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.team-head { display: flex; gap: 11px; align-items: center; }
.team-head .avatar { width: 44px; height: 44px; }
.team-head h3 { margin: 0 0 3px; font-size: 14px; }
.team-head p { margin: 0; color: var(--muted); font-size: 11px; }
.team-stats { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); margin: 18px 0; padding: 14px 0; }
.team-stats div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.team-stats small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.team-stats strong { font: 700 16px Manrope; }
.team-customers { color: var(--muted); font-size: 11px; line-height: 1.8; }
.team-customers b { color: var(--ink); }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.dashboard-controls { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.dashboard-controls label { color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-controls select { min-width: 220px; }
.priority-panel { margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px 21px; box-shadow: var(--shadow); }
.priority-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 16px; }
.priority-heading h2 { margin: 0; }
.priority-heading > span { color: var(--muted); font-size: 10px; }
.priority-values { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.priority-values > div { display: grid; grid-template-columns: 9px 1fr; column-gap: 9px; padding: 14px; border-right: 1px solid var(--line); }
.priority-values > div:last-child { border-right: 0; }
.priority-values span { display: grid; font-size: 11px; font-weight: 700; }
.priority-values small { color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 3px; }
.priority-values strong { grid-column: 2; margin-top: 11px; font: 700 17px Manrope; }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 2px; }
.high-dot { background: #d16b4c; }
.medium-dot { background: #d2a03d; }
.low-dot { background: #7e9d93; }
.total-dot { background: #176b51; }
.priority-total { background: #f0f7f3; }
.sales-welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 21px; margin-bottom: 16px; border-radius: 14px; color: white; background: linear-gradient(120deg, #173c33, #22644f); box-shadow: var(--shadow); }
.sales-welcome[hidden], .sales-only[hidden] { display: none !important; }
.sales-welcome h2 { margin-bottom: 3px; }
.sales-welcome p { color: #b8d0c7; font-size: 11px; margin: 0; }
.sales-welcome .eyebrow { color: #cfe55e; margin-bottom: 5px; }
.sales-quick-actions { display: flex; gap: 8px; }
.sales-quick-actions .secondary-button { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: white; }
body.sales-rep .dashboard-grid { grid-template-columns: 1fr; }
body.sales-rep .recent-panel { grid-column: auto; }
.dashboard-panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 21px; box-shadow: var(--shadow); }
.recent-panel { grid-column: 1 / -1; }
.dashboard-grid .recent-panel { order: -1; }
.panel-heading p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.weekly-panel .panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.weekly-panel .panel-heading .eyebrow { margin-bottom: 5px; color: var(--green); }
.week-count { color: var(--green); background: var(--mint); border-radius: 20px; padding: 7px 10px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.empty-state { padding: 25px; text-align: center; color: var(--muted); font-size: 12px; background: #f8faf8; border-radius: 10px; }
.bar-chart { display: grid; gap: 15px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 90px; align-items: center; gap: 12px; font-size: 11px; }
.bar-row strong { text-align: right; font-size: 11px; }
.bar-track { height: 9px; background: #edf1ee; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: var(--green); }
.stage-summary { display: grid; gap: 10px; }
.stage-row { display: flex; align-items: center; padding: 12px; background: #f7f9f7; border-radius: 10px; }
.stage-row i { width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; }
.stage-row span { color: var(--muted); font-size: 11px; margin-left: auto; }
.followup-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; align-items: center; gap: 15px; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 11px; cursor: pointer; }
.followup-row:hover { color: var(--green); }
.followup-row:first-child { border-top: 0; }
.followup-row span { color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(7,26,21,.55); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: white; border-radius: 18px; box-shadow: 0 25px 70px rgba(0,0,0,.22); }
.compact-modal { width: min(520px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: start; padding: 24px 26px 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; }
.close-button { border: 0; background: #f1f3f2; width: 32px; height: 32px; border-radius: 50%; font-size: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px 26px; }
.form-grid label { font-size: 11px; color: #52605b; font-weight: 600; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; color: var(--ink); outline: 0; background: white; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #6cae94; box-shadow: 0 0 0 3px rgba(108,174,148,.13); }
.form-grid textarea { min-height: 70px; resize: vertical; }
.brand-amounts { border: 1px solid var(--line); border-radius: 11px; padding: 14px; margin: 0; }
.brand-amounts legend { padding: 0 6px; color: #52605b; font-size: 11px; font-weight: 700; }
.brand-amounts > p { color: var(--muted); font-size: 10px; margin: 0 0 11px; }
#brandAmountFields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
.brand-amount-row { display: flex; align-items: center; gap: 8px; }
.brand-amount-row span { flex: 1; color: var(--ink); font-size: 11px; font-weight: 600; }
.brand-amount-row input { width: 110px; margin: 0; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); padding: 16px 26px 22px; }
.modal-spacer { flex: 1; }
.danger-button { border: 1px solid #f0cfc8; background: #fff5f2; color: #a64332; border-radius: 9px; padding: 0 13px; font-size: 11px; font-weight: 700; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; color: white; background: var(--green-dark); padding: 12px 17px; border-radius: 10px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .overview { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: repeat(5, 250px); }
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; width: 100%; height: 68px; inset: auto 0 0; flex-direction: row; padding: 8px; }
  .brand, .sidebar-bottom { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(4, 1fr); }
  body.sales-rep .nav { grid-template-columns: repeat(3, 1fr); }
  .nav-item { justify-content: center; font-size: 11px; padding: 8px 3px; gap: 4px; flex-direction: column; }
  .nav-item.active { box-shadow: inset 0 -3px #cce45e; }
  .nav-icon { font-size: 17px; }
  main { margin: 0 0 68px; }
  .topbar { padding: 14px 16px; min-height: 112px; flex-wrap: wrap; gap: 10px; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .language-control { order: 3; width: 100%; justify-content: center; }
  .language-control select { min-width: 74px; width: auto; }
  .header-actions .search { display: flex; flex: 1; width: auto; }
  .notification-wrap { display: none; }
  .primary-button { padding: 0 12px; }
  .view { padding: 20px 16px; }
  .overview { grid-template-columns: 1fr; }
  .stat-card { min-height: 100px; }
  .section-toolbar { align-items: start; flex-direction: column; }
  .filters { width: 100%; }
  .filters label { flex: 1; }
  .filters select { min-width: 0; width: 100%; }
  .team-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .priority-values { grid-template-columns: 1fr 1fr; }
  .priority-values > div:nth-child(2) { border-right: 0; }
  .priority-values > div { border-bottom: 1px solid var(--line); }
  .priority-values > div:nth-child(3), .priority-values > div:nth-child(4) { border-bottom: 0; }
  .recent-panel { grid-column: auto; }
  .followup-row { grid-template-columns: 1fr auto; }
  .followup-row span:nth-child(2), .followup-row span:nth-child(3) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  #brandAmountFields { grid-template-columns: 1fr; }
  .login-brand { left: 20px; top: 18px; }
  .login-card { padding: 27px 22px; }
  .sales-welcome { align-items: flex-start; flex-direction: column; }
  .sales-quick-actions { width: 100%; }
  .sales-quick-actions button { flex: 1; }
  .dashboard-controls { justify-content: stretch; }
  .dashboard-controls label, .dashboard-controls select { width: 100%; }
}

/* Readability and responsive refinement */
html { font-size: 16px; }
body { font-size: 15px; line-height: 1.5; }
.view { width: 100%; max-width: 1600px; margin-inline: auto; }
.nav-item { min-height: 44px; font-size: 14px; }
.profile { font-size: 13px; }
.profile div:nth-child(2) { font-size: 13px; }
.profile span { font-size: 12px; }
h1 { font-size: clamp(26px, 2.2vw, 32px); }
h2 { font-size: clamp(20px, 1.6vw, 24px); }
.eyebrow { font-size: 12px; }
.search { height: 46px; }
.search input { font-size: 14px; }
.primary-button, .secondary-button { min-height: 44px; font-size: 14px; }
.stat-card p { font-size: 13px; }
.stat-card strong { font-size: clamp(22px, 2vw, 27px); }
.stat-card small { font-size: 12px; line-height: 1.4; }
.section-toolbar p { font-size: 14px; }
.filters label { font-size: 12px; }
select { height: 40px; font-size: 13px; }
.column-title { font-size: 14px; }
.column-count { font-size: 12px; }
.lead-top h3 { font-size: 15px; line-height: 1.3; }
.lead-top p { font-size: 12.5px; }
.priority, .brand-badge, .type-badge { font-size: 10.5px; line-height: 1.2; }
.lead-note { font-size: 12.5px; line-height: 1.55; }
.lead-meta strong { font-size: 13px; }
.owner, .followup { font-size: 11.5px; }
.lead-location { font-size: 12px; }
.mini-action { width: 28px; height: 28px; font-size: 13px; }
th { font-size: 11px; padding-block: 15px; }
td { font-size: 13px; line-height: 1.45; }
.stage-pill { font-size: 11px; }
.team-head h3 { font-size: 15px; }
.team-head p, .team-customers { font-size: 12px; }
.team-stats small { font-size: 11px; }
.priority-heading > span { font-size: 11.5px; }
.priority-values span { font-size: 12px; }
.priority-values small { font-size: 10.5px; line-height: 1.35; }
.priority-values strong { font-size: 18px; }
.panel-heading p, .sales-welcome p { font-size: 13px; }
.bar-row { grid-template-columns: 110px 1fr 105px; font-size: 12.5px; }
.bar-row strong, .stage-row span, .followup-row { font-size: 12.5px; }
.notification-head { font-size: 13px; }
.notification-head span, .notification-item time { font-size: 11px; }
.notification-item strong { font-size: 12px; }
.notification-item small { font-size: 10.5px; }
.form-grid label, .brand-amounts legend { font-size: 13px; }
.form-grid input, .form-grid select, .form-grid textarea { min-height: 44px; font-size: 14px; }
.brand-amounts > p { font-size: 12px; }
.brand-amount-row span { font-size: 13px; }
.danger-button { min-height: 44px; font-size: 12px; }
.toast { font-size: 13px; }
.login-intro { font-size: 14px; }
.login-brand small { font-size: 12px; }
.login-card label { font-size: 13px; }
.login-hint, .login-error { font-size: 12px; }
.demo-divider { font-size: 11px; }
.demo-login { min-height: 48px; }
.demo-login strong { font-size: 12.5px; }
.demo-login small { font-size: 11px; }
.week-count { font-size: 11px; }

@media (max-width: 900px) {
  .topbar { padding-inline: 24px; }
  .view { padding-inline: 24px; }
  .overview { gap: 12px; }
  .priority-values { grid-template-columns: 1fr 1fr; }
  .priority-values > div:nth-child(2) { border-right: 0; }
  .priority-values > div { border-bottom: 1px solid var(--line); }
  .priority-values > div:nth-child(3), .priority-values > div:nth-child(4) { border-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .sidebar { height: 74px; }
  main { margin-bottom: 74px; }
  .nav-item { min-height: 58px; font-size: 12px; }
  .nav-icon { font-size: 19px; }
  .topbar { position: static; padding: 16px; min-height: 126px; }
  .topbar h1 { font-size: 25px; }
  .header-actions { gap: 8px; }
  .search { min-width: 0; height: 46px; }
  .header-actions .primary-button { min-width: 108px; white-space: nowrap; font-size: 12.5px; }
  .view { padding: 22px 16px 32px; }
  .stat-card { min-height: 112px; padding: 18px; }
  .stat-card p { font-size: 14px; }
  .stat-card small { font-size: 12.5px; }
  .section-toolbar p { font-size: 13px; }
  .section-toolbar p, .priority-heading > span { display: none; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters label { font-size: 12.5px; }
  .filters select { height: 44px; font-size: 14px; }
  .column { min-width: 278px; }
  .lead-card { padding: 16px; }
  .lead-top h3 { font-size: 16px; }
  .lead-top p, .lead-note { font-size: 13.5px; }
  .followup, .owner { font-size: 12px; }
  .mini-action { width: 32px; height: 32px; }
  .priority-panel, .dashboard-panel { padding: 17px; }
  .priority-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .priority-values { grid-template-columns: 1fr; }
  .priority-values > div { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .priority-values > div:last-child { border-bottom: 0 !important; }
  .bar-row { grid-template-columns: 84px 1fr; gap: 8px; font-size: 12px; }
  .bar-row strong { grid-column: 2; text-align: left; }
  .followup-row { min-height: 50px; padding: 12px 4px; font-size: 13px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-header { padding: 20px 18px 14px; }
  .form-grid { padding: 18px; gap: 16px; }
  .form-grid label { font-size: 13.5px; }
  .modal-actions { position: sticky; bottom: 0; background: white; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .login-screen { align-items: start; overflow-y: auto; padding: 82px 16px 24px; }
  .login-card { width: 100%; }
}
