:root {
  --color-bg: #f8fafc;
  --color-card: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-primary: #1f3a5f;
  --color-accent: #2e5aac;
  --color-accent-hover: #264c91;
  --color-accent-tint: rgba(46, 90, 172, 0.12);
  --color-accent-soft: rgba(46, 90, 172, 0.06);
  --color-accent-ring: rgba(46, 90, 172, 0.2);
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;
  --color-success-tint: rgba(34, 197, 94, 0.14);
  --color-warning-tint: rgba(234, 179, 8, 0.16);
  --color-danger-tint: rgba(239, 68, 68, 0.14);
  --color-overlay: rgba(15, 23, 42, 0.35);
  --color-placeholder: rgba(100, 116, 139, 0.8);
  --color-noise-light: rgba(255, 255, 255, 0.06);
  --color-noise-clear: rgba(255, 255, 255, 0);
  --color-noise-dark: rgba(0, 0, 0, 0.02);
  --color-page-bg: #eef4ff;
  --color-nav-bg: #1f3a5f;
  --color-nav-text: #eaf0fa;
  --color-nav-hover: #ffffff;
  --color-nav-pill-bg: rgba(255, 255, 255, 0.14);
  --color-nav-border: rgba(255, 255, 255, 0.1);
  --color-nav-button-border: rgba(255, 255, 255, 0.35);
  --color-nav-button-hover: rgba(255, 255, 255, 0.1);
  --color-panel-bg: #f3f7ff;
  --shadow-card: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 24px rgba(15, 23, 42, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 24px rgba(15, 23, 42, 0.14);
  --surface: var(--color-card);
  --surface-muted: var(--color-panel-bg);
  --border: var(--color-border);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --navy: var(--color-primary);
  --blue: var(--color-accent);
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --app-shell-max-width: 1460px;
}

/* =========================
   Buttons (Bevel / 3D)
   ========================= */

:root {
  --btn-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --btn-radius: 999px;
  --btn-shadow: 0 14px 30px rgba(10, 30, 70, 0.18), 0 2px 6px rgba(10, 30, 70, 0.10);
  --btn-shadow-hover: 0 18px 44px rgba(10, 30, 70, 0.22), 0 6px 14px rgba(10, 30, 70, 0.14);
  --btn-ring: 0 0 0 4px rgba(35, 96, 255, 0.22);

  /* Brand-ish blues (tune if your existing theme uses different tokens) */
  --btn-blue-900: #0b2a57;
  --btn-blue-800: #0f3a77;
  --btn-blue-700: #1a55a6;
  --btn-blue-600: #2563eb;

  --btn-gray-900: #0f172a;
  --btn-gray-200: #e5e7eb;
  --btn-gray-100: #f3f4f6;
}

/* Base */
.btn {
  -webkit-tap-highlight-color: transparent;
  font-family: var(--btn-font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  padding: 0.75rem 1.05rem;
  min-height: 44px;

  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  user-select: none;
  cursor: pointer;

  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  box-shadow: var(--btn-shadow);
  position: relative;
  outline: none;
}

/* Bevel highlight layer */
.btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--btn-radius) - 2px);
  pointer-events: none;
  opacity: 0.95;

  /* top bevel shine */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.15) 40%, rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light;
}

/* Active “press” */
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 10px 22px rgba(10, 30, 70, 0.16), 0 2px 6px rgba(10, 30, 70, 0.10);
}

/* Hover */
.btn:hover {
  box-shadow: var(--btn-shadow-hover);
  filter: saturate(1.05);
}

/* Focus */
.btn:focus-visible {
  outline: none;
  box-shadow: var(--btn-shadow-hover), var(--btn-ring);
}

/* Disabled */
.btn[disabled],
.btn.btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Sizes */
.btn--sm {
  padding: 0.55rem 0.85rem;
  min-height: 38px;
  font-size: 0.95rem;
}

.btn--md {
  padding: 0.75rem 1.05rem;
  min-height: 44px;
  font-size: 1rem;
}

.btn--lg {
  padding: 0.95rem 1.25rem;
  min-height: 52px;
  font-size: 1.05rem;
}

/* Variants */
.btn--primary {
  color: white;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, var(--btn-blue-700), var(--btn-blue-900));
}

.btn--primary:hover {
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, var(--btn-blue-600), var(--btn-blue-900));
}

.btn--secondary {
  color: var(--btn-blue-900);
  border-color: rgba(15, 58, 119, 0.18);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff, #eef4ff);
}

.btn--secondary:hover {
  border-color: rgba(15, 58, 119, 0.26);
}

.btn--ghost {
  color: var(--btn-blue-900);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(15, 58, 119, 0.14);
  box-shadow: 0 10px 20px rgba(10, 30, 70, 0.10);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 14px 30px rgba(10, 30, 70, 0.14);
}

.btn--danger {
  color: white;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ef4444, #991b1b);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:hover {
    filter: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-page-bg);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* SPA shell for sticky footer behavior. */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

body.animated-bg-mode {
  /* Keep layering predictable for pseudo-elements. */
  isolation: isolate;
  --auth-bg-intensity: 1;
  --auth-particle-opacity-mult: 1;
  --auth-scanline-opacity: 0.1;
  --animated-bg-gradient: linear-gradient(180deg, #ffffff 0%, #eef5ff 25%, #c7dcff 52%, #3a70ff 82%, #0b2cff 100%);
  /* Fallback in case JS doesn't mount the animated auth background. */
  background: var(--animated-bg-gradient);
}

body.animated-bg-auth {
  --animated-bg-gradient: linear-gradient(180deg, #ffffff 0%, #eef5ff 25%, #c7dcff 52%, #3a70ff 82%, #0b2cff 100%);
}

body.animated-bg-mode.auth-bg-debug {
  --auth-bg-intensity: 1.25;
  --auth-particle-opacity-mult: 1.25;
  --auth-scanline-opacity: 0.16;
}

body.animated-bg-mode .layout,
body.animated-bg-mode .topbar {
  position: relative;
  z-index: 3;
}

body.animated-bg-mode .noise {
  /* Keep auth background crisp and prevent overlays from hiding animation. */
  display: none;
}

/* Shared static gradient background for app data pages (dashboard/archive/account). */
body.app-page-bg {
  isolation: isolate;
  --app-page-gradient: linear-gradient(180deg, #ffffff 0%, #f3f8ff 28%, #dbeaff 56%, #9bc4ff 82%, #7aabf8 100%);
}

body.app-page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--app-page-gradient);
}

body.app-page-bg .layout,
body.app-page-bg .app-footer {
  position: relative;
  z-index: 3;
}

body.app-page-bg .topbar {
  position: relative;
  z-index: 80;
}

body.app-page-bg .noise {
  display: none;
}

body.home-page {
  min-height: 100vh;
  color: #102747;
  --auth-particle-opacity-mult: 0.46;
  --auth-scanline-opacity: 0.045;
  --animated-bg-base-opacity: 0.76;
}

body.home-page .home-shell {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.home-page .home-nav,
body.home-page .home-main {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
}

.home-nav {
  position: sticky;
  top: 14px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 51, 95, 0.13);
  background: rgba(247, 252, 255, 0.76);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(10, 42, 90, 0.14);
}

.home-nav.legal-home-nav {
  position: static;
  top: auto;
  margin-top: 0;
  margin-bottom: 16px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #10335f;
  text-decoration: none;
}

.home-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(16, 51, 95, 0.16);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 26px rgba(21, 61, 126, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-brand-mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.home-brand-copy {
  display: inline-grid;
  line-height: 1.12;
}

.home-brand-copy strong {
  font-size: 18px;
}

.home-brand-copy small {
  font-size: 11px;
  color: #4e6588;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-link {
  color: #1b4278;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.home-link:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(18, 54, 96, 0.14);
}

.home-link:focus-visible {
  outline: 2px solid rgba(31, 79, 150, 0.45);
  outline-offset: 2px;
}

.home-main {
  display: grid;
  gap: 22px;
  padding: 22px 0 46px;
  flex: 1 0 auto;
}

/* =========================
   Premium Surfaces (Opaque 3D Bevel)
   ========================= */

:root{
  --surface-radius-xl: 28px;
  --surface-radius-lg: 22px;

  /* Opaque fill */
  --surface-fill-top: #ffffff;
  --surface-fill-mid: #fbfdff;
  --surface-fill-bot: #f3f7ff;

  /* Borders */
  --surface-border: rgba(20, 60, 120, .16);
  --surface-border-soft: rgba(20, 60, 120, .10);

  /* Outer shadow (lift) */
  --surface-shadow:
    0 26px 60px rgba(10, 30, 70, .18),
    0 10px 22px rgba(10, 30, 70, .10);

  --surface-shadow-hover:
    0 34px 78px rgba(10, 30, 70, .22),
    0 14px 30px rgba(10, 30, 70, .12);

  /* Inner bevel (depth) */
  --bevel-top: inset 0 1px 0 rgba(255,255,255,.95);
  --bevel-top-2: inset 0 10px 18px rgba(255,255,255,.75);
  --bevel-bottom: inset 0 -14px 22px rgba(10, 30, 70, .08);
  --bevel-sides: inset 12px 0 18px rgba(255,255,255,.55),
                 inset -12px 0 20px rgba(10, 30, 70, .04);
}

/* Large containers / sections */
.surface{
  position: relative;
  border-radius: var(--surface-radius-xl);

  /* OPAQUE panel — no glass */
  background: linear-gradient(180deg, var(--surface-fill-top) 0%, var(--surface-fill-mid) 45%, var(--surface-fill-bot) 100%);

  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow), var(--bevel-top), var(--bevel-top-2), var(--bevel-bottom), var(--bevel-sides);

  /* IMPORTANT: remove glass blur */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  overflow: hidden;
}

/* Subtle top sheen — not transparent/glassy */
.surface::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.55;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%);
}

/* Very light corner shading (kept subtle) */
.surface::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.25;
  background: radial-gradient(120% 120% at 85% 90%, rgba(20, 60, 120, .10), rgba(20, 60, 120, 0) 55%);
}

.surface-pad{
  position: relative;
  padding: 28px;
}
@media (max-width: 860px){
  .surface-pad{ padding: 18px; }
}

/* Optional tighter version */
.surface--tight{
  border-radius: var(--surface-radius-lg);
}

/* Inner tiles (feature rows / steps) — also OPAQUE + bevel */
.tile{
  position: relative;
  border-radius: 18px;

  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 55%, #f4f8ff 100%);
  border: 1px solid var(--surface-border-soft);

  box-shadow:
    0 12px 26px rgba(10, 30, 70, .12),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -10px 16px rgba(10, 30, 70, .07);

  overflow: hidden;
}

.tile::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.45;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0) 46%);
}

.tile-hover{
  transition: transform .14s ease, box-shadow .18s ease;
}
.tile-hover:hover{
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(10, 30, 70, .14),
    inset 0 1px 0 rgba(255,255,255,.97),
    inset 0 -10px 16px rgba(10, 30, 70, .07);
}

@media (prefers-reduced-motion: reduce){
  .tile-hover{ transition: none; }
  .tile-hover:hover{ transform: none; }
}

.home-hero {
  border-radius: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
}

.home-hero-copy {
  max-width: 560px;
}

.home-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 700;
  color: #345987;
}

.home-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4.3vw, 3.45rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #0f2f57;
  max-width: 12ch;
}

.home-subhead {
  margin: 14px 0 0;
  color: #3f587c;
  max-width: 54ch;
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.55;
}

.home-cta-row {
  margin-top: 22px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-cta {
  margin-top: 24px;
}

.home-trust-line {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: #3f5f8a;
  font-weight: 500;
}

.home-hero-visual {
  display: flex;
  justify-content: flex-end;
}

.home-shot-frame {
  width: min(600px, 100%);
  border-radius: 22px;
  padding: 12px;
  border: 1px solid rgba(19, 55, 99, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(231, 244, 255, 0.92));
  box-shadow: 0 36px 74px rgba(12, 45, 94, 0.24);
  animation: homeShotFloat 8s ease-in-out infinite;
}

.home-shot {
  display: block;
  width: 100%;
  border-radius: 15px;
  border: 1px solid rgba(18, 54, 96, 0.16);
}

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

.home-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.home-panel {
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.home-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.home-panel-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(31, 79, 150, 0.18);
  background: rgba(61, 124, 219, 0.14);
  color: #1f4f96;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-panel-badge svg {
  width: 20px;
  height: 20px;
}

.home-panel-badge-lock {
  background: rgba(49, 118, 215, 0.18);
}

.home-panel-copy h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
  color: #102f59;
}

.home-panel-copy p {
  margin: 8px 0 0;
  color: #3f5d86;
  max-width: 52ch;
  line-height: 1.54;
}

.home-feature-rows {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.home-feature-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.home-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(36, 84, 152, 0.2);
  background: rgba(76, 132, 216, 0.13);
  color: #204d8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-feature-icon svg {
  width: 16px;
  height: 16px;
}

.home-feature-copy h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #102f59;
}

.home-feature-copy p {
  margin: 7px 0 0;
  color: #4a6388;
  font-size: 0.92rem;
  line-height: 1.44;
}

.home-stepper {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  position: relative;
}

.home-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.home-step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #f7fbff;
  background: linear-gradient(135deg, #2c67c6, #5d97f4);
  box-shadow: 0 6px 12px rgba(28, 80, 153, 0.24);
}

.home-step-copy h3 {
  margin: 1px 0 0;
  font-size: 0.98rem;
  color: #123964;
}

.home-step-copy p {
  margin: 6px 0 0;
  color: #4a6388;
  font-size: 0.9rem;
  line-height: 1.42;
}

.home-panel-permissions {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 52%, #eef4ff 100%);
}

.home-scope-label {
  margin: 14px 0 0;
  color: #36547f;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.home-scope-badge {
  margin: 8px 0 0;
}

.home-scope-badge code {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(20, 60, 117, 0.1);
  border: 1px solid rgba(20, 60, 117, 0.18);
  color: #123964;
  font-size: 0.86rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.home-check-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.home-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #2f4b70;
  line-height: 1.48;
}

.home-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #1a8b44;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.home-panel-cta {
  display: grid;
  align-content: center;
  color: #f6fbff;
  border-color: rgba(63, 122, 209, 0.28);
  background: linear-gradient(135deg, #1f4f96 0%, #2f67c1 56%, #5c95f2 100%);
  box-shadow:
    0 28px 56px rgba(17, 59, 116, 0.33),
    var(--bevel-top),
    inset 0 -14px 26px rgba(8, 31, 69, 0.2);
}

.home-panel-cta.surface::before {
  opacity: 0.38;
}

.home-panel-cta.surface::after {
  opacity: 0.22;
  background: radial-gradient(120% 120% at 85% 90%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 55%);
}

.home-panel-cta h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  letter-spacing: -0.02em;
}

.home-panel-cta p {
  margin: 10px 0 0;
  max-width: 50ch;
  color: rgba(246, 251, 255, 0.92);
  line-height: 1.54;
}

.home-panel-cta .home-cta-row {
  margin-top: 20px;
}

@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  .home-stepper::before {
    content: '';
    position: absolute;
    left: 26px;
    top: 20px;
    bottom: 20px;
    width: 1px;
    z-index: 0;
    background: linear-gradient(180deg, rgba(64, 108, 170, 0), rgba(64, 108, 170, 0.45), rgba(64, 108, 170, 0));
  }
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    justify-content: flex-start;
  }

  .home-shot-frame {
    width: min(620px, 100%);
  }
}

@media (max-width: 740px) {
  body.home-page .home-nav,
  body.home-page .home-main {
    width: calc(100% - 24px);
  }

  .home-nav {
    position: static;
    margin-top: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .home-nav.legal-home-nav {
    margin-top: 0;
  }

  .home-nav-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .home-brand-copy small {
    letter-spacing: 0.03em;
  }

  .home-main {
    gap: 20px;
    padding: 20px 0 36px;
  }

  .home-hero {
    border-radius: 0;
    padding: 0;
  }

  .home-grid {
    gap: 16px;
  }

  .home-panel {
    border-radius: 0;
    padding: 0;
  }

  .home-stepper::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-shot-frame {
    animation: none;
  }
}

/* Shared animated background layout (JS mounts/unmounts this). */
.animated-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  display: none;
  transform: translateZ(0);
}

body.animated-bg-mode .animated-bg {
  display: block;
}

.animated-bg::before {
  content: '';
  position: absolute;
  inset: -16%;
  z-index: 0;
  /* Base gradient + soft mesh blobs layered together. */
  background-image:
    var(--animated-bg-gradient),
    radial-gradient(circle at 18% 62%, rgba(60, 140, 255, 0.22), transparent 62%),
    radial-gradient(circle at 78% 42%, rgba(120, 180, 255, 0.18), transparent 64%),
    radial-gradient(circle at 44% 78%, rgba(20, 70, 210, 0.18), transparent 66%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: var(--animated-bg-base-opacity, 1);
  transform: translate3d(0, 0, 0) scale(1.08);
  animation: authBgDrift 16s ease-in-out infinite alternate;
  will-change: transform;
}

.animated-bg::after {
  content: '';
  position: absolute;
  inset: -22%;
  z-index: 1;
  background-image:
    repeating-linear-gradient(
      20deg,
      rgba(255, 255, 255, 0) 0px,
      rgba(255, 255, 255, 0.7) 1px,
      rgba(255, 255, 255, 0) 11px
    ),
    repeating-linear-gradient(
      -20deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(40, 120, 255, 0.4) 1px,
      rgba(0, 0, 0, 0) 17px
    );
  background-size: 220px 220px;
  opacity: calc(var(--auth-scanline-opacity) * var(--auth-bg-intensity));
  mix-blend-mode: soft-light;
  transform: translate3d(0, 0, 0);
  animation: authScanMove 12s linear infinite;
  will-change: transform;
}

.animated-bg-icons {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.animated-bg-icon {
  position: absolute;
  left: var(--x);
  top: 0;
  width: var(--size);
  height: var(--size);
  color: var(--icon-color);
  opacity: 0;
  transform: translate3d(0, var(--startY), 0) rotate(var(--rot0));
  transform-origin: center;
  filter: drop-shadow(0 0 10px var(--icon-glow));
  animation: authIconFloatUp var(--dur) linear infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.animated-bg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes authBgDrift {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(1.6%, 1.2%, 0) scale(1.12);
  }
}

@keyframes authScanMove {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-160px, 160px, 0);
  }
}

@keyframes authIconFloatUp {
  0% {
    transform: translate3d(0, var(--startY), 0) rotate(var(--rot0));
    opacity: 0;
  }
  12% {
    opacity: calc(var(--opacity) * var(--auth-particle-opacity-mult));
  }
  86% {
    opacity: calc(var(--opacity) * var(--auth-particle-opacity-mult));
  }
  100% {
    transform: translate3d(var(--driftX), var(--endY), 0) rotate(var(--rot1));
    opacity: 0;
  }
}

body.auth-bg-debug-flash .animated-bg-icon {
  outline: 1px solid rgba(0, 0, 0, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  body:not(.force-auth-animation) .animated-bg::before,
  body:not(.force-auth-animation) .animated-bg::after {
    animation: none;
  }

  body:not(.force-auth-animation) .animated-bg-icon {
    animation: none;
    opacity: calc(var(--opacity) * 0.35);
    transform: translate3d(0, var(--startY), 0) rotate(var(--rot0));
  }
}

.noise {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(120deg, var(--color-noise-light) 0%, var(--color-noise-clear) 60%),
    repeating-linear-gradient(
      45deg,
      var(--color-noise-dark),
      var(--color-noise-dark) 1px,
      transparent 1px,
      transparent 4px
    );
  pointer-events: none;
  opacity: 0.4;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-nav-border);
  box-shadow: var(--shadow-sm);
}

.topbar-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--color-nav-text);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--color-nav-hover);
  background: var(--color-nav-pill-bg);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--color-nav-hover);
  background: var(--color-nav-pill-bg);
  font-weight: 600;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #e7f0ff;
  border: 1px solid #cddffc;
  color: #1d3b73;
  font-weight: 600;
  display: grid;
  place-items: center;
  letter-spacing: 1px;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo-wrap img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-wrap.logo-ready img {
  display: block;
}

.logo-wrap.logo-ready .logo-fallback {
  display: none;
}

.logo-wrap.logo-failed img {
  display: none;
}

.logo-fallback {
  font-weight: 600;
  letter-spacing: 1px;
}

