/* ============================================================
   Owner portal — mobile-first, big tap targets. Reuses the
   brand tokens from styles.css.
   ============================================================ */

body.admin { padding: 0; }
body.admin::before { opacity: .03; } /* dial the grain back for a work surface */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.view { min-height: 100vh; }
[hidden] { display: none !important; }

.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---- button sizes/variants added on top of styles.css ---- */
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 17px 26px; font-size: 16px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #a03f34; color: #fff; }

/* ---------------- LOGIN ---------------- */
.login-view { display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-logo { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 18px; }
.login-card h1 { font-family: var(--font-display); color: var(--gold); font-size: 26px; margin-bottom: 22px; }
.login-card input[type="password"] {
  width: 100%; font-size: 17px; padding: 15px 16px;
  background: var(--ink-2); color: var(--parchment);
  border: 1px solid var(--gold-2); border-radius: 8px; margin-bottom: 14px;
}
.login-card input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.back-link { display: inline-block; margin-top: 20px; color: var(--parchment-2); font-size: 14px; }

.form-error {
  background: rgba(184,74,62,.14);
  border: 1px solid var(--danger);
  color: #f0c3bd;
  border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; text-align: left;
}

/* ---------------- ADMIN CHROME ---------------- */
.admin-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12,10,7,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(140,109,47,.4);
}
.admin-top-inner {
  max-width: 720px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.admin-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); color: var(--gold); font-size: 16px; }
.admin-brand img { border-radius: 50%; }
.admin-main { max-width: 720px; margin: 0 auto; padding: 18px 16px 60px; }

/* ---- month strip ---- */
.month-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(90deg, rgba(201,162,75,.10), rgba(201,162,75,.04));
  border: 1px solid var(--gold-2); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 20px;
}
.month-strip .ms-text { font-size: 16px; }
.month-strip strong { font-family: var(--font-display); color: var(--gold); font-size: 20px; }
.month-strip a { font-size: 14px; white-space: nowrap; }

.dash-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-title { font-family: var(--font-display); color: var(--parchment); font-size: 20px; }

/* ---- product rows ---- */
.product-list { display: flex; flex-direction: column; gap: 12px; }
.prow {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px; align-items: center;
  background: var(--ink-2); border: 1px solid rgba(140,109,47,.35);
  border-radius: 12px; padding: 12px;
}
.prow.hidden-row { opacity: .6; border-style: dashed; }
.prow-thumb {
  width: 60px; height: 60px; border-radius: 8px; object-fit: cover;
  background: var(--ink-3); grid-row: span 2;
}
.prow-thumb.ph { display: grid; place-items: center; }
.prow-thumb.ph img { width: 70%; opacity: .5; }
.prow-main { min-width: 0; }
.prow-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.prow-name a { color: var(--parchment); }
.prow-name a:hover { color: var(--gold); }
.prow-sub { color: var(--parchment-2); font-size: 13px; }
.prow-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; }
.badge.low { background: rgba(184,74,62,.18); color: #e6a89f; border: 1px solid var(--danger); }
.badge.out { background: var(--danger); color: #fff; }
.badge.hidden { background: rgba(183,171,143,.15); color: var(--parchment-2); border: 1px solid var(--gold-2); }

/* stepper + sold column on the right */
.prow-right { display: flex; flex-direction: column; gap: 8px; align-items: stretch; grid-column: 3; grid-row: span 2; }
.stock-edit { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.stock-edit label { font-size: 12px; color: var(--parchment-2); }
.stock-input {
  width: 62px; font-size: 16px; text-align: center; padding: 8px 6px;
  background: var(--ink-3); color: var(--parchment);
  border: 1px solid var(--gold-2); border-radius: 8px;
}
.sold-btn {
  min-height: 48px; min-width: 120px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #1a1305; font-weight: 700; letter-spacing: .06em;
  border: 0; border-radius: 10px; cursor: pointer; font-size: 15px;
  transition: transform .1s ease, filter .15s ease;
}
.sold-btn:hover { filter: brightness(1.06); }
.sold-btn:active { transform: scale(.97); }
.sold-btn:disabled { opacity: .5; cursor: default; }
.vis-toggle { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 12px; color: var(--parchment-2); }

/* ---------------- FORMS ---------------- */
.product-form { display: flex; flex-direction: column; gap: 16px; }
.product-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--parchment); }
.product-form .hint { font-weight: 400; color: var(--parchment-2); font-size: 12.5px; }
.product-form input, .product-form select, .product-form textarea {
  font-size: 16px; padding: 12px 12px; font-family: var(--font-body);
  background: var(--ink-2); color: var(--parchment);
  border: 1px solid var(--gold-2); border-radius: 8px; width: 100%;
}
.product-form input:focus, .product-form select:focus, .product-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.product-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toggle-row { flex-direction: row !important; align-items: center; gap: 10px !important; }
.toggle-row input { width: 22px; height: 22px; }
.photo-preview { display: flex; align-items: center; gap: 14px; }
.photo-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold-2); }
.form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }

/* ---------------- SUMMARY ---------------- */
.month-pick { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 18px; max-width: 220px; }
.month-pick input { font-size: 16px; padding: 10px 12px; background: var(--ink-2); color: var(--parchment); border: 1px solid var(--gold-2); border-radius: 8px; }
.sum-table { width: 100%; border-collapse: collapse; }
.sum-table th, .sum-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(140,109,47,.25); }
.sum-table th { color: var(--gold); font-family: var(--font-body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.sum-table td.num, .sum-table th.num { text-align: right; }
.sum-total { font-family: var(--font-display); color: var(--gold); font-size: 22px; margin: 18px 0 8px; }

/* ---------------- TOAST ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink-3); color: var(--parchment);
  border: 1px solid var(--gold); border-radius: 10px;
  padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px; z-index: 50;
  max-width: min(92vw, 460px); font-size: 15px;
}
.toast.err { border-color: var(--danger); }
.toast .toast-undo {
  background: transparent; border: 1px solid var(--gold); color: var(--gold);
  border-radius: 6px; padding: 6px 12px; font-weight: 600; cursor: pointer; font-size: 14px; white-space: nowrap;
}

@media (max-width: 480px) {
  .prow { grid-template-columns: 52px 1fr; }
  .prow-thumb { width: 52px; height: 52px; grid-row: span 1; }
  .prow-right { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; }
  .sold-btn { flex: 1; }
  .product-form .two { grid-template-columns: 1fr; }
}
