/* ============================================================
   InCruises Travel Club — Main Stylesheet
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors */
    --primary: #003087;
    --primary-light: #004db3;
    --primary-dark: #002060;
    --color-navy-deep: #003087;
    --color-navy-mid: #004db3;
    --color-ocean: #0066cc;
    --color-sky: #4da6ff;
    --color-telegram: #0088cc;

    /* Accent Colors */
    --secondary: #c9a84c;
    --color-gold: #c9a84c;
    --color-gold-light: #e8c96a;
    --color-gold-dark: #a8872a;

    /* Semantic Colors */
    --success: #28a745;
    --success-light: #eaf3de;
    --warning: #ffc107;
    --warning-light: #faeeda;
    --danger: #dc3545;
    --danger-light: #fef2f2;
    --info: #17a2b8;

    /* Neutral Colors */
    --text: #1a1a2e;
    --text-muted: #8a9bb0;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --border: #f0f4f8;
    --border-light: #f1f5f9;

    /* Typography */
    --font-base: 18px;
    --font-heading: "Montserrat", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-code: "JetBrains Mono", "Fira Code", monospace;

    /* Type Scale */
    --text-xs: 14px;
    --text-sm: 16px;
    --text-md: 18px;
    --text-lg: 20px;
    --text-xl: 24px;
    --text-2xl: 30px;
    --text-3xl: 36px;
    --text-4xl: 48px;
    --text-5xl: 60px;
    --text-6xl: 72px;

    /* Line Heights */
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.6;
    --leading-loose: 1.8;

    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.05em;
    --tracking-wider: 0.1em;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Gradients */
    --gradient-hero: linear-gradient(
        135deg,
        #003087 0%,
        #0066cc 50%,
        #4da6ff 100%
    );
    --gradient-navy: linear-gradient(180deg, #003087 0%, #004db3 100%);
    --gradient-gold: linear-gradient(135deg, #c9a84c 0%, #e8c96a 100%);
    --gradient-overlay: linear-gradient(
        180deg,
        rgba(0, 48, 135, 0.9) 0%,
        rgba(0, 48, 135, 0.7) 100%
    );

    /* Shadows (navy-tinted) */
    --shadow-sm: 0 1px 3px rgba(0, 48, 135, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 48, 135, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 48, 135, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 48, 135, 0.18);
    --shadow-gold: 0 4px 15px rgba(201, 168, 76, 0.35);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --header-height: 72px;
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary);
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
    margin: 0;
}

h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
}
h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
}
h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
}
h4 {
    font-size: var(--text-xl);
    font-weight: 600;
}
h5 {
    font-size: var(--text-lg);
    font-weight: 500;
}
h6 {
    font-size: var(--text-md);
    font-weight: 500;
}

p {
    margin: 0 0 1em;
    line-height: var(--leading-normal);
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    
}

.logo {
    display: flex;
    margin-right: auto;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary) !important;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
}


/* Navigation */
.nav {
    grid-column: 2;
    justify-self: center;
}
.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    grid-column: 2;
    justify-self: center;
}

.nav-link {
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}
.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}
.nav-link:hover {
    color: var(--primary);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link-join {
    padding: 8px 20px;
    background: #00c853;
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
}
.nav-link-join:hover {
    background: #00e676 !important;
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.45);
    transform: translateY(-1px);
}
.nav-link-join::after {
    display: none;
}
.nav-link-telegram {
    padding: 8px 20px;
    background: var(--color-telegram);
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link-telegram:hover {
    background: #0077b5 !important;
}
.nav-link-telegram::after {
    display: none;
}
.nav-link-logout {
    color: var(--danger) !important;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center !important;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text);
}
.mobile-menu-btn:hover {
    background: var(--bg);
}
.menu-icon-close {
    display: none;
}
.mobile-menu-btn.active .menu-icon-open {
    display: none;
}
.mobile-menu-btn.active .menu-icon-close {
    display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding-top: var(--header-height);
    min-height: calc(100vh - 200px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}
.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center !important;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
}
.social-link:hover {
    background: var(--primary-light);
    color: white;
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8125rem;
    opacity: 0.6;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #003087, #0066cc);
    color: white;
    overflow: hidden;
    position: relative;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Hero Lead Form */
.hero-form {
    margin-top: 20px;
    max-width: 500px;
}
.hero-form-row {
    display: flex;
    gap: 8px;
}
.hero-form-input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9375rem;
    font-family: "Inter", sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.hero-form-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
.hero-form-input:focus {
    border-color: rgba(255, 255, 255, 0.7);
}
.hero-form-btn {
    padding: 14px 28px;
    border-radius: 40px;
    flex-shrink: 0;
    font-size: 0.9375rem;
}
.hero-form-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
    color: white;
}
.hero-title-highlight {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 520px;
}