.brand-logo {
  width: 70%;
  height: 70%;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--color-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout {
  padding: 20px 16px 80px;
  max-width: var(--app-shell-max-width);
  margin: 0 auto;
  display: grid;
  gap: 28px;
  /* Prevent single-row grids from stretching children to fill viewport height (auth card whitespace). */
  align-content: start;
  align-items: start;
  flex: 1 0 auto;
  width: 100%;
}

@media (min-width: 1024px) {
  .layout {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1440px) {
  .layout {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.app-footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  margin-top: auto;
}

.app-footer-inner {
  max-width: var(--app-shell-max-width);
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--color-muted);
  font-size: 12px;
}

.app-footer-copy {
  line-height: 1.4;
}

.app-footer-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-footer-link {
  color: inherit;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 11px;
}

.app-footer-link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-footer-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.app-footer-sep {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .app-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 14px 18px;
  }
}

.profile-menu {
  position: relative;
}

.profile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  max-width: min(260px, calc(100vw - 20px));
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 120;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 160ms ease, transform 180ms ease;
  pointer-events: none;
}

.profile-menu.open .profile-menu-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-menu-item {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.profile-menu-item:hover {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.profile-menu-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.profile-menu-item.danger {
  color: #b42318;
}

.profile-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.acct-menu-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
}

.acct-menu-item--password {
  column-gap: 8px;
}

.acct-menu-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  justify-self: center;
  color: rgba(28, 50, 84, 0.74);
  opacity: 0.85;
}

.acct-menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.acct-menu-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.acct-menu-item:hover .acct-menu-icon,
.acct-menu-item:focus-visible .acct-menu-icon {
  color: rgba(22, 52, 98, 0.92);
  opacity: 0.95;
}

.acct-menu-item:active {
  transform: translateY(0.5px);
}

.acct-menu-divider {
  height: 1px;
  margin: 6px 10px 4px;
  background: rgba(22, 41, 74, 0.1);
}

.acct-menu-item.logout {
  color: #b42318;
}

.acct-menu-item.logout .acct-menu-icon {
  color: rgba(180, 35, 24, 0.88);
  opacity: 0.95;
}

.acct-menu-item.logout:hover .acct-menu-icon,
.acct-menu-item.logout:focus-visible .acct-menu-icon {
  color: #991b1b;
}

.profile-menu-mobile {
  display: none;
}

.topbar .brand-name,
.topbar .brand {
  color: var(--color-nav-hover);
}

.topbar .brand-sub {
  color: rgba(234, 240, 250, 0.75);
}

.topbar .brand-mark {
  border-color: var(--color-nav-button-border);
  background: var(--color-card);
  color: var(--color-text);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.avatar-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-icon {
  width: 100%;
  height: 100%;
}

.avatar .logo-fallback {
  color: var(--color-text);
  font-size: 12px;
}

.avatar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.avatar.active {
  background: var(--color-accent-tint);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.topbar .btn--ghost {
  background: transparent;
  color: var(--color-nav-hover);
  border: 1px solid var(--color-nav-button-border);
}

.topbar .btn--ghost:hover {
  background: var(--color-nav-button-hover);
  box-shadow: none;
}

.topbar .avatar {
  background: transparent;
  border-color: var(--color-nav-button-border);
  color: var(--color-nav-hover);
  box-shadow: none;
}

.topbar .avatar-mark {
  border-color: var(--color-nav-button-border);
}

.topbar .avatar:hover {
  background: var(--color-nav-button-hover);
  box-shadow: none;
  transform: translateY(-2px);
}

.topbar .avatar.active {
  background: var(--color-nav-pill-bg);
  border-color: var(--color-nav-button-border);
  color: var(--color-nav-hover);
}

.account-menu-trigger {
  width: auto;
  min-width: 0;
  height: 42px;
  padding: 4px 10px 4px 4px;
  gap: 7px;
  border-radius: 999px;
  align-items: center;
  justify-content: flex-start;
}

.account-menu-trigger .avatar-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.account-menu-caret {
  display: inline-flex;
  width: 13px;
  height: 13px;
  color: rgba(234, 240, 250, 0.86);
  transition: color 0.18s ease, transform 0.18s ease;
}

.account-menu-caret svg {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-menu.open .account-menu-caret {
  transform: rotate(180deg);
}

.topbar .account-menu-trigger.nav-account {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 255, 0.84));
  border: 1px solid rgba(43, 88, 157, 0.2);
  color: rgba(21, 43, 80, 0.92);
  box-shadow:
    0 6px 16px rgba(12, 35, 78, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(0);
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.topbar .account-menu-trigger.nav-account .nav-account__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.78));
  border: 1px solid rgba(43, 88, 157, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 6px rgba(12, 35, 78, 0.12);
}

.topbar .account-menu-trigger.nav-account .nav-account__icon {
  width: 19px;
  height: 19px;
  color: rgba(20, 43, 78, 0.82);
}

.topbar .account-menu-trigger.nav-account .avatar-initials {
  display: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(20, 43, 78, 0.82);
  text-transform: uppercase;
}

.topbar .account-menu-trigger.nav-account .avatar-initials:not(:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar .account-menu-trigger.nav-account .avatar-initials:not(:empty) + .nav-account__icon {
  display: none;
}

.topbar .account-menu-trigger.nav-account .nav-account__caret {
  color: rgba(27, 53, 95, 0.72);
}

.topbar .account-menu-trigger.nav-account:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(236, 244, 255, 0.88));
  border-color: rgba(43, 88, 157, 0.3);
  box-shadow:
    0 10px 20px rgba(12, 35, 78, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.topbar .account-menu-trigger.nav-account:hover .nav-account__caret {
  color: rgba(21, 43, 80, 0.9);
}

.topbar .account-menu-trigger.nav-account.active,
.profile-menu.open .account-menu-trigger.nav-account {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 242, 255, 0.9));
  border-color: rgba(43, 88, 157, 0.34);
  box-shadow:
    0 9px 18px rgba(12, 35, 78, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.topbar .account-menu-trigger.nav-account:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 10px rgba(12, 35, 78, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.topbar .account-menu-trigger.nav-account:focus-visible {
  outline: 2px solid rgba(60, 120, 255, 0.45);
  outline-offset: 2px;
  box-shadow:
    0 8px 18px rgba(12, 35, 78, 0.14),
    0 0 0 4px rgba(60, 120, 255, 0.2);
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(6px);
}

.auth {
  max-width: 520px;
  margin: 40px auto 0;
  animation: rise 0.6s ease both;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: inherit;
  text-decoration: none;
  width: fit-content;
}

.auth-brand:focus-visible {
  outline: 2px solid rgba(31, 79, 150, 0.45);
  outline-offset: 4px;
  border-radius: 12px;
}

.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #e7f0ff;
  border: 1px solid #cddffc;
  color: #1d3b73;
}

.auth-logo-image {
  width: 70%;
  height: 70%;
}

.auth-social {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.google-btn {
  width: 100%;
  justify-content: center;
}

.google-btn .google-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-divider {
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
}

.auth-switch {
  margin-top: 4px;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--color-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
  text-decoration: none;
}

.link-button:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:active {
  transform: none;
}

.link-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.auth-panel {
  display: grid;
  gap: 8px;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.6s ease both;
  width: 100%;
  min-width: 0;
}

.dashboard > .card {
  width: 100%;
  min-width: 0;
}

.view {
  display: grid;
  gap: 20px;
  animation: fadeIn 0.6s ease both;
  /* When the main layout grows to fill the viewport (sticky footer), keep view content packed at the top. */
  align-content: start;
  align-items: start;
}

.page-header {
  display: grid;
  gap: 6px;
}

.dash-top {
  display: grid;
  gap: 10px;
}

.dash-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-title h2 {
  margin: 0;
}

.dash-title .small {
  margin: 2px 0 0;
}

.dash-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.page-header p {
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

h2,
h3 {
  margin: 0 0 8px;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.legal h3 {
  margin-top: 18px;
}

.legal h3:first-child {
  margin-top: 0;
}

.legal ul {
  margin: 8px 0 16px;
  padding-left: 18px;
}

.legal li {
  margin: 6px 0;
  line-height: 1.5;
}

.about-header {
  align-items: flex-start;
  gap: 12px;
}

.about-subtitle {
  margin: 8px 0 0;
  max-width: 680px;
}

.about-section {
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
}

.about-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.about-section h3 {
  margin-bottom: 10px;
}

.about-team {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--color-panel-bg);
  border: 1px solid var(--color-border);
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: rgba(59, 103, 255, 0.08);
  border: 1px solid rgba(59, 103, 255, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.profile-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  font-weight: 600;
  color: var(--color-primary);
  align-items: center;
  justify-content: center;
}

.profile-avatar.missing-image .profile-headshot {
  display: none;
}

.profile-avatar.missing-image .profile-avatar-fallback {
  display: flex;
}

.profile-meta {
  display: grid;
  gap: 4px;
}

.profile-name {
  font-weight: 600;
  font-size: 16px;
}

.profile-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 103, 255, 0.12);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
}

.about-list {
  margin: 0;
  padding-left: 18px;
}

.about-list li {
  margin: 6px 0;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .about-header {
    flex-direction: column;
  }

  .profile-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }
}

.muted {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
}

.muted.small {
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.signup-inbox-meta {
  margin-top: -4px;
  display: grid;
  gap: 7px;
}

.signup-inbox-preview code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(43, 82, 145, 0.18);
  background: rgba(239, 246, 255, 0.88);
  color: #153a6f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 11px;
}

.signup-inbox-hint[data-state='error'] {
  color: #b12c2c;
}

.signup-inbox-hint[data-state='ok'] {
  color: #1f7a3e;
}

.signup-inbox-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signup-inbox-suggestion {
  appearance: none;
  border: 1px solid rgba(42, 82, 142, 0.22);
  background: rgba(243, 248, 255, 0.9);
  color: #1f467f;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
}

.signup-inbox-suggestion:hover {
  border-color: rgba(42, 82, 142, 0.34);
  background: rgba(236, 244, 255, 0.96);
}

.signup-inbox-suggestion:focus-visible {
  outline: 2px solid rgba(60, 120, 220, 0.4);
  outline-offset: 1px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--color-muted);
}

input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  background: var(--color-card);
  color: var(--color-text);
}

select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  background: var(--color-card);
  color: var(--color-text);
}

textarea {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  resize: vertical;
  background: var(--color-card);
  color: var(--color-text);
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
}

.input-with-toggle {
  position: relative;
  display: block;
}

.input-with-toggle input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
}

.password-toggle:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
  transform: translateY(-50%);
  box-shadow: none;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  transform: translateY(-50%);
}

.password-toggle:active {
  transform: translateY(-50%);
  box-shadow: none;
}

.password-toggle:disabled {
  opacity: 0.55;
  cursor: default;
  background: transparent;
  transform: translateY(-50%);
  box-shadow: none;
}

.password-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[data-password-visible='1'] .icon-eye {
  display: none;
}

.password-toggle[data-password-visible='1'] .icon-eye-off {
  display: inline-flex;
}

button {
  border: none;
  background: var(--color-accent);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-sm);
}

button:active {
  transform: scale(0.98);
  box-shadow: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--primary.loading {
  position: relative;
  pointer-events: none;
}

.btn--primary.loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  background: var(--color-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:focus-visible,
.ghost-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sync-band {
  position: relative;
  z-index: 32;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 8px;
  width: 100%;
}

.surface-raised {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(20, 40, 80, 0.1);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  box-shadow:
    0 18px 50px rgba(15, 35, 80, 0.1),
    0 3px 10px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(20, 40, 80, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

/* Allow scan range dropdown to render outside the sync card bounds. */
.sync-band.surface-raised,
.sync-band .sync-strip,
.sync-band .sync-action-group {
  overflow: visible;
}

.surface-raised::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.55;
  z-index: 0;
}

.surface-raised > * {
  position: relative;
  z-index: 1;
}

.surface-raised--interactive {
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.surface-raised--interactive:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 56px rgba(15, 35, 80, 0.12),
    0 5px 14px rgba(15, 35, 80, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(20, 40, 80, 0.06);
}

.surface-rim {
  border: 1px solid rgba(20, 40, 80, 0.14);
  box-shadow:
    0 14px 36px rgba(15, 35, 80, 0.08),
    0 2px 8px rgba(15, 35, 80, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(20, 40, 80, 0.07);
}

.sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.4;
}

.scan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  column-gap: 24px;
  row-gap: 0;
}

.scan-card__left {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 14px;
  min-width: 0;
}

.scan-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.scan-bottom {
  display: grid;
  gap: 6px;
}

.scan-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 260px;
}

.sync-strip [data-action='manage-inbox'].btn--secondary {
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, #ffffff, #f1f7ff);
}

.sync-strip .manage-inbox-btn {
  gap: 9px;
}

.sync-strip .manage-inbox-btn .manage-inbox-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(220, 235, 255, 0.45), rgba(210, 225, 250, 0.25));
  border: 1px solid rgba(60, 120, 200, 0.15);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 2px 5px rgba(22, 48, 92, 0.12);
  color: rgba(28, 55, 95, 0.75);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.sync-strip .manage-inbox-btn .manage-inbox-icon svg {
  display: block;
}

.sync-strip [data-action='manage-inbox'].btn--secondary:hover {
  color: #123a74;
  border-color: rgba(80, 131, 214, 0.32);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #ffffff, #e7f1ff);
  box-shadow: 0 14px 30px rgba(16, 50, 100, 0.16), 0 4px 10px rgba(16, 50, 100, 0.1);
  filter: none;
}

.sync-strip .manage-inbox-btn:hover .manage-inbox-icon {
  background: linear-gradient(180deg, rgba(225, 239, 255, 0.58), rgba(214, 229, 252, 0.35));
  border-color: rgba(63, 122, 201, 0.23);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 4px 9px rgba(22, 48, 92, 0.15);
  color: rgba(28, 55, 95, 0.9);
}

.sync-strip .manage-inbox-btn:focus-visible {
  outline: 2px solid rgba(60, 120, 255, 0.42);
  outline-offset: 2px;
}

.sync-strip-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sync-inline-controls {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-left: 0;
}

.sync-quick-controls {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.sync-action-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-scan {
  min-height: 50px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 999px;
}

.btn-scan .btn-icon-left {
  font-size: 17px;
  line-height: 1;
}

.btn-scan .scan-label {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
}

.btn-scan .scan-dots {
  display: inline-block;
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  vertical-align: baseline;
  transition: width 160ms ease, min-width 160ms ease, opacity 120ms ease;
}

.btn-scan .scan-dots::before {
  content: '...';
  display: inline-block;
  width: 0ch;
  overflow: hidden;
}

.btn--primary.btn-scan.loading::before {
  content: none;
  display: none;
}

.btn-scan.is-scanning .scan-dots {
  width: 2.2ch;
  min-width: 2.2ch;
  opacity: 1;
}

.btn-scan.is-scanning .scan-dots::before {
  animation: scanButtonDots 1s steps(3, end) infinite;
}

@keyframes scanButtonDots {
  0% {
    width: 1ch;
  }
  33% {
    width: 2ch;
  }
  66% {
    width: 3ch;
  }
  100% {
    width: 1ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-scan.is-scanning .scan-dots::before {
    animation: none;
    width: 3ch;
  }
}

.sync-menu-button {
  min-height: 38px;
  min-width: 36px;
  width: 36px;
  padding: 0;
  border-radius: 12px;
}

.sync-menu-button svg {
  display: block;
  stroke-width: 2.2;
}

.btn-scan-menu {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
}

.btn-scan-menu svg {
  width: 18px;
  height: 18px;
}

.scan-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sync-helper-text {
  text-align: right;
  font-size: 12px;
  max-width: 260px;
  white-space: normal;
}

.sync-manual-process {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #2f5ea8;
}

.sync-manual-process:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  text-decoration: none;
}

.sync-manual-process:disabled:hover {
  color: #2f5ea8;
  text-decoration: none;
}

.legacy-sync-details {
  margin-top: 2px;
  width: 100%;
  max-width: 320px;
}

.legacy-sync-details summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #62728c;
}

.legacy-sync-details summary::-webkit-details-marker {
  display: none;
}

.legacy-sync-details[open] summary {
  color: #2f4f86;
}

.legacy-sync-content {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(28, 60, 112, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
  display: grid;
  gap: 8px;
}

.legacy-sync-content p {
  margin: 0;
}

.legacy-sync-details--disabled summary,
.legacy-sync-details--disabled .legacy-sync-content {
  opacity: 0.85;
}

.scan-bottom .sync-summary {
  margin-top: 0;
  justify-content: flex-start;
}

.sync-range-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 206px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(15, 58, 119, 0.15);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 18px 34px rgba(10, 30, 70, 0.18), 0 4px 12px rgba(10, 30, 70, 0.12);
  display: grid;
  gap: 2px;
  z-index: 120;
}

.sync-range-menu-item {
  border: 1px solid transparent;
  background: transparent;
  color: #183867;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-radius: 9px;
  padding: 7px 8px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.sync-range-menu-item:hover {
  background: rgba(18, 74, 152, 0.08);
  border-color: rgba(18, 74, 152, 0.12);
}

.sync-range-menu-item:focus-visible {
  outline: 2px solid rgba(31, 79, 150, 0.45);
  outline-offset: 1px;
}

.sync-range-menu-item.is-selected {
  background: rgba(18, 74, 152, 0.12);
  border-color: rgba(18, 74, 152, 0.16);
}

.sync-range-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #1d5ac2;
}

.sync-connect-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sync-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
  width: 100%;
}

.sync-banner-row {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 1fr auto;
  gap: 16px;
  align-items: center;
}

.sync-banner-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sync-banner-info {
  display: grid;
  gap: 4px;
  line-height: 1.5;
}

.sync-banner-input {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--color-muted);
}

.sync-banner-input input {
  width: 100%;
}

.sync-banner-actions {
  display: inline-flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sync-banner-connection {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scan-progress {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  min-height: 70px;
  padding: 2px 0;
  transition: opacity 180ms ease;
}

.scan-progress.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scan-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scan-progress__label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scan-progress__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text, #1f2f48);
  line-height: 1.2;
}

.scan-progress__subtle {
  font-size: 11px;
  color: var(--dash-text-muted, #627894);
  line-height: 1.2;
}

.scan-progress__pct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: rgba(240, 245, 255, 0.9);
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.08);
  color: rgba(27, 54, 96, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scan-progress__track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 245, 255, 0.9), rgba(226, 235, 250, 0.95));
  border: 1px solid rgba(40, 80, 160, 0.12);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.08),
    0 10px 25px rgba(20, 40, 80, 0.1);
  overflow: hidden;
}

.sync-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-error-detail {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 8px;
  margin: 8px 0 0;
  line-height: 1.5;
  font-size: 12px;
}

.sync-connect-cta {
  display: grid;
  gap: 8px;
}

.sync-summary {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.sync-summary-status {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sync-summary-metrics {
  font-size: 13px;
  line-height: 1.4;
}

.sync-summary-main .chevron {
  font-size: 11px;
  transition: transform 0.15s ease;
}

.sync-summary-main.open .chevron {
  transform: rotate(180deg);
}

.sync-summary-main.clickable {
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.sync-summary-main.clickable:hover {
  background: rgba(0, 0, 0, 0.035);
}

.sync-summary-main.clickable:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sync-summary .link {
  padding: 0;
  border: none;
  background: none;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sync-summary .link:hover {
  color: var(--color-accent-hover);
}

.sync-details {
  margin-top: 6px;
}

.sync-details-block {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 10px;
  padding: 10px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
}

.scan-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #4f8cff, #2f66e6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2),
    0 6px 16px rgba(60, 120, 255, 0.25);
  transition: width 380ms cubic-bezier(0.2, 0.9, 0.2, 1), background-color 180ms ease;
  overflow: hidden;
}

.scan-progress__fill::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0 10px,
    rgba(255, 255, 255, 0) 10px 20px
  );
  background-size: 180px 100%;
  opacity: 0;
  pointer-events: none;
}

.scan-progress__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  filter: blur(0.2px);
  opacity: 0;
  pointer-events: none;
}

