/* The Bible Shop Admin */
:root {
	--ink: #24272A;
	--ink-2: #3A3F44;
	--sun-a: #F0633E;
	--sun-b: #F09C37;
	--sunrise: linear-gradient(135deg, var(--sun-a), var(--sun-b));
	--accent-text: #B8351A;
	--page: #F4F7FB;
	--page-blue: #E7EEF8;
	--warm: #FFF1E6;
	--line: #E3E8F0;
	--line-strong: #CDD7E6;
	--muted: #55606E;
	--white: #FFFFFF;
	--green: #1E6B3A; --green-bg: #E7F6EC;
	--amber: #8A5A00; --amber-bg: #FFF4DE;
	--red: #A1201A; --red-bg: #FDE8E8;
	--blue: #1F4E8C; --blue-bg: #E6F0FC;
	--purple: #5B3A9A; --purple-bg: #EFE9FB;
	--serif: Newsreader, Georgia, serif;
	--sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--radius: 14px;
	--side: 248px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { padding: 2px 6px; border-radius: 6px; background: var(--page-blue); word-break: break-all; }
.i { flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pad { padding: 4px 0 8px; margin: 0; }
.h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font: 600 30px/1.15 var(--serif); letter-spacing: -.01em; }
.h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 16px/1.3 var(--sans); }
.h3 { margin: 16px 0 6px; font: 700 12px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 10px; }

/* Shell ------------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }
.side {
	position: sticky; top: 0; flex: 0 0 var(--side); display: flex; flex-direction: column; height: 100vh; padding: 20px 14px;
	background: var(--ink); color: #E6E9EE;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: #fff; text-decoration: none !important; }
.brand__mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--sunrise); color: #fff; box-shadow: 0 8px 20px rgba(240,99,62,.35); }
.brand__mark--sm { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font: 600 18px var(--serif); }
.brand__text small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #F3B27A; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #C9D0DA; font-weight: 600; text-decoration: none !important; }
.nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav__item.is-active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--sun-b); }
.side__user { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.side__me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 10px; color: #fff; text-decoration: none !important; }
.side__me:hover, .side__me.is-active { background: rgba(255,255,255,.08); }
.side__me span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side__me strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.side__me small { color: #AEB6C2; font-size: 12px; }
.side__user form { margin: 0; }
.side__user .iconbtn { color: #C9D0DA; }
.side__user .iconbtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunrise); color: #fff; font-weight: 800; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }

/* Buttons ----------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
	border: 1px solid transparent; border-radius: 11px; background: var(--white); font-weight: 700; font-size: 14px; line-height: 1.2;
	cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--sun { background: var(--sunrise); color: var(--ink); box-shadow: 0 8px 20px rgba(240,99,62,.25); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ghost { border-color: var(--line-strong); background: var(--white); color: var(--ink); }
.btn--ghost:hover { background: var(--warm); border-color: var(--sun-b); }
.btn--danger { background: #B3261E; color: #fff; }
.btn--danger-ghost { border-color: #F2C4C0; background: #fff; color: var(--red); }
.btn--danger-ghost:hover { background: var(--red-bg); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn__sub { font-weight: 600; opacity: .7; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--page-blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn-grid .btn--sun, .btn-grid .btn--danger-ghost { grid-column: 1 / -1; }
:focus-visible { outline: 3px solid rgba(240,156,55,.6); outline-offset: 2px; }

/* Page head, cards ------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.card { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 1px 2px rgba(36,39,42,.04); }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card__head .h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card { margin-top: 18px; }
.setup-card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.setup-card > div { flex: 1; min-width: 220px; }
.setup-card .h2 { margin-bottom: 4px; }
.setup-card p { margin: 0; }
.setup-card > .i { color: var(--sun-a); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .h1 { color: var(--ink); }

/* Stats ------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.stat--sun { border: 0; background: var(--sunrise); color: var(--ink); box-shadow: 0 12px 28px rgba(240,99,62,.22); }
.stat__label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.stat__value { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.stat__sub { font-size: 13px; opacity: .8; }
.queue { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.queue__item { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s var(--ease); }
.queue__item:hover { border-color: var(--sun-b); transform: translateY(-1px); }
.queue__item strong { font-size: 24px; font-weight: 800; line-height: 1.2; }
.queue__item span { font-size: 13px; font-weight: 600; color: var(--muted); }
.queue__item--blue strong { color: var(--blue); }
.queue__item--red strong { color: var(--red); }
.queue__item--amber strong { color: var(--amber); }

.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; color: var(--ink); text-decoration: none !important; }
.mini-list a:hover { background: var(--page); }
.mini-list small { display: block; color: var(--muted); font-size: 12.5px; }
.mini-list__right { display: flex; align-items: center; gap: 10px; }
.mini-list__amt { font-weight: 800; white-space: nowrap; }

/* Badges ------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font: 700 12px/1.35 var(--sans); white-space: nowrap; vertical-align: middle; }
.badge--grey { background: #EEF1F5; color: #4A5462; }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--amber { background: var(--amber-bg); color: var(--amber); }
.badge--red { background: var(--red-bg); color: var(--red); }
.badge--blue { background: var(--blue-bg); color: var(--blue); }
.badge--purple { background: var(--purple-bg); color: var(--purple); }
.badge--sun { background: var(--warm); color: var(--accent-text); }
.h1 .badge { font-size: 13px; padding: 4px 11px; }

/* Alerts ------------------------------------------------------------------ */
.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alert .i { margin-top: 2px; }
.alert--error { background: var(--red-bg); color: var(--red); }
.alert--info { background: var(--blue-bg); color: var(--blue); }

