/*
Theme Name:  Nexus Core
Theme URI:   https://yoursite.com
Description: Official theme for the Nexus Core Partner & Quotation Platform. Built around a deep blue palette with clean typography for B2B partner portals.
Version:     1.0.0
Author:      Nexus Core
Text Domain: nexus-theme
Tags: business, portfolio, custom-colors, custom-logo, woocommerce
*/

/* ═══════════════════════════════════════════════════════════════════════════
   COLOR PALETTE  (sampled from brand swatch)
   ═══════════════════════════════════════════════════════════════════════════
   1. Periwinkle Light  #C4C7D8  — backgrounds, cards, subtle fills
   2. Slate Blue-Grey   #7A85A0  — muted text, borders, secondary elements
   3. Royal Blue        #1A35C8  — primary action color, links, highlights
   4. Deep Navy         #0D1850  — headers, navigation, strong backgrounds
   5. Near-Black Navy   #070E2A  — footer, darkest backgrounds, overlays
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand palette */
  --c-periwinkle:     #C4C7D8;
  --c-slate:          #7A85A0;
  --c-royal:          #1A35C8;
  --c-navy:           #0D1850;
  --c-dark:           #070E2A;

  /* Semantic tokens */
  --c-primary:        var(--c-royal);
  --c-primary-hover:  #1428A8;
  --c-heading:        var(--c-navy);
  --c-body:           #2C3358;
  --c-muted:          var(--c-slate);
  --c-border:         #D4D8E8;
  --c-bg:             #F5F6FA;
  --c-bg-card:        #FFFFFF;
  --c-bg-dark:        var(--c-navy);
  --c-bg-darkest:     var(--c-dark);
  --c-white:          #FFFFFF;

  /* Status colours */
  --c-success:        #1A6B3C;
  --c-success-bg:     #E8F5EF;
  --c-warning:        #B8860B;
  --c-warning-bg:     #FEF9E7;
  --c-danger:         #A32020;
  --c-danger-bg:      #FDECEA;
  --c-info:           var(--c-royal);
  --c-info-bg:        #EBF0FD;

  /* Typography */
  --font-heading: 'Barlow', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Sizing */
  --radius:       8px;
  --radius-lg:    14px;
  --radius-pill:  999px;
  --shadow-sm:    0 1px 4px rgba(7,14,42,.08);
  --shadow:       0 3px 12px rgba(7,14,42,.12);
  --shadow-lg:    0 8px 32px rgba(7,14,42,.18);
  --transition:   0.2s ease;
  --container:    1200px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-body);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary-hover); }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-heading);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.15rem; color: var(--c-muted); line-height: 1.8; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--sm { padding: 48px 0; }
.section--lg { padding: 100px 0; }
.section--dark { background: var(--c-navy); }
.section--darkest { background: var(--c-dark); }
.section--light { background: var(--c-periwinkle); }
.section--white { background: var(--c-white); }

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-dark);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo img { height: 38px; width: auto; }
.site-logo__text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-white);
  letter-spacing: -0.03em;
}
.site-logo__text span { color: var(--c-royal); }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  display: flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.current { background: rgba(255,255,255,.08); color: var(--c-white); }

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--c-white);
}

@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--c-dark); flex-direction: column; padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; }
  .nav-toggle { display: flex; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-royal);
  color: var(--c-white);
  border-color: var(--c-royal);
}
.btn--primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); color: var(--c-white); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,53,200,.4); }

.btn--outline {
  background: transparent;
  color: var(--c-royal);
  border-color: var(--c-royal);
}
.btn--outline:hover { background: var(--c-royal); color: var(--c-white); }

.btn--white {
  background: var(--c-white);
  color: var(--c-navy);
  border-color: var(--c-white);
}
.btn--white:hover { background: var(--c-periwinkle); color: var(--c-navy); }

.btn--ghost {
  background: rgba(255,255,255,.1);
  color: var(--c-white);
  border-color: rgba(255,255,255,.2);
}
.btn--ghost:hover { background: rgba(255,255,255,.18); color: var(--c-white); }

.btn--sm { padding: 7px 16px; font-size: .82rem; }
.btn--lg { padding: 14px 32px; font-size: 1rem; }

