/* ==========================================================================
   REDCRITT · CYBER-DARK OBSIDIAN & HERO 8 PRO DESIGN SYSTEM
   Inspirado en la estética de alto contraste Hero 8 Black y el dashboard
   SaaS moderno Lunor: Paleta obsidiana, sidebar profesional con selector de
   workspace, tarjetas con iconos en capas, gráficos con línea continua y
   trazado punteado, avatares agrupados y halos de luz blanca.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Syne', -apple-system, BlinkMacSystemFont, "Space Grotesk", sans-serif;
  --font-tech: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Obsidian / Charcoal Palette */
  --bg-deep: #090a0d;
  --bg-surface: #0f1117;
  --bg-sidebar: #0b0c10;
  --bg-card: #12141a;
  --bg-card-hover: #171a22;
  --bg-card-alt: rgba(18, 20, 26, 0.7);
  --bg-elevated: #161922;
  --bg-input: #0b0d12;

  /* High-Contrast Luminous Accents */
  --glow-white: #ffffff;
  --glow-halo: 0 0 25px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.35);
  --glow-subtle: 0 0 15px rgba(255, 255, 255, 0.25);
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.4);

  /* Text & Labels */
  --text-main: #ffffff;
  --text-secondary: #8e95a5;
  --text-tertiary: #505664;
  --text-inverse: #000000;

  /* Status & Folder Accent Colors */
  --folder-blue: #3b82f6;
  --folder-grey: #6b7280;
  --folder-yellow: #eab308;
  --accent-cyan: #00f0ff;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;

  /* Borders & Glass */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: #1d212b;
  --border-luminous: rgba(255, 255, 255, 0.25);
  --glass-blur: blur(24px);

  /* Layout */
  --side-w: 270px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-pill: 9999px;

  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.07), transparent 75%),
    linear-gradient(to bottom, #07080b, #090a0e);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Typography & Titles ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-tech);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: var(--glow-halo);
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: capitalize;
}

.breadcrumb-bar svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-secondary);
}

.welcome-title {
  font-family: var(--font-tech);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 20px;
}

.large-title {
  font-family: var(--font-tech);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  padding: 6px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.large-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 10px #ffffff;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin: -8px 0 20px;
}

.section-title {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-medium), transparent);
}

/* ---------- Reference Banner (GoPro Hero 8 Black Style) ---------- */
.hero-promo-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 19, 26, 0.95), rgba(8, 10, 14, 0.98));
  border: 1px solid var(--border-medium);
  border-radius: var(--r-l);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-promo-banner::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 30%;
  width: 40%;
  height: 180%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-brand-badge {
  background: #fff;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.hero-subnav {
  display: flex;
  gap: 18px;
}

.hero-subnav a {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.hero-subnav a:hover, .hero-subnav a.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-center-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-center-grid {
    grid-template-columns: 1.2fr 1.6fr 1.2fr;
  }
}

.hero-left-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-left-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-action-link {
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid #fff;
  padding-bottom: 4px;
  width: fit-content;
}

.hero-specs-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.hero-spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
}

.hero-spec-item svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  stroke-width: 1.6;
  opacity: 0.9;
}

/* Giant Center Element "REDCRITT 8 PRO" */
.hero-centerpiece {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 10px 0;
}

.hero-word {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #fff;
}

.hero-giant-num {
  font-family: var(--font-display);
  font-size: clamp(60px, 9vw, 100px);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 20px #ffffff, 0 0 50px rgba(255, 255, 255, 0.8), 0 0 90px rgba(255, 255, 255, 0.4);
  position: relative;
  display: inline-block;
}

.hero-giant-num::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  z-index: -1;
  animation: pulse-halo 4s infinite alternate ease-in-out;
}

@keyframes pulse-halo {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.hero-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-m);
  padding: 16px;
}

@media (min-width: 900px) {
  .hero-right-col {
    align-items: flex-end;
    text-align: right;
  }
}

