/* Baker's desk: same look as the public site (cream, logo red, chunky display type) ------- */
body.admin {
  --display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --serif: var(--display);
  --sans: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  font-size: 16px;
}
body.admin :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 0.95; font-weight: 400; }

/* Login ----------------------------------------------------------------------------------- */
.a-login { min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; padding: clamp(16px, 3vw, 40px); }
.a-login__art { position: relative; height: min(88svh, 820px); border-radius: 34px; overflow: hidden; background: #3a2a22; }
.a-login__art img.photo { width: 100%; height: 100%; object-fit: cover; }
.a-login__art img.mark { position: absolute; left: 22px; top: 22px; width: 76px; height: 76px; border-radius: 50%; background: var(--cream); }
.a-login__form { display: grid; gap: 22px; max-width: 460px; }
.a-login__form h1 { font-size: clamp(54px, 8vw, 112px); color: var(--red); text-transform: uppercase; }
.a-login__form p.muted { font-size: 18px; }
.a-login__form form { display: grid; gap: 16px; }
@media (max-width: 860px) { .a-login { grid-template-columns: 1fr; } .a-login__art { height: 34svh; } }

/* Header ---------------------------------------------------------------------------------- */
.a-top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--cream) 82%, transparent); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid var(--line-soft); }
.a-top__in { display: flex; align-items: center; gap: 22px; min-height: 80px; flex-wrap: wrap; padding-block: 8px; }
.a-top .brand img { width: 52px; height: 52px; }
.a-top .brand span { font-family: var(--display); font-size: 22px; letter-spacing: 0; color: var(--red); text-transform: uppercase; line-height: 1; }
.a-top__right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; cursor: pointer; font: 500 15.5px var(--sans); color: var(--red-deep); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tabs button:hover { background: color-mix(in srgb, var(--red) 9%, transparent); }
.tabs button[aria-selected="true"] { background: var(--red-btn); color: var(--cream); }

/* Layout & type --------------------------------------------------------------------------- */
.a-main { padding-block: clamp(28px, 4vw, 56px) 110px; display: grid; gap: clamp(22px, 3vw, 34px); }
.a-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.a-title h1 { font-size: clamp(48px, 8vw, 112px); color: var(--red); text-transform: uppercase; }
.a-title p { color: var(--ink-soft); margin-top: 12px; font-size: 18px; max-width: 46ch; }
.a-card { padding: clamp(20px, 3vw, 40px); border-radius: 34px; background: color-mix(in srgb, var(--paper) 88%, white); }
.a-card h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 22px; text-transform: uppercase; color: var(--red); }
.a-grid { display: grid; gap: 16px; }
.a-grid--2 { grid-template-columns: 1fr 1fr; }
.a-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .a-grid--2, .a-grid--3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.spread { justify-content: space-between; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.section-title { font-size: clamp(30px, 4vw, 52px); color: var(--red); text-transform: uppercase; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); white-space: nowrap; }
.tag--ok { background: var(--ink); color: var(--cream); }
.tag--warn { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--red) 60%, transparent); color: var(--red-deep); }
.tag--red { background: var(--red-btn); color: var(--cream); }
.btn--danger { background: transparent; color: var(--red-deep); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn--danger:hover { background: color-mix(in srgb, var(--red) 9%, var(--paper)); box-shadow: none; }

/* Numbers: big and plain, no boxes ---------------------------------------------------------- */
.stats { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 5vw, 72px); padding-block: 6px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 80px); line-height: 0.95; color: var(--red); }
.stat span { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

/* Forms ---------------------------------------------------------------------------------- */
select.a-select, .a-input { min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--cream); font: inherit; width: 100%; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
select.a-select { width: auto; padding-right: 36px; }
select.a-select:focus, .a-input:focus { outline: none; border-color: var(--red-btn); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent); }
textarea.a-input { min-height: 84px; resize: vertical; }
.pick { display: grid; gap: 10px; }
.pick__row { display: grid; grid-template-columns: auto 1fr 120px; gap: 14px; align-items: center; padding: 12px 18px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--cream); transition: all 0.2s; }
.pick__row.is-on { border-color: var(--red-btn); background: color-mix(in srgb, var(--red) 6%, var(--cream)); }
.pick__row b { font-weight: 600; }
.pick__row input[type="number"] { min-height: 44px; padding: 6px 10px; text-align: center; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); width: 100%; }
.pick__row small { color: var(--ink-faint); display: block; }
.pick__row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--red-btn); }

/* Bakes & orders ---------------------------------------------------------------------------- */
.bake { padding: clamp(20px, 2.6vw, 32px); display: grid; gap: 18px; border-radius: 34px; }
.bake__head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.bake__date { font-family: var(--display); font-size: clamp(30px, 3.6vw, 48px); line-height: 1; text-transform: uppercase; color: var(--ink); }
.bake__prep { font-size: 15.5px; color: var(--ink-soft); }
.bar { height: 7px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red-btn); border-radius: 999px; }
.order { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 12px; border-radius: 28px; }
.order__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.order__items { font-size: 16px; }

