.console {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  background: #f5f6f0;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 33px 22px;
  display: flex;
  flex-direction: column;
  gap: 35px;
}
.sidebar .brand {
  font-size: 24px;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: -18px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 16px;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.sidebar nav a span {
  font-size: 12px;
  font-weight: 600;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  background: #edf3e5;
  color: var(--ink);
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 18px;
}
.sidebar-bottom > a {
  font-size: 12px;
  text-decoration: none;
}
.logout {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.control-main {
  width: 100%;
  max-width: 1330px;
  margin: 0 auto;
  padding: 39px 48px 80px;
  min-width: 0;
}
.page-context {
  font-size: 9px;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin-bottom: 31px;
}
.control-main h1 {
  font-size: 40px;
  line-height: 1.12;
  margin-bottom: 14px;
}
.control-main h2 {
  font-size: 24px;
  margin: 0 0 18px;
  letter-spacing: -0.035em;
}
.control-main h3 {
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
.control-main p {
  font-size: 14px;
  line-height: 1.7;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 26px;
}
.page-head h1 {
  margin-bottom: 9px;
}
.page-head p {
  margin: 0;
}
.card,
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 27px;
  margin-bottom: 23px;
  box-shadow: var(--shadow-card);
}
.panel.accent {
  background: #ebf2e1;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 30px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 33px;
  letter-spacing: -0.05em;
  margin-top: 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.row,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.row {
  justify-content: space-between;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.grid > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 0 0 23px;
  padding: 27px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}
.form-section > legend {
  float: left;
  width: 100%;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}
.form-section > legend + * {
  clear: both;
}
.form-section > p {
  font-size: 12px;
}
.form-section > label,
.form-section > input {
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid > .wide {
  grid-column: 1/-1;
}
.form-grid input {
  margin: 0;
}
.control-main label {
  margin-top: 7px;
  font-size: 12px;
}
.control-main input,
.control-main select {
  font-size: 14px;
}
.control-main button:not(.btn):not(.logout):not(.delete-row) {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.control-main button.ghost:not(.btn):not(.logout):not(.delete-row) {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.save-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  bottom: 12px;
  padding: 15px 20px;
  background: #ffffffed;
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px #1927190a;
  z-index: 5;
}
.save-bar span {
  font-size: 11px;
  color: var(--muted);
}
.service-row {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1fr auto;
  gap: 13px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.delete-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--error);
  width: 39px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
}
.service-row label {
  margin: 0;
}
.hours-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.hours-grid input {
  font-size: 11px;
  padding: 10px 7px;
}
.hours-grid label {
  font-size: 11px;
}
.notice {
  padding: 16px 20px;
  background: #eaf2df;
  border: 1px solid #d2dfc3;
  border-radius: 12px;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.7;
}
.notice.warning {
  background: #fff7e8;
  border-color: #efd8aa;
}
.notice.error {
  background: #fff0ed;
  border-color: #f1cdc4;
  color: #993a30;
}
.notice:empty {
  display: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #edf1e8;
  white-space: nowrap;
}
.tag.ok {
  background: #e5f1d9;
  color: #456029;
}
.tag.warn {
  background: #fff0d6;
  color: #865722;
}
.tag.bad {
  background: #fce9e4;
  color: #9e4231;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 13px 14px;
  background: #f7f8f3;
  white-space: nowrap;
}
td {
  border-bottom: 1px solid #e7eae1;
  padding: 18px 14px;
  vertical-align: middle;
}
td a {
  text-decoration: none;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbf7;
}
.table-panel {
  padding: 0;
  overflow: hidden;
}
.toolbar {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.toolbar input {
  max-width: 320px;
  font-size: 13px;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  font-size: 22px;
  color: var(--ink);
}
.copy-field {
  display: flex;
  gap: 10px;
  min-width: 0;
}
.copy-field input {
  font-size: 12px;
  background: var(--paper);
  min-width: 0;
}
.copy-field button {
  flex-shrink: 0;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 19px;
}
.breadcrumbs a {
  text-decoration: none;
}
.two-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 25px;
  align-items: start;
}
.control-main details {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  padding: 18px 20px;
  margin-bottom: 17px;
}
.control-main summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.control-main details[open] > summary {
  margin-bottom: 18px;
}
.control-main details p {
  font-size: 12px;
}
.checklist {
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.checklist li {
  padding-left: 7px;
  margin-bottom: 15px;
}
.checklist b {
  display: block;
  color: var(--ink);
}
.price-big {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.3;
}
.price-big small {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.portal {
  background: #f4f6ed;
}
.portal .control-main {
  max-width: 920px;
  padding-top: 32px;
}
.portal .page-context {
  margin-top: 32px;
}
.portal .card {
  padding: 28px;
}
.portal .control-main h1 {
  font-size: 37px;
}
.login {
  max-width: 450px;
  margin: 70px auto;
}
.login h1 {
  font-size: 34px;
}
.login input {
  margin: 10px 0 18px;
}
.login button {
  width: 100%;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  font-size: 13px;
}
.inline {
  display: inline;
}
.inline input {
  width: 230px;
}
.inline button {
  font-size: 12px;
}
.billing-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 15px;
}
.control-main .card > label + input {
  margin-bottom: 15px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.guide-grid .card {
  margin: 0;
}
.guide-grid li {
  margin-bottom: 13px;
  font-size: 13px;
  line-height: 1.7;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.status-item {
  padding: 12px;
  background: var(--paper);
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.pending {
  color: #895b1d;
}
.err:empty {
  display: none;
}
.check input {
  margin-right: 8px;
}
code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  font: 13px/1.8 inherit;
  overflow-wrap: anywhere;
}
.secret-link {
  overflow-wrap: anywhere;
}
.service-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
@media (max-width: 1100px) {
  .console {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .control-main {
    padding: 32px 27px 65px;
  }
  .hours-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 29px;
  }
  .page-head {
    align-items: start;
  }
  .service-row {
    grid-template-columns: 1.4fr 0.7fr 1fr auto;
  }
}
@media (max-width: 760px) {
  .console {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 20px;
    gap: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar > .brand {
    font-size: 22px;
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 0 -6px;
  }
  .sidebar nav a {
    padding: 9px;
    flex-shrink: 0;
    font-size: 13px;
    gap: 6px;
  }
  .sidebar nav a span {
    font-size: 11px;
  }
  .sidebar nav a:nth-child(n + 4) {
    display: none;
  }
  .control-main {
    padding: 26px 19px 55px;
  }
  .page-context {
    margin-bottom: 23px;
    font-size: 8px;
  }
  .control-main h1 {
    font-size: 33px;
  }
  .page-head {
    display: block;
  }
  .page-head .actions {
    margin-top: 17px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:last-child {
    grid-column: 1/-1;
  }
  .stat strong {
    font-size: 29px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-section,
  .card,
  .panel {
    padding: 21px;
  }
  .form-section legend {
    font-size: 18px;
  }
  .hours-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .service-row {
    grid-template-columns: 1fr 1fr 40px;
    gap: 10px;
  }
  .service-row > label:first-of-type {
    grid-column: 1/-1;
  }
  .service-row > input[type="hidden"] {
    display: none;
  }
  .service-row .delete-row {
    grid-column: 3;
    grid-row: 2;
  }
  .save-bar {
    padding: 13px;
    gap: 10px;
    bottom: 7px;
  }
  .save-bar span {
    font-size: 10px;
  }
  .toolbar {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .toolbar input {
    max-width: none;
  }
  .table-panel {
    padding: 0;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .copy-field {
    flex-wrap: wrap;
  }
  .copy-field input {
    flex-basis: 100%;
  }
  .portal .control-main h1 {
    font-size: 32px;
  }
  .portal .control-main {
    padding: 26px 19px;
  }
  .login {
    margin: 40px auto;
  }
  .inline input {
    width: 100%;
    margin: 8px 0;
  }
  .control-main .btn {
    font-size: 13px;
  }
  .control-main .grid {
    grid-template-columns: 1fr;
  }
  .price-big {
    font-size: 39px;
  }
  .portal .card {
    padding: 23px;
  }
  .toast {
    bottom: 18px;
    left: 18px;
    right: 18px;
  }
  .table-wrap table {
    min-width: 590px;
  }
}
@media print {
  .sidebar,
  .save-bar,
  button,
  .actions,
  .page-context {
    display: none !important;
  }
  .console {
    display: block;
  }
  .control-main {
    padding: 0;
  }
  .card,
  .panel {
    border: 0;
    box-shadow: none;
  }
  body {
    background: white;
  }
}
.booking-header {
  margin: 28px 0;
}
.booking-header h1 {
  max-width: 700px;
}
.booking-chat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.chat-top {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-top .muted {
  margin-left: auto;
  font-weight: 400;
  font-size: 11px;
}
#chat {
  max-height: 450px;
  min-height: 160px;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.control-main .chat-message {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #f1f4eb;
  padding: 16px 19px;
  border-radius: 14px 14px 14px 3px;
  max-width: 90%;
  margin: 0;
  color: var(--ink);
  align-self: flex-start;
  overflow-wrap: anywhere;
}
.control-main .chat-message.mine {
  align-self: flex-end;
  background: var(--forest);
  color: white;
  border-radius: 14px 14px 3px 14px;
}
.control-main .chat-message.typing {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.chat-message.typing .spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: chat-spin 0.8s linear infinite;
}
@keyframes chat-spin {
  to {
    transform: rotate(360deg);
  }
}
.chat-buttons {
  padding: 0 22px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#chat .chat-buttons.own {
  padding: 0;
}
.control-main .chat-buttons button {
  background: white !important;
  color: var(--ink) !important;
  border: 1px solid #c8d8b5 !important;
  font-size: 12px;
  padding: 11px 15px !important;
  text-align: left;
}
.control-main .chat-buttons button:hover {
  background: #edf3e5 !important;
}
/* A link button (calendar, review) looks like the other buttons. */
.control-main .chat-buttons a {
  display: inline-block;
  background: white;
  color: var(--ink);
  border: 1px solid #c8d8b5;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  padding: 11px 15px;
  text-decoration: none;
}
.control-main .chat-buttons a:hover {
  background: #edf3e5;
}
.control-main .chat-buttons button:disabled,
.booking-chat #form button:disabled {
  opacity: 0.55;
  cursor: progress;
}
.booking-chat #form {
  display: flex;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #fafbf6;
}
.booking-chat #form input {
  border: 0;
  background: none;
  padding: 9px 0;
}
.booking-chat #form button {
  font-size: 21px;
  min-width: 45px;
  background: var(--lime) !important;
  color: var(--ink) !important;
  padding: 6px 12px !important;
}
.booking-chat #status:empty {
  display: none;
}
.booking-chat #status {
  padding: 0 22px;
}
.demo-notice {
  font-size: 12px;
}
.demo-notice p {
  font-size: 12px;
  margin: 5px 0 8px;
}
.demo-notice a {
  font-size: 11px;
}
@media (max-width: 760px) {
  .portal .booking-header h1 {
    font-size: 29px;
  }
  #chat {
    padding: 17px;
    max-height: 430px;
  }
  .control-main .chat-message {
    font-size: 13px;
    max-width: 95%;
    padding: 13px 15px;
  }
  .chat-buttons {
    padding: 0 17px 18px;
  }
  .booking-chat #form {
    padding: 13px 17px;
  }
  .chat-top {
    padding: 16px 17px;
  }
  .demo-notice {
    margin-top: 20px;
  }
}
@media (max-width: 760px) {
  .sidebar nav a:nth-child(n + 4) {
    display: flex;
  }
  .sidebar-bottom {
    display: flex;
    margin-top: 0;
    gap: 22px;
    align-items: center;
  }
  .sidebar-bottom .pill {
    display: none;
  }
}
.demo-links {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.demo-links img {
  border: 1px solid #dfe5d8;
  border-radius: 14px;
  background: #fff;
}
pre.report-text {
  white-space: pre-wrap;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.service-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  margin: 10px 0;
  border: 1px solid #dfe5d8;
  border-radius: 16px;
  background: #fff;
}
.service-card h3 {
  margin: 0 0 4px;
}
.service-card p {
  margin: 0;
}
.table-scroll {
  overflow-x: auto;
}
table.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.log th,
table.log td {
  text-align: left;
  vertical-align: top;
  padding: 6px 8px;
  border-bottom: 1px solid #edf1e8;
}

.gift {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff3cf;
  color: #4a3600;
  font-weight: 600;
}
.my-visits {
  list-style: none;
  padding: 0;
  margin: 0;
}
.my-visits li {
  padding: 12px 0;
  border-bottom: 1px solid #edf1e8;
}
.my-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.my-actions form.inline {
  display: inline;
}
.my-actions .danger {
  color: #a13a2a;
  border-color: #e3c4bd;
}

/* v0.32: the settings form says what is filled — a saved secret shows as saved, a section counts its fields */
.form-section > legend .fill { font-size: 11px; font-weight: 600; letter-spacing: 0; margin-left: 10px; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.form-section > legend .fill.ok { background: #e6f4d9; color: #2f5d0f; }
.form-section > legend .fill.none { background: #f1f1ea; color: #4a5750; }
.form-grid .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-grid .field input { margin: 0; }
.form-grid .field.filled input, .control-main textarea.filled { border-left: 3px solid #86c232; }
.control-main input::placeholder, .control-main textarea::placeholder { color: #8a968d; font-size: 13px; }
.control-main .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 18px; }
.control-main .actions.checks form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-main .actions.checks span { font-size: 12px; color: var(--muted); }
.tag.warn { background: #fff3cf; color: #6b4d00; }
/* The checks live apart from the settings, in their own block and colour */
.control-main .checks-block { margin: 26px 0 18px; padding: 22px 27px; border-radius: 18px; background: #eef5e4; border: 1px solid #d4e3c3; }
.control-main .checks-block h2 { margin: 0 0 4px; font-size: 19px; }
.control-main .checks-block .actions { margin: 12px 0 0; flex-direction: column; align-items: stretch; gap: 10px; }
.control-main .checks-block button.check:not(.btn) { background: #fff; color: #2f5d0f; border: 1.5px solid #86c232; font-weight: 600; }
.control-main .checks-block button.check:not(.btn):hover { background: #f4faee; }
.cert { max-width: 520px; }
.cert-sum { font-size: 34px; font-weight: 700; margin: 4px 0; }
.cert-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 26px; letter-spacing: .08em; padding: 12px 16px; border: 2px dashed #1f3d2b; border-radius: 12px; display: inline-block; margin: 6px 0 14px; user-select: all; }
.api-key { display: inline-block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; padding: 8px 12px; border: 1px solid #d5dbd3; border-radius: 10px; background: #fff; word-break: break-all; user-select: all; }
form.inline { display: inline; }
