@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ==========================================================================
   PERSPECTIVE MEDIA — CHANNEL DIGITAL SALES PORTAL
   Unified Design System & Physics-Tuned Motion Architecture
   Themes: Luminous Pearl Daylight (Default) & Cinema Obsidian Dark
   Typography: Plus Jakarta Sans (Display) + Inter (UI) + JetBrains Mono (Data)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS — LUMINOUS PEARL DAYLIGHT (:root, [data-theme="light"])
   -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* Typography Families */
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: var(--font-display);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Perspective Inflora Soft Cool-Cloud Canvas & Crisp White Surfaces */
  --bg-canvas: #F4F5FB;
  --bg-canvas-glow: radial-gradient(960px 440px at 78% -120px, rgba(108, 82, 248, 0.065), transparent 72%);
  --bg-paper: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F4F5FA;
  --bg-muted: #E8EBF5;
  --bg-table-head: #FAFBFD;
  --bg-row-hover: #F7F8FD;
  --bg-header: #FFFFFF;
  --bg-backdrop: rgba(17, 14, 38, 0.46);

  /* Perspective Inflora Deep Midnight-Plum Sidebar */
  --bg-sidebar: #14112B;
  --bg-sidebar-sheen: linear-gradient(180deg, #171333 0%, #110E25 100%);
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bg-sidebar-active: linear-gradient(90deg, rgba(109, 82, 248, 0.38) 0%, rgba(124, 58, 237, 0.24) 100%);
  --sidebar-ink: #A3A0C2;
  --sidebar-ink-hover: #F1EFFB;
  --sidebar-ink-active: #FFFFFF;
  --sidebar-accent: #9B8AFB;
  --sidebar-hairline: rgba(255, 255, 255, 0.075);

  /* Optical Ink Hierarchy */
  --ink-primary: #111827;
  --ink-body: #374151;
  --ink-muted: #6B7280;
  --ink-faint: #9CA3AF;
  --ink-inverse: #FFFFFF;

  /* Soft Precision Borders */
  --border-sand-solid: #E7EAF4;
  --border-sand: #E8EBF4;
  --border-rail: #E8EBF4;
  --border-strong: #D5DAE8;
  --border-subtle: #F0F2F8;
  --border-focus: #6C52F8;

  /* Perspective Violet-Indigo Brand & Soft Pastel Semantic Tokens */
  --brand: #634CE6;
  --brand-hover: #533CD6;
  --brand-bright: #6C52F8;
  --brand-tint: #F1EFFE;
  --brand-border: #DAD4FC;

  --jade: #059669;
  --jade-strong: #047857;
  --jade-tint: #E6F8EF;
  --jade-border: #B7EBD0;

  --amber: #D97706;
  --amber-strong: #B45309;
  --amber-tint: #FEF6E6;
  --amber-border: #FDE2B0;

  --ochre: #EA580C;
  --ochre-strong: #C2410C;
  --ochre-tint: #FFF3EB;
  --ochre-border: #FED7BA;

  --rose: #E11D48;
  --rose-strong: #BE123C;
  --rose-tint: #FFEBEF;
  --rose-border: #FECDD6;

  --slate: #2563EB;
  --slate-strong: #1D4ED8;
  --slate-tint: #EEF4FF;
  --slate-border: #C7DBFE;

  /* Airy Multi-Layered Ambient Elevation */
  --shadow-xs: 0 1px 2px rgba(20, 17, 43, 0.03);
  --shadow-card: 0 2px 6px rgba(20, 17, 43, 0.028), 0 12px 32px -12px rgba(20, 17, 43, 0.055);
  --shadow-hover: 0 6px 16px -4px rgba(20, 17, 43, 0.06), 0 18px 36px -12px rgba(99, 76, 230, 0.10);
  --shadow-popover: 0 20px 48px -12px rgba(20, 17, 43, 0.16), 0 2px 8px rgba(20, 17, 43, 0.05);
  --shadow-modal: 0 32px 80px -16px rgba(20, 17, 43, 0.28), 0 4px 16px rgba(20, 17, 43, 0.06);
  --shadow-sticky-left: 6px 0 14px -6px rgba(20, 17, 43, 0.05);
  --shadow-sticky-right: -6px 0 14px -6px rgba(20, 17, 43, 0.05);
  --ring-focus: 0 0 0 3px rgba(108, 82, 248, 0.16);
  --surface-rim: inset 0 1px 0 rgba(255, 255, 255, 0.8);

  /* Perspective Inflora Signature Royal-Blue -> Violet Gradient CTA */
  --btn-primary-bg: linear-gradient(135deg, #5E68F9 0%, #6D4FF8 55%, #7B43F3 100%);
  --btn-primary-hover: linear-gradient(135deg, #515BF0 0%, #6142EC 55%, #6F36E8 100%);
  --btn-primary-border: transparent;
  --btn-primary-shadow: 0 4px 14px -2px rgba(108, 82, 248, 0.34);
  --btn-primary-shadow-hover: 0 8px 20px -3px rgba(108, 82, 248, 0.44);

  /* Generous Rounded Geometry */
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 26px;
  --radius-pill: 9999px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);

  --sidebar-width: 248px;
  --header-height: 60px;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS — CINEMA OBSIDIAN DARK MODE ([data-theme="dark"])
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #080B12;
  --bg-canvas-glow: radial-gradient(1100px 440px at 55% -150px, rgba(99, 102, 241, 0.12), transparent 72%);
  --bg-paper: #101522;
  --bg-elevated: #161C2E;
  --bg-subtle: #161D2F;
  --bg-muted: #1E273D;
  --bg-table-head: #131A2B;
  --bg-row-hover: #172035;
  --bg-header: rgba(10, 14, 24, 0.82);
  --bg-backdrop: rgba(3, 6, 14, 0.72);

  --bg-sidebar: #060911;
  --bg-sidebar-sheen: radial-gradient(280px 220px at 0% 0%, rgba(99, 102, 241, 0.18), transparent 75%), #060911;
  --sidebar-hairline: rgba(255, 255, 255, 0.07);

  --ink-primary: #F8FAFC;
  --ink-body: #CBD5E1;
  --ink-muted: #94A3B8;
  --ink-faint: #64748B;
  --ink-inverse: #FFFFFF;

  --border-sand-solid: #1E273D;
  --border-sand: rgba(255, 255, 255, 0.085);
  --border-rail: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #818CF8;

  /* Luminous Dark-Adapted Semantic Tokens */
  --brand: #818CF8;
  --brand-hover: #A5B4FC;
  --brand-bright: #6366F1;
  --brand-tint: rgba(99, 102, 241, 0.16);
  --brand-border: rgba(129, 140, 248, 0.30);

  --jade: #34D399;
  --jade-strong: #6EE7B7;
  --jade-tint: rgba(16, 185, 129, 0.14);
  --jade-border: rgba(52, 211, 153, 0.28);

  --amber: #FBBF24;
  --amber-strong: #FCD34D;
  --amber-tint: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(251, 191, 36, 0.28);

  --ochre: #FB923C;
  --ochre-strong: #FDBA74;
  --ochre-tint: rgba(249, 115, 22, 0.14);
  --ochre-border: rgba(251, 146, 60, 0.28);

  --rose: #FB7185;
  --rose-strong: #FDA4AF;
  --rose-tint: rgba(244, 63, 94, 0.15);
  --rose-border: rgba(251, 113, 133, 0.30);

  --slate: #60A5FA;
  --slate-strong: #93C5FD;
  --slate-tint: rgba(59, 130, 246, 0.15);
  --slate-border: rgba(96, 165, 250, 0.28);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.36), 0 10px 28px -10px rgba(0, 0, 0, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --shadow-hover: 0 6px 18px -2px rgba(0, 0, 0, 0.52), 0 18px 36px -12px rgba(79, 70, 229, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-popover: 0 20px 48px -10px rgba(0, 0, 0, 0.68), 0 2px 10px rgba(0, 0, 0, 0.40);
  --shadow-modal: 0 32px 80px -14px rgba(0, 0, 0, 0.78), 0 6px 20px rgba(0, 0, 0, 0.50);
  --shadow-sticky-left: 8px 0 18px -6px rgba(0, 0, 0, 0.55);
  --shadow-sticky-right: -8px 0 18px -6px rgba(0, 0, 0, 0.55);
  --ring-focus: 0 0 0 3px rgba(129, 140, 248, 0.26);
  --surface-rim: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  --btn-primary-bg: linear-gradient(180deg, #6366F1 0%, #4338CA 100%);
  --btn-primary-hover: linear-gradient(180deg, #7174F7 0%, #4F46E5 100%);
  --btn-primary-border: #4F46E5;
  --btn-primary-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 2px 8px rgba(67, 56, 202, 0.45);
  --btn-primary-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 6px 16px rgba(79, 70, 229, 0.55);
}

/* --------------------------------------------------------------------------
   3. GLOBAL RESET, OPTICAL TYPOGRAPHY & SCROLLBARS
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  background-image: var(--bg-canvas-glow);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  transition: background-color 0.22s var(--ease-out-expo), color 0.18s ease;
}

h1,
h2,
h3,
.page-title,
.kpi-value,
.auth-card-title,
.sidebar-brand-title {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink-primary);
  letter-spacing: -0.026em;
  font-weight: 700;
}

h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink-primary);
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

::selection {
  background: rgba(79, 70, 229, 0.20);
  color: var(--ink-primary);
}

/* Precision Tabular Numerals */
.mono,
.num,
.pkr {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.serif-display,
.display-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.026em;
}

.hidden {
  display: none !important;
}

.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;
}

/* Custom Thin Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.46);
}

.sidebar ::-webkit-scrollbar-thumb,
.smtp-console-log::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
}

.sidebar ::-webkit-scrollbar-thumb:hover,
.smtp-console-log::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.42);
}

/* --------------------------------------------------------------------------
   4. PHYSICS-TUNED MICRO-ANIMATIONS (60FPS HARDWARE ACCELERATED)
   -------------------------------------------------------------------------- */
@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseHalo {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--pulse-color, rgba(16, 185, 129, 0.48));
    transform: scale(1);
  }
  55% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    transform: scale(1.06);
  }
}

@keyframes placementGlow {
  0%, 100% {
    opacity: 0.88;
    filter: drop-shadow(0 0 4px rgba(129, 140, 248, 0.45));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.85));
  }
}

@keyframes tickerCrawl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-28%);
  }
}

@keyframes sparkReveal {
  from {
    stroke-dashoffset: 260;
    opacity: 0.35;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popoverDrop {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes barGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Route View Entrance & Staggered Grid Children */
.workspace > * {
  animation: viewEnter 240ms var(--ease-out-expo) both;
}

.stagger-grid > *,
.kpi-grid > *,
.drama-grid > *,
.channel-directory-grid > *,
.format-visual-grid > * {
  animation: cardReveal 320ms var(--ease-out-expo) both;
  animation-delay: min(calc(var(--i, 0) * 35ms), 280ms);
}

.stagger-grid > *:nth-child(2),
.kpi-grid > *:nth-child(2),
.drama-grid > *:nth-child(2),
.channel-directory-grid > *:nth-child(2),
.format-visual-grid > *:nth-child(2) {
  animation-delay: min(calc(var(--i, 1) * 35ms), 280ms);
}

.stagger-grid > *:nth-child(3),
.kpi-grid > *:nth-child(3),
.drama-grid > *:nth-child(3),
.channel-directory-grid > *:nth-child(3),
.format-visual-grid > *:nth-child(3) {
  animation-delay: min(calc(var(--i, 2) * 35ms), 280ms);
}

.stagger-grid > *:nth-child(4),
.kpi-grid > *:nth-child(4),
.drama-grid > *:nth-child(4),
.channel-directory-grid > *:nth-child(4),
.format-visual-grid > *:nth-child(4) {
  animation-delay: min(calc(var(--i, 3) * 35ms), 280ms);
}

.stagger-grid > *:nth-child(5),
.drama-grid > *:nth-child(5),
.channel-directory-grid > *:nth-child(5),
.format-visual-grid > *:nth-child(5) {
  animation-delay: min(calc(var(--i, 4) * 35ms), 280ms);
}

.stagger-grid > *:nth-child(6),
.drama-grid > *:nth-child(6),
.format-visual-grid > *:nth-child(6) {
  animation-delay: min(calc(var(--i, 5) * 35ms), 280ms);
}

/* Live Breathing Status Dot */
.status-dot-live {
  display: inline-block;
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #10B981;
  --pulse-color: rgba(16, 185, 129, 0.52);
  animation: pulseHalo 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot-live.urgent,
.status-dot-live.rose {
  background: #F43F5E;
  --pulse-color: rgba(244, 63, 94, 0.52);
}

.status-dot-live.amber {
  background: #F59E0B;
  --pulse-color: rgba(245, 158, 11, 0.52);
}

.status-dot-live.indigo {
  background: #818CF8;
  --pulse-color: rgba(129, 140, 248, 0.52);
}

/* Sparkline Path Draw-In */
.sparkline-path {
  stroke-dasharray: 260;
  stroke-dashoffset: 0;
  animation: sparkReveal 820ms var(--ease-out-expo) both;
}

/* --------------------------------------------------------------------------
   5. 100VH ZERO-SCROLL SPLIT SIGN-IN (LEFT ANIMATED CHANNEL STAGE + RIGHT LOGIN)
   -------------------------------------------------------------------------- */
@keyframes signalWave {
  0% {
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0.34;
  }
  70% {
    opacity: 0.08;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.38);
    opacity: 0;
  }
}

@keyframes floatChannelCard {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes eqBounce {
  0%, 100% {
    transform: scaleY(0.38);
  }
  50% {
    transform: scaleY(1);
  }
}

.auth-screen {
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  padding: 0;
  margin: 0;
  background-color: #F3F5FC;
  position: relative;
  overflow: hidden;
}

.auth-split-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1.06fr) minmax(390px, 0.94fr);
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Left Animated Broadcast & Channel Telemetry Stage */
.auth-channel-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(620px 440px at 18% 16%, rgba(114, 86, 255, 0.28), transparent 70%),
    radial-gradient(540px 400px at 86% 84%, rgba(16, 185, 129, 0.15), transparent 70%),
    linear-gradient(155deg, #130F2A 0%, #1B1540 54%, #100D23 100%);
  color: #FFFFFF;
  padding: clamp(20px, 3.2vh, 36px) clamp(24px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(12px, 2vh, 22px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-signal-rings {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 540px;
  height: 540px;
  pointer-events: none;
  z-index: 0;
}

.signal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(155, 138, 251, 0.26);
  transform: translate(-50%, -50%);
  animation: signalWave 7.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.signal-ring.ring-1 { width: 280px; height: 280px; animation-delay: 0s; }
.signal-ring.ring-2 { width: 410px; height: 410px; animation-delay: 2.4s; }
.signal-ring.ring-3 { width: 540px; height: 540px; animation-delay: 4.8s; }

.auth-stage-head,
.auth-stage-center,
.auth-stage-networks {
  position: relative;
  z-index: 2;
}

.auth-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-stage-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.auth-stage-logo-pill {
  background: #FFFFFF;
  border-radius: 11px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.auth-stage-logo-pill img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.auth-stage-portal-sub {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #DDD9F9;
  letter-spacing: -0.01em;
}

.auth-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #E2E8F0;
}

.auth-stage-center {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 22px);
  max-width: 540px;
}

.auth-stage-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.15vw, 1.92rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 8px;
}

.auth-stage-copy p {
  font-size: clamp(0.82rem, 1.02vw, 0.92rem);
  color: #BDB8DC;
  line-height: 1.5;
}

.auth-floating-deck {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 12px);
}

.auth-float-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(10px, 1.45vh, 14px) 15px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 32px -12px rgba(5, 4, 16, 0.48);
  animation: floatChannelCard 5.2s ease-in-out infinite;
}

.auth-float-card.float-card-2 {
  animation-delay: 1.6s;
  margin-left: 14px;
}

.auth-float-card.float-card-3 {
  animation-delay: 3.1s;
}

.afc-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.afc-left img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.afc-left strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afc-left span {
  display: block;
  font-size: 0.73rem;
  color: #C4C0E0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afc-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.afc-right strong {
  font-size: 0.8rem;
  color: #F8FAFC;
}

.afc-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 700;
}

.afc-pill.emerald {
  background: rgba(16, 185, 129, 0.22);
  color: #6EE7B7;
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.afc-pill.violet {
  background: rgba(139, 92, 246, 0.26);
  color: #DDD6FE;
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.afc-eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.afc-eq-bars i {
  display: block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: #34D399;
  transform-origin: bottom;
  animation: eqBounce 1.15s ease-in-out infinite;
}

.afc-eq-bars i:nth-child(2) { animation-delay: 0.2s; background: #9B8AFB; }
.afc-eq-bars i:nth-child(3) { animation-delay: 0.42s; background: #60A5FA; }
.afc-eq-bars i:nth-child(4) { animation-delay: 0.65s; background: #34D399; }

.auth-stage-networks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-net-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 0.72rem;
  font-weight: 600;
  color: #E2E0F5;
}

.auth-net-pill img {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: cover;
}

/* Right Crisp Zero-Scroll Login Pane */
.auth-login-pane {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vh, 32px) clamp(18px, 3vw, 40px);
  background:
    radial-gradient(520px 360px at 78% 16%, rgba(108, 82, 248, 0.065), transparent 70%),
    #F4F5FB;
  overflow: hidden;
}

.auth-card {
  width: 100%;
  max-width: 446px;
  background: var(--bg-paper);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  padding: clamp(22px, 3.2vh, 34px) clamp(24px, 3vw, 36px);
  box-shadow:
    0 22px 58px -18px rgba(20, 17, 43, 0.09),
    0 4px 14px rgba(20, 17, 43, 0.03);
  animation: cardReveal 280ms var(--ease-out-expo) both;
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(12px, 1.8vh, 18px);
  padding-bottom: clamp(10px, 1.5vh, 14px);
  border-bottom: 1px solid var(--border-subtle);
}

.auth-official-logo {
  height: 44px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.auth-portal-tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.auth-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #5C54E5;
  margin-bottom: 6px;
}

.auth-heading {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  line-height: 1.15;
  margin-bottom: 6px;
}

.auth-subtext {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-bottom: clamp(14px, 2.2vh, 20px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: clamp(11px, 1.6vh, 15px);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.01em;
}

.auth-input-group {
  display: flex;
  align-items: stretch;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #DCE1EE;
  background: var(--bg-paper);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.auth-input-addon {
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #E6EAF2;
  color: #94A3B8;
  background: transparent;
  flex-shrink: 0;
}

.auth-input-addon svg {
  width: 17px;
  height: 17px;
}

.auth-group-control {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 13px;
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.auth-group-control:focus-visible {
  box-shadow: none;
}

.auth-group-control::placeholder {
  color: var(--ink-faint);
}

.auth-input-eye {
  width: 44px;
  border: none;
  border-left: 1px solid #E6EAF2;
  background: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.auth-input-eye:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.auth-input-eye svg {
  width: 16px;
  height: 16px;
}

.auth-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-top: 1px;
}

.auth-error-banner {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--rose-tint);
  border: 1px solid var(--rose-border);
  color: var(--rose);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.auth-gradient-btn {
  margin-top: 2px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #5B6BF9 0%, #6C52F8 52%, #7B42F4 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 22px -6px rgba(108, 82, 248, 0.42);
  transition: transform 0.14s var(--ease-spring), box-shadow 0.18s ease, filter 0.16s ease;
}

.auth-gradient-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 28px -6px rgba(108, 82, 248, 0.52);
}

.auth-gradient-btn:active {
  transform: scale(0.988);
}

.auth-gradient-btn svg {
  width: 17px;
  height: 17px;
}

.auth-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: clamp(12px, 2vh, 18px) 0 clamp(10px, 1.6vh, 14px);
}

.auth-protected-foot {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-shield-tile {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #E8FBF2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-shield-tile svg {
  width: 17px;
  height: 17px;
}

.auth-protected-foot strong {
  display: block;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 1px;
}

.auth-protected-foot p {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .auth-screen {
    height: auto;
    max-height: none;
    min-height: 100vh;
    overflow-y: auto;
  }

  .auth-split-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .auth-login-pane {
    height: auto;
    padding: 28px 18px 40px;
    order: 1;
  }

  .auth-channel-stage {
    order: 2;
    padding: 28px 20px;
  }
}

@media (max-height: 600px) and (min-width: 901px) {
  .auth-login-pane,
  .auth-channel-stage {
    overflow-y: auto;
  }
}

/* Password Eye Helper Used in SMTP & User Modals */
.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-field-wrap .field-input {
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.password-toggle-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.password-toggle-btn svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   6. APP SHELL, PERSPECTIVE INFLORA MIDNIGHT-PLUM SIDEBAR & CLEAN TOPBAR
   -------------------------------------------------------------------------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: transparent;
}

.sidebar {
  background: var(--bg-sidebar-sheen);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 45;
  user-select: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;
  margin: 12px 12px 9px;
  padding: 8px;
  border-radius: 11px;
  color: #fff;
  text-decoration: none;
}

.sidebar-brand:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.sidebar-brand:focus-visible {
  outline: 2px solid #bfb2ff;
  outline-offset: 2px;
}

.sidebar-brand-icon {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.sidebar-brand-name {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.2;
}

.sidebar-brand-name strong {
  font-family: var(--font-display);
  font-size: .91rem;
  font-weight: 700;
}

.sidebar-brand-name > span {
  color: #c0b8df;
  font-size: .71rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-section-divider {
  padding-top: 14px;
  border-top: 1px solid var(--sidebar-hairline);
}

.nav-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6F6B92;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9.5px 13px;
  border-radius: 12px;
  color: var(--sidebar-ink);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  min-height: 40px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--sidebar-ink-hover);
}

.nav-item:hover .nav-icon {
  color: #E2DFF5;
}

.nav-item.active {
  background: var(--bg-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
  border-color: rgba(155, 138, 251, 0.24);
  box-shadow: 0 4px 14px rgba(15, 11, 34, 0.25);
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.nav-item-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon {
  width: 17px;
  height: 17px;
  color: #8B87AD;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(155, 138, 251, 0.26);
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 14px 14px 16px;
  border-top: 1px solid var(--sidebar-hairline);
  background: rgba(10, 8, 22, 0.35);
  flex-shrink: 0;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 2px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-tint);
  color: var(--brand);
  border: 1px solid var(--brand-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  flex-shrink: 0;
}

.sidebar .user-avatar {
  background: linear-gradient(135deg, #634CE6 0%, #4C35C4 100%);
  border: none;
  color: #FFFFFF;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-meta strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .user-meta strong {
  color: #FFFFFF;
}

.user-meta span {
  display: block;
  font-size: 0.71rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .user-meta span {
  color: #8B87AD;
}

.sidebar-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sidebar-ghost-btn {
  height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: #C4C1DE;
  font-size: 0.74rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.sidebar-ghost-btn svg {
  width: 13.5px;
  height: 13.5px;
  flex-shrink: 0;
}

.sidebar-ghost-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #FFFFFF;
}

/* Main Workspace Column */
.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.client-mode-banner {
  background: linear-gradient(90deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
  padding: 8px 28px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 500;
}

.client-mode-banner button {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFFFFF;
  padding: 3px 11px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

/* Clean Minimal Top Utility Bar (Matching Perspective Suite) */
.top-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-sand);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 38;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.breadcrumb-trail {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.breadcrumb-current {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.025em;
}

.breadcrumb-sub {
  font-size: 0.77rem;
  color: var(--ink-muted);
}

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-body);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.global-search-box {
  position: relative;
  width: 268px;
}

.global-search-input {
  width: 100%;
  height: 36px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: 11px;
  padding: 0 46px 0 34px;
  font-size: 0.8125rem;
  color: var(--ink-primary);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.global-search-input::placeholder {
  color: var(--ink-faint);
}

.global-search-input:focus {
  outline: none;
  background: var(--bg-paper);
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.global-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14.5px;
  height: 14.5px;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 420px;
  max-height: 440px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-sand);
  border-radius: 16px;
  box-shadow: var(--shadow-popover);
  padding: 8px;
  z-index: 95;
  animation: popoverDrop 160ms var(--ease-out-expo) both;
}

.search-group-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 8px 10px 4px;
}

.search-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--ink-body);
  cursor: pointer;
}

.search-result-row:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.theme-toggle-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .theme-icon-moon,
:root:not([data-theme="dark"]) .theme-icon-sun {
  display: none;
}

.client-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.client-toggle-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.client-toggle-pill.active {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade);
}

.toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.client-toggle-pill.active .toggle-dot {
  background: var(--jade);
}

.icon-btn {
  position: relative;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.topbar-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-primary);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.topbar-user-pill:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #635BFF 0%, #7C3AED 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-count-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: #E11D48;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-paper);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
}

/* Slide-Down Notification & Expiry Radar Drawer */
.notif-drawer {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  right: 24px;
  width: 404px;
  max-width: calc(100vw - 24px);
  max-height: 78vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  z-index: 98;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popoverDrop 180ms var(--ease-out-expo) both;
}

.notif-drawer-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-sand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-subtle);
}

.notif-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-card {
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s var(--ease-spring);
}

.notif-card.unread {
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
}

.notif-card:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   7. TACTILE SPECULAR BUTTONS & SEGMENTED CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.006em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  transition:
    transform 0.12s var(--ease-spring),
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.77rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  min-height: 26px;
  padding: 0 8.5px;
  font-size: 0.72rem;
  gap: 5px;
  border-radius: var(--radius-xs);
}

.btn-xs svg {
  width: 13px;
  height: 13px;
}

.btn-lg {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Jewel Indigo Specular Primary CTA */
.btn-primary,
.btn-accent {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover,
.btn-accent:hover {
  background: var(--btn-primary-hover);
  border-color: var(--brand-bright);
  color: #FFFFFF;
  box-shadow: var(--btn-primary-shadow-hover);
}

.btn-secondary {
  background: var(--bg-paper);
  border-color: var(--border-sand);
  color: var(--ink-primary);
  box-shadow: var(--shadow-xs), var(--surface-rim);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.btn-subtle {
  background: var(--bg-subtle);
  border-color: var(--border-sand);
  color: var(--ink-body);
}

.btn-subtle:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-body);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.btn-whatsapp {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade-strong);
}

.btn-whatsapp:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--jade);
  color: var(--jade);
}

.btn-danger {
  background: var(--rose-tint);
  border-color: var(--rose-border);
  color: var(--rose);
}

.btn-danger:hover {
  background: rgba(225, 29, 72, 0.18);
  border-color: var(--rose);
  color: var(--rose-strong);
}

/* Segmented Controls */
.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 29px;
  padding: 0 11px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.seg-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.seg-btn:hover {
  color: var(--ink-primary);
}

.seg-btn.active {
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--border-subtle);
}

/* --------------------------------------------------------------------------
   8. WORKSPACE CONTAINER, PAGE HEADERS & LAYERED CARDS
   -------------------------------------------------------------------------- */
.workspace {
  padding: 26px 28px 60px;
  max-width: 1620px;
  width: 100%;
  margin: 0 auto;
}

.page-header,
.exec-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.exec-header-bar {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-sand);
}

