/* ============================================
   Expert Achiziții 2026 - BeeD Style
   Modern UI for Public Procurement Platform
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;

    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --success-bg: #ecfdf5;
    --error: #ef4444;
    --error-light: #f87171;
    --error-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: #fffbeb;
    --info: #6366f1;
    --info-bg: #eef2ff;

    /* Neutral Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #0f172a;
    --text-dark: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Module Colors */
    --risk-color: #dc2626;
    --risk-bg: #fef2f2;
    --bid-color: #7c3aed;
    --bid-bg: #f5f3ff;
    --comply-color: #059669;
    --comply-bg: #ecfdf5;
    --tbg-color: #0891b2;
    --tbg-bg: #ecfeff;
    --chat-color: #2563eb;
    --chat-bg: #eff6ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.nav-menu a.active {
    color: var(--primary);
    background: var(--info-bg);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(37,99,235,0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37,99,235,0.25);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
}

/* ============================================
   App Layout (Sidebar + Main)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

.sidebar-header .logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-header .logo-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.sidebar-header .logo-year {
    font-size: 11px;
    color: var(--text-muted);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-item:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.nav-icon {
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius);
}

.nav-item.active .nav-icon {
    background: rgba(255,255,255,0.2);
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    display: none;
    padding-left: 44px;
}

.nav-dropdown.open .nav-dropdown-content {
    display: block;
}

.nav-child {
    padding: 8px 20px;
    font-size: 13px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

.sidebar-footer .nav-item {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.sidebar-footer .nav-item:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #dc2626;
}

.sidebar-footer .nav-icon {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-light);
}

/* Topbar */
.topbar {
    background: var(--bg-white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
}

/* ============================================
   Hero Container (index.php)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
}

/* ============================================
   Module Cards Grid
   ============================================ */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 2rem 0;
}

.module-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.module-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.module-card-risk .module-card-icon { background: var(--risk-bg); }
.module-card-bid .module-card-icon { background: var(--bid-bg); }
.module-card-comply .module-card-icon { background: var(--comply-bg); }
.module-card-tbg .module-card-icon { background: var(--tbg-bg); }
.module-card-chat .module-card-icon { background: var(--chat-bg); }

.module-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.module-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.module-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.module-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.module-card-badge.new { background: var(--success-bg); color: var(--success); }
.module-card-badge.pro { background: var(--info-bg); color: var(--info); }
.module-card-badge.free { background: var(--bg-light); color: var(--text-secondary); }

/* ============================================
   Dashboard
   ============================================ */
