@font-face { font-family: Cormorant; src: url("../fonts/cormorant-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Cormorant; src: url("../fonts/cormorant-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
    color-scheme: light;
    --charcoal: #171c19;
    --ink-soft: #4a514c;
    --limestone: #f1ebdd;
    --chalk: #f8f4ea;
    --paper: #fffdf8;
    --olive: #72785b;
    --olive-dark: #535a41;
    --slate: #34403f;
    --ember: #a6412c;
    --wheat: #cdb98a;
    --good: #4f7a3f;
    --warn: #b7862c;
    --line: rgb(23 28 25 / 12%);
    --line-strong: rgb(23 28 25 / 24%);
    --serif: "Cormorant", Georgia, serif;
    --sans: "Inter", Arial, sans-serif;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--chalk); color: var(--charcoal); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 50; top: 10px; left: 10px; padding: 10px 16px; border-radius: 6px; background: var(--ember); color: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.eyebrow { margin-bottom: 8px; color: var(--olive-dark); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--charcoal); color: var(--limestone); }
.btn--primary:hover { background: var(--slate); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { border-color: var(--charcoal); }
.btn--small { min-height: 38px; padding: 7px 16px; font-size: 13px; }
.btn--block { width: 100%; }
.link-button { padding: 0; border: 0; background: none; color: var(--olive-dark); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Notices */
.notice { margin-bottom: 20px; padding: 14px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 500; }
.notice--success { border: 1px solid #c9d9bd; background: #eaf2e3; color: #2f4d24; }
.notice--error { border: 1px solid #e6c2b6; background: #f8e8e2; color: #7e2f1c; }

/* Shell */
.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 28px; height: 100vh; padding: 28px 22px; overflow-y: auto; background: var(--charcoal); color: var(--limestone); }
.sidebar__brand { display: grid; gap: 10px; text-decoration: none; }
.sidebar__brand img { width: 130px; height: auto; }
.sidebar__brand span { color: var(--wheat); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.sidebar__nav { display: grid; gap: 2px; }
.sidebar__nav a { padding: 10px 14px; border-radius: 8px; color: rgb(241 235 221 / 78%); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.sidebar__nav a:hover { background: rgb(241 235 221 / 7%); color: var(--limestone); }
.sidebar__nav a.is-active { background: rgb(241 235 221 / 12%); color: var(--limestone); }
.sidebar__designs { display: grid; gap: 4px; padding-top: 20px; border-top: 1px solid rgb(241 235 221 / 14%); }
.sidebar__designs p { margin-bottom: 6px; color: var(--wheat); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sidebar__designs a { padding: 6px 0; color: rgb(241 235 221 / 78%); font-size: 14px; text-decoration: none; }
.sidebar__designs a:hover { color: var(--limestone); text-decoration: underline; }
.sidebar__signout { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgb(241 235 221 / 14%); font-size: 13px; }
.sidebar__signout span { overflow: hidden; color: rgb(241 235 221 / 70%); text-overflow: ellipsis; white-space: nowrap; }
.sidebar__signout button { padding: 6px 12px; border: 1px solid rgb(241 235 221 / 30%); border-radius: 999px; background: transparent; color: var(--limestone); font-size: 13px; }

.main { width: 100%; max-width: 980px; padding: 44px clamp(20px, 4vw, 56px) 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { margin-bottom: 8px; font: 400 clamp(40px, 5vw, 58px)/1 var(--serif); letter-spacing: -.03em; }
.page-head p:not(.eyebrow) { max-width: 560px; color: var(--ink-soft); }

/* Overview */
.overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.stat__label { color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.stat__value { display: flex; align-items: center; gap: 8px; font: 400 24px/1.2 var(--serif); }
.stat__note { color: var(--ink-soft); font-size: 13px; }
.stat__note--clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat__note a { color: var(--olive-dark); font-weight: 600; }
.dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot--good { background: var(--good); box-shadow: 0 0 0 4px rgb(79 122 63 / 15%); }
.dot--warn { background: var(--warn); }
.dot--bad { background: var(--ember); }

/* Cards & fields */
.editor { display: grid; gap: 18px; }
.card { display: grid; gap: 18px; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); scroll-margin-top: 24px; }
#menu { margin-top: 18px; }
.card__head h2 { margin-bottom: 4px; font: 400 32px/1.1 var(--serif); letter-spacing: -.02em; }
.card__head p { max-width: 640px; color: var(--ink-soft); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field__label { font-size: 14px; font-weight: 600; }
.field__optional { margin-left: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.field__count { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.field__count.is-near { color: var(--warn); }
.field input:not([type="checkbox"]):not([type="file"]), .field textarea, .password input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    outline: 0;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .password input:focus { border-color: var(--olive); box-shadow: 0 0 0 4px rgb(114 120 91 / 16%); }
.field__hint { color: var(--ink-soft); font-size: 13px; }
.field__error { color: var(--ember); font-size: 13px; font-weight: 500; }
.has-error input, .has-error textarea { border-color: var(--ember) !important; }
.split-preview { margin-top: -8px; padding: 12px 16px; border-left: 3px solid var(--wheat); border-radius: 0 8px 8px 0; background: var(--chalk); font: 400 26px/1.15 var(--serif); }
.split-preview em { color: var(--olive-dark); }
.split-preview:empty { display: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--olive-dark); }

/* Upload */
.upload { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 20px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--chalk); }
.upload img { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; }
.upload > div { display: grid; justify-items: start; gap: 8px; }
.upload__file { color: var(--olive-dark); font-size: 13px; font-weight: 600; }

/* Hours */
.hours { display: grid; border: 1px solid var(--line); border-radius: var(--radius); }
.hours__row { display: grid; grid-template-columns: 130px 110px 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 16px; }
.hours__row + .hours__row { border-top: 1px solid var(--line); }
.hours__row.is-closed .hours__time, .hours__row.is-closed .hours__to { opacity: .35; }
.hours__day { font-weight: 600; }
.hours__time input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.hours__to { color: var(--ink-soft); font-size: 13px; }
.hours__error { grid-column: 1 / -1; }
.hours__row.has-error .hours__time input { border-color: var(--ember); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ember); }
.hours-preview { padding: 18px; border-radius: var(--radius); background: var(--chalk); }
.hours-preview dl { margin-top: 10px; }
.hours-preview dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* Square */
.square { display: grid; gap: 20px; }
.square__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.square__facts div { padding: 14px; border-radius: 8px; background: var(--chalk); }
.square__facts dt { margin-bottom: 4px; color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.square__facts dd { font: 400 22px/1.2 var(--serif); }
.square__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Save bar */
.savebar { position: sticky; z-index: 10; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 22px; border-radius: 999px; background: var(--charcoal); color: var(--limestone); box-shadow: 0 14px 40px rgb(23 28 25 / 22%); }
.savebar p { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.savebar p::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8fb27a; }
.savebar.is-dirty p::before { background: var(--wheat); }
.savebar > div { display: flex; gap: 8px; }
.savebar .btn--primary { background: var(--limestone); color: var(--charcoal); }
.savebar .btn--primary:hover { background: #fff; }
.savebar .btn--ghost { border-color: rgb(241 235 221 / 35%); color: var(--limestone); }

/* Login */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login__photo { position: relative; overflow: hidden; background: var(--charcoal); }
.login__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.login__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(15 19 17 / 78%) 0%, rgb(15 19 17 / 10%) 55%); }
.login__photo p { z-index: 1; position: absolute; bottom: 48px; left: 48px; color: var(--limestone); font: 400 clamp(40px, 4.4vw, 64px)/1.02 var(--serif); letter-spacing: -.03em; text-shadow: 0 2px 30px rgb(0 0 0 / 40%); }
.login__photo em { color: var(--wheat); }
.login__panel { display: grid; place-items: center; padding: 40px 24px; }
.login__card { display: grid; gap: 18px; width: min(400px, 100%); }
.login__logo { width: 130px; height: auto; margin-bottom: 8px; }
.login__card h1 { font: 400 52px/1 var(--serif); letter-spacing: -.03em; }
.login__card > p { color: var(--ink-soft); }
.login__back { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.login__back:hover { color: var(--charcoal); text-decoration: underline; }
.password { position: relative; display: block; }
.password input { padding-right: 70px; }
.password__toggle { position: absolute; top: 50%; right: 8px; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--chalk); font-size: 12px; font-weight: 600; transform: translateY(-50%); }

@media (max-width: 1100px) {
    .overview, .square__facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; z-index: 20; flex-direction: row; align-items: center; gap: 16px; height: auto; padding: 10px 16px; overflow-x: auto; }
    .sidebar__brand span, .sidebar__designs, .sidebar__signout span { display: none; }
    .sidebar__brand img { width: 84px; }
    .sidebar__nav { display: flex; gap: 2px; }
    .sidebar__nav a { white-space: nowrap; }
    .sidebar__signout { margin: 0; padding: 0; border: 0; }
    .main { padding-top: 28px; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .grid-2, .upload { grid-template-columns: 1fr; }
    .hours__row { grid-template-columns: 1fr auto; }
    .hours__time { grid-column: span 1; }
    .hours__to { display: none; }
    .login { grid-template-columns: 1fr; }
    .login__photo { min-height: 220px; }
    .login__photo p { bottom: 24px; left: 24px; font-size: 36px; }
}

@media (max-width: 520px) {
    .overview, .square__facts { grid-template-columns: 1fr; }
    .savebar { border-radius: 16px; flex-direction: column; align-items: stretch; padding: 14px; }
    .savebar > div .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
