/* ============================================
   Reputix — Brand Design System
   Dual theme (dark/light), modern gradients,
   vibrant accents, Satoshi + DM Sans typography
   ============================================ */

/* ---- Dark Theme (default) ---- */
html[data-theme="dark"],
:root {
    --rx-dark: #0a0a0f;
    --rx-dark-card: #12121a;
    --rx-dark-surface: #1a1a25;
    --rx-dark-border: #2a2a3a;
    --rx-accent: #6c5ce7;
    --rx-accent-light: #a29bfe;
    --rx-accent-glow: rgba(108, 92, 231, 0.3);
    --rx-success: #00b894;
    --rx-warning: #fdcb6e;
    --rx-danger: #e17055;
    --rx-text: #f0f0f5;
    --rx-text-muted: #8a8a9a;
    --rx-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --rx-gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    --rx-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --rx-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --rx-noise-opacity: 0.03;
}

/* ---- Light Theme ---- */
html[data-theme="light"] {
    --rx-dark: #f8f9fc;
    --rx-dark-card: #ffffff;
    --rx-dark-surface: #f0f1f5;
    --rx-dark-border: #e2e4ea;
    --rx-accent: #6c5ce7;
    --rx-accent-light: #6c5ce7;
    --rx-accent-glow: rgba(108, 92, 231, 0.15);
    --rx-success: #00a884;
    --rx-warning: #e6a817;
    --rx-danger: #d63031;
    --rx-text: #1a1a2e;
    --rx-text-muted: #6b7280;
    --rx-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --rx-gradient-dark: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
    --rx-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --rx-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --rx-noise-opacity: 0.02;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-in {
    animation: fadeInUp 0.6s ease both;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ---- Base ---- */
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--rx-dark);
    color: var(--rx-text);
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--rx-noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .section-title, .stat-number {
    font-family: 'Satoshi', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    color: var(--rx-accent-light);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--rx-accent);
}

html[data-theme="dark"] a:hover {
    color: #fff;
}

/* ---- Navbar ---- */
.navbar-rx {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rx-dark-border);
    padding: 1rem 0;
    transition: background-color 0.3s, border-color 0.3s;
}

