@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-wght-italic.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/jost-latin-wght-normal.woff2) format("woff2"); }
:root {
  --bg: #f6f1ec; --card: #fff; --plum: #3d1f35; --plum-2: #5a2e4e; --wine: #7b3f61; --blush: #f1ddd5; --sage: #6f8160; --gold: #b8915a;
  --ink: #2a1824; --muted: #7a6672; --line: rgba(61, 31, 53, .12); --ok: #3f7a4f; --warn: #a8641a; --bad: #a83a3a;
  --serif: "Cormorant", Georgia, serif; --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --slot: 22px; /* height of 15 minutes in the diary */
  --tabs-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { min-height: 100dvh; display: grid; place-items: center; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--wine); }
.btn-line { border-color: var(--line); background: var(--card); }
.btn-line:hover { border-color: var(--wine); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { color: var(--bad); border-color: rgba(168, 58, 58, .3); background: var(--card); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--wine); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
label.f { display: grid; gap: 5px; font-size: .86rem; font-weight: 500; }
label.f small, .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: 400 .95rem var(--sans); color: var(--ink); }
input[type=checkbox], input[type=radio] { width: 18px; min-height: 18px; accent-color: var(--plum); }
input[type=color] { padding: 2px; width: 60px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--wine); }
input:disabled, textarea:disabled { background: #f3eeea; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 400; }
.err { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.muted { color: var(--muted); }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--plum); }
.login-card { width: min(420px, 100%); background: var(--bg); border-radius: 24px; padding: 30px 26px; display: grid; gap: 16px; }
.login-card .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.login-card h1 { font-size: 2.2rem; }
.demo-box { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(61, 31, 53, .3); background: #fff; font-size: .88rem; }
.demo-box code { background: var(--bg); padding: 1px 6px; border-radius: 5px; }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* shell */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--plum); color: #fff; display: flex; flex-direction: column; padding: 18px 12px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; text-decoration: none; }
.side-brand b { font: 500 1.35rem/1 var(--serif); display: block; }
.side-brand small { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: rgba(255, 255, 255, .8); }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.on { background: var(--blush); color: var(--plum); }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; display: grid; gap: 6px; }
.side-foot b { font-weight: 500; }
.side-foot .link { color: var(--blush); justify-self: start; }
.main { min-width: 0; }
.demo-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 7px 18px; background: var(--blush); font-size: .85rem; }
.demo-bar .link { color: var(--plum); }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 22px; background: rgba(246, 241, 236, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 1.9rem; margin-right: auto; }
.view { padding: 22px; }
.tabs { display: none; }

/* diary */
.daynav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.daynav input { width: auto; min-height: 36px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.diary-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.diary-stats b { color: var(--ink); font-weight: 500; }
.diary-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.diary { display: grid; min-width: max-content; }
.d-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 12px; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-weight: 500; min-height: 62px; }
.d-head .mono { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: italic 500 1.1rem var(--serif); flex: none; }
.d-head small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.d-corner { border-left: 0; }
.d-times { position: relative; }
.d-times span { position: absolute; right: 8px; font-size: .75rem; color: var(--muted); transform: translateY(-50%); }
.d-col { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(#fff 0, #fff calc(var(--slot) * 4 - 1px), var(--line) calc(var(--slot) * 4 - 1px), var(--line) calc(var(--slot) * 4)); cursor: copy; }
.d-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f3eeea 0 6px, #ece4de 6px 12px); pointer-events: none; }
.d-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 9px; padding: 5px 8px; overflow: hidden; cursor: pointer; border: 0; text-align: left; font-size: .8rem; line-height: 1.3; color: var(--ink);
  background: color-mix(in srgb, var(--c) 18%, #fff); border-left: 4px solid var(--c); z-index: 1; }
.appt:hover { box-shadow: 0 6px 18px -8px rgba(42, 24, 36, .5); z-index: 2; }
.appt b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.is-held { background: repeating-linear-gradient(135deg, #fff7ea 0 8px, #fdeed6 8px 16px); border-left-color: var(--warn); }
.appt.is-done { opacity: .62; }
.appt.is-no_show { opacity: .5; text-decoration: line-through; }
.appt.is-arrived { box-shadow: inset 0 0 0 2px var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* lists */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .88rem; }
.pill.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.search { max-width: 360px; margin-bottom: 14px; }
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: left; width: 100%; cursor: pointer; }
.item:hover { border-color: rgba(123, 63, 97, .4); }
.item .when { text-align: center; min-width: 56px; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.item .when b { display: block; font: 500 1.3rem/1.1 var(--serif); color: var(--ink); }
.item .main-t b { font-weight: 500; }
.item .main-t small { display: block; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 500; white-space: nowrap; }
.t-held { background: #fbecd6; color: var(--warn); }
.t-booked { background: #ece4f2; color: var(--plum-2); }
.t-arrived { background: #dcefe0; color: var(--ok); }
.t-done { background: #eef0eb; color: #4b5a40; }
.t-cancelled, .t-expired, .t-no_show { background: #f5e1e1; color: var(--bad); }
.empty { padding: 34px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 8px; text-align: left; cursor: pointer; }
.card:hover { border-color: rgba(123, 63, 97, .4); }
.card h3 { font-size: 1.4rem; }
.card-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cat-h { font: 500 .76rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--sage); margin: 22px 0 10px; }
.cat-h:first-child { margin-top: 0; }

/* reports */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi b { display: block; font: 500 2rem/1.1 var(--serif); }
.kpi span { color: var(--muted); font-size: .86rem; }
.kpi.dark { background: var(--plum); color: #fff; border-color: var(--plum); }
.kpi.dark span { color: var(--blush); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.panel h3 { font-size: 1.45rem; margin-bottom: 12px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 8px; }
.bars div { flex: 1; min-width: 4px; background: var(--wine); border-radius: 4px 4px 0 0; position: relative; }
.bars div:hover { background: var(--plum); }
.bars-axis { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-weight: 500; color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
td.num, th.num { text-align: right; white-space: nowrap; }
.meter { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; background: var(--sage); }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(42, 24, 36, .45); display: flex; justify-content: flex-end; }
.sheet { width: min(520px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .4); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.sheet-head h2 { font-size: 1.7rem; margin-right: auto; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 16px; align-content: start; }
.sheet-foot { padding: 14px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-foot .btn { flex: 1; }
.info { display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.info div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; text-align: right; font-weight: 500; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.box h3 { font-size: 1.25rem; }
.hours-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--blush); font-size: .85rem; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0 4px; font-size: 1rem; line-height: 1; }
.timechips { display: flex; flex-wrap: wrap; gap: 6px; }
.timechips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: .88rem; }
.timechips button:hover { border-color: var(--wine); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 160%); opacity: 0; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; transition: .25s; z-index: 60; max-width: calc(100% - 32px); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { background: var(--bad); }

@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr 1fr; } .panels { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: calc(var(--tabs-h) + var(--safe-b)); }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); overflow-x: auto; }
  .tabs a { flex: 1 0 64px; display: grid; place-items: center; align-content: center; gap: 2px; font-size: .7rem; text-decoration: none; color: var(--muted); }
  .tabs a.on { color: var(--plum); font-weight: 500; }
  .bar { padding: 12px 14px; }
  .bar h1 { font-size: 1.6rem; }
  .view { padding: 14px; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .hours-row { grid-template-columns: 1fr 1fr 1fr auto; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .item { grid-template-columns: auto 1fr; }
  .item > :last-child { grid-column: 2; justify-self: start; }
  .hours-row { grid-template-columns: 1fr 1fr; }
}
.d-times span:first-child { transform: none; }