.hero-ctas {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Hero visual / illustration */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center !important;
}
.hero-illustration {
    position: relative;
    width: 320px;
    height: 320px;
}
.hero-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    animation: float 3s ease-in-out infinite;
}
.hero-card-1 {
    top: 20%;
    left: 0;
    animation-delay: 0s;
}
.hero-card-2 {
    top: 50%;
    right: 0;
    animation-delay: 1s;
}
.hero-card-3 {
    bottom: 10%;
    left: 15%;
    animation-delay: 2s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat-item {
    padding: var(--space-lg);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: var(--space-md);
    position: relative;
}
.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
}

/* ===== FEATURES ===== */
.features {
    padding: var(--space-3xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}
.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center !important;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ===== PLANS / PRICING ===== */
.plans {
    padding: var(--space-3xl) 0;
    background: var(--bg);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

.plan-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}
.plan-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.plan-featured {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
    z-index: 1;
}
.plan-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.plan-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.plan-badge-popular {
    background: var(--primary);
    color: white;
}

.plan-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.plan-price {
    margin-bottom: var(--space-lg);
}

.price-amount {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary);
}

.price-period {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.plan-features {
    text-align: left;
    margin-bottom: var(--space-xl);
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 0.875rem;
    color: var(--text);
}
.plan-features li i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.plan-features li i[data-lucide="check"] {
    color: var(--success);
}
.plan-features li i[data-lucide="x"] {
    color: var(--danger);
}

.plan-btn {
    width: 100%;
}

/* ===== FAQ ===== */
.faq {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-white);
    text-align: left;
    transition: background var(--transition-fast);
}
.faq-question:hover {
    background: var(--bg);
}

.faq-icon {
    transition: transform var(--transition-base);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height var(--transition-slow),
        padding var(--transition-slow);
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 var(--space-lg) var(--space-lg);
}
.faq-answer p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ===== CTA ===== */
.cta-section {
    padding: var(--space-3xl) 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    color: white;
}
.cta-box h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: var(--space-md);
}
.cta-box p {
    font-size: 1.0625rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center !important;
    flex-wrap: wrap;
}

/* ===== REFERRAL SECTION ===== */
.referral-section {
    padding: var(--space-2xl) 0;
}

.ref-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-xl);
    align-items: center;
}

.ref-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.ref-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.ref-link-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.ref-link {
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--primary);
    background: var(--bg);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    word-break: break-all;
}

.qr-container {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center !important;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
}
.qr-container img {
    border-radius: var(--radius-sm);
}

.qr-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center !important;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary-dark);
    border: 2px solid var(--secondary);
}
.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: 2px solid var(--danger);
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 2px solid transparent;
}
.btn-ghost:hover {
    background: var(--bg);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.0625rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(27, 108, 168, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-error {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: var(--space-xs);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ===== CARD COMPONENT ===== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* ===== STAT CARDS (Dashboard) ===== */
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center !important;
    flex-shrink: 0;
}

.stat-card-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard,
.team-page,
.earnings-page,
.admin-panel {
    padding: var(--space-xl) 0;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.dash-title {
    font-size: 1.75rem;
}

.dash-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.dash-actions {
    display: flex;
    gap: var(--space-sm);
}

.dash-section {
    margin-bottom: var(--space-xl);
}

.dash-section-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* ===== RANK CARD ===== */
.rank-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.rank-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-md);
}

.rank-current {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.rank-next {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.rank-bar {
    height: 10px;
    background: var(--bg);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.rank-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    transition: width var(--transition-slow);
}

.rank-labels {
    display: flex;
    justify-content: center;
}

.rank-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.rank-label.active {
    color: var(--primary);
    font-weight: 700;
}

/* ===== CHARTS ===== */
.dash-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.chart-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.chart-title {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    color: var(--text);
}

/* ===== PENDING CARD ===== */
.pending-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.pending-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
}
.pending-info i {
    color: var(--warning);
}

/* ===== TEAM PAGE ===== */
.team-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.team-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
}

.team-stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.team-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Team filters */
.team-filters,
.earnings-filters {
    display: flex;
    align-items: end;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 160px;
}

.filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

/* Tree container */
.tree-container {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 400px;
    padding: var(--space-lg);
    overflow-x: auto;
}

.tree-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center !important;
    gap: var(--space-md);
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* ===== EARNINGS PAGE ===== */
.earnings-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.earnings-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
}