html[data-theme="light"] .navbar-rx {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-rx .navbar-brand {
    font-family: 'Satoshi', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

html[data-theme="light"] .navbar-rx .navbar-brand {
    color: var(--rx-text);
}

.navbar-rx .navbar-brand span {
    background: var(--rx-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-rx .nav-link {
    color: var(--rx-text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.navbar-rx .nav-link:hover,
.navbar-rx .nav-link.active {
    color: var(--rx-text);
    background: var(--rx-dark-surface);
}

html[data-theme="dark"] .navbar-rx .nav-link:hover,
html[data-theme="dark"] .navbar-rx .nav-link.active {
    color: #fff;
}

/* Theme toggle button */
.btn-theme-toggle {
    background: var(--rx-dark-surface);
    border: 1px solid var(--rx-dark-border);
    color: var(--rx-text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    font-size: 1rem;
}
.btn-theme-toggle:hover {
    color: var(--rx-accent-light);
    border-color: var(--rx-accent);
    background: var(--rx-accent-glow);
}

/* ---- Buttons ---- */
.btn-rx {
    background: var(--rx-gradient);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px var(--rx-accent-glow);
}
.btn-rx:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--rx-accent-glow);
    color: #fff;
}
.btn-rx-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.btn-rx-outline {
    background: transparent;
    border: 2px solid var(--rx-dark-border);
    color: var(--rx-text);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: none;
}
.btn-rx-outline:hover {
    border-color: var(--rx-accent);
    color: var(--rx-accent-light);
    background: rgba(108, 92, 231, 0.05);
}

/* ---- Cards ---- */
.card-rx {
    background: var(--rx-dark-card);
    border: 1px solid var(--rx-dark-border);
    border-radius: 16px;
    box-shadow: var(--rx-shadow);
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card-rx .card-header {
    background: var(--rx-dark-surface);
    border-bottom: 1px solid var(--rx-dark-border);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.5rem;
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    color: var(--rx-text);
    transition: background-color 0.3s, border-color 0.3s;
}

/* ---- Forms ---- */
.form-control-rx,
.form-select-rx {
    background: var(--rx-dark-surface);
    border: 1px solid var(--rx-dark-border);
    color: var(--rx-text);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}
.form-control-rx:focus,
.form-select-rx:focus {
    background: var(--rx-dark-surface);
    border-color: var(--rx-accent);
    color: var(--rx-text);
    box-shadow: 0 0 0 3px var(--rx-accent-glow);
}
.form-control-rx::placeholder {
    color: var(--rx-text-muted);
}
.form-label-rx {
    color: var(--rx-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ---- Hero Section ---- */
.hero-section {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--rx-accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-section > * {
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.hero-title .highlight {
    background: var(--rx-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--rx-text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ---- Feature Cards ---- */
.feature-card {
    background: var(--rx-dark-card);
    border: 1px solid var(--rx-dark-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--rx-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.15);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.feature-card h5 {
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.feature-card p {
    color: var(--rx-text-muted);
    font-size: 0.95rem;
}

/* ---- Stats ---- */
.stat-box {
    text-align: center;
    padding: 1.5rem;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--rx-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    color: var(--rx-text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ---- Badge ---- */
.badge-rx {
    background: var(--rx-dark-surface);
    border: 1px solid var(--rx-dark-border);
    color: var(--rx-accent-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}
.badge-rx-success {
    background: rgba(0, 184, 148, 0.1);
    border-color: rgba(0, 184, 148, 0.3);
    color: var(--rx-success);
}
.badge-rx-warning {
    background: rgba(253, 203, 110, 0.1);
    border-color: rgba(253, 203, 110, 0.3);
    color: var(--rx-warning);
}
.badge-rx-danger {
    background: rgba(225, 112, 85, 0.1);
    border-color: rgba(225, 112, 85, 0.3);
    color: var(--rx-danger);
}

/* ---- Section ---- */
.section-rx {
    padding: 5rem 0;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--rx-text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ---- Footer ---- */
.footer-rx {
    background: var(--rx-dark-card);
    border-top: 1px solid var(--rx-dark-border);
    padding: 2rem 0;
    color: var(--rx-text-muted);
    font-size: 0.9rem;
    transition: background-color 0.3s, border-color 0.3s;
}

/* ---- Pricing Cards ---- */
.pricing-card {
    background: var(--rx-dark-card);
    border: 1px solid var(--rx-dark-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}
.pricing-card.featured {
    border-color: var(--rx-accent);
    box-shadow: 0 0 30px var(--rx-accent-glow);
}
.pricing-card .price {
    font-family: 'Satoshi', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0;
}
.pricing-card .price span {
    font-size: 1rem;
    color: var(--rx-text-muted);
    font-weight: 400;
}
.pricing-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}
.pricing-card ul li {
    padding: 0.5rem 0;
    color: var(--rx-text-muted);
    border-bottom: 1px solid var(--rx-dark-border);
}
.pricing-card ul li::before {
    content: '✓';
    color: var(--rx-success);
    margin-right: 0.75rem;
    font-weight: 700;
}

/* ---- Alert overrides ---- */
.alert-rx-success {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    color: var(--rx-success);
    border-radius: 12px;
}
.alert-rx-danger {
    background: rgba(225, 112, 85, 0.1);
    border: 1px solid rgba(225, 112, 85, 0.3);
    color: var(--rx-danger);
    border-radius: 12px;
}
.alert-rx-info {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--rx-accent-light);
    border-radius: 12px;
}
.alert-rx-warning {
    background: rgba(253, 203, 110, 0.1);
    border: 1px solid rgba(253, 203, 110, 0.3);
    color: var(--rx-warning);
    border-radius: 12px;
}

/* ---- Dashboard specific ---- */
.dashboard-stat {
    background: var(--rx-dark-card);
    border: 1px solid var(--rx-dark-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: background-color 0.3s, border-color 0.3s;
}
.dashboard-stat .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--rx-accent-glow);
    color: var(--rx-accent-light);
}

/* ---- Table overrides ---- */
.table-rx {
    color: var(--rx-text);
}
.table-rx thead th {
    background: var(--rx-dark-surface);
    border-bottom: 1px solid var(--rx-dark-border);
    color: var(--rx-text-muted);
    font-family: 'Satoshi', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table-rx tbody td {
    border-bottom: 1px solid var(--rx-dark-border);
    padding: 1rem 0.75rem;
    vertical-align: middle;
}
.table-rx tbody tr:hover {
    background: var(--rx-dark-surface);
}

/* ---- Pagination ---- */
.page-link {
    background: var(--rx-dark-card);
    border-color: var(--rx-dark-border);
    color: var(--rx-text-muted);
    transition: all 0.2s;
}
.page-link:hover {
    background: var(--rx-dark-surface);
    border-color: var(--rx-accent);
    color: var(--rx-accent-light);
}
.page-item.active .page-link {
    background: var(--rx-accent);
    border-color: var(--rx-accent);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}
@media (max-width: 767.98px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-rx {
        padding: 3rem 0;
    }
    .btn-rx-lg {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }
}