.scan-progress__fill.error {
  background: linear-gradient(180deg, #f97316, #ef4444);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2),
    0 6px 14px rgba(239, 68, 68, 0.22);
}

.scan-progress.is-scanning .scan-progress__fill.is-scanning::before {
  opacity: 0.18;
  animation: scanProgressStripes 10s linear infinite;
}

.scan-progress.is-scanning .scan-progress__fill.is-scanning::after {
  opacity: 0.85;
  animation: scanSheen 2.6s linear infinite;
}

.scan-progress.is-indeterminate .scan-progress__fill {
  width: 42% !important;
  transition: none;
  animation: scanProgressIndeterminate 1.6s cubic-bezier(0.42, 0, 0.3, 1) infinite;
}

.scan-progress.is-indeterminate .scan-progress__fill::before {
  opacity: 0.2;
  animation: scanProgressStripes 8s linear infinite;
}

.scan-progress.is-indeterminate .scan-progress__fill::after {
  opacity: 0.55;
  animation: scanSheen 2.1s linear infinite;
}

@keyframes scanSheen {
  from {
    left: -40%;
  }
  to {
    left: 110%;
  }
}

@keyframes scanProgressStripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 180px 0;
  }
}

@keyframes scanProgressIndeterminate {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(240%);
  }
}

@media (max-width: 640px) {
  .scan-progress__track {
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-progress__fill {
    transition: width 220ms linear, background-color 180ms ease;
  }

  .scan-progress.is-scanning .scan-progress__fill.is-scanning::before,
  .scan-progress.is-scanning .scan-progress__fill.is-scanning::after,
  .scan-progress.is-indeterminate .scan-progress__fill {
    animation: none;
    transform: none;
  }

  .scan-progress.is-indeterminate .scan-progress__fill::before,
  .scan-progress.is-indeterminate .scan-progress__fill::after {
    animation: none;
    opacity: 0;
  }
}

.sync-error-detail {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--color-panel-bg);
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-label::after {
  content: ':';
  margin-left: 2px;
}

.kpi-value {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: var(--color-text);
  margin-left: auto;
  flex: 0 0 auto;
}

.kpi-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 0;
  flex: 1 1 auto;
}

.kpi-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.kpi-dot.neutral {
  background: var(--color-muted);
}
.kpi-dot.warning {
  background: var(--color-warning);
  box-shadow: 0 0 0 4px var(--color-warning-tint);
}
.kpi-dot.success {
  background: var(--color-success);
  box-shadow: 0 0 0 4px var(--color-success-tint);
}
.kpi-dot.info {
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}
.kpi-dot.danger {
  background: var(--color-danger);
  box-shadow: 0 0 0 4px var(--color-danger-tint);
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
  flex: 0 0 auto;
}

.kpi-card.status-applied {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.14), #fff);
  border-color: rgba(234, 179, 8, 0.3);
  color: #854d0e;
}

.kpi-card.status-applied .kpi-label,
.kpi-card.status-applied .kpi-value {
  color: #854d0e;
}

.kpi-card.status-offer {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), #fff);
  border-color: rgba(34, 197, 94, 0.28);
  color: #166534;
}

.kpi-card.status-offer .kpi-label,
.kpi-card.status-offer .kpi-value {
  color: #166534;
}

.kpi-card.status-interview {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), #fff);
  border-color: rgba(59, 130, 246, 0.3);
  color: #1d4ed8;
}

.kpi-card.status-interview .kpi-label,
.kpi-card.status-interview .kpi-value {
  color: #1d4ed8;
}

.kpi-card.status-rejected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), #fff);
  border-color: rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

.kpi-card.status-rejected .kpi-label,
.kpi-card.status-rejected .kpi-value {
  color: #991b1b;
}

.kpi-card.status-total {
  background: linear-gradient(135deg, rgba(46, 90, 172, 0.08), #fff);
}

.ghost-link:hover {
  transform: translateY(-2px);
  background: var(--color-accent-tint);
  box-shadow: none;
}

.danger-panel {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.danger-panel-title {
  font-weight: 700;
  color: #991b1b;
}

.danger-panel-body {
  color: #7f1d1d;
  font-size: 14px;
}

.danger-panel-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.filter-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  min-width: 0;
}

.header-actions .filter-inline {
  margin-left: 10px;
}

.filters-bar {
  width: 100%;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(40, 80, 160, 0.08);
  background: linear-gradient(180deg, rgba(253, 255, 255, 0.96), rgba(244, 249, 255, 0.92));
  box-shadow:
    0 14px 34px rgba(20, 40, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.filter-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.filter-field__label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(69, 88, 118, 0.9);
  padding-left: 2px;
}

.filter-field__control {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 255, 0.92));
  box-shadow:
    0 10px 24px rgba(20, 40, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.filter-field__control:hover {
  border-color: rgba(40, 80, 160, 0.2);
  box-shadow:
    0 12px 28px rgba(20, 40, 80, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.filter-field__control:focus-within {
  border-color: rgba(60, 120, 255, 0.45);
  box-shadow:
    0 0 0 4px rgba(60, 120, 255, 0.18),
    0 12px 28px rgba(20, 40, 80, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.filter-field--status .filter-field__control {
  overflow: visible;
}

.filter-field__icon,
.filter-field__chevron {
  color: rgba(34, 61, 103, 0.66);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.filter-field__icon {
  width: 32px;
  margin-left: 10px;
}

.filter-field__chevron {
  width: 24px;
  margin-right: 12px;
  pointer-events: none;
}

.filter-field__icon svg,
.filter-field__chevron svg {
  width: 17px;
  height: 17px;
}

.status-select {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.status-select__trigger {
  width: 100%;
  min-height: 100%;
  border: 0;
  background: transparent;
  color: #1e304d;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px 0 4px;
  cursor: pointer;
  border-radius: 999px;
  font: inherit;
  transition: background 140ms ease, color 140ms ease;
  transform: none;
  box-shadow: none;
}

.status-select__trigger:hover {
  background: rgba(60, 120, 255, 0.08);
  color: #183763;
  transform: none;
  box-shadow: none;
}

.status-select__trigger:active {
  background: rgba(60, 120, 255, 0.12);
  transform: none;
  box-shadow: none;
}

.status-select__trigger:focus-visible {
  outline: none;
  background: rgba(60, 120, 255, 0.1);
  transform: none;
  box-shadow: none;
}

.status-select__dot,
.status-menu__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: var(--status-pill-unknown-border);
}

.status-select__label {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #1e304d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-select__trigger .status-select__chevron {
  margin-right: 0;
  width: 18px;
  color: rgba(34, 61, 103, 0.62);
  transition: transform 150ms ease;
}

.status-select.is-open .status-select__trigger .status-select__chevron {
  transform: rotate(180deg);
}

.status-select.is-open .status-select__trigger {
  background: rgba(60, 120, 255, 0.1);
}

.status-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 320;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.95));
  box-shadow:
    0 18px 40px rgba(20, 40, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.status-menu__item {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #1f3351;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.status-menu__item:hover,
.status-menu__item:focus-visible,
.status-menu__item.is-highlighted {
  outline: none;
  background: rgba(60, 120, 255, 0.08);
  border-color: rgba(60, 120, 255, 0.16);
}

.status-menu__item[aria-selected='true'] {
  background: rgba(60, 120, 255, 0.12);
  border-color: rgba(60, 120, 255, 0.22);
  color: #153766;
}

.status-menu__label {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
}

.status-menu__check {
  font-size: 12px;
  font-weight: 700;
  color: rgba(34, 61, 103, 0.88);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 120ms ease, transform 120ms ease;
}

.status-menu__item[aria-selected='true'] .status-menu__check {
  opacity: 0.95;
  transform: scale(1);
}

.status-select__dot[data-tone='any'],
.status-menu__dot[data-tone='any'] {
  background: var(--status-dot-any);
}

.status-select__dot[data-tone='applied'],
.status-menu__dot[data-tone='applied'] {
  background: var(--status-dot-applied);
}

.status-select__dot[data-tone='interview_requested'],
.status-menu__dot[data-tone='interview_requested'] {
  background: var(--status-dot-interview);
}

.status-select__dot[data-tone='offer_received'],
.status-menu__dot[data-tone='offer_received'] {
  background: var(--status-dot-offer);
}

.status-select__dot[data-tone='rejected'],
.status-menu__dot[data-tone='rejected'] {
  background: var(--status-dot-rejected);
}

.status-select__dot[data-tone='ghosted'],
.status-menu__dot[data-tone='ghosted'] {
  background: var(--status-dot-ghosted);
}

.filter-field__control select,
.filter-field__control input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #1e304d;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  padding: 0 12px 0 6px;
}

.filter-field__control select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  padding-right: 6px;
}

.filter-field__control input::placeholder {
  color: rgba(75, 94, 124, 0.82);
}

.filter-field .input-with-clear {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.filter-field .input-with-clear input {
  width: 100%;
  padding-right: 32px;
}

.clear-input {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
}

.clear-input:hover {
  color: var(--color-text);
}

.stack {
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-accent-tint);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}

.pill[data-state='connected'] {
  background: var(--color-success-tint);
  color: var(--color-success);
}

.pill[data-state='warning'] {
  background: var(--color-warning-tint);
  color: var(--color-warning);
}

.pill[data-state='idle'] {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.pill[data-state='info'] {
  background: rgba(58, 124, 221, 0.16);
  color: #1f4f94;
}

.callout {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--color-border);
  background: var(--color-warning-tint);
  display: grid;
  gap: 6px;
}

.callout-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-warning);
}

.policy {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.header-left .header-actions {
  justify-content: flex-start;
}

.icon-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.icon-btn-circle:hover {
  background: var(--color-surface);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.icon-btn-circle:active {
  transform: scale(0.97);
}

.icon-btn-circle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

#dashboard-view .add-app-btn {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 1px solid rgba(40, 80, 160, 0.18);
  background:
    radial-gradient(140% 140% at 26% 10%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(232, 242, 255, 0.92));
  color: rgba(22, 58, 118, 0.92);
  box-shadow:
    0 10px 24px rgba(20, 40, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(40, 80, 160, 0.1);
  transform: translateY(0);
  transition:
    transform 140ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease,
    background 170ms ease,
    color 170ms ease;
}

#dashboard-view .add-app-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

#dashboard-view .add-app-btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

#dashboard-view .add-app-btn:hover {
  transform: translateY(-1px);
  color: rgba(20, 55, 112, 0.98);
  border-color: rgba(40, 80, 160, 0.24);
  background:
    radial-gradient(140% 140% at 26% 10%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.99), rgba(236, 246, 255, 0.94));
  box-shadow:
    0 14px 26px rgba(20, 40, 80, 0.18),
    0 0 0 4px rgba(60, 120, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(40, 80, 160, 0.12);
}

#dashboard-view .add-app-btn:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(20, 40, 80, 0.1),
    inset 0 1px 2px rgba(16, 44, 92, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.34);
}

#dashboard-view .add-app-btn:focus-visible {
  outline: none;
  box-shadow:
    0 10px 24px rgba(20, 40, 80, 0.16),
    0 0 0 3px rgba(60, 120, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(40, 80, 160, 0.12);
}

#dashboard-view .add-app-btn:disabled {
  color: rgba(84, 105, 136, 0.58);
  border-color: rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.9), rgba(236, 243, 252, 0.85));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(40, 80, 160, 0.08);
  transform: none;
}

#filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.count-badge {
  background: var(--color-accent-tint);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.filters-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 12px;
}

.summary-chip {
  font-size: 12px;
  color: var(--color-muted);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 10px;
}

.panel {
  background: var(--color-panel-bg);
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.pager-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(15, 58, 119, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  box-shadow:
    0 12px 24px rgba(10, 30, 70, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  padding: 4px 6px;
  min-height: 40px;
}

.pager-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 58, 119, 0.14);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff, #eef4ff);
  box-shadow:
    0 8px 16px rgba(10, 30, 70, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.pager-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.pager-btn path {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.pager-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 18px rgba(10, 30, 70, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.pager-btn:active {
  transform: translateY(1px);
}

.pager-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

.pager-btn[disabled] {
  opacity: 0.42;
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transform: none;
  filter: grayscale(0.1);
}

.pager-text {
  min-width: 64px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

#dashboard-view .sync-strip {
  width: 100%;
}

#dashboard-view .sync-inline-controls,
#dashboard-view .sync-quick-controls {
  flex: 0 0 auto;
}

#dashboard-view #filters-inline {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

#archive-view #archived-filters-inline {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

#dashboard-view #filters-inline.filters-bar {
  align-items: stretch;
}

#dashboard-view #filters-inline .filter-field {
  flex: 1 1 200px;
}

#archive-view #archived-filters-inline .filter-field {
  flex: 1 1 200px;
}

#dashboard-view #filters-inline .filter-field--status {
  flex: 0 1 214px;
  max-width: 228px;
}

#archive-view #archived-filters-inline .filter-field--status {
  flex: 0 1 214px;
  max-width: 228px;
}

#dashboard-view #filters-inline .filter-field--company {
  flex: 1 1 300px;
  max-width: 380px;
}

#archive-view #archived-filters-inline .filter-field--company {
  flex: 1 1 300px;
  max-width: 380px;
}

#dashboard-view #filters-inline .filter-field--role {
  flex: 1 1 280px;
  max-width: 360px;
}

#archive-view #archived-filters-inline .filter-field--role {
  flex: 1 1 280px;
  max-width: 360px;
}

#dashboard-view #filters-inline .filter-field__control {
  width: 100%;
}

#archive-view #archived-filters-inline .filter-field__control {
  width: 100%;
}

#dashboard-view .header-right {
  margin-left: auto;
}

@media (min-width: 901px) {
  #dashboard-view .header-actions {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  #archive-view .header-actions {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  #dashboard-view #filters-inline {
    width: auto;
    flex: 1 1 auto;
    max-width: 1040px;
    flex-wrap: nowrap;
  }

  #archive-view #archived-filters-inline {
    width: auto;
    flex: 1 1 auto;
    max-width: 1040px;
    flex-wrap: nowrap;
  }

  #dashboard-view #add-toggle {
    flex: 0 0 auto;
    align-self: flex-end;
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .pager-pill {
    gap: 4px;
    padding: 3px 4px;
    min-height: 36px;
  }

  .pager-btn {
    width: 32px;
    height: 32px;
  }

  .pager-text {
    min-width: 52px;
    font-size: 11px;
  }
}

.table {
  display: grid;
  gap: 12px;
}

.empty-state {
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  padding: 20px;
  background: var(--color-panel-bg);
  display: grid;
  gap: 12px;
  text-align: center;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.9fr 1fr 0.6fr 0.8fr;
  gap: 12px;
  align-items: center;
}

#applications-table {
  --applications-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 1.2fr) minmax(0, 1fr) 92px;
}

#applications-table .applications-header,
#applications-table .application-row {
  grid-template-columns: var(--applications-columns);
  align-items: center;
  gap: 0;
}

#applications-table .applications-header {
  padding: 8px 0;
}

#applications-table .application-row {
  padding: 12px 0;
}

#applications-table .applications-header > *,
#applications-table .application-row > * {
  min-width: 0;
}

#applications-table .applications-header > button.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 32px;
  line-height: 1.1;
  padding: 0 16px;
}

#applications-table .applications-header > button.header-status {
  padding-left: 20px;
}

#applications-table .application-row > div {
  padding: 0 16px;
}

#applications-table .applications-header .table-col-status,
#applications-table .application-row .table-col-status,
#applications-table .applications-header .table-col-activity,
#applications-table .application-row .table-col-activity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

#applications-table .application-row .table-col-status {
  flex-wrap: wrap;
  align-content: center;
  line-height: 1.1;
}

#applications-table .application-row .table-col-status .explanation {
  flex: 0 0 100%;
  margin-top: 2px;
}

#applications-table .applications-header .table-col-select,
#applications-table .application-row .table-col-select {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
}

#unsorted-table .table-header,
#unsorted-table .table-row {
  grid-template-columns: 1.1fr 1.4fr 0.8fr 0.6fr 1fr 0.9fr;
}

#unsorted-table .table-row {
  cursor: default;
}

#email-events-table .table-row {
  cursor: default;
}

#unsorted-table .table-row:hover,
#email-events-table .table-row:hover {
  box-shadow: none;
  transform: none;
}

#unsorted-table .suggestion-actions {
  justify-content: flex-end;
}

.table-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  gap: 8px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.025);
  padding: 10px 12px;
  border-radius: 12px;
}

.table-header.sortable button {
  border: none;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  padding: 6px 8px;
  border-radius: 10px;
  transition: color 120ms ease, background 120ms ease;
}

.table-header.sortable button:hover,
.table-header.sortable button:focus-visible {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.table-header.sortable .arrow {
  font-size: 10px;
}

.table-row {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--color-card);
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--stagger, 0) * 60ms);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.table-row:hover {
  border-color: rgba(46, 90, 172, 0.25);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.02);
}

.cell-company {
  font-weight: 700;
  color: var(--color-text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-company strong {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-role {
  font-size: 13px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}

#applications-table .table-row:nth-child(odd) {
  background: linear-gradient(180deg, rgba(250, 252, 254, 0.99), rgba(241, 245, 249, 0.97));
}

#applications-table .table-row:nth-child(even) {
  background: linear-gradient(180deg, rgba(234, 239, 245, 0.96), rgba(226, 232, 240, 0.94));
}

#applications-table .table-row:hover {
  background: linear-gradient(180deg, rgba(223, 230, 238, 0.98), rgba(216, 224, 234, 0.96));
}

#applications-table .table-row.table-row-selected,
#applications-table .table-row.table-row-selected:hover {
  border-color: rgba(33, 85, 177, 0.32);
  box-shadow: 0 10px 26px rgba(24, 55, 110, 0.14);
  background: linear-gradient(180deg, rgba(218, 231, 255, 0.6), rgba(233, 241, 255, 0.4));
}

#archived-table .table-row:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.table-select-header,
.table-select-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.table-select-header-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  cursor: pointer;
  user-select: none;
}

#applications-table .table-select-header .table-select-control {
  width: 32px;
  height: 32px;
}

.table-select-all-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(15, 23, 42, 0.58);
  white-space: nowrap;
}

.table-select-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.table-select-control:hover {
  background: rgba(31, 64, 117, 0.08);
}

.table-select-header-label:hover .table-select-all-text {
  color: rgba(15, 23, 42, 0.75);
}

.table-select-control:focus-within {
  box-shadow: 0 0 0 3px rgba(31, 63, 117, 0.2);
}

.table-select-input {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
}

