@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --bg0: #dfe8ee;
  --bg1: #eef3f6;
  --ink: #14202b;
  --ink-soft: #3d4d5c;
  --muted: #667687;
  --line: rgba(20, 32, 43, 0.1);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --accent: #c45c26;
  --accent-deep: #9a4014;
  --pine: #1f6f5b;
  --pine-soft: rgba(31, 111, 91, 0.12);
  --ok: #1f7a4d;
  --bad: #b42318;
  --warn: #a15c07;
  --shadow: 0 18px 50px rgba(20, 32, 43, 0.08);
  --shadow-sm: 0 8px 24px rgba(20, 32, 43, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Outfit", "Source Sans 3", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(196, 92, 38, 0.18), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(31, 111, 91, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, #f7f9fb);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

nav a:hover,
nav a.active {
  background: rgba(196, 92, 38, 0.1);
  color: var(--accent-deep);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 1.5rem auto 3.5rem;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
}

h1 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
h2 { font-size: 1.2rem; }

.panel, .login, .stat, .action-card, .lot-card, .check-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.panel, .login {
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}

.panel:hover { box-shadow: var(--shadow); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 1rem 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.muted { color: var(--muted); }
.lead { color: var(--ink-soft); margin: 0 0 1rem; max-width: 62ch; }
.plain-list { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); max-width: 70ch; }
.plain-list li { margin: 0.35rem 0; }

.banner, .flash {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  animation: rise 0.35s ease both;
}

.banner, .flash.ok {
  background: rgba(196, 92, 38, 0.1);
  border-color: rgba(196, 92, 38, 0.28);
  color: var(--accent-deep);
}

.banner.danger, .flash.err, .error {
  background: rgba(180, 35, 24, 0.1);
  border-color: rgba(180, 35, 24, 0.28);
  color: var(--bad);
}

.stack { display: grid; gap: 0.8rem; }
.row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

input, select, textarea {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(196, 92, 38, 0.28);
  border-color: rgba(196, 92, 38, 0.45);
}

button, .btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, #d66a2f, var(--accent));
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(196, 92, 38, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover, .btn:hover, a.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  color: #fff;
}

button:active, .btn:active { transform: translateY(0); }

button.secondary, .btn.secondary, a.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

button.secondary:hover, .btn.secondary:hover { background: #f7f9fb; color: var(--ink); }

button.pine, .btn.pine {
  background: linear-gradient(180deg, #2a8a72, var(--pine));
  box-shadow: 0 8px 18px rgba(31, 111, 91, 0.22);
}

button.danger, .btn.danger {
  background: linear-gradient(180deg, #d6453a, var(--bad));
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.2);
}

button.ghost, .btn.ghost, button.linkish, .linkish {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border: 0;
  padding: 0.45rem 0.6rem;
}

button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn.ebay, a.btn.ebay {
  background: linear-gradient(180deg, #ef4a50, #e53238);
  box-shadow: 0 8px 18px rgba(229, 50, 56, 0.25);
}

.inline { display: inline; }
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.action-card {
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.action-card.ready {
  border-color: rgba(196, 92, 38, 0.45);
  box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.18);
}

.action-card h3 {
  font-size: 1rem;
  margin: 0;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 0.75rem;
  font-weight: 700;
}

.pill.warn { background: rgba(161, 92, 7, 0.12); color: var(--warn); }
.pill.bad { background: rgba(180, 35, 24, 0.1); color: var(--bad); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td.success { color: var(--ok); font-weight: 700; }
td.failed { color: var(--bad); font-weight: 700; }

.filters { flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.filters input, .filters select { min-width: 8rem; }

.thumbs { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.thumbs img, .thumb {
  width: 72px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #edf1f4;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #edf1f4;
  color: var(--muted);
}

.badge.high { background: rgba(31, 122, 77, 0.12); color: var(--ok); }
.badge.medium { background: rgba(196, 92, 38, 0.12); color: var(--accent-deep); }
.badge.low { background: rgba(180, 35, 24, 0.1); color: var(--bad); }

.codeblock {
  background: #14202b;
  color: #d7e0e8;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  overflow: auto;
  max-width: 100%;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-queue {
  max-width: 100%;
  overflow-x: hidden;
}

.review-row {
  max-width: 100%;
  overflow: hidden;
}

.review-title {
  margin: 0.65rem 0 0.25rem;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.review-meta {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
}

.review-body {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.badge.type-advisor_review { background: rgba(31, 111, 91, 0.12); color: var(--pine); }
.badge.type-price_update { background: rgba(196, 92, 38, 0.12); color: var(--accent-deep); }
.badge.type-create_lot { background: rgba(20, 32, 43, 0.08); color: var(--ink); }
.badge.type-watchlist_review { background: rgba(161, 92, 7, 0.12); color: var(--warn); }

.lot-card {
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.lot-preview {
  display: flex;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.lot-preview .thumb { width: 56px; height: 78px; }

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.check-card {
  position: relative;
  padding: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.check-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.check-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-card .face {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.check-card .meta { font-size: 0.88rem; line-height: 1.35; }
.check-card .meta strong { display: block; font-size: 0.95rem; }

.check-card.selected {
  border-color: rgba(31, 111, 91, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.check-card .tick {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
}

.check-card.selected .tick {
  background: var(--pine);
  border-color: var(--pine);
  box-shadow: inset 0 0 0 2px #fff;
}

.sticky-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: rgba(20, 32, 43, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
}

.sticky-bar .muted { color: rgba(255,255,255,0.7); }

.confirm-live {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--warn);
  font-weight: 600;
}

.confirm-live input { width: auto; }

.login {
  width: min(420px, 100%);
  margin: 4rem auto;
  padding: 1.6rem;
}

.login h1 { margin-bottom: 0.25rem; }

.review-row:focus {
  outline: 2px solid rgba(196, 92, 38, 0.45);
  outline-offset: 2px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.budget-meter {
  height: 8px;
  border-radius: 999px;
  background: #e4eaef;
  overflow: hidden;
  margin-top: 0.45rem;
}

.budget-meter > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pine), var(--accent));
  border-radius: inherit;
}

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
  nav { justify-content: flex-start; }
  .page-head, .row.between, .sticky-bar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
}
