/* ============================================
   Marketplace Admin — Emerald Prestige Theme
   ============================================ */
:root {
  --bg: #0a1f1a;
  --bg-2: #0d2922;
  --surface: #103029;
  --surface-2: #164036;
  --border: #1d5448;
  --emerald: #0d7a5f;
  --emerald-bright: #10b981;
  --gold: #c9a84c;
  --gold-bright: #f0d78c;
  --text: #f5f0e0;
  --text-muted: #94a89e;
  --danger: #e85d3a;
  --shadow: 0 10px 40px rgba(0,0,0,.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; min-height: 100vh; }
a { color: var(--gold-bright); text-decoration: none; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; color: var(--gold-bright); }

/* LOGIN */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(circle at top, var(--bg-2), var(--bg)); }
.login-card { background: var(--surface); padding: 40px; border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 400px; border: 1px solid var(--border); }
.login-card .brand { font-size: 1.4rem; color: var(--gold); margin-bottom: 8px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 24px; }
.login-card label { display: block; margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); }
.login-card input { width: 100%; padding: 12px; margin-top: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1rem; }
.login-card button { width: 100%; padding: 14px; margin-top: 24px; background: linear-gradient(135deg, var(--emerald), var(--emerald-bright)); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.login-card .hint { margin-top: 20px; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* LAYOUT */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--bg-2); padding: 24px 16px; border-right: 1px solid var(--border); }
.sidebar .brand { font-size: 1.3rem; color: var(--gold); margin-bottom: 32px; padding: 0 8px; }
.nav-item { display: block; padding: 12px 14px; border-radius: 8px; color: var(--text-muted); margin-bottom: 4px; transition: all .15s; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, var(--emerald), var(--emerald-bright)); color: white; }
.nav-item.logout { margin-top: 24px; color: var(--danger); }

.content { flex: 1; padding: 24px 32px; overflow-x: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.topbar h1 { font-size: 1.6rem; }
.topbar .user { color: var(--gold); font-size: 0.9rem; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); padding: 20px; border-radius: 12px; border: 1px solid var(--border); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.emerald::before { background: linear-gradient(90deg, var(--emerald), var(--emerald-bright)); }
.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text); margin: 8px 0 4px; }
.stat-card.gold .stat-value { color: var(--gold-bright); }
.stat-sub { font-size: 0.85rem; color: var(--text-muted); }

/* ALERTS / PILLS */
.alerts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.alert-pill { padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.9rem; }
.alert-pill.danger { border-color: var(--danger); color: var(--danger); }
.alert { padding: 12px 16px; border-radius: 8px; background: var(--danger); color: white; margin-bottom: 16px; }
.alert.success { background: var(--emerald); }

/* TABLES */
h2 { margin: 16px 0; color: var(--gold); font-size: 1.1rem; font-weight: 600; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
table.data th { background: var(--bg-2); color: var(--gold); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover { background: var(--surface-2); }

/* BADGES */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; background: var(--surface-2); color: var(--text-muted); }
.badge.locked, .badge.pending { background: rgba(201,168,76,.15); color: var(--gold-bright); }
.badge.confirmed, .badge.approved { background: rgba(16,185,129,.15); color: var(--emerald-bright); }
.badge.disputed { background: rgba(232,93,58,.15); color: var(--danger); }
.badge.refunded, .badge.rejected, .badge.cancelled { background: rgba(232,93,58,.1); color: var(--danger); }

/* BUTTONS */
.btn { display: inline-block; padding: 8px 14px; background: var(--emerald); color: white; border-radius: 6px; font-size: 0.85rem; font-weight: 600; border: none; cursor: pointer; }
.btn.small { padding: 6px 10px; font-size: 0.8rem; }
.btn.danger { background: var(--danger); }
.btn:hover { opacity: 0.9; }

/* FORMS */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { flex: 1; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.search-bar button { padding: 10px 18px; background: var(--gold); color: var(--bg); border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }

.form-card { background: var(--surface); padding: 24px; border-radius: 12px; border: 1px solid var(--border); max-width: 600px; }
.form-card label { display: block; margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-card input { width: 100%; padding: 10px 12px; margin-top: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.95rem; }
.form-card button { margin-top: 24px; padding: 12px 24px; background: linear-gradient(135deg, var(--emerald), var(--emerald-bright)); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }

/* MOBILE */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .sidebar .brand { width: 100%; margin-bottom: 12px; }
  .nav-item { padding: 8px 12px; font-size: 0.85rem; }
  .content { padding: 16px; }
  table.data { font-size: 0.8rem; }
  table.data th, table.data td { padding: 8px 6px; }
}