.exec-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exec-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.exec-live-pill,
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--jade-tint);
  border: 1px solid var(--jade-border);
  color: var(--jade);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.page-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand);
  margin-bottom: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.38rem, 1.9vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  color: var(--ink-primary);
  line-height: 1.2;
}

.page-subtitle {
  color: var(--ink-muted);
  font-size: 0.855rem;
  line-height: 1.5;
  margin-top: 4px;
  max-width: 72ch;
}

.page-actions,
.exec-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Unified Card Architecture */
.card {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.16s ease, box-shadow 0.18s ease;
}

.card-pad {
  padding: 20px 22px;
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-header > div:first-child {
  min-width: 0;
  flex: 1;
}

.card-header > .btn,
.card-header > .badge,
.card-header > .segmented-control {
  flex-shrink: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.card-subtitle {
  font-size: 0.79rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.card-subtitle:empty {
  display: none;
}

/* ==========================================================================
   PERSPECTIVE INFLORA HERO BANNERS, STAT TILES, FILTER BARS & SUITE DASHBOARD
   ========================================================================== */

/* Floating Rounded White Page Hero Banner with Subtle Lavender Rings */
.inflora-hero-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 22px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  isolation: isolate;
}

.inflora-hero-rings {
  position: absolute;
  right: 76px;
  top: -78px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 26px solid rgba(109, 79, 248, 0.065);
  pointer-events: none;
  z-index: -1;
}

.inflora-hero-copy {
  min-width: 240px;
  flex: 1;
}

.inflora-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.inflora-hero-title {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  line-height: 1.18;
}

.inflora-hero-sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 5px;
  max-width: 72ch;
}

.inflora-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 4-Card Rounded Stat Row (Perspective Inflora Campaigns Style) */
.inflora-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.inflora-stat-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 15px;
  isolation: isolate;
  transition: transform 0.16s var(--ease-out-expo), border-color 0.16s ease, box-shadow 0.16s ease;
}

.inflora-stat-card.is-featured {
  border-color: #BFC4FA;
}

[data-theme="dark"] .inflora-stat-card.is-featured {
  border-color: rgba(129, 140, 248, 0.36);
}

.inflora-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.inflora-stat-arc {
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 15px solid rgba(109, 79, 248, 0.045);
  pointer-events: none;
  z-index: -1;
}

.inflora-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inflora-stat-icon.tone-indigo {
  background: #EEF1FF;
  color: #554CE6;
}

.inflora-stat-icon.tone-emerald {
  background: #E6F8EF;
  color: #059669;
}

.inflora-stat-icon.tone-violet {
  background: #F4EEFF;
  color: #7C3AED;
}

.inflora-stat-icon.tone-amber {
  background: #FEF6E6;
  color: #D97706;
}

[data-theme="dark"] .inflora-stat-icon.tone-indigo { background: rgba(99, 102, 241, 0.16); color: #A5B4FC; }
[data-theme="dark"] .inflora-stat-icon.tone-emerald { background: rgba(16, 185, 129, 0.16); color: #6EE7B7; }
[data-theme="dark"] .inflora-stat-icon.tone-violet { background: rgba(139, 92, 246, 0.16); color: #C4B5FD; }
[data-theme="dark"] .inflora-stat-icon.tone-amber { background: rgba(245, 158, 11, 0.16); color: #FCD34D; }

.inflora-stat-meta strong {
  display: block;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.inflora-stat-meta span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Perspective Inflora Sleek Pill Filter Bar */
.inflora-filter-bar {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.inflora-search-field {
  flex: 1;
  min-width: 240px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: var(--ink-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inflora-search-field:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.inflora-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--ink-primary);
}

.inflora-search-field input:focus-visible {
  box-shadow: none;
}

.inflora-pill-select {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 34px 0 15px;
  border-radius: 12px;
  border: 1px solid #5B4AE6;
  background-color: #6650F5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  color: #FFFFFF;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(102, 80, 245, 0.22);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.inflora-pill-select option {
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-weight: 500;
}

.inflora-pill-select:hover {
  filter: brightness(1.06);
}

.inflora-clear-btn {
  height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-body);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.inflora-clear-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.inflora-subfilter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.inflora-more-filters {
  font-size: 0.81rem;
  color: var(--ink-muted);
}

.inflora-more-filters summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  list-style: none;
}

.inflora-more-grid {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.inflora-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}

/* ==========================================================================
   EXECUTIVE SUITE DASHBOARD (#dashboard)
   ========================================================================== */
.suite-top-summary-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.suite-top-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.suite-top-summary-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.suite-top-summary-head p {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.suite-outline-cta {
  height: 36px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid #C7D2FE;
  background: var(--bg-paper);
  color: #3730A3;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

[data-theme="dark"] .suite-outline-cta {
  border-color: var(--brand-border);
  color: var(--brand);
}

.suite-outline-cta:hover {
  background: var(--brand-tint);
  border-color: var(--brand);
}

.suite-outline-cta.btn-xs-pad {
  height: 32px;
  padding: 0 12px;
  font-size: 0.77rem;
}

.suite-top-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.suite-summary-cell {
  border: 1px solid var(--border-subtle);
  background: #FAFBFD;
  border-radius: 13px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

[data-theme="dark"] .suite-summary-cell {
  background: var(--bg-subtle);
}

.suite-summary-cell:hover {
  border-color: var(--border-strong);
  background: var(--bg-paper);
}

.suite-summary-cell strong {
  display: block;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
}

.suite-summary-cell strong.tone-emerald { color: #059669; }
.suite-summary-cell strong.tone-indigo { color: #5B50E8; }
.suite-summary-cell strong.tone-amber { color: #D97706; }
.suite-summary-cell strong.tone-rose { color: #E11D48; }
.suite-summary-cell strong.tone-slate { color: var(--ink-primary); }

.suite-summary-cell span {
  display: block;
  font-size: 0.79rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Greeting Strip */
.suite-greeting-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.suite-greeting-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.suite-greeting-title {
  font-family: var(--font-display);
  font-size: 1.68rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.suite-sparkle {
  display: inline-flex;
  align-items: center;
}

.suite-greeting-sub {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.suite-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-body);
}

.suite-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
}

/* Executive workspace columns */
.suite-exec-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  align-items: start;
  gap: 18px;
}

.suite-main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.suite-side-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1241px) {
  .suite-exec-layout {
    align-items: stretch;
  }

  .suite-main-col > .suite-card:last-child,
  .suite-side-rail > .suite-card:last-child {
    flex: 1;
  }
}

.suite-fullwidth-portfolio {
  margin-top: 18px;
  width: 100%;
  overflow: hidden;
}

/* 4 Soft Pastel Tinted Glance Cards */
.pastel-glance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pastel-card {
  border-radius: 18px;
  padding: 18px 18px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out-expo), box-shadow 0.16s ease;
}

.pastel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.pastel-indigo {
  background: #EEF1FD;
  border-color: #DCE3FB;
}

.pastel-mint {
  background: #E8F9F0;
  border-color: #CBEFD9;
}

.pastel-lilac {
  background: #F4F0FE;
  border-color: #E3DAFC;
}

.pastel-peach {
  background: #FFF3EF;
  border-color: #FDE0D6;
}

[data-theme="dark"] .pastel-indigo { background: rgba(99, 102, 241, 0.12); border-color: rgba(129, 140, 248, 0.22); }
[data-theme="dark"] .pastel-mint { background: rgba(16, 185, 129, 0.12); border-color: rgba(52, 211, 153, 0.22); }
[data-theme="dark"] .pastel-lilac { background: rgba(139, 92, 246, 0.12); border-color: rgba(167, 139, 250, 0.22); }
[data-theme="dark"] .pastel-peach { background: rgba(244, 63, 94, 0.11); border-color: rgba(251, 113, 133, 0.22); }

.pastel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pastel-icon-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  box-shadow: 0 2px 6px rgba(20, 17, 43, 0.04);
}

[data-theme="dark"] .pastel-icon-chip {
  background: rgba(255, 255, 255, 0.09);
}

.pastel-indigo .pastel-icon-chip { color: #4F46E5; }
.pastel-mint .pastel-icon-chip { color: #059669; }
.pastel-lilac .pastel-icon-chip { color: #7C3AED; }
.pastel-peach .pastel-icon-chip { color: #E11D48; }

.pastel-arrow {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.pastel-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-body);
  margin-bottom: 4px;
}

.pastel-number {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.pastel-caption {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Suite Clean White Cards */
.suite-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.suite-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.suite-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  color: var(--ink-primary);
}

.suite-card-title svg {
  color: var(--ink-muted);
}

.suite-text-link {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.14s ease;
}

.suite-text-link:hover {
  color: var(--brand);
}

.suite-analytics-pair {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  gap: 16px;
}

.suite-analytics-pair > .suite-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.suite-analytics-pair > .suite-card .suite-donut-split {
  flex: 1;
}

.suite-analytics-pair > .suite-card .suite-card-footnote {
  margin-top: auto;
}

.suite-legend-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.suite-legend-inline i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}

.suite-cpm-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suite-cpm-row {
  cursor: pointer;
}

.suite-cpm-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.82rem;
}

.suite-cpm-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-cpm-name strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.suite-cpm-name em {
  font-style: normal;
  color: var(--ink-muted);
  font-size: 0.75rem;
  margin-left: 6px;
}

.suite-cpm-val {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--jade);
  flex-shrink: 0;
}

.suite-progress-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
}

.suite-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #635BFF 0%, #8B5CF6 100%);
}

.suite-card-footnote {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.suite-foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
}

/* Donut + Percentage Legend Split */
.suite-donut-split {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 6px 0;
}

.suite-donut-box {
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.suite-donut-box svg {
  width: 100%;
  height: 100%;
}

.suite-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.suite-donut-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.suite-legend-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-body);
  min-width: 0;
}

.suite-legend-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-legend-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.suite-donut-legend strong {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
}

/* Monitored Networks Clean Rows */
.suite-network-list {
  display: flex;
  flex-direction: column;
}

.suite-network-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) minmax(240px, 1.5fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 8px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.14s ease;
}

.suite-network-row:last-child {
  border-bottom: none;
}

.suite-network-row:hover {
  background: var(--bg-row-hover);
}

.suite-net-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.suite-net-identity img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
}

.suite-net-identity strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.suite-net-identity span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-net-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.suite-net-metrics small {
  display: block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.suite-net-metrics strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.suite-net-end {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pill-active {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--jade-tint);
  color: var(--jade);
  font-size: 0.73rem;
  font-weight: 600;
}

.suite-row-arrow {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-tint);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Perspective Inflora Campaign-Style Portfolio Rows */
.inflora-portfolio-list {
  display: flex;
  flex-direction: column;
}

.rate-ledger {
  container: rate-ledger / inline-size;
  --ledger-columns: minmax(0, 2.25fr) minmax(0, 1.04fr) minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(116px, .78fr);
}

.rate-ledger-grid {
  display: grid;
  grid-template-columns: var(--ledger-columns);
  gap: 14px;
  align-items: start;
  padding-inline: clamp(14px, 2cqi, 24px);
}

.rate-ledger-header {
  padding-block: 11px;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  font-size: .72rem;
  font-weight: 700;
}

.rate-ledger-list { margin: 0; padding: 0; list-style: none; }
.rate-ledger-row { padding-block: 16px; border-bottom: 1px solid var(--border-subtle); }
.rate-ledger-row:last-child { border-bottom: 0; }
.rate-ledger-row:hover, .rate-ledger-row:focus-within { background: var(--bg-row-hover); }

.rate-ledger-programme {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.rate-ledger-grid > *, .rate-ledger-programme > * { min-width: 0; overflow-wrap: anywhere; }
.rate-ledger-title {
  display: block;
  margin: 0 0 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-primary);
  font: inherit;
  font-weight: 700;
  text-align: left;
  line-height: 1.3;
  cursor: pointer;
}
.rate-ledger-title:hover { color: var(--brand); text-decoration: underline; }
.rate-ledger-meta, .rate-ledger-code, .rate-ledger-saving { display: block; font-size: .75rem; line-height: 1.35; }
.rate-ledger-meta { color: var(--ink-muted); }
.rate-ledger-code { margin-top: 5px; color: var(--ink-muted); font-size: .69rem; font-variant-numeric: tabular-nums; }
.rate-ledger-saving { color: var(--jade); font-weight: 650; }
.rate-ledger-cell { display: grid; gap: 3px; }
.rate-ledger-cell > strong { color: var(--ink-primary); font-size: .86rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.rate-ledger-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-block: 2px; }
.rate-ledger-status .badge { white-space: normal; }
.rate-ledger-status .ip-overdue-pill { margin: 0; }
.rate-ledger-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.rate-ledger-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.workspace-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  max-width: calc(100vw - 20px);
  overflow: auto;
  background: var(--bg-paper);
  color: var(--ink-primary);
  border: 1px solid var(--border-sand);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(26, 23, 57, .17);
}
.rate-ledger-more-items { width: 178px; padding: 5px; }
.rate-ledger-more-items:popover-open { display: grid; gap: 2px; }
.rate-ledger-more-items .btn {
  justify-content: flex-start;
  min-height: 32px;
  white-space: normal;
  text-align: left;
  background: transparent;
  border-color: transparent;
}
.rate-ledger-more-items .btn:hover { background: var(--bg-row-hover); }

@container rate-ledger (max-width: 900px) {
  .rate-ledger-header { display: none; }
  .rate-ledger-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .rate-ledger-programme, .rate-ledger-actions { grid-column: 1 / -1; }
  .rate-ledger-programme { border-bottom: 1px solid var(--border-subtle); padding-bottom: 9px; }
  .rate-ledger-label { position: static; width: auto; height: auto; clip-path: none; white-space: normal; color: var(--ink-muted); font-size: .7rem; font-weight: 650; }
}

@container rate-ledger (max-width: 500px) {
  .rate-ledger-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.inflora-portfolio-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.55fr) minmax(115px, 0.9fr) minmax(120px, 0.95fr) minmax(140px, 1.05fr) minmax(115px, 0.9fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 10px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: background 0.14s ease;
}

.inflora-portfolio-row:last-child {
  border-bottom: none;
}

.inflora-portfolio-row:hover {
  background: var(--bg-row-hover);
}

.ip-col-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ip-brand-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}

.ip-title-wrap {
  min-width: 0;
  flex: 1;
}

.ip-title-wrap strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.ip-title-wrap span {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.ip-col-stat small,
.ip-col-progress small,
.ip-col-schedule small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

.ip-col-stat strong,
.ip-col-schedule strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
}

.ip-col-stat span,
.ip-col-progress span,
.ip-col-schedule span {
  display: block;
  font-size: 0.73rem;
  color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.ip-profit-text {
  color: var(--jade) !important;
  font-weight: 600;
}

.ip-mini-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
  margin: 4px 0;
}

.ip-mini-bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #5E5CE6, #7C3AED);
  margin: 0;
}

.ip-overdue-pill {
  display: inline-block !important;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--rose-tint);
  color: var(--rose) !important;
  font-size: 0.68rem !important;
  font-weight: 700;
  margin-top: 3px;
}

.ip-col-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ip-go-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, transform 0.14s ease;
}