.table-select-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(20, 60, 120, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
  box-shadow:
    0 6px 12px rgba(10, 30, 70, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #163c7f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.table-select-input:checked + .table-select-mark,
.table-select-input:indeterminate + .table-select-mark {
  border-color: rgba(20, 60, 120, 0.55);
  background: linear-gradient(180deg, #d8e5ff 0%, #bdd2ff 100%);
}

.table-select-input:checked + .table-select-mark::before {
  content: '✓';
}

.table-select-input:indeterminate + .table-select-mark::before {
  content: '';
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.table-bulk-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 240;
  margin: 0 auto;
  width: min(760px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(20, 60, 120, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
  box-shadow:
    0 14px 28px rgba(10, 30, 70, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: bulkBarIn 180ms ease both;
}

.table-bulk-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.table-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.status {
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  transition: opacity 180ms ease, transform 180ms ease;
}

.status.animate {
  opacity: 0;
  transform: translateY(4px);
  animation: fadeStatus 180ms ease forwards;
}

@keyframes fadeStatus {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.explanation {
  font-size: 12px;
  color: var(--color-muted);
}

details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.suggestion-callout {
  margin-top: 8px;
  background: var(--color-warning-tint);
  border: 1px solid var(--color-warning);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.suggestion-actions {
  display: flex;
  gap: 8px;
}

.suggestion-actions button {
  padding: 6px 10px;
  font-size: 12px;
}

.status-cell {
  display: inline-flex;
  align-items: center;
}

:root {
  --status-pill-applied-bg: #fef3c7;
  --status-pill-applied-border: #fcd34d;
  --status-pill-applied-text: #92400e;
  --status-pill-offer-bg: #d1fae5;
  --status-pill-offer-border: #34d399;
  --status-pill-offer-text: #065f46;
  --status-pill-interview-bg: #dbeafe;
  --status-pill-interview-border: #60a5fa;
  --status-pill-interview-text: #1d4ed8;
  --status-pill-rejected-bg: #fee2e2;
  --status-pill-rejected-border: #fca5a5;
  --status-pill-rejected-text: #991b1b;
  --status-pill-under-review-bg: #e0f2fe;
  --status-pill-under-review-border: #7dd3fc;
  --status-pill-under-review-text: #075985;
  --status-pill-unknown-bg: #e5e7eb;
  --status-pill-unknown-border: #d1d5db;
  --status-pill-unknown-text: #374151;
  --status-dot-applied: #f4b400;
  --status-dot-interview: #2f6bff;
  --status-dot-offer: #22c55e;
  --status-dot-rejected: #ef4444;
  --status-dot-ghosted: #a855f7;
  --status-dot-any: #98a2b3;
}

.appl-statusPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  white-space: nowrap;
}

.appl-statusPill[data-status] {
  position: relative;
}

.appl-statusPill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

.appl-status-applied {
  background: var(--status-pill-applied-bg);
  border-color: var(--status-pill-applied-border);
  color: var(--status-pill-applied-text);
}

.appl-status-offer_received {
  background: var(--status-pill-offer-bg);
  border-color: var(--status-pill-offer-border);
  color: var(--status-pill-offer-text);
}

.appl-status-interview_requested {
  background: var(--status-pill-interview-bg);
  border-color: var(--status-pill-interview-border);
  color: var(--status-pill-interview-text);
}

.appl-status-interview_completed {
  background: var(--status-pill-interview-bg);
  border-color: var(--status-pill-interview-border);
  color: var(--status-pill-interview-text);
}

.appl-status-interview_scheduled,
.appl-status-phone_screen,
.appl-status-onsite {
  background: var(--status-pill-interview-bg);
  border-color: var(--status-pill-interview-border);
  color: var(--status-pill-interview-text);
}

.appl-status-rejected {
  background: var(--status-pill-rejected-bg);
  border-color: var(--status-pill-rejected-border);
  color: var(--status-pill-rejected-text);
}

.appl-status-under_review {
  background: var(--status-pill-under-review-bg);
  border-color: var(--status-pill-under-review-border);
  color: var(--status-pill-under-review-text);
}

.appl-status-unknown {
  background: var(--status-pill-unknown-bg);
  border-color: var(--status-pill-unknown-border);
  color: var(--status-pill-unknown-text);
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-group button {
  padding: 8px 12px;
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filter-bar .filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.filter-bar .filter-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  color: var(--color-muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 1200;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease-out, visibility 0s linear 0s;
}

.modal.hidden {
  display: grid;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease-in, visibility 0s linear 160ms;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 80, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.modal.hidden .modal-backdrop {
  opacity: 0;
}

.modal-dialog {
  width: min(640px, 92vw);
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border-radius: 20px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  box-shadow:
    0 30px 80px rgba(20, 40, 80, 0.25),
    0 10px 30px rgba(20, 40, 80, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 24px 24px 0;
  position: relative;
  display: grid;
  gap: 0;
  max-height: 90vh;
  overflow: auto;
  z-index: 1;
  transform: translateY(0);
  opacity: 1;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms ease-out;
}

.modal.hidden .modal-dialog {
  transform: translateY(8px);
  opacity: 0;
}

.modal-dialog::before {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 34px;
  border-radius: 19px 19px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.modal-header {
  position: relative;
  padding: 0 4px 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(40, 80, 160, 0.08);
  display: grid;
  gap: 6px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.15;
  font-weight: 700;
  color: #102f59;
}

.modal-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #5b6f8e;
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 0 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 4px 20px;
  margin-top: 16px;
  border-top: 1px solid rgba(40, 80, 160, 0.08);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
  border-radius: 999px;
  padding: 0;
  border: 1px solid rgba(40, 80, 160, 0.16);
  background:
    radial-gradient(130% 130% at 25% 12%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(235, 244, 255, 0.95));
  color: rgba(23, 58, 114, 0.92);
  box-shadow:
    0 10px 22px rgba(20, 40, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(40, 80, 160, 0.1);
  transition:
    transform 140ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.modal-close:hover {
  transform: translateY(-1px);
  border-color: rgba(40, 80, 160, 0.24);
  box-shadow:
    0 14px 26px rgba(20, 40, 80, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(40, 80, 160, 0.12);
}

.modal-close:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(20, 40, 80, 0.1),
    inset 0 1px 2px rgba(17, 45, 93, 0.2);
}

.modal-close:focus-visible {
  outline: none;
  box-shadow:
    0 10px 22px rgba(20, 40, 80, 0.14),
    0 0 0 3px rgba(60, 120, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.modal-close__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.modal-close__icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-row-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-error {
  background: var(--color-danger-tint);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.form-success {
  background: var(--color-success-tint);
  color: var(--color-success);
  border: 1px solid var(--color-success);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.form-help {
  font-size: 12px;
  color: var(--color-muted);
}

.modal-note {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0;
}

.modal--application-form .modal-dialog,
.modal--add-application .modal-dialog {
  width: min(660px, 92vw);
  overflow: visible;
}

.modal--application-form .modal-form--app-entry,
.modal--add-application .modal-form--add-app {
  gap: 18px;
}

.modal--application-form .modal-form--app-entry .modal-field,
.modal--add-application .modal-form--add-app .modal-field {
  display: grid;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #5e7394;
}

.modal--application-form .modal-form--app-entry .modal-field input,
.modal--application-form .modal-form--app-entry .modal-field select,
.modal--application-form .modal-form--app-entry .modal-field textarea,
.modal--add-application .modal-form--add-app .modal-field input,
.modal--add-application .modal-form--add-app .modal-field select {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(241, 246, 252, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 2px 4px rgba(20, 40, 80, 0.05);
  color: #1e304d;
  font-size: 14px;
  font-weight: 500;
  padding: 0 13px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.modal--application-form .modal-form--app-entry .modal-field textarea {
  min-height: 108px;
  padding: 11px 13px;
  line-height: 1.45;
}

.modal--application-form .modal-form--app-entry .modal-field input::placeholder,
.modal--application-form .modal-form--app-entry .modal-field textarea::placeholder,
.modal--add-application .modal-form--add-app .modal-field input::placeholder {
  color: #62789a;
}

.modal--application-form .modal-form--app-entry .modal-field input:focus-visible,
.modal--application-form .modal-form--app-entry .modal-field select:focus-visible,
.modal--application-form .modal-form--app-entry .modal-field textarea:focus-visible,
.modal--add-application .modal-form--add-app .modal-field input:focus-visible,
.modal--add-application .modal-form--add-app .modal-field select:focus-visible {
  outline: none;
  border-color: rgba(60, 120, 255, 0.58);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(245, 249, 255, 0.96));
  box-shadow:
    0 0 0 3px rgba(60, 120, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 2px 4px rgba(20, 40, 80, 0.05);
}

.modal--application-form .modal-status-select {
  position: relative;
  width: 100%;
  min-height: 46px;
}

.modal--application-form .modal-status-select__trigger {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(241, 246, 252, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 2px 4px rgba(20, 40, 80, 0.05);
  padding: 0 13px 0 12px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.modal--application-form .modal-status-select__trigger:hover {
  border-color: rgba(40, 80, 160, 0.2);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(245, 249, 255, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 2px 4px rgba(20, 40, 80, 0.05),
    0 6px 14px rgba(20, 40, 80, 0.08);
}

.modal--application-form .modal-status-select__trigger:focus-visible {
  outline: none;
  border-color: rgba(60, 120, 255, 0.58);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(245, 249, 255, 0.96));
  box-shadow:
    0 0 0 3px rgba(60, 120, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 2px 4px rgba(20, 40, 80, 0.05);
}

.modal--application-form .modal-status-select.is-open .modal-status-select__trigger {
  border-color: rgba(60, 120, 255, 0.38);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(247, 251, 255, 0.96));
  box-shadow:
    0 0 0 2px rgba(60, 120, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 2px 4px rgba(20, 40, 80, 0.05);
}

.modal--application-form .modal-status-select .status-select__label {
  font-size: 14px;
  font-weight: 500;
  color: #1e304d;
}

.modal--application-form .modal-status-select .status-select__dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.modal--application-form .modal-status-menu {
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 100%;
  z-index: 360;
  border-radius: 14px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.95));
  box-shadow:
    0 18px 40px rgba(20, 40, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.modal--application-form .modal-status-menu__item {
  min-height: 38px;
  border-radius: 10px;
}

.modal--application-form .modal-status-menu__item .status-menu__dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.modal--application-form .modal-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.95), rgba(241, 247, 255, 0.95));
  color: #2b466f;
  font-size: 12px;
  font-weight: 600;
}

.modal--application-form .modal-checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2f66d6;
}

.modal--application-form .modal-checkbox-row span {
  letter-spacing: 0.02em;
}

.modal--application-form .modal-edit-status {
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 22px rgba(20, 40, 80, 0.08);
}

.modal--application-form .modal-edit-status .form-help {
  margin: 0;
  color: #5f7190;
}

.modal--application-form .modal-footer .btn[data-role='cancel'],
.modal--add-application .modal-footer .btn[data-role='cancel'] {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fc 100%);
  color: #2b4467;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 14px rgba(20, 40, 80, 0.08);
}

.modal--application-form .modal-footer .btn[data-role='cancel']:hover,
.modal--add-application .modal-footer .btn[data-role='cancel']:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffffff 0%, #eaf1fb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 20px rgba(20, 40, 80, 0.11);
}

.modal--application-form .modal-footer .btn[data-role='confirm'],
.modal--add-application .modal-footer .btn[data-role='confirm'] {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(135% 150% at 22% 10%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #2d67cf 0%, #1f52b2 58%, #184495 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(17, 56, 116, 0.3),
    0 5px 14px rgba(17, 56, 116, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -3px 8px rgba(10, 32, 70, 0.28);
}

.modal--application-form .modal-footer .btn[data-role='confirm']:hover,
.modal--add-application .modal-footer .btn[data-role='confirm']:hover {
  transform: translateY(-1px);
  background:
    radial-gradient(135% 150% at 22% 10%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #3773dc 0%, #285cc2 58%, #1b4ca4 100%);
  box-shadow:
    0 20px 34px rgba(17, 56, 116, 0.34),
    0 7px 16px rgba(17, 56, 116, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -3px 8px rgba(10, 32, 70, 0.32);
}

.modal--application-form .modal-footer .btn[data-role='confirm']:active,
.modal--add-application .modal-footer .btn[data-role='confirm']:active {
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(17, 56, 116, 0.22),
    inset 0 2px 4px rgba(10, 32, 70, 0.3);
}

.modal--inbound-setup .modal-dialog {
  width: min(940px, 97vw);
}

.modal--inbound-setup .modal-header {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 8px 14px;
  align-items: start;
  padding-right: 86px;
}

.modal--inbound-setup .modal-header h3 {
  grid-column: 1;
  grid-row: 1;
}

.modal--inbound-setup .modal-header p {
  grid-column: 1;
  grid-row: 2;
}

.inbound-setup-header-address {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(244, 248, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.inbound-setup-header-label {
  margin-bottom: 8px;
}

.inbound-setup-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbound-setup-header-code {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(40, 80, 160, 0.18);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 255, 0.94));
  color: #16345f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbound-setup-header-copy {
  flex-shrink: 0;
}

.forwarding-setup-body {
  display: grid;
  gap: 12px;
}

.forwarding-setup-step {
  display: grid;
  gap: 12px;
}

.forwarding-setup-progress {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.forwarding-setup-step h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #16345f;
}

.forwarding-setup-step p {
  margin: 0;
}

.forwarding-address-panel {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(244, 248, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.forwarding-address-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.forwarding-address-code {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.18);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 255, 0.94));
  color: #16345f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
}

.forwarding-gmail-tutorial {
  display: grid;
  gap: 18px;
  padding: 11px 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(36, 76, 146, 0.14);
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(242, 247, 255, 0.95)),
    radial-gradient(125% 140% at 0% 0%, rgba(85, 128, 214, 0.08), rgba(85, 128, 214, 0) 55%);
  box-shadow:
    0 8px 20px rgba(33, 64, 120, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.forwarding-gmail-tutorial h5 {
  margin: 0;
  font-size: 0.9rem;
  color: #1c3e6f;
}

.forwarding-tutorial-step-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid rgba(36, 76, 146, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 249, 255, 0.9)),
    radial-gradient(120% 140% at 0% 0%, rgba(84, 126, 206, 0.07), rgba(84, 126, 206, 0) 52%);
  box-shadow:
    0 5px 14px rgba(26, 58, 108, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.forwarding-tutorial-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.forwarding-tutorial-step-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 88, 166, 0.22);
  background: linear-gradient(180deg, rgba(236, 245, 255, 0.98), rgba(223, 237, 255, 0.95));
  color: #214a84;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.forwarding-tutorial-step-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.forwarding-tutorial-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #6280a8;
}

.forwarding-tutorial-step-title {
  margin: 0;
  color: #143a70;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.forwarding-tutorial-step-desc {
  margin: 0;
  line-height: 1.45;
}

.forwarding-tutorial-step-media {
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(44, 83, 151, 0.12);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.95), rgba(243, 248, 255, 0.9));
}

.forwarding-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.forwarding-tutorial-frame {
  margin: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.9));
}

.forwarding-tutorial-frame-image {
  border-radius: 10px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: #f5f8fe;
  overflow: hidden;
  height: clamp(170px, 22vw, 250px);
}

.forwarding-tutorial-frame-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
}

.forwarding-tutorial-frame--trim-bottom .forwarding-tutorial-frame-image {
  height: clamp(155px, 17vw, 210px);
}

.forwarding-tutorial-frame--trim-bottom .forwarding-tutorial-frame-image img {
  object-fit: contain;
  object-position: center top;
  clip-path: inset(0 0 13% 0);
}

.forwarding-tutorial-sequence {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.9));
}

.forwarding-tutorial-sequence-viewport {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(40, 80, 160, 0.12);
  background: #f5f8fe;
  overflow: hidden;
  height: clamp(170px, 22vw, 250px);
  cursor: pointer;
}

.forwarding-tutorial-sequence-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 340ms ease,
    transform 360ms ease;
}

.forwarding-tutorial-sequence-frame.is-active {
  opacity: 1;
  transform: translateY(0);
}

.forwarding-tutorial-sequence-highlight {
  position: absolute;
  border-radius: 12px;
  border: 1px solid rgba(41, 102, 201, 0.46);
  box-shadow:
    0 0 0 2px rgba(67, 129, 225, 0.22),
    0 10px 24px rgba(28, 73, 147, 0.16);
  background: rgba(110, 164, 245, 0.1);
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  transition:
    opacity 280ms ease,
    transform 280ms ease;
}

.forwarding-tutorial-sequence-highlight[data-shape='pill'] {
  border-radius: 999px;
}

.forwarding-tutorial-sequence-highlight[data-shape='soft'] {
  border-radius: 10px;
  background: rgba(110, 164, 245, 0.07);
}

.forwarding-tutorial-sequence-highlight.is-active {
  opacity: 1;
  transform: scale(1);
  animation: forwardingTutorialPulse 1.8s ease-in-out infinite;
}

.forwarding-tutorial-sequence-complete {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(39, 157, 96, 0.3);
  background: rgba(38, 162, 98, 0.16);
  color: #1d6d49;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
  pointer-events: none;
}

.forwarding-tutorial-sequence-complete.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.forwarding-tutorial-sequence-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.forwarding-tutorial-sequence-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.forwarding-tutorial-sequence-dot {
  width: 8px;
  height: 8px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(62, 92, 145, 0.25);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.forwarding-tutorial-sequence-dot.is-active {
  background: rgba(42, 88, 162, 0.72);
  transform: scale(1.08);
}

.forwarding-tutorial-sequence-counter {
  font-variant-numeric: tabular-nums;
  color: #60789a;
}

.forwarding-tutorial-caption--frame {
  min-height: 18px;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.forwarding-tutorial-caption--frame.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.forwarding-tutorial-caption {
  margin: 0;
  line-height: 1.35;
}

@keyframes forwardingTutorialPulse {
  0% {
    box-shadow:
      0 0 0 2px rgba(67, 129, 225, 0.18),
      0 8px 20px rgba(28, 73, 147, 0.13);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(67, 129, 225, 0.24),
      0 12px 24px rgba(28, 73, 147, 0.17);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(67, 129, 225, 0.18),
      0 8px 20px rgba(28, 73, 147, 0.13);
  }
}

.forwarding-steps-list {
  margin: 0;
  padding-left: 20px;
  color: #2d466a;
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.forwarding-step-actions {
  margin-top: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.forwarding-verify-actions {
  align-items: stretch;
}

.forwarding-verify-message {
  margin-top: -2px;
}

.forwarding-collapsible {
  margin-top: 2px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(244, 248, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.forwarding-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1f3f6b;
}

.forwarding-collapsible > summary::-webkit-details-marker {
  display: none;
}

.forwarding-collapsible > summary::after {
  content: '▾';
  font-size: 11px;
  color: #5f7396;
  transition: transform 0.15s ease;
}

.forwarding-collapsible[open] > summary::after {
  transform: rotate(180deg);
}

.forwarding-collapsible-body {
  padding: 2px 12px 12px;
}

.forwarding-filter-snippet {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(40, 80, 160, 0.14);
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(241, 246, 255, 0.95));
  color: #233f66;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.forwarding-connected-note {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(36, 161, 90, 0.26);
  background: rgba(36, 161, 90, 0.12);
  color: #16603f;
  font-size: 12px;
  font-weight: 600;
}

.forwarding-verification-helper {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(232, 242, 255, 0.75));
}

.forwarding-verification-helper code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  color: #1f3f6b;
  word-break: break-word;
}

.forwarding-trust-note {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(33, 66, 120, 0.12);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #4b6288;
  font-size: 11px;
}

.forwarding-trust-note span {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.forwarding-trust-note span + span::before {
  content: '•';
  margin-right: 10px;
  opacity: 0.6;
}

@media (max-width: 720px) {
  .modal {
    padding: 16px;
  }

  .modal-dialog {
    width: min(100%, 96vw);
    max-height: 92vh;
    border-radius: 18px;
    padding: 18px 16px 0;
  }

  .modal-row-two {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal--application-form .modal-footer,
  .modal--add-application .modal-footer,
  .modal--inbound-setup .modal-footer {
    gap: 8px;
  }

  .modal--inbound-setup .modal-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-right: 66px;
  }

  .modal--inbound-setup .modal-header h3,
  .modal--inbound-setup .modal-header p {
    grid-column: 1;
    grid-row: auto;
  }

  .inbound-setup-header-address {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
  }

  .inbound-setup-header-row {
    flex-wrap: wrap;
  }

  .forwarding-tutorial-grid {
    grid-template-columns: 1fr;
  }

  .forwarding-tutorial-sequence-viewport {
    height: clamp(150px, 42vw, 210px);
  }

  .forwarding-step-actions {
    align-items: stretch;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .modal--inbound-setup .modal-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-right: 80px;
  }

  .modal--inbound-setup .modal-header h3,
  .modal--inbound-setup .modal-header p {
    grid-column: 1;
    grid-row: auto;
  }

  .inbound-setup-header-address {
    grid-column: 1;
    grid-row: auto;
    max-width: 470px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-backdrop,
  .modal-dialog,
  .modal-close,
  .modal--application-form .modal-footer .btn[data-role='cancel'],
  .modal--application-form .modal-footer .btn[data-role='confirm'],
  .modal--add-application .modal-footer .btn[data-role='cancel'],
  .modal--add-application .modal-footer .btn[data-role='confirm'] {
    transition: none !important;
    animation: none !important;
  }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  z-index: 1400;
}

.drawer.hidden {
  display: none;
}

.drawer-backdrop {
  background: var(--color-overlay);
}

.drawer-panel {
  background: var(--color-card);
  padding: 0;
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 20px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-left: 4px solid var(--drawer-accent, var(--color-accent));
}

.drawer-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.drawer-subtitle {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 2px;
}

.drawer-header-text {
  flex: 1;
  min-width: 0;
}

.drawer-close {
  border: 1px solid var(--color-border);
  background: #f8fafc;
  color: #111827;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.drawer-close:hover {
  background: var(--color-surface);
}

.drawer-close:active {
  transform: scale(0.97);
}

.drawer-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill.subtle {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}
.pill-status {
  font-weight: 700;
}
.pill-applied {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.pill-offer_received {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #34d399;
}
.pill-interview_requested {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #60a5fa;
}
.pill-interview_scheduled,
.pill-interview_completed,
.pill-phone_screen,
.pill-onsite {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #60a5fa;
}
.pill-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.pill-under_review {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}
.pill-unknown {
  background: #e5e7eb;
  color: #374151;
  border: 1px solid #d1d5db;
}

.drawer-panel[data-status='applied'] .drawer-header {
  --drawer-accent: #f59e0b;
}
.drawer-panel[data-status='offer_received'] .drawer-header {
  --drawer-accent: #16a34a;
}
.drawer-panel[data-status='rejected'] .drawer-header {
  --drawer-accent: #ef4444;
}
.drawer-panel[data-status='under_review'] .drawer-header {
  --drawer-accent: #0ea5e9;
}

.drawer-body {
  padding: 16px 20px 100px;
}

.drawer-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-panel-bg);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}

.drawer-card-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.details-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.details-label {
  color: var(--color-muted);
}

.details-value {
  color: var(--color-text);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--color-card);
  box-shadow: var(--shadow-xs);
}

.timeline-card-top {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.timeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.timeline-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-type {
  font-weight: 600;
  color: var(--color-text);
}

.timeline-confidence {
  font-size: 12px;
}

.timeline-needs-details {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #7a4d00;
  background: #fff4d8;
  border: 1px solid #f2d79a;
}

.timeline-date {
  justify-self: end;
  font-size: 12px;
}

.timeline-subject {
  margin-top: 6px;
  font-weight: 600;
}

.timeline-meta {
  font-size: 12px;
  color: var(--color-muted);
}

.drawer-footer {
  position: sticky;
  bottom: 0;
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  z-index: 2;
}

.drawer-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.drawer-disclosure:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.drawer-disclosure-body.collapsed {
  display: none;
}

.drawer-disclosure .chevron {
  transition: transform 0.2s ease;
}

.ghosted {
  background: var(--color-warning-tint);
  color: var(--color-warning);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
}

.gmail {
  max-width: 640px;
  margin: 40px auto 0;
}

.gmail-verification-note {
  font-size: 12px;
  color: #55647f;
  line-height: 1.4;
  margin-top: 2px;
}

.account-inbox-card {
  position: relative;
  overflow: visible;
  margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid rgba(20, 40, 80, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 20px 46px rgba(15, 35, 80, 0.12),
    0 6px 16px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(20, 40, 80, 0.06);
}

.account-inbox-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.55;
  z-index: 0;
}

.account-inbox-card > * {
  position: relative;
  z-index: 1;
}

.account-inbox-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(25, 55, 103, 0.12);
}

.account-inbox-head-main h3 {
  margin: 0;
}

.account-inbox-head-main p {
  margin: 8px 0 0;
  max-width: 72ch;
  line-height: 1.45;
}

.account-inbox-address-block {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.account-inbox-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.account-inbox-address-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-inbox-address {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 72, 128, 0.2);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(238, 244, 255, 0.95));
  color: #16345f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
}

.account-inbox-meta {
  margin-top: 10px;
  line-height: 1.45;
  color: #4b6387;
}

.account-inbox-username-prompt {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(37, 72, 128, 0.24);
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.9), rgba(244, 249, 255, 0.86));
}

.account-inbox-username-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.account-inbox-username-row input {
  flex: 1 1 240px;
  min-width: 180px;
}

.account-inbox-username-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.account-inbox-username-hint[data-state='error'] {
  color: #b12c2c;
}

.account-inbox-username-hint[data-state='ok'] {
  color: #1f7a3e;
}

.account-inbox-username-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-inbox-username-suggestions .signup-inbox-suggestion {
  font-size: 10.5px;
}

#inbound-old-address-warning {
  margin-top: 10px;
}

.account-inbox-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(25, 55, 103, 0.12);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-inbox-why {
  margin-top: 10px;
  line-height: 1.5;
  max-width: 72ch;
}

.account-diagnostics {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(25, 55, 103, 0.12);
}

.account-diagnostics-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #335b95;
}

.inbound-diagnostics {
  display: grid;
  gap: 12px;
}

.inbound-diagnostics-signal {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(40, 80, 145, 0.14);
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.96), rgba(242, 248, 255, 0.94));
}

.inbound-diagnostics-overload {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(190, 120, 30, 0.22);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(255, 245, 222, 0.92));
  color: #8f5a07;
}

.inbound-diagnostics-table {
  display: grid;
  gap: 8px;
  max-height: min(66vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.inbound-diagnostics-row {
  width: 100%;
  border: 1px solid rgba(39, 74, 128, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(244, 248, 255, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(19, 40, 79, 0.08);
  display: grid;
  grid-template-columns: 1.15fr 1.3fr 2fr 1fr 1fr 1fr 0.95fr 1.1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  color: #243f64;
}

.inbound-diagnostics-row--head {
  border-style: dashed;
  border-color: rgba(41, 83, 151, 0.18);
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.95), rgba(241, 246, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: #4e6587;
  pointer-events: none;
}

button.inbound-diagnostics-row {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button.inbound-diagnostics-row:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 92, 165, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 14px 22px rgba(19, 40, 79, 0.12);
}

.inbound-diagnostics-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbound-provider-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(45, 92, 165, 0.24);
  background: rgba(45, 92, 165, 0.1);
  color: #2a4c7e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.inbound-diagnostics-debug {
  margin: 0 2px 6px;
  border: 1px solid rgba(31, 61, 106, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(241, 247, 255, 0.95));
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.inbound-diagnostics-debug pre {
  margin: 10px 0 0;
  max-height: min(32vh, 280px);
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #233f66;
}

.account-gmail-card {
  position: relative;
  overflow: visible;
  border-radius: 16px;
  border: 1px solid rgba(22, 44, 86, 0.09);
  background: linear-gradient(180deg, #fcfdff 0%, #f7f9fc 100%);
  box-shadow:
    0 10px 24px rgba(15, 35, 80, 0.07),
    0 3px 10px rgba(15, 35, 80, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-gmail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 44%);
  opacity: 0.45;
  z-index: 0;
}

.account-gmail-card > * {
  position: relative;
  z-index: 1;
}

.account-gmail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(25, 55, 103, 0.12);
}

.account-gmail-head h3 {
  margin: 0;
}

.account-legacy-accordion {
  border: 1px solid rgba(24, 47, 92, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.96), rgba(246, 249, 254, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.account-legacy-summary {
  list-style: none;
  display: grid;
  gap: 4px;
  padding: 11px 14px;
  cursor: pointer;
  position: relative;
}

.account-legacy-summary::-webkit-details-marker {
  display: none;
}

.account-legacy-summary::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 14px;
  color: #617898;
  font-size: 11px;
  transition: transform 0.16s ease;
}

.account-legacy-accordion[open] .account-legacy-summary::after {
  transform: rotate(180deg);
}

.account-legacy-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: #2d4468;
}

.account-legacy-summary-note {
  font-size: 12px;
  color: #5a6f8f;
}

.account-legacy-body {
  padding: 2px 14px 14px;
  border-top: 1px solid rgba(24, 47, 92, 0.1);
}

.account-legacy-label {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 68, 124, 0.18);
  background: rgba(224, 236, 253, 0.62);
  color: #284c85;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.account-gmail-identity {
  margin-top: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.account-gmail-email {
  color: #38507a;
  font-weight: 500;
}

.account-gmail-disconnect {
  align-self: start;
}

.account-gmail-body {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.account-gmail-connect-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-gmail-copy {
  line-height: 1.45;
  max-width: 66ch;
}

.account-sync-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(25, 55, 103, 0.12);
}

.account-sync-meta {
  line-height: 1.45;
  min-height: 18px;
  color: #55647f;
}

.account-sync-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.account-sync-action-group {
  position: relative;
  z-index: 48;
}

.account-btn-scan {
  min-height: 48px;
  height: 48px;
  padding: 0 18px;
  font-size: 15px;
}

.account-sync-range-menu {
  z-index: 160;
}

.account-sync-text {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.account-sync-helper {
  max-width: 320px;
  text-align: right;
}

.account-sync-status {
  font-weight: 600;
  color: #1f3f72;
}

.events-panel {
  margin-top: 24px;
}

.events-panel .table-header,
.events-panel .table-row {
  grid-template-columns: 1.2fr 1.2fr 0.8fr 0.8fr;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-info-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(20, 40, 80, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 20px 46px rgba(15, 35, 80, 0.12),
    0 6px 16px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(20, 40, 80, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-help-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(20, 40, 80, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 20px 46px rgba(15, 35, 80, 0.12),
    0 6px 16px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(20, 40, 80, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-help-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.55;
  z-index: 0;
}

.account-help-card > * {
  position: relative;
  z-index: 1;
}

.account-info-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.55;
  z-index: 0;
}

.account-info-card > * {
  position: relative;
  z-index: 1;
}

.account-card-header {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(25, 55, 103, 0.12);
}

.account-card-header h3 {
  margin: 0;
}

.account-card-header p {
  margin: 0;
}

.account-panel-body {
  display: grid;
  gap: 14px;
}

.account-help-body {
  gap: 12px;
}

.account-help-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.account-help-value {
  color: #1f3f72;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.account-help-note {
  padding-top: 8px;
  border-top: 1px solid rgba(25, 55, 103, 0.1);
  line-height: 1.45;
}

.account-help-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-row--identity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.account-row-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.account-row-value.account-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #152744;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-row-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(36, 74, 136, 0.2);
  background:
    radial-gradient(125% 140% at 24% 8%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
  color: rgba(22, 53, 103, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(15, 35, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(15, 44, 92, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.account-copy-btn svg {
  width: 16px;
  height: 16px;
  display: none !important;
}

.account-copy-btn {
  position: relative;
  color: #111827;
}

.account-copy-btn::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background:
    center / 16px 16px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='10' height='10' rx='2'/%3E%3Cpath d='M5 15V7a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E");
}

.account-copy-btn:hover:not(:disabled) {
  color: #0f172a;
}

.account-copy-btn:hover:not(:disabled) svg {
  stroke: #0f172a !important;
}

.account-copy-btn:hover:not(:disabled)::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='10' height='10' rx='2'/%3E%3Cpath d='M5 15V7a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E");
}

.account-copy-btn svg *,
.account-copy-btn:hover:not(:disabled) svg * {
  stroke: inherit !important;
  fill: none !important;
}

.icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(48, 95, 170, 0.26);
  color: rgba(18, 47, 96, 0.94);
  box-shadow:
    0 12px 22px rgba(15, 35, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(15, 44, 92, 0.12);
}

.icon-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 6px 12px rgba(15, 35, 80, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(15, 44, 92, 0.16);
}

.icon-btn:focus-visible {
  outline: 2px solid rgba(60, 120, 255, 0.45);
  outline-offset: 2px;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    0 4px 10px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.account-copy-feedback {
  min-width: 48px;
  color: #166534;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.account-copy-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.account-auth-section {
  border-top: 1px solid rgba(25, 55, 103, 0.1);
  padding-top: 14px;
}

.account-section-heading {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.account-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
  color: #465a79;
  font-size: 12px;
  font-weight: 600;
  box-shadow:
    0 8px 18px rgba(15, 35, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.auth-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.58;
}

.auth-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.auth-badge[data-state='on'] {
  color: #14532d;
  border-color: rgba(22, 163, 74, 0.26);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(229, 248, 236, 0.92));
}

.auth-badge[data-state='on'][data-provider='google'] {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.24);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(229, 240, 255, 0.9));
}

.auth-badge[data-state='off'] {
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.2);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.92));
}

.account-actions-row {
  border-top: 1px solid rgba(25, 55, 103, 0.12);
  padding-top: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-actions-primary {
  display: grid;
  gap: 8px;
}

.account-password-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-password-copy {
  line-height: 1.45;
}

.account-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  border-color: rgba(220, 38, 38, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 242, 0.92));
  color: #b42318;
  box-shadow:
    0 9px 18px rgba(127, 29, 29, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.account-logout-btn:hover:not(:disabled) {
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.32);
  box-shadow:
    0 12px 22px rgba(127, 29, 29, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.account-logout-btn:active:not(:disabled) {
  box-shadow:
    0 6px 12px rgba(127, 29, 29, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.account-logout-btn:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.36);
  outline-offset: 2px;
}

.account-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-password-success {
  color: var(--color-success);
}

.form-grid.inline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin-bottom: 16px;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.board-col {
  background: var(--color-panel-bg);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
}

.board-col h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.board-card {
  background: var(--color-card);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--color-border);
}

.hidden {
  display: none;
}

.app-toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12000;
  display: grid;
  gap: 8px;
}

.app-toast {
  min-width: 220px;
  max-width: min(360px, 85vw);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(20, 60, 120, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  box-shadow:
    0 18px 38px rgba(10, 30, 70, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 170ms ease, opacity 170ms ease;
}

.app-toast.app-toast-success {
  border-color: rgba(17, 124, 61, 0.28);
}

.app-toast.app-toast-danger {
  border-color: rgba(155, 28, 28, 0.3);
}

.app-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: 1fr;
  }

  #applications-table .table-header,
  #applications-table .table-row {
    grid-template-columns: 1fr 1fr 56px;
    grid-template-areas:
      'company role select'
      'status activity select';
  }

  #archived-table .table-header,
  #archived-table .table-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'company role'
      'status activity'
      'confidence source';
  }

  #applications-table .table-header,
  #archived-table .table-header {
    display: none;
  }

  #applications-table .table-row .table-col-company,
  #archived-table .table-row > div:nth-child(1) {
    grid-area: company;
  }

  #applications-table .table-row .table-col-role,
  #archived-table .table-row > div:nth-child(2) {
    grid-area: role;
  }

  #applications-table .table-row .table-col-status,
  #archived-table .table-row > div:nth-child(3) {
    grid-area: status;
  }

  #applications-table .table-row .table-col-activity,
  #archived-table .table-row > div:nth-child(4) {
    grid-area: activity;
  }

  #applications-table .table-row .table-col-select {
    grid-area: select;
    align-self: stretch;
    justify-content: flex-end;
    padding-right: 2px;
  }

  #archived-table .table-row > div:nth-child(5) {
    grid-area: confidence;
  }

  #archived-table .table-row > div:nth-child(6) {
    grid-area: source;
  }
}