.mod-title {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.mod-desc {
  font-size: 12px;
  color: #d1d5db;
  line-height: 1.4;
}

.hero-preview-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.slider-btn {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.slider-btn:hover {
  color: #fff;
}

.slider-thumb-box {
  position: relative;
  width: 90px;
  height: 56px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.play-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 10px;
  box-shadow: 0 0 12px #ffffff;
}

/* ---------- App Layout & Sidebar (Matching Lunor UI Image 2) ---------- */
.app {
  min-height: 100vh;
}

.main {
  padding: calc(var(--safe-t) + 16px) 20px calc(var(--tab-h) + var(--safe-b) + 32px);
  max-width: 1320px;
  margin: 0 auto;
}

/* Sidebar Styling directly matching Image 2 */
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: flex;
  overflow-x: auto;
  padding: 8px 6px calc(var(--safe-b) + 6px);
  background: var(--bg-sidebar);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border-medium);
}

.tab {
  flex: 1;
  min-width: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.active {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}

.sidebar-workspace-btn {
  display: none;
}

@media (min-width: 960px) {
  .main {
    margin-left: var(--side-w);
    padding: 28px 40px 64px;
    max-width: 1380px;
  }
  .navbar {
    display: none;
  }
  .tabbar {
    inset: 0 auto 0 0;
    width: var(--side-w);
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 16px 20px;
    border-top: none;
    border-right: 1px solid var(--border-medium);
    gap: 4px;
  }

  /* Workspace Selector Pill at the Top (Image 2 Lunor style) */
  .sidebar-workspace-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    background: #12141a;
    border: 1px solid #1f232e;
    border-radius: var(--r-m);
    color: #fff;
    cursor: pointer;
    margin-bottom: 12px;
    transition: border-color 0.2s, background 0.2s;
  }
  .sidebar-workspace-btn:hover {
    border-color: #333a4a;
    background: #161922;
  }
  .sidebar-workspace-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
  }
  .sidebar-workspace-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #a1a1aa);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  }

  /* Search Bar (Image 2 style) */
  .sidebar-search {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
  }
  .sidebar-search input {
    width: 100%;
    background: #111319;
    border: 1px solid var(--border-medium);
    border-radius: var(--r-s);
    padding: 8px 32px 8px 30px;
    font-size: 13px;
    color: #fff;
  }
  .sidebar-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-tertiary);
  }
  .sidebar-search .key-badge {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-tech);
    font-size: 11px;
    color: var(--text-tertiary);
    background: #181b24;
    border: 1px solid #242936;
    padding: 1px 5px;
    border-radius: 4px;
  }

  .tab {
    flex: none;
    flex-direction: row;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--r-s);
    color: var(--text-secondary);
  }
  .tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
  }
  .tab.active {
    background: #171922;
    color: #ffffff;
    font-weight: 600;
    border: 1px solid #232836;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
  .tab.active svg {
    stroke: #ffffff;
  }
  .tabbar .spacer {
    flex: 1;
  }

  /* Folders Section (Image 2 style) */
  .sidebar-folders-title {
    font-family: var(--font-tech);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 16px 12px 6px;
  }
  .sidebar-folder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: var(--r-s);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
  }
  .sidebar-folder-row:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
  }
  .sidebar-folder-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .folder-color-icon {
    width: 12px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
  }
  .folder-color-icon.blue { background: var(--folder-blue); }
  .folder-color-icon.grey { background: var(--folder-grey); }
  .folder-color-icon.yellow { background: var(--folder-yellow); }

  /* Upgrade Card in Sidebar (Image 2 style) */
  .sidebar-upgrade-card {
    background: #111319;
    border: 1px solid #1e222d;
    border-radius: var(--r-m);
    padding: 14px;
    margin-top: 14px;
    position: relative;
  }
  .upgrade-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .upgrade-logo-box {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #1c202a;
    border: 1px solid #2a303f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
  }
  .upgrade-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
  }
  .upgrade-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .upgrade-btn {
    width: 100%;
    padding: 8px;
    font-family: var(--font-tech);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #1a1d26;
    border: 1px solid #2a303f;
    border-radius: var(--r-s);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
  }
  .upgrade-btn:hover {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 12px #ffffff;
  }
}

