/* GleanDoc - Professional SaaS Stylesheet */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === NAVBAR === */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    padding: 0.75rem 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar .logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 0.5rem; }
.navbar .logo .icon { color: var(--primary); }
.navbar nav { display: flex; gap: 2rem; align-items: center; }
.navbar nav a { color: var(--gray-700); font-weight: 500; font-size: 0.95rem; }
.navbar nav a:hover { color: var(--primary); text-decoration: none; }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: var(--radius); font-weight: 600;
    font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); text-decoration: none; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); text-decoration: none; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; }
.btn-danger { background: var(--danger); color: white; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* === CONTAINER === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    color: white; padding: 5rem 0 4rem; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.hero .subtitle { font-size: 1.3rem; color: rgba(255,255,255,0.85); margin-bottom: 2rem; max-width: 600px; }
.hero .cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .badge {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px; font-size: 0.85rem; margin-bottom: 1.5rem;
}
.hero .badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === SECTIONS === */
.section { padding: 4rem 0; }
.section-gray { background: var(--gray-50); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.5rem; font-weight: 800; color: var(--dark); margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.section-title p { font-size: 1.15rem; color: var(--gray-500); max-width: 600px; margin: 0 auto; }

/* === FEATURES GRID === */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card {
    background: white; border: 1px solid var(--gray-100); border-radius: var(--radius);
    padding: 2rem; transition: all 0.3s;
}
.feature-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.feature-card .icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.feature-card p { color: var(--gray-500); }

/* === HOW IT WORKS === */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.step { text-align: center; position: relative; }
.step .number {
    width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: white;
    font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { color: var(--gray-500); }

/* === PRICING === */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.pricing-card {
    background: white; border: 2px solid var(--gray-100); border-radius: var(--radius);
    padding: 2rem; transition: all 0.3s; position: relative;
}
.pricing-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); transform: scale(1.03); }
.pricing-card.popular::before {
    content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 0.25rem 1rem; border-radius: 50px;
    font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.pricing-card .plan-name { font-size: 1.25rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--dark); }
.pricing-card .price .period { font-size: 1rem; font-weight: 500; color: var(--gray-500); }
.pricing-card .features { list-style: none; margin: 1.5rem 0; }
.pricing-card .features li { padding: 0.5rem 0; color: var(--gray-700); display: flex; align-items: flex-start; gap: 0.5rem; }
.pricing-card .features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* === FORMS === */
.form-container { max-width: 420px; margin: 3rem auto; }
.form-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-xl); padding: 2.5rem; }
.form-card h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; text-align: center; }
.form-card .subtitle { text-align: center; color: var(--gray-500); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--gray-300); border-radius: 8px;
    font-size: 1rem; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
}

/* === DASHBOARD === */
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; margin-top: 2rem; }
.dashboard-sidebar {
    background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; height: fit-content;
}
.dashboard-sidebar .user-info { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-100); }
.dashboard-sidebar .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 0.75rem; }
.dashboard-sidebar .plan-badge { display: inline-block; padding: 0.25rem 0.75rem; background: var(--gray-100); border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-transform: capitalize; }
.dashboard-sidebar nav { display: flex; flex-direction: column; gap: 0.5rem; }
.dashboard-sidebar nav a { padding: 0.75rem 1rem; border-radius: 8px; color: var(--gray-700); font-weight: 500; display: flex; align-items: center; gap: 0.75rem; }
.dashboard-sidebar nav a:hover, .dashboard-sidebar nav a.active { background: var(--primary); color: white; text-decoration: none; }
.dashboard-main { display: flex; flex-direction: column; gap: 1.5rem; }
.dashboard-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.dashboard-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }

/* === STATS === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; text-align: center; }
.stat-box .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stat-box .stat-label { font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

/* === UPLOAD AREA === */
.upload-area {
    border: 3px dashed var(--gray-300); border-radius: var(--radius); padding: 3rem 2rem;
    text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-area:hover { border-color: var(--primary); background: var(--gray-50); }
.upload-area.dragover { border-color: var(--primary); background: rgba(37,99,235,0.05); }
.upload-area .upload-icon { font-size: 3rem; margin-bottom: 1rem; }
.upload-area p { color: var(--gray-500); }

/* === TABLE === */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
th { font-weight: 600; color: var(--gray-700); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover { background: var(--gray-50); }

/* === BADGES === */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-pending { background: rgba(245,158,11,0.1); color: var(--accent-dark); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }

/* === CHAT === */
.chat-container { max-width: 700px; margin: 2rem auto; }
.chat-messages { height: 400px; overflow-y: auto; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; background: var(--gray-50); }
.chat-message { margin-bottom: 1rem; }
.chat-message.user { text-align: right; }
.chat-message .bubble { display: inline-block; padding: 0.75rem 1.25rem; border-radius: var(--radius); max-width: 80%; text-align: left; }
.chat-message.user .bubble { background: var(--primary); color: white; }
.chat-message.bot .bubble { background: white; border: 1px solid var(--gray-100); }
.chat-input { display: flex; gap: 0.75rem; }
.chat-input input { flex: 1; padding: 0.75rem 1rem; border: 2px solid var(--gray-300); border-radius: var(--radius); }

/* === DOC TYPES === */
.doc-types-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 2rem 0; }
.doc-type { text-align: center; padding: 1.5rem 1rem; border: 2px solid var(--gray-100); border-radius: var(--radius); transition: all 0.2s; cursor: pointer; }
.doc-type:hover { border-color: var(--primary); background: var(--gray-50); }
.doc-type.selected { border-color: var(--primary); background: rgba(37,99,235,0.05); }
.doc-type .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.doc-type .name { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }

/* === FOOTER === */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: white; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,0.6); display: block; padding: 0.3rem 0; }
.footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* === ALERTS === */
.alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-info { background: rgba(37,99,235,0.1); color: var(--primary-dark); border: 1px solid rgba(37,99,235,0.2); }
.alert-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.alert-warning { background: rgba(245,158,11,0.1); color: var(--accent-dark); border: 1px solid rgba(245,158,11,0.2); }
.alert-danger { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

/* === DEMO BANNER === */
.demo-banner { background: var(--accent); color: white; text-align: center; padding: 0.5rem; font-size: 0.9rem; font-weight: 600; }

/* === JSON VIEWER === */
.json-viewer { background: var(--gray-900); color: #a5d6ff; padding: 1.5rem; border-radius: var(--radius); font-family: 'Monaco', 'Menlo', monospace; font-size: 0.875rem; overflow-x: auto; max-height: 500px; overflow-y: auto; }
.json-key { color: #7ee787; }
.json-string { color: #a5d6ff; }
.json-number { color: #ffa657; }
.json-boolean { color: #ff7b72; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1rem; }
    .navbar nav { display: none; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .pricing-card.popular { transform: none; }
}
