:root {
  --bg: #071426;
  --panel: #10243a;
  --panel-soft: #17314d;
  --text: #f5f6fa;
  --muted: #aebdd0;
  --line: #29445f;
  --accent: #b7ff3c;
  --accent-soft: rgba(183, 255, 60, 0.12);
  --accent-text: #b7ff3c;
  --danger: #ffb4a8;
  --sidebar-bg: rgba(5, 17, 34, .96);
  --row-highlight: rgba(15, 17, 23, .35);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #eef1f6;
  --text: #10162a;
  --muted: #5b6478;
  --line: #d7dce6;
  --accent: #7ac82e;
  --accent-soft: rgba(122, 200, 46, 0.14);
  --accent-text: #4d7a00;
  --danger: #c02f2f;
  --sidebar-bg: #ffffff;
  --row-highlight: rgba(16, 22, 42, .04);
  --shadow: 0 1px 2px rgba(16, 22, 42, 0.08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button { font: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand-block { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text, #f4f1ea);
  font-size: 1.2rem;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent); color: #101411; font-weight: 800;
}
.brand-title { font-weight: 750; letter-spacing: -.02em; }
.brand-subtitle { color: var(--muted); font-size: 14px; margin-top: 2px; }
.nav-menu { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  width: 100%; border: 0; border-left: 2px solid transparent; border-radius: 8px; padding: 10px 12px;
  display: flex; gap: 12px; align-items: center;
  color: var(--muted); background: transparent; cursor: pointer; text-align: left;
  font-size: 14px;
}
.nav-item:hover { color: var(--text); background: var(--panel-soft); }
.nav-item.active { color: var(--text); background: var(--panel-soft); border-left-color: var(--accent); }
.sidebar-footer { margin-top: auto; color: var(--muted); font-size: 13px; }
.main-content { flex: 1; padding: 32px 36px; overflow: auto; }
.topbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.global-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.global-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.global-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}
.global-search-group-label {
  padding: 10px 14px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.global-search-result {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 14px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.global-search-result:hover,
.global-search-result.active {
  background: var(--panel-soft);
}
.global-search-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.global-search-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .global-search { order: 3; max-width: none; flex-basis: 100%; }
}
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb-sep { color: var(--line); }
.breadcrumb-current { color: var(--text); font-weight: 650; }
.topbar h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 32px); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; }
h2 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.02em; margin-bottom: 8px; }
h3 { margin-bottom: 8px; }
.eyebrow { color: var(--accent-text); text-transform: uppercase; font-size: 12px; font-weight: 750; letter-spacing: .12em; margin-bottom: 8px; }
.profile-pill, .badge {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 8px 12px; font-size: 13px; white-space: nowrap;
}
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
}
.profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #101411;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.inline-badge {
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
}
.inline-badge.health-flag {
  color: #92660a;
  background: rgba(249, 215, 131, 0.14);
  border-color: rgba(249, 215, 131, 0.3);
  cursor: help;
}
[data-theme="light"] .inline-badge.health-flag {
  color: #92660a;
}
.page { display: none; }
.active-page { display: block; }
.hero-panel, .panel, .table-card, .simple-card, .empty-state, .settings-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-panel { padding: 28px; display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.hero-panel p, .page-intro p, .simple-card p, .empty-state p { color: var(--muted); line-height: 1.55; }
.primary-button, .secondary-button, .filter-button, .icon-button {
  border: 0; border-radius: 10px; cursor: pointer; font-weight: 650;
  padding: 11px 16px;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease, transform .1s ease;
}
.primary-button:hover { opacity: .9; }
.secondary-button:hover { background: var(--panel); border-color: var(--muted); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.secondary-button { background: var(--panel-soft); color: var(--text); border: 1px solid var(--line); }
.secondary-button.compact { padding: 8px 12px; font-size: 13px; }
.secondary-button.danger-button { color: var(--danger); border-color: var(--danger); }
.hero-panel, .panel, .table-card, .simple-card, .metric-card, .detail-panel, .settings-panel {
  transition: border-color .15s ease;
}
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.metric-card strong { display: block; font-size: 38px; letter-spacing: -.04em; margin: 8px 0; }
.metric-label, .metric-card small { color: var(--muted); }
.content-grid.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.panel { padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.upcoming-panel { margin-bottom: 24px; }
.upcoming-panel .activity-list li time { color: var(--accent-text); font-weight: 750; white-space: nowrap; }
.time-tracker-settings-panel { margin-bottom: 24px; }
.inline-settings-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.inline-settings-form label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.inline-settings-form input {
  width: 140px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  outline: none;
}
.inline-settings-form input:focus { border-color: var(--accent); }
.activity-list, .task-list { margin: 0; padding-left: 20px; color: var(--muted); }
.activity-list { list-style: none; padding-left: 0; }
.activity-list li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.activity-list li:last-child { border-bottom: 0; }
time { color: var(--accent-text); white-space: nowrap; }
.page-intro { margin-bottom: 20px; max-width: 760px; }
.table-card { overflow: hidden; }
.inline-detail-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}
.inline-detail-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.inline-detail-table th,
.inline-detail-table td {
  padding: 10px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.inline-detail-table td:nth-child(4) { white-space: normal; min-width: 160px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.skeleton-line {
  display: block;
  height: 14px;
  border-radius: 6px;
  width: 70%;
  background: linear-gradient(90deg, var(--panel-soft) 25%, var(--line) 37%, var(--panel-soft) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.row-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: block;
  width: 100%;
}
.row-link strong { transition: color .15s ease; }
.row-link:hover strong { color: var(--accent-text); }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background-color: var(--panel-soft); }
tbody tr.inline-detail-row:hover { background-color: transparent; }
.status.active { color: var(--accent-text); }
.status.trial { color: #f9d783; }
.status.paused { color: var(--danger); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.simple-card { padding: 24px; }
.empty-state { padding: 36px; text-align: center; }
.settings-list { overflow: hidden; }
.settings-list div { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.settings-list div:last-child { border-bottom: 0; }
.settings-list span { color: var(--muted); }

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; }
  .nav-toggle { display: block; }
  .nav-menu { display: none; grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 16px; }
  .nav-menu.nav-open { display: grid; }
  .topbar, .hero-panel { align-items: flex-start; flex-direction: column; }
  .metric-grid, .content-grid.two-column, .card-grid { grid-template-columns: 1fr; }
  .main-content { padding: 20px; }
  table { min-width: 680px; }
  .table-card { overflow-x: auto; }
}


.console-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}
.console-header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.console-header p {
  color: var(--muted);
  line-height: 1.55;
  max-width: 780px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.search-box {
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.search-box input,
.form-preview input,
.form-preview select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  outline: none;
}
.search-box input:focus,
.form-preview input:focus,
.form-preview select:focus,
.form-preview textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-preview select {
  cursor: pointer;
  padding-right: 44px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%23aebdd0' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.filter-button {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 9px 13px;
}
.filter-button.active,
.filter-button:hover {
  color: #101411;
  background: var(--accent);
  border-color: var(--accent);
}
.summary-row {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.collection-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.table-subtext {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.35;
}
.over-budget-text {
  color: var(--danger);
  font-weight: 650;
}
.empty-table {
  color: var(--muted);
  text-align: center;
  padding: 44px 28px;
  line-height: 1.6;
}
.empty-table::before {
  content: "◌";
  display: block;
  font-size: 28px;
  color: var(--line);
  margin-bottom: 10px;
}
.detail-panel {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.detail-panel.hidden { display: none; }
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  margin-bottom: 20px;
}
.detail-actions:last-child {
  margin-bottom: 0;
}
.invite-status {
  margin-top: 12px;
  font-size: 13px;
}
.detail-subheading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 10px;
}
.detail-subheading .eyebrow { margin-bottom: 0; }
.detail-subheading + .muted {
  margin-top: -2px;
}
.scrollable-list {
  max-height: 260px;
  overflow-y: auto;
}
.detail-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  resize: vertical;
}
.detail-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.action-checklist {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.action-checklist li label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  color: var(--text);
}
.action-checklist input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.action-checklist li.done span {
  color: var(--muted);
  text-decoration: line-through;
}
.action-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}
.action-list-item input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.contacts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-card span {
  color: var(--muted);
  font-size: 13px;
}
.contact-card strong {
  word-break: break-word;
}
.contact-card-actions {
  margin-top: 6px;
}
.contact-card .invite-status {
  margin-top: 4px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .contacts-grid { grid-template-columns: 1fr; }
}
.coming-soon-form {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}
.coming-soon-form input,
.coming-soon-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}
.coming-soon-form input:focus,
.coming-soon-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.coming-soon-form button {
  justify-self: start;
}
.activity-list li {
  align-items: flex-start;
}
.activity-list li .icon-button {
  width: 28px;
  height: 28px;
  font-size: 16px;
  flex-shrink: 0;
}
.modal {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  margin: 0;
  width: min(520px, 100%);
  height: 100vh;
  max-height: 100vh;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.28);
  padding: 24px;
  overflow-y: auto;
  transform: translateX(0);
  transition: transform .22s ease;
}
.modal:not([open]) {
  transform: translateX(100%);
}
@starting-style {
  .modal[open] {
    transform: translateX(100%);
  }
}
.modal::backdrop {
  background: rgba(0,0,0,.5);
  transition: background-color .22s ease;
}
@starting-style {
  .modal[open]::backdrop {
    background-color: transparent;
  }
}
@media (max-width: 560px) {
  .modal { width: 100%; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 20px;
}
.form-preview {
  display: grid;
  gap: 24px;
  margin: 24px 0;
}
.form-preview label {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.form-preview label[hidden] {
  display: none;
}
.form-preview label.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
}
.form-preview label.checkbox-label input {
  width: auto;
  min-height: 0;
  flex-shrink: 0;
}
.checkbox-group-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 0 0 12px;
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.checkbox-group .checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}
.checkbox-group .checkbox-label input {
  width: auto;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
button:disabled,
input:disabled,
select:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .console-header, .toolbar { flex-direction: column; align-items: stretch; }
  .filter-group { justify-content: flex-start; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .detail-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }
}
.status.planning { color: #9ed4ff; }
.status.completed { color: #b7ff3c; }
.status.archived { color: #a8afc2; }
.status.creating { color: #f9d783; }
.status.ready-to-post { color: #c9a8ff; }
.status.posted { color: var(--accent-text); }

.inline-detail-row > td {
  padding: 0 18px 18px;
  background: var(--row-highlight);
}
.inline-detail-panel {
  margin-top: 0;
  box-shadow: none;
}
.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status.published { color: var(--accent-text); }
.status.draft { color: #f9d783; }

.status.upcoming { color: #9ed4ff; }
.status.cancelled { color: var(--danger); }

.status.scheduled { color: #9ed4ff; }
.status.logged { color: var(--accent-text); }


.settings-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
}
.settings-subnav-item {
  width: 100%;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.settings-subnav-item:hover {
  color: var(--text);
  background: var(--panel-soft);
}
.settings-subnav-item.active {
  color: var(--text);
  background: var(--panel-soft);
  border-left-color: var(--accent);
}
.settings-content { min-width: 0; }
.settings-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: none;
}
.settings-panel.active {
  display: block;
}
.settings-form {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.settings-form label,
.settings-form .full-width {
  width: 100%;
}
.settings-form label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.settings-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
.compact-list {
  box-shadow: none;
  background: transparent;
  border: none;
  border-radius: 0;
}
.compact-list div {
  padding: 14px 4px;
}
.compact-list div:first-child {
  padding-top: 0;
}
.compact-list div:last-child {
  padding-bottom: 0;
}
.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-subnav { position: static; flex-direction: row; flex-wrap: wrap; }
  .settings-subnav-item { width: auto; border-left: 0; border-bottom: 2px solid transparent; }
  .settings-subnav-item.active { border-left-color: transparent; border-bottom-color: var(--accent); }
}


/* Firebase authentication — v0.2.0 */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(183,255,60,.08), transparent 38%), var(--bg);
}
.auth-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card > p { color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 10px; margin-top: 24px; }
.auth-form label { color: var(--muted); font-size: 13px; font-weight: 650; margin-top: 5px; }
.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-message { min-height: 20px; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.auth-error { color: var(--danger); }
.access-denied { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.access-denied p { color: var(--muted); line-height: 1.55; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.auth-locked .console-shell,
.auth-checking .console-shell { display: none; }
.auth-unlocked .auth-screen { display: none; }
.auth-unlocked .console-shell { display: flex; }
@media (max-width: 900px) {
  .topbar-actions { width: 100%; justify-content: space-between; }
}


/* Live customer forms — v0.2.1 */
.form-preview textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  min-height: 104px;
  padding: 13px 16px;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  outline: none;
}
.form-preview .full-width { grid-column: 1 / -1; }
.form-message { min-height: 20px; color: var(--muted); margin: 12px 0 0; }

/* Live resources and uploads — v0.2.3 */
.upload-progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.form-preview input[type="file"] {
  padding: 10px;
}

/* Library foundations — v0.2.4 */
.checkbox-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 0;
}
.checkbox-fieldset legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  padding: 0 6px;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.checkbox-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--text) !important;
}
.checkbox-option input { width: auto; margin: 0; }
@media (max-width: 700px) { .checkbox-grid { grid-template-columns: 1fr; } }

/* Console identity and form spacing — v0.2.5 */

/* Light theme — status colour overrides. The dark-mode pastel status
   colours (readable on a dark background) don't have enough contrast
   against a white panel, so light mode gets darker, more saturated
   equivalents of the same hues. */
[data-theme="light"] .status.trial,
[data-theme="light"] .status.creating,
[data-theme="light"] .status.draft { color: #92660a; }
[data-theme="light"] .status.planning,
[data-theme="light"] .status.upcoming,
[data-theme="light"] .status.scheduled { color: #0369a1; }
[data-theme="light"] .status.archived { color: #5b6478; }
[data-theme="light"] .status.ready-to-post { color: #7c3aed; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  gap: 2px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
}
.theme-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.theme-toggle button.active {
  background: var(--panel);
  color: var(--text);
}

/* Calendar */
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-nav h3 {
  margin: 0;
  min-width: 160px;
  text-align: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-day-header {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 10px;
  text-align: center;
}
.calendar-day-cell {
  background: var(--panel);
  min-height: 96px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calendar-day-cell.outside-month {
  background: var(--bg);
}
.calendar-day-cell.outside-month .calendar-day-number {
  color: var(--line);
}
.calendar-day-cell.is-today .calendar-day-number {
  background: var(--accent);
  color: #101411;
}
.calendar-day-number {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.calendar-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-item.calendar-item-event {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.calendar-item.calendar-item-booking {
  background: rgba(158, 212, 255, 0.14);
  color: #0369a1;
}
[data-theme="light"] .calendar-item.calendar-item-booking {
  color: #0369a1;
}
:root:not([data-theme="light"]) .calendar-item.calendar-item-booking {
  color: #9ed4ff;
}
@media (max-width: 900px) {
  .calendar-day-cell { min-height: 64px; }
  .calendar-day-header { font-size: 10px; padding: 6px 4px; }
}

/* Bulk actions */
.checkbox-col {
  width: 40px;
}
.checkbox-col input,
td.checkbox-col input {
  cursor: pointer;
}
.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Customer tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.tag-chip {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.tag-chip:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* Enabled Features toggle */
.feature-disabled {
  display: none !important;
}