.ip-go-btn:hover {
  background: #E2DCFD;
  transform: translateX(1px);
}

.ip-compact-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ip-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.ip-icon-btn:hover {
  background: var(--brand-tint);
  border-color: var(--brand-border);
  color: var(--brand);
}

.ip-icon-btn.jade {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade);
}

.ip-icon-btn.whatsapp {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: #10B981;
}

/* Right Operational Rail Cards */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.quick-action-tile {
  padding: 15px 10px;
  border-radius: 14px;
  border: 1px solid #ECEEFF;
  background: #F7F8FE;
  color: var(--ink-primary);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

[data-theme="dark"] .quick-action-tile {
  background: var(--bg-subtle);
  border-color: var(--border-sand);
}

.quick-action-tile:hover {
  transform: translateY(-2px);
  background: var(--brand-tint);
  border-color: var(--brand-border);
}

.qa-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg-paper);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.quick-action-wide {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: #FAFBFD;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

[data-theme="dark"] .quick-action-wide {
  background: var(--bg-subtle);
}

.quick-action-wide:hover {
  background: var(--brand-tint);
  border-color: var(--brand-border);
}

.qa-wide-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-tint);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-wide > div > strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-primary);
}

.quick-action-wide > div > span {
  display: block;
  font-size: 0.71rem;
  color: var(--ink-muted);
}

.qa-chevron {
  margin-left: auto;
  font-size: 1.05rem;
  color: var(--ink-faint);
}

.attention-count-pill {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--rose-tint);
  color: var(--rose);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attention-row {
  width: 100%;
  padding: 10px 8px;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.14s ease;
}

.attention-row:hover {
  background: var(--bg-subtle);
}

.att-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.att-icon.tone-rose { background: var(--rose-tint); color: var(--rose); }
.att-icon.tone-indigo { background: var(--brand-tint); color: var(--brand); }
.att-icon.tone-amber { background: var(--amber-tint); color: var(--amber); }

.att-copy {
  min-width: 0;
  flex: 1;
}

.att-copy strong {
  display: block;
  font-size: 0.81rem;
  color: var(--ink-primary);
}

.att-copy span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.att-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-body);
  flex-shrink: 0;
}

.attention-inline-approvals {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-sand);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.att-mini-approve {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--ink-body);
}

.suite-rail-footlink {
  margin-top: 12px;
  width: 100%;
  padding: 8px 4px 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.77rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.suite-rail-footlink:hover {
  color: var(--brand);
}

.suite-activity-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-sand);
}

#team-audit-log { scroll-margin-top: calc(var(--header-height) + 12px); }

.suite-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.suite-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.suite-act-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 6px;
  flex-shrink: 0;
}

.suite-activity-item p {
  font-size: 0.79rem;
  color: var(--ink-body);
  line-height: 1.42;
}

.suite-activity-item small {
  display: block;
  font-size: 0.71rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.suite-caught-up {
  padding: 18px 10px;
  text-align: center;
}

.suite-caught-up strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink-primary);
}

.suite-caught-up span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   9. EXECUTIVE OVERVIEW, HIGH-DENSITY TELEMETRY & SYMMETRICAL VISUAL GRID
   -------------------------------------------------------------------------- */
.kpi-grid,
.kpi-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  padding: 15px 18px;
  box-shadow: var(--shadow-card), var(--surface-rim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out-expo),
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.kpi-headline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.kpi-inline-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.kpi-micro-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  display: flex;
  gap: 2px;
  overflow: hidden;
  margin: 2px 0;
}

.kpi-micro-bar > span {
  height: 100%;
  border-radius: 2px;
}

.kpi-sub-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.kpi-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--ink-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.kpi-mini-pill:hover {
  border-color: var(--border-strong);
}

.kpi-mini-pill.jade {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade);
}

.kpi-mini-pill.amber {
  background: var(--amber-tint);
  border-color: var(--amber-border);
  color: var(--amber);
}

.kpi-meta-mono {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

/* Subtle Specular Top Rim Highlight on Hover */
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-bright), #38BDF8);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-hover);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: -0.005em;
}

.kpi-icon-box,
.kpi-icon-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  flex-shrink: 0;
}

.kpi-icon-box svg,
.kpi-icon-pill svg {
  width: 15px;
  height: 15px;
}

.kpi-icon-box.tone-jade,
.kpi-icon-pill.tone-jade {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade);
}

.kpi-icon-box.tone-amber,
.kpi-icon-pill.tone-amber {
  background: var(--amber-tint);
  border-color: var(--amber-border);
  color: var(--amber);
}

.kpi-icon-box.tone-rose,
.kpi-icon-pill.tone-rose {
  background: var(--rose-tint);
  border-color: var(--rose-border);
  color: var(--rose);
}

.kpi-icon-box.tone-slate,
.kpi-icon-pill.tone-slate {
  background: var(--slate-tint);
  border-color: var(--slate-border);
  color: var(--slate);
}

.kpi-value {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.62rem;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.kpi-trend,
.kpi-foot {
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.35;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--ink-body);
}

.trend-chip.up {
  background: var(--jade-tint);
  color: var(--jade);
}

.trend-chip.warn {
  background: var(--amber-tint);
  color: var(--amber);
}

.trend-chip.urgent {
  background: var(--rose-tint);
  color: var(--rose);
}

/* Symmetrical 5-Column Network Command Strip */
.network-dock-section {
  margin-bottom: 20px;
}

.section-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-inline-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.section-inline-title h2 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.section-inline-title span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.network-dock-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.network-dock-card {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-top: 2.5px solid var(--ch-accent, var(--brand));
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card), var(--surface-rim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s var(--ease-out-expo), border-color 0.16s ease, box-shadow 0.16s ease;
}

.network-dock-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  border-top-color: var(--ch-accent, var(--brand));
  box-shadow: var(--shadow-hover);
}

.nd-top {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.nd-top img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
}

.nd-name-wrap {
  min-width: 0;
  flex: 1;
}

.nd-name-wrap strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nd-name-wrap span {
  display: block;
  font-size: 10.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nd-code {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5.5px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--ink-muted);
  flex-shrink: 0;
}

.nd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.nd-stats small {
  display: block;
  font-size: 10px;
  color: var(--ink-muted);
  margin-bottom: 1px;
  white-space: nowrap;
}

.nd-stats strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
}

.nd-stats .nd-sub {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Visual Intelligence Row: Equal-Height Balanced 2-Column Analytics */
.intel-visual-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 20px;
}

.intel-card {
  display: flex;
  flex-direction: column;
}

.intel-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reach-matrix-layout,
.reach-overview-body {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  height: 100%;
}

.donut-chart-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.reach-yield-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.reach-yield-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.2px;
}

.reach-yield-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border-sand);
  white-space: nowrap;
}

.reach-yield-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.reach-yield-table tbody tr:last-child td {
  border-bottom: none;
}

.reach-yield-table tbody tr:hover td {
  background: var(--bg-row-hover);
}

.ry-net-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ry-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-summary-box {
  padding-bottom: 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.cpm-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cpm-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: var(--radius-sm);
  transition: background 0.14s ease;
}

.cpm-rank-row:hover {
  background: var(--bg-subtle);
}

.cpm-rank-idx {
  width: 24px;
  height: 22px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cpm-rank-main {
  min-width: 0;
  flex: 1;
}

.cpm-rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 12.2px;
}

.cpm-rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpm-rank-title strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.cpm-rank-title em {
  font-style: normal;
  color: var(--ink-muted);
  font-size: 11.3px;
  margin-left: 4px;
}

.cpm-rank-val {
  color: var(--jade);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.donut-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center-label strong {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.donut-center-label span {
  font-size: 0.68rem;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* 5-Network Strip Grid */
.channel-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.intel-visual-grid .channel-strip-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.channel-mini-card {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-top: 3px solid var(--ch-accent, var(--brand));
  border-radius: var(--radius-md);
  padding: 13px 14px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.16s var(--ease-out-expo), border-color 0.16s ease, box-shadow 0.16s ease;
}

.channel-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  border-top-color: var(--ch-accent, var(--brand));
  box-shadow: var(--shadow-hover);
}

.channel-mini-card img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

/* Inventory Health Stacked Bar & CPM Efficiency Panel */
.health-stacked-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
  display: flex;
  gap: 2px;
  margin: 10px 0;
}

.health-segment {
  height: 100%;
  transition: width 0.45s var(--ease-out-expo);
}

.health-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.health-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Legacy Overview Hero Support (Cleanly Harmonized) */
.overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, var(--brand-tint) 0%, var(--bg-paper) 68%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.overview-art {
  display: none;
}

.overview-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 6px;
}

.overview-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.overview-deadline {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-xs);
}

.deadline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.deadline-top strong {
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--amber-tint);
  color: var(--amber);
}

.deadline-programme {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink-primary);
}

.deadline-channel {
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.deadline-link {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-split,
.overview-work {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.radar-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  margin-bottom: 8px;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s var(--ease-spring);
}

.radar-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.radar-item:last-child {
  margin-bottom: 0;
}

.radar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.radar-note {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.activity-row {
  display: flex;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--brand-tint);
}

/* --------------------------------------------------------------------------
   10. SEMANTIC BADGES, BASIS PILLS & CONFIDENTIAL MASK
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 2.5px 8.5px;
  border-radius: var(--radius-pill);
  font-size: 11.3px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-jade {
  background: var(--jade-tint);
  color: var(--jade);
  border-color: var(--jade-border);
}

.badge-amber {
  background: var(--amber-tint);
  color: var(--amber);
  border-color: var(--amber-border);
}

.badge-ochre {
  background: var(--ochre-tint);
  color: var(--ochre);
  border-color: var(--ochre-border);
}

.badge-rose {
  background: var(--rose-tint);
  color: var(--rose);
  border-color: var(--rose-border);
}

.badge-slate {
  background: var(--slate-tint);
  color: var(--slate);
  border-color: var(--slate-border);
}

.badge-brand {
  background: var(--brand-tint);
  color: var(--brand);
  border-color: var(--brand-border);
}

.badge-stone {
  background: var(--bg-subtle);
  color: var(--ink-body);
  border-color: var(--border-sand);
}

/* Calm Neutral Architectural Mono Tag for Rate Basis (No Rainbow Noise) */
.basis-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2.5px 7.5px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  color: var(--ink-body);
  white-space: nowrap;
}

.confidential-mask {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. CHANNEL CARDS, CHANNEL HUB & AUTHENTIC MULTI-COLOR SOCIAL PILLS
   -------------------------------------------------------------------------- */
.channel-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.network-directory {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.channel-card {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.18s var(--ease-out-expo), border-color 0.18s ease, box-shadow 0.18s ease;
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-hover);
}

.suite-offer-callout {
  padding: 10px 13px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  font-size: 12.2px;
  color: var(--brand);
}

.suite-desk-strip {
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.network-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "identity metrics"
    "social offer"
    "contact footer";
  align-items: center;
  gap: 14px 22px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-left: 4px solid var(--network-accent, var(--brand));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.network-profile .ch-head { grid-area: identity; align-items: center; }
.network-profile .ch-metrics-band { grid-area: metrics; margin: 0; }
.network-social { grid-area: social; min-width: 0; }
.network-offer {
  grid-area: offer;
  color: var(--amber);
  padding: 8px 11px;
  background: var(--amber-tint);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
}
.network-contact { grid-area: contact; font-size: 0.8rem; min-width: 0; color: var(--ink-body); }
.network-footer {
  grid-area: footer;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ch-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.ch-identity img {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.ch-metrics-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.ch-metric-item small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.ch-metric-item strong {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
}

/* Authentic Multi-Color Brand Social Pills */
.social-links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  color: var(--ink-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition:
    transform 0.14s var(--ease-spring),
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.social-pill svg {
  width: 13.5px;
  height: 13.5px;
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: transform 0.14s var(--ease-spring), color 0.14s ease;
}

/* Authentic Platform Jewel Accents */
.social-pill[href*="youtube.com"] svg:first-child,
.social-pill[href*="youtu.be"] svg:first-child,
.social-pill.social-youtube svg:first-child {
  color: #EF4444;
}

.social-pill[href*="facebook.com"] svg:first-child,
.social-pill.social-facebook svg:first-child {
  color: #1877F2;
}

.social-pill[href*="instagram.com"] svg:first-child,
.social-pill.social-instagram svg:first-child {
  color: #E1306C;
}

.social-pill[href*="tiktok.com"] svg:first-child,
.social-pill.social-tiktok svg:first-child {
  color: var(--ink-primary);
}

.social-pill[href*="linkedin.com"] svg:first-child,
.social-pill.social-linkedin svg:first-child {
  color: #0A66C2;
}

.social-pill[href*="x.com"] svg:first-child,
.social-pill[href*="twitter.com"] svg:first-child,
.social-pill.social-twitter svg:first-child {
  color: var(--ink-primary);
}

.social-pill[href*="play.google.com"] svg:first-child,
.social-pill.social-android_app svg:first-child {
  color: #10B981;
}

.social-pill[href*="apps.apple.com"] svg:first-child,
.social-pill.social-ios_app svg:first-child {
  color: #0EA5E9;
}

.social-pill:hover {
  transform: translateY(-1px);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--ink-primary);
  box-shadow: 0 3px 8px rgba(9, 13, 26, 0.07);
}

.social-pill.is-empty,
.social-pill.unconfigured,
.social-pill[aria-disabled="true"] {
  color: var(--ink-faint);
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.social-edit-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 29px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.14s ease;
}

.social-edit-trigger svg {
  width: 12.5px;
  height: 12.5px;
}

.social-edit-trigger:hover {
  background: var(--brand-tint);
  border-style: solid;
  border-color: var(--brand-border);
  color: var(--brand);
}

/* Channel Hub Hero */
.channel-hub-hero,
.channel-workspace {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(79, 70, 229, 0.08), transparent 72%),
    var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card), var(--surface-rim);
}

.channel-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 33%);
  gap: 20px;
  align-items: start;
}

.channel-sales-desk {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  padding: 15px;
  display: grid;
  gap: 12px;
}

.channel-workspace-tabs {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  padding: 3px;
}

/* --------------------------------------------------------------------------
   12. CINEMA DRAMA CARDS (POSTER ART + SPARKLINES) & TABLE VIEW
   -------------------------------------------------------------------------- */
.drama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.drama-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s var(--ease-out-expo), border-color 0.18s ease, box-shadow 0.2s ease;
}

.drama-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-hover);
}

.drama-clean-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drama-clean-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.drama-ch-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}

.drama-ch-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

/* Bespoke 136px Cinema Poster Artwork Header */
.drama-poster-wrap {
  height: 136px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0B1120 0%, #1E1B4B 100%);
  flex-shrink: 0;
}

.drama-poster-wrap img.drama-poster-art,
img.drama-poster-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease-out-expo);
}

.drama-card:hover .drama-poster-wrap img.drama-poster-art {
  transform: scale(1.04);
}

/* Cinema Gradient Scrim Over Poster Bottom */
.drama-poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 20, 0.08) 0%,
    rgba(7, 10, 20, 0.12) 48%,
    rgba(7, 10, 20, 0.82) 100%
  );
  pointer-events: none;
}

.drama-poster-overlay,
.drama-poster-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drama-poster-bottom {
  position: absolute;
  bottom: 10px;
  left: 13px;
  right: 13px;
  z-index: 2;
  color: #FFFFFF;
}

.drama-poster-bottom .drama-title {
  color: #FFFFFF !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.drama-poster-bottom .drama-slot-meta {
  color: rgba(226, 232, 240, 0.88) !important;
}

.drama-glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 26, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #F8FAFC;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.drama-glass-pill img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Fallback Header When Rendered Without Poster Artwork */
.drama-card-head,
.drama-banner {
  background: var(--bg-subtle);
  border-top: 3px solid var(--drama-accent, var(--brand));
  border-bottom: 1px solid var(--border-sand);
  padding: 14px 16px 12px;
  color: var(--ink-primary);
  position: relative;
}

.drama-card-top,
.drama-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.drama-ch-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-body);
}

.drama-ch-tag img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.drama-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.28;
  color: var(--ink-primary);
}

.drama-slot-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.drama-body {
  padding: 15px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drama-spark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.drama-spark-row svg {
  flex-shrink: 0;
  overflow: visible;
}

.drama-views-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.drama-card-foot {
  padding: 11px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   13. INTERACTIVE 16:9 BROADCAST PLACEMENT VISUALIZER & FORMAT CARDS
   -------------------------------------------------------------------------- */
.placement-screen {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: radial-gradient(circle at 62% 28%, #1E293B 0%, #0B1120 70%, #050811 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(9, 13, 26, 0.16);
  display: block;
  isolation: isolate;
}

.placement-screen svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Placement Screen Size Modifiers */
.placement-mini {
  width: 64px;
  height: 36px;
  border-radius: 5px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(9, 13, 26, 0.18);
}

.placement-sm {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  flex-shrink: 0;
}

.placement-card {
  width: 100%;
  border-radius: 10px;
}

.placement-preview-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

/* Animated Ad Zone Elements Inside .placement-screen */
.placement-screen .pl-highlight,
.placement-screen .pl-bug,
.placement-screen .pl-active-zone {
  animation: placementGlow 2.6s ease-in-out infinite;
}

.placement-screen .pl-ticker,
.placement-screen .pl-ticker-track,
.placement-screen .pl-crawl {
  animation: tickerCrawl 5.5s linear infinite;
}

/* Format Catalogue Visual Cards */
.format-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.format-visual-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--surface-rim);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s var(--ease-out-expo), border-color 0.18s ease, box-shadow 0.18s ease;
}

.format-visual-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-hover);
}

.format-card-stage {
  padding: 12px 12px 0;
}

.format-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.format-board .table-wrap {
  max-height: 70vh;
  overflow: auto;
}

.format-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  white-space: normal;
  color: var(--ink-primary);
}

.format-channel img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   14. FILTER PANELS, FORM FIELDS, PRESET STRIPS & TABS
   -------------------------------------------------------------------------- */
.filter-panel {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  padding: 15px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card), var(--surface-rim);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 11px;
}

.catalogue-layout {
  display: grid;
  grid-template-columns: minmax(195px, 232px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.catalogue-results {
  min-width: 0;
}

.catalogue-filters,
.comparison-controls {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  background: var(--bg-paper);
  box-shadow: var(--shadow-card);
}

.catalogue-filters > h2 {
  font-size: 0.84rem;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--ink-primary);
}

.catalogue-filters .filter-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.catalogue-result-count {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 0.81rem;
}

.catalogue-result-count strong {
  color: var(--ink-primary);
  font-weight: 700;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.005em;
}

.field-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.42;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 37px;
  padding: 6px 11px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--ink-primary);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

[data-theme="dark"] .field-input,
[data-theme="dark"] .field-select,
[data-theme="dark"] .field-textarea {
  background: var(--bg-subtle);
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--ink-faint);
}

.field-input:hover,
.field-select:hover,
.field-textarea:hover {
  border-color: var(--border-strong);
}

.field-textarea {
  min-height: 84px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.52;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  background: var(--bg-paper);
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

/* Preset Filter Pills */
.preset-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}

.preset-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.12s var(--ease-spring), background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.preset-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.preset-pill:active {
  transform: scale(0.97);
}

.preset-pill.active {
  background: var(--brand-tint);
  border-color: var(--brand-border);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--brand-border);
}

/* Horizontal Sub-Navigation Tabs */
.tabs-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3.5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  max-width: 100%;
}

.tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 31px;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.tab-btn:hover {
  color: var(--ink-primary);
}

.tab-btn.active {
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--border-subtle);
}

/* --------------------------------------------------------------------------
   15. PRECISION FINANCIAL DATA TABLES & INLINE ACTION GROUPS
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-paper);
  border-radius: inherit;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.44;
}

.data-table th {
  text-align: left;
  padding: 10px 13px;
  background: var(--bg-table-head);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  border-bottom: 1px solid var(--border-sand);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--ink-body);
  background: var(--bg-paper);
  transition: background 0.1s ease;
}

.data-table tbody tr:hover td {
  background: var(--bg-row-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Sticky Left Identifier Column */
.data-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-paper);
  box-shadow: var(--shadow-sticky-left);
}

.data-table th.sticky-col {
  z-index: 5;
  background: var(--bg-table-head);
}

.data-table tbody tr:hover td.sticky-col {
  background: var(--bg-row-hover);
}

/* Sticky Right Inline Action Column */
.data-table .sticky-action-col {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--bg-paper);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sticky-right);
  white-space: nowrap;
}

.data-table th.sticky-action-col {
  z-index: 5;
  background: var(--bg-table-head);
  border-left: 1px solid var(--border-sand);
}

.data-table tbody tr:hover td.sticky-action-col {
  background: var(--bg-row-hover);
}

.num-col {
  text-align: right !important;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-nowrap {
  white-space: nowrap;
}

.col-programme {
  min-width: 205px;
  max-width: 270px;
}

.col-placement {
  min-width: 255px;
  max-width: 360px;
}

.cell-clamp-1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpm-inline-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}

.cpm-inline-metric strong {
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 600;
}

.cpm-inline-metric small {
  color: var(--ink-muted);
  font-size: 10.5px;
}

