/* ========================================
   Next International TR - Auth Styles
   Modern, animated, tech-inspired design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-800: #1e293b;
    --dark-700: #334155;
    --dark-600: #475569;
    --gray: #94a3b8;
    --light: #e2e8f0;
    --white: #ffffff;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(99, 102, 241, 0.15);
    --glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== Animated Background ========== */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 50%, #0f172a 100%);
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-2%, 2%) rotate(1deg); }
    66% { transform: translate(2%, -1%) rotate(-1deg); }
}

/* Floating particles */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* Grid lines background */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Glowing orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.12);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(6, 182, 212, 0.1);
    bottom: -15%;
    left: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(139, 92, 246, 0.08);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(15px, 30px) scale(1.05); }
}

/* ========== Auth Container ========== */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== Glass Card ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--glow),
                0 25px 50px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

/* ========== Logo & Header ========== */
.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 8px 48px rgba(99, 102, 241, 0.5); }
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white), var(--light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--gray);
    font-size: 14px;
    margin-top: 6px;
    font-weight: 400;
}

/* ========== Form Elements ========== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-600);
    font-size: 16px;
    transition: color 0.3s;
    z-index: 1;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 14px 50px 14px 48px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-control::placeholder {
    color: var(--dark-600);
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control:focus ~ i:not(.toggle-password i) {
    color: var(--primary-light);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-600);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
    z-index: 2;
    padding: 4px;
    line-height: 1;
}

.input-wrapper .toggle-password:hover {
    color: var(--primary-light);
}

/* Row for name fields */
.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

/* ========== Links & Extras ========== */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.form-footer label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    cursor: pointer;
}

.form-footer input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--dark-600);
    border-radius: 5px;
    background: rgba(30, 41, 59, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.form-footer input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-footer input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.form-footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

.form-footer a:hover {
    color: var(--accent);
}

.auth-switch {
    text-align: center;
    margin-top: 28px;
    color: var(--gray);
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-switch a:hover {
    color: var(--accent);
}

/* ========== Divider ========== */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--dark-600);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(99, 102, 241, 0.1);
}

/* ========== Alert Messages ========== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlide 0.4s ease;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.alert-info {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #67e8f9;
}

/* ========== Loading Spinner ========== */
.btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn.loading .spinner {
    display: block;
}

.btn.loading span {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Password Strength ========== */
.password-strength {
    margin-top: 8px;
    height: 3px;
    border-radius: 2px;
    background: rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.password-strength .bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.password-strength .bar.weak { width: 33%; background: var(--danger); }
.password-strength .bar.medium { width: 66%; background: var(--warning); }
.password-strength .bar.strong { width: 100%; background: var(--success); }

.password-hint {
    font-size: 12px;
    color: var(--dark-600);
    margin-top: 6px;
}

/* ========== License Code Input ========== */
.form-control.license-input {
    font-family: 'Courier New', Consolas, monospace;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 600;
}

/* ========== Admin Container ========== */
.admin-container {
    max-width: 580px;
}

/* ========== Checkbox Grid (packages) ========== */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    color: var(--light);
}

.checkbox-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
}

.checkbox-card input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid var(--dark-600);
    border-radius: 5px;
    background: rgba(30, 41, 59, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.checkbox-card input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-card input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
}