.table-wrap { overflow-x: auto; border-radius: 28px; background: color-mix(in srgb, var(--paper) 88%, white); border: 1px solid var(--line-soft); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 760px; }
table.t th { text-align: left; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; padding: 18px 20px; border-bottom: 1px solid var(--line); }
table.t td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: color-mix(in srgb, var(--cream) 70%, transparent); }

.bread-card { display: grid; grid-template-columns: 112px 1fr auto; gap: 22px; align-items: center; padding: 18px; border-radius: 34px; }
.bread-card img { width: 112px; height: 112px; border-radius: 24px; object-fit: cover; background: var(--cream-2); }
.bread-card h3 { font-size: clamp(24px, 2.6vw, 34px); text-transform: uppercase; }
.bread-card.is-off { opacity: 0.6; }

/* Dialogs ------------------------------------------------------------------------------------- */
dialog { border: 0; border-radius: 34px; background: var(--paper); color: var(--ink); padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 40px 90px -30px rgba(42, 26, 19, 0.6); }
dialog::backdrop { background: rgba(42, 26, 19, 0.45); backdrop-filter: blur(4px); }
.dlg { padding: clamp(22px, 3.4vw, 40px); display: grid; gap: 20px; }
.dlg h2 { font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; color: var(--red); }
.dlg h3 { font-size: 22px !important; text-transform: uppercase; color: var(--ink); }
.dlg__foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }
.preview { display: flex; gap: 14px; align-items: center; }
.preview img { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; background: var(--cream-2); }
.wa-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.wa-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--cream); }
.wa-list a:hover { border-color: var(--red-btn); }
.wa-list a.is-done { opacity: 0.5; }

/* Small bits ------------------------------------------------------------------------------------ */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; background: var(--ink); color: var(--cream); padding: 13px 24px; border-radius: 999px; font-weight: 500; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5); animation: rise 0.35s var(--ease); }
.toast--err { background: var(--red-btn); }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-soft); font-size: 17px; }
.hint-box { padding: 16px 20px; border-radius: 22px; background: var(--cream-2); font-size: 15px; color: var(--ink-soft); }
.hint-box b { color: var(--ink); }
.loc-row { display: grid; grid-template-columns: 1fr 1.8fr auto; gap: 12px; align-items: end; }
@media (max-width: 820px) {
  .loc-row { grid-template-columns: 1fr; }
  .bread-card { grid-template-columns: 80px 1fr; }
  .bread-card > :last-child { grid-column: 1 / -1; }
  .bread-card img { width: 80px; height: 80px; }
}

/* Date picker ----------------------------------------------------------------------------- */
.dp { position: relative; }
.dp__btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--cream); font: 500 16px var(--sans); color: var(--ink); text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.dp__btn svg { width: 20px; height: 20px; color: var(--red-deep); flex: none; }
.dp__btn:hover { border-color: var(--ink-faint); }
.dp__btn[aria-expanded="true"], .dp__btn:focus-visible { outline: none; border-color: var(--red-btn); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent); }
.dp__pop { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; width: min(360px, 88vw); padding: 20px; border-radius: 28px; background: var(--paper); border: 1px solid var(--line-soft); box-shadow: 0 30px 60px -24px rgba(42, 26, 19, 0.5); animation: rise-pop 0.22s var(--ease); --cell: 44px; }
@keyframes rise-pop { from { opacity: 0; transform: translateY(-6px); } }
.dp__pop .cal__head { margin-bottom: 10px; }
.dp__pop .cal__title { font-size: 24px; }
.dp__pop .cal__title span { font-size: 0.7em; color: var(--ink-faint); }
.dp__pop .cal__grid { gap: 2px; }
.dp__pop .day { cursor: pointer; font-size: 15px; transition: background 0.15s; }
.dp__pop .day:hover:not([disabled]) { background: var(--cream-2); }
.dp__pop .day--sel, .dp__pop .day--sel:hover { background: var(--red-btn); color: var(--cream); font-weight: 600; }
.dp__pop .day[disabled] { opacity: 0.3; cursor: default; }

.win-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--cream); }
.win-row select.a-select { min-height: 44px; }

.wa-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.wa-row.is-done { opacity: 0.55; }
.wa-list .wa-row a.is-done { opacity: 1; }

.wa-pick { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--cream); cursor: pointer; }
.wa-pick input { width: 20px; height: 20px; accent-color: var(--red-btn); flex: none; }

.gallery-admin { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery-admin__item { display: grid; gap: 6px; justify-items: start; }
.gallery-admin__item img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; background: var(--cream-2); }

/* Bakes: plan on the left, upcoming on the right (one page scroll, no nested scroll bars) ------------------------ */
.bakes-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 2.6vw, 40px); align-items: start; }
.bakes-col { display: grid; gap: 18px; align-content: start; min-width: 0; }
@media (max-width: 1099px) { .bakes-split { grid-template-columns: 1fr; } }