@media (max-width: 760px) {
  .table-bulk-bar {
    width: calc(100vw - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .table-bulk-actions {
    width: 100%;
  }

  .table-bulk-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (max-width: 900px) {
  .layout {
    padding: 12px 18px 80px;
  }

  .topbar {
    padding: 12px 24px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .brand {
    gap: 10px;
    min-width: 0;
  }

  .brand-sub {
    display: none;
  }

  .topbar-right {
    margin-left: auto;
    gap: 8px;
  }

  .nav {
    display: none;
  }

  .profile-menu-mobile {
    display: inline-flex;
  }

  .profile-menu-panel {
    right: 0;
    left: auto;
    min-width: min(220px, calc(100vw - 24px));
  }

  .sync-banner-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sync-banner-actions {
    justify-content: flex-start;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-inbox-head {
    grid-template-columns: 1fr;
  }

  .account-inbox-actions {
    align-items: stretch;
  }

  .account-help-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .account-help-actions {
    align-items: stretch;
  }

  .account-row--identity {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'label action'
      'value value';
    row-gap: 8px;
  }

  .account-row-label {
    grid-area: label;
  }

  .account-row-value.account-email {
    grid-area: value;
    white-space: normal;
    word-break: break-all;
  }

  .account-row-action {
    grid-area: action;
    justify-self: end;
  }

  .account-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .account-logout-btn {
    align-self: flex-start;
  }

  .form-grid.inline {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .account-gmail-head {
    grid-template-columns: 1fr;
  }

  .account-gmail-disconnect {
    justify-self: start;
  }

  .account-sync-block {
    grid-template-columns: 1fr;
  }

  .account-sync-controls {
    justify-items: start;
  }

  .account-sync-text {
    justify-content: flex-start;
  }

  .account-sync-helper {
    text-align: left;
    max-width: none;
  }

  .legacy-sync-details {
    max-width: none;
  }

  .scan-card {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .scan-card__right {
    align-items: flex-start;
    min-width: 0;
  }

  .sync-inline-controls,
  .sync-quick-controls {
    width: 100%;
    align-items: flex-start;
    margin-left: 0;
  }

  .sync-helper-text {
    text-align: left;
    max-width: none;
  }

  .sync-range-menu {
    right: auto;
    left: 0;
    min-width: min(220px, calc(100vw - 56px));
  }

  .account-sync-range-menu {
    min-width: min(220px, calc(100vw - 72px));
  }
}

@media (max-width: 720px) {
  .drawer {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ats-panel {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface-muted);
  display: grid;
  gap: 8px;
}

.ats-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  margin: 6px 0 8px;
  overflow: hidden;
}

.ats-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  width: 0%;
  transition: width 0.25s ease;
}

.list button {
  width: 100%;
  justify-content: flex-start;
}
.preview {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
}

#rc-suggestions .card {
  border: 1px solid var(--color-border);
  background: var(--surface);
}
#rc-suggestions .inline {
  justify-content: space-between;
  align-items: center;
}
#rc-preview-block .card-header {
  justify-content: space-between;
  align-items: center;
}

/* =========================
   Homepage: SOLID 3D BEVEL SURFACES (NO GLASS)
   ========================= */

.home .surface,
.home-page .surface{
  position: relative;
  isolation: isolate; /* creates a stable stacking context */
  border-radius: 28px;

  /* SOLID face (no see-through) */
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* crisp edge */
  border: 1px solid rgba(20, 60, 120, .18);

  /* depth + bevel (outer shadows + inner highlights) */
  box-shadow:
    /* key shadow */
    0 30px 70px rgba(10,30,70,.22),
    0 10px 26px rgba(10,30,70,.14),

    /* inner bevel */
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 14px 24px rgba(255,255,255,.75),
    inset 0 -18px 28px rgba(10,30,70,.10),
    inset 18px 0 24px rgba(255,255,255,.55),
    inset -18px 0 24px rgba(10,30,70,.06);

  overflow: hidden;
}

/* Base plate goes BEHIND the panel, so it can’t tint the face */
.home .surface::before,
.home-page .surface::before{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  z-index: -1;                /* behind the surface */
  transform: translateY(10px);
  background: rgba(10,30,70,.20); /* solid dark base */
  filter: blur(18px);
  opacity: .30;
}

/* Optional: a tiny top rim highlight ONLY (kept subtle) */
.home .surface::after,
.home-page .surface::after{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 26px;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;

  /* pure highlight, no large translucent wash */
  background: linear-gradient(180deg,
    rgba(255,255,255,.95) 0%,
    rgba(255,255,255,0) 100%);
  opacity: .55;
}

/* keep content above rim highlight */
.home .surface > *,
.home-page .surface > *{
  position: relative;
  z-index: 1;
}

.home .surface-pad,
.home-page .surface-pad{ padding: 30px; }
@media (max-width: 860px){
  .home .surface-pad,
  .home-page .surface-pad{ padding: 18px; }
}

/* Inner tiles: solid + mini bevel */
.home .tile,
.home-page .tile{
  background: #ffffff !important;
  border: 1px solid rgba(20,60,120,.14);
  border-radius: 18px;

  box-shadow:
    0 14px 26px rgba(10,30,70,.12),
    0 5px 12px rgba(10,30,70,.08),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -12px 18px rgba(10,30,70,.08);

  overflow: hidden;
}

.home .tile-hover,
.home-page .tile-hover{
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.home .tile-hover:hover,
.home-page .tile-hover:hover{
  transform: translateY(-3px);
  border-color: rgba(20,60,120,.20);
  box-shadow:
    0 20px 36px rgba(10,30,70,.14),
    0 7px 16px rgba(10,30,70,.10),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -12px 18px rgba(10,30,70,.08);
}

/* Ensure wrapper shells don’t override surfaces */
.home .home-hero,
.home-page .home-hero,
.home .home-panel,
.home-page .home-panel,
.home .home-panel-permissions,
.home-page .home-panel-permissions,
.home .home-panel-cta,
.home-page .home-panel-cta{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* =========================================
   FINAL OVERRIDE: HOME SURFACES MUST BE SOLID
   (kills any glass/transparent layering)
   ========================================= */

/* Make sure we’re targeting the homepage. If your body uses a different class,
   include it here too (e.g. .landing). */
.home .surface,
.home .tile{
  background-color: #ffffff !important;
  background-image: none !important;
  opacity: 1 !important;

  /* kill “glass” mechanisms */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;

  /* prevent inherited translucency tricks */
  isolation: isolate !important;
}

/* Remove ALL pseudo-element overlays that can tint the panel face */
.home .surface::before,
.home .surface::after,
.home .tile::before,
.home .tile::after{
  content: none !important;
  display: none !important;
}

/* Also ensure wrapper shells are not translucent */
.home .home-hero,
.home .home-panel,
.home .home-panel-permissions,
.home .home-panel-cta{
  background: transparent !important;
  background-image: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

/* NOW rebuild 3D bevel using ONLY border + shadows (no overlays) */
.home .surface{
  border-radius: 28px !important;
  border: 1px solid rgba(20, 60, 120, .20) !important;

  box-shadow:
    0 30px 70px rgba(10,30,70,.22),
    0 12px 28px rgba(10,30,70,.14),

    /* crisp top highlight + inner bevel */
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 10px 18px rgba(255,255,255,.75),
    inset 0 -18px 28px rgba(10,30,70,.10),
    inset 18px 0 22px rgba(255,255,255,.60),
    inset -18px 0 22px rgba(10,30,70,.06) !important;
}

.home .surface-pad{ padding: 30px !important; }
@media (max-width: 860px){
  .home .surface-pad{ padding: 18px !important; }
}

.home .tile{
  border-radius: 18px !important;
  border: 1px solid rgba(20,60,120,.14) !important;

  box-shadow:
    0 14px 26px rgba(10,30,70,.12),
    0 6px 14px rgba(10,30,70,.08),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -14px 22px rgba(10,30,70,.08) !important;
}

.home .tile-hover{
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.home .tile-hover:hover{
  transform: translateY(-3px);
  border-color: rgba(20,60,120,.22) !important;
  box-shadow:
    0 20px 36px rgba(10,30,70,.14),
    0 9px 18px rgba(10,30,70,.10),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -14px 22px rgba(10,30,70,.08) !important;
}

/* =========================================
   FINAL FIX: SOLID 3D SURFACES (OPAQUE FACE LAYER)
   ========================================= */

/* Put the animated background BEHIND everything */
.home .animated-bg,
.home canvas,
.home #animated-bg,
.home .animated-background,
.home .bg-canvas {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Ensure the homepage content sits above background */
.home body,
.home main,
.home .home-root,
.home .home-wrap,
.home .home-grid,
.home .home-section {
  position: relative;
  z-index: 1;
}

/* SOLID panel base: isolate + explicit opaque face */
.home .surface,
.home .tile {
  position: relative !important;
  isolation: isolate !important;      /* prevents blend-through */
  z-index: 2 !important;

  background: transparent !important; /* face is drawn by ::before */
  opacity: 1 !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

/* OPAQUE FACE LAYER */
.home .surface::before,
.home .tile::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;

  background: #ffffff !important;     /* TRUE solid face */
  opacity: 1 !important;

  z-index: 0 !important;
}

/* Kill any other overlays */
.home .surface::after,
.home .tile::after {
  content: none !important;
  display: none !important;
}

/* Ensure panel content is above the face */
.home .surface > *,
.home .tile > * {
  position: relative;
  z-index: 1;
}

/* STRONG 3D BEVEL for surfaces */
.home .surface {
  border-radius: 28px !important;
  border: 1px solid rgba(20, 60, 120, 0.22) !important;

  box-shadow:
    /* outer depth */
    0 40px 90px rgba(10, 30, 70, 0.28),
    0 16px 34px rgba(10, 30, 70, 0.16),

    /* crisp rim highlight + inner bevel */
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 14px 22px rgba(255, 255, 255, 0.75),
    inset 0 -26px 34px rgba(10, 30, 70, 0.12),
    inset 26px 0 30px rgba(255, 255, 255, 0.55),
    inset -26px 0 30px rgba(10, 30, 70, 0.08) !important;
}

/* STRONG 3D BEVEL for inner tiles */
.home .tile {
  border-radius: 18px !important;
  border: 1px solid rgba(20, 60, 120, 0.18) !important;

  box-shadow:
    0 18px 32px rgba(10, 30, 70, 0.14),
    0 7px 16px rgba(10, 30, 70, 0.10),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -18px 26px rgba(10, 30, 70, 0.10) !important;
}

.home .tile-hover {
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.home .tile-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 60, 120, 0.28) !important;
  box-shadow:
    0 26px 44px rgba(10, 30, 70, 0.16),
    0 10px 22px rgba(10, 30, 70, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -18px 26px rgba(10, 30, 70, 0.10) !important;
}

/* padding */
.home .surface-pad { padding: 30px !important; }
@media (max-width: 860px){
  .home .surface-pad { padding: 18px !important; }
}

/* =========================================================
   HOMEPAGE: SOLID WHITE 3D PANELS (HARD OVERRIDE)
   Do NOT use .surface/.tile on homepage anymore.
   ========================================================= */

.home .hp-panel,
.home .hp-item {
  /* kill any "glass" / blending / filtering from global rules */
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  opacity: 1 !important;
}

.home .hp-panel {
  background-color: #ffffff !important;   /* absolute solid face */
  border-radius: 28px !important;
  border: 1px solid rgba(18, 55, 110, 0.18) !important;

  /* strong 3D bevel + depth */
  box-shadow:
    0 46px 110px rgba(10, 30, 70, 0.30),
    0 18px 42px rgba(10, 30, 70, 0.18),
    inset 0 2px 0 rgba(255,255,255, 1),
    inset 0 14px 24px rgba(255,255,255, 0.75),
    inset 0 -30px 38px rgba(10,30,70, 0.12),
    inset 24px 0 26px rgba(255,255,255, 0.55),
    inset -24px 0 26px rgba(10,30,70, 0.08) !important;

  position: relative !important;
  z-index: 2 !important;
  overflow: hidden !important;
}

.home .hp-panel--pad {
  padding: 30px !important;
}

@media (max-width: 860px) {
  .home .hp-panel--pad { padding: 18px !important; }
}

.home .hp-item {
  background-color: #ffffff !important;
  border-radius: 18px !important;
  border: 1px solid rgba(18, 55, 110, 0.14) !important;

  box-shadow:
    0 20px 36px rgba(10, 30, 70, 0.16),
    0 8px 18px rgba(10, 30, 70, 0.10),
    inset 0 2px 0 rgba(255,255,255, 1),
    inset 0 -18px 26px rgba(10,30,70, 0.10) !important;

  position: relative !important;
}

.home .hp-item--hover {
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}

.home .hp-item--hover:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 55, 110, 0.22) !important;
  box-shadow:
    0 28px 48px rgba(10, 30, 70, 0.18),
    0 12px 24px rgba(10, 30, 70, 0.12),
    inset 0 2px 0 rgba(255,255,255, 1),
    inset 0 -18px 26px rgba(10,30,70, 0.10) !important;
}

/* Ensure nothing can "paint over" these panels */
.home .hp-panel::before,
.home .hp-panel::after,
.home .hp-item::before,
.home .hp-item::after {
  content: none !important;
  display: none !important;
}

.home .animated-bg,
.home canvas,
.home #animated-bg,
.home .animated-background,
.home .bg-canvas {
  z-index: 0 !important;
  pointer-events: none !important;
}
.home main,
.home .home-root,
.home .home-wrap {
  position: relative;
  z-index: 1;
}

/* Homepage panel-specific transparency tuning */
.home .home-panel-permissions.hp-panel {
  background-color: rgba(255, 255, 255, 0.92) !important;
}

.home .home-panel-cta.hp-panel {
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* =========================================================
   Homepage Billboard Refresh (final override)
   ========================================================= */

body.home-page .home-main {
  display: block;
  gap: 0;
  padding: 0 0 54px;
  --auth-particle-opacity-mult: 0.56;
}

body.home-page .page-wrap {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding-inline: 24px;
  box-sizing: border-box;
}

body.home-page .home-below {
  position: relative;
  z-index: 4;
}

body.home-page .home-sections {
  padding: 64px 0 80px;
}

body.home-page .home-anchor {
  scroll-margin-top: 112px;
}

body.home-page .home-stack {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: clamp(28px, 4vh, 36px);
}

body.home-page .home-panel {
  position: relative;
  border-radius: 26px !important;
  padding: clamp(20px, 2.8vw, 30px) !important;
  background: #ffffff !important;
  border: 1px solid rgba(20, 58, 112, 0.15) !important;
  box-shadow:
    0 22px 50px rgba(10, 37, 78, 0.11),
    0 8px 18px rgba(10, 37, 78, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

body.home-page .section-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}

body.home-page .section-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

body.home-page .section-copy h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.05vw, 1.8rem);
  letter-spacing: -0.015em;
  color: #112f59;
}

body.home-page .section-copy p {
  margin: 0;
  max-width: 38ch;
  color: #456186;
  line-height: 1.54;
}

body.home-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.home-page .feature-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(22, 63, 119, 0.12);
  background: #ffffff;
  box-shadow:
    0 10px 22px rgba(10, 37, 78, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.16s ease, box-shadow 0.18s ease;
}

body.home-page .feature-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(10, 37, 78, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.home-page .home-feature-copy h3 {
  margin: 0;
  font-size: 0.97rem;
  color: #123660;
}

body.home-page .home-feature-copy p {
  margin: 6px 0 0;
  font-size: 0.89rem;
  line-height: 1.45;
  color: #4a658a;
}

body.home-page .home-how-points {
  margin: 2px 0 0;
  padding-left: 18px;
  color: #33567f;
  display: grid;
  gap: 7px;
  line-height: 1.45;
}

body.home-page .home-setup-time {
  margin: 4px 0 0;
  color: #234a80;
  font-size: 0.9rem;
  font-weight: 600;
}

body.home-page .step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.home-page .step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 64, 120, 0.14);
  background: #ffffff;
  box-shadow:
    0 12px 24px rgba(10, 37, 78, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 0.16s ease, box-shadow 0.18s ease;
}

body.home-page .step-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 30px rgba(10, 37, 78, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

body.home-page .step-badge {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #f5fbff;
  background: linear-gradient(135deg, #2a63bf, #4f85dc);
  box-shadow:
    0 8px 14px rgba(19, 58, 114, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.home-page .home-step-copy h3 {
  margin: 2px 0 0;
  font-size: 1rem;
  color: #123964;
}

body.home-page .home-step-copy p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.43;
  color: #4a658a;
}

body.home-page .home-panel-permissions {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 60%, #f2f7ff 100%) !important;
}

body.home-page .home-scope-label {
  margin: 16px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #36527d;
  font-weight: 700;
}

body.home-page .home-scope-badge {
  margin: 8px 0 0;
}

body.home-page .home-scope-badge code {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(18, 58, 112, 0.08);
  border: 1px solid rgba(18, 58, 112, 0.16);
  font-size: 0.84rem;
}

body.home-page .home-check-list {
  margin-top: 14px;
  gap: 10px;
}

body.home-page .home-check-list li {
  color: #2f4b70;
  font-size: 0.93rem;
  line-height: 1.45;
}

body.home-page .home-panel-cta {
  padding: clamp(20px, 2.8vw, 30px) !important;
  background: linear-gradient(130deg, #1d4a98 0%, #2b61b8 58%, #4f86db 100%) !important;
  border-color: rgba(60, 114, 197, 0.26) !important;
  box-shadow:
    0 26px 56px rgba(13, 46, 96, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -12px 24px rgba(9, 33, 72, 0.22) !important;
}

body.home-page .home-panel-cta h2 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(1.42rem, 2.4vw, 1.9rem);
}

body.home-page .home-panel-cta p {
  margin: 9px 0 0;
  color: rgba(246, 251, 255, 0.93);
  max-width: 60ch;
}

body.home-page .home-panel-cta .home-cta-row {
  margin-top: 16px;
  gap: 12px;
}

body.home-page .home-panel-cta .btn-bevel {
  min-height: 50px;
  min-width: 164px;
  padding: 0.84rem 1.5rem;
  font-size: 0.98rem;
}

body.home-page .home-nav {
  position: sticky;
  top: 14px;
  z-index: 36;
  width: min(1240px, 90vw);
  margin-inline: auto;
  margin-top: 14px;
  background: rgba(247, 252, 255, 0.8);
  border-color: rgba(21, 60, 118, 0.16);
  box-shadow: 0 12px 30px rgba(10, 44, 96, 0.16);
}

body.home-page .home-billboard {
  --home-nav-overlap: clamp(86px, 10vh, 112px);
  --home-cap-width: 150vw;
  --home-cap-height: clamp(150px, 20vh, 210px);
  --home-cap-lift: clamp(180px, 20vw, 260px);
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: calc(var(--home-nav-overlap) * -1);
  min-height: calc(100svh + var(--home-nav-overlap));
  padding: calc(var(--home-cap-height) + clamp(34px, 5.6vh, 66px)) 20px clamp(42px, 6.8vh, 74px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

/* ===========================
   HOME: 3D HERO CAP (SOLID)
   =========================== */
body.home-page .home-cap {
  position: absolute;
  top: calc(0px - var(--home-cap-lift));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: var(--home-cap-width);
  height: calc(var(--home-cap-height) + var(--home-cap-lift));
  border-radius: 0 0 70% 70% / 0 0 58% 58%;
  background: linear-gradient(180deg, #2d73ff 0%, #1f5fe6 40%, #1b55d6 70%, #184fc8 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -18px 28px rgba(0, 0, 0, 0.18),
    inset 0 12px 18px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

body.home-page .home-cap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.12) 25%,
      rgba(255, 255, 255, 0) 55%
    );
  opacity: 0.9;
}

body.home-page .home-cap::after {
  content: '';
  position: absolute;
  inset: -40% -60%;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 65%,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.1) 55%,
      rgba(0, 0, 0, 0.2) 100%
    ),
    linear-gradient(115deg,
      rgba(255, 255, 255, 0) 35%,
      rgba(255, 255, 255, 0.1) 48%,
      rgba(255, 255, 255, 0) 60%
    );
  transform: translateX(-30%);
  opacity: 0.75;
  animation: capSheen 10s ease-in-out infinite;
}

body.home-page .home-cap .cap-noise {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

body.home-page .home-cap .home-cap-sweep {
  display: none;
}

body.home-page .home-billboard-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(10px, 1.7vh, 17px);
  text-align: center;
  perspective: 1200px;
}

body.home-page .hero-banner {
  display: grid;
  place-items: center;
  width: clamp(280px, 51vw, 770px);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.home-page .hero-value {
  width: min(97vw, 1240px);
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(5px, 0.9vh, 8px);
  margin-top: clamp(-2px, -0.28vh, 0px);
  text-align: center;
}

body.home-page .hero-value__title {
  margin: 0;
  max-width: none;
  color: #0f274d;
  font-size: clamp(1.42rem, 2vw, 1.92rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 20px rgba(10, 37, 78, 0.08);
  text-wrap: balance;
}

body.home-page .hero-value__subtitle {
  margin: 0;
  max-width: none;
  color: rgba(18, 45, 89, 0.84);
  font-size: clamp(0.95rem, 1.02vw, 1.04rem);
  line-height: 1.38;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
  text-wrap: pretty;
}

body.home-page .hero-value__focus {
  color: #0c2f66;
  font-weight: 800;
}

body.home-page .hero-value::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(36, 82, 157, 0.22);
  box-shadow: -160px 0 0 rgba(36, 82, 157, 0.16), 160px 0 0 rgba(36, 82, 157, 0.16);
  pointer-events: none;
}

body.home-page .hero-value::after {
  content: none;
}

@media (min-width: 1100px) {
  body.home-page .hero-value__title,
  body.home-page .hero-value__subtitle {
    white-space: nowrap;
  }
}

body.home-page .hero-banner__intro {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  isolation: isolate;
  opacity: 1;
  transform: translateY(0) scale(1);
  clip-path: inset(0 0 0 0);
}

body.home-page .hero-banner__intro::before,
body.home-page .hero-banner__intro::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

body.home-page .hero-banner__intro::before {
  background: linear-gradient(
    108deg,
    rgba(255, 255, 255, 0) 8%,
    rgba(255, 255, 255, 0.7) 44%,
    rgba(236, 245, 255, 0.92) 52%,
    rgba(255, 255, 255, 0) 84%
  );
  transform: translateX(-135%);
  z-index: 2;
}

body.home-page .hero-banner__intro::after {
  inset: 8% -12%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.24) 47%,
    rgba(255, 255, 255, 0.08) 53%,
    rgba(255, 255, 255, 0) 64%
  );
  transform: translateX(-130%);
  z-index: 3;
}

body.home-page .hero-banner.is-intro .hero-banner__intro {
  animation: heroIn 980ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

body.home-page .hero-banner.is-intro .hero-banner__intro::before {
  animation: heroReveal 1050ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

body.home-page .hero-banner.is-intro .hero-banner__intro::after {
  animation: heroSweep 900ms cubic-bezier(0.2, 0.9, 0.2, 1) 300ms both;
}

body.home-page .hero-banner__float {
  width: 100%;
  transform-origin: 50% 60%;
  animation: heroFloat 8s ease-in-out infinite;
  will-change: transform;
}

body.home-page .hero-banner__tilt {
  width: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.home-page .hero-banner__img {
  display: block;
  width: 100%;
  height: auto;
  filter: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

body.home-page .home-billboard-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(2px, 0.8vh, 8px);
}

body.home-page .home-billboard-cta .btn-primary {
  min-height: clamp(48px, 5.2vw, 60px);
  min-width: clamp(184px, 16.4vw, 276px);
  box-shadow:
    0 24px 44px rgba(13, 41, 88, 0.38),
    0 10px 20px rgba(12, 36, 78, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 11px rgba(8, 27, 58, 0.28);
}

body.home-page .home-billboard-cta .btn-secondary {
  min-height: clamp(46px, 5vw, 56px);
  min-width: clamp(172px, 15vw, 250px);
  color: rgba(18, 51, 95, 0.9);
  border-color: rgba(21, 58, 112, 0.14);
  background:
    radial-gradient(140% 140% at 24% 12%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow:
    0 10px 22px rgba(12, 34, 72, 0.14),
    0 4px 10px rgba(12, 34, 72, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -2px 7px rgba(12, 34, 72, 0.06);
}

body.home-page .home-billboard-cta .btn-secondary:hover {
  color: rgba(16, 46, 88, 0.92);
  border-color: rgba(21, 58, 112, 0.2);
  box-shadow:
    0 12px 24px rgba(12, 34, 72, 0.16),
    0 5px 12px rgba(12, 34, 72, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 7px rgba(12, 34, 72, 0.06);
}

body.home-page .home-hero-trust {
  margin-top: clamp(2px, 0.8vh, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-size: 12.2px;
  color: rgba(20, 49, 94, 0.82);
  letter-spacing: 0.01em;
}

body.home-page .home-hero-trust::before {
  content: '';
  flex: 0 0 100%;
  width: min(66%, 560px);
  height: 1px;
  margin: 0 auto 14px;
  background: linear-gradient(
    to right,
    rgba(17, 46, 92, 0),
    rgba(17, 46, 92, 0.18),
    rgba(17, 46, 92, 0)
  );
  pointer-events: none;
}

body.home-page .home-hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

body.home-page .home-hero-trust-icon {
  width: 16px;
  height: 16px;
  color: rgba(20, 57, 107, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.home-page .home-hero-trust-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.home-page .btn-bevel {
  min-height: clamp(46px, 5vw, 58px);
  min-width: clamp(154px, 15vw, 254px);
  padding: clamp(0.76rem, 1.2vw, 1.02rem) clamp(1.2rem, 1.95vw, 2rem);
  border-radius: 999px;
  font-size: clamp(0.96rem, 1.08vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.home-page .btn-bevel.btn-primary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(140% 140% at 24% 12%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #2d67cf 0%, #1c4ead 56%, #163f8f 100%);
  box-shadow:
    0 20px 38px rgba(14, 42, 92, 0.34),
    0 8px 16px rgba(12, 36, 78, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -4px 10px rgba(8, 27, 58, 0.28);
}

body.home-page .btn-bevel.btn-primary:hover {
  background:
    radial-gradient(140% 140% at 24% 12%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #3773dc 0%, #2459bf 56%, #1a489f 100%);
}

body.home-page .btn-bevel.btn-secondary {
  color: #12335f;
  border-color: rgba(21, 58, 112, 0.18);
  background:
    radial-gradient(140% 140% at 24% 12%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow:
    0 14px 28px rgba(12, 34, 72, 0.18),
    0 5px 12px rgba(12, 34, 72, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -2px 8px rgba(12, 34, 72, 0.08);
}

body.home-page .btn-bevel.btn-secondary:hover {
  color: #0f2e58;
  border-color: rgba(21, 58, 112, 0.28);
  background:
    radial-gradient(140% 140% at 24% 12%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
}

body.home-page #how-it-works {
  scroll-margin-top: 120px;
}

body.home-page.reveal-ready .reveal,
body.home-page.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(2px);
  transition: opacity 520ms ease, transform 520ms ease, filter 520ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

body.home-page.reveal-ready .reveal.is-visible,
body.home-page.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.home-page .home-nav,
body.home-page .hero-animate-logo,
body.home-page .hero-animate-headline,
body.home-page .hero-animate-cta [data-cta-btn],
body.home-page .home-hero-trust,
body.home-page .reveal {
  will-change: opacity, transform;
}

body.home-page.animate-ready:not(.home-loaded) .home-nav {
  opacity: 0;
  transform: translateY(-10px);
}

body.home-page.animate-ready.home-loaded .home-nav {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 200ms ease, transform 200ms ease;
}

body.home-page.animate-ready:not(.home-loaded) .hero-animate-logo {
  opacity: 0;
  transform: translateY(8px);
}

body.home-page.animate-ready.home-loaded .hero-animate-logo {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.home-page.animate-ready:not(.home-loaded) .hero-animate-headline {
  opacity: 0;
  transform: translateY(8px);
}

body.home-page.animate-ready.home-loaded .hero-animate-headline {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease-out 120ms, transform 420ms ease-out 120ms;
}

body.home-page.animate-ready:not(.home-loaded) .hero-animate-cta [data-cta-btn] {
  opacity: 0;
  transform: translateY(6px);
}

body.home-page.animate-ready.home-loaded .hero-animate-cta [data-cta-btn] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.home-page.animate-ready.home-loaded .hero-animate-cta [data-cta-btn='primary'] {
  transition-delay: 220ms;
}

body.home-page.animate-ready.home-loaded .hero-animate-cta [data-cta-btn='secondary'] {
  transition-delay: 300ms;
}

body.home-page.animate-ready:not(.home-loaded) .home-hero-trust {
  opacity: 0;
  transform: translateY(6px);
}

body.home-page.animate-ready.home-loaded .home-hero-trust {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease 360ms, transform 420ms ease 360ms;
}

@keyframes home-cap-sweep {
  0% {
    transform: translateX(-65%) skewX(-12deg);
  }
  100% {
    transform: translateX(65%) skewX(-12deg);
  }
}

@keyframes capSheen {
  0% {
    transform: translateX(-35%);
    opacity: 0.55;
  }
  50% {
    transform: translateX(35%);
    opacity: 0.75;
  }
  100% {
    transform: translateX(-35%);
    opacity: 0.55;
  }
}

@keyframes heroFloat {
  0% {
    transform: translateY(0px) rotateZ(-0.35deg) scale(1);
  }
  50% {
    transform: translateY(-8px) rotateZ(0.35deg) scale(1.01);
  }
  100% {
    transform: translateY(0px) rotateZ(-0.35deg) scale(1);
  }
}

@keyframes heroIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    clip-path: inset(12% 9% 10% 9% round 16px);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round 0);
  }
}

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: translateX(-135%);
  }
  15% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateX(135%);
  }
}

@keyframes heroSweep {
  0% {
    opacity: 0;
    transform: translateX(-130%);
  }
  24% {
    opacity: 0.34;
  }
  100% {
    opacity: 0;
    transform: translateX(130%);
  }
}

@media (max-width: 1280px) and (min-width: 981px) {
  body.home-page .home-billboard {
    --home-cap-width: 158vw;
    --home-cap-height: clamp(138px, 18vh, 186px);
    --home-cap-lift: clamp(152px, 16.5vw, 224px);
    --home-nav-overlap: clamp(86px, 11vh, 108px);
    padding-top: calc(var(--home-cap-height) + clamp(24px, 3.8vh, 42px));
    padding-bottom: clamp(36px, 5.8vh, 58px);
  }

  body.home-page .home-billboard-inner {
    gap: clamp(9px, 1.5vh, 14px);
  }

  body.home-page .hero-banner {
    width: clamp(262px, 48vw, 700px);
  }

  body.home-page .hero-value__title {
    font-size: clamp(1.42rem, 2.15vw, 1.92rem);
    max-width: none;
  }

  body.home-page .hero-value__subtitle {
    font-size: clamp(0.93rem, 1vw, 1rem);
    max-width: none;
  }

  body.home-page .home-billboard-cta {
    margin-top: clamp(0px, 0.5vh, 6px);
    gap: 14px;
  }

  body.home-page .home-hero-trust {
    margin-top: clamp(0px, 0.25vh, 2px);
    gap: 10px 22px;
    font-size: 11.95px;
  }

  body.home-page .home-hero-trust::before {
    width: min(66%, 500px);
    margin-bottom: 10px;
  }
}

@media (max-height: 860px) and (min-width: 981px) {
  body.home-page .home-billboard {
    --home-cap-height: clamp(122px, 15vh, 164px);
    --home-cap-lift: clamp(130px, 14vw, 192px);
    padding-top: calc(var(--home-cap-height) + clamp(14px, 2.4vh, 28px));
    padding-bottom: clamp(22px, 3.8vh, 38px);
  }

  body.home-page .hero-banner {
    width: clamp(250px, 44vw, 620px);
  }

  body.home-page .hero-value__title {
    font-size: clamp(1.26rem, 1.95vw, 1.68rem);
    white-space: normal;
  }

  body.home-page .hero-value__subtitle {
    font-size: clamp(0.88rem, 0.95vw, 0.96rem);
    max-width: none;
    white-space: normal;
  }

  body.home-page .home-billboard-cta {
    margin-top: 0;
  }

  body.home-page .btn-bevel {
    min-height: 48px;
    min-width: clamp(150px, 13vw, 208px);
  }

  body.home-page .home-hero-trust {
    margin-top: 0;
  }

  body.home-page .home-hero-trust::before {
    margin-bottom: 8px;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  body.home-page .hero-value::before,
  body.home-page .hero-value::after {
    display: none;
  }

  body.home-page .hero-value__subtitle {
    display: none;
  }

  body.home-page .home-billboard-inner {
    gap: 8px;
  }
}

@media (max-width: 980px) {
  body.home-page .hero-value::before,
  body.home-page .hero-value::after {
    display: none;
  }

  body.home-page .home-billboard {
    --home-cap-width: 160vw;
    --home-cap-height: clamp(140px, 19vh, 188px);
    --home-cap-lift: clamp(146px, 19vw, 220px);
    --home-nav-overlap: clamp(94px, 13vh, 120px);
    min-height: calc(100svh + var(--home-nav-overlap));
    padding-top: calc(var(--home-cap-height) + clamp(24px, 4.6vh, 44px));
    padding-bottom: clamp(30px, 5.6vh, 46px);
  }

  body.home-page .home-billboard-cta {
    width: min(520px, 100%);
    display: grid;
  }

  body.home-page .btn-bevel {
    width: 100%;
  }

  body.home-page .hero-banner {
    width: min(760px, 84vw);
  }

  body.home-page .hero-value {
    width: min(760px, 94vw);
    gap: 8px;
  }

  body.home-page .hero-value__title {
    font-size: clamp(1.26rem, 3.6vw, 1.78rem);
    max-width: 24ch;
    white-space: normal;
  }

  body.home-page .hero-value__subtitle {
    font-size: clamp(0.9rem, 2.1vw, 1rem);
    max-width: 50ch;
    white-space: normal;
  }

  body.home-page .home-hero-trust {
    max-width: 620px;
    gap: 9px 16px;
  }

  body.home-page .home-hero-trust::before {
    width: min(76%, 520px);
    margin-bottom: 20px;
  }

  body.home-page .page-wrap {
    padding-inline: 20px;
  }

  body.home-page .section-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.home-page .section-copy p {
    max-width: 62ch;
  }

  body.home-page .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  body.home-page .home-nav {
    top: 10px;
    margin-top: 10px;
    width: calc(100% - 24px);
    padding: 10px 12px;
  }

  body.home-page .home-nav-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body.home-page .home-billboard {
    --home-cap-width: 180vw;
    --home-cap-height: clamp(126px, 18vh, 170px);
    --home-cap-lift: clamp(110px, 20vw, 170px);
    --home-nav-overlap: clamp(106px, 18vh, 138px);
    min-height: calc(100svh + var(--home-nav-overlap));
    padding-top: calc(var(--home-cap-height) + clamp(28px, 4vh, 44px));
  }

  body.home-page .home-hero-trust {
    margin-top: clamp(6px, 1.4vh, 10px);
    justify-content: center;
    gap: 8px 12px;
    font-size: 12px;
    max-width: 420px;
  }

  body.home-page .home-hero-trust::before {
    width: 82%;
    margin-bottom: 18px;
  }

  body.home-page .home-hero-trust-item {
    white-space: normal;
  }

  body.home-page .page-wrap {
    padding-inline: 16px;
  }

  body.home-page .home-sections {
    padding: 52px 0 68px;
  }

  body.home-page .home-stack {
    gap: 24px;
  }

  body.home-page .home-panel {
    border-radius: 20px !important;
    padding: 18px !important;
  }

  body.home-page .feature-grid {
    gap: 10px;
  }

  body.home-page .feature-tile {
    padding: 12px;
  }

  body.home-page .step-card {
    padding: 12px;
  }

  body.home-page .home-panel-cta .home-cta-row {
    width: 100%;
  }

  body.home-page .home-panel-cta .home-cta-row .btn {
    flex: 1 1 100%;
  }
}

/* =========================
   Homepage Info Sections
   ========================= */

body.home-page .home-stack {
  gap: clamp(40px, 5.6vh, 70px);
}

body.home-page .info-section {
  width: 100%;
}

body.home-page .surface-card {
  position: relative;
  padding: clamp(30px, 3.1vw, 40px);
  border-radius: 26px;
  border: 1px solid rgba(17, 58, 112, 0.16);
  background: #ffffff;
  box-shadow:
    0 24px 58px rgba(9, 35, 78, 0.14),
    0 8px 18px rgba(9, 35, 78, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -14px 22px rgba(10, 38, 82, 0.07);
}

body.home-page .surface-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(100% 62% at 50% 0%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 40%);
}

body.home-page .info-section__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(26px, 3.2vw, 44px);
  align-items: start;
}

body.home-page .info-section__left {
  display: grid;
  align-content: start;
  gap: 12px;
}

body.home-page .info-section__kicker {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  font-weight: 700;
  text-transform: uppercase;
  color: #3a5f91;
}

body.home-page .info-section__left h2 {
  margin: 0;
  font-size: clamp(1.38rem, 2.2vw, 2.02rem);
  color: #10335f;
  line-height: 1.18;
  letter-spacing: -0.018em;
}

body.home-page .info-section__left h2::after {
  content: '';
  display: block;
  width: 86px;
  height: 2px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(36, 95, 186, 0.95), rgba(36, 95, 186, 0.15));
}

body.home-page .info-section__lead {
  margin: 0;
  max-width: 37ch;
  color: #3d618f;
  line-height: 1.56;
}

body.home-page .info-bullets {
  margin: 2px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #2c4f79;
  line-height: 1.45;
}

body.home-page .info-badge-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.home-page .info-badge-row--trust {
  margin-top: 8px;
}

body.home-page .info-badge-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 60, 116, 0.15);
  background: #f8fbff;
  color: #35577f;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 4px 10px rgba(12, 42, 87, 0.05);
}

body.home-page .info-time-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 60, 116, 0.2);
  color: #1b4a86;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(12, 42, 87, 0.08);
  width: fit-content;
  margin-top: 2px;
  background: #f2f7ff;
}

body.home-page .info-section .tile {
  background: #ffffff;
  border: 1px solid rgba(20, 60, 116, 0.14);
  border-radius: 18px;
  box-shadow:
    0 12px 26px rgba(8, 34, 74, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -10px 16px rgba(8, 34, 74, 0.05);
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

body.home-page .info-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  grid-auto-rows: minmax(0, 1fr);
}

body.home-page .info-feature:nth-child(3) {
  grid-column: 1 / -1;
}

body.home-page .info-feature {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 9px;
  height: 100%;
  padding: 15px;
}

body.home-page .info-feature.tile {
  border: 1px solid rgba(21, 62, 118, 0.14);
  box-shadow:
    0 9px 20px rgba(8, 34, 74, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -7px 14px rgba(8, 34, 74, 0.035);
}

body.home-page .info-feature__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.home-page .info-feature__icon-chip {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #1e56aa;
  background: #f0f6ff;
  border: 1px solid rgba(25, 72, 143, 0.16);
  box-shadow:
    0 5px 11px rgba(13, 45, 88, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 220ms ease;
}

body.home-page .info-feature__icon-chip svg {
  width: 17px;
  height: 17px;
}

body.home-page .info-feature__head h3 {
  margin: 0;
  color: #123962;
  font-size: 0.96rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.home-page .info-feature__copy {
  display: grid;
  align-content: start;
  gap: 6px;
}

body.home-page .info-feature__copy > p:not(.info-feature__proof) {
  margin: 0;
  color: #4c6b93;
  font-size: 0.88rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.home-page .info-feature__proof {
  display: block;
  margin: 0;
  color: #5e789b;
  font-size: 0.74rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.home-page .info-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 60, 116, 0.24);
  box-shadow:
    0 13px 26px rgba(8, 34, 74, 0.125),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -7px 14px rgba(8, 34, 74, 0.035);
}

body.home-page .info-feature:hover .info-feature__icon-chip {
  transform: translateY(-1px) scale(1.04);
}

body.home-page .how-stepper {
  --node-size: 38px;
  --node-col-width: 52px;
  --node-center: calc(var(--node-size) / 2);
  --connector-top: var(--node-center);
  --connector-bottom-offset: var(--node-center);
  position: relative;
}

body.home-page .how-stepper::before {
  content: '';
  position: absolute;
  left: calc(var(--node-col-width) / 2);
  top: var(--connector-top);
  bottom: var(--connector-bottom-offset);
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(21, 59, 115, 0.2),
    rgba(21, 59, 115, 0.38),
    rgba(21, 59, 115, 0.18)
  );
  pointer-events: none;
}

body.home-page .info-stepper {
  position: relative;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

body.home-page .info-stepper::before {
  content: none;
}

body.home-page .info-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--node-col-width) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

body.home-page .info-step__node-col {
  width: var(--node-col-width);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

body.home-page .info-step__node {
  position: relative;
  z-index: 1;
  width: var(--node-size);
  height: var(--node-size);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f9ff;
  font-size: 0.84rem;
  font-weight: 700;
  background: linear-gradient(160deg, #3f75ce, #1f58b5);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 10px 18px rgba(12, 45, 90, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 220ms ease;
}

body.home-page .info-step__card {
  padding: 14px;
}

body.home-page .how-step-card__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body.home-page .how-step-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #163a7a;
  background: #f2f6ff;
  border: 1px solid rgba(20, 40, 90, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px rgba(15, 35, 80, 0.1);
  transition: transform 220ms ease;
}

body.home-page .how-step-card__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  opacity: 0.95;
}

body.home-page .how-step-card__titleWrap h3 {
  margin: 0;
  color: #123962;
  font-size: 0.96rem;
}

body.home-page .how-step-card__titleWrap p {
  margin: 6px 0 0;
  color: #4c6b93;
  font-size: 0.88rem;
  line-height: 1.4;
}

body.home-page .info-step:hover .info-step__card {
  transform: translateY(-2px);
  border-color: rgba(20, 60, 116, 0.23);
  box-shadow:
    0 18px 34px rgba(8, 34, 74, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -10px 16px rgba(8, 34, 74, 0.05);
}

body.home-page .info-step:hover .info-step__node {
  transform: scale(1.06) rotate(-4deg);
}

body.home-page .info-step:hover .how-step-card__icon {
  transform: scale(1.05) rotate(-3deg);
}

@media (max-width: 980px) {
  body.home-page .home-stack {
    gap: clamp(34px, 6vh, 56px);
  }

  body.home-page .surface-card {
    padding: clamp(22px, 3.3vw, 28px);
  }

  body.home-page .info-section__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.home-page .info-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home-page .info-feature:nth-child(3) {
    grid-column: 1 / -1;
  }

  body.home-page .how-stepper {
    --node-size: 36px;
    --node-col-width: 48px;
  }
}

@media (max-width: 740px) {
  body.home-page .surface-card {
    border-radius: 20px;
    padding: 20px;
  }

  body.home-page .info-bullets {
    gap: 7px;
  }

  body.home-page .info-feature,
  body.home-page .info-step__card {
    padding: 12px;
  }

  body.home-page .info-feature-grid {
    grid-template-columns: 1fr;
  }

  body.home-page .info-feature:nth-child(3) {
    grid-column: auto;
  }

  body.home-page .info-section__left h2::after {
    width: 72px;
  }

  body.home-page .how-stepper {
    --node-size: 34px;
    --node-col-width: 44px;
  }

  body.home-page .how-step-card__head {
    gap: 10px;
  }

  body.home-page .how-step-card__icon {
    width: 32px;
    height: 32px;
  }

  body.home-page .how-step-card__icon svg {
    width: 17px;
    height: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-page .home-cap .home-cap-sweep {
    animation: none;
    display: none;
  }

  body.home-page .home-cap::after {
    animation: none;
  }

  body.home-page .hero-banner__float {
    animation: none !important;
    transform: none !important;
  }

  body.home-page .hero-banner__intro,
  body.home-page .hero-banner__intro::before,
  body.home-page .hero-banner__intro::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: inset(0 0 0 0) !important;
  }

  body.home-page .hero-banner__tilt {
    transition: none !important;
    transform: none !important;
  }

  body.home-page .feature-tile,
  body.home-page .feature-tile:hover,
  body.home-page .step-card,
  body.home-page .step-card:hover,
  body.home-page .info-section .tile,
  body.home-page .info-section .tile:hover,
  body.home-page .info-feature__icon-chip,
  body.home-page .info-step__node,
  body.home-page .how-step-card__icon {
    transition: none !important;
    transform: none !important;
  }

  body.home-page .home-nav,
  body.home-page .hero-animate-logo,
  body.home-page .hero-animate-cta [data-cta-btn],
  body.home-page .home-hero-trust,
  body.home-page .reveal,
  body.home-page [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ========================= DASHBOARD: PREMIUM THEME ========================= */
#dashboard-view,
#dashboard-view .dashboard {
  --dash-bg0: #f7f9fe;
  --dash-bg1: #edf2fb;
  --dash-surface0: #ffffff;
  --dash-surface1: #f8fbff;
  --dash-brand-blue-soft: rgba(59, 117, 208, 0.16);
  --dash-brand-blue-border: rgba(62, 104, 170, 0.24);
  --dash-brand-blue-strong: #2f66c4;
  --dash-brand-blue-glow: rgba(53, 104, 196, 0.2);
  --dash-nav-wash-top: #fcfdff;
  --dash-nav-wash-bottom: #f2f7ff;
  --dash-border: rgba(24, 53, 99, 0.13);
  --dash-shadow1:
    0 8px 20px rgba(10, 30, 66, 0.07),
    0 2px 8px rgba(10, 30, 66, 0.05);
  --dash-shadow2:
    0 14px 30px rgba(10, 30, 66, 0.1),
    0 4px 12px rgba(10, 30, 66, 0.07);
  --dash-shadow3:
    0 22px 46px rgba(10, 30, 66, 0.14),
    0 7px 18px rgba(10, 30, 66, 0.09);
  --dash-radius-lg: 22px;
  --dash-radius-md: 16px;
  --dash-radius-sm: 12px;
  --dash-text: #1f2f48;
  --dash-text-muted: #627894;
  --dash-text-strong: #10213b;
}

.dash-surface {
  position: relative;
  border-radius: var(--dash-radius-lg);
  border: 1px solid var(--dash-border);
  background: linear-gradient(180deg, var(--dash-surface0) 0%, var(--dash-surface1) 100%);
  box-shadow:
    var(--dash-shadow1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(14, 35, 69, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dash-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.45;
}

.dash-surface > * {
  position: relative;
  z-index: 1;
}

.dash-surface--raised {
  box-shadow:
    var(--dash-shadow3),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(12, 33, 66, 0.08);
}

.dash-surface--inset {
  border-radius: var(--dash-radius-sm);
  border-color: rgba(24, 53, 99, 0.1);
  background: linear-gradient(180deg, #fdfefe 0%, #f4f8ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(12, 33, 66, 0.06);
}

body.app-page-bg {
  --app-page-gradient:
    radial-gradient(110% 56% at 50% 0%, rgba(213, 226, 250, 0.5) 0%, rgba(213, 226, 250, 0) 68%),
    radial-gradient(90% 70% at 50% 100%, rgba(195, 211, 242, 0.28) 0%, rgba(195, 211, 242, 0) 75%),
    linear-gradient(180deg, #f7fafe 0%, #eef3fb 55%, #e7edf8 100%);
}

body.app-page-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image:
    radial-gradient(circle at 20% 14%, rgba(20, 48, 92, 0.85) 0.4px, transparent 0.5px),
    radial-gradient(circle at 78% 65%, rgba(20, 48, 92, 0.72) 0.4px, transparent 0.5px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 1px;
}

body.app-page-bg .layout {
  max-width: 1560px;
  padding-left: clamp(20px, 2.25vw, 34px);
  padding-right: clamp(20px, 2.25vw, 34px);
}

/* Dashboard-only wide layout: reduce side gutters while keeping premium margins. */
body.app-page-bg .layout:has(#dashboard-view:not([hidden])) {
  max-width: 1660px;
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

body.app-page-bg .topbar {
  position: relative;
  background:
    radial-gradient(120% 170% at 50% -120%, rgba(68, 126, 214, 0.12), rgba(68, 126, 214, 0) 66%),
    linear-gradient(180deg, var(--dash-nav-wash-top), var(--dash-nav-wash-bottom));
  border-bottom: 1px solid var(--dash-brand-blue-border);
  box-shadow:
    0 8px 18px rgba(10, 26, 55, 0.08),
    0 2px 6px rgba(10, 26, 55, 0.05);
}

body.app-page-bg .app-footer {
  z-index: 2;
}

body.app-page-bg .topbar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.9));
}

body.app-page-bg .topbar .brand,
body.app-page-bg .topbar .brand-name,
body.app-page-bg .topbar .nav-link {
  color: #0f172a;
}

body.app-page-bg .topbar .brand-sub {
  color: #334155;
}

body.app-page-bg .topbar .nav-link:hover,
body.app-page-bg .topbar .nav-link.active {
  color: #020617;
  background: rgba(15, 23, 42, 0.08);
}

#dashboard-view {
  gap: 12px;
}

#dashboard-view .dashboard-header,
#dashboard-view .dashboard {
  width: min(1500px, 100%);
  margin-inline: auto;
}

#dashboard-view .dashboard-header {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

#dashboard-view .dashboard {
  position: relative;
  isolation: isolate;
  gap: 26px;
}

#dashboard-view .sync-band,
#dashboard-view .kpi-row,
#dashboard-view .card.surface-raised.surface-rim {
  width: 100%;
  max-width: none;
}

#dashboard-view .dashboard::before {
  content: none;
}

#dashboard-view .sync-band,
#dashboard-view .card.surface-raised.surface-rim {
  position: relative;
  border-radius: var(--dash-radius-lg);
  border: 1px solid var(--dash-border);
  background: linear-gradient(180deg, var(--dash-surface0) 0%, var(--dash-surface1) 100%);
  box-shadow:
    var(--dash-shadow2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(12, 33, 66, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#dashboard-view .sync-band {
  padding: 14px 16px 12px;
  gap: 10px;
  z-index: 36;
  overflow: visible;
  box-shadow:
    var(--dash-shadow3),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(12, 33, 66, 0.08);
}

#dashboard-view .sync-band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 44%);
  opacity: 0.5;
}

#dashboard-view .sync-band > *,
#dashboard-view .card.surface-raised.surface-rim > :not(.table-bulk-bar) {
  position: relative;
  z-index: 1;
}

#dashboard-view .card.surface-raised.surface-rim > .card-header {
  z-index: 6;
  overflow: visible;
}

#dashboard-view .card.surface-raised.surface-rim > .table {
  z-index: 1;
}

#dashboard-view .sync-strip.scan-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px 28px;
  border-radius: 18px;
  border: 1px solid rgba(24, 53, 99, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px 18px;
  box-shadow:
    var(--dash-shadow1),
    0 14px 24px -14px var(--dash-brand-blue-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(12, 33, 66, 0.06);
}

#dashboard-view .sync-strip.scan-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  background: linear-gradient(90deg, rgba(47, 102, 196, 0.34) 0%, rgba(47, 102, 196, 0.36) 100%);
  box-shadow: 0 1px 0 rgba(47, 102, 196, 0.16);
  pointer-events: none;
}

#dashboard-view .sync-strip.scan-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(235, 245, 255, 0) 0%,
    rgba(235, 245, 255, 0.14) 32%,
    rgba(250, 252, 255, 0.22) 50%,
    rgba(235, 245, 255, 0.14) 68%,
    rgba(235, 245, 255, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  transform: translateX(-180%);
}

@keyframes scanAccentSweep {
  0%,
  68% {
    opacity: 0;
    transform: translateX(-180%);
  }
  72% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.2;
    transform: translateX(1160%);
  }
  100% {
    opacity: 0;
    transform: translateX(1160%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  #dashboard-view .sync-strip.scan-card::after {
    animation: scanAccentSweep 12s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  }
}

#dashboard-view .scan-card__left {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 10px;
}

#dashboard-view .scan-top {
  align-items: center;
  gap: 12px;
}

#dashboard-view .scan-bottom {
  align-items: center;
  min-height: 26px;
}

#dashboard-view .scan-card__right {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  min-width: 280px;
}

#dashboard-view .scan-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#dashboard-view .btn-scan {
  min-height: 54px;
  height: 54px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 999px;
  box-shadow:
    0 16px 30px rgba(17, 56, 116, 0.28),
    0 4px 12px rgba(17, 56, 116, 0.2);
}

#dashboard-view .btn-scan:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 34px rgba(17, 56, 116, 0.3),
    0 6px 14px rgba(17, 56, 116, 0.22);
}

#dashboard-view .btn-scan-menu {
  width: 50px;
  min-width: 50px;
  height: 54px;
  min-height: 54px;
  border-radius: 15px;
}

#dashboard-view .sync-helper-text {
  color: var(--dash-text-muted);
  font-size: 12px;
  text-align: right;
  max-width: 300px;
}

#dashboard-view .sync-manual-process {
  color: #2f5ea8;
}

#dashboard-view .sync-bottom .sync-summary-status {
  color: var(--dash-text);
  font-weight: 600;
}

#dashboard-view .sync-bottom .sync-summary-metrics {
  color: var(--dash-text-muted);
}

#dashboard-view .kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

#dashboard-view .kpi-card {
  position: relative;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: var(--dash-radius-md);
  border: 1px solid rgba(24, 53, 99, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow:
    var(--dash-shadow1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(12, 33, 66, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#dashboard-view .kpi-new-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 16px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid transparent;
  opacity: 0.85;
  pointer-events: none;
}

#dashboard-view .kpi-new-tag.kpi-new-tag--applied {
  color: #9a5a05;
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.2);
}

#dashboard-view .kpi-new-tag.kpi-new-tag--offer {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

#dashboard-view .kpi-new-tag.kpi-new-tag--interview {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.11);
  border-color: rgba(59, 130, 246, 0.22);
}

#dashboard-view .kpi-new-tag[data-kpi-signal='true'] {
  animation: kpiNewTagFadeIn 200ms ease-out 1;
}

@keyframes kpiNewTagFadeIn {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 0.85;
    transform: translateY(0);
  }
}

