/* =========================================================
   GLOBAL DESIGN SYSTEM – DISTRIBUTION PLATFORM
   ========================================================= */

:root {
  --bg-dark: #0e1117;
  --bg-panel: #161b22;
  --bg-surface: #1b2230;

  --primary: #3b82f6;
  --secondary: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --border: #1f2937;

  --radius: 10px;
  --radius-sm: 6px;

  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   RESET & BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   FORMS
========================= */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  margin-bottom: 16px;
  font-size: 14px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* =========================
   BUTTONS
========================= */

button {
  padding: 12px 18px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

button:hover {
  opacity: 0.9;
}

button.secondary {
  background: var(--secondary);
}

button.danger {
  background: var(--danger);
}

button.full {
  width: 100%;
}

/* =========================
   LAYOUT
========================= */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

/* =========================
   HEADER / NAV
========================= */

.header {
  background: var(--bg-panel);
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.header nav a {
  margin-right: 20px;
  font-weight: 600;
}

/* =========================
   TABLES
========================= */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================
   STATUS BADGES
========================= */

.status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.status.approved {
  background: rgba(34, 197, 94, 0.15);
  color: var(--secondary);
}

.status.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* =========================
   NOTICES & UTILITIES
========================= */

.notice {
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
}

.notice.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--secondary);
}

.notice.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.notice.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.hidden {
  display: none !important;
}

.clickable {
  cursor: pointer;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
}

/* =========================
   DSP BREAKDOWN (FIXED)
========================= */

.dsp-breakdown {
  background: var(--bg-surface);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.dsp-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.dsp-row:last-child {
  border-bottom: none;
}

/* =========================
   LANDING PAGE UTILITIES
========================= */

.text-center {
  text-align: center;
}

/* Responsive grid system */
.grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Primary button (missing) */
button.primary {
  background: var(--primary);
  color: #fff;
}

/* Button spacing when grouped */
a > button {
  margin: 6px;
}

/* Hero spacing fix */
section.container {
  position: relative;
}

.locked-notice {
  background: #111827;
  border: 1px solid #374151;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: #d1d5db;
}

.locked-notice strong {
  display: block;
  color: #facc15;
  margin-bottom: 6px;
}

.validation-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.validation-list li {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.logout-btn {
    display: block;
    padding: 12px;
    margin: 15px;
    background: #1c1c1c;
    color: #ff5c5c;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
}

.logout-btn:hover {
    background: #ff5c5c;
    color: #fff;
}

.status.pending {
    color: #f1c40f;
}

.status.approved {
    color: #3498db;
}

.status.delivered {
    color: #2ecc71;
}

.status.rejected {
    color: #e74c3c;
}

.dsp-grid {
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    background: #111;
}

/* ===============================
   DSP STATUS BADGES
   =============================== */

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pending */
.status.pending {
    background: #fff3cd;
    color: #856404;
}

/* Processing */
.status.processing {
    background: #cce5ff;
    color: #004085;
}

/* Delivered */
.status.delivered {
    background: #d4edda;
    color: #155724;
}

/* Failed */
.status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Takedown */
.status.takedown {
    background: #e2e3e5;
    color: #383d41;
}