.dashboard {
    padding: 32px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.purple { background: var(--bid-bg); color: var(--bid-color); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Panels & Cards
   ============================================ */
.panel {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.panel-header {
    background: linear-gradient(to right, var(--bg-light), var(--bg-white));
    padding: 16px 24px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-header-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 14px;
}

.panel-body {
    padding: 24px;
}

.panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

/* ============================================
   Score Cards & Progress
   ============================================ */
.score-card {
    text-align: center;
    padding: 32px;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-weight: 800;
    color: white;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}

.score-circle .value {
    font-size: 3rem;
    line-height: 1;
}

.score-circle .label {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.score-circle.score-high { background: linear-gradient(135deg, var(--success) 0%, #059669 100%); }
.score-circle.score-med { background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%); }
.score-circle.score-low { background: linear-gradient(135deg, var(--error) 0%, #b91c1c 100%); }

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-bar-fill.high { background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%); }
.progress-bar-fill.med { background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%); }
.progress-bar-fill.low { background: linear-gradient(90deg, var(--error) 0%, var(--error-light) 100%); }

/* ============================================
   Verdict Badges
   ============================================ */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verdict-badge.bid {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.verdict-badge.no-bid {
    background: linear-gradient(135deg, var(--error) 0%, #b91c1c 100%);
    color: white;
}

.verdict-badge.evaluate {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.verdict-badge.conform {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.verdict-badge.neconform {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.verdict-badge.refuz {
    background: linear-gradient(135deg, var(--error) 0%, #b91c1c 100%);
    color: white;
}

/* ============================================
   Factor Cards
   ============================================ */
.factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.factor-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.factor-icon.high { background: var(--error-bg); }
.factor-icon.med { background: var(--warning-bg); }
.factor-icon.low { background: var(--success-bg); }

.factor-content {
    flex: 1;
    min-width: 0;
}

.factor-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.factor-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Check Items (Comply)
   ============================================ */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    border-left: 4px solid;
}

.check-item.pass {
    background: var(--success-bg);
    border-left-color: var(--success);
}

.check-item.fail {
    background: var(--error-bg);
    border-left-color: var(--error);
}

.check-item.warn {
    background: var(--warning-bg);
    border-left-color: var(--warning);
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.check-item.pass .check-icon { background: var(--success); color: white; }
.check-item.fail .check-icon { background: var(--error); color: white; }
.check-item.warn .check-icon { background: var(--warning); color: white; }

.check-content {
    flex: 1;
}

.check-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.check-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Forms
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-group small {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: var(--primary-light);
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-item span {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-success .alert-icon { background: var(--success); color: white; }

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error .alert-icon { background: var(--error); color: white; }

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-warning .alert-icon { background: var(--warning); color: white; }

/* ============================================
   Chat
   ============================================ */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-light);
}

.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    line-height: 1.6;
    font-size: 14px;
    position: relative;
}

.message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-assistant {
    align-self: flex-start;
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message-assistant strong {
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

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

.chat-input textarea {
    flex: 1;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--primary);
    background: var(--bg-white);
}

.tab.active {
    color: var(--primary);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Conversation List
   ============================================ */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.conversation-item:hover {
    background: var(--bg-light);
    border-color: var(--border);
}

.conversation-item.active {
    background: var(--info-bg);
    border-color: var(--primary-light);
}

.conversation-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.conversation-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 48px 0 24px;
    margin-top: 64px;
}

footer h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

footer p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ============================================
   Module Header (inside modules)
   ============================================ */
.module-header {
    padding: 48px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.module-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.module-header.risk { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.module-header.bid { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.module-header.comply { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.module-header.tbg { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }

.module-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.module-header p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
}

/* ============================================
   Authentication Pages
   ============================================ */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 2rem;
    font-weight: 700;
}

.features-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   Price Cards
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.price-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.price-card:hover {
    transform: translateY(-4px);
}

.price-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.price-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.price-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.price-features {
    list-style: none;
    margin: 24px 0;
    text-align: left;
}

.price-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   Output Preview
   ============================================ */
.output-preview {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin: 16px 0;
}

.output-preview::-webkit-scrollbar {
    width: 8px;
}

.output-preview::-webkit-scrollbar-track {
    background: #0f172a;
}

.output-preview::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

/* ============================================
   Type Selector (TBG)
   ============================================ */
.type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.type-btn {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: var(--primary-light);
}

.type-btn.active {
    border-color: var(--primary);
    background: var(--info-bg);
}

.type-btn h4 {
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.type-btn small {
    color: var(--text-secondary);
    font-size: 12px;
}

.format-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.format-btn {
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.format-btn:hover {
    border-color: var(--primary);
}

.format-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.empty-state p {
    font-size: 14px;
    max-width: 320px;
    margin: 0 auto;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-menu {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

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

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

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        padding: 8px 16px;
        font-size: 13px;
    }

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

    .type-selector {
        grid-template-columns: 1fr;
    }

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

    .auth-container {
        padding: 24px;
    }

    .module-header {
        padding: 32px 0;
    }

    .module-header h1 {
        font-size: 1.5rem;
    }

    .panel-body {
        padding: 16px;
    }

    .chat-container {
        height: 400px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .modules-grid {
        gap: 16px;
    }

    .module-card {
        padding: 20px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-circle .value {
        font-size: 2.5rem;
    }
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-full { width: 100%; }
.hidden { display: none; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   Glassmorphism Effects
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   Spring Animations
   ============================================ */
@keyframes spring {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce-in {
    0% { transform: scale(0) translateY(50px); opacity: 0; }
    60% { transform: scale(1.2) translateY(-10px); }
    80% { transform: scale(0.9) translateY(5px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.6); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.animate-spring { animation: spring 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.animate-bounce-in { animation: bounce-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.animate-wiggle { animation: wiggle 0.5s ease-in-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   3D Card Effects
   ============================================ */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
}

.card-3d-reverse:hover {
    transform: rotateY(-5deg) rotateX(-5deg) translateZ(20px);
}

.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card-inner {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.tilt-card:hover .tilt-card-inner {
    transform: rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg));
}

/* ============================================
   Interactive Hover States
   ============================================ */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

.hover-brightness {
    transition: all 0.3s ease;
}

.hover-brightness:hover {
    filter: brightness(1.1);
}

/* Magnetic Button Effect */
.btn-magnetic {
    position: relative;
    transition: all 0.3s ease;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
    transform: scale(0.8);
}

.btn-magnetic:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   Ambient Background Effects
   ============================================ */
.gradient-mesh {
    position: relative;
    overflow: hidden;
}

.gradient-mesh::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.2) 0%, transparent 50%);
    animation: mesh-float 20s ease-in-out infinite;
}

@keyframes mesh-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(-2%, 2%) rotate(-1deg); }
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: orb-float 8s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(102, 126, 234, 0.4);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(118, 75, 162, 0.4);
    bottom: -50px;
    left: -50px;
    animation-delay: -3s;
}

.gradient-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(37, 99, 235, 0.3);
    top: 50%;
    left: 50%;
    animation-delay: -5s;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============================================
   Neural Network Canvas Background
   ============================================ */
.neural-bg {
    position: relative;
    overflow: hidden;
}

.neural-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: 0;
}

.neural-bg canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.6;
}

/* ============================================
   Scroll-Triggered Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Children Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.revealed > *:nth-child(1) { animation: spring 0.5s ease forwards 0.1s; }
.stagger-children.revealed > *:nth-child(2) { animation: spring 0.5s ease forwards 0.2s; }
.stagger-children.revealed > *:nth-child(3) { animation: spring 0.5s ease forwards 0.3s; }
.stagger-children.revealed > *:nth-child(4) { animation: spring 0.5s ease forwards 0.4s; }
.stagger-children.revealed > *:nth-child(5) { animation: spring 0.5s ease forwards 0.5s; }
.stagger-children.revealed > *:nth-child(6) { animation: spring 0.5s ease forwards 0.6s; }
.stagger-children.revealed > *:nth-child(7) { animation: spring 0.5s ease forwards 0.7s; }
.stagger-children.revealed > *:nth-child(8) { animation: spring 0.5s ease forwards 0.8s; }

/* ============================================
   Interactive Elements
   ============================================ */
.interactive-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(37, 99, 235, 0.1) 100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.interactive-card:hover::before {
    opacity: 1;
}

.interactive-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.interactive-card:hover::after {
    left: 100%;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* ============================================
   Success/Interactive States
   ============================================ */
.success-checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-checkmark::after {
    content: '✓';
    color: white;
    font-size: 30px;
    font-weight: bold;
}

/* ============================================
   Modern Dashboard Cards
   ============================================ */
.dashboard-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.d Stat Card Improved */
.stat-card-improved {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card-improved:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-card-improved .stat-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    transition: all 0.4s ease;
}

.stat-card-improved:hover .stat-icon-wrap {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================
   Modern Tab System
   ============================================ */
.modern-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.modern-tab {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.modern-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.modern-tab:hover {
    color: var(--primary);
}

.modern-tab.active {
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.modern-tab.active::before {
    opacity: 1;
}

.modern-tab span {
    position: relative;
    z-index: 1;
}

/* ============================================
   Modern Form Inputs
   ============================================ */
.input-modern {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(37, 99, 235, 0.15);
}

.input-modern::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Progress Steps
   ============================================ */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 32px 0;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 4px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.progress-step.active {
    border-color: var(--primary);
    color: var(--primary);
    animation: pulse-glow 2s ease-in-out infinite;
}

.progress-step.completed {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

/* ============================================
   Modern Accordion
   ============================================ */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 20px 24px;
    background: var(--bg-white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: var(--bg-light);
}

.accordion-header::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-header::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-light);
}

.accordion-item.open .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 20px 24px;
}

/* ============================================
   Tooltip Styles
   ============================================ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-dark);
    color: white;
    font-size: 13px;
    border-radius: var(--radius);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* ============================================
   Loading Skeleton
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--border) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

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

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ============================================
   Cursor Effects
   ============================================ */
.cursor-pointer { cursor: pointer; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }
.cursor-zoom-in { cursor: zoom-in; }
.cursor-zoom-out { cursor: zoom-out; }

/* ============================================
   Selection Styles
   ============================================ */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Smooth Scroll
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Focus States
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .no-print { display: none !important; }

    body {
        background: white;
        color: black;
    }

    .glass,
    .glass-dark,
    .glass-card {
        background: white;
        backdrop-filter: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   Dark Mode Support (for future use)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Leave light mode default for now */
}

/* ============================================
   Page Transition Overlay
   ============================================ */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--primary);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* ============================================
   Form Card Layout (Modern Design)
   ============================================ */
.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.form-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.form-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.form-card-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.form-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.form-card-body {
    padding: 24px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.form-grid.full-width {
    grid-column: 1 / -1;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-white);
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: scale(1.01);
}
.form-input::placeholder {
    color: var(--text-muted);
}
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
    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='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--bg-white);
}
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.btn-generate {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 12px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: inherit;
}
.tab-btn:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
}
.form-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.input-highlight {
    border-left: 3px solid var(--primary) !important;
}
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #b1dfbb;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.empty-state {
    text-align: center;
    padding: 40px 20px;
}
.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { display: none; }
    .main-content { padding: 12px; }
    .category-tabs { flex-direction: column; }
    .tab-btn { text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-card-body { padding: 16px; }
}

/* ============================================
   Final Responsive Tweaks
   ============================================ */
@media (max-width: 768px) {
    .gradient-orb { display: none; }

    .reveal,
    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }

    .dashboard-card:hover {
        transform: translateY(-2px);
    }

    .hero-section {
        min-height: auto;
        padding: 60px 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-content h1 {
        font-size: 36px;
    }
}