/* ---------- Stat Cards Matching Image 2 (Active Contracts style) ---------- */
.stat-card-lunor {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-m);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card-lunor:hover {
  border-color: #2b3140;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.stat-card-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-card-number {
  font-family: var(--font-tech);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Stacked layered icon in top-right of card (like Image 2) */
.stat-card-graphic {
  width: 48px;
  height: 48px;
  background: #161922;
  border: 1px solid #232836;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px -4px 0 -1px #1d222e, 8px -8px 0 -2px #262c3c;
}
.stat-card-graphic svg {
  width: 22px;
  height: 22px;
  stroke: #a1a1aa;
}

/* ---------- Main Chart Card Matching Image 2 (Signed over time) ---------- */
.chart-card-lunor {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-m);
  padding: 24px;
  margin-top: 20px;
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.chart-card-title {
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.chart-card-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-line-solid {
  width: 16px;
  height: 2px;
  background: #ffffff;
  display: inline-block;
  box-shadow: 0 0 6px #fff;
}
.legend-line-dashed {
  width: 16px;
  height: 2px;
  border-top: 2px dashed #6b7280;
  display: inline-block;
}

/* ---------- Grid of Cards Matching Image 2 (Your Contacts style) ---------- */
.contact-card-lunor {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-m);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}
.contact-card-lunor:hover {
  border-color: #2b3140;
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.contact-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contact-folder-icon {
  width: 44px;
  height: 34px;
  background: #181b24;
  border: 1px solid #282e3d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
/* Avatar stack e.g. 240+ 👤👤👤 */
.avatar-stack-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.avatar-stack-imgs {
  display: flex;
  align-items: center;
}
.avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #12141a;
  margin-left: -6px;
  object-fit: cover;
}
.avatar-circle:first-child {
  margin-left: 0;
}

.contact-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}
.contact-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.contact-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.btn-card-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: #181b24;
  border: 1px solid #282e3d;
  border-radius: var(--r-s);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-card-action:hover {
  background: #ffffff;
  color: #000;
  box-shadow: 0 0 10px #ffffff;
}

/* ---------- General Cards & Lists ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-m);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.split { grid-template-columns: 1fr 1fr; }
}

/* Metricool Heatmap & Badges */
.heatmap-container { overflow-x: auto; margin-top: 16px; padding-bottom: 8px; }
.heatmap-table { width: 100%; border-collapse: separate; border-spacing: 4px; font-family: var(--font-tech); }
.heatmap-table th { font-size: 11px; color: var(--text-secondary); font-weight: 600; padding: 4px; text-align: center; }
.heatmap-table td { height: 28px; min-width: 28px; border-radius: 4px; text-align: center; font-size: 10px; font-weight: 700; cursor: pointer; transition: transform 0.15s; }
.heatmap-table td:hover { transform: scale(1.15); box-shadow: 0 0 10px #fff; z-index: 2; }
.heat-0 { background: rgba(255, 255, 255, 0.04); color: transparent; }
.heat-1 { background: rgba(37, 99, 235, 0.25); color: #93c5fd; }
.heat-2 { background: rgba(16, 185, 129, 0.35); color: #a7f3d0; }
.heat-3 { background: rgba(245, 158, 11, 0.5); color: #fde68a; }
.heat-4 { background: #ffffff; color: #000000; box-shadow: 0 0 12px #ffffff; font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--border-medium);
}
.badge.hot { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.4); }
.badge.green { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }

/* Buttons */
.btn {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-s);
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { background: #f0f0f0; box-shadow: 0 0 25px rgba(255, 255, 255, 0.7); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: #161922; color: #ffffff; border: 1px solid var(--border-medium); box-shadow: none; }
.btn.secondary:hover { background: #1e222e; border-color: #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.2); }
.btn.small { padding: 7px 12px; font-size: 11px; }
.btn.block { width: 100%; }
.btn.plain { background: none; border: none; color: var(--text-secondary); box-shadow: none; padding: 6px; }
.btn.plain:hover { color: #ffffff; }

.list {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-m);
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: inherit;
  text-decoration: none;
  width: 100%;
  text-align: left;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  transition: background 0.15s;
}
.row:last-child { border-bottom: none; }
.row:hover { background: rgba(255, 255, 255, 0.03); }
.icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #181b24;
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14px; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.row .trail { font-family: var(--font-tech); font-weight: 700; font-size: 13px; color: #ffffff; }

/* Forms & Inputs */
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-family: var(--font-tech); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 13px;
  color: #ffffff;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-s);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.2); }

/* Sheets & Scrim */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 100;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-luminous);
  border-radius: 20px 20px 0 0;
  padding: 24px 24px calc(var(--safe-b) + 32px);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  transform: translateY(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet.open { transform: translateY(0); }
.sheet .grabber { width: 44px; height: 4px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; margin: 0 auto 18px; }
@media (min-width: 768px) {
  .sheet {
    inset: auto auto 50% 50%;
    transform: translate(-50%, calc(-50% + 40px)) scale(0.96);
    border-radius: var(--r-m);
    border: 1px solid var(--border-luminous);
    width: 660px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
}
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.scrim.open { opacity: 1; pointer-events: auto; }

.chart-box { height: 260px; position: relative; }
.legal-links { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 36px; }
.legal-links a { color: var(--text-secondary); text-decoration: none; }
.legal-links a:hover { color: #fff; }


/* ==========================================================================
   REDCRITT ANIMATIONS & INTERACTIVE MOTION ENGINE
   ========================================================================== */

/* Keyframe Definitions */
@keyframes redcrittFadeUp {
  0% {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes redcrittScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes redcrittGlowBreathe {
  0%, 100% {
    text-shadow: 0 0 15px #ffffff, 0 0 35px rgba(255, 255, 255, 0.7), 0 0 70px rgba(255, 255, 255, 0.3);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 25px #ffffff, 0 0 55px rgba(255, 255, 255, 0.95), 0 0 100px rgba(255, 255, 255, 0.55);
    transform: scale(1.02);
  }
}

@keyframes redcrittNeonPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.25);
  }
}

@keyframes redcrittShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes redcrittFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes redcrittRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes redcrittScanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(1000%); }
}

/* Staggered Page Load Animations */
.breadcrumb-bar, .welcome-title {
  animation: redcrittFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card-lunor {
  animation: redcrittFadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s, box-shadow 0.28s;
}
.stat-card-lunor:nth-child(1) { animation-delay: 0.05s; }
.stat-card-lunor:nth-child(2) { animation-delay: 0.10s; }
.stat-card-lunor:nth-child(3) { animation-delay: 0.15s; }
.stat-card-lunor:nth-child(4) { animation-delay: 0.20s; }

.stat-card-lunor:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-promo-banner {
  animation: redcrittScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, border-color 0.35s;
}
.hero-promo-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 255, 255, 0.1);
}

.hero-giant-num {
  animation: redcrittGlowBreathe 3.5s ease-in-out infinite;
  display: inline-block;
  will-change: transform, text-shadow;
}

.chart-card-lunor {
  animation: redcrittFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}
.chart-card-lunor:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
}

.contact-card-lunor {
  animation: redcrittFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s, box-shadow 0.28s, background 0.28s;
  position: relative;
  overflow: hidden;
}
.contact-card-lunor:nth-child(1) { animation-delay: 0.30s; }
.contact-card-lunor:nth-child(2) { animation-delay: 0.36s; }
.contact-card-lunor:nth-child(3) { animation-delay: 0.42s; }
.contact-card-lunor:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 255, 255, 0.12);
}

.row {
  animation: redcrittFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, padding-left 0.2s;
}
.row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

/* Button & Interactive Hover Ripple */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 8px 20px rgba(0, 0, 0, 0.4);
}
.btn:active {
  transform: scale(0.96);
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: redcrittRipple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Spotlight Card Effect (follows mouse cursor) */
.stat-card-lunor::before,
.contact-card-lunor::before,
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}
.stat-card-lunor:hover::before,
.contact-card-lunor:hover::before,
.card:hover::before {
  opacity: 1;
}

/* Heatmap Table Cell Micro-Animations */
.heatmap-table td {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, filter 0.2s;
}
.heatmap-table td:hover {
  transform: scale(1.35);
  box-shadow: 0 0 16px #ffffff, 0 4px 12px rgba(0,0,0,0.8);
  filter: brightness(1.2);
  z-index: 10;
}

/* Animated Story Progress Bars */
.story-bars div {
  position: relative;
  overflow: hidden;
}
.story-bars div.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: storyProgress 5s linear forwards;
}
@keyframes storyProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* AI Generation Scanner Animation */
.ai-loading-scanner {
  position: relative;
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-m);
  overflow: hidden;
}
.ai-loading-scanner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, var(--accent-cyan), transparent);
  box-shadow: 0 0 15px #ffffff, 0 0 25px var(--accent-cyan);
  animation: redcrittScanline 1.8s ease-in-out infinite;
}