.earnings-stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}
.earnings-total .earnings-stat-value {
    color: var(--primary);
}
.earnings-month .earnings-stat-value {
    color: var(--success);
}
.earnings-pending .earnings-stat-value {
    color: var(--warning);
}

.earnings-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg);
}

.table-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(15, 76, 117, 0.1);
    color: var(--primary);
}
.badge-success {
    background: rgba(74, 222, 128, 0.1);
    color: #16a34a;
}
.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}
.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== ADMIN PANEL ===== */
.admin-login {
    max-width: 420px;
    margin: var(--space-3xl) auto;
}

.admin-login-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.admin-login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.admin-login-header h1 {
    font-size: 1.5rem;
    margin-top: var(--space-md);
}
.admin-login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.admin-tab {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    background: none;
}
.admin-tab:hover {
    color: var(--text);
}
.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-panel-tab {
    display: none;
}
.admin-panel-tab.active {
    display: block;
}

.knowledge-form {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}
.knowledge-form h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

/* ===== CHAT WIDGET ===== */
.chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center !important;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition-base);
    animation: chatPulse 2s ease-in-out infinite;
}
.chat-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
    animation: none;
}
.chat-btn.open {
    background: var(--danger);
    animation: none;
}
.chat-btn.open:hover {
    background: #dc2626;
}

/* Pulsing animation for chat button */
@keyframes chatPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(0, 102, 204, 0);
    }
}

.chat-icon-open {
    display: none;
}
.chat-btn.open .chat-icon-closed {
    display: none;
}
.chat-btn.open .chat-icon-open {
    display: block;
}

.chat-notif {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center !important;
    display: none;
}
.chat-notif.show {
    display: flex;
}

/* ===== Telegram Float Button ===== */
.telegram-float {
    position: fixed;
    right: 24px;
    bottom: 140px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-telegram);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
    z-index: 999;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
    font-size: 1.35rem;
}
.telegram-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 136, 204, 0.5);
    color: white;
}
.telegram-float-tooltip {
    position: absolute;
    right: 64px;
    background: var(--color-dark);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.telegram-float:hover .telegram-float-tooltip {
    opacity: 1;
}
@media (max-width: 768px) {
    .telegram-float {
        right: 14px;
        bottom: 120px;
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
    .telegram-float-tooltip {
        display: none;
    }
}

/* Chat invitation popup */
.chat-invitation {
    position: fixed;
    bottom: 96px;
    right: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-md);
    max-width: 280px;
    z-index: 997;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-invitation.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
.chat-invitation::after {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--bg-white);
}
.chat-invitation-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.chat-invitation-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center !important;
    flex-shrink: 0;
}
.chat-invitation-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text);
}
.chat-invitation-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center !important;
    transition: all var(--transition-fast);
}
.chat-invitation-close:hover {
    background: var(--bg);
    color: var(--text);
}

.chat-box {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-height: 560px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
}
.chat-box.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--primary);
    color: white;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center !important;
}

.chat-info {
    flex: 1;
}
.chat-name {
    font-weight: 600;
    font-size: 0.9375rem;
}
.chat-status {
    font-size: 0.75rem;
    opacity: 0.8;
}
.chat-status::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--success);
    margin-right: 6px;
    vertical-align: middle;
}

.chat-close {
    color: rgba(255, 255, 255, 0.8);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.chat-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: 350px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}
