/*
  Calendo Beauty UI
  Rose/blush tokens. Layout language mirrors the Dental/Health portal
  (topbar, sidebar, bottom-nav, cards) without Dental teal or Health amber child chips.
*/

:root {
  --paper: #fbf7f8;
  --mist: #f8eef2;
  --rose: #9a4068;
  --blush: #d4a0b3;
  --clay: #c4784a;
  --bg: var(--paper);
  --panel: rgba(255, 255, 255, 0.96);
  --text: #2a1b22;
  --muted: rgba(42, 27, 34, 0.64);
  --line: rgba(42, 27, 34, 0.12);
  --brand: var(--rose);
  --brand2: var(--blush);
  --ok: #16a34a;
  --warn: #ea580c;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 18px 60px rgba(42, 27, 34, 0.10);
  --mobile-shell-top-offset: calc(72px + env(safe-area-inset-top));
  --mobile-shell-bottom-offset: calc(84px + env(safe-area-inset-bottom));
}

html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--brand); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

.wrap { max-width: 640px; margin: 0 auto; padding: 46px 18px; }
.card {
  background: #fff;
  border: 1px solid #ead5dc;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(154, 64, 104, 0.22);
  flex: 0 0 auto;
}
.brand-name { font-weight: 900; font-size: 16px; letter-spacing: -0.02em; }
.brand-tag { margin-top: 2px; font-size: 12px; color: var(--muted); }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  border: 1px solid #e0c7d0; border-radius: 8px; color: #5a3a46;
  padding: 6px 9px; font-size: 12px; font-weight: 900; background: #fff;
}
.lang-switch a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

h1, h2 { margin: 0 0 8px; line-height: 1.15; }
h1 { font-size: 28px; }
h2 { font-size: 20px; margin-top: 22px; }
.lead { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.hint { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.muted { color: var(--muted); font-size: 13px; }
.empty {
  padding: 18px; border-radius: 14px; background: var(--mist);
  border: 1px dashed #e0c7d0; color: var(--muted);
}

label { display: block; margin-top: 12px; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%; padding: 10px; border-radius: 10px;
  border: 1px solid #e0c7d0; background: #fffdfd; color: var(--text);
  margin-top: 6px; box-sizing: border-box;
}
input:focus, select:focus { outline: 2px solid rgba(154, 64, 104, 0.28); border-color: var(--brand); }
button, .btn {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px; border: none;
  background: var(--brand); color: #fff; font-weight: 900; width: 100%;
  cursor: pointer; display: inline-block; text-align: center; box-sizing: border-box;
}
button:hover, .btn:hover { background: #7c3253; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.ghost { background: transparent; color: var(--text); width: auto; margin: 0; padding: 8px; }

.msg { margin: 10px 0; padding: 10px; border-radius: 12px; }
.msg-error { background: #fff1ec; border: 1px solid rgba(196, 120, 74, 0.35); color: #7c2d12; }

.salon-code {
  margin: 0 0 14px; padding: 10px 12px; border: 1px solid #ead5dc;
  border-radius: 12px; background: var(--mist); display: grid; gap: 2px;
}
.salon-code__label { font-size: 12px; font-weight: 800; color: var(--muted); }
.salon-code__value { font-size: 18px; font-weight: 900; color: #7c3253; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(251, 247, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40;
  background: #fff; border-right: 1px solid var(--line);
  padding: 88px 16px 24px; transform: translateX(-110%);
  transition: transform 0.2s ease;
}
.sidebar.open, body.sidebar-open .sidebar { transform: none; }
.sidebar-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sidebar-link {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 700;
}
.sidebar-link.is-active { background: var(--mist); color: var(--brand); }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(42, 27, 34, 0.28); z-index: 30; }
.backdrop.open { display: block; }
.content { padding: 18px 18px 120px; max-width: 880px; margin: 0 auto; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
}
.bottom-nav .item {
  font-size: 11px; text-align: center; padding: 8px 4px; border-radius: 10px; color: var(--muted);
}
.bottom-nav .item.is-active { color: var(--brand); background: var(--mist); }

.stack { display: grid; gap: 10px; padding: 0; list-style: none; }
.appt-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: #fff; border: 1px solid #ead5dc; border-radius: 16px;
}
.when { font-weight: 900; color: var(--brand); min-width: 92px; }
.chip {
  font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 999px;
  background: var(--mist); color: #7c3253;
}
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { font-size: 12px; color: var(--muted); }
.defs { display: grid; gap: 10px; }
.defs div { background: #fff; border: 1px solid #ead5dc; border-radius: 12px; padding: 12px 14px; }
.defs dt { font-size: 12px; color: var(--muted); font-weight: 800; }
.defs dd { margin: 4px 0 0; font-weight: 700; }
.form-grid { display: grid; gap: 4px; }
.table-cards-view { display: none; }
@media (max-width: 720px) {
  table.js-responsive-table { display: none; }
  .table-cards-view { display: grid; gap: 10px; }
  .tcard { background: #fff; border: 1px solid #ead5dc; border-radius: 16px; padding: 12px; }
  .tcard .row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
  .tcard .k { color: var(--muted); font-size: 12px; }
  .sidebar { display: none; }
  .sidebar.open { display: block; }
}
@media (min-width: 900px) {
  .sidebar { transform: none; position: sticky; top: 64px; height: calc(100vh - 64px); }
  .app-shell { display: grid; grid-template-columns: 260px 1fr; }
  .topbar { grid-column: 1 / -1; }
  .bottom-nav { display: none; }
  .content { padding-bottom: 40px; }
}
