/* T-Dogs Office. Builds on styles.css. Big, thumb-friendly, phone first. */
body.admin { background: var(--sky); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.admin-top { background: linear-gradient(160deg, var(--sky) 0%, var(--sky-2) 100%); border-bottom: 4px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.admin-top .wrap { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.admin-top h1 { font-size: 1.5rem; margin: 0; flex: 1; line-height: 1; }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: .95rem; box-shadow: 2px 2px 0 var(--ink); }

.panel { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 16px; margin: 16px 0; box-shadow: 4px 4px 0 var(--ink); }
.panel h2 { font-family: Inter, system-ui, sans-serif; font-size: 1.25rem; margin: 0 0 10px; }
.panel h3 { margin: 16px 0 8px; font-size: 1.1rem; }
.tab-title { font-family: Inter, system-ui, sans-serif; font-size: 1.4rem; margin: 18px 0 10px; }
.hint { color: var(--muted); font-size: 1rem; margin: 0 0 12px; }
.label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.msg { font-weight: 700; min-height: 1.4em; margin: 8px 0; }
.msg.good { color: #1b7a3a; }
.msg.bad { color: #b3261e; }
.alert { background: #fff1c2; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin: 12px 0; }
.pill { display: inline-block; font-size: .85rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--ink); margin-left: 8px; vertical-align: 2px; }
.pill.bad { background: #ffb4a8; }
.linkish { background: none; border: 0; text-decoration: underline; font: inherit; color: var(--muted); cursor: pointer; padding: 10px 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 48px; margin-bottom: 8px; }
.check input { width: 26px; height: 26px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > * { min-width: 0; }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 4px solid var(--ink);
  display: grid; grid-template-columns: repeat(6, 1fr); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; min-height: 64px;
  background: none; border: 0; font: inherit; font-size: .72rem; font-weight: 800; color: var(--ink); cursor: pointer; min-width: 0;
}
.tabbar button span { font-size: 1.5rem; line-height: 1; }
.tabbar button[aria-current="page"] { background: var(--yellow); }

/* Sell */
.today-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.today-strip > div { background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px; }
.today-strip .label { color: var(--yellow); }
.today-strip strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.sell-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .sell-grid { grid-template-columns: repeat(3, 1fr); } }
.sell-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 92px; padding: 12px;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.sell-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); background: var(--yellow); }
.sell-btn .n { font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.sell-btn .p { font-weight: 800; font-size: 1.2rem; color: #0b5f86; }
.sell-btn.custom { background: var(--sky); }
.sell-btn.custom .p { font-size: .95rem; color: var(--muted); }
.custom-row { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; margin-top: 10px; }
.custom-row input { min-width: 0; padding: 10px; font: inherit; font-size: 18px; border: 2px solid var(--ink); border-radius: 10px; min-height: 52px; }
.ticket-lines { list-style: none; padding: 0; margin: 0 0 8px; }
.ticket-lines li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 2px dotted var(--line); }
.tl-name { font-weight: 800; font-size: 1.15rem; }
.tl-amt { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tl-tools { grid-column: 1 / -1; display: flex; gap: 8px; }
.sums { margin: 10px 0 14px; }
.sums div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 1.1rem; }
.sums dt { color: var(--muted); font-weight: 700; }
.sums dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.sums .grand { border-top: 3px solid var(--ink); margin-top: 6px; padding-top: 8px; font-size: 1.5rem; }
.sums .grand dt { color: var(--ink); }
.pay-row, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.chip { min-height: 48px; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Totals */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.stat { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px; min-width: 0; }
.stat.wide { grid-column: 1 / -1; background: var(--yellow); }
.stat strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat strong.neg { color: #b3261e; }
.panel .stat-grid .stat { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 4px; border-bottom: 2px solid var(--ink); }
.tbl td { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
.tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; }
.tbl tr.need td { background: #fff6d6; font-weight: 700; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows .r-main { font-size: 1.05rem; }
.rows .r-sub { grid-column: 1; color: var(--muted); font-size: .95rem; }
.rows .tool { grid-row: 1 / span 2; grid-column: 2; }

/* Stock */
.stock-list { display: grid; gap: 12px; margin-bottom: 14px; }
.stock { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px; }
.stock.low { background: #fff1ec; border-color: #b3261e; }
.stock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stock-name { font-size: 1.2rem; }
.stock-qty { text-align: right; }
.stock-qty strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; display: block; line-height: 1; }
.stock-qty span { color: var(--muted); font-size: .9rem; }
.stock-tools { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; margin-top: 10px; }
.stock-tools input { min-width: 0; padding: 8px 10px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 10px; min-height: 48px; }
.stock-edit { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--line); }
.mini { display: grid; gap: 4px; font-weight: 700; }
.mini input, .use-row input { padding: 10px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 10px; min-height: 48px; min-width: 0; }
.uses { display: grid; gap: 6px; }
.use-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; align-items: center; font-weight: 600; }

/* Website editor (moved from the old admin page) */
.items { display: grid; gap: 12px; margin-bottom: 14px; }
.item-edit { border: 2px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; grid-template-columns: 1fr 110px; }
.item-edit input { width: 100%; min-width: 0; padding: 10px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 8px; min-height: 48px; }
.item-edit .desc { grid-column: 1 / -1; }
.item-edit .price-wrap { position: relative; }
.item-edit .price-wrap span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 700; }
.item-edit .price-wrap input { padding-left: 24px; }
.item-edit .row-tools { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool {
  min-width: 48px; min-height: 48px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff;
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer;
}
.tool:disabled { opacity: .35; }
.tool.star[aria-pressed="true"] { background: var(--yellow); }
.tool.del { margin-left: auto; color: #b3261e; border-color: #b3261e; }
.tool.armed { background: #b3261e; color: #fff; }
.hours-edit { display: grid; gap: 8px; }
.day { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.day label.on { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 48px; }
.day input[type=checkbox] { width: 26px; height: 26px; }
.day .times { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.day .times input { flex: 1; min-width: 0; padding: 8px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 8px; min-height: 48px; }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.photo-edit { border: 2px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 6px; min-width: 0; }
.photo-edit img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-edit input { width: 100%; min-width: 0; padding: 8px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 8px; }
.photo-edit .tool.del { margin-left: 0; }
#photo-btn { cursor: pointer; }

/* GPS spot */
.loc { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px; margin-top: 14px; }
.loc-text { margin: 0 0 6px; font-weight: 800; font-size: 1.1rem; }
.loc-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.loc-tools .chip { min-height: 44px; font-size: .95rem; }
.loc-new { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 10px; }
.spot-list { display: grid; gap: 8px; margin-bottom: 8px; }
.spot-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; align-items: center; }
.spot-row input { min-width: 0; padding: 10px; font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 10px; min-height: 48px; }

/* ---------- Inbox ---------- */
.tabbar button { position: relative; }
.badge-n { position: absolute; top: 4px; right: calc(50% - 26px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: .8rem; line-height: 22px; border: 2px solid var(--ink); }
.inbox-card { border-left-width: 10px; }
.inbox-card.order { border-left-color: var(--red); }
.inbox-card.catering { border-left-color: var(--yellow); }
.inbox-card.prayer { border-left-color: var(--sky-2); }
.inbox-card.done { opacity: .6; }
.inbox-head { margin: 0 0 6px; font-size: 1.15rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.inbox-when { margin-left: auto; font-size: .9rem; color: var(--muted); }
.new-dot { background: var(--red); color: #fff; font-weight: 800; font-size: .75rem; padding: 2px 8px; border-radius: 999px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.inbox-who, .inbox-pick, .inbox-note, .inbox-total { margin: 4px 0; }
.inbox-items { margin: 8px 0; padding: 0; list-style: none; font-size: 1.2rem; }
.inbox-items li { padding: 4px 0; border-bottom: 2px dotted rgba(0,0,0,.15); }
.inbox-note { background: #fff8d9; border-radius: 10px; padding: 8px 10px; }
.inbox-note.big { font-size: 1.15rem; }
.inbox-total { font-weight: 800; font-size: 1.15rem; }
.inbox-actions, .inbox-pay { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.chip-on { background: #1f8a3b; color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 999px; }
.alerts { background: #fff8d9; border: 3px solid var(--ink); border-radius: 14px; padding: 14px; margin: 10px 0 14px; }
.alerts-state { font-weight: 800; font-size: 1.1rem; margin: 0 0 10px; }
.alerts .btn-big { width: 100%; }
.cash-help { margin: 10px 0; padding: 12px; background: #effbf1; border: 3px solid var(--ink); border-radius: 14px; }
.cash-help .change { font-size: 1.5rem; margin: 10px 0 0; }
.day-text { white-space: pre-wrap; font: inherit; font-size: 1.05rem; background: var(--sky); border-radius: 12px; padding: 14px; margin: 14px 0 10px; }