.expiry-inline-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 1px 5.5px;
  border-radius: 4px;
  background: var(--rose-tint);
  border: 1px solid var(--rose-border);
  color: var(--rose);
  font-size: 10.3px;
  font-weight: 700;
  vertical-align: middle;
}

/* Crisp Inline Action Button Group (No Clunky <details> Menus) */
.action-btn-group,
.rate-action-list {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
}

.rate-filter-panel {
  margin-bottom: 16px;
}

.rate-results {
  min-width: 0;
}

.rate-presets {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.rate-directory {
  width: 100%;
}

.rate-directory .rate-programme {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rate-directory .rate-programme img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.rate-disclosure {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.73rem;
}

.rate-disclosure summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 500;
  width: fit-content;
}

.rate-breakdown {
  margin-top: 6px;
  line-height: 1.58;
}

.compare-row-check {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-bright);
  cursor: pointer;
}

.custom-social-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.rate-price-line {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) auto;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.75rem;
}

.rate-price-line > span {
  color: var(--ink-muted);
}

.rate-price-line > div {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   16. COMPARISON STUDIO BARS & PROPOSAL WORKBENCH
   -------------------------------------------------------------------------- */
.compare-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.comparison-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.bar-row {
  margin-bottom: 13px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 12.5px;
}

.bar-track {
  width: 100%;
  height: 9px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transform-origin: left center;
  animation: barGrow 520ms var(--ease-out-expo) both;
  transition: width 0.35s var(--ease-out-expo);
}

/* Proposal Workbench & Team Roster Split Layouts */
.report-workspace,
.team-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 30%);
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.proposal-workbench,
.team-roster {
  min-width: 0;
}

.prop-qty-input {
  width: 72px;
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.report-library {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.report-library-header,
.team-invite {
  background: var(--bg-subtle);
  padding: 15px 16px;
  display: grid;
  gap: 10px;
}

.team-invite {
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.team-invite-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.report-library-item {
  padding: 12px 16px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  transition: background 0.14s ease;
}

.report-library-item:hover {
  background: var(--bg-subtle);
}

.team-audit .table-wrap {
  max-height: 62vh;
  overflow: auto;
}

/* --------------------------------------------------------------------------
   17. SETTINGS, SMTP GATEWAY & EMAIL TEMPLATES STUDIO (#settings)
   -------------------------------------------------------------------------- */
.settings-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.settings-workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.settings-nav,
.settings-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.settings-workspace .settings-nav {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--bg-subtle);
  box-shadow: none;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 37px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-body);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.settings-nav-btn svg {
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: color 0.14s ease;
}

.settings-nav-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.settings-nav-btn:hover svg {
  color: var(--ink-primary);
}

.settings-nav-btn.active {
  background: var(--brand-tint);
  border-color: var(--brand-border);
  color: var(--brand);
  font-weight: 600;
}

.settings-workspace .settings-nav-btn.active {
  background: var(--bg-paper);
  border-color: var(--border-sand);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.settings-nav-btn.active svg {
  color: var(--brand);
}

.settings-panel,
.settings-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Provider Preset Cards */
.provider-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}

.provider-preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 13px 15px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s var(--ease-spring), border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.provider-preset-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.provider-preset-card.active {
  background: var(--brand-tint);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.provider-preset-card strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.provider-preset-card.active strong {
  color: var(--brand);
}

.provider-preset-card small,
.provider-preset-card span {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.38;
}

/* SMTP Connection Status Banner */
.smtp-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-body);
}

.smtp-status-banner.connected {
  background: var(--jade-tint);
  border-color: var(--jade-border);
  color: var(--jade);
}

.smtp-status-banner.unconfigured {
  background: var(--amber-tint);
  border-color: var(--amber-border);
  color: var(--amber);
}

.smtp-status-banner.error,
.smtp-status-banner.failed {
  background: var(--rose-tint);
  border-color: var(--rose-border);
  color: var(--rose);
}

/* Live Dark Monospace SMTP Diagnostic Console */
.smtp-console-log {
  background: #070B14;
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.68;
  max-height: 260px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.smtp-console-log .log-ok,
.smtp-console-log .ok {
  color: #34D399;
}

.smtp-console-log .log-err,
.smtp-console-log .err {
  color: #FB7185;
}

.smtp-console-log .log-cmd,
.smtp-console-log .cmd {
  color: #818CF8;
}

.smtp-console-log .log-muted {
  color: #64748B;
}

/* Email Template Studio Split Layout */
.template-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.template-list-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-sand);
  background: var(--bg-paper);
  color: var(--ink-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.template-list-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.template-list-item.active {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.var-chips-wrap,
.var-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
}

.var-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8.5px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s var(--ease-spring);
}

.var-chip:hover {
  background: var(--brand-tint);
  border-color: var(--brand-border);
  color: var(--brand);
}

.var-chip:active {
  transform: scale(0.96);
}

/* Email Preview Shell */
.email-preview-shell {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.email-preview-chrome,
.email-preview-toolbar {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border-sand);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chrome-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chrome-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.chrome-dot.red { background: #FB7185; }
.chrome-dot.amber,
.chrome-dot.yellow { background: #FBBF24; }
.chrome-dot.green { background: #34D399; }

.email-preview-meta,
.email-preview-envelope {
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-sand);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--ink-body);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-preview-stage,
.email-preview-viewport {
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--bg-subtle);
  overflow-x: auto;
  min-height: 420px;
}

.email-preview-canvas,
.email-preview-frame {
  width: 100%;
  max-width: 600px;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(9, 13, 26, 0.12);
  overflow: hidden;
  margin: 0 auto;
  transition: max-width 0.24s var(--ease-out-expo);
}

.email-preview-canvas.mobile,
.email-preview-frame.mobile,
.email-preview-shell.mobile .email-preview-canvas,
.email-preview-shell.mobile .email-preview-frame,
.email-preview-shell.preview-mobile .email-preview-canvas,
.email-preview-shell[data-device="mobile"] .email-preview-canvas,
.email-preview-shell[data-width="375"] .email-preview-canvas {
  max-width: 375px;
}

.email-preview-shell iframe {
  width: 100%;
  min-height: 420px;
  border: none;
  display: block;
  background: #FFFFFF;
}

/* --------------------------------------------------------------------------
   18. MODALS, RATE EDITOR, DOSSIERS & TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-backdrop);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 800px;
  max-height: 91vh;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal), var(--surface-rim);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalRise 200ms var(--ease-out-expo) both;
}

.modal-dialog.modal-sm { max-width: 480px; }
.modal-dialog.modal-lg { max-width: 960px; }
.modal-dialog.modal-xl { max-width: 1120px; }

.modal-head {
  padding: 17px 22px;
  border-bottom: 1px solid var(--border-sand);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-paper);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-paper);
}

.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Structured Rate Editor Modal Sections */
.rate-editor {
  max-height: min(92vh, 940px);
}

.rate-editor-head {
  align-items: center;
  border-top: 3px solid var(--brand-bright);
}

.rate-editor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  background: var(--bg-canvas);
}

.rate-editor-section {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-width: 0;
}

.rate-editor-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.rate-editor-validity,
.rate-editor-full {
  grid-column: 1 / -1;
}

.rate-validity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: var(--ink-muted);
  padding-bottom: 7px;
  margin: 18px 0 12px;
  border-bottom: 1px solid var(--border-sand);
}

.form-section-title:first-child,
.rate-editor-section .form-section-title:first-of-type {
  margin-top: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.calc-preview-bar {
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Precision Toast Stack */
.toast-stack {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 390px;
}

.toast {
  background: #0B1120;
  color: #F8FAFC;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #818CF8;
  box-shadow: var(--shadow-popover);
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: modalRise 180ms var(--ease-out-expo) both;
}

.toast.toast-success { border-left-color: #10B981; }
.toast.toast-error { border-left-color: #F43F5E; }
.toast.toast-warning { border-left-color: #F59E0B; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 44px 24px;
  color: var(--ink-muted);
}

.empty-state h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--ink-primary);
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 55;
}

/* --------------------------------------------------------------------------
   19. RESPONSIVE ARCHITECTURE & ACCESSIBILITY MOTION GUARD
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .suite-exec-layout {
    grid-template-columns: 1fr;
  }

  .pastel-glance-grid,
  .inflora-stat-grid,
  .suite-top-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suite-analytics-pair,
  .intel-visual-grid,
  .dashboard-split,
  .overview-work,
  .compare-chart-grid,
  .template-studio-layout {
    grid-template-columns: 1fr;
  }

  .inflora-portfolio-row {
    grid-template-columns: 1.5fr 1fr 1fr auto;
  }

  .inflora-portfolio-row .ip-col-progress,
  .inflora-portfolio-row .ip-col-schedule {
    display: none;
  }

  .network-dock-5 {
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  }

  .channel-strip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-grid,
  .kpi-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .email-preview-shell {
    position: static;
  }
}

@media (max-width: 1160px) {
  .report-workspace,
  .team-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .provider-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -272px;
    top: 0;
    bottom: 0;
    width: 264px;
    z-index: 60;
    transition: left 0.24s var(--ease-out-expo);
    box-shadow: var(--shadow-modal);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .workspace {
    padding: 20px 16px 52px;
  }

  .top-header {
    padding: 0 16px;
  }

  .search-popover {
    min-width: 300px;
  }
}

/* Split Auth Stage Collapses Cleanly Below 980px */
@media (max-width: 980px) {
  .auth-split {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-visual-stage {
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 18px;
  }

  .auth-showcase-frame {
    display: none;
  }

  .auth-form-stage {
    padding: 32px 18px 44px;
    flex: 1;
  }

  .settings-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-nav,
  .settings-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 5px;
  }

  .settings-nav-btn {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .catalogue-layout,
  .channel-workspace-layout,
  .rate-editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .network-profile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "identity"
      "metrics"
      "social"
      "offer"
      "contact"
      "footer";
  }
}

@media (max-width: 720px) {
  .card-header {
    flex-wrap: wrap;
  }

  .pastel-glance-grid,
  .inflora-stat-grid,
  .suite-top-summary-strip,
  .suite-donut-split,
  .suite-network-row,
  .inflora-portfolio-row,
  .kpi-grid,
  .kpi-telemetry-grid,
  .network-dock-5,
  .channel-strip-grid,
  .provider-preset-grid,
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .channel-directory-grid,
  .drama-grid,
  .format-visual-grid,
  .reach-matrix-layout,
  .reach-overview-body,
  .placement-preview-box,
  .overview-hero,
  .rate-validity-fields {
    grid-template-columns: 1fr;
  }

  .global-search-box {
    width: 170px;
  }

  .auth-card {
    padding: 26px 22px;
  }

  .hide-mobile {
    display: none !important;
  }

  .search-kbd,
  .breadcrumb-trail {
    display: none;
  }

  .global-search-input {
    padding-right: 12px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding: 14px 16px;
  }

  .settings-workspace .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   20. V13 ENTERPRISE ACCOUNT POPOVER, PROFILE & SECURITY, LOGO STUDIO,
       VISUAL COLOR SWATCHES, SWITCHES, TEAM ROSTER & 6-TAB SETTINGS
   -------------------------------------------------------------------------- */

/* Topbar Profile Menu & World-Standard Popover */
.profile-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.topbar-user-pill {
  border: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.topbar-user-pill:hover,
.topbar-user-pill[aria-expanded="true"] {
  background: var(--brand-tint);
  border-color: var(--brand-border);
}

.topbar-avatar {
  overflow: hidden;
  padding: 0;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 298px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 18px;
  box-shadow: var(--shadow-popover);
  z-index: 95;
  overflow: hidden;
  animation: popoverDrop 170ms var(--ease-out-expo) both;
}

.profile-dd-head {
  padding: 15px 16px;
  background: linear-gradient(180deg, #F8F8FE 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-dd-dp {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--brand);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(99, 76, 230, 0.22);
}

.profile-dd-meta {
  min-width: 0;
  flex: 1;
}

.profile-dd-meta strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dd-meta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.profile-dd-role-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 700;
}

.profile-dd-list {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-dd-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 13px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
}

.profile-dd-item:hover {
  background: #F4F5FC;
}

.profile-dd-item .pdd-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--bg-subtle);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.14s ease, background 0.14s ease;
}

.profile-dd-item .pdd-icon.tone-indigo {
  background: #EEF1FE;
  color: #4F46E5;
}

.profile-dd-item .pdd-icon.tone-violet {
  background: #F3EFFE;
  color: #6C52F8;
}

.profile-dd-item .pdd-icon.tone-emerald {
  background: #E7F8EF;
  color: #059669;
}

.profile-dd-item:hover .pdd-icon {
  transform: scale(1.04);
}

.profile-dd-item .pdd-icon svg {
  width: 17px;
  height: 17px;
  display: block;
  flex-shrink: 0;
}

.pdd-copy {
  min-width: 0;
  flex: 1;
}

.pdd-copy strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.25;
}

.pdd-copy > span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.35;
  margin-top: 1px;
}

.pdd-arrow {
  font-size: 1.05rem;
  color: var(--ink-faint);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.14s ease, color 0.14s ease;
}

.profile-dd-item:hover .pdd-arrow {
  color: var(--brand);
  transform: translateX(2px);
}

.profile-dd-foot {
  padding: 7px;
  border-top: 1px solid var(--border-subtle);
  background: #FAFBFD;
}

.profile-dd-logout {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--rose);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease;
}

.profile-dd-logout:hover {
  background: var(--rose-tint);
}

.pdd-logout-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--rose-tint);
  color: var(--rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdd-logout-icon svg {
  width: 15.5px;
  height: 15.5px;
  display: block;
}

/* Shared User DP / Initials Avatar Component */
.user-dp-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-xs);
}

.user-dp-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-dp-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(20, 17, 43, 0.14);
}

/* Dashboard Quick Actions Tones */
.qa-badge-pill {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
}

.qa-icon.tone-indigo { background: var(--brand-tint); color: var(--brand); }
.qa-icon.tone-emerald { background: var(--jade-tint); color: var(--jade); }
.qa-icon.tone-amber { background: var(--amber-tint); color: var(--amber); }
.qa-icon.tone-slate { background: var(--slate-tint); color: var(--slate); }

/* Channel Modal Brand Logo Uploader & Friendly Color Swatches */
.channel-brand-studio-box {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  padding: 15px 16px;
  border-radius: 16px;
  background: #F8F9FE;
  border: 1px solid var(--border-sand);
  margin-bottom: 16px;
  align-items: center;
}

.ch-logo-uploader {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ch-logo-preview-frame {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  flex-shrink: 0;
}

.ch-logo-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.ch-logo-upload-copy strong {
  display: block;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.ch-logo-upload-copy > span {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.ch-logo-upload-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.color-swatch-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: var(--swatch, #634CE6);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.16);
  cursor: pointer;
  padding: 0;
  transition: transform 0.14s var(--ease-spring), box-shadow 0.14s ease;
}

.color-swatch-dot.sm {
  width: 22px;
  height: 22px;
}

.color-swatch-dot:hover {
  transform: scale(1.12);
}

.color-swatch-dot.active {
  transform: scale(1.12);
  box-shadow: 0 0 0 2.5px var(--swatch, #634CE6);
}

.custom-color-wheel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--border-sand);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-body);
  cursor: pointer;
}

.custom-color-wheel input[type="color"] {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

/* Crisp iOS / Stripe Toggle Switch */
.ui-switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.ui-switch.sm {
  width: 36px;
  height: 20px;
}

.ui-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ui-switch-track {
  position: absolute;
  inset: 0;
  background: #D5DAE8;
  border-radius: var(--radius-pill);
  transition: background 0.18s ease;
}

.ui-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 0.18s var(--ease-spring);
}

.ui-switch.sm .ui-switch-track::after {
  width: 14px;
  height: 14px;
}

.ui-switch input:checked + .ui-switch-track {
  background: var(--brand);
}

.ui-switch input:checked + .ui-switch-track::after {
  transform: translateX(18px);
}

.ui-switch.sm input:checked + .ui-switch-track::after {
  transform: translateX(16px);
}

/* Profile & Security Workspace (#profile & Settings -> Profile tab) */
.profile-security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.88fr);
  gap: 20px;
  align-items: start;
}

.profile-side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-dp-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #F8F9FE;
  border: 1px solid var(--border-sand);
  margin-bottom: 18px;
}

.profile-dp-controls {
  min-width: 0;
  flex: 1;
}

.profile-dp-controls strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.profile-dp-controls > span {
  display: block;
  font-size: 0.77rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.profile-dp-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-color-fallback-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.profile-color-fallback-row small {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.notif-pref-stack {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-sand);
  border-radius: 14px;
  overflow: hidden;
  background: #FAFBFD;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.14s ease;
}

.notif-pref-row:last-child {
  border-bottom: none;
}

.notif-pref-row:hover {
  background: #F3F5FC;
}

.notif-pref-row > div > strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.notif-pref-row > div > span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.profile-card-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Password Strength Meter */
.pass-strength-wrap {
  margin-top: 8px;
}

.pass-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

.pass-strength-bars i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: #E5E7EB;
  transition: background 0.18s ease;
}

.pass-strength-wrap[data-score="1"] .pass-strength-bars i:nth-child(1) { background: var(--rose); }
.pass-strength-wrap[data-score="2"] .pass-strength-bars i:nth-child(-n+2) { background: var(--amber); }
.pass-strength-wrap[data-score="3"] .pass-strength-bars i:nth-child(-n+3) { background: var(--slate); }
.pass-strength-wrap[data-score="4"] .pass-strength-bars i { background: var(--jade); }

.pass-strength-wrap span {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.clearance-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clearance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.81rem;
  color: var(--ink-body);
}

.clearance-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Rebuilt Full-Width Team & Roles (#admin) */
.team-share-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-radius: 18px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.tss-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  flex: 1;
}

.tss-copy > div > strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.tss-copy > div > span {
  display: block;
  font-size: 0.77rem;
  color: var(--ink-muted);
}

.tss-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tss-url-input {
  width: 260px;
  min-height: 35px;
  font-size: 0.78rem;
  background: var(--bg-subtle);
}

.team-roster-list {
  display: flex;
  flex-direction: column;
}

.team-member-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) minmax(135px, 0.95fr) minmax(150px, 1.05fr) minmax(150px, 1.05fr) minmax(86px, 0.6fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 13px;
  transition: background 0.14s ease;
}

.team-member-row:last-child {
  border-bottom: none;
}

.team-member-row:hover {
  background: var(--bg-row-hover);
}

.team-member-row.is-suspended {
  opacity: 0.68;
}

.tm-col-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.tm-name-stack {
  min-width: 0;
  flex: 1;
}

.tm-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tm-name-stack strong {
  font-size: 0.91rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-you-chip {
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 700;
}

.tm-name-stack > span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-name-stack > small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-col-role small,
.tm-col-perm small,
.tm-col-status small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 5px;
}

.tm-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.tm-perm-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.tm-perm-text.on {
  color: var(--ink-primary);
}

.tm-col-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

/* 4-Role Capability Matrix */
.role-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.role-matrix-card {
  padding: 16px;
  border-radius: 15px;
  background: #FAFBFD;
  border: 1px solid var(--border-sand);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rmc-head p {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-top: 7px;
  line-height: 1.4;
}

.rmc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rmc-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--ink-body);
  line-height: 1.42;
}