.message.bot {
    align-self: flex-start;
}
.message.user {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.6;
}
.message.bot .message-bubble {
    background: var(--bg);
    border-bottom-left-radius: 4px;
}
.message.user .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}
.message.user .message-time {
    text-align: right;
}

/* Stars row */
.stars-row {
    display: flex;
    gap: 4px;
    margin-top: var(--space-sm);
}
.star {
    cursor: pointer;
    color: var(--border);
    transition: color var(--transition-fast);
}
.star.lit {
    color: var(--warning);
}

/* Typing indicator */
.typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.typing span {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--text-muted);
    animation: typing 1.5s infinite;
}
.typing span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.chat-input-row {
    display: flex;
    align-items: end;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}

#chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 0.875rem;
    resize: none;
    max-height: 120px;
    font-family: var(--font-body);
    background: transparent;
}

#chat-send {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center !important;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}
#chat-send:hover {
    background: var(--primary-light);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideInRight var(--transition-base);
    max-width: 360px;
}
.toast.toast-success {
    border-left: 3px solid var(--success);
}
.toast.toast-error {
    border-left: 3px solid var(--danger);
}
.toast.toast-info {
    border-left: 3px solid var(--secondary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== SKELETON LOADERS ===== */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 25%,
        var(--bg) 50%,
        var(--border) 75%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}
.skeleton-text:last-child {
    width: 60%;
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 180px;
    border-radius: var(--radius-lg);
}

.skeleton-row {
    height: 40px;
    width: 100%;
    margin-bottom: 4px;
}

.skeleton-tree {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 480px;
    width: calc(100% - 2rem);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    float: right;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
}
.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-icon {
    text-align: center;
    margin-bottom: var(--space-md);
}

.modal-title {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: var(--space-md);
}

.modal-body {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.modal-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center !important;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}
.text-muted {
    color: var(--text-muted);
}
.text-primary {
    color: var(--primary);
}
.text-success {
    color: var(--success);
}
.text-warning {
    color: var(--warning);
}
.text-danger {
    color: var(--danger);
}

.font-heading {
    font-family: var(--font-heading);
}

.mt-0 {
    margin-top: 0;
}
.mt-sm {
    margin-top: var(--space-sm);
}
.mt-md {
    margin-top: var(--space-md);
}
.mt-lg {
    margin-top: var(--space-lg);
}
.mt-xl {
    margin-top: var(--space-xl);
}

.mb-0 {
    margin-bottom: 0;
}
.mb-sm {
    margin-bottom: var(--space-sm);
}
.mb-md {
    margin-bottom: var(--space-md);
}
.mb-lg {
    margin-bottom: var(--space-lg);
}
.mb-xl {
    margin-bottom: var(--space-xl);
}

.p-0 {
    padding: 0;
}
.p-sm {
    padding: var(--space-sm);
}
.p-md {
    padding: var(--space-md);
}
.p-lg {
    padding: var(--space-lg);
}
.p-xl {
    padding: var(--space-xl);
}

.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.items-center {
    align-items: center;
}
.justify-center {
    justify-content: center !important;
}
.justify-between {
    justify-content: center;
}
.gap-sm {
    gap: var(--space-sm);
}
.gap-md {
    gap: var(--space-md);
}
.gap-lg {
    gap: var(--space-lg);
}

.grid {
    display: grid;
}
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.hidden {
    display: none;
}

.w-full {
    width: 100%;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== RESPONSIVE ===== */

/* Tablet (768px–1024px) */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-ctas {
        justify-content: center !important;
    }
    .hero-illustration {
        display: none;
    }
    .hero-title {
        font-size: 2.75rem;
    }

    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .plan-featured {
        transform: none;
    }
    .plan-featured:hover {
        transform: translateY(-4px);
    }

    .dash-stats,
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile (<768px) */
@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* Mobile nav */
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        padding: var(--space-md);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-base);
        z-index: 999;
    }
    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .nav-link {
        display: block;
        padding: 12px 16px;
        width: 100%;
        border-radius: var(--radius-sm);
    }
    .nav-link::after {
        display: none;
    }
    .nav-link-login {
        text-align: center;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Plans */
    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Dashboard */
    .dash-stats,
    .admin-stats,
    .team-stats {
        grid-template-columns: 1fr 1fr;
    }

    .dash-charts {
        grid-template-columns: 1fr;
    }

    .earnings-summary {
        grid-template-columns: 1fr;
    }

    .team-filters,
    .earnings-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Chat */
    .chat-box {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 88px;
        max-height: 70vh;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-visual {
        display: none;
    }

    /* Ref box */
    .ref-box {
        grid-template-columns: 1fr;
    }

    .admin-login {
        padding: 0 var(--space-md);
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Small mobile (<480px) */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .dash-stats,
    .admin-stats,
    .team-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== REFERRAL PROMO ===== */
.ref-promo-banner {
    background: linear-gradient(135deg, #0f4c75 0%, #1b6ca8 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    color: #fff;
}
.ref-promo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ref-promo-icon {
    font-size: 2rem;
}
.ref-promo-left h3 {
    margin: 0 0 4px;
    font-size: 1.125rem;
    font-family: "DM Sans", sans-serif;
}
.ref-promo-left p {
    margin: 0;
    font-size: 0.8125rem;
    opacity: 0.85;
}
.ref-promo-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ref-promo-input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.875rem;
    min-width: 260px;
    outline: none;
}
.ref-promo-input::selection {
    background: rgba(255, 255, 255, 0.3);
}
.ref-social-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 4px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Referral Featured Section */
.referral-featured {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #e8f4fd 100%);
}
.ref-featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.ref-featured-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}
.ref-featured-card h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}
.ref-featured-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 20px;
}
.ref-featured-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.ref-link-row-big {
    display: flex;
    gap: 8px;
    max-width: 100%;
}
.ref-link-input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
}
.ref-link-input:focus {
    border-color: var(--primary);
}
.ref-social-row {
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.qr-image-wrapper {
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.qr-image {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    display: block;
}
.qr-hint {
    font-size: 0.75rem !important;
    color: var(--text-muted);
    margin-top: 8px !important;
}
.ref-perks {
    display: flex;
    justify-content: center !important;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.ref-perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}
.ref-perk-icon {
    font-size: 1.25rem;
}
.cta-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .ref-featured-grid {
        grid-template-columns: 1fr;
    }
    .ref-promo-banner {
        flex-direction: column;
        text-align: center;
    }
    .ref-promo-right {
        width: 100%;
    }
    .ref-promo-input {
        flex: 1;
        min-width: 0;
    }
    .ref-perks {
        gap: 16px;
    }
}

/* ============================================================
   DISTINCTIVE DESIGN — Ocean Voyager Theme
   Applied via frontend-design skill
   ============================================================ */

/* --- Noise texture overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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: 256px 256px;
}

/* --- Hero with parallax depth --- */
/* Hero Lead Form */
.hero-form {
    margin-top: 20px;
    max-width: 500px;
}
.hero-form-row {
    display: flex;
    gap: 8px;
}
.hero-form-input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9375rem;
    font-family: "Inter", sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.hero-form-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
.hero-form-input:focus {
    border-color: rgba(255, 255, 255, 0.7);
}
.hero-form-btn {
    padding: 14px 28px;
    border-radius: 40px;
    flex-shrink: 0;
    font-size: 0.9375rem;
}
.hero-form-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    text-align: left;
}