.btn--success { background: var(--c-success); color: var(--c-white); border-color: var(--c-success); }
.btn--danger  { background: var(--c-danger);  color: var(--c-white); border-color: var(--c-danger);  }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card--accent { border-top: 4px solid var(--c-royal); }
.card--dark { background: var(--c-navy); border-color: rgba(255,255,255,.1); color: var(--c-white); }
.card--dark h1, .card--dark h2, .card--dark h3, .card--dark h4 { color: var(--c-white); }
.card--dark p { color: rgba(255,255,255,.75); }

/* ── Stat / Metric Cards ──────────────────────────────────────────────────── */
.stat-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-royal);
}
.stat-card__icon {
  width: 44px; height: 44px;
  background: var(--c-info-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.stat-card__value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-heading);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card__label {
  font-size: .85rem;
  color: var(--c-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-card__trend {
  font-size: .8rem;
  font-weight: 600;
  margin-top: 8px;
}
.stat-card__trend--up   { color: var(--c-success); }
.stat-card__trend--down { color: var(--c-danger);  }

/* ── Badges & Status ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--success { background: var(--c-success-bg); color: var(--c-success); }
.badge--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.badge--danger  { background: var(--c-danger-bg);  color: var(--c-danger);  }
.badge--info    { background: var(--c-info-bg);    color: var(--c-royal);   }
.badge--muted   { background: var(--c-periwinkle); color: var(--c-slate);   }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-heading);
  margin-bottom: 6px;
}
.form-label .required { color: var(--c-danger); margin-left: 3px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-body);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--c-royal);
  box-shadow: 0 0 0 3px rgba(26,53,200,.12);
}
.form-control::placeholder { color: var(--c-slate); opacity: .7; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A85A0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { min-height: 110px; resize: vertical; }
.form-hint { font-size: .8rem; color: var(--c-muted); margin-top: 5px; }
.form-error { font-size: .8rem; color: var(--c-danger); margin-top: 5px; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--c-border); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead { background: var(--c-navy); }
thead th { padding: 13px 16px; color: var(--c-white); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; text-align: left; }
tbody tr { border-bottom: 1px solid var(--c-border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.04); }
tbody td { padding: 13px 16px; vertical-align: middle; }
/* nth-child alternating removed — portals use their own dark theme CSS */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-navy) 50%, #0F2270 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,53,200,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(122,133,160,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 780px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,53,200,.2);
  border: 1px solid rgba(26,53,200,.4);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--c-periwinkle);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 24px;
}
.hero h1 { color: var(--c-white); font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 20px; }
.hero h1 span { color: var(--c-periwinkle); }
.hero .lead { color: rgba(255,255,255,.75); font-size: 1.15rem; margin-bottom: 36px; max-width: 580px; }
.hero__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-dark) 100%);
  padding: 56px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.page-header h1 { color: var(--c-white); margin-bottom: 8px; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.page-header .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.5); }
.page-header .breadcrumb a { color: var(--c-periwinkle); }
.page-header .breadcrumb a:hover { color: var(--c-white); }
.page-header .breadcrumb span::before { content: '/'; margin-right: 8px; }

/* ── Features / Icon List ────────────────────────────────────────────────── */
.feature-icon {
  width: 52px; height: 52px;
  background: var(--c-info-bg);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.feature-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-item p  { font-size: .9rem; color: var(--c-muted); }

/* ── Portal / Dashboard layout ───────────────────────────────────────────── */
.portal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: calc(100vh - 68px); }
.portal-sidebar {
  background: var(--c-dark);
  padding: 32px 20px;
  border-right: 1px solid rgba(255,255,255,.07);
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}
.portal-sidebar__title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-slate);
  padding: 0 12px;
  margin-bottom: 10px;
  margin-top: 24px;
}
.portal-sidebar__title:first-child { margin-top: 0; }
.portal-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: all var(--transition);
  margin-bottom: 2px;
}
.portal-nav a:hover, .portal-nav a.active { background: rgba(26,53,200,.25); color: var(--c-white); }
.portal-nav a .icon { font-size: 1rem; width: 20px; text-align: center; }
.portal-content { padding: 36px 40px; background: var(--c-bg); }
@media (max-width: 900px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { position: relative; height: auto; top: 0; }
  .portal-content { padding: 24px 20px; }
}

