/* ============================================================
   Bidmetic - Admin Panel Styles
============================================================ */

:root {
  --bg-deep: #07090f;
  --bg-base: #0b0f1a;
  --bg-surface: #131826;
  --bg-elevated: #1a2030;
  --border-soft: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand: #00d68f;
  --brand-bright: #2cf2a8;
  --brand-deep: #07b074;
  --amber: #fbbf24;
  --rose: #fb7185;
  --indigo: #7c93ff;
  --font-display: 'Sora', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Manrope', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-bright); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

/* Layout */
.sidebar-overlay { display: none; }

.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  background: #0a0d16;
  border-right: 1px solid var(--border-soft);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 18px;
  text-decoration: none;
}
.sidebar-brand .mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  display: flex; align-items: center; justify-content: center;
  color: #0b0f1a;
}
.sidebar-brand .brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
}
.sidebar-brand .brand-text span { color: var(--brand); }
.admin-badge {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(124,147,255,0.15);
  color: var(--indigo);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.side-section {
  margin: 18px 0 10px;
  padding: 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}
.side-nav { list-style: none; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: 0.15s;
}
.side-nav a svg { width: 18px; height: 18px; }
.side-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.side-nav a.active {
  background: rgba(0,214,143,0.1);
  color: var(--brand-bright);
}
.side-nav a.active::after {
  content: '';
  width: 4px; height: 18px;
  background: var(--brand);
  border-radius: 2px;
  margin-left: auto;
}

/* Main */
.main { padding: 26px 30px 40px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 18px;
  flex-wrap: wrap;
}
.topbar h1 { font-size: 26px; font-weight: 700; }
.topbar .subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  padding: 8px;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: linear-gradient(160deg, var(--bg-surface), #0d1220);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-card .value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}
.stat-card .accent-bar {
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--brand);
}
.stat-card.green .accent-bar { background: var(--brand); }
.stat-card.amber .accent-bar { background: var(--amber); }
.stat-card.indigo .accent-bar { background: var(--indigo); }
.stat-card.rose .accent-bar { background: var(--rose); }
.stat-card .meta { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Panels */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.panel-head h3 { font-size: 16px; font-weight: 700; }
.panel-head .sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.panel-body { padding: 22px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,214,143,0.15);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  background: var(--brand);
  color: #06120b;
  border: 0;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: 0.15s;
}
.btn-primary:hover { background: var(--brand-bright); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--text-primary); }
.btn-sm {
  background: var(--brand);
  color: #06120b;
  border: 0;
  padding: 7px 13px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.btn-sm:hover { background: var(--brand-bright); }
.btn-sm-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-sm-outline:hover { color: var(--text-primary); border-color: var(--border-strong); }
.btn-rose {
  background: var(--rose); color: #fff;
  border: 0; padding: 7px 13px; border-radius: 7px;
  font-weight: 700; font-size: 12px; cursor: pointer;
}
.btn-amber {
  background: var(--amber); color: #1a1a1a;
  border: 0; padding: 7px 13px; border-radius: 7px;
  font-weight: 700; font-size: 12px; cursor: pointer;
}

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-soft);
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}
table.data tbody tr:hover { background: rgba(255,255,255,0.02); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .strong { color: var(--text-primary); font-weight: 600; }
table.data .earnings { color: var(--brand-bright); font-weight: 700; }

.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-active, .status-approved, .status-paid { background: rgba(0,214,143,0.12); color: var(--brand-bright); }
.status-pending, .status-processing { background: rgba(251,191,36,0.12); color: #fcd34d; }
.status-banned, .status-rejected, .status-suspended { background: rgba(251,113,133,0.12); color: var(--rose); }
.status-paused, .status-disabled { background: rgba(148,163,184,0.12); color: var(--text-secondary); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert.success { background: rgba(0,214,143,0.1); border: 1px solid rgba(0,214,143,0.25); color: var(--brand-bright); }
.alert.error { background: rgba(251,113,133,0.1); border: 1px solid rgba(251,113,133,0.25); color: var(--rose); }
.alert.warn { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25); color: #fcd34d; }
.alert.info { background: rgba(124,147,255,0.1); border: 1px solid rgba(124,147,255,0.25); color: var(--indigo); }

.empty-state { text-align: center; padding: 30px 20px; color: var(--text-muted); font-size: 14px; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar input,
.filter-bar select {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
}
.filter-bar input:focus,
.filter-bar select:focus { outline: 0; border-color: var(--brand); }

/* Country rows in stats form */
.country-row-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 40px;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}
.country-row-form input,
.country-row-form select {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
  width: 100%;
}
.country-row-form button {
  background: rgba(251,113,133,0.1);
  border: 1px solid rgba(251,113,133,0.2);
  color: var(--rose);
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
}

/* Login */
.auth-body { background: var(--bg-base); min-height: 100vh; }
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 18px;
  background:
    radial-gradient(ellipse 700px 500px at 50% 0%, rgba(124,147,255,0.12), transparent 70%),
    var(--bg-base);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 36px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.auth-card .brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.auth-card .brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  display: flex; align-items: center; justify-content: center;
  color: #0b0f1a;
}
.auth-card .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
}
.auth-card .brand-name .accent { color: var(--brand); }
.auth-card h2 {
  text-align: center;
  font-size: 22px;
  margin: 16px 0 4px;
}
.auth-card .sub-line {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.auth-card .field { margin-bottom: 14px; }
.auth-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.auth-card input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}
.auth-card input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,214,143,0.15); }
.auth-card button[type="submit"] {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  color: #06251a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 6px;
}
.auth-card button[type="submit"]:hover { transform: translateY(-1px); }
.auth-card .error-line {
  padding: 11px 14px;
  background: rgba(251,113,133,0.1);
  border: 1px solid rgba(251,113,133,0.25);
  color: #fda4af;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 270px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
  }
  .sidebar-overlay.show { display: block; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .main { padding: 18px 16px 30px; }
}

@media (max-width: 720px) {
  .form-grid, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .country-row-form { grid-template-columns: 1fr 1fr; }
  .country-row-form button { grid-column: 2; justify-self: end; }
  table.data th, table.data td { padding: 10px 12px; font-size: 13px; }
}