.rmc-list li svg {
  color: var(--jade);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   ENTERPRISE 2-COLUMN SETTINGS STUDIO (#settings)
   -------------------------------------------------------------------------- */
.settings-studio-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.settings-studio-rail {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 20px;
  padding: 14px 10px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.snav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snav-section + .snav-section {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.snav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 10px 4px;
}

.snav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.snav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 13px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.snav-item:hover {
  background: #F5F6FC;
}

.snav-item.active {
  background: linear-gradient(135deg, #F3F0FF 0%, #EEF2FF 100%);
  border-color: var(--brand-border);
  box-shadow: 0 2px 8px rgba(99, 76, 230, 0.08);
}

.snav-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--ink-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.snav-icon svg {
  display: block;
  flex-shrink: 0;
}

.snav-icon.tone-indigo { background: #EEF1FE; color: #4F46E5; }
.snav-icon.tone-violet { background: #F3EFFE; color: #6C52F8; }
.snav-icon.tone-emerald { background: #E7F8EF; color: #059669; }
.snav-icon.tone-amber { background: #FEF5E6; color: #D97706; }
.snav-icon.tone-slate { background: #EEF4FF; color: #2563EB; }

.snav-item.active .snav-icon {
  background: #FFFFFF;
  color: var(--brand);
  box-shadow: 0 2px 6px rgba(99, 76, 230, 0.14);
}

.snav-copy {
  min-width: 0;
  flex: 1;
}

.snav-copy > strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snav-item.active .snav-copy > strong {
  color: var(--brand);
}

.snav-copy > span {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-muted);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snav-count-pill {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--ink-body);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.snav-item.active .snav-count-pill {
  background: #FFFFFF;
  color: var(--brand);
}

.snav-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.snav-status-dot.jade { background: #10B981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.snav-status-dot.amber { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }

.settings-studio-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Ensure Embedded Wide Panels Fit Cleanly Inside the 2-Column Settings Main Canvas */
.settings-studio-main .team-member-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}

.settings-studio-main .team-member-row .tm-col-identity {
  flex: 1 1 240px;
}

.settings-studio-main .team-member-row .tm-col-actions {
  margin-left: auto;
}

.settings-studio-main .role-matrix-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1440px) {
  .settings-studio-main .profile-security-grid,
  .settings-studio-main .template-studio-layout {
    grid-template-columns: 1fr;
  }

  .settings-studio-main .email-preview-shell {
    position: static;
  }
}

/* 4-Tile Settings Operational Summary Strip */
.settings-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sss-tile {
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: var(--shadow-xs);
}

.sss-copy {
  min-width: 0;
}

.sss-copy > small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.sss-copy > strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Structured Split Setting Rows (Stripe / Linear Settings Pattern) */
.settings-structured-card {
  padding: 20px 24px;
}

.settings-split-rows {
  display: flex;
  flex-direction: column;
}

.settings-split-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(240px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-split-row:last-child {
  border-bottom: none;
}

.ssr-info > strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 3px;
}

.ssr-info > span {
  display: block;
  font-size: 0.77rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.ssr-control {
  min-width: 0;
}

.ssr-control.ssr-narrow {
  max-width: 210px;
  justify-self: end;
  width: 100%;
}

.input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix-wrap .field-input {
  padding-right: 52px;
}

.input-suffix-tag {
  position: absolute;
  right: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.settings-card-foot {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border-sand);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-card-foot > span {
  font-size: 0.77rem;
  color: var(--ink-muted);
}

.settings-utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-utility-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.suc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.suc-head > div > strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.suc-head > div > span {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.42;
}

.suc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Official Perspective Media Dashboard & Settings Brand Accents */
.suite-brand-footer {
  margin-top: 20px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--border-sand);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sbf-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sbf-left img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sbf-left > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-body);
  padding-left: 12px;
  border-left: 1px solid var(--border-sand);
}

.sbf-right {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.settings-brand-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.sbp-logo-box {
  padding: 7px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  align-items: center;
}

.sbp-logo-box img {
  height: 34px;
  width: auto;
  display: block;
}

.sbp-favicon-box {
  padding: 6px 11px 6px 7px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-body);
}

.sbp-favicon-box img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

@media (max-width: 1220px) {
  .team-member-row {
    grid-template-columns: minmax(210px, 1.5fr) repeat(2, minmax(130px, 1fr)) auto;
  }

  .team-member-row .tm-col-role,
  .team-member-row .tm-col-status {
    display: none;
  }

  .role-matrix-grid,
  .settings-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-security-grid,
  .settings-utility-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .settings-studio-layout {
    grid-template-columns: 1fr;
  }

  .settings-studio-rail {
    position: static;
    padding: 10px;
    gap: 8px;
  }

  .snav-section + .snav-section {
    padding-top: 8px;
  }

  .snav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .channel-brand-studio-box,
  .team-member-row,
  .role-matrix-grid,
  .settings-split-row,
  .settings-summary-strip,
  .snav-list {
    grid-template-columns: 1fr;
  }

  .ssr-control.ssr-narrow {
    max-width: 100%;
    justify-self: stretch;
  }

  .tm-col-actions {
    justify-content: flex-start;
  }

  .profile-dp-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tss-url-input {
    width: 100%;
  }
}

/* Respect OS Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Clean Executive Print Stylesheet */
@media print {
  .sidebar,
  .top-header,
  .client-mode-banner,
  .toast-stack,
  .notif-drawer,
  .page-actions,
  .exec-actions,
  .filter-panel {
    display: none !important;
  }

  .app-shell {
    display: block !important;
  }

  .workspace {
    padding: 0 !important;
    max-width: 100% !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  .card {
    box-shadow: none !important;
    border-color: #CBD5E1 !important;
    break-inside: avoid;
  }
}

/* Rate entry disclosures and optional date ranges */
.rate-quick-form { display: flex; flex-direction: column; gap: 12px; background: var(--bg-canvas); }
.rate-form-fields { margin-top: 10px; }
.rate-quick-form .field-group { min-width: 0; }
.rate-editor-disclosure > summary {
  width: fit-content;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 650;
  color: var(--ink-primary);
}
.rate-editor-disclosure[open] > summary { margin-bottom: 12px; }
.rate-editor-disclosure .rate-editor-section-heading { justify-content: space-between; }
.portal-date-filters { margin: 0 0 14px; }
.rate-filter-controls { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; }
.rate-filter-controls .portal-date-filters { margin: 0; }
.portal-date-popover { width: 485px; }
.portal-date-form { display: grid; gap: 10px; padding: 14px; }
.portal-date-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portal-date-error { margin: 0; color: var(--rose); font-size: .78rem; }
.portal-date-ranges { display: grid; gap: 9px; }
.portal-date-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.portal-date-range { min-width: 0; margin: 0; border: 1px solid var(--border-sand); border-radius: 8px; padding: 8px; }
.portal-date-range legend { color: var(--ink-primary); font-size: .79rem; font-weight: 650; padding: 0 4px; }
.portal-date-range .field-input { min-width: 0; }
.portal-date-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.portal-date-range .field-group, .portal-date-range input[type="date"] { min-width: 0; width: 100%; }
.portal-date-range input[type="date"] { padding-inline: 9px; font-size: .82rem; }
.rate-ledger-row-approved { box-shadow: inset 3px 0 var(--jade); }
.rate-ledger-actions .rate-ledger-draft {
  color: var(--jade);
  border: 1px solid var(--jade-border);
  background: var(--jade-tint);
  box-shadow: none;
}
.rate-ledger-actions .rate-ledger-draft:hover { color: var(--jade); background: var(--bg-paper); }
/* Client directory, account profile and proposal client picker */
.clients-page { display: grid; gap: 20px; }
.clients-page > .inflora-hero { margin-bottom: 0; }
.clients-back { justify-self: start; color: var(--accent, #5840d6); font-weight: 650; }
.clients-panel { background: #fff; border: 1px solid var(--line, #e5e6f0); border-radius: 20px; padding: clamp(16px, 2vw, 26px); min-width: 0; }
.clients-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.clients-heading h2, .clients-modal h2 { margin: 0; font-size: 1.08rem; }
.clients-heading > span, .clients-note, .clients-empty, .clients-record div > span:not(.clients-status), .clients-directory-row div > span, .clients-facts dt { color: var(--ink-muted, #565d72); font-size: .875rem; }
.clients-note { margin-block: 8px; }
.clients-empty { margin: 0; padding-block: 18px 8px; }
.clients-toolbar { display: grid; grid-template-columns: minmax(0, 440px) minmax(130px, 190px); gap: 12px; margin-block: 16px; }
.clients-toolbar label, .clients-form label { display: grid; gap: 6px; min-width: 0; font-size: .875rem; font-weight: 650; }
.clients-toolbar .field-input, .clients-form .field-input { min-width: 0; width: 100%; }
.clients-directory-row { display: grid; grid-template-columns: 1.45fr 1.12fr 1.1fr 1fr auto auto; align-items: center; gap: 14px; min-width: 0; color: inherit; padding: 14px 8px; border-top: 1px solid var(--line, #e5e6f0); text-decoration: none; }
.clients-directory-row:hover { background: #f7f6ff; }
.clients-directory-row strong, .clients-directory-row div > span, .clients-record div > span:not(.clients-status) { display: block; overflow-wrap: anywhere; }
.clients-directory-row div { min-width: 0; }
.clients-status { justify-self: start; display: inline-block; font-size: .75rem; font-weight: 650; border-radius: 99px; background: #f1edfd; color: #4d369f; padding: 3px 9px; vertical-align: middle; }
.clients-status[data-status="active"], .clients-status[data-status="completed"] { background: #e4f5ed; color: #096344; }
.clients-status[data-status="inactive"], .clients-status[data-status="cancelled"] { background: #eef0f4; color: #495269; }
.clients-status[data-status="overdue"] { background: #fff0ed; color: #9f2824; }
.clients-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.clients-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,145px),1fr)); gap: 10px; }
.clients-metrics > div { min-width: 0; padding: 13px 15px; background: #fff; border-radius: 12px; border: 1px solid #e5e6f1; }
.clients-metrics span { display: block; color: var(--ink-muted, #565d72); font-size: .8rem; }
.clients-metrics strong { display: block; margin-top: 5px; font-size: 1.12rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.clients-facts { margin: 14px 0 0; display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(min(100%,130px),1fr)); }
.clients-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.clients-record { border-top: 1px solid var(--line, #e5e6f0); padding: 10px 0; margin-top: 7px; display: flex; justify-content: space-between; align-items: start; gap: 12px; overflow-wrap: anywhere; }
.clients-record .btn { flex-shrink: 0; }
.clients-record strong + .clients-status { margin-inline-start: 4px; }
.clients-record div > span:not(.clients-status) { white-space: pre-wrap; margin-top: 3px; }
.clients-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.clients-form .clients-checkbox { display: flex; align-items: center; gap: 8px; }
.clients-wide { grid-column: 1 / -1; }
.clients-form h3 { margin: 4px 0; font-size: 1rem; }
.clients-error { color: #9f2824; margin: 0; }
.clients-suggestions { background: #fff; border: 1px solid var(--line, #e5e6f0); border-radius: 10px; overflow: auto; max-height: 220px; margin-top: 5px; padding: 4px; }
.clients-suggestions button { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 7px; width: 100%; background: transparent; color: inherit; border: 0; border-radius: 6px; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.clients-suggestions button:hover, .clients-suggestions button:focus-visible { background: #f1edfd; }
@media (max-width: 1050px) {
  .clients-directory-row { grid-template-columns: repeat(2,minmax(0,1fr)) auto; }
}
@media (max-width: 680px) {
  .clients-layout, .clients-form, .clients-toolbar { grid-template-columns: 1fr; }
  .clients-record { flex-wrap: wrap; }
}
/* Client dashboard and full-page company editor */
.clients-page { gap: 18px; }
.clients-title { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding: 8px 0 12px; }
.clients-title h1 { margin:0; font-size:clamp(1.5rem, 2.4vw, 2.13rem); line-height:1.15; overflow-wrap:anywhere; letter-spacing:-.035em; }
.clients-title p { margin:5px 0 0; color:var(--ink-muted,#566078); }
.clients-title-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; }
.clients-title-actions .btn { min-height:40px; }
.clients-mark { width:42px; height:42px; flex:none; display:inline-grid; place-items:center; border-radius:12px; color:#4c3eb5; background:#eeebff; }
.clients-mark[data-tone="people"] { color:#145cc0; background:#e8f1ff; }
.clients-mark[data-tone="calendar"] { color:#89520c; background:#fff3da; }
.clients-mark[data-tone="money"] { color:#11694f; background:#e3f6ed; }
.clients-title > .clients-mark { width:52px; height:52px; }
.clients-metrics { grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); }
.clients-metrics > .clients-stat { display:flex; align-items:center; gap:11px; padding:15px; border-radius:15px; }
.clients-stat > div { min-width:0; }
.clients-stat strong { margin-top:2px; }
.clients-directory-layout, .clients-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(215px,275px); align-items:start; gap:18px; }
.clients-panel { border-color:#e0e4ee; box-shadow:0 5px 16px rgba(28,35,71,.04); }
.clients-toolbar { grid-template-columns:minmax(0,1fr) minmax(125px,165px); margin:18px 0; }
.clients-directory-labels, .clients-directory-row { display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr minmax(60px,auto); gap:12px; }
.clients-directory-labels { margin-inline:-8px; padding:10px 8px; border-radius:9px; background:#f4f5fa; color:#535d72; font-size:.78rem; font-weight:650; }
.clients-directory-row { margin-inline:-8px; align-items:center; }
.clients-directory-row > span[aria-hidden] { display:none; }
.clients-directory-row .clients-company-cell { display:flex; align-items:center; gap:9px; }
.clients-company-cell > .clients-avatar { display:grid; flex:none; width:34px; height:34px; place-items:center; border-radius:9px; background:#efedff; color:#4c3eb5; font-weight:750; }
.clients-directory-empty, .clients-queue-empty { text-align:center; padding:24px 10px; background:#f8f9fd; border:1px dashed #dce1ef; border-radius:14px; }
.clients-directory-empty h3 { margin:9px 0 4px; font-size:1.06rem; }
.clients-directory-empty p { margin:0 auto 12px; color:#566078; }
.clients-queue-empty { margin-top:14px; padding:14px; }
.clients-queue-empty p { padding:7px 0 0; }
.clients-queue-item { display:grid; gap:3px; padding:12px 0; border-bottom:1px solid #e5e8f1; color:inherit; overflow-wrap:anywhere; }
.clients-queue-item span { color:#566078; font-size:.85rem; }
.clients-profile-header { padding:12px 20px 0; border:1px solid #e0e4ee; border-radius:17px; background:linear-gradient(110deg,#fff 45%,#f2efff); }
.clients-section-nav { display:flex; flex-wrap:wrap; gap:7px; padding:6px; background:#ebeef6; border-radius:12px; margin-bottom:0; }
.clients-section-nav button { flex:1 1 auto; padding:9px 12px; border:0; border-radius:8px; background:#fff; color:#303853; cursor:pointer; font:inherit; font-weight:650; }
.clients-section-nav button:hover { background:#f5f0ff; color:#4834b2; }
.clients-editor-page form, .clients-editor-sections { display:grid; gap:18px; min-width:0; }
.clients-editor-section, #client-profile-overview, #client-profile-proposals, #client-profile-work { scroll-margin-top:92px; }
.clients-editor-section > header { display:flex; align-items:center; gap:13px; padding-bottom:15px; margin-bottom:17px; border-bottom:1px solid #e6e9f2; }
.clients-editor-section h2, .clients-editor-guide h2 { font-size:1.11rem; margin:0; }
.clients-editor-section header p, .clients-editor-guide p { margin:4px 0 0; color:#566078; font-size:.9rem; }
.clients-editor-guide { position:sticky; top:88px; }
.clients-guide-note { margin-top:14px; padding:11px; border-radius:9px; background:#e8f6ef; color:#155840; font-size:.85rem; }
.clients-form .field-input { font-weight:400; }
.clients-editor-footer { position:sticky; bottom:0; z-index:2; display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; padding:12px 15px; border:1px solid #e0e4ee; border-radius:14px; background:#fff; box-shadow:0 -5px 18px rgba(28,35,71,.06); }
.clients-editor-footer > span { margin-right:auto; color:#566078; font-size:.85rem; }
.clients-editor-footer .clients-error { flex:1 0 100%; }
.clients-modal.modal-dialog { width:min(100%,680px); }
.clients-modal > form { min-height:0; display:flex; flex-direction:column; }
.clients-modal .modal-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.clients-modal-header, .clients-modal-footer { flex:none; display:flex; align-items:center; gap:10px; padding:14px 22px; }
.clients-modal-header { justify-content:space-between; border-bottom:1px solid #e1e5ef; }
.clients-modal-footer { justify-content:flex-end; border-top:1px solid #e1e5ef; }
@media (max-width:1200px) {
  .clients-directory-layout { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:920px) {
  .clients-editor-layout { grid-template-columns:minmax(0,1fr); }
  .clients-editor-guide { position:static; }
}
@media (max-width:680px) {
  .clients-title { grid-template-columns:auto minmax(0,1fr); gap:9px; }
  .clients-title-actions { grid-column:1/-1; justify-content:flex-start; }
  .clients-stat > .clients-mark { width:33px; height:33px; }
  .clients-toolbar, .clients-directory-row { grid-template-columns:1fr; }
  .clients-directory-row { gap:7px; }
  .clients-directory-labels { display:none; }
  .clients-editor-footer { gap:7px; }
}
@media (min-width:681px) and (max-width:940px) {
  .clients-directory-labels { display:none; }
  .clients-directory-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* Comparison placements: aligned groups on wide screens and stacked details on narrow screens. */
.cmp-matrix-toolbar { padding: 10px 20px; border-block: 1px solid #e2e6f2; background:#f7f8fc; color:#424b64; font-size:.86rem; }
.cmp-matrix-toolbar label, .cmp-placement input { cursor:pointer; }
.cmp-matrix-toolbar label { display:inline-flex; gap:8px; align-items:center; }
.cmp-matrix { display:grid; gap:12px; padding:16px; min-width:0; }
.cmp-placement { min-width:0; border:1px solid #e0e5f1; border-radius:14px; overflow:hidden; }
.cmp-placement-head { display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px 14px; background:#f8f8fd; border-bottom:1px solid #e4e8f2; }
.cmp-placement-head img { width:34px; height:34px; border-radius:8px; }
.cmp-placement-head h4 { margin:0; font-size:.98rem; overflow-wrap:anywhere; }
.cmp-placement-head div > span { color:#5b647a; font-size:.82rem; }
.cmp-placement-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.55fr) minmax(0,1.2fr) minmax(0,1fr); }
.cmp-placement-grid section { padding:11px 14px; min-width:0; overflow-wrap:anywhere; }
.cmp-placement-grid section + section { border-inline-start:1px solid #edf0f7; }
.cmp-placement-grid h5 { margin:0 0 7px; color:#505a77; font-size:.77rem; }
.cmp-placement-grid dl, .cmp-placement-grid dd { margin:0; }
.cmp-placement-grid dl { display:grid; gap:7px; }
.cmp-placement-grid dt { color:#5b647a; font-size:.76rem; }
.cmp-placement-grid dd { font-weight:650; font-variant-numeric:tabular-nums; }
.cmp-placement-grid small { display:block; color:#5b647a; font-size:.76rem; font-weight:400; }
.cmp-placement-grid .badge { max-width:100%; white-space:normal; }
.cmp-placement-preview { margin-bottom:5px; }
.cmp-cpm-value { color:#086b53; }
@media (max-width:1100px) {
  .cmp-placement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cmp-placement-grid section:nth-child(3) { border-inline-start:0; }
  .cmp-placement-grid section:nth-child(n+3) { border-top:1px solid #edf0f7; }
}
@media (max-width:510px) {
  .cmp-placement-grid { grid-template-columns:minmax(0,1fr); }
  .cmp-placement-grid section + section { border-inline-start:0; border-top:1px solid #edf0f7; }
  .cmp-placement-head { grid-template-columns:auto auto minmax(0,1fr); }
  .cmp-placement-head > .badge { grid-column:3; justify-self:start; }
}
/* Shared dropdown and calendar controls */
:is(select.field-input, select.field-select, select.inflora-pill-select):focus-visible {
  outline: 2px solid #765ff2;
  outline-offset: 2px;
}
@supports (appearance: base-select) and selector(::picker(select)) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]) {
    align-items: center;
    gap: .55rem;
    background-image: none;
  }
  select:not([multiple]):not([size])::picker-icon {
    color: currentColor;
    font-size: .85em;
    margin-inline-start: auto;
    transition: rotate 140ms ease;
  }
  select:not([multiple]):not([size]):open::picker-icon { rotate: 180deg; }
  select:not([multiple]):not([size])::picker(select) {
    color: #242e49;
    background: #fff;
    border: 1px solid #dfe3f2;
    border-radius: 13px;
    box-shadow: 0 12px 28px rgba(26, 29, 69, .16);
    margin-block: 5px;
    padding: 5px;
    max-block-size: min(350px, 45vh);
    overflow-y: auto;
  }
  select:not([multiple]):not([size]) option {
    color: #242e49;
    background: transparent;
    border-radius: 8px;
    padding: 8px 10px;
    min-block-size: 34px;
    font-size: .875rem;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  select:not([multiple]):not([size]) option:checked {
    color: #422ba3;
    background: #efebff;
    font-weight: 650;
  }
  select:not([multiple]):not([size]) option:is(:hover,:focus-visible) {
    background: #e8e2ff;
    outline: none;
  }
  select:not([multiple]):not([size]) option::checkmark { order: 1; margin-inline-start: auto; color: #5637c0; }
  select:not([multiple]):not([size]) option:disabled { opacity: .55; }
}
input[type="date"].field-input { color-scheme: light; min-inline-size: 0; }
input[type="date"].field-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  background-color: #eeebff;
}
.portal-date-popover { border-radius: 17px; border-color: #dfe3f1; }
.portal-date-form { padding: 16px; gap: 13px; }
.portal-date-title { display: inline-flex; align-items: center; gap: 9px; }
.portal-date-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #5138b0; background: #eeebff; }
.portal-date-range { background: #f7f8fc; padding: 10px; border-radius: 11px; }
.portal-date-range legend { color: #42347f; font-weight: 700; }
.portal-date-actions { border-top: 1px solid #e7e9f4; padding-top: 11px; }

/* Client icon alignment and editor controls */
.clients-metrics .clients-stat > .clients-mark,
.clients-section-nav .clients-mark {
  display: inline-grid;
  place-items: center;
  color: #4c3eb5;
}
.clients-mark > svg { display: block; flex: none; }
.clients-mark[data-tone="active"],
.clients-metrics .clients-stat > .clients-mark[data-tone="active"] { color: #145cc0; background: #e8f1ff; }
.clients-mark[data-tone="contact"] { color: #58409c; background: #f2eafa; }
.clients-metrics .clients-stat > .clients-mark[data-tone="calendar"] { color: #89520c; }
.clients-metrics .clients-stat > .clients-mark[data-tone="money"] { color: #11694f; }
.clients-editor-page .clients-section-nav button { display: flex; justify-content: center; align-items: center; gap: 8px; }
.clients-section-nav .clients-mark { width: 27px; height: 27px; border-radius: 7px; }
.clients-section-nav .clients-mark svg { width: 16px; height: 16px; }
.clients-editor-page .clients-form { column-gap: 18px; row-gap: 17px; }
.clients-editor-page .clients-editor-section { border-radius: 16px; }
.clients-editor-page .clients-editor-section .field-input:hover { border-color: #b8acd8; }
/* Shared portal calendar. The original date field retains typing and form validation. */
.portal-calendar-field { position: relative; display: block; min-inline-size: 0; }
.portal-calendar-field > input[type="date"] { width: 100%; padding-inline-end: 40px; }
.portal-calendar-field > input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
.portal-calendar-trigger {
  position: absolute; inset-inline-end: 6px; inset-block-start: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 29px; height: 29px; padding: 0;
  color: #5337b3; border: 0; border-radius: 8px; background: #eeebff; cursor: pointer;
}
.portal-calendar-trigger:hover, .portal-calendar-trigger[aria-expanded="true"] { background: #e0d8ff; }
.portal-calendar-field > input:is(:disabled,:read-only) + .portal-calendar-trigger { visibility: hidden; }
.portal-calendar {
  position: fixed; inset: auto; margin: 0; box-sizing: border-box;
  width: min(310px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto;
  padding: 12px; border: 1px solid #dedff0; border-radius: 17px;
  color: #242e49; background: #fff; box-shadow: 0 14px 38px rgba(26,29,69,.19);
  font: 500 .85rem var(--font-body, system-ui, sans-serif);
}
.portal-calendar-header, .portal-calendar-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.portal-calendar-header { background: #f3f0ff; border-radius: 10px; padding: 5px; color: #382679; }
.portal-calendar-header button, .portal-calendar-footer button, .portal-calendar-day {
  border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; font: inherit;
}
.portal-calendar-header button { width: 30px; height: 30px; font-size: 1.25rem; line-height: 1; }
.portal-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; padding: 7px 0; text-align: center; }
.portal-calendar-grid > span { color: #545e76; padding: 4px 0; font-size: .72rem; }
.portal-calendar-day { min-height: 31px; font-variant-numeric: tabular-nums; }
.portal-calendar-day[data-other-month] { color: #68738d; }
.portal-calendar-day[aria-current="date"] { box-shadow: inset 0 0 0 1px #ae9cfc; }
.portal-calendar button:hover:not(:disabled) { background: #eae4ff; color: #342080; }
.portal-calendar-day[aria-pressed="true"], .portal-calendar-day[aria-pressed="true"]:hover { background: #563ac7; color: #fff; font-weight: 700; }
.portal-calendar button:disabled { opacity: .4; cursor: default; }
.portal-calendar button:focus-visible, .portal-calendar-trigger:focus-visible { outline: 2px solid #684bd9; outline-offset: 1px; }
.portal-calendar-footer { padding-top: 6px; border-top: 1px solid #ecebf5; color: #5032a6; }
.portal-calendar-footer button { padding: 6px 10px; font-weight: 650; }
/* Proposals and commercial reporting */
.sales-reports { display:grid; gap:20px; }
.sales-reports-title { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.sales-reports-title h1 { font-size:clamp(1.55rem,2.3vw,2.15rem); margin:0; letter-spacing:-.035em; }
.sales-reports-title p, .sales-report-empty p { margin:4px 0 0; color:#59657d; }
.sales-reports-nav { display:flex; flex-wrap:wrap; gap:7px; border:1px solid #e0e4ef; border-radius:14px; padding:6px; background:#fff; }
.sales-reports-nav button { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:0; background:transparent; border-radius:9px; cursor:pointer; font:inherit; font-weight:650; color:#424c68; }
.sales-reports-nav button:hover, .sales-reports-nav button:focus-visible { background:#f0edff; color:#4630a3; }
.sales-reports-nav button span { display:grid; min-width:22px; place-items:center; padding:2px 5px; border-radius:6px; background:#efedfc; color:#5135ac; font-size:.75rem; }
.sales-draft-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,300px); align-items:start; gap:18px; }
.sales-reports [tabindex="-1"] { scroll-margin-top:90px; }
.sales-draft-card, .sales-archive, .sales-report-library { min-width:0; }
.sales-draft-body { display:grid; gap:16px; }
.sales-draft-body h3 { margin:0; font-size:.98rem; }
.sales-proposal-fields { display:grid; gap:12px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.sales-proposal-settings { grid-template-columns:repeat(2,minmax(0,1fr)); padding-bottom:17px; border-bottom:1px solid #e8eaf4; }
.sales-placement-heading, .sales-draft-line header { display:flex; justify-content:space-between; align-items:start; gap:10px; }
.sales-placement-heading span, .sales-draft-line small, .sales-archive small, .sales-archive dt { color:#59657d; font-size:.8rem; }
.sales-placement-add { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.sales-placement-add select { min-width:0; width:100%; }
.sales-report-empty { padding:18px; border:1px dashed #d9dff0; background:#f7f8fc; border-radius:12px; text-align:center; }
.sales-report-empty a { color:#4e35b0; font-weight:650; }
.sales-draft-lines { display:grid; gap:10px; }
.sales-draft-line { padding:12px; border:1px solid #e0e4ef; border-radius:12px; overflow-wrap:anywhere; }
.sales-draft-line header small, .sales-line-metrics small, .sales-line-metrics strong { display:block; }
.sales-line-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:10px; padding-top:10px; border-top:1px solid #eaecf5; }
.sales-line-metrics label { font-size:.8rem; color:#59657d; }
.sales-line-metrics input { width:100%; min-width:0; max-width:100px; display:block; margin:4px 0; }
.sales-proposal-summary { position:sticky; top:88px; padding:18px; }
.sales-proposal-summary h2, .sales-report-library h2 { margin:0; font-size:1.1rem; }
.sales-summary-metrics { display:grid; gap:10px; margin:13px 0; overflow-wrap:anywhere; }
.sales-summary-metrics > div { padding:7px 0; }
.sales-summary-metrics > div:nth-child(3) { padding:10px; border-radius:10px; background:#f0edff; }
.sales-proposal-summary > button { width:100%; }
.sales-archive-list { padding:0 16px 12px; }
.sales-archive-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto; gap:14px; align-items:center; padding:14px 0; border-bottom:1px solid #e9ecf5; overflow-wrap:anywhere; }
.sales-archive-row:last-child { border-bottom:0; }
.sales-archive-identity h3 { margin:0; font-size:1rem; }
.sales-archive-identity strong, .sales-archive-identity small, .sales-archive-metrics small { display:block; }
.sales-archive-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; }
.sales-archive-metrics dd { margin:3px 0 0; font-weight:650; }
.sales-archive-actions { display:flex; flex-wrap:wrap; gap:6px; }
.sales-report-library .report-library-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.sales-report-library .report-library-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:12px; padding:14px; }
.sales-report-library .report-library-item { display:flex; flex-direction:column; justify-content:space-between; gap:10px; padding:14px; border:1px solid #e3e7f2; border-radius:12px; }
@media(max-width:1250px) {
  .sales-archive-row { grid-template-columns:minmax(0,1fr) minmax(0,2fr); }
  .sales-archive-actions { grid-column:1/-1; }
}
@media(max-width:900px) { .sales-draft-layout { grid-template-columns:minmax(0,1fr); } .sales-proposal-summary { position:static; } }
@media(max-width:600px) {
  .sales-proposal-fields,.sales-archive-row { grid-template-columns:minmax(0,1fr); }
  .sales-line-metrics,.sales-archive-metrics,.sales-summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* Perspective Media sign-in */
.pm-signin {
  height: auto;
  max-height: none;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: visible;
  padding: clamp(20px, 4.5vw, 74px);
  background: #f6f5f3;
  color: #171926;
}
.signin-frame {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  width: min(100%, 1150px);
  border: 1px solid #e9e4e4;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(43, 27, 35, .08);
  overflow: hidden;
}
.signin-main {
  width: min(100%, 540px);
  margin-inline: auto;
  min-width: 0;
  padding: clamp(32px, 5vw, 72px) clamp(28px, 5vw, 76px);
}
.signin-logo { display: block; width: 76px; height: auto; }
.signin-intro { margin: 26px 0 23px; }
.signin-intro p { margin: 8px 0 0; color: #5b5d6b; line-height: 1.5; }
.signin-intro .signin-product { color: #9e172b; font-weight: 700; font-size: .91rem; margin: 0 0 7px; }
.signin-intro h1 { margin: 0; font-size: clamp(1.7rem, 2.65vw, 2.45rem); line-height: 1.14; letter-spacing: -.045em; }
.pm-signin .auth-form { gap: 15px; }
.pm-signin .auth-input-group { border-color: #dcdce5; border-radius: 10px; background: #fff; }
.pm-signin .auth-input-group:focus-within { border-color: #ac1c31; box-shadow: 0 0 0 3px #fae5e9; }
.pm-signin .auth-input-addon { width: 42px; border: 0; color: #6c7286; }
.pm-signin .auth-group-control { font-size: 16px; min-height: 46px; padding-inline-start: 4px; }
.pm-signin .auth-input-eye { min-width: 44px; min-height: 44px; color: #50566c; }
.pm-signin .auth-gradient-btn {
  min-height: 48px; margin-top: 2px; border-radius: 10px;
  background: #a6162d; color: #fff; box-shadow: 0 5px 12px #9c1c2623;
}
.pm-signin .auth-gradient-btn:hover:not(:disabled) { background: #8c1125; }
.pm-signin button:focus-visible { outline: 2px solid #a6162d; outline-offset: 3px; }
.signin-help { font-size: .84rem; line-height: 1.5; margin: 20px 0 0; padding-top: 15px; border-top: 1px solid #edebef; color: #5b5d6b; }
.signin-help strong { color: #262938; }
.signin-brand-panel {
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  color: #fff5f6;
  background: radial-gradient(ellipse at 86% 4%, #762239 0%, transparent 66%), #39101d;
  padding: clamp(24px, 4vw, 54px);
}
.signin-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -45% -75% auto;
  width: 135%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #ffffff26, 0 0 0 28px #ffffff0b, 0 0 0 56px #ffffff09;
  pointer-events: none;
  z-index: -1;
}
.signin-brand-copy { border-top: 1px solid #ffffff30; padding-top: 20px; }
.signin-brand-stripes { display: flex; gap: 5px; margin-bottom: 14px; }
.signin-brand-stripes i { width: 9px; height: 20px; border-radius: 3px; background: #ff718c; transform: skewX(-14deg); }
.signin-brand-stripes i:first-child { height: 28px; }
.signin-brand-name { margin: 0 0 10px; color: #ffc0cb; font-size: .85rem; font-weight: 650; }
.signin-brand-title { margin: 0; font-weight: 750; font-size: clamp(1.75rem, 3.3vw, 3.2rem); line-height: 1.04; letter-spacing: -.055em; }
.signin-brand-description { margin: 14px 0 0; max-width: 25ch; color: #f4cfd6; font-size: .92rem; line-height: 1.55; }
@media (max-width: 820px) {
  .signin-frame { grid-template-columns: minmax(0,1fr); width: min(100%,480px); }
  .signin-brand-panel { display: none; }
}
@media (max-width: 520px) {
  .pm-signin { padding: 16px; }
  .signin-frame { border-radius: 18px; }
  .signin-main { padding: 25px 21px; }
}
@media (max-height: 560px) {
  .pm-signin { align-items: start; }
}
@media (max-width: 520px) and (max-height: 560px) {
  .signin-main { padding-block: 18px; }
  .signin-logo { width: 64px; }
  .signin-intro { margin-block: 16px; }
  .pm-signin .auth-form { gap: 11px; }
  .signin-help { margin-top: 14px; padding-top: 10px; }
}
/* Keep the entire sign-in form in view on short laptop and phone screens. */
.pm-signin { padding-block: clamp(12px, 4dvh, 42px); }
.signin-main { padding-block: clamp(22px, 5dvh, 55px); }
@media (max-height: 620px) {
  .pm-signin { align-items: center; padding-block: 10px; }
  .signin-main { padding-block: 17px; }
  .signin-logo { width: 62px; }
  .signin-intro { margin-block: 13px; }
  .signin-intro .signin-product { margin-bottom: 4px; }
  .signin-intro h1 { font-size: clamp(1.35rem, 3.8dvh, 1.85rem); }
  .signin-intro p { margin-top: 4px; }
  .pm-signin .auth-form { gap: 9px; }
  .signin-help { margin-top: 12px; padding-top: 9px; }
}
@media (max-height: 490px) {
  .pm-signin { padding-block: 6px; }
  .signin-main { padding-block: 10px; }
  .signin-logo { width: 48px; }
  .signin-intro { margin-block: 7px; }
  .signin-help { margin-top: 8px; padding-top: 7px; }
}
/* Phone workspace navigation and touch layouts */
.mobile-tabbar, .mobile-drawer-heading, .mobile-drawer-tools { display: none; }
@media (max-width:1024px) {
  .sidebar { left: 0; width:min(320px, 89vw); transform:translateX(-105%); visibility:hidden; transition:transform .22s ease; }
  .sidebar.open { transform:none; visibility:visible; }
  .sidebar-backdrop { z-index:59; }
  body:has(.sidebar.open) { overflow:hidden; }
  .mobile-drawer-heading { display:flex; justify-content:space-between; align-items:center; padding:4px 14px 8px; color:#e6e3fa; flex:none; }
  .mobile-drawer-heading button { width:44px; height:44px; border-radius:10px; border:1px solid #ffffff29; background:#ffffff10; color:#fff; font-size:1.5rem; cursor:pointer; }
  .sidebar-footer { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
}
@media (max-width:720px) {
  .app-shell { grid-template-columns:minmax(0,1fr); }
  .main-area, .workspace { min-width:0; }
  .workspace { padding:14px 12px calc(82px + env(safe-area-inset-bottom)); }
  .top-header {
    display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px auto;
    width:100%; height:auto; min-height:0; gap:6px 8px; align-items:center; padding:7px 12px 9px;
  }
  .top-header .header-left { min-width:0; gap:8px; }
  .top-header .breadcrumb-trail { display:block; min-width:0; }
  .top-header .breadcrumb-current { display:block; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .top-header .breadcrumb-sub { display:none; }
  .top-header .header-actions { display:contents; }
  .top-header #btn-client-mode, .top-header #btn-share-whatsapp, .top-header #btn-quick-rate { display:none; }
  .top-header .profile-menu-wrap, .top-header #btn-notif-bell { align-self:center; grid-row:1; grid-column:2; }
  .top-header #btn-notif-bell { justify-self:start; margin-inline-end:46px; }
  .top-header .profile-menu-wrap { justify-self:end; }
  .top-header :is(.mobile-menu-btn,#btn-notif-bell,#btn-profile-menu) { width:42px; height:42px; min-width:42px; justify-content:center; padding:0; }
  .top-header .global-search-box { grid-row:2; grid-column:1/-1; width:100%; min-width:0; }
  .top-header .global-search-input { width:100%; height:40px; font-size:16px; padding-inline-end:10px; }
  .top-header .search-kbd { display:none; }
  .top-header .search-popover { min-width:0; width:100%; max-height:45dvh; overflow:auto; }
  .top-header .profile-dropdown { width:min(310px,calc(100vw - 24px)); min-width:0; z-index:55; }
  .mobile-drawer-tools { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:4px 12px 12px; }
  .mobile-drawer-tools button { min-height:42px; padding:6px; border:1px solid #ffffff28; border-radius:9px; background:#fff1; color:#fff; font:inherit; font-size:.83rem; cursor:pointer; }
  .mobile-drawer-tools button[aria-pressed="true"] { background:#174b41; }
  .mobile-tabbar {
    position:fixed; z-index:35; inset:auto 0 0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr));
    padding:5px 4px calc(5px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #e1e4f0;
    box-shadow:0 -4px 16px #25224d0b;
  }
  .mobile-tabbar .nav-item { margin:0; width:100%; min-width:0; min-height:48px; padding:4px 1px; border:0; display:grid; justify-items:center; justify-content:stretch; align-content:center; gap:3px; border-radius:9px; color:#4d5470; font-size:.68rem; font-weight:650; }
  .mobile-tabbar .nav-item svg { width:19px; height:19px; }
  .mobile-tabbar .nav-item[aria-current="page"] { background:#eeeaff; color:#462ba7; }
  .notif-drawer { z-index:45; width:min(100vw,380px); max-width:100%; }
  .client-mode-banner { flex-wrap:wrap; gap:5px; font-size:.77rem; }
  .suite-top-summary-strip, .pastel-glance-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .suite-top-summary-card { padding:14px; margin-bottom:15px; }
  .suite-top-summary-head { gap:8px; margin-bottom:10px; }
  .suite-top-summary-head h2 { font-size:1rem; }
  .suite-summary-cell { padding:9px; }
  .suite-summary-cell strong { font-size:1.05rem; }
  .suite-summary-cell span { font-size:.75rem; line-height:1.3; }
  .suite-greeting-title { font-size:1.45rem; }
  .suite-greeting-bar { gap:8px; }
  .suite-greeting-eyebrow { display:none; }
  .pastel-card { padding:11px; min-width:0; }
  .pastel-caption { font-size:.72rem; overflow-wrap:anywhere; }
  .suite-network-row { gap:8px; padding:10px; }
  .suite-net-identity { min-width:0; }
  .suite-net-identity span { overflow:hidden; text-overflow:ellipsis; }
  .suite-net-end { justify-content:space-between; }
  .suite-net-metrics { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .quick-action-tile { min-height:68px; }
  .workspace :is(.card,.suite-card,.clients-panel,.report-library,.form-grid-2,.form-grid-3,.field-group) { min-width:0; }
  .workspace :is(.card-title,.inflora-hero-title,.suite-card-title) { overflow-wrap:anywhere; }
  .workspace .table-wrap { max-width:100%; }
  .workspace .clients-editor-footer { bottom:calc(58px + env(safe-area-inset-bottom)); }
  .toast-stack { bottom:calc(66px + env(safe-area-inset-bottom)); }
}
@media print { .mobile-tabbar { display:none !important; } }
.mobile-dashboard-actions { display:none; }
@media(max-width:720px) {
  .mobile-dashboard-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 18px; }
  .mobile-dashboard-actions .btn { min-height:44px; padding-inline:6px; }
  .suite-net-identity > div { min-width:0; }
  .suite-cpm-name { white-space:normal; overflow-wrap:anywhere; }
  .suite-cpm-name em { display:block; margin:1px 0 0; }
  .suite-net-metrics small { font-size:.62rem; overflow-wrap:anywhere; }
  .mobile-menu-btn { flex:none; }
  .mobile-tabbar .nav-item { letter-spacing:0; }
}
@media(max-width:720px) {
  .top-header { padding-top:max(7px,env(safe-area-inset-top)); }
  .network-directory, .channel-directory-grid { grid-template-columns:minmax(0,1fr); }
  .channel-card { min-width:0; padding:14px; overflow-wrap:anywhere; }
  .channel-card .ch-head { flex-wrap:wrap; }
  .channel-card .ch-identity > div { min-width:0; }
  .channel-card .ch-metrics-band { grid-template-columns:repeat(3,minmax(0,1fr)); padding:8px; gap:5px; }
  .channel-card .ch-metrics-band strong { font-size:.88rem; }
  .channel-card .ch-metrics-band small { font-size:.66rem; }
  .channel-card .social-links-bar { flex-wrap:wrap; }
}
.mobile-drawer-close, .mobile-profile-actions { display:none; }
@media (max-width:1024px) {
  .sidebar .sidebar-footer { display:none; }
  .sidebar .sidebar-brand { max-width:calc(100% - 58px); }
  .mobile-drawer-close {
    position:absolute; inset-block-start:16px; inset-inline-end:9px;
    display:grid; place-items:center; width:44px; height:44px;
    border:0; border-radius:10px; background:transparent; color:#e6e3fa;
    font:400 1.6rem/1 system-ui,sans-serif; cursor:pointer;
  }
  .mobile-drawer-close:hover, .mobile-drawer-close:focus-visible { background:#ffffff19; }
  .sidebar .sidebar-nav { padding-bottom:max(14px,env(safe-area-inset-bottom)); }
  .mobile-profile-actions { display:grid; gap:2px; padding:6px 10px; border-top:1px solid #e7e8f1; }
  .mobile-profile-actions .profile-dd-item { min-height:40px; padding:8px 10px; }
  .mobile-profile-actions [aria-pressed="true"] { background:#e4f6ed; }
  .profile-dropdown { max-height:calc(100dvh - 75px); overflow-y:auto; }
}
.dashboard-phone-copy { display:none; }
.suite-fullwidth-portfolio .suite-card-head h2 { margin:0; font-size:1.03rem; color:var(--ink-primary); }
@media(max-width:720px) {
  .dashboard-desktop-copy { display:none; }
  .dashboard-phone-copy { display:inline; }
  .suite-top-summary-card { padding:12px; margin-bottom:10px; }
  .suite-top-summary-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; margin-bottom:9px; }
  .suite-top-summary-head h2 { font-size:1rem; letter-spacing:-.025em; }
  .suite-top-summary-head p { margin-top:2px; font-size:.73rem; }
  .suite-top-summary-head .suite-outline-cta { min-height:37px; padding-inline:9px; white-space:nowrap; font-size:.73rem; }
  .suite-summary-cell { background:#f6f7fb; border-color:#e9ebf4; border-radius:10px; }
  .mobile-dashboard-actions { margin-bottom:12px; }
  .suite-greeting-bar { align-items:center; margin-block:0 12px; padding:8px 0; border-bottom:1px solid #e0e3ef; }
  .suite-greeting-title { font-size:1.17rem; line-height:1.25; }
  .suite-greeting-sub, .suite-sparkle, .suite-greeting-bar .suite-live-dot { display:none; }
  .suite-greeting-bar .suite-date-chip { border:0; background:transparent; box-shadow:none; padding:0; min-height:0; height:auto; white-space:nowrap; font-size:.7rem; gap:4px; }
  .suite-fullwidth-portfolio { padding:12px; }
  .suite-fullwidth-portfolio .suite-card-head { align-items:flex-start; gap:8px; flex-wrap:wrap; }
  .inflora-portfolio-list { display:grid; gap:8px; }
  .suite-fullwidth-portfolio .inflora-portfolio-row {
    grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px;
    border:1px solid #e4e7f2; border-radius:12px; align-items:stretch;
  }
  .suite-fullwidth-portfolio .ip-col-main { grid-column:1/-1; gap:8px; }
  .suite-fullwidth-portfolio .ip-brand-tile { width:33px; height:33px; border-radius:8px; }
  .suite-fullwidth-portfolio .ip-title-wrap .cell-clamp-1 { display:block; white-space:normal; overflow-wrap:anywhere; line-height:1.25; }
  .suite-fullwidth-portfolio .ip-col-stat { min-width:0; padding:7px; background:#f5f6fb; border-radius:8px; }
  .suite-fullwidth-portfolio .ip-col-stat:nth-child(3) { background:#eff8f5; }
  .suite-fullwidth-portfolio .ip-col-stat strong { white-space:normal; overflow-wrap:anywhere; }
  .suite-fullwidth-portfolio .ip-col-stat small, .suite-fullwidth-portfolio .ip-col-schedule small { color:#58637a; }
  .suite-fullwidth-portfolio .ip-col-schedule { display:block; align-self:center; }
  .suite-fullwidth-portfolio .ip-col-schedule span:not(.ip-overdue-pill) { display:none; }
  .suite-fullwidth-portfolio .ip-col-end { justify-content:flex-end; align-items:center; gap:5px; }
  .suite-fullwidth-portfolio .ip-col-end .badge { white-space:normal; line-height:1.15; }
  .suite-fullwidth-portfolio .ip-go-btn { min-width:36px; min-height:36px; }
}
.deleted-records { border-bottom:1px solid #e3e6f2; }
.deleted-records h3 { margin:0 0 8px; font-size:1rem; }
.deleted-record { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-block:8px; border-bottom:1px solid #eef0f7; overflow-wrap:anywhere; }
.deleted-record p { color:var(--ink-muted); font-size:.8rem; margin:2px 0; }
/* Record actions and client account layout */
.network-profile .ch-head { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; min-width:0; }
.network-profile .ch-identity > div { min-width:0; }
.network-profile .ch-identity .badge { white-space:normal; max-width:100%; }
.network-profile .network-card-actions { justify-content:flex-start; flex-wrap:wrap; }
.drama-card-foot { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.drama-card-foot > .action-btn-group { justify-content:flex-start; flex-wrap:wrap; }
.rate-ledger-actions { align-items:center; gap:5px; }
.rate-ledger-actions > .btn { min-height:34px; }
.rate-ledger-actions > .rate-ledger-more { width:34px; padding:0; display:inline-grid; place-items:center; font-size:1.2rem; line-height:1; }
.rate-ledger-more-items [data-delete-record] { border-top:1px solid #f0dfe5; border-radius:0 0 8px 8px; color:#a72445; margin-top:3px; padding-top:8px; }
.rate-ledger-more-items [data-delete-record]:hover { background:#fff0f4; }
.client-company-logo { display:grid; place-items:center; width:58px; height:58px; flex:none; border-radius:13px; object-fit:contain; background:#f1edff; color:#503aa7; font-weight:750; }
img.client-company-logo { padding:4px; border:1px solid #e4e2ef; background:#fff; }
.clients-company-cell .client-company-logo { width:34px; height:34px; border-radius:8px; }
.client-detail-page .clients-profile-header { display:flex; align-items:center; gap:14px; padding:14px 17px; background:#fff; }
.client-detail-page .clients-profile-header .clients-title { flex:1; display:flex; justify-content:space-between; flex-wrap:wrap; padding:0; }
.client-detail-page .clients-profile-header .clients-title > .clients-mark { display:none; }
.client-detail-page .clients-title h1 { font-size:clamp(1.25rem,2.2vw,1.8rem); }
.client-detail-page .clients-layout .clients-panel { padding:17px; }
.client-detail-page .clients-metrics { grid-template-columns:repeat(12,minmax(0,1fr)); }
.client-detail-page .clients-stat { grid-column:span 3; }
.client-detail-page .clients-stat:nth-child(n+5) { grid-column:span 4; }
.client-detail-page .clients-stat:nth-child(2):last-child { grid-column:span 6; }
.client-detail-page .clients-stat:first-child:has(+ :last-child) { grid-column:span 6; }
.client-logo-editor { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px; border:1px solid #e5e6f1; border-radius:12px; background:#f8f8fc; }
.client-logo-editor small { color:#5a647a; font-weight:400; }
.client-logo-editor .client-logo-remove { display:flex; align-items:center; }
@media(max-width:800px) {
  .client-detail-page .clients-stat,.client-detail-page .clients-stat:nth-child(n+5) { grid-column:span 6; }
  .client-detail-page .clients-stat:nth-child(7) { grid-column:1/-1; }
  .client-detail-page .clients-stat { padding:9px; gap:6px; }
  .client-detail-page .clients-stat strong { font-size:.95rem; }
}
.channel-card .network-card-name { margin:0; font-size:1.08rem; line-height:1.25; font-weight:700; overflow-wrap:anywhere; }
.channel-card .ch-identity { width:100%; }
.channel-card .ch-identity .badge { white-space:normal; }
.channel-card .network-card-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:7px; padding-top:8px; border-top:1px solid #e9ebf5; }
.channel-card .network-card-actions .btn { min-height:34px; }
.rate-direct-attachment { margin-top:12px; padding:12px; border:1px solid #e1e4f1; border-radius:11px; background:#f8f8fc; }
.rate-direct-attachment input[type=file] { max-width:100%; height:auto; padding:7px; }
.rate-direct-attachment input[type=file]::file-selector-button { padding:7px 10px; margin-inline-end:8px; color:#4933a7; background:#ede9ff; border:0; border-radius:7px; font-weight:650; cursor:pointer; }
.rate-attachment-privacy { display:flex; align-items:center; gap:7px; margin-top:5px; font-size:.82rem; }
.channel-card .network-card-footer { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:auto; padding-top:9px; border-top:1px solid #e9ebf5; }
.channel-card .network-card-footer .network-card-actions { justify-content:flex-start; padding:0; border:0; }
.channel-card .network-card-footer > .btn { margin-inline-start:auto; min-height:34px; }
.format-record-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.matrix-status { min-width:130px; max-width:100%; min-height:32px; padding-block:4px; font-size:.76rem; }
.matrix-status:has(option[value="confirmed"]:checked) { color:#086747; background:#e7f7ef; }
.matrix-status:has(option[value="limited_inventory"]:checked) { color:#894c08; background:#fff5dc; }
.matrix-status:has(option[value="subject_to_confirmation"]:checked) { color:#8d470d; background:#fff0e5; }

/* Comparison workspace */
.compare-preset-mobile {
  display: grid;
  gap: 6px;
  max-width: 340px;
  margin: 0 0 16px;
  font-size: .85rem;
  font-weight: 650;
}
.compare-builder {
  margin-bottom: 22px;
}
.compare-builder header,
.compare-results-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.compare-results-heading {
  margin: 22px 0 12px;
}
.compare-results-heading h2 {
  margin: 0 0 3px;
  font-size: 1.25rem;
}
.compare-results-heading label,
.compare-networks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .86rem;
}
.compare-networks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 0;
  border: 0;
  margin: 14px 0 16px;
  min-width: 0;
}
.compare-networks legend,
.compare-filter-grid > label {
  font-size: .82rem;
  font-weight: 650;
}
.compare-networks label {
  border: 1px solid var(--border-sand);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
}
.compare-networks label:has(input:checked) {
  background: var(--brand-tint);
  border-color: var(--brand-border);
}
.compare-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.compare-filter-grid select {
  margin-top: 6px;
  width: 100%;
}
.compare-metric-card {
  min-width: 0;
}
.compare-chart-order {
  margin: 14px 0 4px;
  font-size: .78rem;
  color: var(--ink-muted);
}
.compare-metric-value {
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compare-metric-value small {
  color: var(--jade);
}
.compare-ranked {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.compare-ranked li {
  border-top: 1px solid var(--border-sand);
  padding: 8px 0 10px;
}
.compare-metric-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: .86rem;
}
.compare-metric-label small {
  display: block;
  color: var(--ink-muted);
  margin: 3px 0 5px;
}
.compare-metric-value > strong {
  white-space: nowrap;
}
.compare-meter {
  height: 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
}
.compare-meter span {
  display: block;
  width: var(--share);
  height: 100%;
  border-radius: inherit;
  background: var(--series);
}
.compare-chart-empty {
  margin: 1rem 0 0;
  color: var(--ink-muted);
}
@media (max-width: 900px) {
  .compare-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .compare-filter-grid > label:first-child { grid-column: 1 / -1; }
}
#compare-chart-heading { scroll-margin-top: 130px; }

.compare-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
}
.compare-toolbar-view,
.compare-toolbar-actions,
.compare-chart-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-toolbar-view {
  font-size: .83rem;
  font-weight: 650;
  min-width: 0;
}
.compare-toolbar-view select {
  width: auto;
  min-width: 0;
}
.compare-toolbar-actions { margin-left: auto; }
.compare-builder { margin: 8px 0 0; }
.compare-builder[hidden] { display: none; }
.compare-results-heading { margin-top: 16px; }
.compare-metric-card { padding: 14px 16px; }
.compare-ranked { margin: 8px 0; }
.compare-ranked li { padding: 5px 0 7px; }
#compare-placement-results { scroll-margin-top: 130px; }
@media (max-width: 640px) {
  .compare-toolbar-view { flex: 1 1 100%; }
  .compare-toolbar-view select { flex: 1; }
}

@media (max-width: 640px) {
  .compare-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
    gap: 7px;
    border-radius: 14px;
  }
  .compare-toolbar-view {
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .compare-toolbar-view select { min-height: 38px; }
  .compare-toolbar-actions { display: contents; }
  .compare-toolbar > .btn,
  .compare-toolbar-actions > .btn { width: 100%; min-height: 40px; padding-inline: 6px; }
  .compare-toolbar-actions > .btn-primary { grid-column: 1 / -1; }
  .compare-toolbar-view + .compare-toolbar-actions > .btn:first-child { grid-column: 1 / -1; }

  .compare-results-heading { gap: 8px; margin: 12px 0 8px; }
  .compare-results-heading h2 { font-size: 1.06rem; }
  .compare-chart-actions { width: 100%; gap: 6px; }
  .compare-chart-actions > label { flex-basis: 100%; }
  .compare-chart-actions > .btn { flex: 1; min-height: 36px; }

  #compare-placement-results > .card-header { padding: 12px; }
  .cmp-matrix-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .cmp-matrix { padding: 8px; gap: 8px; }
  .cmp-placement-head {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 4px 8px;
    padding: 8px 10px;
  }
  .cmp-placement-head > input { width: 20px; height: 20px; margin: 0; }
  .cmp-placement-head img { width: 30px; height: 30px; }
  .cmp-placement-head > .badge { grid-column: 3; }
  .cmp-placement-head h4 { font-size: .89rem; }
  .cmp-placement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-placement-grid section { padding: 8px 10px; font-size: .84rem; }
  .cmp-placement-grid section:nth-child(even) { border-inline-start: 1px solid #edf0f7; }
  .cmp-placement-grid section:nth-child(2) { border-top: 0; }
  .cmp-placement-grid h5 { margin-bottom: 4px; }
  .cmp-placement-grid dl { gap: 4px; }
  .cmp-placement-grid dt,
  .cmp-placement-grid small { font-size: .71rem; }
}

@media (max-width: 720px) {
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 2px 0 0;
    margin-bottom: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-rings,
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-eyebrow,
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-sub,
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-arc { display: none; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-copy { flex: 1; min-width: 0; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-title { font-size: 1.15rem; line-height: 1.2; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-actions { flex: 0 0 auto; width: auto; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-hero-actions .btn { min-height: 38px; padding-inline: 9px; font-size: .76rem; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-card {
    min-height: 50px;
    padding: 6px 8px;
    gap: 7px;
    border-radius: 10px;
    box-shadow: none;
  }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-icon { width: 27px; height: 27px; border-radius: 8px; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-icon svg { width: 14px; height: 14px; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-meta { min-width: 0; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-meta strong { font-size: 1.03rem; line-height: 1.15; }
  :is(.channels-page, .dramas-page, .rates-page, .team-page) .inflora-stat-meta span { font-size: .68rem; line-height: 1.15; }
  .channels-page .channel-directory-grid { gap: 10px; }
  .channels-page .channel-card { padding: 11px; gap: 9px; border-radius: 15px; }
  .channels-page .ch-head,
  .channels-page .ch-metrics-band { margin: 0; }
  .channels-page .ch-identity { align-items: center; gap: 9px; }
  .channels-page .ch-identity > img { width: 42px !important; height: 42px !important; }
  .channels-page .ch-metrics-band { padding: 8px; }
  .channels-page .ch-metric-item { min-width: 0; }
  .channels-page .ch-metric-item > div { line-height: 1.15; }
  .channels-page .social-links-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
  }
  .channels-page .social-pill {
    min-width: 0;
    min-height: 36px;
    height: auto;
    padding: 5px 7px;
    white-space: normal;
    line-height: 1.15;
  }
  .channels-page .social-pill > span { flex: 1; }
  .channels-page .social-pill.unconfigured { grid-column: 1 / -1; }
  .channels-page .suite-offer-callout,
  .channels-page .suite-desk-strip { padding: 8px 9px; }
  .channels-page .channel-desk-actions { width: 100%; }
  .channels-page .channel-desk-actions .btn { min-height: 36px; }
  .channels-page .network-card-footer { display: grid; grid-template-columns: minmax(0, 1fr); }
  .channels-page .network-card-footer > .btn { order: -1; margin: 0; width: 100%; min-height: 40px; }
  .channels-page .network-card-footer .network-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .channels-page .network-card-actions .btn { min-height: 36px; padding-inline: 5px; }
}

@media (max-width: 720px) {
  .dramas-page .inflora-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 7px;
  }
  .dramas-page .inflora-search-field { grid-column: 1 / -1; min-width: 0; }
  .dramas-page .inflora-filter-bar .inflora-pill-select,
  .dramas-page .inflora-filter-bar .inflora-clear-btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    font-size: .8rem;
    padding-inline: 8px;
  }
  .dramas-page .inflora-filter-bar .inflora-pill-select {
    background: var(--bg-subtle);
    color: var(--ink-primary);
    border: 1px solid var(--border-sand);
    box-shadow: none;
  }
  .dramas-page .portal-date-filters { margin-bottom: 8px; }
  .dramas-page .inflora-section-bar { gap: 8px; margin-bottom: 8px; }
  .dramas-page .drama-grid { gap: 10px; }
  .dramas-page .drama-card { border-radius: 14px; min-width: 0; }
  .dramas-page .drama-clean-head,
  .dramas-page .drama-body,
  .dramas-page .drama-card-foot { padding: 10px; }
  .dramas-page .drama-clean-head,
  .dramas-page .drama-clean-identity { gap: 7px; }
  .dramas-page .drama-ch-avatar { width: 36px; height: 36px; }
  .dramas-page .drama-ch-eyebrow,
  .dramas-page .drama-slot-meta { font-size: .72rem; }
  .dramas-page .drama-title { font-size: .97rem; }
  .dramas-page .drama-spark-row { gap: 6px; padding: 8px; }
  .dramas-page .drama-spark-row > svg { max-width: 26%; height: auto; }
  .dramas-page .drama-body strong { overflow-wrap: anywhere; }
  .dramas-page .drama-card-foot .action-btn-group { gap: 5px; }
  .dramas-page .drama-card-foot .btn { min-height: 36px; padding-inline: 7px; }
}

#rf-mobile-preset { display: none; }
@media (max-width: 720px) {
  .rates-page .inflora-hero-actions { display: flex; gap: 5px; }
  .rates-page .inflora-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 6px;
  }
  .rates-page .inflora-search-field { grid-column: 1 / -1; min-width: 0; }
  .rates-page .inflora-filter-bar .inflora-pill-select,
  .rates-page .inflora-filter-bar .inflora-clear-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    font-size: .79rem;
    padding-inline: 8px;
  }
  .rates-page .inflora-filter-bar .inflora-pill-select {
    background: var(--bg-subtle);
    color: var(--ink-primary);
    border: 1px solid var(--border-sand);
    box-shadow: none;
  }
  .rates-page .inflora-subfilter-row { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 6px; margin-bottom: 10px; }
  .rates-page .preset-strip { display: none; }
  .rates-page #rf-mobile-preset { display: block; width: 100%; min-height: 36px; }
  .rates-page .rate-filter-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .rates-page .rate-filter-controls > * { min-width: 0; }
  .rates-page .rate-filter-controls > details[open] { grid-column: 1 / -1; }
  .rates-page .rate-filter-controls .portal-date-filters > button,
  .rates-page .inflora-more-filters > summary { width: 100%; min-height: 36px; box-sizing: border-box; }
  .rates-page .rates-portfolio > div:first-child { padding: 10px 12px !important; }
  .rates-page .rate-ledger-row { padding: 10px 11px; gap: 8px 10px; }
  .rates-page .rate-ledger-programme { padding-bottom: 7px; }
  .rates-page .rate-ledger-cell { align-content: start; gap: 2px; }
  .rates-page .rate-ledger-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .rates-page .rate-ledger-actions > .btn { min-height: 38px; }
  .rates-page .rate-ledger-actions > .rate-ledger-more { width: 42px; }
}

.clients-mobile-field-label { display: none; }
@media (max-width: 680px) {
  .clients-directory-page .clients-title {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
  }
  .clients-directory-page .clients-title > .clients-mark { width: 32px; height: 32px; }
  .clients-directory-page .clients-title h1 { font-size: 1.2rem; }
  .clients-directory-page .clients-title p { display: none; }
  .clients-directory-page .clients-title-actions { grid-column: auto; }
  .clients-directory-page .clients-title-actions .btn { min-height: 38px; }
  .clients-directory-page .clients-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }
  .clients-directory-page .clients-stat { padding: 7px 8px; gap: 7px; border-radius: 10px; }
  .clients-directory-page .clients-stat > .clients-mark { width: 27px; height: 27px; }
  .clients-directory-page .clients-stat strong { font-size: 1rem; }
  .clients-directory-page .clients-stat span { font-size: .72rem; }
  .clients-directory-page .clients-directory-layout { gap: 10px; }
  .clients-directory-page .clients-panel { padding: 11px; }
  .clients-directory-page .clients-toolbar {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 7px;
    margin: 10px 0;
  }
  .clients-directory-page .clients-toolbar label { gap: 4px; font-size: .75rem; }
  .clients-directory-page .clients-toolbar .field-input { min-height: 38px; padding-inline: 7px; font-size: .78rem; }
  .clients-directory-page .clients-directory-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "company status" "contact owner" "activity arrow";
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    align-items: start;
    margin: 0;
    padding: 9px;
    gap: 8px;
    border: 1px solid var(--border-sand);
    border-radius: 11px;
    font-size: .82rem;
  }
  .clients-directory-page .clients-directory-row + .clients-directory-row { margin-top: 6px; }
  .clients-directory-page .clients-company-cell { grid-area: company; grid-column: 1 / -1; padding-inline-end: 61px; }
  .clients-directory-page .clients-directory-row > .clients-status { grid-area: status; justify-self: end; }
  .clients-directory-page .clients-directory-contact { grid-area: contact; }
  .clients-directory-page .clients-directory-owner { grid-area: owner; }
  .clients-directory-page .clients-directory-activity { grid-area: activity; grid-column: 1 / -1; padding: 5px 20px 0 0; border-top: 1px solid var(--border-sand); }
  .clients-directory-page .clients-directory-row > span[aria-hidden] { display: block; grid-area: arrow; align-self: end; justify-self: end; color: var(--brand); }
  .clients-directory-page .clients-directory-row div > span,
  .clients-directory-page .clients-mobile-field-label { font-size: .72rem; }
  .clients-directory-page .clients-mobile-field-label { display: block; color: var(--ink-muted); }
  .clients-directory-page .clients-queue-item { padding-block: 8px; }
}

@media (max-width: 680px) {
  .clients-directory-page .clients-title {
    padding: 8px 9px;
    border: 1px solid var(--border-sand);
    border-radius: 12px;
    background: var(--bg-paper);
  }

  .clients-editor-page .clients-title {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .clients-editor-page .clients-title > .clients-mark,
  .clients-editor-page .clients-title p { display: none; }
  .clients-editor-page .clients-title h1 { font-size: 1.15rem; line-height: 1.2; }
  .clients-editor-page .clients-title-actions { grid-column: auto; }
  .clients-editor-page .clients-title-actions .btn { min-height: 38px; padding-inline: 8px; }
  .clients-editor-page form,
  .clients-editor-page .clients-editor-layout,
  .clients-editor-page .clients-editor-sections { gap: 9px; }
  .clients-editor-page .clients-section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }
  .clients-editor-page .clients-section-nav button {
    justify-content: flex-start;
    min-width: 0;
    min-height: 38px;
    padding: 4px 6px;
    gap: 5px;
    font-size: .73rem;
    text-align: start;
    line-height: 1.15;
  }
  .clients-editor-page .clients-section-nav .clients-mark { width: 23px; height: 23px; }
  .clients-editor-page .clients-panel { padding: 11px; }
  .clients-editor-page .clients-editor-section { scroll-margin-top: 128px; }
  .clients-editor-page .clients-editor-section > header { gap: 8px; padding-bottom: 8px; margin-bottom: 9px; }
  .clients-editor-page .clients-editor-section > header .clients-mark { width: 31px; height: 31px; }
  .clients-editor-page .clients-editor-section header p { font-size: .76rem; line-height: 1.3; }
  .clients-editor-page .clients-form { row-gap: 9px; }
  .clients-editor-page .clients-form label { gap: 4px; font-size: .8rem; }
  .clients-editor-page .clients-form .field-input { min-height: 40px; }
  .clients-editor-page .client-logo-editor {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 6px 8px;
    padding: 7px;
  }
  .clients-editor-page .client-logo-editor .client-company-logo { width: 36px; height: 36px; }
  .clients-editor-page .client-logo-editor .client-logo-remove { grid-column: 1 / -1; }
  .clients-editor-page .client-logo-editor input[type="file"] { padding: 4px; font-size: .73rem; }
  .clients-editor-page .client-logo-editor input::file-selector-button {
    border: 0;
    border-radius: 6px;
    padding: 6px;
    background: var(--brand-tint);
    color: var(--brand);
    font: inherit;
    font-weight: 650;
  }
  .workspace .clients-editor-page .clients-editor-footer {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    padding: 8px;
  }
  .clients-editor-page .clients-editor-footer > span,
  .clients-editor-page .clients-editor-footer .clients-error { grid-column: 1 / -1; }
  .clients-editor-page .clients-editor-footer .btn { min-height: 40px; }
}

@media (max-width: 680px) {
  .sales-reports { gap: 10px; }
  .sales-reports [tabindex="-1"] { scroll-margin-top: 130px; }
  .sales-reports-title { gap: 6px 10px; }
  .sales-reports-title > div { flex: 1 1 132px; min-width: 0; }
  .sales-reports-title h1 { font-size: 1.12rem; line-height: 1.2; }
  .sales-reports-title p { display: none; }
  .sales-reports-title .btn { min-height: 36px; padding-inline: 7px; font-size: .73rem; }
  .sales-reports-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
  }
  .sales-reports-nav button { justify-content: center; gap: 4px; min-height: 40px; padding: 4px 3px; font-size: .74rem; text-align: center; }
  .sales-reports-nav button svg { display: none; }
  .sales-reports-nav button span { min-width: 14px; padding: 1px 3px; font-size: .66rem; }
  .sales-draft-layout { gap: 8px; }
  .sales-draft-card > .card-header,
  .sales-archive > .card-header { padding: 10px 11px; gap: 6px; flex-wrap: wrap; }
  .sales-draft-card > .card-header .card-subtitle { display: none; }
  .sales-draft-card > .card-header .badge { white-space: normal; font-size: .68rem; }
  .sales-draft-body { padding: 10px 11px; gap: 9px; }
  .sales-proposal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .sales-proposal-fields:not(.sales-proposal-settings) > :first-child { grid-column: 1 / -1; }
  .sales-proposal-settings { padding-bottom: 9px; }
  .sales-draft-body .field-group { min-width: 0; }
  .sales-draft-body .field-label { font-size: .76rem; }
  .sales-draft-body :is(.field-input, .field-select) { min-width: 0; min-height: 38px; }
  .sales-report-empty { padding: 9px; font-size: .8rem; }
  .sales-draft-line { padding: 8px; }
  .sales-line-metrics { gap: 7px; margin-top: 7px; padding-top: 7px; }
  .sales-line-metrics strong { overflow-wrap: anywhere; }
  .sales-proposal-summary { padding: 10px 11px; }
  .sales-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 9px; margin: 7px 0; }
  .sales-summary-metrics > div { padding: 3px 0; }
  .sales-summary-metrics > div:nth-child(3) { grid-column: 1 / -1; padding: 7px 9px; }
  .sales-proposal-summary > button { min-height: 40px; }
  .sales-archive-list { padding: 0 10px 6px; }
  .sales-archive-row { gap: 7px; padding: 9px 0; }
  .sales-archive-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 78px), 1fr)); gap: 5px; }
  .sales-archive-actions > .btn { min-height: 36px; }
  .sales-report-library .report-library-header { padding: 10px 11px; gap: 7px; }
  .sales-report-library .report-library-list { padding: 8px; gap: 6px; }
  .sales-report-library .report-library-item { gap: 6px; padding: 8px; }
  .sales-report-library .report-library-item .btn { min-height: 36px; }
}

#notif-heading { margin: 0; font-size: 1rem; color: var(--ink-primary); }
.notif-heading-description { font-size: .74rem; color: var(--ink-muted); }
.notif-head-actions { display: flex; flex-shrink: 0; align-items: center; gap: 5px; }
#btn-close-notifications { font-size: 1.35rem; line-height: 1; }

@media (max-width: 680px) {
  .notif-drawer {
    inset: var(--notif-phone-top, 58px) 8px auto;
    width: auto;
    max-width: none;
    max-height: min(530px, max(0px, calc(100dvh - var(--notif-phone-top, 58px) - 68px - env(safe-area-inset-bottom))));
    z-index: 98;
    border-radius: 16px;
  }
  .notif-drawer-head { flex-shrink: 0; padding: 8px 10px; background: var(--bg-paper); }
  .notif-heading-description { display: none; }
  .notif-head-actions > button { min-height: 38px; }
  #btn-close-notifications { min-width: 38px; }
  .notif-list { min-height: 0; padding: 0 10px; gap: 0; overscroll-behavior-y: contain; }
  .notif-card {
    flex-shrink: 0;
    padding: 9px 8px;
    border: 0;
    border-bottom: 1px solid var(--border-sand);
    border-radius: 0;
    background: transparent;
  }
  .notif-card.unread { border-inline-start: 2px solid var(--brand); background: var(--bg-paper); }
  .notif-card p { margin: 2px 0 0; }
}

.format-phone-matrix { display: none; }
@media (max-width: 720px) {
  .format-board > .table-wrap { display: none; }
  .format-board > .card-header { display: grid; grid-template-columns: minmax(0, 1fr); padding: 11px; gap: 8px; }
  .format-board > .card-header .format-key { display: flex; flex-wrap: wrap; justify-content: flex-start; min-width: 0; gap: 4px; }
  .format-phone-matrix { display: grid; gap: 8px; padding: 8px; }
  .format-phone-row { padding: 9px; border: 1px solid var(--border-sand); border-radius: 11px; min-width: 0; }
  .format-phone-row > header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .format-phone-row h4 { font-size: .9rem; margin: 0; overflow-wrap: anywhere; }
  .format-phone-row p { margin: 2px 0 0; color: var(--ink-muted); font-size: .74rem; overflow-wrap: anywhere; }
  .format-phone-networks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .format-phone-network { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 5px; background: var(--bg-subtle); border-radius: 7px; }
  .format-phone-network > span:first-child { display: flex; align-items: center; gap: 4px; font-size: .73rem; font-weight: 650; overflow-wrap: anywhere; }
  .format-phone-network img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
  .format-phone-network .matrix-status { width: 100%; min-width: 0; min-height: 34px; font-size: .74rem; }
  .format-phone-network .badge { justify-self: start; white-space: normal; }
}

@media (max-width: 720px) {
  .formats-page .inflora-hero-card {
    display: block;
    padding: 10px;
    margin-bottom: 9px;
    border-radius: 13px;
    box-shadow: none;
  }
  .formats-page .inflora-hero-rings,
  .formats-page .inflora-eyebrow,
  .formats-page .inflora-hero-sub,
  .formats-page .format-matrix-add { display: none; }
  .formats-page .inflora-hero-title { font-size: 1.08rem; line-height: 1.2; }
  .formats-page .inflora-hero-actions {
    display: flex;
    width: 100%;
    margin: 8px 0 0;
  }
  .formats-page .inflora-hero-card:has(.formats-add) { position: relative; padding-top: 14px; }
  .formats-page .inflora-hero-card:has(.formats-add) .inflora-hero-copy { padding-inline-end: 105px; min-height: 32px; }
  .formats-page .formats-add {
    position: absolute;
    inset-block-start: 7px;
    inset-inline-end: 9px;
    min-height: 38px;
    padding-inline: 8px;
    font-size: .75rem;
  }
  .formats-page .formats-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 3px;
  }
  .formats-page .formats-view-switch .seg-btn {
    justify-content: center;
    min-height: 36px;
    padding: 4px;
    gap: 4px;
    font-size: .72rem;
    text-align: center;
    white-space: normal;
  }
  .formats-page .formats-view-switch svg { flex: none; }
}

@media (max-width: 720px) {
  :is(.documents-page, .history-page) .inflora-hero-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px;
    margin-bottom: 9px;
    border-radius: 12px;
  }
  :is(.documents-page, .history-page) .inflora-hero-rings,
  :is(.documents-page, .history-page) .inflora-eyebrow,
  :is(.documents-page, .history-page) .inflora-hero-sub { display: none; }
  :is(.documents-page, .history-page) .inflora-hero-copy { flex: 1; min-width: 0; }
  :is(.documents-page, .history-page) .inflora-hero-title { font-size: 1.12rem; line-height: 1.2; }
  :is(.documents-page, .history-page) .inflora-hero-actions { width: auto; flex: none; }
  :is(.documents-page, .history-page) .inflora-hero-actions .btn { min-height: 38px; padding-inline: 8px; font-size: .75rem; }
  :is(.documents-page, .history-page) .filter-panel { padding: 9px; margin-bottom: 9px; }
  :is(.documents-page, .history-page) .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  :is(.documents-page, .history-page) .filter-grid > :first-child { grid-column: 1 / -1; }
  :is(.documents-page, .history-page) .field-group { min-width: 0; }
  :is(.documents-page, .history-page) .field-label { font-size: .76rem; }
  :is(.documents-page, .history-page) .field-input, :is(.documents-page, .history-page) .field-select { min-width: 0; width: 100%; }

  :is(.documents-page, .history-page) .table-wrap { overflow: visible; }
  :is(.documents-page, .history-page) .data-table { display: block; min-width: 0; }
  :is(.documents-page, .history-page) .data-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  :is(.documents-page, .history-page) .data-table tbody { display: grid; gap: 7px; padding: 8px; }
  :is(.documents-page, .history-page) .data-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
    border: 1px solid var(--border-sand);
    border-radius: 10px;
  }
  :is(.documents-page, .history-page) .data-table tbody td {
    display: block;
    position: static;
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  :is(.documents-page, .history-page) .data-table tbody td:first-child { grid-column: 1 / -1; }
  :is(.documents-page, .history-page) .data-table tbody td:last-child { justify-self: end; }
  :is(.documents-page, .history-page) .data-table .badge { white-space: normal; }
  :is(.documents-page, .history-page) .data-table .btn { min-height: 36px; }
}

.history-phone-label { display: none; }
@media (max-width: 720px) {
  .history-page .data-table tbody td { min-width: 0 !important; white-space: normal !important; }
  .history-page .data-table tbody td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; }
  .history-page .data-table tbody td:nth-child(6) { justify-self: start; grid-column: 2; grid-row: 3; }
  .history-page .data-table tbody td.num-col { text-align: start; }
  .history-page .history-phone-label { display: block; color: var(--ink-muted); font: 650 .72rem var(--font-sans); margin-bottom: 3px; }
}

@media (max-width: 720px) {
  .team-page .team-share-strip { padding: 9px; gap: 7px; margin-bottom: 10px; }
  .team-page .tss-copy { min-width: 0; }
  .team-page .tss-copy > div > span { display: none; }
  .team-page .tss-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; width: 100%; }
  .team-page .tss-url-input { grid-column: 1 / -1; min-width: 0; width: 100%; }
  .team-page .tss-controls .btn { padding-inline: 5px; font-size: .74rem; }
  .team-page .team-roster-card,
  .team-page #team-audit-log { padding: 10px; }
  .team-page .team-roster-card > .suite-card-head > button { display: none; }
  .team-page .suite-card-head { gap: 7px; margin-bottom: 8px; }
  .team-page .team-roster-list { gap: 7px; }
  .team-page .team-member-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--border-sand);
    border-radius: 11px;
  }
  .team-page .tm-col-identity, .team-page .tm-col-actions { grid-column: 1 / -1; }
  .team-page .tm-col-identity { gap: 8px; }
  .team-page .tm-name-stack { min-width: 0; overflow-wrap: anywhere; }
  .team-page .tm-name-stack small { white-space: normal; }
  .team-page .tm-col-perm { min-width: 0; padding: 6px; background: var(--bg-subtle); border-radius: 7px; }
  .team-page .tm-inline-toggle { white-space: normal; gap: 4px; min-height: 32px; }
  .team-page .tm-inline-toggle .ui-switch { flex: none; }
  .team-page .tm-col-perm small { font-size: .66rem; }
  .team-page .tm-col-perm .badge { white-space: normal; }
  .team-page .tm-col-actions { display: flex; flex-wrap: wrap; gap: 5px; }
  .team-page .tm-col-actions .btn { flex: 1; min-height: 36px; }
  .team-page #team-audit-log .suite-card-head > div { min-width: 0 !important; width: 100%; }
  .team-page #team-audit-log .table-wrap { overflow: visible; }
  .team-page #team-audit-log .data-table { display: block; min-width: 0; }
  .team-page #team-audit-log thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .team-page #team-audit-log tbody { display: grid; gap: 6px; }
  .team-page #team-audit-log tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 8px; border: 1px solid var(--border-sand); border-radius: 8px; }
  .team-page #team-audit-log tbody td { min-width: 0; padding: 0; border: 0; white-space: normal !important; overflow-wrap: anywhere; }
  .team-page #team-audit-log tbody td:last-child { grid-column: 1 / -1; }
  .team-page #team-audit-log .badge { white-space: normal; }
}

.settings-phone-nav { display: none; }
@media (max-width: 720px) {
  .settings-page .inflora-hero-card { padding: 10px; gap: 6px; margin-bottom: 8px; border-radius: 12px; }
  .settings-page :is(.inflora-hero-rings, .inflora-eyebrow, .inflora-hero-sub, .settings-studio-rail) { display: none; }
  .settings-page .inflora-hero-title { font-size: 1.16rem; }
  .settings-page .inflora-hero-actions { width: auto; }
  .settings-phone-nav { display: grid; gap: 4px; margin-bottom: 8px; font-size: .77rem; font-weight: 650; }
  .settings-phone-nav select { width: 100%; min-height: 40px; }
  .settings-page .settings-studio-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .settings-page .settings-studio-main { gap: 9px; }
  .settings-page :is(.suite-card, .card-pad) { padding: 10px; min-width: 0; }
  .settings-page :is(.suite-card-head, .card-header) { flex-wrap: wrap; gap: 7px; }
  .settings-page .settings-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .settings-page .sss-tile { min-width: 0; padding: 7px; overflow-wrap: anywhere; }
  .settings-page :is(.settings-split-row, .settings-utility-grid, .role-matrix-grid, .profile-security-grid, .template-studio-layout) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .settings-page :is(.field-group, .field-input, .field-select, .email-preview-shell, .email-preview-frame, .email-preview-canvas) { min-width: 0; max-width: 100%; }
  .settings-page .settings-studio-main .team-member-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 8px; }
  .settings-page :is(.tm-col-identity, .tm-col-actions) { grid-column: 1 / -1; }
  .settings-page .settings-studio-main .team-member-row .tm-col-actions { margin-left: 0; flex-wrap: wrap; }
  .settings-page .tm-name-stack { min-width: 0; overflow-wrap: anywhere; }
  .settings-page .tm-name-stack small, .settings-page .tm-inline-toggle { white-space: normal; }
  .settings-page .tm-col-perm { min-width: 0; padding: 5px; background: var(--bg-subtle); border-radius: 7px; }
  .settings-page .table-wrap > .data-table { display: block; min-width: 0; }
  .settings-page .table-wrap > .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .settings-page .table-wrap > .data-table tbody { display: grid; gap: 6px; }
  .settings-page .table-wrap > .data-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 7px; border: 1px solid var(--border-sand); border-radius: 8px; }
  .settings-page .table-wrap > .data-table td { min-width: 0; padding: 0; border: 0; white-space: normal !important; overflow-wrap: anywhere; }
  .settings-page .table-wrap > .data-table td:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .documents-page .data-table tbody td.sticky-action-col {
    grid-column: 1 / -1;
    justify-self: stretch;
    padding-top: 6px;
    border-top: 1px solid var(--border-sand);
  }
  .documents-page .sticky-action-col > a.btn {
    display: flex;
    width: 100%;
    min-height: 40px;
    background: var(--brand-tint);
    border-color: var(--brand-border);
    color: var(--brand);
    font-weight: 650;
  }
}

@media (max-width: 520px) {
  .pm-signin {
    align-items: safe center;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    background: #fff;
    border-block-start: 4px solid #9e172b;
  }
  .pm-signin .signin-frame {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .pm-signin .signin-main {
    width: min(100%, 430px);
    padding: clamp(16px, 5dvh, 42px) clamp(18px, 6vw, 30px) clamp(16px, 5dvh, 42px);
  }
  .pm-signin .signin-logo { width: 68px; }
  .pm-signin .signin-intro { margin: 15px 0 19px; }
  .pm-signin .signin-intro h1 { font-size: clamp(1.65rem, 7vw, 2.05rem); }
  .pm-signin .signin-intro p { margin-top: 4px; font-size: .88rem; }
  .pm-signin .signin-intro .signin-product { margin: 0 0 5px; font-size: .78rem; }
  .pm-signin .auth-form { gap: 12px; }
  .pm-signin .auth-gradient-btn { min-height: 46px; }
  .pm-signin .signin-help { margin-top: 15px; padding-top: 11px; }
}
@media (max-width: 520px) and (max-height: 540px) {
  .pm-signin .signin-main { padding-block: 12px; }
  .pm-signin .signin-logo { width: 54px; }
  .pm-signin .signin-intro { margin-block: 8px 12px; }
  .pm-signin .auth-form { gap: 8px; }
  .pm-signin .signin-help { margin-top: 9px; padding-top: 7px; }
}

@media (max-width: 520px) {
  .pm-signin {
    position: relative;
    isolation: isolate;
    overflow: clip;
    border: 0;
    background: linear-gradient(158deg, #38101c 0%, #611a2d 57%, #39101d 100%);
  }
  .pm-signin::before,
  .pm-signin::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 145%;
    height: 29%;
    border: 1px solid #ffd0db55;
    border-radius: 50%;
    pointer-events: none;
    animation: signin-wave-drift 16s ease-in-out infinite alternate;
  }
  .pm-signin::before {
    inset: -11% auto auto -40%;
    transform: rotate(-16deg);
    box-shadow: 0 0 0 16px #ed769c21, 0 0 0 34px #ed769c16, 0 0 0 56px #ed769c0e;
  }
  .pm-signin::after {
    inset: auto -40% -10% auto;
    transform: rotate(-16deg);
    box-shadow: 0 0 0 18px #ed769c24, 0 0 0 38px #ed769c17, 0 0 0 62px #ed769c0f;
    animation-direction: alternate-reverse;
  }
  .pm-signin .signin-frame {
    width: min(calc(100% - 28px), 430px);
    border: 1px solid #fff6;
    border-radius: 20px;
    box-shadow: 0 16px 46px #23081150;
  }
  .pm-signin .signin-main { padding-inline: clamp(15px, 5vw, 24px); }
}
@keyframes signin-wave-drift {
  to { transform: translate(5%, 7%) rotate(-9deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pm-signin::before, .pm-signin::after { animation: none; }
}
