/* ============================================================
   ROMAIN Landing Page — Dark theme aligned with ROMAIN app
   Brand: Red #CF022B · Orange #F07D00 · Dark #0a0a14
   ============================================================ */

/* --- Fonts --- */
@font-face {
  font-family: "DM Sans";
  src: url("../dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../space-grotesk-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --dark-bg:       #0a0a14;
  --dark-panel:    rgba(16, 12, 26, 0.60);
  --dark-line:     rgba(255, 255, 255, 0.08);

  --ink-light:     rgba(255, 255, 255, 0.90);
  --muted-light:   rgba(255, 255, 255, 0.55);

  /* SSG brand */
  --accent:        #4d1d82;
  --accent-warm:   #f07d00;
  --ssg-red:       #cf022b;
  --accent-mag:    #8b1d82;

  /* Gradients */
  --gradient-main:    linear-gradient(to right, #4d1d82 0%, #8b1d82 10%, #cf022b 60%, #f07d00 100%);
  --gradient-sidebar: linear-gradient(160deg, #2a1449 0%, #4d1d82 60%, #8b1d82 100%);

  /* Light panel (for mockup shell) */
  --panel:  #ffffff;
  --bg-app: #f5f7fb;
  --line:   #e1e7ef;
  --ink:    #0b1b2b;
  --muted:  #56697a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   22px;
  --radius-pill: 999px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  height: 100%;
  overflow-x: clip;
  max-width: 100vw;
}

/* ============================================================
   DARK PAGE BACKGROUND — matching ROMAIN login aesthetic
   ============================================================ */

body {
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;

  background: var(--dark-bg);
  background-image:
    radial-gradient(ellipse 75% 60% at 5%  0%,  rgba(207, 2,  43,  0.35) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 95% 95%, rgba(240, 125, 0,  0.22) 0%, transparent 52%),
    radial-gradient(ellipse 45% 35% at 55% 45%, rgba(77,  29,  130, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 75% 10%, rgba(240, 125, 0,  0.09) 0%, transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Animated background orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float-orb 20s ease-in-out infinite alternate;
}

.orb-red {
  width: 560px; height: 560px;
  top: -150px; left: -120px;
  background: rgba(207, 2, 43, 0.38);
  opacity: 0.4;
  animation-duration: 18s;
}

.orb-orange {
  width: 460px; height: 460px;
  bottom: -100px; right: -80px;
  background: rgba(240, 125, 0, 0.32);
  opacity: 0.38;
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}

.orb-purple {
  width: 320px; height: 320px;
  top: 15%; right: 0;
  background: rgba(77, 29, 130, 0.28);
  opacity: 0.45;
  animation-duration: 28s;
}

@keyframes float-orb {
  0%   { transform: translate(0,  0)   scale(1); }
  100% { transform: translate(30px, -22px) scale(1.10); }
}

/* Everything above the orbs */
body > *:not(.orb):not(.landscape-warning) {
  position: relative;
  z-index: 1;
}

body.is-preload *, body.is-preload *::before, body.is-preload *::after {
  animation: none !important;
  transition: none !important;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

p { line-height: 1.7; }

/* --- Landscape warning --- */
.landscape-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark-bg);
  color: var(--muted-light);
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
  z-index: 100;
}

/* ============================================================
   PAGE LAYOUT — two-column hero
   ============================================================ */

.page-wrapper {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 500px) 1fr;
  gap: 0;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5rem;
  min-height: calc(100vh - 80px);
  align-items: center;
}

.hero-left {
  padding: 3.5rem 3rem 3.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-right {
  padding: 3.5rem 0 3.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   HEADER / BRANDING
   ============================================================ */

.header-logo {
  display: block;
  width: 130px;
  margin-bottom: 1.5rem;
}

#header h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #fff;
}

#header .subtitle {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.7rem, 1.1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
}

#header .subtitle span { font-weight: 700; }

/* Letter colors — brightened for dark background */
.r  { color: #ff4a6a; }
.o  { color: #a78bfa; }
.m  { color: #fb923c; }
.a  { color: #e879f9; }
.ii { color: #a78bfa; }
.n  { color: #ff4a6a; }

/* ============================================================
   HERO COPY
   ============================================================ */

.hero-copy h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.hero-copy p {
  font-size: 0.95rem;
  color: var(--muted-light);
  margin-bottom: 0.35rem;
}

/* ============================================================
   SIGNUP FORM
   ============================================================ */

.form-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.50);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.form-input-wrap {
  flex: 1;
  min-width: 0;
}

/* Email input — glass dark style, no Bootstrap overrides */
#email {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 1.1rem;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  backdrop-filter: blur(8px);
}

#email::placeholder { color: rgba(255, 255, 255, 0.30); }

#email:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(140, 90, 255, 0.15);
}

#email.is-invalid {
  border-color: rgba(255, 74, 106, 0.55);
  background: rgba(255, 74, 106, 0.06);
}

.invalid-feedback {
  font-size: 0.78rem;
  color: #ff7a96;
  margin-top: 0.3rem;
  display: none;
}

/* Submit button */
#signup-form input[type="submit"] {
  flex-shrink: 0;
  height: 52px;
  padding: 0 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
  -webkit-appearance: none;
}

#signup-form input[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

#signup-form input[type="submit"]:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

#signup-form input[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Alerts */
.alert {
  border-radius: var(--radius-sm) !important;
  font-size: 0.88rem !important;
  padding: 0.7rem 1rem !important;
  border-width: 1px !important;
  margin-top: 0.75rem !important;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alert p { margin: 0; }

.alert-success {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.30) !important;
  color: #6ee7b7 !important;
}

.alert-danger {
  background: rgba(255, 74, 106, 0.10) !important;
  border-color: rgba(255, 74, 106, 0.25) !important;
  color: #ff7a96 !important;
  max-width: 100% !important;
}

.alert.fade {
  opacity: 0 !important;
  transform: translateY(6px) !important;
  transition: opacity 0.5s ease, transform 0.5s ease !important;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FEATURE BADGES
   ============================================================ */

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px);
}

.feature-badge i { font-size: 0.82rem; }

/* ============================================================
   MOCKUPS — portal-aligned UI inside dark landing frames
   Palette matches romain-portal (light theme, gradient main
   #6a2bd9 → #b63cff → #ff7a00; sidebar #2b0f55 → #5c22c6 → #ff7a00).
   ============================================================ */

.mockup-shell,
.preview-card-body {
  --p-ink:           #0b1b2b;
  --p-muted:         #56697a;
  --p-line:          #e1e7ef;
  --p-panel:         #ffffff;
  --p-bg:            #f5f7fb;
  --p-accent:        #6a2bd9;
  --p-accent-strong: #4b1e8f;
  --p-warm:          #ff7a00;
  --p-magenta:       #b63cff;
  --p-green:         #059669;
  --p-green-tint:    rgba(16,185,129,0.14);
  --p-orange:        #b45309;
  --p-orange-tint:   rgba(245,158,11,0.18);
  --p-red:           #d71920;
  --p-red-tint:      rgba(215,25,32,0.14);
  --p-blue:          #3b82f6;
  --p-purple:        #8b5cf6;

  --p-grad-main:     linear-gradient(120deg, #6a2bd9 0%, #b63cff 45%, #ff7a00 100%);
  --p-grad-sidebar:  linear-gradient(160deg, #2b0f55 0%, #5c22c6 45%, #ff7a00 120%);
}

/* ---- HERO mockup (right column) ---- */

.app-mockup {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  min-width: 0;
}

.mockup-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.mockup-shell {
  display: flex;
  width: 100%;
  max-width: 100%;
  background: var(--p-panel);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  overflow: hidden;
  color: var(--p-ink);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.mockup-shell:hover {
  transform: translateY(-3px);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255,255,255,0.08) inset;
}

/* Sidebar (portal-style gradient) */
.mockup-sidebar {
  flex-shrink: 0;
  width: 168px;
  background: var(--p-grad-sidebar);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #e2e8f0;
}

.mockup-sidebar-brand {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mockup-ss-logo {
  display: block;
  width: 68px;
  opacity: 0.92;
  margin-bottom: 6px;
  filter: brightness(0) invert(1);
}

.mockup-brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}

.mockup-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mockup-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #cbd5f5;
  white-space: nowrap;
  position: relative;
}

.mockup-nav-item i { font-size: 0.9rem; flex-shrink: 0; }

.mockup-nav-item.active {
  background: rgba(106, 43, 217, 0.34);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

.mockup-nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mockup-user-pill {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-avatar {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: rgba(73, 46, 137, 0.5);
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: #fff;
  flex-shrink: 0;
}

.mockup-user-meta { overflow: hidden; }

.mockup-username {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-user-role {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.5);
}

/* Main content column */
.mockup-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--p-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.mockup-topbar {
  background: var(--p-grad-main);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(106,43,217,0.22);
}

.mockup-topbar-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
}

.mockup-topbar-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mockup-stat-item { text-align: center; }

.mockup-stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.mockup-stat-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
}

.mockup-stat-sep {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.4);
}

.mockup-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-search {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--p-muted);
  box-shadow: 0 6px 14px rgba(17,24,39,0.04);
}

.mockup-search i { font-size: 0.72rem; color: var(--p-muted); }
.mockup-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mockup-chip {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--p-line);
  background: #fff;
  color: var(--p-muted);
  font-size: 0.66rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mockup-chip--active {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
}

.mockup-table {
  background: #fff;
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 12px 28px rgba(17,24,39,0.05);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mockup-thead,
.mockup-trow {
  display: grid;
  grid-template-columns: 68px 1fr 80px 62px 70px;
  gap: 8px;
  align-items: center;
}

.mockup-thead > *,
.mockup-trow > * { min-width: 0; }

.mockup-thead {
  padding: 6px 4px;
  border-bottom: 1px solid var(--p-line);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p-muted);
}

.mockup-th-right { text-align: right; }

.mockup-trow {
  padding: 7px 4px;
  border-bottom: 1px solid var(--p-line);
  font-size: 0.72rem;
  color: #1f2937;
}

.mockup-trow:last-child { border-bottom: none; }

.mockup-ref {
  font-weight: 800;
  color: var(--p-accent);
  font-size: 0.68rem;
  letter-spacing: 0.2px;
}

.mockup-subj {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
}

.mockup-team {
  color: var(--p-muted);
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mockup-ack { text-align: right; }

.mockup-ack-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.16);
  color: var(--p-orange);
  font-size: 0.56rem;
  font-weight: 800;
}

/* Portal-style status pills (used in mockup and preview cards) */
.mockup-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  min-width: 38px;
  text-align: center;
}
.mockup-pill--new    { color: var(--p-green);  background: var(--p-green-tint); }
.mockup-pill--ack    { color: var(--p-orange); background: var(--p-orange-tint); }
.mockup-pill--closed { color: var(--p-red);    background: var(--p-red-tint); }

