/* ==========================================================================
   BillSwift v1.0.8 — Nordic Fjord Liquid Glass × Editorial SaaS Theme (v2)
   Shared across Live App, Demos, Partner Portal, SEO Pages & Master Admin
   ========================================================================== */

:root {
  --bs-fjord: #0F4C5C;
  --bs-fjord-deep: #082B34;
  --bs-fjord-mid: #146375;
  --bs-frost: #F2F7F8;
  --bs-ink: #0E2429;
  --bs-muted: #4A656B;
  --bs-gold: #D97706;
}

/* 1. Airy Frost Canvas & Pinned Footer Architecture */
html, body {
  min-height: 100vh;
}
body {
  display: flex;
  flex-direction: column;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  background: radial-gradient(circle at 50% 0%, rgba(15, 76, 92, 0.11) 0%, #F2F7F8 44%, #EAF2F4 100%) !important;
  background-attachment: fixed !important;
  color: var(--bs-ink);
}
main {
  flex: 1 0 auto;
}
footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(15, 76, 92, 0.10) !important;
}

/* 2. High-Contrast Editorial Serif Display Typography */
h1, h2, .bs-serif-title {
  font-family: 'Fraunces', Georgia, serif !important;
  letter-spacing: -0.02em;
}

/* 3. Floating Liquid-Glass Top Navigation (Partner Portal & Master Admin; index.html already has its own inner floating pill) */
header.bs-nordic-header {
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  border: 1px solid rgba(15, 76, 92, 0.12) !important;
  box-shadow: 0 12px 32px -12px rgba(8, 43, 52, 0.14) !important;
  border-radius: 18px !important;
  width: calc(100% - 24px) !important;
  max-width: 1400px !important;
  margin: 10px auto 0 auto !important;
  top: 10px !important;
}
body.bs-daylight > header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Solid Deep Fjord Table Headers across Reports, Partner Portal, Master Admin & A4 Invoice */
table thead,
table thead tr,
table thead th,
#invoice-paper table thead,
#invoice-paper table thead tr,
#invoice-paper table thead th {
  background-color: #0F4C5C !important;
  background: #0F4C5C !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* 4. Signature Liquid Glass Surfaces & Paper-First Studio Cards */
.bs-glass,
.bs-glass-card {
  background: rgba(255, 255, 255, 0.80) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.90) !important;
  box-shadow: 0 18px 44px -18px rgba(8, 43, 52, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  border-radius: 24px !important;
}

header .bs-glass,
header .bs-glass-header {
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  border: 1px solid rgba(15, 76, 92, 0.12) !important;
  box-shadow: 0 12px 32px -12px rgba(8, 43, 52, 0.14) !important;
}

/* Harmonize Partner Portal, Master Admin, Reports, Profile & Modals to Liquid Glass (never touch #invoice-paper) */
main section.bg-white.rounded-2xl:not(#invoice-paper),
main section.bg-white.rounded-3xl:not(#invoice-paper),
main > div > div.bg-white.rounded-2xl:not(#invoice-paper),
main > div.grid > div.bg-white.rounded-2xl:not(#invoice-paper),
#onboarding-modal > div,
#paywall-modal > div,
#whats-new-modal > div,
#roadmap-v11-modal > div,
#view-login,
#view-onboard {
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(22px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 18px 44px -18px rgba(8, 43, 52, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

/* Keep A4 invoice paper pure crisp white & sans-serif */
#invoice-paper,
#invoice-paper * {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
#invoice-paper {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Upgrade SEO page navbar .bs-cta to signature Gold CTA */
header a.bs-cta,
a.bs-cta-gold-link {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #0E2429 !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px -6px rgba(217, 119, 6, 0.45) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}
header a.bs-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.bs-hero-card,
.bs-hero {
  background: radial-gradient(circle at 50% 0%, #166C80 0%, #0F4C5C 48%, #082B34 100%) !important;
  box-shadow: 0 28px 64px -22px rgba(8, 43, 52, 0.42) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

/* 5. Crisp Buttons, Orbital Hero & Dark Contrast Band */
.bs-orbital {
  position: relative;
  overflow: hidden;
}
.bs-orbital::before,
.bs-orbital::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  border: 1px solid rgba(15, 76, 92, 0.08);
  pointer-events: none;
}
.bs-orbital::before { width: 640px; height: 640px; }
.bs-orbital::after { width: 980px; height: 980px; }

/* High-specificity overrides to beat legacy inline dark-to-light harmonizer rules */
body .bs-dark-fjord,
body #pricing-card-999 {
  background: radial-gradient(circle at 50% 0%, #146375 0%, #0B3A46 42%, #082B34 100%) !important;
  color: #FFFFFF !important;
}
body .bs-dark-fjord,
body .bs-dark-fjord *,
body .bs-dark-fjord .text-white,
body .bs-dark-fjord h2.text-white,
body .bs-dark-fjord div.text-white,
body .bs-dark-fjord button.text-white,
body .bs-dark-fjord a.text-white,
body #pricing-card-999,
body #pricing-card-999 *,
body #pricing-card-999 .text-white,
body #pricing-card-999 #price-card-999 {
  color: #FFFFFF !important;
}
body .bs-dark-fjord .bs-dark-muted,
body #pricing-card-999 .bs-dark-muted {
  color: #CCFBF1 !important;
}
body .bs-dark-fjord a.bs-btn-light,
body .bs-dark-fjord button.bs-btn-light,
body #pricing-card-999 #btn-plan-999 {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #082B34 !important;
  font-weight: 800 !important;
}
body #pricing-card-499 {
  box-shadow: 0 0 0 2px #0F4C5C, 0 20px 44px -16px rgba(8, 43, 52, 0.18) !important;
}
body #pricing-card-499 #btn-plan-499 {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #0E2429 !important;
  font-weight: 800 !important;
}
/* Paper-first inline input styling inside Studio Step 1 */
#bs-studio-editor-col .bs-paper-box input[type="text"],
#bs-studio-editor-col .bs-paper-box input[type="tel"],
#bs-studio-editor-col .bs-paper-box input[type="date"],
#bs-studio-editor-col .bs-paper-box input[type="number"] {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(15, 76, 92, 0.22) !important;
  border-radius: 0 !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  box-shadow: none !important;
}
#bs-studio-editor-col .bs-paper-box input:focus {
  border-bottom-color: #0F4C5C !important;
}

.bs-cta-gold,
button.bs-cta-gold,
a.bs-cta-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  background-color: #D97706 !important;
  color: #0E2429 !important;
  border: none !important;
  box-shadow: 0 8px 20px -6px rgba(217, 119, 6, 0.48) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}
.bs-cta-gold:hover,
button.bs-cta-gold:hover,
a.bs-cta-gold:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.bs-cta-fire {
  background: linear-gradient(135deg, #0F4C5C 0%, #146375 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 22px -6px rgba(15, 76, 92, 0.40) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}
.bs-cta-fire:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* 6. Clean Paper-First Form Inputs & Tables */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: rgba(15, 76, 92, 0.16);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: #0F4C5C !important;
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.10) !important;
  outline: none !important;
}

/* Keep printed A4 PDFs pure white & unaffected by glass backgrounds */
@media print {
  body { background: #FFFFFF !important; display: block !important; }
  .bs-glass-card { box-shadow: none !important; backdrop-filter: none !important; background: #FFFFFF !important; }
}