#dashboard-view .kpi-card::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--kpi-accent, rgba(70, 93, 129, 0.55));
  opacity: 0.75;
}

#dashboard-view .kpi-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dashboard-view .kpi-label {
  color: var(--dash-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

#dashboard-view .kpi-value {
  margin-left: auto;
  color: var(--dash-text-strong);
  font-size: 33px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#dashboard-view .kpi-value-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  min-height: 36px;
}

#dashboard-view .kpi-value-wrap .kpi-value {
  margin-left: 0;
}

#dashboard-view .kpi-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.03em;
  transform: translateY(-2px);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

#dashboard-view .kpi-delta.kpi-delta--applied {
  color: #9a5a05;
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.26);
}

#dashboard-view .kpi-delta.kpi-delta--offer {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
}

#dashboard-view .kpi-delta.kpi-delta--interview {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.13);
  border-color: rgba(59, 130, 246, 0.25);
}

#dashboard-view .kpi-delta[data-kpi-signal='true'] {
  animation: kpiDeltaFadeIn 200ms cubic-bezier(0.2, 0.8, 0.2, 1) 1;
}

@keyframes kpiDeltaFadeIn {
  from {
    opacity: 0;
    transform: translateY(1px);
  }
  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

#dashboard-view .kpi-card.status-total {
  --kpi-accent: rgba(71, 85, 105, 0.66);
  color: #1e293b;
}

