:root {
  --blue-900: #0d315f;
  --blue-800: #164a86;
  --blue-700: #1f5ea3;
  --blue-100: #eaf3ff;
  --orange: #f28c28;
  --green: #2d8b57;
  --green-100: #e8f7ef;
  --yellow-100: #fff7dc;
  --red: #b93636;
  --red-100: #ffeded;
  --ink: #1f2937;
  --muted: #667085;
  --line: #d8e0ea;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --shadow: 0 12px 30px rgba(13,49,95,.10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.mobile-only { display: none; }

.topbar {
  min-height: 76px;
  padding: 10px clamp(16px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 22px rgba(13,49,95,.2);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; background: white; border-radius: 50%; padding: 3px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1.02rem; letter-spacing: .01em; }
.brand span { font-size: .84rem; opacity: .82; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.mode-badge { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .78rem; font-weight: 700; }

main { width: min(1440px, 100%); margin: 0 auto; padding: clamp(20px, 4vw, 52px); }
.view { display: none; }
.view.active { display: block; animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue-900), #286db5 65%, #4d91cf);
  padding: clamp(24px, 5vw, 56px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card h1 { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1; margin: 6px 0 14px; max-width: 780px; }
.hero-card p { max-width: 720px; margin: 0; opacity: .9; font-size: 1.02rem; }
.hero-illustration { font-size: clamp(4rem, 10vw, 8rem); filter: drop-shadow(0 10px 16px rgba(0,0,0,.18)); transform: rotate(-4deg); }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 800; color: var(--orange); }
.hero-card .eyebrow { color: #ffd8a8; }

.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.profile-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(13,49,95,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.profile-card:hover { transform: translateY(-4px); border-color: #9dc2e8; box-shadow: var(--shadow); }
.profile-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--blue-100); font-size: 1.65rem; margin-bottom: 18px; }
.profile-card strong { display: block; font-size: 1.15rem; color: var(--blue-900); }
.profile-card small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.availability-card { border-bottom: 4px solid var(--green); }
.admin-card { border-bottom: 4px solid var(--orange); }

.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.narrow-panel { max-width: 560px; margin: 28px auto; }
.panel h2, .scheduler-header h2, .admin-header h2 { margin: 3px 0 8px; color: var(--blue-900); }
.muted { color: var(--muted); }
.hint { font-size: .84rem; background: var(--yellow-100); border-radius: 12px; padding: 12px; color: #6c5310; }

.form-stack { display: grid; gap: 16px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full-width { grid-column: 1 / -1; }
label, fieldset { display: grid; gap: 7px; font-size: .87rem; font-weight: 700; color: #344054; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; }
legend { padding: 0 5px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cdd6e2;
  border-radius: 11px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #5c99d2; box-shadow: 0 0 0 3px rgba(31,94,163,.12); }
textarea { resize: vertical; }

.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .success-btn {
  border-radius: 11px;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .12s ease, opacity .12s ease;
}
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .danger-btn:hover, .success-btn:hover { transform: translateY(-1px); }
.primary-btn { background: var(--blue-800); color: white; }
.secondary-btn { background: white; color: var(--blue-800); border-color: #a9c5e2; }
.ghost-btn { background: transparent; color: inherit; border-color: currentColor; opacity: .92; }
.danger-btn { background: var(--red-100); color: var(--red); border-color: #f3bcbc; }
.success-btn { background: var(--green-100); color: var(--green); border-color: #b8dfc8; }
.full-btn { width: 100%; margin-top: 10px; }
.icon-btn { border: 0; background: transparent; color: inherit; font-size: 1.15rem; padding: 8px; border-radius: 10px; }
.icon-btn:hover { background: rgba(127,127,127,.12); }
.back-link { border: 0; background: transparent; color: var(--blue-700); font-weight: 800; padding: 0; margin-bottom: 18px; }

.banner { padding: 11px clamp(16px, 4vw, 52px); font-size: .86rem; font-weight: 700; }
.warning { background: var(--yellow-100); color: #6f530d; border-bottom: 1px solid #f0d990; }
.danger { background: var(--red-100); color: var(--red); border: 1px solid #f0b9b9; border-radius: 10px; margin-top: 16px; }

.scheduler-header, .admin-header, .resource-admin-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.scheduler-actions, .admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  box-shadow: 0 6px 14px rgba(13,49,95,.05);
}
.filter-bar label { min-width: 175px; }
.shift-tabs { display: flex; padding: 4px; background: var(--blue-100); border-radius: 12px; gap: 3px; }
.shift-tab { border: 0; background: transparent; color: var(--blue-900); border-radius: 9px; padding: 10px 14px; font-weight: 800; }
.shift-tab.active { background: white; box-shadow: 0 3px 9px rgba(13,49,95,.12); color: var(--blue-700); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 3px; color: var(--muted); font-size: .84rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.available { background: var(--green); }
.dot.booked { background: var(--blue-700); }
.dot.blocked { background: #8a94a6; }

.agenda-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 20px rgba(13,49,95,.06); }
.agenda-grid { min-width: 1060px; display: grid; }
.agenda-row { display: grid; grid-template-columns: 210px repeat(var(--period-count), minmax(135px, 1fr)); border-bottom: 1px solid var(--line); }
.agenda-row:last-child { border-bottom: 0; }
.agenda-cell { min-height: 82px; padding: 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.agenda-cell:last-child { border-right: 0; }
.agenda-head { min-height: 48px; background: #edf4fc; font-size: .83rem; font-weight: 900; color: var(--blue-900); text-align: center; align-items: center; }
.resource-cell { background: #f9fbfd; font-weight: 800; color: var(--blue-900); }
.resource-cell small { color: var(--muted); font-weight: 600; }
.slot { position: relative; background: white; }
.slot.available { cursor: pointer; }
.slot.available:hover { background: var(--green-100); }
.slot.available::after { content: "+ Reservar"; color: var(--green); font-size: .76rem; font-weight: 800; opacity: 0; transition: opacity .15s; }
.slot.available:hover::after { opacity: 1; }
.slot.booked { background: var(--blue-100); border-left: 4px solid var(--blue-700); }
.slot.booked strong { font-size: .83rem; color: var(--blue-900); }
.slot.booked small { font-size: .75rem; color: #4d6682; line-height: 1.25; }
.slot.blocked { background: #f0f2f5; color: #697386; }

.period-options { display: flex; gap: 8px; flex-wrap: wrap; }
.period-check { position: relative; }
.period-check input { position: absolute; opacity: 0; pointer-events: none; }
.period-check span { display: grid; place-items: center; min-width: 42px; height: 40px; border: 1px solid #bfcbd9; border-radius: 9px; background: white; color: var(--blue-900); font-weight: 900; }
.period-check input:checked + span { background: var(--blue-800); color: white; border-color: var(--blue-800); }
.period-check input:disabled + span { background: #eceff3; color: #9aa4b2; text-decoration: line-through; }

.modal { width: min(760px, calc(100% - 24px)); max-height: 90vh; overflow: auto; border: 0; border-radius: 18px; padding: 24px; box-shadow: 0 24px 70px rgba(13,49,95,.24); }
.modal::backdrop { background: rgba(5,24,48,.56); backdrop-filter: blur(2px); }
.compact-modal { width: min(470px, calc(100% - 24px)); text-align: center; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal-header h3 { margin: 2px 0; color: var(--blue-900); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.success-icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--green-100); color: var(--green); font-size: 2rem; font-weight: 900; }
.booking-code { margin: 18px auto; padding: 14px; border: 2px dashed #9bb9d8; border-radius: 12px; font-size: 1.7rem; font-weight: 950; letter-spacing: .14em; color: var(--blue-900); background: var(--blue-100); }
.manage-result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.manage-card { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #f9fbfd; }
.manage-card h4 { margin: 0 0 8px; color: var(--blue-900); }
.manage-card p { margin: 5px 0; color: #475467; }
.manage-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 6px 16px rgba(13,49,95,.05); }
.stat-card span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.stat-card strong { display: block; color: var(--blue-900); font-size: 1.75rem; margin-top: 4px; }
.admin-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.admin-tab { border: 0; background: transparent; padding: 12px 15px; color: var(--muted); font-weight: 900; border-bottom: 3px solid transparent; white-space: nowrap; }
.admin-tab.active { color: var(--blue-800); border-bottom-color: var(--orange); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.table-toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.table-toolbar input { flex: 1; min-width: 240px; }
.table-toolbar select { width: auto; }
.table-scroll { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: .82rem; vertical-align: top; }
th { background: #edf4fc; color: var(--blue-900); font-weight: 900; position: sticky; top: 0; }
td { color: #475467; }
.table-actions { display: flex; gap: 6px; }
.table-actions button { padding: 7px 9px; font-size: .74rem; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: .72rem; font-weight: 900; }
.status-active { color: var(--green); background: var(--green-100); }
.status-cancelled { color: var(--red); background: var(--red-100); }

.resource-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.resource-item { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.resource-item strong { display: block; color: var(--blue-900); }
.resource-item small { color: var(--muted); }
.toggle-btn { border: 0; border-radius: 999px; padding: 7px 10px; font-size: .72rem; font-weight: 900; }
.toggle-on { background: var(--green-100); color: var(--green); }
.toggle-off { background: #eef0f3; color: #6e7785; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #172b46; color: white; border-radius: 11px; padding: 12px 16px; box-shadow: var(--shadow); z-index: 100; font-weight: 700; transition: opacity .2s, transform .2s; max-width: calc(100% - 30px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-list { grid-template-columns: 1fr 1fr; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-illustration { display: none; }
}

@media (max-width: 650px) {
  .topbar { padding: 8px 12px; }
  .brand img { width: 44px; height: 44px; }
  .brand span { display: none; }
  .mode-badge { display: none; }
  main { padding: 18px 12px 34px; }
  .hero-card { border-radius: 20px; padding: 26px 20px; }
  .hero-card h1 { font-size: 2.25rem; }
  .scheduler-header, .admin-header, .resource-admin-header { align-items: flex-start; flex-direction: column; }
  .scheduler-actions, .admin-toolbar { width: 100%; }
  .scheduler-actions button, .admin-toolbar button { flex: 1; }
  .filter-bar { align-items: stretch; }
  .filter-bar label { width: 100%; }
  .shift-tabs { width: 100%; overflow-x: auto; }
  .shift-tab { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: auto; }
  .modal { padding: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .resource-list { grid-template-columns: 1fr; }
}


/* Consulta de disponibilidade */
.availability-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 4px;
}
.availability-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.availability-stat span { color: var(--muted); font-size: .8rem; font-weight: 800; }
.availability-stat strong { color: var(--blue-900); font-size: 1.35rem; }
.slot.available.read-only { cursor: default; align-items: center; text-align: center; background: var(--green-100); }
.slot.available.read-only::after { content: none; }
.slot.available.read-only strong { color: var(--green); font-size: .8rem; }
.slot.blocked { border-left: 4px solid #8a94a6; }
.slot.blocked strong { font-size: .8rem; }
.slot.blocked small { font-size: .73rem; line-height: 1.25; }

/* Administração do horário do PCPI */
.schedule-admin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 8px 20px rgba(13,49,95,.06);
}
.schedule-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.schedule-toolbar label { min-width: 190px; }
.schedule-note {
  background: var(--blue-100);
  border: 1px solid #c9def4;
  color: #365a7d;
  border-radius: 12px;
  padding: 13px 15px;
  line-height: 1.5;
  font-size: .86rem;
  margin-bottom: 14px;
}
.schedule-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ghost-action {
  border: 1px solid #b7c7d9;
  background: #f8fbff;
  color: var(--blue-800);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 850;
}
.ghost-action:hover { background: var(--blue-100); }
.schedule-table-wrap { max-height: 520px; }
.schedule-table { min-width: 680px; }
.schedule-table th, .schedule-table td { text-align: center; vertical-align: middle; }
.schedule-table th:first-child, .schedule-table td:first-child,
.schedule-table th:nth-child(2), .schedule-table td:nth-child(2) { text-align: left; }
.schedule-table .weekend-row { background: #f7f8fa; }
.schedule-check { display: inline-grid; place-items: center; }
.schedule-check input { width: 20px; height: 20px; accent-color: var(--blue-800); }
.schedule-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.status-draft { color: #6b7280; background: #eef0f3; }
.status-published { color: var(--green); background: var(--green-100); }
.resource-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mini-badge { display: inline-flex; border-radius: 999px; padding: 4px 7px; font-size: .68rem; font-weight: 900; background: #eef3f8; color: #53657a; }
.mini-badge.pcpi { background: var(--yellow-100); color: #73570f; }
.resource-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pcpi-toggle-on { background: var(--yellow-100); color: #73570f; }
.pcpi-toggle-off { background: #eef0f3; color: #6e7785; }
.check-row { grid-template-columns: auto 1fr; align-items: center; margin-top: 14px; text-align: left; }
.check-row input { width: 19px; height: 19px; }

@media (max-width: 700px) {
  .availability-stats { grid-template-columns: 1fr; }
  .schedule-toolbar > * { width: 100%; }
  .schedule-toolbar label { min-width: 0; }
  .schedule-footer { align-items: stretch; }
  .schedule-footer .scheduler-actions { width: 100%; }
  .schedule-footer .scheduler-actions button { flex: 1; }
}

.resource-cell.with-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
}
.resource-thumb {
  display: block;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}
.resource-thumb-small { width: 58px; height: 42px; }
.resource-thumb-medium { width: 74px; height: 54px; }
.resource-thumb-large { width: 120px; height: 86px; }
.resource-thumb-placeholder {
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f7fafc;
  font-size: 1.2rem;
}
.selected-resource-card {
  border: 1px solid rgba(26, 63, 113, 0.12);
  border-radius: 18px;
  background: #f9fbff;
  padding: 14px;
  min-height: 86px;
}
.selected-resource-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.selected-resource-card strong,
.resource-admin-main strong {
  display: block;
}
.selected-resource-card p {
  margin: 6px 0 0;
}
.success-email-message {
  max-width: 420px;
  margin: 0 auto 10px;
}
.resource-admin-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 700px) {
  .resource-cell.with-thumb { align-items: flex-start; }
  .resource-thumb-small { width: 48px; height: 36px; }
  .resource-thumb-medium { width: 64px; height: 48px; }
  .resource-thumb-large { width: 100px; height: 74px; }
  .selected-resource-card-inner,
  .resource-admin-main { align-items: flex-start; }
}

/* Versão 4 — início simplificado e semana fictícia de teste */
.home-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
}
.home-action-card {
  width: 100%;
  min-height: 150px;
  border: 1px solid rgba(22, 74, 134, .16);
  border-radius: 24px;
  background: #fff;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(20, 54, 92, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-action-card:hover {
  transform: translateY(-4px);
  border-color: #8db8e4;
  box-shadow: 0 18px 42px rgba(20, 54, 92, .14);
}
.home-action-card strong {
  display: block;
  color: var(--blue-900);
  font-size: 1.32rem;
  margin-bottom: 7px;
}
.home-action-card small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  font-size: .94rem;
}
.home-action-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue-100);
  font-size: 1.65rem;
}
.booking-action-card .home-action-icon { background: var(--yellow-100); }
.home-action-arrow {
  font-size: 1.8rem;
  color: var(--blue-800);
  font-weight: 800;
}
.demo-week-card {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(22, 74, 134, .28);
  background: linear-gradient(135deg, #f8fbff, #fffaf0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.demo-week-card h3 { margin: 10px 0 6px; color: var(--blue-900); }
.demo-week-card p { margin: 0; color: var(--muted); max-width: 720px; }
.profile-selection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.compact-btn { padding: 8px 12px; white-space: nowrap; }
.demo-day-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}
.demo-day-button {
  border: 1px solid rgba(22, 74, 134, .15);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--blue-900);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 5px 16px rgba(20, 54, 92, .06);
}
.demo-day-button span { text-transform: capitalize; color: var(--muted); font-size: .82rem; }
.demo-day-button strong { font-size: .95rem; }
.demo-day-button:hover,
.demo-day-button.active {
  background: var(--blue-800);
  color: #fff;
  border-color: var(--blue-800);
}
.demo-day-button.active span,
.demo-day-button:hover span { color: rgba(255,255,255,.82); }

@media (max-width: 820px) {
  .home-action-grid,
  .profile-selection-grid { grid-template-columns: 1fr; }
  .demo-week-card,
  .demo-banner { align-items: stretch; flex-direction: column; }
  .demo-day-nav {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 560px) {
  .home-action-card {
    grid-template-columns: auto 1fr;
    padding: 19px;
    min-height: 132px;
  }
  .home-action-arrow { display: none; }
  .home-action-icon { width: 50px; height: 50px; border-radius: 15px; }
  .demo-day-nav { grid-template-columns: repeat(5, 92px); }
}
