:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #42506b;
  --border: #e2e8f0;
  --soft: #f8fafc;
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(2,6,23,0.08);
  --radius: 14px;
  color-scheme: light;
  
  /* Light theme header/footer colors */
  --header-bg: #0f172a;
  --header-text: #ffffff;
  --header-border: #1e293b;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-muted: #94a3b8;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --card: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #233047;
  --soft: #0b1220; 
  --accent: #60a5fa; 
  --accent-2: #38bdf8;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  color-scheme: dark;
  
  /* Dark theme keeps default header/footer */
  --header-bg: color-mix(in oklab, var(--bg) 86%, transparent);
  --header-text: var(--text);
  --header-border: var(--border);
  --footer-bg: transparent;
  --footer-text: var(--text);
  --footer-muted: var(--muted);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 80% -20%, rgba(37,99,235,0.10), transparent 40%),
              radial-gradient(1200px 800px at -20% 10%, rgba(14,165,233,0.10), transparent 40%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; color: var(--header-text); }

.brand-badge {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; font-weight: 700; box-shadow: var(--shadow);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

header .fine {
  color: var(--footer-muted);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px; border: none;
  background: transparent; color: var(--text); 
  font-weight: 600; cursor: pointer;
  transition: transform .05s ease, background .2s ease, color .2s ease;
  user-select: none;
}

header .btn {
  color: var(--header-text);
}

.btn:hover { 
  transform: translateY(-1px); 
  text-decoration: none; 
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  color: var(--accent);
}

header .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: color-mix(in oklab, var(--accent) 40%, var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 90%, #000), color-mix(in oklab, var(--accent-2) 90%, #000));
  color: #fff;
}

.theme-toggle {
  width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

header .theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
  background: var(--card);
}

header .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Theme Toggle Switch */
.theme-toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.theme-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--muted);
  border-radius: 30px;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: var(--bg);
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-checkbox:checked + .theme-slider {
  background: var(--accent);
}

.theme-checkbox:checked + .theme-slider::before {
  transform: translateX(30px);
}

.theme-icon {
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}

.theme-icon.sun {
  opacity: 1;
}

.theme-icon.moon {
  opacity: 0.5;
}

.theme-checkbox:checked ~ .theme-slider .theme-icon.sun {
  opacity: 0.5;
}

.theme-checkbox:checked ~ .theme-slider .theme-icon.moon {
  opacity: 1;
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }

@media (max-width: 920px) { 
  .hero-grid { grid-template-columns: 1fr; }
  .nav-actions { gap: 6px; }
  .btn { padding: 10px 14px; font-size: 14px; }
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in oklab, var(--accent) 10%, var(--card));
  color: var(--text); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
}

h1 { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; margin: 14px 0 12px; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 24px 0 16px; }
h3 { font-size: 18px; margin: 12px 0 8px; }

.sub { color: var(--muted); font-size: 16px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }

.statbar {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 16px;
  color: var(--muted); font-size: 14px;
}

.statbar span { 
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; 
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); 
}

.card {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px;
}

/* Sections */
section { padding: 28px 0; }
.section-title { font-size: 22px; margin: 0 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 920px) { 
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.list {
  display: grid; gap: 10px; list-style: none; margin: 0; padding: 0;
}

.list li { display: flex; gap: 10px; align-items: flex-start; }

.badge { 
  display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 999px; 
  background: color-mix(in oklab, var(--accent) 12%, var(--card)); 
  border: 1px solid var(--border); 
}

/* Tables */
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); }
th { background: color-mix(in oklab, var(--accent) 8%, var(--card)); font-size: 14px; }
tbody tr:hover { background: color-mix(in oklab, var(--accent) 6%, var(--card)); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 14%, var(--card)), color-mix(in oklab, var(--accent-2) 10%, var(--card)));
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

@media (max-width: 720px) { 
  .cta-band { flex-direction: column; align-items: stretch; }
}

/* Footer */
footer { 
  padding: 32px 0 64px; 
  background: var(--footer-bg);
  color: var(--footer-text);
}

footer .brand {
  color: var(--footer-text);
}

footer a {
  color: var(--footer-text);
}

footer a:hover {
  color: var(--accent);
}

footer strong {
  color: var(--footer-text);
}

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; }

@media (max-width: 920px) { 
  .footer-grid { grid-template-columns: 1fr; }
}

.fine { font-size: 12px; color: var(--muted); }

footer .fine {
  color: var(--footer-muted);
}

/* Utility */
.ok { color: var(--success); }
.warn { color: var(--warning); }
.no { color: var(--danger); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Page Content */
.page-content { padding: 48px 0; }

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header h1 {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Testimonials */
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.quote-icon {
  font-size: 64px;
  color: color-mix(in oklab, var(--accent) 20%, transparent);
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 20px;
}

.testimonial-content {
  padding-left: 40px;
}

.testimonial-text {
  font-size: 16px;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.testimonial-author strong {
  display: block;
  font-size: 16px;
}

/* Highlight Card */
.highlight-card {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 12%, var(--card)), color-mix(in oklab, var(--accent-2) 10%, var(--card)));
}

/* Stats Banner */
.stat-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .stat-banner { grid-template-columns: 1fr; }
}

.stat-item {
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* Contact Page */
.contact-info {
  display: grid;
  gap: 24px;
}

.contact-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-item h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.contact-item p {
  margin: 4px 0;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}

.faq-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item h3 {
  color: var(--accent);
  margin-bottom: 8px;
}

/* Portal Page */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 48px;
}

@media (max-width: 920px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

.portal-info h1 {
  margin-top: 12px;
  margin-bottom: 12px;
}

.portal-features {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}

.feature-item h3 {
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 16px;
}

.feature-item p {
  margin: 0;
}

.portal-login-card {
  position: sticky;
  top: 80px;
}

.portal-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-weight: 600;
  font-size: 14px;
}

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.text-link:hover {
  text-decoration: underline;
}

.form-message {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.portal-divider {
  margin: 24px 0;
  text-align: center;
  position: relative;
}

.portal-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.portal-divider span {
  position: relative;
  background: var(--card);
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.portal-signup {
  margin-top: 16px;
}

/* RCC Companies Section */
.rcc-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.rcc-company-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rcc-company-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(2,6,23,0.12);
}

.rcc-company-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rcc-company-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 18px;
}

.rcc-company-details {
  display: grid;
  gap: 8px;
}

.rcc-company-details p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.rcc-company-details strong {
  color: var(--text);
  font-weight: 600;
}

.rcc-company-details a {
  color: var(--accent);
  text-decoration: none;
}

.rcc-company-details a:hover {
  text-decoration: underline;
}

/* RCC Profile Page */
.rcc-profile-header {
  margin-bottom: 32px;
}

.breadcrumb {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.breadcrumb:hover {
  opacity: 0.8;
  text-decoration: none;
}

.profile-info-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.profile-info-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-info-item strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-info-item p {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--success) 10%, var(--card));
  border: 1px solid color-mix(in oklab, var(--success) 20%, var(--border));
}

.status-indicator.active {
  color: var(--success);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

