/* === Dark Theme (global when <body class="theme-dark">) === */
:root{
  /* Calmer red family */
  --accent:#c62828;         /* base */
  --accent-600:#b71c1c;     /* hover/active */
  --accent-300:#d84343;     /* links/hover accents */
  --accent-rgb:198,40,40;

  /* Base surfaces & text */
  --bg-0:#121212;           /* page */
  --bg-1:#1a1a1a;           /* body */
  --bg-2:#222;              /* cards, modals, dropdowns, inputs */
  --fg-0:#f1f3f5;           /* body text */
  --fg-1:#e1e1e1;           /* headings / strong */
  --muted:#b3b3b3;          /* secondary text, form-text */
  --border:#2f2f2f;
}

body.theme-dark{
  background:var(--bg-1);
  color:var(--fg-0);
}

/* Links */
body.theme-dark a{ color:var(--accent-300); }
body.theme-dark a:hover{ color:var(--accent); }

/* Text helpers */
body.theme-dark .text-muted,
body.theme-dark small,
body.theme-dark .form-text{ color:var(--muted)!important; }

/* Navbar & Footer */
body.theme-dark .navbar{ background:#161616!important; border-color:var(--border)!important; }
body.theme-dark .navbar .navbar-brand,
body.theme-dark .navbar .nav-link{ color:var(--fg-0)!important; }
body.theme-dark .navbar .nav-link:hover{ color:var(--accent-300)!important; }

body.theme-dark .footer{ background:#161616; color:var(--muted); }
body.theme-dark .footer a{ color:var(--accent-300); }

/* Cards, dropdowns, modals, list items */
body.theme-dark .card,
body.theme-dark .dropdown-menu,
body.theme-dark .modal-content,
body.theme-dark .list-group-item{
  background:var(--bg-2);
  color:var(--fg-0);
  border-color:var(--border);
}
body.theme-dark .dropdown-menu .dropdown-item{ color:var(--fg-0); }
body.theme-dark .dropdown-menu .dropdown-item:hover{ background:#2f2f2f; color:var(--fg-0); }
body.theme-dark .modal-header,
body.theme-dark .modal-footer{ border-color:var(--border); }

/* Forms */
body.theme-dark .form-control,
body.theme-dark .form-select{
  color:var(--fg-0);
  background:#2a2a2a;
  border-color:var(--border);
}
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus{
  color:var(--fg-0);
  background:#2a2a2a;
  border-color:#3a3a3a;
  box-shadow:0 0 0 .2rem rgba(255,255,255,.05);
}
body.theme-dark ::placeholder{ color:#9aa0a6; opacity:1; }
body.theme-dark .input-group-text{
  color:var(--fg-0);
  background:#2a2a2a;
  border-color:var(--border);
}
body.theme-dark .form-check-input{
  background:#2a2a2a; border-color:var(--border);
}
body.theme-dark .form-check-input:checked{
  background:var(--accent); border-color:var(--accent);
}

/* Buttons */
body.theme-dark .btn-primary{ background:var(--accent); border-color:var(--accent); }
body.theme-dark .btn-primary:hover{ background:var(--accent-600); border-color:var(--accent-600); }
body.theme-dark .btn-outline-secondary{ color:var(--fg-0); border-color:#6c757d; }
body.theme-dark .btn-outline-secondary:hover{ background:#6c757d; color:#000; }

/* Tables */
body.theme-dark .table{
  color:var(--fg-0);
  border-color:var(--border);
}
body.theme-dark .table > :not(caption) > * > *{
  background-color:transparent;
  border-color:var(--border);
}
body.theme-dark .table thead th{
  color:var(--fg-0);
  background:#202020;
  border-bottom-color:var(--border);
}
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd){ background-color:rgba(255,255,255,.03); }
body.theme-dark .table-hover tbody tr:hover{ background-color:rgba(255,255,255,.05); }

/* Alerts */
body.theme-dark .alert{ color:var(--fg-0); border-color:var(--border); }
body.theme-dark .alert-danger{ background:rgba(var(--accent-rgb),.15); border-color:rgba(var(--accent-rgb),.4); }
body.theme-dark .alert-success{ background:rgba(16,185,129,.15); border-color:rgba(16,185,129,.4); }
body.theme-dark .alert-warning{ background:rgba(245,158,11,.15); border-color:rgba(245,158,11,.4); }

/* Spinners & progress text */
body.theme-dark .spinner-border{ color:var(--muted); }

/* Borders / hr */
body.theme-dark hr,
body.theme-dark .border,
body.theme-dark .border-top,
body.theme-dark .border-bottom{ border-color:var(--border)!important; }

/* Badges in user menu */
body.theme-dark .badge.text-bg-secondary{ background:#495057!important; color:#fff!important; }

/* Optional: make “brand red” fallback consistent anywhere it appears */
.brand-mark{ color:var(--accent)!important; }

/* Make <code> readable on dark bg */
body.theme-dark code {
  color: #ffb86c;
  background: #2a2a2a;
  padding: .125rem .25rem;
  border-radius: .25rem;
}

/* Section wrappers: slightly lighter than page bg */
body.theme-dark .section-card{
  background:#202020;
  border:1px solid var(--border);
  border-radius:.5rem;
}
body.theme-dark .section-title{
  color:var(--accent);
  font-weight:700;
}

/* Force table text to be bright on dark backgrounds */
body.theme-dark .table,
body.theme-dark .table thead th,
body.theme-dark .table tbody td,
body.theme-dark .table tfoot td,
body.theme-dark .table tfoot th {
  color: #f8f9fa !important; /* bright white-ish */
}

/* Keep striped rows subtle but readable */
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255,255,255,.04);
}

/* Code chips stay readable (you already added similar) */
body.theme-dark code {
  color: #ffb86c;
  background: #2a2a2a;
  padding: .125rem .25rem;
  border-radius: .25rem;
}

/* Ensure progress text is visible in the modal */
#confirmModal .modal-title,
#confirmModal .modal-body,
#confirmModal #progressSection,
#confirmModal #confirmSection,
#confirmModal #progressFooter,
#confirmModal #progressList li{
  color:#f1f3f5; /* readable on dark */
}


* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    color: var(--text-primary);
    background: var(--primary);
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 51, 51, 0.05);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 51, 51, 0.03);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}
.hero-content { position: relative; z-index: 2; animation: slideInUp 0.8s ease-out; }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; }
.hero p { font-size: 1.25rem; margin-bottom: 2rem; color: var(--text-secondary); line-height: 1.6; }