/* Tabs, search, table ----------------------------------------------------- */
.tabs { display: flex; gap: 4px; margin: 0 0 16px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs__item { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-active { color: var(--ink); border-bottom-color: var(--sun-a); }
.tabs__n { padding: 0 7px; border-radius: 999px; background: var(--page-blue); font-size: 12px; color: var(--ink); }
.search { position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { width: 300px; max-width: 100%; height: 42px; padding: 0 12px 0 38px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.search input:focus { outline: none; border-color: var(--sun-b); box-shadow: 0 0 0 3px rgba(240,156,55,.2); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 11px 14px; border-bottom: 1px solid var(--line); background: #FAFBFD; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--orders tbody tr { cursor: pointer; }
.table--orders tbody tr:hover td { background: #FBFCFE; }
.table tr.is-selected td { background: var(--warm) !important; }
.table tr.is-off td { opacity: .6; }
.card:not(.card--flush) .table th { background: transparent; padding-left: 0; }
.card:not(.card--flush) .table td { padding-left: 0; }
.col-check { width: 44px; }
.col-check input, .check input { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
.col-actions { width: 56px; text-align: right; }
.order-link { font-weight: 800; color: var(--ink); }
.table--roles td:first-child { font-weight: 600; }
.yes { color: var(--green); }
.no { color: #B4BCC8; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 6px; }

.bulk { position: sticky; top: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(36,39,42,.25); }
.bulk__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk .btn--ghost { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; }
.bulk .btn--ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); }

/* Order page -------------------------------------------------------------- */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.items { margin: 0; padding: 0; list-style: none; }
.item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:first-child { padding-top: 0; }
.item__img { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; background: var(--page-blue); color: var(--muted); }
.item__img img { width: 100%; height: 100%; object-fit: cover; }
.item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item__total { white-space: nowrap; }
.item__files { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.totals { margin: 14px 0 0; }
.totals div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals__grand { margin-top: 6px; padding-top: 10px !important; border-top: 1px solid var(--line); font-size: 17px !important; }
.totals__grand dt { color: var(--ink); font-weight: 800; }
.totals__grand dd { font-weight: 800; }
.totals__refund dd { color: var(--purple); }
.kv { margin: 0 0 6px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.quote { padding: 8px 12px; border-left: 3px solid var(--sun-b); border-radius: 6px; background: var(--warm); }
.status-form { display: flex; gap: 8px; }
.status-form select { flex: 1; }
select, .field input, .field textarea, .note-form textarea, .code-input {
	width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
}
select:focus, .field input:focus, .field textarea:focus, .note-form textarea:focus, .code-input:focus { outline: none; border-color: var(--sun-b); box-shadow: 0 0 0 3px rgba(240,156,55,.2); }
.note-form { margin-bottom: 14px; }
.note-form textarea { resize: vertical; }
.note-form__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--line-strong); }
.timeline li.is-customer::before { background: var(--sun-a); }
.timeline li.is-system .timeline__text { color: var(--muted); }
.timeline__text { font-size: 14px; word-break: break-word; }
.timeline--compact li { padding-bottom: 10px; }
.timeline--compact li:first-child::before { background: var(--sun-a); }

/* Forms ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 700; }
.field small { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field--wide { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; }
.help { margin: 2px 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--page); font-size: 13.5px; }
.help summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.help[open] summary { margin-bottom: 8px; }
.help .field { margin-top: 8px; }
.copy { display: block; padding: 10px 12px; }
.switch { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 600; cursor: pointer; }
.switch input[type=checkbox] { position: absolute; opacity: 0; }
.switch i { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid rgba(240,156,55,.6); outline-offset: 2px; }
.sticky-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 14px 0; background: linear-gradient(to top, var(--page) 70%, transparent); }
.role-pick { display: grid; gap: 8px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #FAFBFD; }
.role-opt input, .field .role-opt input { flex: none; width: 18px; min-height: 0; height: 18px; margin-top: 3px; padding: 0; accent-color: var(--ink); }
.role-opt span { display: flex; flex-direction: column; }
.role-opt small { color: var(--muted); font-size: 12px; }
.code-input { max-width: 180px; font: 700 22px/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; text-align: center; }
.totp__setup { margin-top: 6px; }
.totp__qr { width: 176px; height: 176px; margin: 10px 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.totp__qr img, .totp__qr canvas { width: 100%; height: 100%; }
.totp__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Menu ------------------------------------------------------------------- */
.menu { position: relative; display: inline-block; }
.menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 36px rgba(36,39,42,.16); }
.menu__list button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; font-weight: 600; cursor: pointer; }
.menu__list button:hover { background: var(--page); }
.menu__list .is-danger { color: var(--red); }

/* Modal & toasts --------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(20,22,24,.5); animation: fade .15s ease; }
.modal__box { position: relative; display: flex; flex-direction: column; width: min(520px, 100%); max-height: calc(100vh - 40px); border-radius: 18px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.3); animation: pop .2s var(--ease); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; }
.modal__title { margin: 0; font: 600 22px/1.2 var(--serif); }
.modal__body { padding: 8px 20px 4px; overflow-y: auto; }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.modal__foot:empty { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.rates { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.rate:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #FAFBFD; }
.rate input { accent-color: var(--ink); }
.rate strong { display: block; }
.rate small { color: var(--muted); }
.rate__price { font-weight: 800; white-space: nowrap; }
.temp-pw { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--warm); font: 700 18px ui-monospace, Menlo, monospace; }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(460px, calc(100% - 32px)); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 14px 34px rgba(0,0,0,.25); pointer-events: auto; animation: pop .2s var(--ease); }
.toast--error { background: #8F1D17; }
.toast a { color: #FFD7B0; text-decoration: underline; }
.toast .i { flex: none; }
.toast span { flex: 1; }

/* Auth pages -------------------------------------------------------------- */
.auth { min-height: 100vh; background: radial-gradient(ellipse at top, #FFE6D3, transparent 60%), var(--page); }
.auth__wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth__brand .brand__text strong { color: var(--ink); font-size: 22px; }
.auth__brand .brand__text small { color: var(--accent-text); }
.auth__card { width: min(420px, 100%); padding: 28px; }
.auth__card .h1 { margin-bottom: 8px; font-size: 28px; }
.auth__card .btn--block { margin-top: 6px; }
.auth__card p.center { margin: 14px 0 0; }

/* Responsive ------------------------------------------------------------- */
.show-sm { display: none; }
@media (max-width: 1100px) {
	.order-grid { grid-template-columns: minmax(0, 1fr) 320px; }
	.queue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hide-md { display: none; }
}
@media (max-width: 900px) {
	.side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .25s var(--ease); }
	.side.is-open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
	.side-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(20,22,24,.45); }
	.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
	.topbar__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 600 18px var(--serif); text-decoration: none !important; }
	.content { padding: 20px 16px 56px; }
	.order-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
	.grid-2 > .card { margin-bottom: 0; }
	.stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.stats .stat--sun { grid-column: 1 / -1; }
	.bulk { top: 66px; }
}
@media (max-width: 640px) {
	body { font-size: 14.5px; }
	.h1 { font-size: 25px; }
	.hide-sm { display: none; }
	.show-sm { display: block; }
	.page-head { align-items: stretch; }
	.page-head__actions, .search, .search input { width: 100%; }
	.search { flex: 1; }
	.queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.queue__item:first-child { grid-column: 1 / -1; }
	.stat__value { font-size: 22px; }
	.form-grid, .form-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.card { padding: 16px; }
	.card--flush { padding: 0; }
	.table th, .table td { padding: 10px; }
	/* Orders become compact cards on phones. */
	.table--orders thead { display: none; }
	.table--orders tbody tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
	.table--orders tbody tr:last-child { border-bottom: 0; }
	.table--orders td { padding: 0 !important; border: 0 !important; background: none !important; }
	.table--orders .col-check { grid-row: 1 / 4; align-self: start; width: auto; }
	.table--orders .col-order { grid-column: 2; grid-row: 1; }
	.table--orders .col-order small { display: inline; margin-left: 6px; }
	.table--orders .col-total { grid-column: 3; grid-row: 1; text-align: right; }
	.table--orders .col-cust { grid-column: 2 / 4; grid-row: 2; }
	.table--orders .col-cust small { display: inline; margin-left: 6px; }
	.table--orders .col-status { grid-column: 2; grid-row: 3; }
	.table--orders .col-ship { grid-column: 3; grid-row: 3; text-align: right; }
	.table--orders .col-ship small { display: none; }
	.table--orders tr.is-selected { background: var(--warm); }
	.item { grid-template-columns: 52px minmax(0, 1fr); }
	.item__img { width: 52px; height: 52px; }
	.item__total { grid-column: 2; }
	.modal { align-items: flex-end; padding: 0; }
	.modal__box { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
	.modal__foot .btn { flex: 1; }
	.bulk__actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