/* --- Parallax hero cards --- */
.hero-illustration {
    position: relative;
}
.hero-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    animation: cardFloat 6s ease-in-out infinite;
    white-space: nowrap;
}
.hero-card-1 {
    top: 0;
    right: 10%;
    animation-delay: 0s;
}
.hero-card-2 {
    top: 40%;
    right: -10%;
    animation-delay: 1.5s;
}
.hero-card-3 {
    top: 70%;
    right: 15%;
    animation-delay: 3s;
}
@keyframes cardFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- Wave dividers --- */
/* --- Reveal animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.visible > *:nth-child(1) {
    transition-delay: 0s;
    opacity: 1;
    transform: translateY(0);
}
.stagger-children.visible > *:nth-child(2) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}
.stagger-children.visible > *:nth-child(3) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateY(0);
}
.stagger-children.visible > *:nth-child(4) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

/* --- Stats section --- */
.stats-section {
    background: var(--bg);
    position: relative;
    z-index: 2;
}
.stat-item {
    position: relative;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Feature cards with glass hover --- */
.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-3deg);
}

/* --- Plan cards with depth --- */
.plan-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    background: var(--bg-white);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.plan-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.plan-card:hover::after {
    opacity: 1;
}
.plan-featured {
    border: 2px solid var(--primary);
    box-shadow: 0 8px 30px rgba(15, 76, 117, 0.12);
    transform: translateY(-8px);
}
.plan-featured:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px rgba(15, 76, 117, 0.18);
}
.plan-badge-popular {
    background: linear-gradient(135deg, var(--warning), #f59e0b) !important;
    color: #1a1a2e !important;
    font-weight: 700;
}

/* --- Button with ripple --- */
.btn {
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.2),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.btn:hover::after {
    opacity: 1;
}

/* --- FAQ with plus/minus animation --- */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item:hover {
    border-color: var(--primary-light);
}
.faq-item.open {
    border-color: var(--primary);
}
.faq-question {
    background: var(--bg-white);
    width: 100%;
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    transition: color 0.3s;
}
.faq-item.open .faq-question {
    color: var(--primary);
}
.faq-icon {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 var(--space-lg);
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 var(--space-lg) var(--space-lg);
}
.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- CTA section with glow --- */
.cta-box {
    background: linear-gradient(135deg, #0a2a4a 0%, #0f4c75 50%, #1b6ca8 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.cta-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 30% 50%,
        rgba(251, 191, 36, 0.12) 0%,
        transparent 60%
    );
    z-index: 1;
}
.cta-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    z-index: 2;
}
.cta-box > * {
    position: relative;
    z-index: 3;
}
.cta-box h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: var(--space-md);
}
.cta-box p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