#dashboard-view .kpi-card.status-applied {
  --kpi-accent: rgba(217, 119, 6, 0.72);
  background: linear-gradient(180deg, #ffffff 0%, #fff8ea 100%);
  border-color: rgba(217, 119, 6, 0.26);
  color: #8f4e00;
}

#dashboard-view .kpi-card.status-offer {
  --kpi-accent: rgba(22, 163, 74, 0.76);
  background: linear-gradient(180deg, #ffffff 0%, #eefdf3 100%);
  border-color: rgba(22, 163, 74, 0.26);
  color: #166534;
}

#dashboard-view .kpi-card.status-interview {
  --kpi-accent: rgba(37, 99, 235, 0.76);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border-color: rgba(37, 99, 235, 0.24);
  color: #1d4ed8;
}

#dashboard-view .kpi-card.status-rejected {
  --kpi-accent: rgba(220, 38, 38, 0.74);
  background: linear-gradient(180deg, #ffffff 0%, #fff1f1 100%);
  border-color: rgba(220, 38, 38, 0.24);
  color: #991b1b;
}

#dashboard-view .kpi-card.status-applied .kpi-label,
#dashboard-view .kpi-card.status-applied .kpi-value,
#dashboard-view .kpi-card.status-offer .kpi-label,
#dashboard-view .kpi-card.status-offer .kpi-value,
#dashboard-view .kpi-card.status-interview .kpi-label,
#dashboard-view .kpi-card.status-interview .kpi-value,
#dashboard-view .kpi-card.status-rejected .kpi-label,
#dashboard-view .kpi-card.status-rejected .kpi-value {
  color: inherit;
}

