/* public/css/glass.css — Takedowns v2 design system (light glassmorphism)
 *
 * Replaces main.css + extends marketing.css. Light theme with frosted
 * glass surfaces over a soft pastel gradient. Indigo + coral accent.
 *
 * Brand: takedowns.vesamuni.com
 * Logo: a circle with a diagonal line (the "taken down" mark) — see
 *       public/og/logo.svg
 *
 * Design tokens:
 *   --bg-page:   page background (soft white with subtle pastel wash)
 *   --glass-1:   standard card surface
 *   --glass-2:   elevated surface (modals, menus, popovers)
 *   --glass-3:   active surface (hover, focus)
 *   --border:    hairline border (rgba indigo 8%)
 *   --text-1:    primary text (deep slate)
 *   --text-2:    secondary text
 *   --text-3:    muted text
 *   --accent:    indigo (primary)
 *   --accent-2:  coral (energy, removed, "takedown" red)
 *   --ok/warn/d: emerald / amber / red
 *
 * Performance: backdrop-filter blur 12-16px is GPU-cheap when scoped
 * to small panels. We use it on .card/.panel/.glass surfaces only.
 * @supports fallback: solid white background.
 */

/* ---------- design tokens ---------- */
:root {
  --bg-0:       #faf9ff;       /* very pale lavender, base */
  --bg-1:       #fff5f1;       /* very pale peach, accent wash */
  --bg-2:       #f0eefb;       /* pale violet, secondary wash */
  --bg-warm:    #fef0e6;       /* pale coral wash */

  --glass-1:    rgba(255, 255, 255, 0.55);   /* card */
  --glass-2:    rgba(255, 255, 255, 0.75);   /* modal/menu */
  --glass-3:    rgba(255, 255, 255, 0.90);   /* active */
  --glass-tint: rgba(255, 255, 255, 0.35);   /* subtle base */

  --border:     rgba(99, 102, 241, 0.10);    /* hairline */
  --border-2:   rgba(99, 102, 241, 0.18);    /* stronger */
  --border-3:   rgba(99, 102, 241, 0.32);    /* focus */
  --border-warm:rgba(244, 63, 94, 0.18);

  --text-1:     #1a1a2e;       /* deep slate, primary */
  --text-2:     #4a4a6a;       /* slate-grey */
  --text-3:     #8a8aa3;       /* light grey, muted */
  --text-onaccent:#ffffff;

  --accent:     #6366f1;       /* indigo, primary */
  --accent-2:   #f43f5e;       /* coral, "takedown" energy */
  --accent-3:   #8b5cf6;       /* violet, secondary */
  --ok:         #10b981;
  --warn:       #f59e0b;
  --danger:     #ef4444;

  --grad-hero:
    radial-gradient(ellipse 80% 60% at 0% 0%,    rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%,  rgba(244, 63, 94, 0.12)  0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(99, 102, 241, 0.10)  0%, transparent 70%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  --grad-card:  linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.55) 100%);
  --grad-accent:linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  --grad-coral: linear-gradient(135deg, var(--accent-2) 0%, #ec4899 100%);
  --grad-ok:    linear-gradient(135deg, var(--ok) 0%, #059669 100%);
  --grad-danger:linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --shadow-1: 0 4px 24px rgba(99, 102, 241, 0.08), 0 1px 4px rgba(26, 26, 46, 0.04);
  --shadow-2: 0 12px 48px rgba(99, 102, 241, 0.14), 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-3: 0 24px 72px rgba(99, 102, 241, 0.18), 0 4px 12px rgba(26, 26, 46, 0.08);
  --shadow-glow: 0 0 32px rgba(99, 102, 241, 0.25);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-0);
  background-image: var(--grad-hero);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-3); }
h1, h2, h3, h4 { color: var(--text-1); font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: 2.4rem; line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.2; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; color: var(--text-2); font-size: 1.02rem; }
.muted { color: var(--text-3); }
.mono  { font-family: var(--font-mono); font-size: .9em; }
.small-text { font-size: .8rem; }
.center { text-align: center; }
.right  { text-align: right; }

