:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --ink: #182235;
  --muted: #6f7b8d;
  --subtle: #9ba6b5;
  --line: #dde3ec;
  --line-strong: #cbd3df;
  --brand: #5753e8;
  --brand-strong: #4338ca;
  --brand-soft: #eeedff;
  --teal: #0c9b87;
  --teal-soft: #e6f7f3;
  --amber: #b86b12;
  --amber-soft: #fff4df;
  --red: #c33a4a;
  --red-soft: #ffedf0;
  --green: #24835b;
  --green-soft: #e9f6ef;
  --nav: #121827;
  --nav-soft: #20283a;
  --nav-text: #d9dfeb;
  --nav-muted: #8f9aac;
  --shadow-sm: 0 1px 2px rgba(21, 31, 49, .04), 0 4px 12px rgba(21, 31, 49, .04);
  --shadow-lg: 0 24px 70px rgba(20, 29, 45, .22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar: 264px;
  --topbar: 68px;
  font-family: Aptos, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0d1320;
  --surface: #151d2c;
  --surface-2: #1a2333;
  --surface-3: #202b3d;
  --ink: #edf2fa;
  --muted: #a8b2c3;
  --subtle: #7f899b;
  --line: #2a3548;
  --line-strong: #3a465a;
  --brand: #8a83ff;
  --brand-strong: #756cf5;
  --brand-soft: #29264f;
  --teal-soft: #173a37;
  --amber-soft: #3c2e1b;
  --red-soft: #3d2028;
  --green-soft: #183629;
  --nav: #080d16;
  --nav-soft: #192131;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2), 0 8px 20px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 26%, transparent);
  outline-offset: 2px;
}