#dashboard-view .card.surface-raised.surface-rim {
  padding: 20px 20px 18px;
  overflow: visible;
}

#dashboard-view .card.surface-raised.surface-rim::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: rgba(47, 102, 196, 0.46);
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.34),
    0 0 0 1px rgba(47, 102, 196, 0.08);
  pointer-events: none;
}

#dashboard-view .card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#dashboard-view #filters-inline .filter-field--company {
  flex: 1 1 360px;
  max-width: 430px;
}

#archive-view #archived-filters-inline .filter-field--company {
  flex: 1 1 360px;
  max-width: 430px;
}

#dashboard-view #filters-inline .filter-field--role {
  flex: 1 1 320px;
  max-width: 390px;
}

#archive-view #archived-filters-inline .filter-field--role {
  flex: 1 1 320px;
  max-width: 390px;
}

#dashboard-view #filters-inline .filter-field__control {
  min-height: 44px;
}

#archive-view #archived-filters-inline .filter-field__control {
  min-height: 44px;
}

#applications-table {
  --applications-grid-template: minmax(0, 1.92fr) minmax(0, 1.98fr) minmax(156px, 1.42fr) minmax(156px, 1.28fr) 76px;
}

#applications-table .applications-header,
#applications-table .table-row.application-row {
  display: grid;
  grid-template-columns: var(--applications-grid-template);
  align-items: center;
  gap: 0;
}

#applications-table .applications-header {
  min-height: 50px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--dash-border);
  background: rgba(15, 23, 42, 0.018);
  box-shadow: none;
  padding: 8px 0 10px;
}

#applications-table .table-row.application-row {
  position: relative;
  isolation: isolate;
  min-height: 56px;
  border-radius: 11px;
  border: 1px solid rgba(133, 150, 173, 0.2);
  padding: 9px 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(10, 30, 66, 0.045);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

#applications-table .applications-header > *,
#applications-table .table-row.application-row > :not(.status-band) {
  min-width: 0;
  padding: 0 14px;
}

#applications-table .table-row.application-row .status-band {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-top-left-radius: 11px;
  border-bottom-left-radius: 11px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0;
  pointer-events: none;
  background: var(--status-band-color, var(--status-pill-unknown-border));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.3);
  opacity: 0.9;
  z-index: 2;
}

#applications-table .table-row.application-row[data-status-tone='rejected'] .status-band {
  --status-band-color: var(--status-pill-rejected-border);
}

#applications-table .table-row.application-row[data-status-tone='interview'] .status-band {
  --status-band-color: var(--status-pill-interview-border);
}

#applications-table .table-row.application-row[data-status-tone='offer'] .status-band {
  --status-band-color: var(--status-pill-offer-border);
}

#applications-table .table-row.application-row[data-status-tone='applied'] .status-band {
  --status-band-color: var(--status-pill-applied-border);
}

#applications-table .table-row.application-row[data-status-tone='under_review'] .status-band {
  --status-band-color: var(--status-pill-under-review-border);
}

#applications-table .table-row.application-row[data-status-tone='unknown'] .status-band {
  --status-band-color: var(--status-pill-unknown-border);
}

#applications-table .table-row.application-row:hover .status-band,
#applications-table .table-row.application-row.table-row-selected .status-band {
  opacity: 1;
}

#applications-table .applications-header > button.sort-btn {
  min-height: 34px;
  padding: 0 14px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1;
  color: var(--dash-text-muted);
}

#applications-table .applications-header.sortable > button.sort-btn {
  background: transparent;
}

#applications-table .applications-header.sortable > button.sort-btn > span {
  transition: background-color 120ms ease, color 120ms ease;
}

#applications-table .applications-header.sortable > button.sort-btn > span:first-child {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 3px 6px;
}

#applications-table .applications-header.sortable > button.sort-btn:hover,
#applications-table .applications-header.sortable > button.sort-btn:focus-visible {
  background: transparent;
  color: var(--dash-text);
  outline: none;
}

#applications-table .applications-header.sortable > button.sort-btn:hover > span:first-child,
#applications-table .applications-header.sortable > button.sort-btn:focus-visible > span:first-child,
#applications-table .applications-header.sortable > button.sort-btn.active > span:first-child {
  background: rgba(31, 79, 150, 0.1);
}

#applications-table .applications-header > button.header-status {
  padding-left: 14px;
  padding-right: 14px;
  justify-content: center;
  text-align: center;
}

#applications-table .applications-header .table-select-all-text {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1;
  color: var(--dash-text-muted);
}

#applications-table .applications-header .table-col-company,
#applications-table .applications-header .table-col-role,
#applications-table .applications-header .table-col-activity {
  justify-content: flex-start;
  text-align: left;
}

#applications-table .applications-header .table-col-status,
#applications-table .table-row.application-row .table-col-status {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#applications-table .applications-header .table-col-activity,
#applications-table .table-row.application-row .table-col-activity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

#applications-table .applications-header .table-col-select,
#applications-table .table-row.application-row .table-col-select {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px 0 6px;
}

#applications-table .table-row.application-row .table-col-status .explanation {
  flex: 0 0 100%;
  margin-top: 2px;
  text-align: center;
}

#applications-table .table-row.application-row:nth-child(odd) {
  background: #fafbfd;
}

#applications-table .table-row.application-row:nth-child(even) {
  background: #f5f7fa;
}

#applications-table .table-row.application-row.is-offer {
  background: #f2faf5;
}

#applications-table .table-row.application-row.is-interview {
  background: #f1f6ff;
}

#applications-table .table-row.application-row.is-new-signal .status-band {
  opacity: 1;
}

#applications-table .table-row.application-row.is-new-signal.is-offer {
  animation: signalPulseOffer 960ms cubic-bezier(0.2, 0.75, 0.2, 1) 1;
}

#applications-table .table-row.application-row.is-new-signal.is-interview {
  animation: signalPulseInterview 960ms cubic-bezier(0.2, 0.75, 0.2, 1) 1;
}

@keyframes signalPulseOffer {
  0% {
    box-shadow: 0 4px 10px rgba(10, 30, 66, 0.045);
    background: #f2faf5;
  }
  48% {
    box-shadow:
      0 0 0 1px rgba(22, 163, 74, 0.28),
      0 18px 32px rgba(22, 163, 74, 0.16);
    background: #e9f8ef;
  }
  100% {
    box-shadow: 0 4px 10px rgba(10, 30, 66, 0.045);
    background: #f2faf5;
  }
}

@keyframes signalPulseInterview {
  0% {
    box-shadow: 0 4px 10px rgba(10, 30, 66, 0.045);
    background: #f1f6ff;
  }
  48% {
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.28),
      0 18px 32px rgba(37, 99, 235, 0.16);
    background: #eaf2ff;
  }
  100% {
    box-shadow: 0 4px 10px rgba(10, 30, 66, 0.045);
    background: #f1f6ff;
  }
}

#applications-table .table-row.application-row:hover {
  border-color: rgba(46, 90, 172, 0.32);
  box-shadow: 0 10px 22px rgba(15, 35, 80, 0.11);
  background: #e8eef6;
  transform: translateY(-1px);
}

#applications-table .table-row.application-row.table-row-selected,
#applications-table .table-row.application-row.table-row-selected:hover {
  border-color: rgba(33, 85, 177, 0.36);
  box-shadow: 0 10px 24px rgba(24, 55, 110, 0.15);
  background: #dde8f8;
}

@media (prefers-reduced-motion: reduce) {
  #dashboard-view .kpi-new-tag[data-kpi-signal='true'],
  #dashboard-view .kpi-delta[data-kpi-signal='true'] {
    animation: none;
  }

  #applications-table .table-row.application-row.is-new-signal.is-offer,
  #applications-table .table-row.application-row.is-new-signal.is-interview {
    animation: none;
  }
}

@media (min-width: 1280px) {
  body.app-page-bg .layout {
    padding-left: clamp(28px, 2.3vw, 40px);
    padding-right: clamp(28px, 2.3vw, 40px);
  }

  #dashboard-view .dashboard-header,
  #dashboard-view .dashboard {
    width: min(1560px, 100%);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  #dashboard-view .dashboard-header,
  #dashboard-view .dashboard {
    width: min(1090px, 100%);
  }
}

@media (max-width: 1200px) {
  #dashboard-view .kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #applications-table {
    --applications-grid-template: minmax(0, 1.66fr) minmax(0, 1.62fr) minmax(132px, 1.24fr) minmax(138px, 1.14fr) 72px;
  }
}

@media (max-width: 900px) {
  #dashboard-view .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard-view .header-actions {
    width: 100%;
    align-items: stretch;
  }

  #archive-view .header-actions {
    width: 100%;
    align-items: stretch;
  }

  #dashboard-view #filters-inline {
    width: 100%;
    gap: 10px;
    padding: 10px;
  }

  #archive-view #archived-filters-inline {
    width: 100%;
    gap: 10px;
    padding: 10px;
  }

  #dashboard-view #filters-inline .filter-field {
    flex: 1 1 240px;
    max-width: none;
  }

  #archive-view #archived-filters-inline .filter-field {
    flex: 1 1 240px;
    max-width: none;
  }

  #dashboard-view #filters-inline .filter-field--status {
    flex: 1 1 188px;
    max-width: 240px;
  }

  #archive-view #archived-filters-inline .filter-field--status {
    flex: 1 1 188px;
    max-width: 240px;
  }

  #dashboard-view .sync-strip.scan-card {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  #dashboard-view .scan-card__right {
    min-width: 0;
    align-items: flex-start;
  }

  #dashboard-view .sync-inline-controls,
  #dashboard-view .sync-quick-controls {
    width: 100%;
    align-items: flex-start;
  }

  #dashboard-view .sync-helper-text {
    text-align: left;
    max-width: none;
  }
}

@media (max-width: 720px) {
  #dashboard-view .kpi-row {
    grid-template-columns: 1fr;
  }

  #dashboard-view #filters-inline .filter-field {
    flex: 1 1 100%;
    max-width: none;
  }

  #archive-view #archived-filters-inline .filter-field {
    flex: 1 1 100%;
    max-width: none;
  }

  #dashboard-view #filters-inline .filter-field__control {
    min-height: 42px;
  }

  #archive-view #archived-filters-inline .filter-field__control {
    min-height: 42px;
  }

  #dashboard-view .card.surface-raised.surface-rim {
    padding: 16px 14px;
  }

  #applications-table {
    --applications-grid-template: minmax(0, 1.45fr) minmax(0, 1.74fr) minmax(96px, 0.85fr) minmax(120px, 1.06fr) 64px;
  }
}