/* ── Quote Status Colours ─────────────────────────────────────────────────── */
.status--draft    { background: #EEF0F8; color: var(--c-slate); }
.status--sent     { background: var(--c-info-bg); color: var(--c-royal); }
.status--accepted { background: var(--c-success-bg); color: var(--c-success); }
.status--declined { background: var(--c-danger-bg); color: var(--c-danger); }
.status--expired  { background: #F5F5F5; color: #888; }
.status--invoice  { background: #EEF4FF; color: #2450AA; }
.status--paid     { background: var(--c-success-bg); color: var(--c-success); }
.status--overdue  { background: #FFF3E0; color: #E65100; }
.status--void     { background: #F5F5F5; color: #999; text-decoration: line-through; }

/* ── Notifications / Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 20px;
}
.alert--success { background: var(--c-success-bg); color: var(--c-success); border-left: 4px solid var(--c-success); }
.alert--warning { background: var(--c-warning-bg); color: var(--c-warning); border-left: 4px solid var(--c-warning); }
.alert--danger  { background: var(--c-danger-bg);  color: var(--c-danger);  border-left: 4px solid var(--c-danger);  }
.alert--info    { background: var(--c-info-bg);    color: var(--c-royal);   border-left: 4px solid var(--c-royal);   }

/* ── WooCommerce My Account overrides ────────────────────────────────────── */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: var(--c-dark);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: rgba(26,53,200,.3);
  color: var(--c-white);
}
.woocommerce-account .woocommerce-MyAccount-content { padding: 32px; background: var(--c-bg-card); border-radius: var(--radius-lg); border: 1px solid var(--c-border); }

/* WC buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input[type="submit"] {
  background: var(--c-royal) !important;
  color: var(--c-white) !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  font-size: .9rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: background var(--transition) !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input[type="submit"]:hover { background: var(--c-primary-hover) !important; color: var(--c-white) !important; }

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--c-dark);
}
.login-brand {
  background: linear-gradient(160deg, var(--c-navy) 0%, var(--c-dark) 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(26,53,200,.2) 0%, transparent 70%);
}
.login-brand__content { position: relative; z-index: 1; }
.login-brand h2 { color: var(--c-white); font-size: 2.2rem; margin-bottom: 16px; }
.login-brand p  { color: rgba(255,255,255,.65); font-size: 1.05rem; line-height: 1.8; }
.login-form-side {
  background: var(--c-white);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-box { max-width: 400px; width: 100%; margin: 0 auto; }
.login-box h1 { font-size: 1.8rem; margin-bottom: 8px; }
.login-box p.sub { color: var(--c-muted); margin-bottom: 32px; }
@media (max-width: 768px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-side { padding: 40px 28px; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.65);
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-main { padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: rgba(255,255,255,.5); font-size: .9rem; margin-top: 14px; line-height: 1.8; }
.footer-col h5 { color: var(--c-white); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.5); font-size: .9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--c-periwinkle); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* ── Section headings ─────────────────────────────────────────────────────── */
.section-heading { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-heading .eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-royal);
  margin-bottom: 12px;
}
.section-heading h2 { margin-bottom: 14px; }
.section-heading p { color: var(--c-muted); }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--c-border);
  margin: 32px 0;
}
.divider--royal { background: var(--c-royal); height: 3px; width: 48px; border-radius: 2px; margin: 0 0 28px; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--c-muted); }
.text-white  { color: var(--c-white); }
.text-royal  { color: var(--c-royal); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .78rem; }
.fw-bold     { font-weight: 700; }
.fw-medium   { font-weight: 500; }
.mt-auto     { margin-top: auto; }
.mb-0        { margin-bottom: 0; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }
.mb-24       { margin-bottom: 24px; }
.mb-32       { margin-bottom: 32px; }
.mb-48       { margin-bottom: 48px; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.gap-24      { gap: 24px; }

/* ── Nexus plugin form overrides ─────────────────────────────────────────── */
.nexus-form { max-width: 820px; }
.nexus-form .form-section { background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px; }
.nexus-form .form-section h3 { font-size: 1rem; color: var(--c-heading); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--c-border); }
.nexus-line-items { background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.nexus-line-items table thead th { background: var(--c-navy); color: var(--c-white); padding: 10px 14px; font-size: .78rem; }
.nexus-totals { background: var(--c-navy); color: var(--c-white); border-radius: var(--radius-lg); padding: 20px 24px; }
.nexus-totals .total-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; color: rgba(255,255,255,.75); }
.nexus-totals .total-row--grand { font-size: 1.1rem; font-weight: 700; color: var(--c-white); border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; margin-top: 8px; }

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 60px 0; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .portal-sidebar { display: none !important; }
  .portal-content { padding: 0 !important; }
}
