/* =========================================
   NexLingo Base Styles & Variables
   ========================================= */
:root {
    /* Light Mode (Landing & Checkout) */
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    
    /* Dark Mode (Admin) */
    --admin-bg: #0f172a;
    --admin-card: #1e293b;
    --admin-border: #334155;
    --admin-text: #f8fafc;
    --admin-text-muted: #94a3b8;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-family); }
body { background: var(--color-bg); color: var(--color-text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* =========================================
   Utility Classes & Layout
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.bg-alt { background: var(--color-bg-alt); }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* =========================================
   Buttons & Forms
   ========================================= */
.btn { 
    display: inline-block; padding: 0.75rem 1.5rem; 
    border-radius: 6px; font-weight: 600; cursor: pointer; 
    transition: all 0.2s; border: none; text-align: center; 
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background: rgba(79, 70, 229, 0.05); }
.btn-block { display: block; width: 100%; }

.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; }
.form-control { 
    width: 100%; padding: 0.75rem 1rem; border-radius: 6px; 
    border: 1px solid var(--color-border); font-size: 1rem; 
    outline: none; transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--color-primary); }

/* =========================================
   Landing Page Components
   ========================================= */
/* Navbar */
.navbar { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); background: var(--color-bg); position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; color: var(--color-text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--color-text); }

/* Hero */
.hero { padding: 8rem 0; background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%); }
.hero h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 1.5rem; }
.hero p { font-size: 1.25rem; color: var(--color-text-muted); margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; }

/* Sections */
.section { padding: 6rem 0; }
.section-title { margin-bottom: 4rem; }
.section-title h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.5px; }

/* Cards */
.card { background: white; border: 1px solid var(--color-border); border-radius: 12px; padding: 2rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: transform 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

.step-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

.pricing-card { display: flex; flex-direction: column; }
.pricing-card .price { font-size: 3rem; font-weight: 800; color: var(--color-primary); margin: 1.5rem 0; }
.pricing-card ul { list-style: none; margin-bottom: 2rem; flex-grow: 1; }
.pricing-card li { margin-bottom: 0.75rem; color: var(--color-text-muted); padding-left: 1.5rem; position: relative; }
.pricing-card li::before { content: '✓'; position: absolute; left: 0; color: var(--color-primary); font-weight: bold; }

.testimonial-card .stars { color: #fbbf24; margin-bottom: 1rem; font-size: 1.2rem; }
.testimonial-card p { font-style: italic; margin-bottom: 1.5rem; color: var(--color-text-muted); }
.testimonial-card .author { font-weight: 600; }

/* Footer */
.footer { background: var(--color-text); color: white; padding: 4rem 0 2rem; text-align: center; }
.footer p { color: var(--color-text-muted); margin-top: 1rem; }

/* =========================================
   Admin Panel (Premium Dark Glassmorphism Theme)
   ========================================= */
.admin-body {
    --admin-bg-color: #050505;
    --admin-text: #ffffff;
    --admin-text-muted: #9ca3af;
    --admin-primary: #8b5cf6;
    --admin-primary-hover: #7c3aed;
    --admin-primary-glow: rgba(139, 92, 246, 0.4);
    --admin-danger: #ef4444;
    --admin-danger-hover: #dc2626;
    --admin-border: rgba(255, 255, 255, 0.08);
    --admin-glass-bg: rgba(20, 20, 20, 0.6);
    --admin-glass-border: rgba(255, 255, 255, 0.05);
    
    background-color: var(--admin-bg-color);
    background-image: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.15), transparent 25%);
    color: var(--admin-text);
    height: 100vh;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    position: relative;
}

/* Background Animated Blobs */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    animation: floatBlob 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(139, 92, 246, 0.15); }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: rgba(59, 130, 246, 0.15); animation-delay: -10s; }

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.1); }
    100% { transform: translate(-5%, 5%) scale(0.9); }
}