/* ============================================================
   PREVIEW CARDS (3-up grid below hero)
   ============================================================ */

.previews-section {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 2.5rem 4rem;
}

.previews-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12) 30%, rgba(255,255,255,0.12) 70%, transparent);
  margin-bottom: 2.5rem;
}

.previews-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.previews-heading h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.previews-heading p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
}

.previews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.preview-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.40);
  border-color: rgba(255,255,255,0.14);
}

.preview-card-label {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.preview-card-label i { font-size: 0.9rem; opacity: 0.85; }

.preview-card-body {
  background: var(--p-bg);
  color: var(--p-ink);
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- SHARED PREVIEW TOPBAR (mimics portal page header) ---- */

.pv-topbar {
  background: var(--p-grad-main);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(106,43,217,0.20);
  flex-shrink: 0;
}

.pv-tb-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.pv-tb-ref {
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.5px;
}

.pv-tb-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.pv-tb-chips {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.pv-tb-chip {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72);
  font-size: 0.6rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2);
}

.pv-tb-chip--active {
  background: rgba(255,255,255,0.28);
  color: #fff;
  border-color: rgba(255,255,255,0.42);
}

.pv-tb-pill {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.pv-tb-pill--ack    { background: rgba(255,255,255,0.20); color: #fff; border-color: rgba(255,255,255,0.38); }
.pv-tb-pill--new    { background: rgba(16,185,129,0.30);  color: #a7f3d0; }
.pv-tb-pill--closed { background: rgba(239,68,68,0.30);   color: #fca5a5; }

.pv-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.30);
  white-space: nowrap;
  flex-shrink: 0;
}

.pv-tb-btn i { font-size: 0.78rem; }

/* Colored field values */
.pv-fv--red    { color: var(--p-red);    font-weight: 700; }
.pv-fv--purple { color: var(--p-accent); font-weight: 700; }
.pv-fv--link   { color: var(--p-blue);   font-weight: 700; text-decoration: underline; text-decoration-color: rgba(59,130,246,0.4); }

/* Section titles inside preview cards (icon + label) */
.pv-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--p-ink);
  padding: 2px 0;
  margin-top: 2px;
}
.pv-section-title i {
  color: var(--p-accent);
  font-size: 0.82rem;
}

/* Chart wrappers */
.pv-chart-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- ALERT DETAILS ---- */

.pv-detail-header {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pv-detail-ref-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--p-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-detail-sub {
  font-size: 0.58rem;
  color: var(--p-muted);
  font-weight: 500;
}

.pv-detail-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pv-field {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pv-field-label {
  font-size: 0.52rem;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.pv-field-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--p-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions row (Email / Calls / SMS / Emergency) */
.pv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pv-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(106,43,217,0.10);
  border: 1px solid rgba(106,43,217,0.28);
  color: var(--p-accent);
  font-size: 0.58rem;
  font-weight: 700;
}

.pv-action-pill i { font-size: 0.7rem; }
.pv-action-pill b { font-weight: 800; margin-left: 2px; }

.pv-action-pill--danger {
  background: rgba(215,25,32,0.10);
  border-color: rgba(215,25,32,0.30);
  color: var(--p-red);
}

.pv-timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-height: 0;
}

.pv-timeline {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-tl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.pv-tl-item + .pv-tl-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: -8px;
  height: 8px;
  width: 2px;
  background: var(--p-line);
}

.pv-tl-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.6rem;
  flex-shrink: 0;
}

.pv-tl-dot--blue   { background: var(--p-blue); }
.pv-tl-dot--purple { background: var(--p-purple); }
.pv-tl-dot--green  { background: #10b981; }

.pv-tl-body {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.pv-tl-time {
  font-size: 0.6rem;
  color: var(--p-muted);
  font-weight: 700;
  min-width: 34px;
}

.pv-tl-label {
  font-size: 0.7rem;
  color: var(--p-ink);
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-tl-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.54rem;
  font-weight: 800;
}

/* ---- ANALYTICS ---- */

/* KPI row */
.pv-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pv-kpi {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pv-kpi-label {
  font-size: 0.52rem;
  color: var(--p-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pv-kpi-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--p-ink);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Line charts row (Trends) */
.pv-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pv-line-card {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pv-line-title {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-line-svg {
  width: 100%;
  height: 46px;
  display: block;
}

.pv-line-grid {
  fill: none;
  stroke: rgba(15,23,42,0.06);
  stroke-width: 0.4;
}

.pv-line-a { fill: none; stroke: #f59e0b; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pv-line-b { fill: none; stroke: #10b981; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pv-line-c { fill: none; stroke: #8b5cf6; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pv-line-d { fill: none; stroke: #3b82f6; stroke-width: 1.2; stroke-dasharray: 2 1.5; stroke-linecap: round; }

/* Donut charts row (Distribution) */
.pv-donut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pv-donut-card {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pv-donut {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  position: relative;
}

.pv-donut::after {
  content: '';
  position: absolute;
  inset: 12px;
  background: #fff;
  border-radius: 50%;
}

.pv-donut--team {
  background: conic-gradient(#a78bfa 0 100%);
}

.pv-donut--status {
  background: conic-gradient(#f59e0b 0 96%, #10b981 96% 100%);
}

.pv-donut-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pv-donut-title {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--p-ink);
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-donut-leg {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.54rem;
  color: var(--p-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-donut-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- TEAMS & ON-CALL ---- */

.pv-oncall-meta {
  font-size: 0.6rem;
  color: var(--p-muted);
  font-weight: 600;
  padding: 0 2px;
  margin-top: -2px;
}

.pv-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.pv-cal-day {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 70px;
}

.pv-cal-day--today {
  border-color: rgba(255,122,0,0.85);
  box-shadow: 0 0 0 2px rgba(255,122,0,0.22), 0 8px 16px rgba(255,122,0,0.22);
  background: linear-gradient(145deg, rgba(255,122,0,0.12), rgba(244,63,94,0.08));
}

.pv-cal-dow {
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pv-cal-date {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--p-ink);
  line-height: 1;
}

.pv-cal-chip {
  width: 100%;
  padding: 2px 3px;
  border-radius: 999px;
  background: var(--p-grad-main);
  color: #fff;
  font-size: 0.52rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 3px 8px rgba(15,23,42,0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-cal-chip--warm {
  background: linear-gradient(120deg, var(--p-warm), #f97316);
}

/* Schedule tables (Active / Upcoming) */
.pv-sched-table {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  padding: 4px 10px;
}

.pv-sched-thead,
.pv-sched-trow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 70px;
  gap: 6px;
  align-items: center;
}

.pv-sched-thead {
  padding: 6px 0 5px;
  border-bottom: 1px solid var(--p-line);
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p-muted);
}

.pv-sched-trow {
  padding: 6px 0;
  font-size: 0.62rem;
  color: var(--p-ink);
}

.pv-sched-th-right { text-align: right; }

.pv-sched-team {
  font-weight: 700;
  color: var(--p-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-sched-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-sched-time {
  color: var(--p-muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-teams-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 700;
  border: 1px solid var(--p-line);
  white-space: nowrap;
  display: inline-block;
}

.pv-teams-badge--active   { color: #1f7a2f;        background: rgba(34,197,94,0.14);  border-color: rgba(34,197,94,0.35); }
.pv-teams-badge--upcoming { color: var(--p-orange); background: rgba(245,158,11,0.16); border-color: rgba(245,158,11,0.38); }

/* ============================================================
   FOOTER
   ============================================================ */

#footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.25rem 2.5rem;
  background: transparent;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.30);
}

.footer-logo {
  width: 100px;
  opacity: 0.45;
  transition: opacity 0.2s;
  display: block;
}

.footer-logo:hover { opacity: 0.75; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0 1.75rem;
  }

  .hero-left  { padding: 3rem 0 1.5rem; }
  .hero-right {
    padding: 0 0 2.5rem;
    display: block;        /* replace flex from desktop so mockup fills 100% */
  }

  .previews-section { padding: 0 1.75rem 3.5rem; }
}

@media (max-width: 900px) {
  /* Mockup shrinks a bit + previews go 2-col before stacking */
  .mockup-sidebar { width: 140px; padding: 14px 10px; }
  .mockup-nav-item { font-size: 0.66rem; padding: 6px 8px; }
  .mockup-topbar { padding: 10px 14px; }
  .mockup-topbar-title { font-size: 0.9rem; }
  .mockup-topbar-stats { gap: 8px; }
  .mockup-stat-value { font-size: 0.9rem; }

  .previews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .page-wrapper { padding: 0 1.25rem; }
  .previews-section { padding: 0 1.25rem 3rem; }

  .previews-grid { grid-template-columns: 1fr; gap: 1rem; }

  .hero-left  { padding: 2.5rem 0 1rem; gap: 1.5rem; }
  .hero-right {
    padding: 0 0 2rem;
    display: block;      /* replace flex with block so mockup centers via margin auto */
    text-align: center;
  }

  .app-mockup { text-align: left; }

  #header h1 { font-size: 2.6rem; }

  .form-row { flex-direction: column; }
  #signup-form input[type="submit"] { width: 100%; }

  #footer { padding: 1rem 1.25rem; }
  .footer-inner { flex-direction: column; text-align: center; }

  /* Mockup on tablets/phones: drop sidebar, stack topbar, tighter content */
  .mockup-sidebar { display: none; }

  .mockup-content { padding: 10px; gap: 8px; }
  .mockup-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .mockup-topbar-title { font-size: 0.86rem; }
  .mockup-topbar-stats { width: 100%; justify-content: space-between; gap: 4px; }
  .mockup-stat-value { font-size: 0.9rem; }
  .mockup-stat-label { font-size: 0.5rem; }
  .mockup-stat-sep { height: 20px; }

  /* Alerts table: keep Ref + Subject + Status + Ack, drop 'Person' col */
  .mockup-thead, .mockup-trow {
    grid-template-columns: 62px 1fr 58px 60px;
    gap: 6px;
  }
  .mockup-thead > :nth-child(3),
  .mockup-trow > :nth-child(3) { display: none; }
  .mockup-search { padding: 6px 10px; font-size: 0.62rem; }
  .mockup-chip { padding: 3px 8px; font-size: 0.6rem; }

  /* Preview cards on phones */
  .pv-detail-fields { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pv-kpi-row { grid-template-columns: 1fr 1fr; }
  .pv-kpi:last-child { grid-column: 1 / -1; }
  .pv-donut-row { grid-template-columns: 1fr; }
  .pv-chart-row { grid-template-columns: 1fr; }
  .pv-sched-thead, .pv-sched-trow {
    grid-template-columns: 1fr 1fr 1fr 62px;
    gap: 4px;
    font-size: 0.58rem;
  }
  /* Preview cards topbar: chips can wrap on tight screens */
  .pv-topbar { flex-wrap: wrap; padding: 8px 12px; }
  .pv-tb-chips { flex-wrap: wrap; }
  /* Center features on mobile so 'Audit'/'Activity' don't feel cut off */
  .features { justify-content: flex-start; }
}

@media (max-width: 480px) {
  /* Very small phones */
  #header h1 { font-size: 2rem; letter-spacing: 2px; }
  #header .subtitle { font-size: 0.62rem; letter-spacing: 0.08em; }

  .mockup-topbar-stats { justify-content: flex-start; gap: 8px; }
  .mockup-topbar-stats .mockup-stat-sep { display: none; }
  .mockup-stat-value { font-size: 0.82rem; }
  .mockup-stat-label { font-size: 0.46rem; }
  .mockup-thead, .mockup-trow {
    grid-template-columns: 58px 1fr 54px;
    gap: 5px;
  }
  .mockup-thead > :nth-child(4),
  .mockup-trow > :nth-child(4) { display: none; } /* hide Status */

  .pv-detail-fields { grid-template-columns: 1fr 1fr; }
  .pv-cal { grid-template-columns: repeat(4, 1fr); }
  .pv-cal-day:nth-child(n+5) { display: none; }
  /* Alert details: hide phone field (too long on very tight screens) */
  .pv-detail-fields .pv-field:nth-child(5) { display: none; }
}