:root {
  --ink: #172033;
  --muted: #697386;
  --line: #e7eaf0;
  --canvas: #f3f5f9;
  --paper: #ffffff;
  --navy: #121a2c;
  --navy-soft: #202a41;
  --coral: #ff7058;
  --coral-soft: #fff0ed;
  --violet: #7a63e8;
  --blue: #3387ee;
  --green: #29a37a;
  --amber: #eda63d;
  --red: #e55e67;
  --shadow: 0 14px 32px rgba(28, 38, 59, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 26px 18px 22px;
  display: flex; flex-direction: column; color: #d8deed; background: var(--navy);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
  color: white; background: linear-gradient(145deg, var(--coral), #fc917c);
  font: 800 1.1rem/1 Manrope, sans-serif; box-shadow: 0 8px 20px rgba(255,112,88,.24);
}
.brand-name { color: #fff; font: 800 1rem/1.1 Manrope, sans-serif; }
.brand-sub { color: #8490a8; font-size: .75rem; margin-top: 3px; }
.nav-label { padding: 0 12px 8px; color: #66728a; font-size: .71rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav button {
  width: 100%; border: 0; border-radius: 11px; background: transparent; color: #aeb8cc;
  padding: 11px 12px; display: flex; align-items: center; gap: 11px; text-align: left; font-weight: 600;
}
.nav button:hover { color: #fff; background: var(--navy-soft); }
.nav button.active { color: #fff; background: #29344d; box-shadow: inset 3px 0 var(--coral); }
.nav svg { width: 19px; height: 19px; }
.nav-badge { margin-left: auto; min-width: 23px; padding: 2px 6px; border-radius: 20px; background: var(--coral); color: white; font-size: .72rem; text-align: center; }
.side-foot { margin-top: auto; padding: 15px 12px; border-top: 1px solid #273149; }
.side-foot strong { color: white; display: block; font-size: .9rem; }
.side-foot span { color: #77839a; font-size: .76rem; }

.main { min-width: 0; }
.topbar {
  height: 76px; padding: 0 32px; display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 470px; position: relative; }
.search input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px 11px 40px; background: #f8f9fb; color: var(--ink); }
.search svg { position: absolute; left: 13px; top: 12px; width: 19px; color: #99a2b3; }
.top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: white; border-radius: 12px; color: var(--muted); }
.icon-btn svg { width: 19px; }
.primary-btn { border: 0; border-radius: 12px; padding: 11px 16px; background: var(--coral); color: #fff; font-weight: 700; box-shadow: 0 8px 18px rgba(255,112,88,.22); }
.primary-btn:hover { background: #f6634d; }

.content { padding: 30px 32px 44px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: end; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font: 800 clamp(1.55rem, 2.2vw, 2rem)/1.15 Manrope, sans-serif; letter-spacing: -.035em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head-actions { margin-left: auto; display: flex; gap: 9px; }
.ghost-btn, .small-btn { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 11px; padding: 9px 13px; font-weight: 600; }
.small-btn { padding: 7px 10px; font-size: .84rem; }
.hidden { display: none !important; }
.email-alert { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; margin: -4px 0 18px; padding: 14px 17px; border: 1px solid #ded8fb; border-radius: 15px; background: linear-gradient(100deg,#f4f1ff,#fff); color: inherit; text-align: left; box-shadow: 0 9px 22px rgba(81,61,170,.06); }
.email-alert:hover { border-color: #bfb3f3; }
.email-alert-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--violet); color: white; }
.email-alert-icon svg { width: 21px; }
.email-alert strong { display: block; font: 750 .93rem Manrope,sans-serif; }
.email-alert span { color: var(--muted); font-size: .79rem; }
.email-alert-action { color: var(--violet) !important; font-weight: 800; white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.card { background: var(--paper); border: 1px solid rgba(225,229,237,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { padding: 19px; position: relative; overflow: hidden; }
.stat:after { content: ""; position: absolute; right: -20px; bottom: -32px; width: 88px; height: 88px; border-radius: 50%; background: var(--tint); }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--tint); color: var(--accent); margin-bottom: 17px; }
.stat-icon svg { width: 19px; }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat-value { margin-top: 2px; font: 800 1.7rem/1.2 Manrope, sans-serif; }
.stat-note { margin-top: 8px; color: var(--muted); font-size: .78rem; }
.stat-note strong { color: var(--accent); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 18px; }
.panel { padding: 21px; }
.panel-head { display: flex; align-items: center; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font: 750 1rem/1.2 Manrope, sans-serif; }
.panel-head a, .link-btn { margin-left: auto; color: var(--violet); background: none; border: 0; text-decoration: none; font-weight: 700; font-size: .82rem; }
.date-chip { color: var(--muted); font-size: .79rem; margin-left: 8px; }

.agenda { display: grid; gap: 2px; }
.inline-empty { padding: 28px 12px; color: var(--muted); text-align: center; }
.agenda-row { width: 100%; display: grid; grid-template-columns: 74px 4px 1fr auto 22px; gap: 12px; align-items: center; min-height: 70px; padding: 8px 10px 8px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: inherit; text-align: left; border-radius: 11px; transition: background .15s, transform .15s; }
.agenda-row:hover, .agenda-row:focus-visible { background: #f7f8fb; transform: translateX(3px); outline: none; }
.agenda-row:focus-visible { box-shadow: 0 0 0 3px rgba(122,99,232,.18); }
.agenda-chevron { color: #a6afbe; font-size: 1.35rem; line-height: 1; transition: transform .15s; }
.agenda-row:hover .agenda-chevron { transform: translateX(2px); color: var(--violet); }
.agenda-time { color: var(--muted); font-size: .82rem; }
.agenda-line { width: 4px; height: 45px; border-radius: 6px; background: var(--job); }
.agenda-title { font-weight: 700; }
.agenda-meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; background: var(--pill-bg); color: var(--pill); font-size: .75rem; font-weight: 700; white-space: nowrap; }

.capacity { background: linear-gradient(150deg, #172137, #27334f); color: white; margin-bottom: 18px; overflow: hidden; }
.capacity .panel-head { margin-bottom: 15px; }
.capacity .panel-head h2 { color: white; }
.capacity strong { font: 800 1.65rem/1 Manrope, sans-serif; }
.capacity span { color: #9eabc2; font-size: .8rem; }
.bar { height: 8px; background: #3a4660; border-radius: 10px; overflow: hidden; margin: 14px 0 10px; }
.bar i { display: block; width: 83%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), #ffc15c); }
.capacity-note { display: flex; justify-content: space-between; color: #aab5c9; font-size: .78rem; }
.queue { display: grid; gap: 10px; }
.queue-item { width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.queue-item:first-child { border-top: 0; padding-top: 0; }
.queue-item:hover .queue-title { color: #6750d8; }
.queue-top { display: flex; gap: 8px; align-items: start; }
.queue-title { font-weight: 700; font-size: .9rem; }
.queue-client { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.priority { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 6px; flex: 0 0 auto; }
.queue-date { margin-left: auto; color: var(--muted); font-size: .77rem; white-space: nowrap; }

.schedule-layout { display: grid; grid-template-columns: 254px minmax(760px,1fr); gap: 17px; align-items: start; }
.backlog { padding: 18px; position: sticky; top: 94px; }
.backlog .panel-head { margin-bottom: 12px; }
.filter-tabs { display: flex; gap: 6px; margin-bottom: 13px; }
.filter-tabs button { flex: 1; border: 0; background: #f1f3f7; padding: 7px; border-radius: 8px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.filter-tabs button.active { color: var(--violet); background: #eeeafd; }
.backlog-card { padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--job); border-radius: 11px; margin-top: 9px; background: white; cursor: grab; transition: transform .15s, box-shadow .15s; }
.backlog-card:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(31,42,66,.1); }
.backlog-card.dragging { opacity: .5; }
.backlog-card strong { display: block; font-size: .84rem; }
.backlog-card span { color: var(--muted); font-size: .74rem; }
.unscheduled-count { color: var(--muted); font-size: .74rem; }

.week-card { overflow: hidden; }
.week-toolbar { padding: 15px 17px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.week-toolbar strong { margin: 0 auto; font: 700 .92rem Manrope, sans-serif; }
.arrow-btn { border: 0; background: #f3f5f8; border-radius: 9px; width: 32px; height: 32px; color: var(--muted); }
.week-grid { display: grid; grid-template-columns: 54px repeat(5, minmax(128px,1fr)); min-height: 580px; overflow: auto; }
.time-col, .day-col { position: relative; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, var(--line) 56px); background-size: 100% 56px; }
.time-col { color: #97a0b1; font-size: .7rem; border-right: 1px solid var(--line); padding-top: 56px; }
.time-col div { height: 56px; transform: translateY(-8px); text-align: center; }
.day-col { border-right: 1px solid var(--line); padding-top: 56px; min-height: 560px; }
.day-col.today { background-color: #fffdfc; }
.day-head { position: absolute; left: 0; right: 0; top: 0; height: 56px; background: white; display: grid; place-items: center; border-bottom: 1px solid var(--line); z-index: 2; }
.day-head span { color: var(--muted); font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.day-head strong { font: 800 1rem Manrope, sans-serif; }
.day-col.today .day-head strong { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--coral); }
.work-block { position: absolute; left: 7px; right: 7px; top: calc(56px + var(--start) * 56px); height: calc(var(--length) * 56px - 5px); min-height: 46px; padding: 8px 9px; border-radius: 9px; background: var(--job-bg); border-left: 4px solid var(--job); overflow: hidden; box-shadow: 0 5px 12px rgba(31,42,66,.07); }
.work-block strong { display: block; font-size: .76rem; line-height: 1.2; }
.work-block span { color: var(--muted); font-size: .68rem; }
.day-col.drop-target { outline: 2px dashed var(--coral); outline-offset: -5px; background-color: var(--coral-soft); }
.schedule-tip { padding: 10px 16px; color: var(--muted); font-size: .76rem; border-top: 1px solid var(--line); }

.job-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.65fr); gap: 18px; }
.job-main { display: grid; gap: 18px; align-content: start; }
.job-hero { padding: 24px; margin-bottom: 18px; }
.crumb { color: var(--muted); font-size: .78rem; margin-bottom: 12px; }
.job-title-row { display: flex; align-items: start; gap: 16px; }
.job-title-row h1 { margin: 0 0 6px; font: 800 1.55rem/1.2 Manrope, sans-serif; letter-spacing: -.03em; }
.job-title-row p { color: var(--muted); margin: 0; }
.job-hero-actions { margin-left: auto; display: flex; gap: 9px; }
.job-progress { margin-top: 22px; }
.progress-top { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; }
.progress-bar { height: 8px; border-radius: 8px; background: #eceff4; margin-top: 8px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 44%; background: linear-gradient(90deg,var(--violet),#a890f3); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); padding: 0 21px; }
.tabs button { border: 0; border-bottom: 3px solid transparent; background: none; padding: 15px 0 12px; color: var(--muted); font-weight: 700; font-size: .84rem; }
.tabs button.active { color: var(--violet); border-bottom-color: var(--violet); }
.tabs .task-add { margin-left: auto; color: var(--violet); }
.task-list { padding: 8px 21px 19px; }
.task-row { display: grid; grid-template-columns: 24px 1fr auto auto auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid #cbd1dc; display: grid; place-items: center; color: white; }
.task-row.done .check { background: var(--green); border-color: var(--green); }
.task-row.done .task-name { color: #8d96a6; text-decoration: line-through; }
.task-name { font-weight: 600; font-size: .9rem; }
.task-date { color: var(--muted); font-size: .76rem; }
.task-time { color: var(--ink); font-size: .76rem; background: #f0f2f6; padding: 4px 7px; border-radius: 7px; }
.detail-card { padding: 20px; margin-bottom: 17px; }
.detail-card h3 { margin: 0 0 14px; font: 750 .95rem Manrope, sans-serif; }
.detail-list { display: grid; gap: 13px; }
.detail-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; font-size: .82rem; }
.detail-row span { color: var(--muted); }
.detail-row strong { text-align: right; }
.activity { display: grid; gap: 13px; }
.activity-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.activity-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #eeeafd; color: var(--violet); font-size: .72rem; font-weight: 800; }
.activity-copy { font-size: .8rem; }
.activity-copy span { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.time-panel { overflow: hidden; }
.time-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.time-panel-head h2 { margin: 0; font: 750 1rem Manrope,sans-serif; }
.time-panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.time-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.time-stats div { padding: 16px 18px; background: #fafbfc; }
.time-stats span { display: block; color: var(--muted); font-size: .72rem; }
.time-stats strong { display: block; margin-top: 3px; font: 800 1.1rem Manrope,sans-serif; }
.time-stats .under-time strong { color: var(--green); }
.time-stats .over-time strong { color: var(--red); }
.running-timer { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px 20px; background: #f4f1ff; border-bottom: 1px solid #ded8fb; }
.running-timer span { color: var(--violet); font-size: .78rem; font-weight: 800; }
.running-timer span i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--coral); animation: timerPulse 1.4s infinite; }
.running-timer strong { font: 800 1.1rem Manrope,sans-serif; }
.running-timer small { grid-column: 1/-1; color: var(--muted); margin-top: 2px; }
.running-timer.paused { background: #f7f8fa; border-color: var(--line); }
.running-timer.paused span { color: #657084; }
.time-entry.open-entry { background: #fff9ec; }
.paused-total { grid-column: 1/-1; padding: 9px 12px; color: #745016; background: #fff9ec; border: 1px solid #f1d79c; border-radius: 9px; font-size: .8rem; font-weight: 800; text-align: center; }
.global-timer { display: flex; align-items: center; gap: 16px; padding: 10px 28px; color: #fff; background: #2a3142; box-shadow: 0 6px 16px rgba(21,26,38,.14); }
.global-timer span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.global-timer span i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--coral); animation: timerPulse 1.4s infinite; }
.global-timer b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-timer small { color: #bfc6d5; white-space: nowrap; }
.global-timer strong { margin-left: auto; font: 800 1rem Manrope,sans-serif; }
.global-timer button { padding: 7px 11px; color: #fff; background: transparent; border: 1px solid #70798d; border-radius: 8px; font-weight: 800; cursor: pointer; }
.storage-notice { padding: 10px 28px; color: #8b3c43; background: #fff0f1; border-bottom: 1px solid #f4c9cc; font-size: .84rem; font-weight: 700; }
.app-loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: #30384c; background: #f6f7fb; }
.time-log { padding: 4px 21px 14px; }
.time-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.time-entry:last-child { border-bottom: 0; }
.time-entry strong, .time-entry small { display: block; }
.time-entry strong { font-size: .84rem; }
.time-entry small { color: var(--muted); margin-top: 2px; }
.time-entry b { white-space: nowrap; font-size: .82rem; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { border: 0; background: #f2f4f7; color: #657084; border-radius: 7px; padding: 5px 7px; font-size: .72rem; cursor: pointer; }
.row-actions button:hover { background: #e9e5fb; color: #6750d8; }
.pricing-card { background: linear-gradient(145deg,#fff,#f8f6ff); }
.pricing-value { font: 800 1.22rem Manrope,sans-serif; }
.pricing-card p { color: var(--muted); font-size: .78rem; }
.pricing-fields { display: grid; gap: 12px; padding: 14px; border: 1px solid #e4e0f6; border-radius: 12px; background: #faf9ff; }
.money-input { display: grid; grid-template-columns: 38px 1fr; }
.money-input span { display: grid; place-items: center; border: 1px solid #dfe3eb; border-right: 0; border-radius: 10px 0 0 10px; background: #f3f5f8; color: var(--muted); font-weight: 800; }
.field .money-input input { border-radius: 0 10px 10px 0; }
.pricing-note { display: grid; gap: 3px; padding: 11px 12px; border-radius: 9px; background: #f0f2f5; }
.pricing-note.free { background: #e9f8f2; }
.pricing-note strong { font-size: .8rem; }
.pricing-note span { color: var(--muted); font-size: .74rem; }
.schedule-now { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.schedule-now .checkbox-line { margin: 0; }
.schedule-now .checkbox-line span strong, .schedule-now .checkbox-line span small { display: block; }
.schedule-now .checkbox-line span small { margin-top: 3px; color: var(--muted); font-weight: 500; }
#job-schedule-panel { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.availability-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.availability-heading span { color: var(--muted); font-size: .78rem; }
.schedule-suggestion-list { display: grid; gap: 8px; }
.schedule-suggestion { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.schedule-suggestion:has(input:checked) { border-color: #7a63e8; box-shadow: 0 0 0 2px #eeeafd; }
.schedule-suggestion input { margin-top: 3px; }
.schedule-suggestion strong, .schedule-suggestion small { display: block; }
.schedule-suggestion small { margin-top: 3px; color: var(--muted); }
@keyframes timerPulse { 50% { opacity: .35; transform: scale(.8); } }

.sync-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.sync-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e9f8f2; }
.sync-pill.pending i, .integration-label.pending i { background: #eda63d; box-shadow: 0 0 0 4px #fff6e7; }
.work-block.completed-block { opacity: .62; text-decoration: line-through; }
.primary-btn:disabled, .ghost-btn:disabled { opacity: .55; cursor: not-allowed; }
.client-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.mini-stat { padding: 16px 18px; }
.mini-stat span { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; }
.mini-stat strong { display: block; margin-top: 3px; font: 800 1.25rem Manrope,sans-serif; }
.client-list { overflow: hidden; }
.prospect-list { padding: 19px; margin-bottom: 18px; }
.prospect-list .panel-head { margin-bottom: 8px; }
.prospect-list .panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.prospect-row { width: 100%; display: grid; grid-template-columns: 40px 1fr auto 16px; gap: 12px; align-items: center; padding: 13px 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.prospect-row:hover { background: #fafaff; }
.prospect-row strong, .prospect-row small { display: block; }
.prospect-row small { color: var(--muted); margin-top: 2px; }
.prospect-row b { color: #9da6b5; font-size: 1.2rem; }
.prospect-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #fff0ed; color: var(--coral); font-weight: 800; }
.record-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 25px; margin-bottom: 18px; background: linear-gradient(120deg,#fff,#f8f6ff); }
.record-hero h1 { margin: 4px 0; font: 800 1.55rem Manrope,sans-serif; }
.record-hero p { margin: 0; color: var(--muted); }
.record-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.record-grid { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(360px,1.3fr); gap: 18px; }
.record-grid .detail-card { margin: 0; }
.record-job { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.record-job strong, .record-job small { display: block; }
.record-job small, .muted-copy { color: var(--muted); }
.full-btn { width: 100%; margin-top: 12px; }
.back-link { margin: 0 0 12px; }
.integration-label.light { color: var(--muted); margin: 0; }
.client-toolbar { display: flex; gap: 10px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.client-toolbar input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #f8f9fb; }
.client-toolbar select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: white; color: var(--ink); }
.client-table { width: 100%; border-collapse: collapse; }
.client-table th { padding: 11px 16px; color: var(--muted); background: #f8f9fb; font-size: .71rem; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.client-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-size: .83rem; }
.client-row { cursor: pointer; transition: background .15s; }
.client-row:hover { background: #fafaff; }
.client-name { font-weight: 700; }
.client-email { color: var(--muted); font-size: .74rem; margin-top: 2px; }
.whmcs-id { display: inline-block; margin-top: 4px; color: #677384; background: #f0f2f5; border-radius: 5px; padding: 2px 5px; font-size: .66rem; font-weight: 700; }
.service-count { color: var(--violet); font-weight: 700; }
.balance-due { color: var(--red); font-weight: 700; }
.billing-card { background: linear-gradient(150deg,#182641,#263b62); color: white; }
.billing-card h3 { color: white; }
.billing-card .detail-row span { color: #aab7ce; }
.billing-card .detail-row strong { color: white; }
.billing-card .primary-btn { width: 100%; margin-top: 16px; }
.integration-label { display: flex; align-items: center; gap: 8px; color: #9fb3d3; font-size: .72rem; margin-bottom: 13px; }
.integration-label i { width: 7px; height: 7px; border-radius: 50%; background: #5ee0b4; }
.checkbox-line { display: flex; align-items: start; gap: 9px; padding: 11px 12px; background: #f2f6fc; border-radius: 9px; }
.checkbox-line input { width: auto; margin-top: 3px; }
.checkbox-line span { color: var(--muted); font-size: .77rem; }
.checkbox-line span strong, .checkbox-line span small { display: block; }
.checkbox-line span small { margin-top: 3px; font-weight: 500; }

.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.view-switch button { border: 0; padding: 6px 11px; border-radius: 8px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; }
.view-switch button.active { background: #eeeafd; color: var(--violet); }
.jobs-toolbar { display: flex; gap: 9px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.jobs-toolbar input { flex: 1; min-width: 190px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #f8f9fb; }
.jobs-toolbar select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: white; color: var(--ink); }
.jobs-table-wrap { overflow-x: auto; }
.jobs-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.jobs-table th { padding: 11px 15px; background: #f8f9fb; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
.jobs-table td { padding: 14px 15px; border-top: 1px solid var(--line); font-size: .81rem; }
.job-row { cursor: pointer; transition: background .15s; }
.job-row:hover { background: #fafaff; }
.job-row-title { font-weight: 750; }
.job-row-client { color: var(--muted); font-size: .73rem; margin-top: 2px; }
.due-over { color: var(--red); font-weight: 700; }
.hours-cell strong { display: block; }
.hours-cell span { color: var(--muted); font-size: .7rem; }
.board-view { display: grid; grid-template-columns: repeat(4,minmax(220px,1fr)); gap: 14px; padding-top: 16px; overflow-x: auto; }
.board-col { min-width: 220px; padding: 13px; border-radius: 15px; background: #e9ecf2; }
.board-col-head { display: flex; align-items: center; margin-bottom: 11px; font-weight: 750; font-size: .83rem; }
.board-col-head span { margin-left: auto; color: var(--muted); background: white; border-radius: 20px; padding: 2px 7px; font-size: .7rem; }
.board-job { padding: 12px; margin-top: 9px; border-radius: 11px; background: white; box-shadow: 0 5px 14px rgba(31,42,66,.06); cursor: pointer; }
.board-job strong { display: block; font-size: .82rem; }
.board-job small { display: block; color: var(--muted); margin-top: 3px; }
.board-job-foot { display: flex; align-items: center; margin-top: 10px; color: var(--muted); font-size: .7rem; }
.board-job-foot b { margin-left: auto; color: var(--ink); }

.inbox-layout { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(460px,1.35fr); min-height: 630px; overflow: hidden; }
.empty-inbox { padding: 70px 22px; text-align: center; }
.empty-inbox h2 { margin: 14px 0 4px; font: 800 1.3rem Manrope,sans-serif; }
.empty-inbox p { margin: 0; color: var(--muted); }
.empty-action { width: auto; margin: 18px auto 0; }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: #e9f8f2; color: var(--green); font-size: 1.35rem; font-weight: 800; }
.mail-list { border-right: 1px solid var(--line); background: #fafbfc; }
.mail-list-head { padding: 16px; border-bottom: 1px solid var(--line); }
.mail-list-head input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: white; }
.mail-item { width: 100%; display: block; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.mail-item:hover { background: white; }
.mail-item.active { background: white; box-shadow: inset 4px 0 var(--violet); }
.mail-top { display: flex; gap: 8px; align-items: center; }
.mail-top strong { font-size: .83rem; }
.mail-top time { margin-left: auto; color: var(--muted); font-size: .69rem; }
.mail-subject { margin-top: 5px; font-weight: 700; font-size: .81rem; }
.mail-preview { margin-top: 3px; color: var(--muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-tag { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 7px; background: #e9f8f2; color: #20835f; font-size: .66rem; font-weight: 700; }
.match-tag.unknown { background: #fff6e7; color: #a06a19; }
.mail-reader { min-width: 0; background: white; }
.mail-reader-head { padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.mail-reader-head h2 { margin: 9px 0 8px; font: 800 1.25rem/1.25 Manrope,sans-serif; }
.mail-from { color: var(--muted); font-size: .78rem; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: #fbfbfd; }
.mail-actions .primary-btn { margin-left: auto; }
.mail-body { padding: 24px; font-size: .9rem; line-height: 1.7; }
.mail-body p { margin: 0 0 14px; }
.mail-insight { margin: 22px 24px; padding: 15px; border-radius: 12px; border: 1px solid #ded8fb; background: #f7f5ff; }
.mail-insight strong { display: block; color: var(--violet); font-size: .78rem; margin-bottom: 7px; }
.mail-insight-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.mail-insight-grid div { color: var(--muted); font-size: .7rem; }
.mail-insight-grid b { display: block; color: var(--ink); font-size: .79rem; margin-top: 2px; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); gap: 18px; align-items: start; }
.settings-card { padding: 24px; }
.settings-card h2 { margin: 0 0 6px; font: 800 1.08rem Manrope,sans-serif; }
.settings-card > p, .settings-heading p { margin: 0 0 20px; color: var(--muted); font-size: .83rem; }
.settings-heading { display: flex; align-items: start; gap: 14px; margin-bottom: 20px; }
.settings-heading > div { flex: 1; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 99px; color: #7c8595; background: #eef0f3; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.connection-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.connection-status.connected { color: #167452; background: #e9f8f2; }
.connection-status.paused { color: #a06a19; background: #fff6e7; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.settings-actions .primary-btn { width: auto; }
.settings-actions .settings-primary { min-width: 170px; height: auto; padding: 11px 16px; font-size: .86rem; }
.endpoint-box { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f8f9fb; }
.endpoint-box span { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.endpoint-box code { overflow-wrap: anywhere; color: var(--ink); font-size: .77rem; }
.one-time-key { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid #bfe5d7; border-radius: 11px; background: #f1fbf7; }
.one-time-key strong, .one-time-key span { grid-column: 1/-1; }
.one-time-key code { min-width: 0; overflow-wrap: anywhere; color: #126747; font-size: .78rem; }
.one-time-key span, .key-note { color: var(--muted); font-size: .75rem; }
.setup-steps { margin: 18px 0 0; padding-left: 22px; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.setup-steps li + li { margin-top: 7px; }
.setup-steps strong { color: var(--ink); }
.setup-steps code { color: #5d49c4; background: #f1effc; border-radius: 4px; padding: 1px 4px; font-size: .76rem; overflow-wrap: anywhere; }
.cpanel-help { display: grid; gap: 3px; margin-top: 16px; padding: 12px 14px; border-left: 4px solid var(--coral); border-radius: 8px; background: var(--coral-soft); }
.cpanel-help strong { font-size: .8rem; }
.cpanel-help span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.pipe-script { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f8f9fb; }
.pipe-script summary { color: var(--violet); font-size: .8rem; font-weight: 800; cursor: pointer; }
.pipe-script pre { max-height: 290px; overflow: auto; margin: 12px 0; padding: 12px; border-radius: 8px; background: #172137; color: #e9edf5; font-size: .7rem; line-height: 1.5; white-space: pre; }
.key-note { margin: 14px 0 0 !important; }
.whmcs-settings-card { grid-column: 1 / -1; }
.update-settings-card { grid-column: 1 / -1; }
.update-status { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 18px; margin: 14px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9fc; }
.update-status span { color: var(--muted); font-size: .78rem; }
.update-status strong { grid-row: 1 / span 2; grid-column: 2; color: var(--ink); font: 800 1.05rem Manrope,sans-serif; }
.update-status small { color: var(--muted); font-size: .72rem; }
.update-settings-card input[type="file"] { padding: 9px; background: #fff; }
.credential-note { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #d8d2f6; border-radius: 10px; background: #f7f5ff; }
.credential-note strong { color: #5d49c4; font-size: .8rem; }
.credential-note span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.integration-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.integration-meta span { display: grid; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .7rem; }
.integration-meta strong { color: var(--ink); font-size: .78rem; }
.integration-error { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: #fff0f1; color: #a83b45; font-size: .77rem; line-height: 1.45; }

.empty-screen { padding: 60px 24px; text-align: center; }
.empty-screen h2 { font: 800 1.35rem Manrope, sans-serif; }
.empty-screen p { color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12,18,31,.58); backdrop-filter: blur(4px); }
.modal { width: min(560px,100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: white; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: hidden; }
.modal-head { flex: 0 0 auto; display: flex; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 800 1.1rem Manrope, sans-serif; }
.modal-head button { margin-left: auto; border: 0; background: #f1f3f7; border-radius: 8px; width: 32px; height: 32px; }
.modal-body { min-height: 0; padding: 20px 22px; display: grid; gap: 15px; overflow-y: auto; overscroll-behavior: contain; }
.field { display: grid; gap: 6px; }
.field label { font-size: .78rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dfe3eb; border-radius: 10px; padding: 10px 12px; color: var(--ink); background: white; }
.field textarea { min-height: 88px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dynamic-job-fields { display: grid; gap: 15px; padding: 14px; border: 1px solid #e4e0f6; border-radius: 12px; background: #faf9ff; }
.form-hint { margin: -3px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.prospect-note { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #f1d79c; border-radius: 11px; background: #fff9ec; }
.prospect-note strong { color: #8b5c14; font-size: .82rem; }
.prospect-note span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.current-booking { display: grid; gap: 3px; padding: 14px; border: 1px solid #ded8fb; border-radius: 12px; background: #f7f5ff; }
.current-booking span { color: var(--violet); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.current-booking strong { font-size: .9rem; }
.current-booking small { color: var(--muted); font-size: .75rem; }
.reschedule-capacity { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #bfe5d7; border-radius: 11px; background: #effaf6; }
.reschedule-capacity strong { color: #20835f; font-size: .82rem; }
.reschedule-capacity span { color: var(--muted); font-size: .75rem; }
.reschedule-capacity.warning { border-color: #f0c5c8; background: #fff4f4; }
.reschedule-capacity.warning strong { color: var(--red); }
.schedule-estimate-notice { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #cbd9ee; border-radius: 11px; background: #f3f7fc; }
.schedule-estimate-notice strong { color: #365d91; font-size: .82rem; }
.schedule-estimate-notice span { color: var(--muted); font-size: .75rem; line-height: 1.45; }
.schedule-estimate-notice.warning { border-color: #efc17a; background: #fff8ea; }
.schedule-estimate-notice.warning strong { color: #96610d; }
.schedule-estimate-notice + .job-session-list { margin-top: 12px; }
.modal-foot { flex: 0 0 auto; position: relative; z-index: 2; padding: 14px 22px; background: #f7f8fa; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; box-shadow: 0 -8px 20px rgba(31,42,66,.04); }
.schedule-manager-modal { max-width: 720px; }
.schedule-manager-modal .modal-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.job-session-list { display: grid; gap: 10px; }
.job-session-row { display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.session-date strong, .session-date span, .session-description strong, .session-description span { display: block; }
.session-date span, .session-description span, .completed-session-note { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.session-description strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-actions { display: flex; align-items: center; gap: 10px; }
.session-actions .link-btn { margin: 0; padding: 7px 2px; }
.danger-link { color: #c34c58; }
.schedule-manager-foot { justify-content: space-between; }
.client-select-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.add-client-btn { border: 1px solid #ddd8f8; background: #f3f0ff; color: var(--violet); border-radius: 10px; padding: 10px 12px; font-weight: 700; white-space: nowrap; }
.new-client-fields { display: none; padding: 14px; gap: 13px; background: #f8f7fd; border: 1px solid #e6e1fb; border-radius: 12px; }
.new-client-fields.visible { display: grid; }
.new-client-head { display: flex; align-items: center; }
.new-client-head strong { font: 750 .87rem Manrope, sans-serif; }
.new-client-head span { margin-left: auto; color: var(--muted); font-size: .72rem; }
.task-drawer-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(12,18,31,.42); backdrop-filter: blur(3px); animation: fadeIn .18s ease-out; }
.task-drawer { position: absolute; top: 0; right: 0; width: min(480px,100%); height: 100%; overflow-y: auto; background: white; box-shadow: -24px 0 70px rgba(12,18,31,.2); animation: slideIn .22s ease-out; }
.drawer-head { padding: 23px 24px 19px; border-bottom: 1px solid var(--line); }
.drawer-top { display: flex; align-items: center; margin-bottom: 16px; }
.drawer-top .status-pill { margin-right: auto; }
.drawer-close { border: 0; background: #f1f3f7; border-radius: 9px; width: 35px; height: 35px; color: var(--muted); font-size: 1.2rem; }
.drawer-head h2 { margin: 0 0 7px; font: 800 1.35rem/1.25 Manrope, sans-serif; letter-spacing: -.025em; }
.drawer-client { color: var(--violet); font-weight: 700; font-size: .86rem; }
.drawer-body { padding: 22px 24px 28px; }
.drawer-section { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer-section:last-child { border: 0; margin: 0; padding: 0; }
.drawer-section h3 { margin: 0 0 11px; font: 750 .9rem Manrope, sans-serif; }
.drawer-section p { margin: 0; color: var(--muted); font-size: .88rem; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.drawer-meta { padding: 12px; background: #f7f8fa; border-radius: 10px; }
.drawer-meta span { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 3px; }
.drawer-meta strong { display: block; font-size: .86rem; }
.drawer-next { padding: 13px 14px; border-left: 4px solid var(--coral); border-radius: 9px; background: var(--coral-soft); font-weight: 600; font-size: .87rem; }
.agenda-completed .agenda-title { color: var(--muted); text-decoration: line-through; }
.agenda-completed .agenda-time { color: #20835f; }
.session-note { padding: 14px; border: 1px solid #dfe9e5; border-radius: 11px; background: #f5fbf8; }
.work-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.work-actions .work-primary, .work-actions .complete-session-btn { min-height: 44px; }
.complete-session-btn { border: 1px solid #a9ddca; border-radius: 9px; color: #167452; background: #e9f8f2; font-weight: 800; cursor: pointer; }
.secondary-work-actions { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.work-actions > .full-btn, .session-complete-message, .more-actions { grid-column: 1/-1; }
.session-complete-message { padding: 12px 14px; color: #167452; background: #e9f8f2; border: 1px solid #bfe5d7; border-radius: 10px; font-weight: 800; text-align: center; }
.more-actions { position: relative; text-align: center; }
.more-actions summary { display: inline-block; padding: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; cursor: pointer; list-style: none; }
.more-actions summary::-webkit-details-marker { display: none; }
.more-actions button { display: block; width: 100%; padding: 10px 12px; border: 1px solid #f0c5c8; border-radius: 9px; color: var(--red); background: #fff4f4; font-weight: 800; cursor: pointer; }
.more-actions button:disabled { color: var(--muted); border-color: var(--line); background: #f5f6f8; cursor: default; }
.compact-modal { max-width: 510px; }
.completion-warning { padding: 15px; color: #6f3137; background: #fff4f4; border: 1px solid #f0c5c8; border-radius: 11px; }
.completion-warning p { margin: 7px 0 0; color: #80565a; font-size: .84rem; line-height: 1.5; }
.danger-btn { padding: 10px 15px; border: 0; border-radius: 9px; color: #fff; background: var(--red); font-weight: 800; cursor: pointer; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; padding: 13px 16px; border-radius: 11px; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: .86rem; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: .5; } }
@keyframes fadeIn { from { opacity: 0; } }
.mobile-title { display: none; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .job-layout { grid-template-columns: 1fr; }
  .schedule-layout { grid-template-columns: 220px minmax(680px,1fr); overflow-x: auto; }
  .client-summary { grid-template-columns: repeat(2,1fr); }
  .inbox-layout { grid-template-columns: 300px minmax(420px,1fr); overflow-x: auto; }
  .record-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; padding-bottom: 70px; }
  .sidebar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; height: 67px; padding: 7px 8px; display: block; border-top: 1px solid #303a50; }
  .brand, .nav-label, .side-foot { display: none; }
  .nav { display: grid; grid-template-columns: repeat(6,1fr); gap: 1px; }
  .nav button { min-width: 0; justify-content: center; flex-direction: column; gap: 1px; padding: 5px 1px; font-size: .65rem; border-radius: 8px; }
  .nav button.active { box-shadow: inset 0 2px var(--coral); }
  .nav svg { width: 18px; height: 18px; }
  .nav-badge { position: absolute; transform: translate(12px,-11px); min-width: 17px; padding: 1px 4px; }
  .topbar { height: 62px; padding: 0 15px; }
  .search { display: none; }
  .mobile-title { display: block; font: 800 1rem Manrope, sans-serif; }
  .top-actions { margin-left: auto; }
  .icon-btn { width: 38px; height: 38px; }
  .primary-btn span { display: none; }
  .primary-btn { width: 38px; height: 38px; padding: 0; font-size: 1.25rem; }
  .content { padding: 22px 15px 28px; }
  .global-timer { padding: 9px 15px; gap: 9px; }
  .global-timer small { display: none; }
  .global-timer b { max-width: 30vw; }
  .storage-notice { padding: 9px 15px; }
  .page-head { align-items: start; flex-wrap: wrap; }
  .page-head p { font-size: .85rem; }
  .page-head-actions { width: 100%; display: flex; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .page-head-actions .primary-btn { width: auto; height: auto; padding: 9px 12px; font-size: .84rem; white-space: nowrap; }
  .page-head-actions .primary-btn span { display: inline; }
  .settings-actions .primary-btn, .settings-actions .settings-primary { width: auto; min-height: 42px; padding: 10px 14px; font-size: .82rem; }
  .settings-actions .primary-btn span { display: inline; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 15px; }
  .stat-icon { margin-bottom: 11px; }
  .stat-value { font-size: 1.4rem; }
  .dashboard-grid { gap: 12px; }
  .panel { padding: 17px; }
  .agenda-row { grid-template-columns: 60px 3px 1fr 18px; gap: 9px; }
  .agenda-row .status-pill { display: none; }
  .work-actions { grid-template-columns: 1fr; }
  .work-actions > *, .secondary-work-actions { grid-column: 1; }
  .secondary-work-actions { grid-template-columns: 1fr; }
  .client-select-row { grid-template-columns: 1fr; }
  .schedule-layout { display: block; overflow: visible; }
  .backlog { position: static; margin-bottom: 13px; }
  .backlog-cards { display: flex; overflow-x: auto; gap: 9px; padding-bottom: 4px; }
  .backlog-card { min-width: 190px; margin: 0; }
  .week-card { overflow-x: auto; }
  .week-toolbar, .schedule-tip { position: sticky; left: 0; width: calc(100vw - 30px); }
  .week-grid { min-width: 720px; }
  .job-title-row { display: block; }
  .job-hero-actions { margin: 13px 0 0; flex-wrap: wrap; }
  .job-title-row .primary-btn, .job-title-row .ghost-btn { width: auto; height: auto; padding: 9px 12px; font-size: .84rem; }
  .job-title-row .primary-btn span { display: inline; }
  .tabs { gap: 17px; overflow-x: auto; }
  .task-row { grid-template-columns: 24px 1fr auto; }
  .task-row .task-date, .task-row .task-time { display: none; }
  .time-entry { align-items: flex-start; flex-wrap: wrap; }
  .task-date { display: none; }
  .time-stats { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { max-height: calc(100dvh - 20px); border-radius: 18px 18px 12px 12px; }
  .modal-body { padding: 17px; }
  .modal-foot { padding: 12px 17px; }
  .modal-foot .primary-btn { width: auto; height: auto; padding: 10px 14px; font-size: .9rem; }
  .modal-foot .primary-btn span { display: inline; }
  .job-session-row { grid-template-columns: 1fr; gap: 10px; }
  .session-actions { justify-content: space-between; }
  .session-actions .ghost-btn { width: auto; }
  .schedule-manager-foot { align-items: stretch; flex-direction: column-reverse; }
  .schedule-manager-foot .ghost-btn, .schedule-manager-foot .primary-btn { width: 100%; }
  .client-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .client-table { min-width: 720px; }
  .client-list { overflow-x: auto; }
  .client-toolbar { position: sticky; left: 0; width: calc(100vw - 30px); }
  .email-alert { grid-template-columns: 40px 1fr; }
  .email-alert-action { display: none; }
  .inbox-layout { display: block; min-height: 0; overflow: visible; }
  .mail-list { max-height: 310px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-reader-head, .mail-body { padding-left: 17px; padding-right: 17px; }
  .mail-actions { padding: 12px 17px; }
  .mail-actions .primary-btn { order: -1; width: 100%; height: auto; padding: 10px 14px; margin: 0; font-size: .86rem; }
  .mail-insight { margin: 17px; }
  .mail-insight-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card { padding: 18px; }
  .jobs-toolbar { flex-wrap: wrap; }
  .jobs-toolbar input { width: 100%; flex-basis: 100%; }
  .board-view { grid-template-columns: repeat(7,240px); }
  .record-hero { display: block; padding: 19px; }
  .record-actions { margin-top: 16px; }
  .record-actions .primary-btn, .record-actions .ghost-btn, .billing-card .primary-btn { width: auto; height: auto; padding: 9px 12px; font-size: .84rem; }
  .prospect-row { grid-template-columns: 38px 1fr 16px; }
  .prospect-row .status-pill { display: none; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-icon { float: left; margin: 2px 13px 0 0; }
  .stat-note { clear: both; padding-top: 2px; }
}