/* Glassmorphism Panel Utilities */
.glass-panel {
    background: var(--admin-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--admin-glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Typography Enhancements */
.admin-body h1, .admin-body h2, .admin-body h3, .admin-body h4 {
    font-weight: 600;
    letter-spacing: -0.5px;
}
.fw-light { font-weight: 300; }
.admin-text-muted { color: var(--admin-text-muted); }

/* Admin Login */
.admin-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    z-index: 10;
}
.admin-login-card {
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-header {
    text-align: center;
    margin-bottom: 1rem;
}
.login-icon {
    font-size: 3.5rem;
    color: var(--admin-primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--admin-primary-glow));
}
.login-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.login-header p { color: var(--admin-text-muted); }

/* Form Controls - Overrides */
.admin-body .form-group { margin-bottom: 1.25rem; }
.admin-body .form-group label {
    font-family: 'Inter', sans-serif;
    color: var(--admin-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--admin-text-muted);
    font-size: 1.25rem;
    pointer-events: none;
}
.admin-body .form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}
.input-wrapper .form-control {
    padding-left: 3.2rem;
}
.admin-body .form-control:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.code-editor {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    background: #000000 !important;
}

/* Admin Buttons */
.admin-body .btn {
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.admin-body .btn-primary {
    background: linear-gradient(135deg, var(--admin-primary), #3b82f6);
    color: white;
}
.admin-body .btn-primary:hover {
    background: linear-gradient(135deg, var(--admin-primary-hover), #2563eb);
}
.btn-glow {
    box-shadow: 0 4px 15px var(--admin-primary-glow);
}
.btn-glow:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}
.btn-outline-primary {
    background: transparent;
    color: var(--admin-primary);
    border: 1px solid rgba(139, 92, 246, 0.5);
}
.btn-outline-primary:hover {
    background: rgba(139, 92, 246, 0.1);
}
.btn-outline-danger {
    background: transparent;
    color: var(--admin-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--admin-danger);
}
.icon-btn {
    background: transparent;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--admin-text);
}
.btn-block { width: 100%; display: flex; }

/* Error Message */
.error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.9rem;
    text-align: center;
    display: flex; /* can be hidden via inline style */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Admin Layout */
.admin-sidebar {
    width: 280px;
    border-right: 1px solid var(--admin-border);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.admin-logo {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--admin-border);
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--admin-primary), #3b82f6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--admin-primary-glow);
}
.logo-text { font-size: 1.5rem; font-weight: 700; }

.admin-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.nav-item:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}
.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), transparent);
    border-left: 3px solid var(--admin-primary);
    border-radius: 0 10px 10px 0;
}
.nav-item.active .material-symbols-rounded {
    color: var(--admin-primary);
    text-shadow: 0 0 10px var(--admin-primary-glow);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 0.95rem; }
.user-role { font-size: 0.8rem; color: var(--admin-primary); }

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-header {
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--admin-border);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.admin-header h2 { font-size: 1.5rem; }

.admin-content {
    padding: 2.5rem;
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 5;
}

/* Views & Cards */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.view-section.active { display: block; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--admin-border);
}
.card-header h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }

.form-section { margin-bottom: 2.5rem; }
.form-section:last-child { margin-bottom: 0; }
.form-section h4 {
    color: var(--admin-primary);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}
.stat-icon-wrapper .material-symbols-rounded { font-size: 2rem; }
.stat-icon-wrapper.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.stat-icon-wrapper.yellow { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-icon-wrapper.green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-details p { font-size: 0.9rem; font-family: 'Inter', sans-serif; margin-bottom: 0.25rem; }
.stat-details h2 { font-size: 2rem; font-weight: 700; }

/* Table enhancements */
.table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 1.25rem 1rem; text-align: left; border-bottom: 1px solid var(--admin-border); }
.admin-table th { color: var(--admin-text-muted); font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table tbody tr { transition: background 0.2s; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Badges */
.admin-body .badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.35rem 0.85rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; font-family: 'Inter', sans-serif; letter-spacing: 0.5px; }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-progress { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-completed { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Alert */
.alert { padding: 1rem; border-radius: 10px; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); color: #fcd34d; }

/* Modals */
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: none; z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; animation: fadeIn 0.3s ease; }
.modal-card { width: 100%; max-width: 400px; padding: 0; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--admin-border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.25rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.5rem; border-top: 1px solid var(--admin-border); display: flex; justify-content: flex-end; gap: 1rem; }

/* Animations */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Custom Scrollbar */
.admin-body::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-body::-webkit-scrollbar-track { background: var(--admin-bg-color); }
.admin-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.admin-body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

