/* ============================================================
   A M Nelson Group — Shared Stylesheet
   ============================================================ */

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

:root {
  --navy:        #0D2350;
  --navy-dark:   #091838;
  --navy-light:  #1A3A6E;
  --accent:      #2E6BE6;
  --accent-soft: #E8EFFC;
  --white:       #FFFFFF;
  --off-white:   #F7F9FC;
  --text-main:   #1A1A2E;
  --text-mid:    #4A5568;
  --text-light:  #718096;
  --border:      #DDE3EE;
  --shadow-sm:   0 1px 3px rgba(13,35,80,0.08);
  --shadow-md:   0 4px 16px rgba(13,35,80,0.12);
  --shadow-lg:   0 12px 40px rgba(13,35,80,0.16);
  --radius:      10px;
  --radius-lg:   18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(9, 24, 56, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-mark { width: 36px; height: 36px; flex-shrink: 0; display: block; }

.nav-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.nav-logo-sub {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 7px;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  background: #1a56c9 !important;
  transform: translateY(-1px);
}

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

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  background: linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  padding: 148px 24px 88px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(46,107,230,0.16) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -5%;
  width: 35vw; height: 35vw;
  background: radial-gradient(circle, rgba(46,107,230,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.page-hero .section-label { color: #93b8f8; margin-bottom: 16px; }

.page-hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.page-hero h1 span { color: #93b8f8; }

.page-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.70);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── HERO (home) ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(46,107,230,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -10%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(46,107,230,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46,107,230,0.2);
  border: 1px solid rgba(46,107,230,0.35);
  color: #93b8f8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  background: #93b8f8;
  border-radius: 50%;
}

.hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero h1 span { color: #93b8f8; }

.hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(46,107,230,0.4);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1a56c9;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(46,107,230,0.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(8px);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-card-icon {
  width: 44px; height: 44px;
  background: rgba(46,107,230,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-icon svg { width: 22px; height: 22px; color: #93b8f8; }

.hero-card-title { font-size: 14px; font-weight: 600; color: var(--white); }
.hero-card-sub   { font-size: 12px; color: rgba(255,255,255,0.45); }

.hero-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.check-icon {
  width: 20px; height: 20px;
  background: rgba(46,107,230,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.check-icon svg { width: 11px; height: 11px; color: #93b8f8; }

.hero-card-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #6ee7b7;
  font-weight: 500;
}

.status-dot::before {
  content: '';
  width: 8px; height: 8px;
  background: #6ee7b7;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(110,231,183,0.2);
}

.uptime-badge {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 24px;
}

.trust-bar-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 500;
}

.trust-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* ── SECTION LAYOUT ── */
section { padding: 96px 24px; }

.container { max-width: 1160px; margin: 0 auto; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 560px;
}

/* ── SERVICES ── */
.services-header { text-align: center; margin-bottom: 64px; }
.services-header .section-desc { margin: 0 auto; }

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

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

a.service-card,
a.industry-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.service-card *,
a.industry-card * {
  text-decoration: none;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #6fa3f7);
  opacity: 0;
  transition: opacity 0.25s;
}

.service-card:hover {
  border-color: #c5d6f7;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card:hover::before { opacity: 1; }

.service-icon-wrap {
  width: 52px; height: 52px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon-wrap svg { width: 26px; height: 26px; color: var(--accent); }

.service-card h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.service-card p  { font-size: 15px; color: var(--text-mid); line-height: 1.7; margin-bottom: 24px; }

.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 5px;
}

/* ── ABOUT (home section) ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-content .section-title { color: var(--white); }
.about-content .section-label { color: #93b8f8; }
.about-content .section-desc  { color: rgba(255,255,255,0.7); margin-bottom: 40px; }

.about-points { display: flex; flex-direction: column; gap: 20px; }

.about-point { display: flex; gap: 16px; }

.about-point-icon {
  width: 38px; height: 38px;
  background: rgba(46,107,230,0.2);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-point-icon svg { width: 18px; height: 18px; color: #93b8f8; }
.about-point h4 { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.about-point p  { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6; }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.why-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.2s;
}

.why-card:hover { background: rgba(255,255,255,0.08); }

.why-card-num  { font-size: 28px; font-weight: 700; color: #93b8f8; line-height: 1; margin-bottom: 8px; }
.why-card h4   { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.why-card p    { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* ── CONTACT FORM ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-info .section-desc { margin-bottom: 40px; }

.contact-items { display: flex; flex-direction: column; gap: 18px; }

.contact-item { display: flex; align-items: center; gap: 14px; }

.contact-item-icon {
  width: 40px; height: 40px;
  background: var(--accent-soft);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg { width: 18px; height: 18px; color: var(--accent); }

.contact-item-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 1px;
}

.contact-item-val { font-size: 15px; font-weight: 500; color: var(--text-main); }

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0b9cc; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,107,230,0.1);
}

.form-group select {
  appearance: none;
  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='%234A5568' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 8px;
}

.form-submit:hover:not(:disabled) {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.form-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.form-note { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 14px; }

.form-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
}

.form-success-icon {
  width: 60px; height: 60px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success-icon svg { width: 28px; height: 28px; color: #059669; }
.form-success h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.form-success p  { font-size: 15px; color: var(--text-mid); }

/* ── INDUSTRIES ── */
.industries-header { text-align: center; margin-bottom: 48px; }
.industries-header .section-label { color: #93b8f8; }
.industries-header .section-title  { color: var(--white); }

.industries-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.industry-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.industry-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(46,107,230,0.4);
  transform: translateY(-3px);
}

.industry-icon {
  width: 52px; height: 52px;
  background: rgba(46,107,230,0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.industry-icon svg { width: 26px; height: 26px; color: #93b8f8; }
.industry-card h3  { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.industry-card p   { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* ── PAGE CTA ── */
.page-cta {
  background: var(--navy);
  padding: 96px 24px;
  text-align: center;
}

.page-cta-inner { max-width: 600px; margin: 0 auto; }

.page-cta .section-label { color: #93b8f8; }

.page-cta h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.page-cta p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 36px;
}

.page-cta .btn-primary { margin: 0 auto; }

/* ── FOOTER ── */
footer {
  background: var(--navy-dark);
  padding: 48px 24px;
}

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

.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-mark { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.footer-logo-text { font-size: 14px; font-weight: 600; color: var(--white); }
.footer-logo-sub  { font-size: 11px; color: rgba(255,255,255,0.4); }

.footer-links { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: rgba(255,255,255,0.85); }

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-grid          { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual        { display: none; }
  .services-grid      { grid-template-columns: 1fr; }
  .about-grid         { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid       { grid-template-columns: 1fr; gap: 48px; }
  .nav-links          { display: none; }
  .nav-toggle         { display: flex; }
  .industries-grid    { grid-template-columns: repeat(2, 1fr); }
  .industries-grid .industry-card:last-child {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  section             { padding: 72px 20px; }
  .form-row           { grid-template-columns: 1fr; }
  .contact-form-wrap  { padding: 28px 20px; }
  .why-grid           { grid-template-columns: 1fr; }
  .hero-stats         { gap: 24px; }
  .trust-bar-inner    { gap: 24px; }
  .footer-inner       { flex-direction: column; align-items: flex-start; }
  .industries-grid    { grid-template-columns: 1fr 1fr; }
  .page-hero          { padding: 120px 20px 64px; }
}

/* ═══════════════════════════════════════════════════════════════
   SUPPORT PORTAL  (sp-* prefix)
   ═══════════════════════════════════════════════════════════════ */

/* ── Login page ─────────────────────────────────────────────── */
.sp-login-bg {
  min-height: 100vh;
  background: linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 55%, #1a3a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sp-login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.sp-login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  text-align: center;
}
.sp-login-logo-mark   { width: 40px; height: 40px; }
.sp-login-logo-text   { font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -0.3px; }
.sp-login-portal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 2px;
}
.sp-login-title    { font-family: 'Lora', Georgia, serif; font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 6px; margin-top: 8px; text-align: center; }
.sp-login-subtitle { font-size: 14px; color: var(--text-mid); text-align: center; margin-bottom: 28px; }

/* ── Portal top bar ─────────────────────────────────────────── */
.sp-topbar {
  height: 60px;
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sp-topbar-brand { display: flex; align-items: center; gap: 10px; }
.sp-topbar-logo-text { font-size: 13px; font-weight: 700; color: var(--white); letter-spacing: -0.2px; }
.sp-topbar-client { font-size: 13px; color: rgba(255,255,255,0.5); margin-left: 4px; }
.sp-topbar-right  { display: flex; align-items: center; gap: 12px; }
.sp-topbar-username { font-size: 13px; color: rgba(255,255,255,0.55); }
.sp-signout-btn {
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.55);
  background: none; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; padding: 5px 12px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Inter', sans-serif;
}
.sp-signout-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }

/* ── Admin sidebar ──────────────────────────────────────────── */
.sp-sidebar {
  width: 220px;
  background: var(--navy-dark);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
  border-right: 1px solid rgba(255,255,255,0.07);
  z-index: 50;
}
.sp-sidebar-logo {
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}
.sp-sidebar-logo-text  { font-size: 14px; font-weight: 700; color: var(--white); letter-spacing: -0.3px; }
.sp-sidebar-logo-sub   { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.sp-sidebar-badge {
  display: inline-block;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
  color: #93b8f8; background: rgba(46,107,230,0.2);
  border: 1px solid rgba(46,107,230,0.35);
  padding: 2px 8px; border-radius: 4px; margin-top: 6px;
}
.sp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left;
  transition: color 0.2s, background 0.2s;
  font-family: 'Inter', sans-serif;
  border-left: 3px solid transparent;
}
.sp-nav-item:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.05); }
.sp-nav-item.active { color: var(--white); background: rgba(255,255,255,0.07); border-left-color: var(--accent); padding-left: 17px; }
.sp-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sp-sidebar-spacer { flex: 1; }
.sp-main { margin-left: 220px; padding: 32px; min-height: 100vh; background: var(--off-white); }

/* ── Portal main content area ───────────────────────────────── */
.sp-content { max-width: 960px; }
.sp-portal-wrap { padding: 28px 24px; max-width: 960px; margin: 0 auto; }

.sp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.sp-page-title { font-size: 20px; font-weight: 700; color: var(--navy); }

.sp-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.sp-filter-select, .sp-filter-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--navy);
  background: var(--white); outline: none;
}
.sp-filter-select:focus, .sp-filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,107,230,0.1);
}
.sp-filter-input { min-width: 200px; }

/* ── Ticket cards (portal list) ─────────────────────────────── */
.sp-ticket-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 10px; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block; text-decoration: none; color: inherit;
}
.sp-ticket-card:hover { border-color: #c5d6f7; box-shadow: 0 2px 12px rgba(46,107,230,0.08); }
.sp-ticket-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sp-ticket-card-title { font-size: 14px; font-weight: 600; color: var(--navy); flex: 1; }
.sp-ticket-badges { display: flex; gap: 6px; flex-shrink: 0; }
.sp-ticket-meta { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Admin tickets table ─────────────────────────────────────── */
.sp-table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sp-table { width: 100%; border-collapse: collapse; }
.sp-table th {
  text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-light); background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.sp-table td { padding: 13px 16px; font-size: 13px; color: var(--navy); border-bottom: 1px solid var(--border); vertical-align: middle; }
.sp-table tr:last-child td { border-bottom: none; }
.sp-table tbody tr { cursor: pointer; transition: background 0.15s; }
.sp-table tbody tr:hover { background: var(--off-white); }
.sp-table tbody tr.selected { background: var(--accent-soft); }

/* ── Status / priority badges ───────────────────────────────── */
.sp-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap; line-height: 1.4;
}
.sp-badge-open        { background: var(--accent-soft); color: var(--accent); }
.sp-badge-in-progress { background: #FEF3C7; color: #D97706; }
.sp-badge-resolved    { background: #D1FAE5; color: #059669; }
.sp-badge-closed      { background: var(--off-white); color: var(--text-light); border: 1px solid var(--border); }
.sp-badge-low         { background: var(--off-white); color: var(--text-mid); border: 1px solid var(--border); }
.sp-badge-normal      { background: var(--accent-soft); color: var(--accent); }
.sp-badge-high        { background: #FEF3C7; color: #D97706; }
.sp-badge-urgent      { background: #FEE2E2; color: #DC2626; }

/* ── Ticket detail ──────────────────────────────────────────── */
.sp-detail-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.sp-detail-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.sp-detail-title { font-size: 19px; font-weight: 700; color: var(--navy); flex: 1; line-height: 1.3; }
.sp-detail-meta { font-size: 12px; color: var(--text-light); margin-bottom: 20px; display: flex; gap: 16px; flex-wrap: wrap; }
.sp-detail-desc {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 14px; color: var(--text-mid); line-height: 1.75;
  margin-bottom: 28px; white-space: pre-wrap;
}
.sp-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-light); margin-bottom: 16px;
}

/* ── Comment thread ─────────────────────────────────────────── */
.sp-comments { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.sp-comment { display: flex; gap: 12px; }
.sp-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0;
  text-transform: uppercase;
}
.sp-avatar.admin { background: rgba(13,27,62,0.1); color: var(--navy); }
.sp-comment-body { flex: 1; }
.sp-comment-meta { font-size: 12px; color: var(--text-light); margin-bottom: 5px; }
.sp-comment-meta strong { color: var(--navy); font-weight: 600; }
.sp-comment-text {
  font-size: 14px; color: var(--text-main); line-height: 1.65;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; white-space: pre-wrap;
}
.sp-comment.internal .sp-comment-text {
  background: #FFFBEB; border-color: #FCD34D; border-left: 3px solid #F59E0B;
}
.sp-internal-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: #D97706; margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
}

/* ── Comment type toggle ────────────────────────────────────── */
.sp-type-toggle {
  display: inline-flex; border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden; margin-bottom: 10px;
}
.sp-type-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  border: none; background: var(--white); color: var(--text-mid);
  cursor: pointer; transition: background 0.15s, color 0.15s;
  font-family: 'Inter', sans-serif;
}
.sp-type-btn.active { background: var(--navy); color: var(--white); }

/* ── Status select (admin) ──────────────────────────────────── */
.sp-status-select {
  padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  background: var(--white); cursor: pointer;
  font-family: 'Inter', sans-serif; outline: none;
}
.sp-status-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,107,230,0.1); }

/* ── Reply / new ticket form ────────────────────────────────── */
.sp-reply-form { border-top: 1px solid var(--border); padding-top: 20px; }
.sp-textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--navy); line-height: 1.6;
  resize: vertical; min-height: 100px; outline: none; box-sizing: border-box;
  background: var(--white);
}
.sp-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,107,230,0.1); }

/* New ticket panel */
.sp-new-ticket-panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px;
}
.sp-new-ticket-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.sp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sp-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.sp-form-group label { font-size: 13px; font-weight: 600; color: var(--navy); }
.sp-input, .sp-select {
  padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--navy); outline: none; background: var(--white);
  width: 100%; box-sizing: border-box;
}
.sp-input:focus, .sp-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,107,230,0.1); }
.sp-form-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ── Back button ────────────────────────────────────────────── */
.sp-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  cursor: pointer; background: none; border: none; padding: 0;
  margin-bottom: 20px; font-family: 'Inter', sans-serif; text-decoration: none;
}
.sp-back-btn:hover { text-decoration: underline; }

/* ── Stats bar (admin) ──────────────────────────────────────── */
.sp-stats-bar { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sp-stat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; flex: 1; min-width: 120px;
}
.sp-stat-num   { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1; }
.sp-stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ── Empty state ────────────────────────────────────────────── */
.sp-empty { text-align: center; padding: 60px 24px; color: var(--text-light); }
.sp-empty svg   { width: 40px; height: 40px; color: var(--border); margin: 0 auto 14px; display: block; }
.sp-empty h3    { font-size: 15px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.sp-empty p     { font-size: 13px; }

/* ── Loading spinner ────────────────────────────────────────── */
.sp-loading { text-align: center; padding: 60px; color: var(--text-light); font-size: 14px; }

/* ── Error / success messages ───────────────────────────────── */
.sp-error   { background: #FEE2E2; border: 1px solid #FCA5A5; color: #DC2626; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }
.sp-success { background: #D1FAE5; border: 1px solid #6EE7B7; color: #059669; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }

/* ── Admin split layout ─────────────────────────────────────── */
.sp-split { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.sp-split-left, .sp-split-right { min-width: 0; }

/* ── Divider ────────────────────────────────────────────────── */
.sp-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Timeline Events ───────────────────────────────────────── */
.sp-timeline-event {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 12px; color: var(--text-light);
  border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px;
  position: relative;
}
.sp-timeline-dot {
  position: absolute; left: -5px; width: 8px; height: 8px;
  background: var(--border); border-radius: 50%;
}
.sp-timeline-text { flex: 1; color: var(--text-mid); }
.sp-timeline-time { white-space: nowrap; font-size: 11px; }

/* ── Client Tabs ───────────────────────────────────────────── */
.sp-tab {
  background: none; border: none; padding: 10px 20px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-family: Inter, sans-serif; transition: color 0.15s, border-color 0.15s;
}
.sp-tab:hover { color: var(--text-main); }
.sp-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Back Button ───────────────────────────────────────────── */
.sp-back-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none;
  border: none; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--accent); padding: 0; font-family: Inter, sans-serif;
}
.sp-back-btn:hover { text-decoration: underline; }

/* ── Loading Skeletons ──────────────────────────────────────── */
@keyframes sp-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.sp-skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #eef2f8 37%, var(--border) 63%);
  background-size: 800px 100%;
  animation: sp-shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.sp-skeleton-row   { height: 14px; margin-bottom: 12px; }
.sp-skeleton-title { height: 18px; width: 55%; margin-bottom: 16px; }
.sp-skeleton-card  { height: 80px; border-radius: var(--radius); margin-bottom: 12px; }
.sp-skeleton-stat  { height: 72px; border-radius: var(--radius); }
.sp-skeleton-wrap  { padding: 32px 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sp-sidebar          { display: none; }
  .sp-main             { margin-left: 0; padding: 20px 16px; }
  .sp-split            { grid-template-columns: 1fr; }
  .sp-filter-input     { min-width: 140px; }
}
@media (max-width: 600px) {
  .sp-login-card       { padding: 32px 24px; }
  .sp-form-row         { grid-template-columns: 1fr; }
  .sp-stats-bar        { gap: 10px; }
}