.checkbox-card span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== Generated Code Display ========== */
.code-result {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.code-display {
    flex: 1;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #6ee7b7;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    user-select: all;
    text-align: center;
}

.btn-copy {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

/* ========== Select Styling ========== */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

select.form-control option {
    background: var(--dark-800);
    color: var(--white);
}

/* ========== Responsive ========== */
@media (max-width: 520px) {
    .glass-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .auth-logo h1 {
        font-size: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .code-display {
        font-size: 14px;
        letter-spacing: 2px;
    }
}

/* ========== Dashboard Styles ========== */
.dashboard-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.dashboard-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.dashboard-nav .nav-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dashboard-nav .nav-brand h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.dashboard-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-nav .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 14px;
}

.dashboard-nav .user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.btn-logout {
    padding: 8px 16px;
    font-size: 13px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

/* Dashboard Content */
.dashboard-content {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradientSlide 3s linear infinite;
}

@keyframes gradientSlide {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.welcome-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-card p {
    color: var(--gray);
    font-size: 15px;
}

/* Package Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.package-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.package-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 18px;
}

.package-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.package-card p {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.package-card .card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.status-locked {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px;
    }

    .dashboard-nav {
        padding: 0 16px;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        padding: 28px 20px;
    }

    .welcome-card h2 {
        font-size: 22px;
    }
}

/* ========== Clickable Package Cards ========== */
a.package-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.package-card.clickable {
    cursor: pointer;
}

a.package-card.clickable:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.card-action {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s;
}

a.package-card.clickable:hover .card-action {
    opacity: 1;
    transform: translateX(0);
}

/* ========== Breadcrumb ========== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb-bar a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-bar a:hover {
    color: var(--accent);
}

.breadcrumb-bar .sep {
    color: var(--dark-600);
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
}

/* ========== Funnel Cards Grid ========== */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.funnel-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.funnel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.funnel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.funnel-card-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.funnel-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.funnel-badge.aktif {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.funnel-badge.pasif {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.funnel-card-body p {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 14px;
    line-height: 1.5;
}

.funnel-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.funnel-url-row > i {
    color: var(--primary-light);
    font-size: 13px;
    flex-shrink: 0;
}

.funnel-url-text {
    flex: 1;
    font-size: 13px;
    color: var(--gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.funnel-url-text strong {
    color: var(--primary-light);
}

.funnel-url-copy {
    background: rgba(99, 102, 241, 0.15);
    border: none;
    color: var(--primary-light);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.funnel-url-copy:hover {
    background: rgba(99, 102, 241, 0.25);
}

.funnel-url-copy.copied {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.funnel-info-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
}

.funnel-info-row i {
    width: 14px;
    text-align: center;
    margin-right: 4px;
    font-size: 12px;
}

.funnel-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 8px;
}

.funnel-meta i {
    width: 16px;
    text-align: center;
    color: var(--gray);
}

.funnel-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: nowrap;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-accent {
    background: rgba(6, 182, 212, 0.15);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.btn-accent:hover {
    background: rgba(6, 182, 212, 0.25);
}

.btn-success-sm {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success-sm:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-warning-sm {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-warning-sm:hover {
    background: rgba(245, 158, 11, 0.25);
}

/* ========== Data Table ========== */
.glass-table {
    width: 100%;
    border-collapse: collapse;
}

.glass-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

.glass-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    color: var(--light);
}

.glass-table tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.glass-table .status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.status-yeni {
    background: rgba(6, 182, 212, 0.15);
    color: #67e8f9;
}

.status-iletisimde {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.status-kapatildi {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* ========== Glass Modal ========== */
.glass-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glass-modal-overlay.active {
    display: flex;
}

.glass-modal {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.glass-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.glass-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.modal-field {
    margin-bottom: 16px;
}

.modal-field label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 4px;
    font-weight: 500;
}

.modal-field .field-value {
    font-size: 14px;
    color: var(--light);
}

/* ========== Toast Notifications ========== */
.toast-container {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.4s ease;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.toast-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.toast.toast-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.toast.toast-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #67e8f9;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(30px); }
}

/* ========== Lead Status Select ========== */
.lead-durum-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--light);
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 130px;
}

.lead-durum-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.lead-durum-select option {
    background: var(--dark);
    color: var(--light);
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 20px;
}

/* ========== Template/Image Picker ========== */
.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.picker-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    aspect-ratio: 16/9;
}

.picker-item:hover {
    border-color: var(--primary);
}

.picker-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.picker-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--white);
}

.picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picker-item .picker-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 11px;
    text-align: center;
    color: var(--light);
}

/* Gradient template preview */
.picker-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--white);
}

/* ========== Toggle Switch ========== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--dark-600);
    border-radius: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ========== Section Header ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* ========== Textarea ========== */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
    padding-top: 12px;
}

/* ========== Funnel Type Selection ========== */
.funnel-type-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--glass-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.funnel-type-option:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.funnel-type-option.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.funnel-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.funnel-type-check {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.funnel-type-option.active .funnel-type-check {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ========== Funnel URL Input ========== */
.funnel-url-input {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.funnel-url-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.funnel-url-prefix {
    padding: 12px 2px 12px 16px;
    font-size: 14px;
    color: var(--gray);
    white-space: nowrap;
    user-select: none;
    font-family: 'Courier New', monospace;
}

.funnel-url-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary-light);
    font-size: 14px;
    padding: 12px 16px 12px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    font-weight: 600;
}

.funnel-url-input input::placeholder {
    color: rgba(148, 163, 184, 0.4);
    font-weight: 400;
}

/* ========== URL Preview ========== */
.funnel-url-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 12px;
    font-size: 14px;
    color: var(--light);
    margin-top: 12px;
    animation: slideUp 0.3s ease;
}

.funnel-url-preview strong {
    color: var(--accent);
    word-break: break-all;
}

/* ========== Funnel Responsive ========== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .funnel-grid {
        grid-template-columns: 1fr;
    }

    .funnel-card-actions {
        flex-direction: column;
    }

    .btn-sm {
        justify-content: center;
    }

    .glass-table {
        font-size: 13px;
    }

    .glass-table th,
    .glass-table td {
        padding: 10px 12px;
    }

    .picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    #funnelForm > div {
        grid-template-columns: 1fr !important;
    }
}

/* ========== Module Pages (Google Ads, Meta Ads) ========== */
.module-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
}

.module-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.module-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--light);
    margin: 0;
}

.module-header p {
    font-size: 14px;
    color: var(--gray);
    margin: 4px 0 0;
}

/* Tabs */
.module-tabs {
    display: flex;
    gap: 4px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
}

