/* Adverships design system v1
 * Brand: pink-purple gradient (existing), Urbanist font.
 * Sits on top of Bootstrap 5; overrides its variables and adds custom
 * components that match the new aesthetic.
 */

:root {
  /* Brand colors */
  --av-pink: #f5acc4;
  --av-purple: #bf86f7;
  --av-purple-dark: #9b5dd6;
  --av-purple-darker: #7a3fb5;
  --av-gradient: linear-gradient(90deg, var(--av-pink) 0%, var(--av-purple) 100%);

  /* Surfaces */
  --av-white: #ffffff;
  --av-bg: #fafafa;
  --av-bg-alt: #f4f5f7;
  --av-border: #e5e7eb;
  --av-border-strong: #d1d5db;

  /* Text */
  --av-text: #111827;
  --av-text-muted: #6b7280;
  --av-text-light: #9ca3af;
  --av-text-on-brand: #ffffff;

  /* Status */
  --av-success: #10b981;
  --av-warning: #f59e0b;
  --av-danger:  #ef4444;
  --av-info:    #3b82f6;

  /* Spacing (8pt) */
  --av-s1: 4px;  --av-s2: 8px;  --av-s3: 12px; --av-s4: 16px;
  --av-s5: 24px; --av-s6: 32px; --av-s7: 48px; --av-s8: 64px; --av-s9: 96px;

  /* Radius */
  --av-rsm: 4px;  --av-rmd: 8px;  --av-rlg: 16px; --av-rpill: 9999px;

  /* Shadow */
  --av-shadow-sm: 0 1px 2px rgba(17,24,39,.05);
  --av-shadow-md: 0 4px 12px rgba(17,24,39,.08);
  --av-shadow-lg: 0 12px 32px rgba(17,24,39,.12);

  /* Typography */
  --av-font: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Bootstrap overrides */
  --bs-primary: #bf86f7;
  --bs-primary-rgb: 191,134,247;
  --bs-body-color: var(--av-text);
  --bs-body-bg: var(--av-bg);
  --bs-body-font-family: var(--av-font);
  --bs-border-color: var(--av-border);
  --bs-border-radius: var(--av-rmd);
}

/* ---------------------------------------------------- baseline */
body {
  font-family: var(--av-font);
  color: var(--av-text);
  background: var(--av-bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--av-purple-darker); }
a:hover { color: var(--av-purple-dark); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--av-bg-alt); padding: 2px 6px; border-radius: 4px; }

/* ---------------------------------------------------- typography */
.av-display { font-size: clamp(40px,5vw,56px); line-height: 1.1;  font-weight: 700; letter-spacing: -.02em; margin: 0; }
h1, .av-h1  { font-size: 40px; line-height: 1.2;  font-weight: 700; letter-spacing: -.01em; }
h2, .av-h2  { font-size: 32px; line-height: 1.25; font-weight: 700; }
h3, .av-h3  { font-size: 24px; line-height: 1.33; font-weight: 600; }
h4, .av-h4  { font-size: 20px; line-height: 1.4;  font-weight: 600; }
.av-body-lg { font-size: 18px; line-height: 1.55; }
.av-body    { font-size: 16px; line-height: 1.5;  }
.av-body-sm { font-size: 14px; line-height: 1.5;  }
.av-caption { font-size: 12px; line-height: 1.4; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.av-muted   { color: var(--av-text-muted); }

.av-gradient-text {
  background: var(--av-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}

/* ---------------------------------------------------- buttons */
.av-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--av-rmd);
  font-size: 15px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
  line-height: 1.2;
}
.av-btn:hover { text-decoration: none; }
.av-btn:active { transform: translateY(1px); }
.av-btn-primary {
  background: var(--av-gradient); color: var(--av-text-on-brand);
  box-shadow: var(--av-shadow-sm);
}
.av-btn-primary:hover { box-shadow: var(--av-shadow-md); color: var(--av-text-on-brand); }
.av-btn-secondary {
  background: var(--av-white); color: var(--av-text);
  border: 1px solid var(--av-border-strong);
}
.av-btn-secondary:hover { border-color: var(--av-purple); color: var(--av-purple-darker); }
.av-btn-ghost { background: transparent; color: var(--av-text); }
.av-btn-ghost:hover { background: var(--av-bg-alt); }
.av-btn-danger { background: var(--av-danger); color: white; border-color: var(--av-danger); }
.av-btn-sm { padding: 6px 14px; font-size: 13px; }
.av-btn-lg { padding: 14px 28px; font-size: 17px; }

/* ---------------------------------------------------- inputs */
.av-input, .av-select, .av-textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--av-border-strong); border-radius: var(--av-rmd);
  background: var(--av-white); font-size: 15px; font-family: inherit; color: var(--av-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.av-input:focus, .av-select:focus, .av-textarea:focus {
  outline: none; border-color: var(--av-purple);
  box-shadow: 0 0 0 3px rgba(191,134,247,.2);
}
.av-textarea { min-height: 96px; resize: vertical; }
.av-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--av-text); }
.av-help  { display: block; margin-top: 6px; font-size: 13px; color: var(--av-text-muted); }