.btn-primary-hero {
    background: var(--accent); color: var(--primary); border: none;
    padding: 0.75rem 2rem; font-weight: 600; border-radius: 0.5rem;
    transition: all 0.3s ease; margin-right: 1rem; margin-bottom: 0.5rem;
}
.btn-primary-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 51, 51, 0.4); background: var(--accent-light); }
.btn-secondary-hero {
    background: transparent; color: var(--accent); border: 2px solid var(--accent);
    padding: 0.75rem 2rem; font-weight: 600; border-radius: 0.5rem;
    transition: all 0.3s ease; margin-bottom: 0.5rem;
}
.btn-secondary-hero:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }

/* Animations */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(20px); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Benefits Section */
.benefits-section { padding: 80px 0; background: var(--primary); }
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; color: var(--text-primary); }
.section-title .highlight { color: var(--accent); }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 3rem; max-width: 600px; }
.benefit-card {
    background: var(--card-dark); padding: 2rem; border-radius: 0.75rem; border-left: 4px solid var(--accent);
    transition: all 0.3s ease; height: 100%; animation: fadeInScale 0.6s ease-out both;
}
.benefit-card:hover { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(255, 51, 51, 0.2); border-left-color: var(--accent-light); background: #2d2d2d; }
.benefit-icon {
    width: 50px; height: 50px; background: rgba(255, 51, 51, 0.15); border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent);
    margin-bottom: 1rem; transition: all 0.3s ease;
}
.benefit-card:hover .benefit-icon { background: var(--accent); color: var(--primary); transform: rotate(10deg) scale(1.1); }
.benefit-card h5 { font-weight: 700; margin-bottom: 0.75rem; color: var(--text-primary); }
.benefit-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0; }

