/* LUXE PETS — staff console */

body.admin { background: var(--sand); }

/* ==========================================================================
   Shell
   ========================================================================== */

.console { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.side {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.66);
  padding: var(--s-5) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-5);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .logo-mark { color: #fff; font-size: 1.15rem; }
.side .logo-sub { color: var(--blush); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: 0.6rem 0.75rem;
  background: transparent; border: none; border-radius: var(--r-md);
  color: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.side-nav button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-nav button.on { background: var(--forest-2); color: #fff; }
.side-nav .pip {
  margin-left: auto; min-width: 20px; padding: 0 6px; height: 19px;
  border-radius: var(--r-pill); background: var(--blush); color: var(--ink);
  font-size: 0.66rem; font-weight: 800;
  display: grid; place-items: center;
}
.side-foot { margin-top: auto; font-size: var(--fs-xs); }

.main { padding: var(--s-5) var(--s-6) var(--s-8); min-width: 0; }

.main-head {
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.main-head h1 { margin: 0; font-size: var(--fs-2xl); }
.main-head p { margin: 2px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }

@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; flex-direction: row; align-items: center;
    gap: var(--s-3); overflow-x: auto; padding: var(--s-3) var(--s-4);
  }
  .side-nav { flex-direction: row; gap: var(--s-2); }
  .side-nav button { white-space: nowrap; }
  .side .logo, .side-foot { display: none; }
  .main { padding: var(--s-4); }
}

/* ==========================================================================
   Stat cards
   ========================================================================== */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-6); }
.stat {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--sh-1);
}
.stat dt { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin-bottom: var(--s-2); }
.stat dd { margin: 0; font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; }
.stat .sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s-2); }
.stat.alert { border-color: var(--warn); background: var(--warn-soft); }
.stat.alert dd { color: var(--warn); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow-x: auto; box-shadow: var(--sh-1);
}
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 720px; }
table.tbl th {
  text-align: left; padding: var(--s-3) var(--s-4);
  font-size: var(--fs-xs); letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-4); border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0;
}
table.tbl td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .actions { white-space: nowrap; text-align: right; }
table.tbl img.thumb { width: 38px; height: 38px; border-radius: var(--r-sm); object-fit: cover; }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-4); }
.toolbar .input, .toolbar .select { width: auto; min-width: 190px; }

/* ==========================================================================
   Inbox
   ========================================================================== */

.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; gap: var(--s-4); align-items: start; }

.thread-list {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
  max-height: calc(100vh - 190px); overflow-y: auto;
}
.thread-row {
  display: block; width: 100%; text-align: left;
  padding: var(--s-3) var(--s-4);
  background: transparent; border: none; border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur) var(--ease);
}
.thread-row:hover { background: var(--surface-2); }
.thread-row.on { background: var(--forest-soft); box-shadow: inset 3px 0 0 var(--forest); }
.thread-row .who { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 2px; }
.thread-row strong { font-size: var(--fs-sm); }
.thread-row .snippet {
  font-size: var(--fs-xs); color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-row .when { font-size: 0.66rem; color: var(--ink-4); margin-left: auto; flex: none; }
.thread-row .unread {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--bad); color: #fff; font-size: 0.62rem; font-weight: 800;
  display: grid; place-items: center; flex: none;
}

.action-col { display: flex; flex-direction: column; gap: var(--s-4); max-height: calc(100vh - 190px); overflow-y: auto; }

@media (max-width: 1280px) {
  .inbox { grid-template-columns: 260px minmax(0, 1fr); }
  .action-col { grid-column: 1 / -1; max-height: none; }
}
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; }
  .thread-list { max-height: 300px; }
}

/* ==========================================================================
   Issue-details form
   ========================================================================== */

.issue-panel { border: 1.5px solid var(--forest); }
.issue-panel h4 { color: var(--forest); }

.method-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.method-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); font-size: var(--fs-xs); font-weight: 700;
  transition: all var(--dur) var(--ease);
}
.method-tab .swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.method-tab.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.method-tab.requested { box-shadow: 0 0 0 3px var(--warn-soft); border-color: var(--warn); }

.live-offer {
  border: 1px solid var(--good); background: var(--good-soft);
  border-radius: var(--r-md); padding: var(--s-4);
}
.live-offer.expired { border-color: var(--bad); background: var(--bad-soft); }
.live-offer .big { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; }

/* ==========================================================================
   Receipt review
   ========================================================================== */

.receipt-card {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s-4);
  padding: var(--s-4); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
}
.receipt-card .shot {
  width: 120px; height: 120px; border-radius: var(--r-md); object-fit: cover;
  border: 1px solid var(--line); background: var(--surface-2);
}
.receipt-card .shot-fallback { display: grid; place-items: center; color: var(--ink-3); }

@media (max-width: 620px) {
  .receipt-card { grid-template-columns: 1fr; }
  .receipt-card .shot { width: 100%; height: 190px; }
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: var(--s-5); }
.login-card { width: 100%; max-width: 400px; }
.login-card .logo { justify-content: center; margin-bottom: var(--s-5); }
