/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a2a3a;
    background: #f0f5fb;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #2a7de1;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ─────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: #2a7de1;
    color: white;
}
.btn-primary:hover {
    background: #1a5fa8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 125, 225, 0.3);
}

.btn-outline {
    background: transparent;
    color: #2a7de1;
    border: 2px solid #2a7de1;
}
.btn-outline:hover {
    background: #2a7de1;
    color: white;
}

.btn-large {
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-success {
    background: #27ae60;
    color: white;
}
.btn-success:hover {
    background: #1e8449;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}
.btn-danger:hover {
    background: #c0392b;
}

/* ─────────────────────────────────────────────
   LANDING PAGE
   ───────────────────────────────────────────── */
.landing-page {
    max-width: 1400px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    padding: 1rem 2rem;
    background: white;
    border-radius: 16px;
    margin: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b1e33;
}
.nav-brand i {
    color: #2a7de1;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    color: #4a6a8a;
    font-weight: 500;
}
.nav-links a:hover {
    color: #0b1e33;
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #0b1e33;
}

@media (max-width: 768px) {
    .mobile-menu { display: block; }
    .nav-links { display: none; }
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 2rem 2rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0b1e33;
    margin-bottom: 1.5rem;
}
.hero-content h1 span {
    color: #2a7de1;
}
.hero-content p {
    font-size: 1.2rem;
    color: #4a6a8a;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}
.stat {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0b1e33;
}
.stat-label {
    color: #4a6a8a;
    font-size: 0.95rem;
}

.demo-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    border: 2px dashed #d0ddee;
}
.demo-card i {
    font-size: 4rem;
    color: #2a7de1;
    display: block;
    margin-bottom: 1rem;
}
.demo-card span {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b1e33;
}
.demo-card small {
    color: #4a6a8a;
}

/* Features */
.features {
    padding: 4rem 2rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 2.5rem;
    color: #0b1e33;
}
.section-header p {
    color: #4a6a8a;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.feature-card i {
    font-size: 2.5rem;
    color: #2a7de1;
    margin-bottom: 1rem;
}
.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #0b1e33;
}
.feature-card p {
    color: #4a6a8a;
}

/* How It Works */
.how-it-works {
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    margin: 0 2rem;
}
.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.step {
    text-align: center;
    flex: 1;
    min-width: 200px;
    padding: 2rem;
}
.step-number {
    background: #2a7de1;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
}
.step i {
    font-size: 2.5rem;
    color: #2a7de1;
    margin-bottom: 0.5rem;
}
.step h3 {
    margin-bottom: 0.5rem;
    color: #0b1e33;
}
.step p {
    color: #4a6a8a;
}
.step-arrow {
    color: #b8d0e8;
    font-size: 1.5rem;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 3rem 2rem 1rem;
    background: #0b1e33;
    color: #a0b8cf;
    border-radius: 24px 24px 0 0;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-brand i {
    font-size: 2rem;
    color: #2a7de1;
}
.footer-brand span {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}
.footer-brand p {
    margin-top: 0.5rem;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-links h4 {
    color: white;
    margin-bottom: 1rem;
}
.footer-links a {
    display: block;
    color: #a0b8cf;
    margin-bottom: 0.5rem;
}
.footer-links a:hover {
    color: white;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #1a3a5f;
}

/* ─────────────────────────────────────────────
   AUTH PAGES
   ───────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f5fb 0%, #e1edff 100%);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header i {
    font-size: 3rem;
    color: #2a7de1;
    margin-bottom: 0.5rem;
}
.auth-header h1 {
    font-size: 1.8rem;
    color: #0b1e33;
}
.auth-header p {
    color: #4a6a8a;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}
.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #1a2a3a;
}

.input-group {
    display: flex;
    align-items: center;
    background: #f5f9ff;
    border-radius: 12px;
    border: 2px solid #e1edff;
    transition: 0.2s;
}
.input-group:focus-within {
    border-color: #2a7de1;
}
.input-group i {
    padding: 0 0.75rem;
    color: #4a6a8a;
}
.input-group input {
    flex: 1;
    padding: 0.7rem 0.75rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}
.input-group .toggle-password {
    background: none;
    border: none;
    padding: 0 0.75rem;
    color: #4a6a8a;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #4a6a8a;
    cursor: pointer;
}
.forgot-link {
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef4f9;
}

.password-strength {
    margin-top: 0.5rem;
}
.strength-bar {
    height: 4px;
    border-radius: 4px;
    background: #e74c3c;
    width: 0%;
    transition: 0.3s;
}
.strength-text {
    font-size: 0.8rem;
    color: #4a6a8a;
}

/* ─────────────────────────────────────────────
   DASHBOARD
   ───────────────────────────────────────────── */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0b1e33;
    margin-bottom: 2.5rem;
}
.sidebar-brand i {
    color: #2a7de1;
    font-size: 1.8rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    color: #4a6a8a;
    font-weight: 500;
    transition: 0.2s;
}
.sidebar-nav a:hover {
    background: #f0f6fe;
    color: #0b1e33;
}
.sidebar-nav a.active {
    background: #2a7de1;
    color: white;
}
.sidebar-nav a.logout {
    margin-top: auto;
    color: #e74c3c;
}
.sidebar-nav a.logout:hover {
    background: #fde8e8;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    flex: 1;
    max-width: 400px;
    border: 2px solid transparent;
    transition: 0.2s;
}
.search-bar:focus-within {
    border-color: #2a7de1;
}
.search-bar i {
    color: #4a6a8a;
}
.search-bar input {
    border: none;
    padding: 0.5rem 0.75rem;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-menu i {
    font-size: 1.2rem;
    color: #4a6a8a;
    position: relative;
}
.user-menu .badge {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    right: -8px;
}
.user-menu img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-icon.blue { background: #dbeafe; color: #2a7de1; }
.stat-icon.green { background: #d1fae5; color: #27ae60; }
.stat-icon.orange { background: #fef3c7; color: #f39c12; }
.stat-icon.purple { background: #ede9fe; color: #8b5cf6; }

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0b1e33;
}
.stat-info p {
    color: #4a6a8a;
    font-size: 0.95rem;
}

/* Recent Projects */
.recent-projects {
    margin-bottom: 2.5rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-header h2 {
    font-size: 1.3rem;
    color: #0b1e33;
}
.view-all {
    font-weight: 500;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.project-card .project-title {
    font-weight: 600;
    color: #0b1e33;
    margin-bottom: 0.3rem;
}
.project-card .project-date {
    color: #4a6a8a;
    font-size: 0.85rem;
}
.project-card .project-status {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}
.project-card .status-complete {
    background: #d1fae5;
    color: #27ae60;
}
.project-card .status-progress {
    background: #fef3c7;
    color: #f39c12;
}
.project-card .status-pending {
    background: #dbeafe;
    color: #2a7de1;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.action-card i {
    font-size: 2.5rem;
    color: #2a7de1;
    margin-bottom: 0.5rem;
}
.action-card h3 {
    color: #0b1e33;
}
.action-card p {
    color: #4a6a8a;
    font-size: 0.9rem;
}

/* ─────────────────────────────────────────────
   ANALYSIS PAGE
   ───────────────────────────────────────────── */
.analysis-page {
    max-width: 1200px;
}
.analysis-header {
    margin-bottom: 2rem;
}
.analysis-header h1 {
    font-size: 2rem;
    color: #0b1e33;
}
.analysis-header p {
    color: #4a6a8a;
}

.upload-zone {
    background: white;
    border: 3px dashed #d0ddee;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: 0.3s;
    margin-bottom: 2rem;
}
.upload-zone.drag-over {
    border-color: #2a7de1;
    background: #f0f6fe;
}
.upload-zone i {
    font-size: 3.5rem;
    color: #2a7de1;
    opacity: 0.7;
}
.upload-zone h3 {
    color: #0b1e33;
    margin: 0.5rem 0;
}
.upload-zone p {
    color: #4a6a8a;
    margin-bottom: 1.5rem;
}
.upload-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}
.file-badge {
    background: #f0f6fe;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.file-badge .remove {
    color: #e74c3c;
    cursor: pointer;
}

.upload-progress {
    margin-top: 1rem;
}
.progress-bar {
    background: #eef4f9;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #2a7de1;
    transition: width 0.3s;
}
#progressText {
    font-size: 0.9rem;
    color: #4a6a8a;
}

.analysis-controls {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.control-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.control-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #1a2a3a;
    font-weight: 500;
}

.analysis-progress {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
}
.analysis-progress h3 {
    color: #0b1e33;
    margin-bottom: 1.5rem;
}
.progress-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
}
.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.4;
}
.progress-steps .step.active {
    opacity: 1;
}
.progress-steps .step i {
    font-size: 1.5rem;
    color: #2a7de1;
}
.progress-steps .step span {
    font-size: 0.85rem;
    color: #4a6a8a;
}

.spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results */
.results-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 2rem;
}
.results-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eef4f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.results-header h2 {
    color: #0b1e33;
}
.results-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.results-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 2rem;
    border-bottom: 1px solid #eef4f9;
}
.results-tabs .tab {
    padding: 0.8rem 1.2rem;
    background: none;
    border: none;
    font-weight: 500;
    color: #4a6a8a;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}
.results-tabs .tab:hover {
    color: #0b1e33;
}
.results-tabs .tab.active {
    color: #2a7de1;
    border-bottom-color: #2a7de1;
}

.tab-content {
    padding: 2rem;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

.tab-pane pre {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.7;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #4a6a8a;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin: 0 auto 2rem;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 1rem;
    }
    .main-content {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .quick-actions {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    .results-actions {
        justify-content: stretch;
    }
    .results-actions .btn {
        flex: 1;
        justify-content: center;
    }
    .results-tabs {
        overflow-x: auto;
        padding: 0 0.5rem;
    }
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .control-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}