/* ==========================================================================
   PRINCIA.SHOP — admin dashboard theme (clean, professional, not kids-themed)
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: #F1F3F7; color: #1E2430; font-size: 14.5px; line-height: 1.55;
}
a { color: #2563EB; }

/* ---------- Login gate / setup ---------- */
.gate-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(135deg, #1E2430 0%, #2B3350 100%);
}
.gate-card {
  background: #fff; border-radius: 18px; padding: 44px 40px; max-width: 400px; width: 100%;
  text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.35);
}
.gate-card img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; }
.gate-card h1 { font-size: 24px; margin-bottom: 8px; }
.gate-card p { color: #6B7280; margin-bottom: 22px; }
.gate-card input {
  width: 100%; border: 1.5px solid #D7DCE5; border-radius: 10px;
  padding: 13px 15px; font-size: 15px; margin-bottom: 14px;
}
.gate-card input:focus { outline: none; border-color: #2563EB; }
.gate-error {
  background: #FDECEC; color: #B42318; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px;
}
.back-link { display: inline-block; margin-top: 18px; font-size: 13.5px; }
.setup-list { text-align: left; margin: 0 0 10px 20px; display: grid; gap: 10px; color: #374151; }
.setup-list code { background: #F1F3F7; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* ---------- Buttons ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; padding: 11px 20px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.a-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.a-btn-primary { background: #2563EB; color: #fff; }
.a-btn-primary:hover { background: #1D4ED8; }
.a-btn-outline { background: #fff; border: 1.5px solid #D7DCE5; color: #1E2430; }
.a-btn-outline:hover { border-color: #2563EB; color: #2563EB; }
.a-btn-ghost { background: rgba(255,255,255,0.08); color: #C7CEDD; width: 100%; }
.a-btn-ghost:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ---------- Dashboard layout ---------- */
.dash { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex: none; background: #1E2430; color: #fff;
  display: flex; flex-direction: column; padding: 24px 18px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 34px; padding: 0 6px; }
.side-brand img { width: 42px; height: 42px; border-radius: 50%; }
.side-brand b { display: block; font-size: 17px; }
.side-brand small { color: #8B94AC; font-size: 12px; }
.side-nav { display: grid; gap: 6px; }
.side-nav a {
  color: #C7CEDD; font-weight: 600; padding: 11px 14px; border-radius: 10px;
  text-decoration: none; font-size: 14.5px;
}
.side-nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.side-nav a.active { background: #2563EB; color: #fff; }

.main { flex: 1; padding: 30px 34px; max-width: 1280px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { font-size: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(20,30,60,0.06); }
.stat small { color: #6B7280; font-weight: 700; text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.8px; }
.stat b { display: block; font-size: 30px; margin-top: 6px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar input[type="search"] { flex: 1; min-width: 220px; }
.toolbar input, .toolbar select {
  border: 1.5px solid #D7DCE5; border-radius: 10px; padding: 10px 14px;
  font-size: 14px; background: #fff; color: #1E2430;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: #2563EB; }
.result-count { color: #6B7280; font-size: 13px; font-weight: 600; margin-bottom: 12px; }

.table-wrap { background: #fff; border-radius: 14px; overflow-x: auto; box-shadow: 0 2px 10px rgba(20,30,60,0.06); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.7px;
  color: #6B7280; padding: 14px 16px; border-bottom: 1px solid #E8ECF3; white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid #F1F3F7; vertical-align: top; }
tbody tr:hover { background: #F8FAFE; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
td.addr { max-width: 220px; font-size: 13.5px; }
td.addr small { color: #6B7280; font-weight: 700; }
td a.mono { color: #2563EB; text-decoration: none; }
td a.mono:hover { text-decoration: underline; }

.status-pill {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800;
}
.st-pending { background: #FEF3C7; color: #92400E; }
.st-confirmed { background: #DBEAFE; color: #1E40AF; }
.st-shipped { background: #E0E7FF; color: #4338CA; }
.st-delivered { background: #D1FAE5; color: #065F46; }
.st-cancelled { background: #FEE2E2; color: #991B1B; }

.status-select {
  border: 1.5px solid #D7DCE5; border-radius: 8px; padding: 8px 10px;
  font-size: 13.5px; font-weight: 700; background: #fff; cursor: pointer;
}
.status-select:focus { outline: none; border-color: #2563EB; }

.empty-state { text-align: center; padding: 60px 20px; color: #6B7280; }
.empty-state p:first-child { font-size: 17px; color: #1E2430; margin-bottom: 6px; }

@media (max-width: 860px) {
  .dash { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; gap: 14px; padding: 14px 18px; }
  .side-brand { margin-bottom: 0; }
  .side-nav { display: flex; }
  .sidebar .a-btn-ghost { width: auto; margin: 0 0 0 auto; }
  .main { padding: 20px 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reviews moderation ---------- */
.nav-badge {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  text-align: center; font-size: 12px; font-weight: 800;
  background: #FF6B6B; color: #fff; border-radius: 10px; padding: 0 6px;
  margin-left: 6px; vertical-align: middle;
}
.panel-sub { color: #8a8fa3; margin: -6px 0 18px; font-size: 14px; }
.panel-h { font-size: 16px; margin: 0 0 12px; color: #2b2d5c; }
.review-list { display: grid; gap: 14px; }
.review-mod {
  background: #fff; border: 1px solid #e8eaf1; border-radius: 14px;
  padding: 16px; display: flex; gap: 16px; align-items: flex-start;
}
.review-mod img.rv-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.review-mod .rv-body { flex: 1; min-width: 0; }
.review-mod .rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review-mod .rv-head b { font-size: 15px; }
.review-mod .rv-stars { color: #FFB800; letter-spacing: 2px; }
.review-mod .rv-date { color: #8a8fa3; font-size: 12.5px; }
.review-mod .rv-text { margin: 4px 0 12px; font-size: 14.5px; line-height: 1.55; color: #333; }
.review-mod .rv-actions { display: flex; gap: 10px; }
.a-btn-success { background: #1E7A3C; color: #fff; border: none; padding: 8px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.a-btn-success:hover { background: #16632f; }
.a-btn-danger { background: #fff; color: #B3261E; border: 1px solid #f0c6c6; padding: 8px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.a-btn-danger:hover { background: #FDECEC; }
.a-btn:disabled, .a-btn-success:disabled, .a-btn-danger:disabled { opacity: .55; cursor: wait; }

/* ---- Visits tab ---- */
.visit-cols { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:4px; }
@media (max-width:720px){ .visit-cols{ grid-template-columns:1fr; } }
.bar-list{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.bar-row{ display:flex; align-items:center; gap:10px; }
.bar-label{ width:130px; flex:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:#3a3f4b; }
.bar-track{ flex:1; height:10px; background:#edf0f5; border-radius:6px; overflow:hidden; }
.bar-fill{ display:block; height:100%; background:linear-gradient(90deg,#6c5ce7,#00cec9); border-radius:6px; transition:width .4s; }
.bar-val{ min-width:34px; text-align:right; font-size:13px; }