.prototype-ribbon {
  position: fixed; z-index: 100; right: 20px; bottom: 18px; padding: 7px 11px;
  border-radius: 999px; background: rgba(18, 24, 39, .88); color: #fff;
  font-size: 11px; letter-spacing: .02em; backdrop-filter: blur(10px); pointer-events: none;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); background: var(--nav);
  color: var(--nav-text); display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.04);
}
.brand { height: var(--topbar); padding: 0 18px; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #756cf5, #4a45cf); box-shadow: 0 8px 24px rgba(87,83,232,.34); }
.brand-mark svg { width: 21px; height: 21px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; }
.brand-word { font-size: 18px; font-weight: 760; color: #fff; letter-spacing: -.025em; }
.brand-word span { color: #9a96ff; }
.sidebar-close { display: none !important; margin-left: auto; }

.salon-switch { margin: 8px 14px 16px; min-height: 60px; width: calc(100% - 28px); border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); color: inherit; border-radius: 14px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; text-align: left; cursor: pointer; }
.salon-switch:hover { background: rgba(255,255,255,.08); }
.salon-switch strong, .user-chip strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.salon-switch small, .user-chip small { display: block; color: var(--nav-muted); margin-top: 2px; font-size: 11px; }
.salon-switch > span:nth-child(2), .user-chip > span:nth-child(2) { min-width: 0; flex: 1; }
.salon-avatar, .avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; font-weight: 750; font-size: 12px; }
.salon-avatar { background: linear-gradient(145deg, #3c9a87, #2c6a64); color: #fff; }
.avatar-indigo { background: #302e67; color: #c7c4ff; }
.chevron { color: var(--nav-muted); font-size: 18px; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 0 12px 16px; scrollbar-width: thin; }
.nav-group { margin-top: 14px; }
.nav-label { display: block; padding: 0 10px 7px; color: var(--nav-muted); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.nav-item, .nav-parent {
  position: relative; width: 100%; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--nav-text); display: flex; align-items: center; gap: 11px; padding: 9px 10px; cursor: pointer; text-align: left; margin: 2px 0;
}
.nav-item:hover, .nav-parent:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(117,108,245,.24), rgba(117,108,245,.1)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -1px; width: 3px; height: 22px; border-radius: 3px; background: #8d86ff; }
.nav-icon { width: 19px; height: 19px; display: grid; place-items: center; color: #aeb7c7; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon { color: #b8b4ff; }
.nav-text { flex: 1; font-size: 13px; }
.nav-caret { color: var(--nav-muted); transition: transform .2s ease; }
.nav-parent.open .nav-caret { transform: rotate(90deg); }
.nav-children { display: none; margin: 2px 0 7px 18px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.08); }
.nav-parent.open + .nav-children { display: block; }
.nav-children .nav-item { min-height: 36px; padding: 7px 9px; }
.nav-children .nav-icon { display: none; }

.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 12px; }
.user-chip { width: 100%; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px; border-radius: 11px; cursor: pointer; }
.user-chip:hover { background: rgba(255,255,255,.055); }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: color-mix(in srgb, var(--surface) 90%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumbs { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }
.breadcrumbs span { margin: 0 8px; color: var(--subtle); }
.global-search { width: 230px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; }
.global-search > span:nth-child(2) { flex: 1; }
kbd { padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 10px; box-shadow: 0 1px 0 var(--line); }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-button:hover { background: var(--surface-2); border-color: var(--line-strong); }
.notification-button { position: relative; }
.notification-button i { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #e85c66; box-shadow: 0 0 0 2px var(--surface); }
.mobile-menu { display: none; }

.button { min-height: 40px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button:hover { background: var(--surface-2); }
.button.primary { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 7px 18px color-mix(in srgb, var(--brand) 24%, transparent); }
.button.primary:hover { background: var(--brand-strong); }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 34%, var(--line)); background: var(--red-soft); }
.button.small { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: 12px; }

.main { padding: 28px; max-width: 1680px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title-wrap { min-width: 0; }
.eyebrow { display: block; color: var(--brand); font-weight: 750; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 5px; }
.page-header h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.page-header p { margin: 7px 0 0; color: var(--muted); max-width: 680px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-3); width: max-content; max-width: 100%; overflow-x: auto; }
.tab { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: var(--shadow-sm); }

.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card { padding: 18px; }
.panel-header { min-height: 62px; padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-header h2, .card h2, .card h3 { margin: 0; letter-spacing: -.02em; }
.panel-header h2 { font-size: 16px; }
.panel-body { padding: 18px; }
.subtext { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.metric-card { min-height: 142px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 76px; height: 76px; border-radius: 50%; background: var(--brand-soft); right: -26px; top: -22px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); }
.metric-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); font-weight: 750; }
.metric-value { font-size: 27px; font-weight: 770; letter-spacing: -.04em; margin: 18px 0 4px; }
.metric-trend { font-size: 12px; color: var(--green); }

.dashboard-layout { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); margin-top: 16px; }
.chart-wrap { height: 290px; display: flex; align-items: stretch; gap: 8px; padding-top: 18px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; color: var(--subtle); font-size: 10px; padding-bottom: 26px; }
.chart-area { position: relative; flex: 1; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 25%; }
.chart-area svg { position: absolute; inset: 0; width: 100%; height: calc(100% - 18px); overflow: visible; }
.chart-x { position: absolute; left: 0; right: 0; bottom: -24px; display: flex; justify-content: space-between; color: var(--subtle); font-size: 10px; }
.agenda { display: grid; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 52px 5px 1fr auto; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { font-weight: 750; }
.agenda-bar { align-self: stretch; border-radius: 4px; background: var(--brand); }
.agenda-item:nth-child(2) .agenda-bar { background: var(--teal); }
.agenda-item:nth-child(3) .agenda-bar { background: #d78648; }
.agenda-item strong { display: block; }
.badge, .pill { display: inline-flex; align-items: center; gap: 5px; width: max-content; border-radius: 999px; white-space: nowrap; }
.badge { padding: 4px 8px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 650; }
.badge.success { background: var(--green-soft); color: var(--green); }
.badge.warning { background: var(--amber-soft); color: var(--amber); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.danger { background: var(--red-soft); color: var(--red); }

/* Phase 1.1 — detail-rich CRM prototype */
.context-strip {
  min-height: 46px; margin: -4px 0 16px; padding: 9px 13px; display: flex; align-items: center;
  gap: 16px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  color: var(--muted); font-size: 12px; box-shadow: var(--shadow-sm);
}
.context-strip .spacer { flex: 1; }
.status-line { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 650; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.status-dot.danger { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.legend-row { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: 11px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.legend-dot.brand { background: var(--brand); }
.legend-dot.teal { background: var(--teal); }
.legend-dot.block { background: repeating-linear-gradient(135deg,var(--line-strong) 0 2px,var(--surface) 2px 4px); border: 1px solid var(--line-strong); }
.agenda-button { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.agenda-button:hover { background: var(--surface-2); }
.dashboard-lower { margin-top: 16px; grid-template-columns: 1.15fr 1fr .8fr; }
.compact-list { display: grid; gap: 4px; }
.compact-list > button, .linked-record {
  min-height: 58px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit;
  padding: 9px 2px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
}
.compact-list > button:last-child { border-bottom: 0; }
.compact-list > button:hover, .linked-record:hover { background: var(--surface-2); }
.compact-list button > span:nth-child(2), .linked-record > span:first-child { flex: 1; }
.compact-list strong, .compact-list small, .linked-record strong, .linked-record small { display: block; }
.checklist { display: grid; gap: 5px; }
.checklist button { border: 0; background: transparent; color: inherit; display: flex; justify-content: space-between; gap: 14px; padding: 12px 3px; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.checklist button:last-child { border-bottom: 0; }
.checklist button strong { color: var(--muted); font-size: 11px; white-space: nowrap; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-grid button { min-height: 70px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--ink); font-weight: 700; cursor: pointer; }
.quick-grid button:hover { color: var(--brand); border-color: color-mix(in srgb,var(--brand) 36%,var(--line)); background: var(--brand-soft); }

.section-tabs {
  display: flex; gap: 3px; margin: 0 0 16px; padding: 4px; overflow-x: auto; width: 100%; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface); scrollbar-width: thin;
}
.section-tab { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 640; white-space: nowrap; cursor: pointer; }
.section-tab:hover { background: var(--surface-2); color: var(--ink); }
.section-tab.active { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--brand) 18%,transparent); }
.tab-content { margin-top: 16px; }
.full { grid-column: 1 / -1; }
.panel-footer { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.button-row { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.info-pair { min-height: 72px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.info-pair > span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.info-pair strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.info-pair small { display: block; margin-top: 3px; color: var(--muted); }
.cell-note { display: block; color: var(--muted); font-size: 11px; }
.table-footer { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.table-footer > div { display: flex; gap: 6px; }
.compact-kpi .metric-card { min-height: 128px; }

.calendar-grid-v2 { grid-template-columns: 64px repeat(4,minmax(184px,1fr)); position: relative; min-width: 860px; }
.calendar-v2 .employee-head { min-height: 74px; position: sticky; top: 0; z-index: 3; background: var(--surface); }
.employee-more { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.employee-more:hover { background: var(--surface-3); }
.cal-half { min-height: 40px; position: relative; }
.cal-time.minor { color: var(--subtle); font-size: 9px; }
.calendar-v2 .appointment { inset: 3px 4px; min-height: 62px; z-index: 2; padding: 7px 8px; overflow: hidden; box-shadow: 0 5px 13px rgba(31,41,67,.1); }
.calendar-v2 .appointment.teal { background: color-mix(in srgb,var(--teal-soft) 86%,var(--surface)); border-color: color-mix(in srgb,var(--teal) 45%,var(--line)); }
.calendar-v2 .appointment.amber { background: var(--amber-soft); border-color: color-mix(in srgb,var(--amber) 42%,var(--line)); }
.calendar-v2 .appointment.rose { background: var(--red-soft); border-color: color-mix(in srgb,var(--red) 38%,var(--line)); }
.appointment-meta { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .03em; }
.calendar-v2 .block-time { position: absolute; inset: 3px 4px; min-height: 70px; width: calc(100% - 8px); text-align: left; z-index: 2; cursor: pointer; border: 1px solid var(--line-strong); }
.calendar-v2 .block-time.absence { min-height: 250px; background: repeating-linear-gradient(135deg,var(--surface-2) 0 8px,var(--surface-3) 8px 10px); }
.closing-line { grid-column: 1 / -1; min-height: 32px; padding: 7px 12px 0 66px; border-top: 2px solid var(--ink); color: var(--muted); font-size: 10px; font-weight: 700; background: var(--surface-2); }
.calendar-footnote { margin: 9px 2px 0; color: var(--muted); font-size: 11px; }
.date-chip { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 650; cursor: pointer; }

.opening-grid { display: grid; gap: 8px; }
.opening-row { min-height: 58px; padding: 8px 0; display: grid; grid-template-columns: minmax(150px,1fr) 46px 92px auto 92px auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.opening-row:last-child { border-bottom: 0; }
.opening-row strong, .opening-row small { display: block; }
.opening-row small { color: var(--muted); }
.closed-label { grid-column: span 4; color: var(--muted); font-weight: 650; }
.website-workspace { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(400px,1.25fr); gap: 16px; align-items: start; }
.website-editor .field-label + .field-label { margin-top: 14px; }
.website-live { min-height: 520px; }
.website-live .site-hero { min-height: 470px; }
.settings-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 32px; }
.rule-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule-card strong, .rule-card small { display: block; }
.rule-card small { color: var(--muted); }
.notice-box { margin-top: 14px; padding: 13px 14px; border: 1px solid color-mix(in srgb,var(--brand) 20%,var(--line)); border-radius: 10px; background: var(--brand-soft); }
.notice-box p { margin: 4px 0 0; color: var(--muted); }
.role-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.role-card h2 { margin-top: 10px; }
.permission-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.permission-tags span { padding: 5px 8px; border-radius: 7px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 650; }
.permission-tags span.sensitive { background: var(--amber-soft); color: var(--amber); }
.price-block strong { display: block; font-size: 34px; letter-spacing: -.04em; }
.price-block span { color: var(--muted); }
.line-items { margin-top: 16px; display: grid; }
.line-items > span { padding: 11px 0; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.line-items strong small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.line-items em { font-style: normal; font-weight: 700; white-space: nowrap; }
.line-items .total { border-bottom: 0; font-size: 16px; }
.billing-summary { margin-bottom: 16px; }
.integration-title { display: flex; align-items: center; gap: 11px; }
.channel-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; flex: 0 0 auto; }
.channel-icon.whatsapp { background: #e6f9ee; color: #168653; }
.readiness-list { display: grid; gap: 14px; }
.unavailable-card { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.unavailable-card > div { display: flex; align-items: center; gap: 12px; }
.unavailable-card h3, .unavailable-card p { margin: 0; }
code { padding: 3px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink); font-size: 11px; }

.progress-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 18px; }
.progress-steps span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.progress-steps i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-style: normal; }
.progress-steps .active { color: var(--brand); }
.progress-steps .active i { background: var(--brand); color: #fff; }
.drawer-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.drawer-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.drawer-section > h3 { margin: 0 0 10px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.section-heading h3 { margin: 0; }
.service-selection { min-height: 62px; display: grid; grid-template-columns: 1fr auto 36px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.service-selection strong, .service-selection small { display: block; }
.service-selection small { color: var(--muted); }
.availability-box { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.availability-box strong, .availability-box small { display: block; }
.availability-box small { color: var(--muted); }
.slot-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.slot { min-height: 35px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.slot.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.final-summary { margin-top: 20px; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.mini-metrics > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.mini-metrics strong, .mini-metrics span { display: block; }
.mini-metrics strong { font-size: 18px; }
.mini-metrics span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.note-card { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.note-card + .note-card { margin-top: 8px; }
.note-card p { margin: 4px 0; }
.note-card small { color: var(--muted); }
.package-card { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.package-card strong, .package-card small { display: block; }
.package-card small { color: var(--muted); }
.task-card { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.task-card strong, .task-card small { display: block; }
.task-card small { color: var(--muted); }
.task-check { width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--green); cursor: pointer; }
.timeline { display: grid; gap: 0; }
.timeline > div { min-height: 55px; display: grid; grid-template-columns: 16px 1fr; gap: 9px; position: relative; }
.timeline i { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline > div:not(:last-child)::before { content:""; position:absolute; left:4px; top:17px; bottom:0; width:1px; background:var(--line); }
.timeline strong, .timeline small { display: block; }
.timeline small { color: var(--muted); }
.message-preview { padding: 15px; border-radius: 14px 14px 4px 14px; background: #e7f8ee; color: #18392b; }
.message-preview p { margin: 0 0 8px; }
.message-preview p:last-child { margin-bottom: 0; }
.message-preview mark { padding: 1px 4px; border-radius: 4px; background: rgba(255,255,255,.75); color: #14663e; }
.mapping-row { display: grid; grid-template-columns: minmax(150px,1fr) minmax(145px,.8fr) minmax(130px,.8fr); gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mapping-row strong, .mapping-row small { display: block; }
.mapping-row small { color: var(--muted); }
.employee-title-row, .feedback-head, .feedback-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-title-row h3 { margin: 0; }
.feedback-card h3 { margin: 14px 0 4px; }
.feedback-meta { margin: 14px 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.newsletter-workspace { display: grid; grid-template-columns: 220px minmax(380px,1fr) minmax(290px,.75fr); gap: 16px; align-items: start; }
.block-library .block-item { width: 100%; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer; }
.block-library .block-item:hover { border-color: var(--brand); color: var(--brand); }
.mail-preview { min-height: 440px; padding: 34px 26px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(160deg,var(--surface),var(--brand-soft)); }
.mail-preview h2 { margin-top: 22px; font-size: 27px; }
.newsletter-preview { position: sticky; top: calc(var(--topbar) + 16px); }

@media (max-width: 1180px) {
  .dashboard-lower, .grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .website-workspace { grid-template-columns: 1fr; }
  .calendar-grid-v2 { grid-template-columns: 58px repeat(4,minmax(170px,1fr)); }
  .newsletter-workspace { grid-template-columns: 190px 1fr; }
  .newsletter-preview { grid-column: 1 / -1; position: static; }
}

@media (max-width: 760px) {
  .context-strip { align-items: flex-start; gap: 8px 14px; }
  .context-strip .spacer { display: none; }
  .dashboard-lower, .grid.three, .settings-columns { grid-template-columns: 1fr; }
  .section-tabs { margin-inline: -2px; width: calc(100% + 4px); }
  .calendar-status .legend-row { display: none; }
  .calendar-grid-v2 { grid-template-columns: 52px repeat(4,minmax(138px,1fr)); }
  .calendar-v2 .employee-head { min-height: 82px; padding: 8px 6px; align-items: flex-start; flex-direction: column; gap: 4px; text-align: center; }
  .calendar-v2 .employee-head .person-avatar { margin: 0 auto; }
  .calendar-v2 .employee-head > span:nth-child(2) { width: 100%; }
  .calendar-v2 .employee-head small { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .employee-more { position: absolute; right: 3px; top: 3px; }
  .cal-half { min-height: 43px; }
  .calendar-v2 .appointment { min-height: 78px; font-size: 10px; }
  .calendar-v2 .appointment small { white-space: normal; line-height: 1.15; }
  .opening-row { grid-template-columns: 1fr 42px 74px auto 74px; }
  .opening-row .button { grid-column: 3 / -1; justify-self: start; }
  .info-grid, .mini-metrics { grid-template-columns: 1fr 1fr; }
  .mapping-row { grid-template-columns: 1fr; }
  .newsletter-workspace { grid-template-columns: 1fr; }
  .package-card { grid-template-columns: 1fr auto; }
  .package-card .button { grid-column: 1 / -1; }
}

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.field, .select-like { min-height: 42px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 0 12px; }
.search-field { position: relative; min-width: 260px; flex: 1; }
.search-field input { width: 100%; padding-left: 38px; }
.search-field span { position: absolute; left: 13px; top: 11px; color: var(--muted); z-index: 1; }
.field-label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field-label input, .field-label select, .field-label textarea { color: var(--ink); }
.field-label textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-section { margin-top: 24px; }
.form-section > h3 { margin: 0 0 4px; }
.form-section > p { margin: 0 0 14px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { padding: 11px 14px; text-align: left; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.person-avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 11px; font-weight: 750; color: #fff; background: linear-gradient(145deg, #7c76ef, #4e4ac5); }
.person-avatar.teal { background: linear-gradient(145deg, #33ad9a, #147f71); }
.person-avatar.amber { background: linear-gradient(145deg, #e5a65a, #b96b1c); }
.person strong { display: block; }
.person small { color: var(--muted); }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.date-nav { display: flex; align-items: center; gap: 7px; }
.date-chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; display: flex; align-items: center; gap: 8px; font-weight: 650; }
.calendar-shell { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.calendar-grid { --time-col: 64px; display: grid; grid-template-columns: var(--time-col) repeat(3, minmax(220px,1fr)); min-width: 820px; }
.cal-corner, .employee-head { position: sticky; top: 0; z-index: 3; height: 66px; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-corner { left: 0; z-index: 4; border-right: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.employee-head { padding: 11px 14px; display: flex; align-items: center; gap: 10px; border-right: 1px solid var(--line); }
.employee-head .employee-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.employee-head:nth-child(3) .employee-dot { background: var(--teal); }
.employee-head:nth-child(4) .employee-dot { background: #d7893a; }
.employee-head small { display: block; color: var(--muted); }
.cal-time { position: sticky; left: 0; z-index: 2; height: 52px; padding: 8px 8px 0; text-align: right; color: var(--subtle); font-size: 10px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell { position: relative; height: 52px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--line) 55%, transparent) 50%, color-mix(in srgb, var(--line) 55%, transparent) calc(50% + 1px), transparent calc(50% + 1px)); }
.appointment { position: absolute; inset: 4px 5px auto; z-index: 1; border-left: 4px solid var(--brand); border-radius: 9px; background: var(--brand-soft); color: var(--ink); padding: 8px 9px; min-height: 45px; box-shadow: 0 4px 12px rgba(38,45,70,.08); cursor: pointer; overflow: hidden; }
.appointment.teal { border-color: var(--teal); background: var(--teal-soft); }
.appointment.amber { border-color: #d7893a; background: var(--amber-soft); }
.appointment.tall { height: 96px; }
.appointment strong { display: block; font-size: 12px; }
.appointment small { color: var(--muted); font-size: 10px; }
.block-time { position: absolute; inset: 4px; height: 96px; border: 1px dashed var(--line-strong); border-radius: 9px; background: repeating-linear-gradient(135deg, var(--surface-3), var(--surface-3) 6px, transparent 6px, transparent 12px); padding: 10px; color: var(--muted); }

.employee-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
.employee-card { padding: 0; overflow: hidden; cursor: pointer; }
.employee-banner { height: 66px; background: linear-gradient(120deg, #29256b, #5954df); }
.employee-banner.teal { background: linear-gradient(120deg, #14574f, #2ba38f); }
.employee-banner.amber { background: linear-gradient(120deg, #7c4618, #d28a42); }
.employee-card-body { padding: 0 18px 18px; }
.employee-card .person-avatar { width: 58px; height: 58px; border-radius: 17px; margin-top: -29px; border: 4px solid var(--surface); font-size: 15px; }
.employee-card h3 { margin: 9px 0 2px; }
.mini-stats { margin: 15px 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.mini-stats > div { padding: 9px; border-radius: 9px; background: var(--surface-2); }
.mini-stats strong, .mini-stats small { display: block; }
.mini-stats small { color: var(--muted); font-size: 10px; }

.service-list { display: grid; gap: 11px; }
.service-category { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.service-category-header { padding: 14px 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.category-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.service-category-header h3 { margin: 0; flex: 1; }
.service-row { min-height: 56px; padding: 9px 14px 9px 37px; display: grid; grid-template-columns: minmax(220px,1.5fr) 120px 110px auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; }
.service-row:last-child { border-bottom: 0; }
.service-row:hover { background: var(--surface-2); }
.service-row strong { display: block; }
.service-row small { color: var(--muted); }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 320px); gap: 13px; overflow-x: auto; padding-bottom: 9px; }
.kanban-column { border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 10px; min-height: 530px; }
.kanban-head { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 5px 8px; }
.kanban-head h3 { flex: 1; margin: 0; font-size: 13px; }
.kanban-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.lead-card { padding: 13px; margin-bottom: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); cursor: pointer; }
.lead-card:hover { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); transform: translateY(-1px); }
.lead-card-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.lead-card h4 { margin: 11px 0 3px; font-size: 14px; }
.lead-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.lead-card-foot { display: flex; align-items: center; justify-content: space-between; color: var(--subtle); font-size: 10px; }

.template-row, .automation-row { min-height: 64px; display: grid; grid-template-columns: 42px minmax(220px,1.5fr) minmax(120px,.6fr) minmax(110px,.5fr) auto; align-items: center; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--line); cursor: pointer; }
.template-row:last-child, .automation-row:last-child { border-bottom: 0; }
.template-row:hover, .automation-row:hover { background: var(--surface-2); }
.row-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.row-title strong, .row-title small { display: block; }
.row-title small { color: var(--muted); }

.settings-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 16px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar) + 20px); padding: 8px; }
.settings-nav button { width: 100%; min-height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; text-align: left; padding: 0 11px; cursor: pointer; }
.settings-nav button.active, .settings-nav button:hover { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.setting-group { margin-bottom: 16px; }
.setting-group h2 { font-size: 17px; margin: 0; }
.setting-row { min-height: 66px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { color: var(--muted); margin-top: 3px; max-width: 640px; }
.toggle { position: relative; width: 44px; height: 25px; border: 0; border-radius: 999px; background: var(--line-strong); flex: 0 0 auto; cursor: pointer; }
.toggle::after { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: white; top: 3px; left: 3px; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: left .2s ease; }
.toggle.on { background: var(--brand); }
.toggle.on::after { left: 22px; }

.website-preview { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); gap: 16px; }
.browser-frame { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.browser-bar { height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; gap: 6px; }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.browser-url { margin-left: 8px; padding: 4px 10px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 10px; flex: 1; }
.site-hero { min-height: 390px; padding: 42px; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 85% 20%, rgba(78,170,151,.28), transparent 34%), linear-gradient(145deg, #1d2937, #344258); color: white; }
.site-hero .site-kicker { color: #9de0d4; text-transform: uppercase; font-size: 10px; letter-spacing: .15em; }
.site-hero h2 { max-width: 540px; font-size: clamp(30px,4vw,54px); line-height: 1.02; letter-spacing: -.05em; margin: 10px 0 14px; }
.site-hero p { max-width: 500px; color: #d7dee7; }
.site-hero .button { width: max-content; margin-top: 10px; }

.flow-shell { display: grid; grid-template-columns: 240px minmax(600px,1fr) 300px; min-height: calc(100vh - 160px); overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.flow-library, .flow-inspector { padding: 14px; background: var(--surface-2); }
.flow-library { border-right: 1px solid var(--line); }
.flow-inspector { border-left: 1px solid var(--line); }
.flow-library h3, .flow-inspector h3 { margin: 0 0 12px; }
.block-item { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; }
.flow-canvas { position: relative; min-width: 620px; background-color: var(--surface); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; overflow: hidden; }
.flow-node { position: absolute; width: 210px; min-height: 68px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); box-shadow: 0 8px 24px rgba(22,30,46,.09); }
.flow-node strong, .flow-node small { display: block; }
.flow-node small { color: var(--muted); margin-top: 3px; }
.flow-node.trigger { left: 190px; top: 60px; border-left-color: var(--teal); }
.flow-node.condition { left: 150px; top: 210px; border-left-color: #8c67cb; }
.flow-node.mail { left: 70px; top: 365px; }
.flow-node.whatsapp { left: 330px; top: 365px; border-left-color: #20a76c; }
.flow-line { position: absolute; height: 2px; background: var(--brand); transform-origin: left center; }
.flow-line.one { width: 110px; left: 264px; top: 167px; transform: rotate(90deg); }
.flow-line.two { width: 170px; left: 245px; top: 320px; transform: rotate(118deg); }
.flow-line.three { width: 170px; left: 245px; top: 320px; transform: rotate(61deg); background: #20a76c; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(9,14,24,.42); backdrop-filter: blur(2px); }
.drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(520px, 96vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; grid-template-rows: auto 1fr auto; transform: translateX(105%); transition: transform .24s ease; }
.drawer.open { transform: translateX(0); }
.drawer-header { min-height: 82px; padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer-header h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.drawer-body { overflow-y: auto; padding: 20px; }
.drawer-footer { min-height: 68px; padding: 12px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 9px; background: var(--surface); }
.drawer-summary { padding: 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 18px; }
.summary-line { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.summary-line:last-child { border: 0; }
.summary-line strong { color: var(--ink); text-align: right; }
.drawer-tabs { display: flex; gap: 3px; overflow-x: auto; margin: -4px -4px 18px; padding: 4px; }
.drawer-tabs button { border: 0; min-height: 34px; padding: 0 10px; background: transparent; color: var(--muted); border-radius: 8px; white-space: nowrap; cursor: pointer; }
.drawer-tabs button.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }

.command-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(620px, calc(100vh - 80px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.command-dialog::backdrop { background: rgba(8,13,22,.5); backdrop-filter: blur(4px); }
.command-search-row { min-height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.command-search-row input { border: 0; outline: 0; background: transparent; color: var(--ink); flex: 1; font-size: 16px; }
.command-results { max-height: 480px; overflow-y: auto; padding: 8px; }
.command-result { width: 100%; min-height: 48px; padding: 8px 10px; border: 0; background: transparent; border-radius: 9px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.command-result:hover { background: var(--surface-2); }
.command-result .nav-icon { color: var(--brand); }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 22px; transform: translate(-50%, 20px); padding: 11px 15px; border-radius: 10px; background: #111827; color: white; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty-state { min-height: 280px; display: grid; place-items: center; text-align: center; padding: 30px; }
.empty-state-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 22px; margin: 0 auto 13px; }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 14px; }

@media (max-width: 1180px) {
  .grid.kpi { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-layout, .website-preview { grid-template-columns: 1fr; }
  .employee-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .flow-shell { grid-template-columns: 220px minmax(600px,1fr); }
  .flow-inspector { display: none; }
  .global-search { width: 180px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .24s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-grid !important; color: white; background: transparent; border-color: rgba(255,255,255,.1); }
  .mobile-scrim { position: fixed; inset: 0; z-index: 29; background: rgba(6,10,18,.48); }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .main { padding: 22px 18px; }
  .topbar { padding: 0 18px; }
  .global-search > span:nth-child(2), .global-search kbd { display: none; }
  .global-search { width: 42px; padding: 0; justify-content: center; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav button { width: auto; white-space: nowrap; padding: 0 12px; }
  .service-row { grid-template-columns: minmax(190px,1fr) 100px auto; }
  .service-row > :nth-child(3) { display: none; }
}

@media (max-width: 680px) {
  .prototype-ribbon { display: none; }
  .topbar { height: 60px; }
  .breadcrumbs { display: none; }
  .quick-create { width: 40px; padding: 0; font-size: 0; }
  .quick-create::before { content: "+"; font-size: 21px; }
  .main { padding: 18px 14px 82px; }
  .page-header { align-items: stretch; flex-direction: column; margin-bottom: 16px; }
  .page-actions { justify-content: flex-start; }
  .grid.kpi, .grid.two, .grid.three, .employee-cards, .form-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 126px; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar { align-items: stretch; }
  .toolbar-group { width: 100%; }
  .search-field { min-width: 100%; width: 100%; }
  .select-like { flex: 1; }
  .drawer { width: 100vw; }
  .drawer-header { min-height: 72px; }
  .service-row { grid-template-columns: 1fr auto; padding-left: 14px; }
  .service-row > :nth-child(2), .service-row > :nth-child(3) { display: none; }
  .template-row, .automation-row { grid-template-columns: 40px 1fr auto; }
  .template-row > :nth-child(3), .template-row > :nth-child(4), .automation-row > :nth-child(3), .automation-row > :nth-child(4) { display: none; }
  .site-hero { padding: 28px 22px; min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Keep the redesigned four-employee calendar authoritative over the phase-1 grid. */
.calendar-grid.calendar-grid-v2 { grid-template-columns: 64px repeat(4,minmax(184px,1fr)); min-width: 860px; }
.calendar-grid.calendar-grid-v2 .cal-half { min-height: 40px; }
@media (max-width: 1180px) {
  .calendar-grid.calendar-grid-v2 { grid-template-columns: 58px repeat(4,minmax(170px,1fr)); min-width: 760px; }
  .newsletter-workspace { grid-template-columns: 190px 1fr; }
  .newsletter-preview { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
  .calendar-grid.calendar-grid-v2 { grid-template-columns: 52px repeat(4,minmax(138px,1fr)); min-width: 604px; }
  .calendar-grid.calendar-grid-v2 .cal-half { min-height: 43px; }
  .newsletter-workspace { grid-template-columns: 1fr; }
  .info-grid, .mini-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .settings-columns, .dashboard-lower { grid-template-columns: 1fr; }
  .mapping-row { grid-template-columns: 1fr; }
  .calendar-shell.calendar-v2 { overflow-x: hidden; }
  .calendar-grid.calendar-grid-v2 { grid-template-columns: 38px repeat(4,minmax(0,1fr)); min-width: 0; width: 100%; }
  .calendar-grid.calendar-grid-v2 .cal-time, .calendar-grid.calendar-grid-v2 .cal-corner { padding-inline: 3px; font-size: 8px; }
  .calendar-grid.calendar-grid-v2 .employee-head { min-height: 76px; padding: 6px 2px; }
  .calendar-grid.calendar-grid-v2 .employee-head .person-avatar { width: 27px; height: 27px; border-radius: 50%; font-size: 8px; }
  .calendar-grid.calendar-grid-v2 .employee-head strong { font-size: 9px; line-height: 1.1; }
  .calendar-grid.calendar-grid-v2 .employee-head small { display: none; }
  .calendar-grid.calendar-grid-v2 .employee-more { display: none; }
  .calendar-grid.calendar-grid-v2 .appointment { inset: 2px; min-height: 80px; padding: 5px 4px; font-size: 8px; line-height: 1.1; }
  .calendar-grid.calendar-grid-v2 .appointment-meta { font-size: 7px; }
  .calendar-grid.calendar-grid-v2 .appointment small { font-size: 7px; }
  .calendar-grid.calendar-grid-v2 .block-time { inset: 2px; width: calc(100% - 4px); padding: 5px 4px; font-size: 8px; }
  .calendar-grid.calendar-grid-v2 .closing-line { padding-left: 40px; }
}