/* ---------------------------------------------------- cards */
.av-card {
  background: var(--av-white); border: 1px solid var(--av-border);
  border-radius: var(--av-rlg); padding: var(--av-s5); box-shadow: var(--av-shadow-sm);
}
.av-card-header {
  margin: calc(-1 * var(--av-s5)) calc(-1 * var(--av-s5)) var(--av-s4);
  padding: var(--av-s4) var(--av-s5);
  border-bottom: 1px solid var(--av-border);
}
.av-card-title { font-size: 18px; font-weight: 600; margin: 0; }

/* ---------------------------------------------------- stat cards */
.av-stat {
  background: var(--av-white); border: 1px solid var(--av-border);
  border-radius: var(--av-rlg); padding: var(--av-s5);
}
.av-stat-label { font-size: 13px; color: var(--av-text-muted); font-weight: 500; margin: 0 0 8px; }
.av-stat-value { font-size: 32px; font-weight: 700; color: var(--av-text); line-height: 1; margin: 0; }
.av-stat-trend { font-size: 13px; margin: 8px 0 0; color: var(--av-text-muted); }
.av-stat-trend.up   { color: var(--av-success); }
.av-stat-trend.down { color: var(--av-danger); }

/* ---------------------------------------------------- tables */
.av-table-wrapper {
  border: 1px solid var(--av-border); border-radius: var(--av-rlg);
  overflow: hidden; background: var(--av-white);
}
.av-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.av-table th {
  text-align: left; padding: 12px 16px;
  background: var(--av-bg-alt); border-bottom: 1px solid var(--av-border);
  font-weight: 600; color: var(--av-text-muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.av-table td { padding: 14px 16px; border-bottom: 1px solid var(--av-border); }
.av-table tbody tr:last-child td { border-bottom: none; }
.av-table tbody tr:hover td { background: var(--av-bg); }

/* ---------------------------------------------------- badges */
.av-badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--av-rpill);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.av-badge-gradient    { background: var(--av-gradient); color: white; }
.av-badge-soft-purple { background: rgba(191,134,247,.12); color: var(--av-purple-darker); }
.av-badge-soft-green  { background: rgba(16,185,129,.12);  color: #047857; }
.av-badge-soft-red    { background: rgba(239,68,68,.12);   color: #b91c1c; }
.av-badge-soft-yellow { background: rgba(245,158,11,.12);  color: #92400e; }
.av-badge-soft-gray   { background: var(--av-bg-alt);      color: var(--av-text-muted); }

/* ---------------------------------------------------- alerts */
.av-alert {
  padding: 12px 16px; border-radius: var(--av-rmd);
  border: 1px solid transparent; font-size: 14px;
}
.av-alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.av-alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.av-alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.av-alert-danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ---------------------------------------------------- dashboard shell */
.av-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.av-sidebar {
  background: var(--av-white); border-right: 1px solid var(--av-border);
  padding: var(--av-s5);
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.av-sidebar-bottom { margin-top: auto; padding-top: var(--av-s5); }
.av-sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: var(--av-s6);
  font-weight: 700; font-size: 20px; color: var(--av-text);
}
.av-sidebar-logo img { width: 28px; height: 28px; }
.av-nav { display: flex; flex-direction: column; gap: 4px; }
.av-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--av-rmd);
  color: var(--av-text-muted); text-decoration: none;
  font-weight: 500; font-size: 14px;
  transition: background 120ms ease, color 120ms ease;
}
.av-nav a:hover { background: var(--av-bg-alt); color: var(--av-text); text-decoration: none; }
.av-nav a.active { background: rgba(191,134,247,.12); color: var(--av-purple-darker); }
.av-main { padding: var(--av-s6) var(--av-s7); }
.av-topbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: var(--av-s6); gap: var(--av-s4); flex-wrap: wrap;
}

/* ---------------------------------------------------- marketing hero */
.av-hero { padding: var(--av-s9) var(--av-s5); text-align: center; }
.av-hero h1 {
  font-size: clamp(40px,6vw,64px); line-height: 1.1; font-weight: 800;
  margin-bottom: var(--av-s4); letter-spacing: -.02em;
}
.av-hero .lead { font-size: 20px; color: var(--av-text-muted); max-width: 600px; margin: 0 auto var(--av-s6); }

/* ---------------------------------------------------- responsive */
@media (max-width: 768px) {
  .av-shell { grid-template-columns: 1fr; }
  .av-sidebar { display: none; }
  .av-main { padding: var(--av-s5); }
  h1, .av-h1 { font-size: 28px; }
  h2, .av-h2 { font-size: 24px; }
}