/* --- Dashboard stat cards with gradient accents --- */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 76, 117, 0.06), transparent);
    transform: translate(20px, -30px);
    pointer-events: none;
}

/* --- Dashboard referral banner --- */
.ref-promo-banner {
    background: linear-gradient(
        135deg,
        #0a2a4a 0%,
        #0f4c75 40%,
        #1b6ca8 80%
    ) !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.ref-promo-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 80% 50%,
        rgba(251, 191, 36, 0.1) 0%,
        transparent 50%
    );
    z-index: 1;
}
.ref-promo-banner > * {
    position: relative;
    z-index: 2;
}

/* --- Glassmorphism sections --- */
.referral-featured {
    position: relative;
    overflow: hidden;
}
.referral-featured::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.08), transparent);
    pointer-events: none;
}
.ref-featured-card {
    position: relative;
    overflow: hidden;
}
.ref-featured-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.6;
}

/* --- Scroll animation JS helper --- */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .hero-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
/* Mobile: 320px - 767px */
@media (max-width: 767px) {
    :root {
        --font-base: 16px;
        --text-4xl: 32px;
        --text-5xl: 40px;
        --text-6xl: 48px;
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --font-base: 17px;
        --text-4xl: 40px;
        --text-5xl: 50px;
        --text-6xl: 60px;
    }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
    :root {
        --font-base: 18px;
    }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher-float {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
}
.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--color-grey-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--color-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}
.lang-switcher-btn:hover,
.lang-switcher-btn.open {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.25);
}
.lang-flag {
    font-size: 1.125rem;
}
.lang-name {
    font-weight: 500;
}
.lang-chev {
    font-size: 0.625rem;
    opacity: 0.5;
    margin-left: 2px;
    transition: transform 0.2s;
}
.lang-switcher-btn.open .lang-chev {
    transform: rotate(180deg);
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid var(--color-grey-light);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.25s;
    min-width: 180px;
}
.lang-dropdown.show {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}
.lang-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--color-dark);
    transition: background 0.15s;
}
.lang-opt:hover {
    background: var(--color-light-blue);
}
.lang-opt.active {
    background: var(--color-light-blue);
    font-weight: 600;
}

/* FIX ship images on small screens */
@media (max-width: 1400px) {
    .nc-img {
        height: auto !important;
        object-fit: contain !important;
    }

    .nc {
        height: auto !important;
        overflow: visible !important;
    }
}