/* ---------- glass surface system ----------
 * .glass       standard card (blur 14)
 * .glass-sm    small chip (blur 10)
 * .glass-lg    large panel / modal (blur 20)
 * .glass-tint  subtle (no blur, just a slight white wash)
 */
.glass,
.glass-sm,
.glass-lg {
  background: var(--glass-1);
  background-image: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  position: relative;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.glass-sm { backdrop-filter: blur(10px) saturate(180%);  -webkit-backdrop-filter: blur(10px) saturate(180%);  border-radius: var(--r-sm); }
.glass-lg { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-radius: var(--r-lg); padding: 1.5rem; }
/* Top inner highlight — gives the glass a real "edge" */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.glass:hover { border-color: var(--border-2); box-shadow: var(--shadow-2); }
@supports not (backdrop-filter: blur(10px)) {
  .glass, .glass-sm, .glass-lg { background: rgba(255, 255, 255, 0.92); }
}

/* ---------- app shell ---------- */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar — frosted glass */
.app > aside {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-right: 1px solid var(--border);
  background: var(--glass-1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-1);
  padding: .25rem .25rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img, .brand .logo { width: 30px; height: 30px; flex-shrink: 0; }
.brand .wordmark, .brand .brand-wordmark { font-weight: 800; display: flex; flex-direction: column; line-height: 1.05; }
.brand .wordmark small, .brand .brand-wordmark small { font-size: .6rem; color: var(--text-3); font-weight: 500; letter-spacing: .04em; margin-top: -.05rem; }

.app aside nav {
  display: flex; flex-direction: column; gap: .15rem;
  margin-top: .5rem;
}
.app aside nav a {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .7rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: .92rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
  position: relative;
}
.app aside nav a:hover { background: var(--glass-tint); color: var(--text-1); }
.app aside nav a.active {
  background: var(--glass-2);
  color: var(--text-1);
  font-weight: 600;
}
.app aside nav a.active::before {
  content: "";
  position: absolute;
  left: -1rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--grad-accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(99,102,241,.4);
}

main { padding: 1.5rem 2rem 3rem; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.topbar h1 { margin: 0; font-size: 1.6rem; }
.topbar .sub { color: var(--text-3); font-size: .9rem; }

.user-pill {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .65rem;
  background: var(--glass-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-accent);
  color: var(--text-onaccent);
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ---------- buttons ---------- */
button, .button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--glass-2);
  color: var(--text-1);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .08s, box-shadow .15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .button:hover, a.button:hover {
  background: var(--glass-3);
  border-color: var(--border-3);
  color: var(--text-1);
  box-shadow: var(--shadow-1);
}
button:active, .button:active { transform: scale(.97); }
button:focus-visible, .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.primary, .button.primary {
  background: var(--grad-accent);
  border-color: transparent;
  color: var(--text-onaccent);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .25);
}
button.primary:hover, .button.primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, .4);
  color: var(--text-onaccent);
  transform: translateY(-1px);
}
button.coral, .button.coral {
  background: var(--grad-coral);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(244, 63, 94, .3);
}
button.secondary { background: var(--glass-1); border-color: var(--border); }
button.danger { background: var(--grad-danger); border-color: transparent; color: white; font-weight: 600; }
button.warn { background: linear-gradient(135deg, var(--warn) 0%, #d97706 100%); border-color: transparent; color: #1a1a1a; font-weight: 600; }
button.ok { background: var(--grad-ok); border-color: transparent; color: white; font-weight: 600; }
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.lg { padding: .8rem 1.4rem; font-size: 1rem; }
button.sm { padding: .3rem .55rem; font-size: .8rem; }

/* ---------- forms ---------- */
input, select, textarea {
  font-family: inherit;
  font-size: .92rem;
  padding: .55rem .8rem;
  background: var(--glass-1);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text-1);
  width: 100%;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-3);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
label { display: block; color: var(--text-2); font-size: .85rem; margin-bottom: .3rem; font-weight: 500; }

/* ---------- cards / panels ---------- */
.card, .panel {
  background: var(--glass-1);
  background-image: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  position: relative;
}
.card::before, .panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.panel { padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.panel h2 { margin-top: 0; font-size: 1.1rem; }
.panel h3 { font-size: .95rem; }

.card h3 { font-size: .78rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .35em; }
.card .v { font-size: 1.8rem; font-weight: 800; color: var(--text-1); line-height: 1.1; letter-spacing: -.02em; }
.card .sub { font-size: .78rem; color: var(--text-3); margin-top: .3rem; }
.card.ok .v { color: var(--ok); }
.card.warn .v { color: var(--warn); }
.card.danger .v { color: var(--danger); }
.card.coral { border-color: var(--border-warm); }
.card.coral .v { color: var(--accent-2); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .18rem .6rem;
  border-radius: 999px;
  background: var(--glass-1);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}
.pill.ok      { background: rgba(16, 185, 129, .12); color: var(--ok);     border-color: rgba(16,185,129,.3); }
.pill.warn    { background: rgba(245, 158, 11, .14); color: var(--warn);   border-color: rgba(245,158,11,.3); }
.pill.danger  { background: rgba(239, 68, 68, .14);  color: var(--danger); border-color: rgba(239,68,68,.3); }
.pill.info    { background: rgba(99, 102, 241, .12); color: var(--accent); border-color: rgba(99,102,241,.3); }
.pill.coral   { background: rgba(244, 63, 94, .12); color: var(--accent-2); border-color: rgba(244,63,94,.3); }

/* ---------- progress bar ---------- */
.bar {
  width: 100%; height: 6px;
  background: var(--glass-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block; height: 100%;
  background: var(--grad-accent);
  border-radius: 999px;
  transition: width .5s ease;
}
.bar.warn > span { background: linear-gradient(90deg, var(--warn) 0%, #d97706 100%); }
.bar.danger > span { background: var(--grad-danger); }

/* ---------- tables ---------- */
table.tight { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tight th, table.tight td {
  padding: .55rem .65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.tight th { color: var(--text-3); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
table.tight tr:last-child td { border-bottom: 0; }
table.tight tr:hover td { background: var(--glass-tint); }
table.tight .right { text-align: right; }

/* ---------- flash ---------- */
.flash { padding: .6rem .8rem; border-radius: var(--r-sm); margin-bottom: .6rem; font-size: .9rem; }
.flash.ok  { background: rgba(16, 185, 129, .12); color: var(--ok);     border: 1px solid rgba(16,185,129,.3); }
.flash.err { background: rgba(239, 68, 68, .12);  color: var(--danger); border: 1px solid rgba(239,68,68,.3); }
.flash.warn{ background: rgba(245, 158, 11, .12); color: var(--warn);   border: 1px solid rgba(245,158,11,.3); }
.flash.info{ background: rgba(99, 102, 241, .12); color: var(--accent); border: 1px solid rgba(99,102,241,.3); }

/* ---------- utility ---------- */
.flex { display: flex; align-items: center; gap: .5rem; }
.between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.row { display: flex; gap: .5rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.tight { padding: 0; }
.kvrow { display: grid; grid-template-columns: 2fr 1.5fr 1fr auto; align-items: center; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.kvrow:last-child { border-bottom: 0; }
.kvrow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kvrow .right { text-align: right; }
.kvrow .small-text { font-size: .8rem; }
.kvrow:hover { background: var(--glass-tint); }

.site-health-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin: 0 .35rem; transition: background-color .25s ease; }
.site-health-dot.ok      { background: var(--ok); box-shadow: 0 0 8px rgba(16,185,129,.5); }
.site-health-dot.warn    { background: var(--warn); box-shadow: 0 0 8px rgba(245,158,11,.5); }
.site-health-dot.danger  { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,.5); }
.site-health-dot.unknown { background: #aaa; }

/* ---------- hero (landing) ---------- */
.hero {
  padding: 4rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; gap: 2rem; } }
.hero h1 {
  font-size: 3.4rem;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p.lead { font-size: 1.15rem; color: var(--text-2); max-width: 540px; line-height: 1.55; }
.hero .cta { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-art {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 360px;
}

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .app > aside { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .app aside nav { flex-direction: row; flex-wrap: wrap; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  main { padding: 1rem; }
  .hero h1 { font-size: 2.2rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}