/* RBI Compliance Section */
.rbi-section { padding: 80px 0; background: var(--primary); }
.rbi-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.rbi-list { list-style: none; }
.rbi-list li {
    padding: 1rem 0; border-bottom: 1px solid var(--border-color); display: flex; gap: 1rem; animation: slideInLeft 0.6s ease-out both;
}
.rbi-list li:last-child { border-bottom: none; }
.rbi-check {
    width: 24px; height: 24px; background: var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--primary);
    font-weight: bold; flex-shrink: 0; margin-top: 2px;
}
.rbi-list p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }
.rbi-title { color: var(--accent); font-weight: 700; margin-bottom: 0.25rem; }
.rbi-image {
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.1) 0%, rgba(255, 51, 51, 0.05) 100%);
    border: 2px solid var(--border-color); border-radius: 1rem; padding: 3rem;
    display: flex; align-items: center; justify-content: center; min-height: 400px; animation: fadeInScale 0.8s ease-out;
}
.rbi-image-content { text-align: center; }
.rbi-image-icon { font-size: 4rem; color: var(--accent); margin-bottom: 1rem; }
.rbi-badge {
    background: var(--accent); color: var(--primary); padding: 0.5rem 1rem; border-radius: 2rem;
    font-size: 0.85rem; font-weight: 600; display: inline-block; margin-top: 1rem;
}

/* Process Section */
.process-section { padding: 80px 0; background: var(--primary); }
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem; }
.step-card {
    background: var(--card-dark); padding: 2.5rem; border-radius: 0.75rem; text-align: center; position: relative;
    animation: fadeInScale 0.6s ease-out both; border: 1px solid var(--border-color);
}
.step-card:hover { background: #2d2d2d; border-color: var(--accent); box-shadow: 0 8px 24px rgba(255, 51, 51, 0.15); }
.step-number {
    width: 60px; height: 60px; background: var(--accent); color: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 800; margin: 0 auto 1.5rem; transition: all 0.3s ease;
}
.step-card:hover .step-number { transform: scale(1.1); background: var(--accent-light); }
.step-card h4 { font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }
.step-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.arrow-connector { display: none; position: absolute; right: -2rem; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.5rem; }

/* Features Grid */
.features-section { padding: 80px 0; background: var(--primary); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
.feature-item {
    text-align: center; animation: fadeInScale 0.6s ease-out both; padding: 2rem; background: var(--card-dark);
    border-radius: 0.75rem; border: 1px solid var(--border-color); transition: all 0.3s ease;
}
.feature-item:hover { background: #2d2d2d; border-color: var(--accent); box-shadow: 0 8px 24px rgba(255, 51, 51, 0.15); }
.feature-icon { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; transition: all 0.3s ease; }
.feature-item:hover .feature-icon { transform: scale(1.15) rotate(5deg); }
.feature-item h5 { font-weight: 700; margin-bottom: 0.75rem; color: var(--text-primary); }
.feature-item p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0; }

/* CTA Section */
.cta-section {
    padding: 80px 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; text-align: center; position: relative; overflow: hidden; border-top: 2px solid var(--accent);
}
.cta-section::before {
    content: ''; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px;
    background: rgba(255, 51, 51, 0.05); border-radius: 50%; animation: float 8s ease-in-out infinite;
}
.cta-content { position: relative; z-index: 2; }
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.cta-section p { font-size: 1.1rem; margin-bottom: 2.5rem; color: var(--text-secondary); }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary {
    background: var(--accent); color: var(--primary); border: none; padding: 0.85rem 2.5rem; font-weight: 600;
    border-radius: 0.5rem; transition: all 0.3s ease; cursor: pointer;
}
.btn-cta-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255, 51, 51, 0.4); background: var(--accent-light); }
.btn-cta-secondary {
    background: transparent; color: var(--accent); border: 2px solid var(--accent);
    padding: 0.85rem 2.5rem; font-weight: 600; border-radius: 0.5rem; transition: all 0.3s ease; cursor: pointer;
}
.btn-cta-secondary:hover { background: var(--accent); color: var(--primary); transform: translateY(-3px); }

/* Responsive + wide layout tweaks */
@media (min-width: 1200px) {
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .arrow-connector { display: block; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 1.75rem; }
    .rbi-content { grid-template-columns: 1fr; }
    .btn-primary-hero { margin-right: 0.5rem; }
    .cta-buttons { flex-direction: column; }
    .btn-cta-primary, .btn-cta-secondary { width: 100%; }
}

/* Equal-width hero buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Set a consistent desktop width; center text */
.hero-actions .btn-hero {
    width: 240px;          /* adjust to taste (220–280px works well) */
    text-align: center;
}

/* On mobile/tablet, make each button full width for clean stacking */
@media (max-width: 768px) {
    .hero-actions .btn-hero {
        width: 100%;
    }
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}