.module-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.module-tab:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.05);
}

.module-tab.active {
    background: var(--primary);
    color: white;
}

.module-tab-content {
    display: none;
}

.module-tab-content.active {
    display: block;
}

/* Card Title */
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Guide Steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 4px;
}

.guide-step p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

.guide-step a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Budget Grid */
.budget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.budget-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.budget-card.featured {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.03);
}

.budget-level {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 8px;
}

.budget-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 16px;
}

.budget-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.budget-card ul li {
    font-size: 13px;
    color: var(--gray);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-card ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--success);
}

.budget-card ul li:last-child {
    border-bottom: none;
}

/* Concepts Grid */
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.concept-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.concept-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.concept-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.concept-item h4 i {
    color: var(--primary-light);
    font-size: 14px;
}

.concept-item p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.tip-item.warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
}

.tip-item.success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
}

.tip-item > i {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.tip-item.warning > i { color: var(--warning); }
.tip-item.success > i { color: var(--success); }

.tip-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 4px;
}

.tip-item p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.video-card {
    padding: 0 !important;
    overflow: hidden;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--light);
    padding: 16px 20px 4px;
}

.video-card p {
    font-size: 13px;
    color: var(--gray);
    padding: 0 20px 16px;
    line-height: 1.5;
}

/* ========== AI Chat ========== */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.10));
    border-bottom: 1px solid var(--glass-border);
}

.ai-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.ai-chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--light);
    margin: 0;
}

.ai-chat-header p {
    font-size: 12px;
    color: var(--gray);
    margin: 2px 0 0;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--dark-700);
    border-radius: 3px;
}

/* AI Message */
.ai-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.ai-message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px 14px 14px 14px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--light);
    line-height: 1.7;
    max-width: 80%;
}

.ai-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message-content li {
    margin-bottom: 4px;
    color: var(--gray);
}

.ai-message-content strong {
    color: var(--primary-light);
}

/* User Message */
.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-message-content {
    background: var(--primary);
    color: white;
    border-radius: 14px 4px 14px 14px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 70%;
}

/* Typing Indicator */
.typing-indicator .ai-message-content {
    display: flex;
    gap: 4px;
    padding: 16px 24px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
    animation: dotPulse 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 60%, 100% { transform: scale(0.6); opacity: 0.4; }
    30% { transform: scale(1); opacity: 1; }
}

/* Chat Input */
.ai-chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
}

.ai-quick-questions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ai-quick-btn {
    padding: 6px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ai-quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.08);
}

.ai-chat-form {
    display: flex;
    gap: 10px;
}

.ai-chat-form input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-form input::placeholder {
    color: var(--dark-600);
}

.ai-chat-form input:focus {
    border-color: var(--primary);
}

.ai-chat-form button {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-chat-form button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.ai-chat-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Module page responsive */
@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .module-tabs {
        flex-direction: column;
    }

    .budget-grid {
        grid-template-columns: 1fr;
    }

    .budget-card.featured {
        transform: none;
    }

    .concepts-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat-container {
        height: 500px;
    }

    .ai-message-content,
    .user-message-content {
        max-width: 90%;
    }

    .ai-quick-questions {
        display: none;
    }
}

/* ========================================
   App Store Buttons
   ======================================== */

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px 28px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
    color: var(--white);
}

.store-btn svg {
    flex-shrink: 0;
}

.store-btn div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.store-btn small {
    font-size: 11px;
    color: var(--gray);
}

.store-btn strong {
    font-size: 16px;
    font-weight: 600;
}

/* Spin animation for loading */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .store-buttons {
        flex-direction: column;
        align-items: center;
    }
    .store-btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
    text-align: center;
    padding: 32px 0 24px;
    color: var(--dark-700);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 auto;
}

.site-footer p {
    margin: 0 0 2px;
    color: var(--dark-600);
    font-weight: 500;
}

.site-footer small {
    color: var(--dark-700);
    font-size: 11px;
    opacity: 0.7;
}

/* ========================================
   AI Content Generator
   ======================================== */

/* Category Buttons */
.content-category-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.content-cat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.content-cat-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--light);
    background: rgba(245, 158, 11, 0.08);
}

.content-cat-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.content-cat-btn i {
    font-size: 14px;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.template-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
    color: var(--light);
}

.template-btn:hover {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.template-btn i {
    font-size: 22px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.template-btn div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.template-btn strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--light);
}

.template-btn small {
    font-size: 11px;
    color: var(--gray);
}

/* Copy Content Button (inside AI messages) */
.copy-content-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    float: right;
}

.copy-content-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

.copy-content-btn.copied {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

/* AI Daily Limit Badge */
.ai-daily-limit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6ee7b7;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-daily-limit i {
    font-size: 12px;
}

.ai-daily-limit.low {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.ai-daily-limit.exhausted {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .content-category-grid {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .ai-daily-limit {
        display: none;
    }
}
