:root {
  --ink: #172033;
  --muted: #6f7889;
  --faint: #9aa3b2;
  --line: #e7eaf0;
  --line-dark: #d9dee7;
  --bg: #f5f6f8;
  --panel: #fff;
  --nav: #121927;
  --accent: #5065e8;
  --accent-dark: #4053d1;
  --accent-soft: #eef0ff;
  --green: #168a63;
  --green-soft: #e9f7f1;
  --amber: #b87522;
  --amber-soft: #fff4e4;
  --red: #c84f5c;
  --red-soft: #fff0f1;
  --violet: #7254c7;
  --violet-soft: #f1edff;
  --shadow: 0 14px 40px rgba(29, 38, 57, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  display: flex; flex-direction: column;
  width: 238px; padding: 28px 18px 20px;
  color: #fff; background: linear-gradient(180deg, #151d2d, #101621);
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px 36px; color: #fff; font: 800 18px Manrope; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: #6172ef; font: 800 12px Manrope; }
.brand-mark.large { width: 55px; height: 55px; border-radius: 16px; font-size: 16px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-radius: 9px; color: #8994a8; background: transparent; text-align: left; font-size: 13px; font-weight: 600; }
.sidebar nav button:hover { color: #e5e9f1; background: rgba(255, 255, 255, .04); }
.sidebar nav button.active { color: #fff; background: rgba(255, 255, 255, .08); }
.sidebar nav button.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 18px; border-radius: 3px; background: #7b89f8; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 12px; color: #fff; background: #596be6; font-size: 10px; }
.nav-divider { height: 1px; margin: 16px 10px; background: rgba(255, 255, 255, .08); }
.sidebar-profile { display: grid; grid-template-columns: 36px 1fr 28px; align-items: center; gap: 10px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: #5365d8; font-size: 11px; font-weight: 800; }
.sidebar-profile div { min-width: 0; }
.sidebar-profile strong, .sidebar-profile span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-profile strong { font-size: 12px; }
.sidebar-profile div span { margin-top: 2px; color: #7f8a9d; font-size: 10px; text-transform: capitalize; }
.sidebar-profile button { border: 0; color: #768196; background: none; font-size: 17px; }

.workspace { min-height: 100vh; margin-left: 238px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 92px; padding: 0 38px; border-bottom: 1px solid rgba(221, 225, 232, .9); background: rgba(245, 246, 248, .9); backdrop-filter: blur(14px); }
.topbar h1 { margin: 3px 0 0; font: 800 24px Manrope; letter-spacing: -.7px; }
.eyebrow, .modal-kicker { color: #8992a1; font: 700 9px Manrope; letter-spacing: 1.6px; }
.eyebrow.light { color: #8592a7; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.live-dot { padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: #fff; font-size: 11px; }
.live-dot i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #24ad7a; box-shadow: 0 0 0 4px rgba(36, 173, 122, .1); }
.page { max-width: 1500px; margin: auto; padding: 28px 38px 70px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line-dark); border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; transition: border-color .15s, box-shadow .15s, transform .15s; }
.button:hover { border-color: #c7cdd8; box-shadow: 0 5px 15px rgba(29, 38, 57, .07); transform: translateY(-1px); }
.button:disabled { cursor: default; opacity: .5; transform: none; }
.button.primary { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 7px 16px rgba(80, 101, 232, .18); }
.button.primary:hover { background: var(--accent-dark); }
.button.danger { border-color: #f1cdd2; color: var(--red); background: var(--red-soft); }
.button.wide { justify-content: space-between; width: 100%; padding: 13px 16px; }
.text-button, .back-link { padding: 0; border: 0; color: var(--accent); background: none; font-size: 11px; font-weight: 700; }
.back-link { margin: 2px 0 20px; color: var(--muted); }
.back-link:hover, .text-button:hover { color: var(--accent-dark); }
.close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 19px; line-height: 1; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.menu-button { display: none; }

.welcome, .section-row, .calendar-heading, .availability-heading, .record-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.welcome { margin-bottom: 22px; }
.welcome h2, .section-row h2, .calendar-heading h2, .availability-heading h2 { margin: 0 0 5px; font: 700 18px Manrope; letter-spacing: -.3px; }
.welcome p, .section-row p, .calendar-heading p, .availability-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.date-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 11px; }
.section-row { margin: 27px 0 12px; }
.section-row.page-first { margin-top: 2px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.metric { position: relative; min-height: 125px; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.metric.green::before { background: var(--green); }
.metric.amber::before { background: var(--amber); }
.metric.violet::before { background: var(--violet); }
.metric-label { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric strong { display: block; margin-top: 19px; font: 800 27px Manrope; letter-spacing: -1px; }
.metric small { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; }
.record-metrics { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }

.surface { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 3px 15px rgba(28, 37, 55, .025); }
.surface-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.surface-head h3, .aside-card h3 { margin: 0; font: 700 13px Manrope; }
.surface-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.surface-body { padding: 20px; }
.overview-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-top: 16px; }
.pipeline-bars { display: grid; gap: 12px; padding: 20px; }
.pipeline-bars > div { display: grid; grid-template-columns: 1fr 120px 24px; align-items: center; gap: 11px; }
.pipeline-bars span { height: 7px; overflow: hidden; border-radius: 8px; background: #eef0f4; }
.pipeline-bars i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5368e8, #7c6ee7); }
.pipeline-bars label { color: var(--muted); font-size: 10px; }
.pipeline-bars b { font-size: 11px; text-align: right; }
.compact-list { padding: 8px 12px; }
.compact-row { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 12px; width: 100%; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.compact-row:last-child { border-bottom: 0; }
.compact-row:hover { background: #fafbff; }
.compact-row time { padding-right: 10px; border-right: 1px solid var(--line); text-align: center; }
.compact-row time b, .compact-row time span, .compact-row > span b, .compact-row small { display: block; }
.compact-row time b { font-size: 11px; }
.compact-row time span, .compact-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.compact-row > span b { font-size: 11px; }

.filterbar, .calendar-actions, .availability-actions, .record-actions { display: flex; align-items: center; gap: 9px; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line-dark); border-radius: 9px; outline: none; background: #fff; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: #8e9aee; box-shadow: 0 0 0 3px rgba(80, 101, 232, .09); }
textarea { min-height: 88px; resize: vertical; }
.searchbox { position: relative; }
.searchbox::before { content: ""; position: absolute; left: 12px; top: 12px; width: 7px; height: 7px; border: 1.5px solid #8c95a4; border-radius: 50%; }
.searchbox::after { content: ""; position: absolute; left: 19px; top: 19px; width: 5px; height: 1px; background: #8c95a4; transform: rotate(45deg); }
.searchbox input { width: 265px; padding-left: 32px; }

.table-surface { overflow: visible; }
.table-scroll { overflow-x: auto; border-radius: inherit; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; border-bottom: 1px solid var(--line); color: #8d96a5; background: #fafbfc; font-size: 9px; font-weight: 700; letter-spacing: .7px; text-align: left; text-transform: uppercase; }
td { padding: 14px 16px; border-bottom: 1px solid #edf0f3; font-size: 11px; }
tbody tr { transition: background .13s; }
tbody tr[data-lead-id], tbody tr[data-client-id] { cursor: pointer; }
tbody tr[data-lead-id]:hover, tbody tr[data-client-id]:hover { background: #f8f9fd; }
tbody tr:last-child td { border-bottom: 0; }
.primary-cell strong, .primary-cell span { display: block; }
.primary-cell strong { font-size: 12px; }
.primary-cell span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; color: var(--accent); background: var(--accent-soft); font-size: 9px; font-weight: 700; text-transform: capitalize; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.email_sent, .status.onboarding { color: var(--amber); background: var(--amber-soft); }
.status.appointment_booked, .status.scheduled, .status.admin { color: var(--violet); background: var(--violet-soft); }
.status.call_completed, .status.qualified, .status.employee { color: #27818b; background: #eaf7f7; }
.status.became_client, .status.active, .status.completed { color: var(--green); background: var(--green-soft); }
.status.lost, .status.churned, .status.cancelled, .status.no_show { color: var(--red); background: var(--red-soft); }
.priority { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.priority.high { color: var(--red); font-weight: 700; }
.empty { padding: 36px 18px; color: var(--muted); text-align: center; }
.empty strong, .empty span { display: block; }
.empty strong { margin-bottom: 4px; color: var(--ink); font-size: 12px; }
.empty span { font-size: 10px; }

.record-header { align-items: center; margin-bottom: 18px; padding: 23px 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.record-header h2 { margin: 10px 0 3px; font: 800 25px Manrope; letter-spacing: -.8px; }
.record-header p { margin: 0; color: var(--muted); font-size: 11px; }
.record-meta { display: flex; align-items: center; gap: 10px; }
.record-meta > span:not(.status) { color: var(--muted); font-size: 10px; }
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 16px; }
.record-main, .record-aside { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field label, .read-field label, .payload-grid label { display: block; margin-bottom: 5px; color: #8c95a4; font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.read-field span { display: block; padding: 10px 0; font-size: 12px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.form-actions.split { display: grid; grid-template-columns: auto 1fr auto auto; }
.form-error { min-height: 14px; margin: 10px 0 0; color: var(--red); font-size: 10px; }
.form-hint { color: var(--muted); font-size: 10px; }
.comments-surface .surface-body { padding-top: 14px; }
.comment { padding: 13px 0; border-bottom: 1px solid var(--line); }
.comment:first-child { padding-top: 0; }
.comment:last-child { border-bottom: 0; }
.comment > div { display: flex; justify-content: space-between; gap: 10px; }
.comment b { font-size: 11px; }
.comment time { color: var(--faint); font-size: 9px; }
.comment p { margin: 6px 0 0; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.comment-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 9px; margin-top: 13px; }
.comment-form textarea { min-height: 70px; }
.aside-card { padding: 18px; }
.aside-card > h3 { margin-bottom: 14px; }
.aside-card > p { margin: 10px 0 0; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.aside-title { display: flex; justify-content: space-between; margin-bottom: 12px; }
.mini-meeting, .linked-record { display: block; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.mini-meeting:last-child, .linked-record:last-child { border-bottom: 0; }
.mini-meeting b, .mini-meeting span, .linked-record b, .linked-record span { display: block; }
.mini-meeting b, .linked-record b { font-size: 11px; }
.mini-meeting > span:not(.status), .linked-record span { margin: 3px 0 7px; color: var(--muted); font-size: 10px; }
.timeline { margin: 15px 0 0 5px; padding-left: 16px; border-left: 1px solid var(--line-dark); }
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; left: -20px; top: 2px; width: 6px; height: 6px; border: 3px solid #edf0ff; border-radius: 50%; background: var(--accent); }
.timeline-item strong { font-size: 10px; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.payment-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.payment-row:last-child { border-bottom: 0; }
.payment-row b, .payment-row span { display: block; }
.payment-row b { color: var(--green); font-size: 12px; }
.payment-row span, .payment-row time { margin-top: 3px; color: var(--muted); font-size: 9px; }
details summary { padding: 17px 20px; cursor: pointer; font-size: 11px; font-weight: 700; }
details summary span { margin-left: 7px; color: var(--muted); font-weight: 500; }
.payload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 0 20px 20px; }
.payload-grid span { font-size: 11px; word-break: break-word; }

.calendar-heading, .availability-heading { align-items: center; margin: 2px 0 17px; }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(135px, 1fr)); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.calendar-day { min-height: 520px; border-right: 1px solid var(--line); }
.calendar-day:last-child { border-right: 0; }
.calendar-day > header { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line); }
.calendar-day > header span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.calendar-day > header b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; font-size: 11px; }
.calendar-day.today > header b { color: #fff; background: var(--accent); }
.calendar-day > div { padding: 9px; }
.calendar-event { display: block; width: 100%; margin-bottom: 8px; padding: 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 7px; background: #f1f3ff; text-align: left; }
.calendar-event.completed { border-color: var(--green); background: var(--green-soft); }
.calendar-event.cancelled, .calendar-event.no_show { border-color: var(--red); background: var(--red-soft); opacity: .75; }
.calendar-event time, .calendar-event b, .calendar-event span { display: block; }
.calendar-event time { margin-bottom: 5px; color: var(--accent-dark); font-size: 9px; font-weight: 700; }
.calendar-event b { font-size: 10px; line-height: 1.4; }
.calendar-event span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.no-events { margin: 12px 4px; color: #b2b8c2; font-size: 9px; }

.availability-summary { display: flex; align-items: center; gap: 22px; margin-bottom: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; font-size: 10px; }
.availability-summary b { color: var(--ink); }
.availability-board { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.availability-day { min-height: 360px; padding: 12px; border-right: 1px solid var(--line); }
.availability-day:last-child { border-right: 0; }
.availability-day > header { margin-bottom: 13px; }
.availability-day > header b, .availability-day > header span { display: block; }
.availability-day > header b { font-size: 11px; }
.availability-day > header span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.availability-slot { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 8px; padding: 10px; border: 1px solid #dce1ff; border-radius: 9px; background: #f4f5ff; cursor: pointer; }
.availability-slot:hover { border-color: #b9c2fa; }
.availability-slot b, .availability-slot span { display: block; }
.availability-slot b { font-size: 10px; }
.availability-slot span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.slot-delete { width: 23px; height: 23px; border: 0; border-radius: 7px; color: #929aaa; background: transparent; font-size: 16px; }
.slot-delete:hover { color: var(--red); background: var(--red-soft); }
.add-day-slot { width: 100%; padding: 10px; border: 1px dashed var(--line-dark); border-radius: 9px; color: var(--muted); background: transparent; font-size: 9px; }
.add-day-slot:hover { border-color: #aab4ea; color: var(--accent); background: #fafaff; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.team-card { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; }
.team-card:hover { border-color: #cbd1df; box-shadow: var(--shadow); }
.team-card > span:nth-child(2) { min-width: 0; }
.team-card b, .team-card small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-card b { font-size: 11px; }
.team-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12, 18, 29, .52); backdrop-filter: blur(4px); }
.modal { width: min(500px, 100%); max-height: 92vh; overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(10, 16, 26, .25); }
.modal.modal-wide { width: min(650px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 5px 0 0; font: 800 18px Manrope; letter-spacing: -.4px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 21px 23px; }
.payment-amount { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; padding: 9px 14px; border: 1px solid var(--line-dark); border-radius: 11px; }
.payment-amount span { color: var(--muted); font: 700 20px Manrope; }
.payment-amount input { padding: 0; border: 0; box-shadow: none; font: 800 28px Manrope; }
.modal-open { overflow: hidden; }

.login-screen { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 100vh; background: #fff; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 54px 8vw; overflow: hidden; color: #fff; background: radial-gradient(circle at 70% 15%, #293b65 0, transparent 37%), linear-gradient(145deg, #0c1525, #111d32); }
.login-copy { position: relative; z-index: 2; }
.login-copy h1 { margin: 14px 0 22px; font: 800 clamp(38px, 5vw, 66px)/1.05 Manrope; letter-spacing: -3px; }
.login-copy p { max-width: 470px; color: #94a1b5; font-size: 15px; line-height: 1.7; }
.signal-card { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; width: max-content; max-width: 100%; padding: 13px 17px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: rgba(255, 255, 255, .04); }
.signal-card strong, .signal-card span { display: block; font-size: 10px; }
.signal-card span { margin-top: 2px; color: #7f8da2; }
.signal-orb { width: 25px; height: 25px; border: 1px solid #37ca93; border-radius: 50%; background: rgba(37, 185, 130, .15); box-shadow: 0 0 24px rgba(34, 187, 126, .3); }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(390px, 100%); }
.login-form h2 { margin: 10px 0 6px; font: 800 28px Manrope; letter-spacing: -1px; }
.login-form > p { margin: 0 0 26px; font-size: 13px; }
.login-form label { display: block; margin: 15px 0 6px; font-size: 10px; font-weight: 700; }
.login-form input { padding: 13px; }
.form-error { color: var(--red); }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 40px; }

.toast-root { position: fixed; top: 20px; right: 20px; z-index: 150; display: grid; gap: 8px; }
.toast { padding: 11px 15px; border-radius: 10px; color: #fff; background: #172133; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease; }
.toast.error { background: #a83e4c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }
.loading-state { display: grid; place-items: center; min-height: 300px; color: var(--muted); font-size: 10px; }
.loading-state span { width: 25px; height: 25px; border: 2px solid #dfe3ee; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .overview-grid, .record-layout { grid-template-columns: 1fr; }
  .record-aside { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .workspace { margin-left: 0; }
  .topbar { height: 78px; padding: 0 16px; }
  .menu-button { display: block; }
  .topbar > div:first-of-type { margin-right: auto; margin-left: 11px; }
  .top-actions .live-dot { display: none; }
  .page { padding: 20px 15px 55px; }
  .welcome, .section-row, .calendar-heading, .availability-heading, .record-header { align-items: stretch; flex-direction: column; }
  .filterbar, .calendar-actions, .availability-actions, .record-actions { flex-wrap: wrap; }
  .searchbox, .searchbox input { width: 100%; }
  .form-grid, .payload-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .record-aside { grid-template-columns: 1fr; }
  .record-metrics { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .comment-form { grid-template-columns: 1fr; }
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .mobile-brand { display: flex; }
}

@media (max-width: 460px) {
  .metrics { grid-template-columns: 1fr; }
  .top-actions .button { padding: 9px; font-size: 0; }
  .top-actions .button::after { content: "+"; font-size: 17px; }
  .form-actions.split { grid-template-columns: 1fr 1fr; }
  .form-actions.split span { display: none; }
}
