/* ======================================== AILEEN CAPITAL — STYLESHEET v2.4 (CONSOLIDATED) ======================================== */

/* ── 1. DESIGN TOKENS ─────────────────────────────────── */
:root {
    --primary: #0C3166;
    --accent: #b89146;
    --accent-light: #d4af5e;
    --text-main: #334155;
    --text-muted: #5a6a80;
    --bg-light: #f4f7f9;
    --bg-body: #ffffff;
    --bg-dark: #1e293b;
    --border-color: #e2e8f0;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-serif: "Iowan Old Style", "Apple Garamond", "Baskerville", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

/* ── 2. RESET & GLOBAL ────────────────────────────────── */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { font-family: var(--font-sans); margin: 0; line-height: 1.7; color: var(--text-main); background-color: var(--bg-body); display: flex; flex-direction: column; min-height: 100vh; }
input, select, textarea, button { font-family: inherit; }
main { flex: 1; padding-top: 40px; padding-bottom: 40px; width: 100%; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); color: var(--primary); margin-top: 0; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent); }
.container { padding: var(--space-2xl) 10%; max-width: 1200px; margin: auto; }
.section-title { text-align: center; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 40px; font-size: 1.25rem; font-weight: 600; color: var(--primary); padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); display: inline-block; width: 100%; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent); margin: 15px auto 0; }

/* ── 3. BUTTONS (Unified) ─────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--space-sm) var(--space-md); border: none; border-radius: var(--radius-sm); font-family: var(--font-serif); font-weight: 600; font-size: 0.95rem; line-height: 1; cursor: pointer; transition: all var(--transition-fast); text-decoration: none; }
.btn-primary, .btn-secondary, .btn-export, .login-btn, .hero-cta-btn, .upload-submit-btn { background: var(--primary); color: #ffffff !important; }
.btn-primary:hover, .btn-secondary:hover, .btn-export:hover, .login-btn:hover, .hero-cta-btn:hover, .upload-submit-btn:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #ffffff; }
.btn-danger { background: #ba2121; color: #ffffff; }
.btn-danger:hover { background: #a31b1b; }
.btn-large { padding: 14px 28px; font-size: 1.1rem; }
.btn-small { padding: 4px 8px; font-size: 0.8rem; }
.btn-block { width: 100%; margin-top: var(--space-md); }
.hero-cta-btn, .login-btn, .upload-submit-btn { padding: 12px 28px !important; font-size: 1.0rem !important; min-width: 180px; justify-content: center; margin: 10px auto; display: block; width: fit-content; background: var(--primary); color: #ffffff !important; border-radius: var(--radius-sm); transition: background var(--transition-fast), transform var(--transition-fast); }
.upload-submit-btn { width: 100%; max-width: 300px; }
.hero-cta-btn::after { content: '→'; margin-left: 8px; font-size: 1.1rem; transition: margin-left var(--transition-fast); }
.hero-cta-btn:hover::after { margin-left: 12px; }


/* ── 4. CARDS (Unified) ─────────────────────────────────── */
.card { background: var(--bg-body); border: 1px solid var(--border-color); border-top: 3px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-lg); transition: all var(--transition-fast); }
.card:hover, .action-card:hover, .info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.stat-card { text-align: center; padding: 1.5rem; }
.action-card { background: var(--bg-body); border: 1px solid var(--border-color); border-top: 3px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-xl); text-align: center; transition: all var(--transition-fast); }
.action-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.action-card h3 { font-size: 1.1rem; color: var(--primary); margin: 0 0 0.4rem; }
.action-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.45; }
.auth-card, .login-box { padding: 40px; border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-md); border-top: 4px solid var(--accent); max-width: 400px; width: 100%; text-align: center; margin: 0 auto; }
.auth-card h3, .login-box h2 { color: var(--primary); margin-bottom: 20px; font-size: 1.5rem; }
.auth-card p, .login-box p { margin-bottom: 25px; color: var(--text-muted); font-size: 1rem; }

/* ── 5. MARKETING GRID & LAYOUTS ─────────────────────────────────── */
.marketing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 1000px; margin: 0 auto; align-items: stretch; }
.marketing-grid .card, .marketing-grid .mk-news-card, .marketing-grid .mk-team-card, .marketing-grid .mk-card { width: 100%; height: 100%; display: flex; flex-direction: column; }
.marketing-grid .card p, .marketing-grid .mk-card p { flex-grow: 1; }
.marketing-grid .card .mk-link, .marketing-grid .mk-card .mk-link { margin-top: auto; }
@media (max-width: 768px) { .marketing-grid { grid-template-columns: 1fr; } }

/* ── 6. TABLES ─────────────────────────────────── */
.data-table-wrapper { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th { background: var(--primary); color: #ffffff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.85rem 1.25rem; text-align: left; }
.data-table tbody td { padding: 0.85rem 1.25rem; font-size: 0.92rem; border-bottom: 1px solid #f0f3f7; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #faf8f2; color: var(--text-main); }


/* ── 7. BADGES & STATUS ─────────────────────────────────── */
.status-badge, .type-badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.status-pending, .type-summary { background: #fff3cd; color: #856404; }
.status-processed, .type-detailed { background: #d4edda; color: #155724; }
.status-error, .type-export { background: #f8d7da; color: #721c24; }
.type-visual { background: #fff3e0; color: #ef6c00; }
.file-icon { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 0.2rem 0.4rem; border-radius: var(--radius-sm); font-weight: 600; }

/* ── 8. MESSAGES/ALERTS ─────────────────────────────────── */
.message { padding: var(--space-md); border-radius: var(--radius-sm); margin-bottom: var(--space-md); font-size: 0.92rem; }
.message.success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.message.error { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }
.message.warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }

/* ── 9. GLOBAL LAYOUT ─────────────────────────────────── */
header { background: #fff; padding: 0.4rem 5%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; border-bottom: 3px solid var(--primary); min-height: 80px; }
.logo img, .logo-link img { height: 88px; display: block; width: auto; }
nav a { margin-left: 25px; text-decoration: none; color: var(--primary); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; transition: color var(--transition-fast); line-height: 1.2; }
nav a:hover { color: var(--accent); }
.hero { background: linear-gradient(rgba(12, 49, 102, 0.9), rgba(12, 49, 102, 0.8)), url('/static/images/banner.jpg'); background-size: cover; background-position: center; padding: 80px 10%; text-align: center; color: white; position: relative; z-index: 1; }
.hero h1 { color: #ffffff !important; font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 12px; line-height: 1.2; }
.hero p { color: #ffffff; font-size: 1rem; max-width: 650px; margin: 0 auto 20px auto; line-height: 1.6; }
footer { background: var(--primary); color: #ccc; text-align: center; padding: 3rem 10%; margin-top: auto; }
.footer-brand { color: white; font-family: var(--font-serif); font-size: 1.5rem; display: block; margin-bottom: 10px; }
.footer-locations, .footer-copyright { color: #ccc; font-size: 0.85rem; margin: 10px 0; }
.footer-contact { color: var(--accent); text-decoration: none; font-weight: 600; display: block; margin-top: 10px; }
.footer-contact:hover { color: #ffffff; transform: scale(1.05); }
.social-link { color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-top: 15px; }
.social-link:hover { color: #ffffff; transform: scale(1.1); }
.social-link svg { width: 20px; height: 20px; fill: currentColor; }

/* ── 10. PAGE SPECIFIC: DASHBOARD ─────────────────────────────────── */
.dashboard-container { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-lg) var(--space-xl); }
.dashboard-welcome { margin-bottom: var(--space-2xl); text-align: center; }
.dashboard-welcome h1 { font-size: 2rem; color: var(--primary); margin: 0 0 0.25rem; }
.dashboard-welcome p { color: var(--text-muted); margin: 0; font-size: 1.05rem; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.dashboard-stats-bar { padding: var(--space-md) 0 var(--space-xl) 0; border-bottom: 1px solid var(--border-color); margin-bottom: var(--space-xl); }
.stat-number { display: block; font-size: 2.25rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.dashboard-section { padding-top: var(--space-2xl); margin-bottom: 2.5rem; text-align: center; }
.dashboard-section-shaded { background: var(--bg-light); padding: var(--space-2xl) var(--space-lg) var(--space-lg); border-radius: var(--radius-md); margin-bottom: 2.5rem; text-align: center; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; text-align: left; }

/* ── 11. PAGE SPECIFIC: UTILITIES & UPLOAD ─────────────────────────────────── */
.utilities-container { max-width: 1200px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }
.tabs-header { display: flex; gap: 0.5rem; margin-bottom: var(--space-lg); border-bottom: 2px solid var(--border-color); padding-bottom: 0; }
.tab-link { padding: 0.75rem 1.5rem; background: transparent; border-bottom: 3px solid transparent; color: var(--text-main); font-family: var(--font-serif); font-weight: 600; font-size: 1rem; text-decoration: none; transition: all var(--transition-fast); margin-bottom: -2px; }
.tab-link:hover { color: var(--primary); background: #f1f5f9; }
.tab-link.active { color: var(--primary); border-bottom-color: var(--accent); }
.controls { margin-bottom: var(--space-lg); display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.file-selector { display: flex; align-items: center; gap: 0.5rem; }
.file-selector label { font-weight: 600; color: var(--text-main); font-family: var(--font-serif); }
.file-selector select { padding: 0.5rem 1rem; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-size: 0.9rem; background: #ffffff; font-family: var(--font-sans); line-height: 1; vertical-align: middle; appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;}
.code-viewer { background: var(--bg-dark); color: #e2e8f0; padding: var(--space-lg); border-radius: var(--radius-md); overflow-x: auto; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); max-height: 600px; overflow-y: auto; }
.code-viewer h3 { color: var(--accent); margin-top: 0; font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; }
.log-output { color: #fca5a5; }
.upload-container { max-width: 900px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }
.upload-header { margin-bottom: var(--space-xl); }
.upload-header h1 { font-size: 2rem; color: var(--primary); margin: 0 0 0.5rem; }
.upload-header p { color: var(--text-muted); margin: 0; font-size: 1.05rem; }
.drop-zone { border: 2px dashed #cbd5e1; border-radius: var(--radius-md); padding: 3rem 2rem; text-align: center; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast); position: relative; }
.drop-zone.drag-over { border-color: var(--accent); background: #faf8f2; }
.drop-zone input[type="file"] { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; cursor: pointer; }
.drop-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.6; }
.drop-text { font-size: 1.1rem; color: var(--primary); margin: 0 0 0.5rem; }
.browse-link { color: var(--accent); font-weight: 600; text-decoration: underline; }
.drop-hint { font-size: 0.85rem; color: #999; margin: 0; }
.file-preview { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-top: 1rem; }
.preview-info { display: flex; flex-direction: column; }
.preview-name { font-weight: 600; color: var(--primary); font-size: 0.95rem; }
.preview-size { font-size: 0.8rem; color: #666; }
.remove-file { background: none; border: none; font-size: 1.25rem; color: #999; cursor: pointer; padding: 0.25rem 0.5rem; transition: color var(--transition-fast); }
.remove-file:hover { color: #c62828; }
.recent-uploads-section { margin-top: 3rem; }


/* ── 11b. MARKDOWN CONTENT IN DARK BOX ─────────────────────────────────── */
.markdown-content { color: #e2e8f0; line-height: 1.6; }
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4, .markdown-content h5, .markdown-content h6 { color: var(--accent); margin-top: 1.5rem; margin-bottom: 0.5rem; font-family: var(--font-serif); }
.markdown-content p { margin-bottom: 1rem; }
.markdown-content ul, .markdown-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.markdown-content li { margin-bottom: 0.25rem; }
.markdown-content blockquote { border-left: 4px solid var(--accent); padding-left: 1rem; color: #94a3b8; font-style: italic; margin-bottom: 1rem; }
.markdown-content code { background: #334155; padding: 0.2rem 0.4rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: #e2e8f0; }
.markdown-content pre { background: #1e293b !important; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 1rem; color: #e2e8f0 !important; border: 1px solid #334155; }
.markdown-content pre code { background: transparent !important; padding: 0; color: #e2e8f0 !important; font-family: var(--font-mono); font-size: 0.9em; }
.markdown-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.markdown-content th { background: var(--primary); color: #fff; padding: 0.5rem; text-align: left; }
.markdown-content td { border: 1px solid #475569; padding: 0.5rem; }
.markdown-content a { color: var(--accent); text-decoration: underline; }


/* ── 12. PAGE SPECIFIC: HOME & AUTH ─────────────────────────────────── */
.home-container { text-align: center; max-width: 800px; margin: 0 auto; }
.login-container { display: flex; justify-content: center; align-items: center; }
.login-footer { margin-top: 20px; text-align: center; font-size: 0.9rem; color: var(--text-muted); width: 100%; }
.login-form-group { margin-bottom: 20px; text-align: left; }
.login-form-group label { display: block; margin-bottom: 8px; color: var(--text-main); font-weight: 600; }
.login-form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: var(--radius-sm); font-size: 1rem; box-sizing: border-box; transition: border-color var(--transition-fast); }
.login-form-group input:focus { border-color: var(--accent); outline: none; }
.login-form-group label, .login-form-group input { font-family: var(--font-sans); font-size: 0.9rem; line-height: 1.6; }
.login-form-group input::placeholder { font-family: var(--font-sans); font-size: 0.9rem; color: #999; }

/* ── 13. PAGE SPECIFIC: ANALYSIS & REPORTS ─────────────────────────────────── */
.run-analysis-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.analysis-info { background: var(--bg-light); padding: var(--space-xl); border-radius: var(--radius-md); margin-top: var(--space-xl); }
.analysis-info h3 { color: var(--primary); margin-bottom: var(--space-lg); }
.analysis-card-heading { color: var(--primary); margin-bottom: var(--space-lg); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-lg); }
.info-card { background: white; padding: 20px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.info-card h4 { color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; }
.info-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.5; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-main); font-weight: 600; }
.form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: var(--radius-sm); font-size: 1rem; background: white; }
.reports-container { max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }
.reports-header { margin-bottom: var(--space-xl); }
.reports-header h2 { color: var(--primary); margin-bottom: var(--space-xs); }
.reports-header p { color: var(--text-muted); margin: 0; }
.reports-actions { display: flex; gap: var(--space-sm); white-space: nowrap; }
.filter-options { margin-top: var(--space-xl); padding: var(--space-lg); background: var(--bg-light); border-radius: var(--radius-md); }
.filter-options h3 { color: var(--primary); margin-bottom: var(--space-md); font-size: 1rem; }
.filter-buttons { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.filter-btn { padding: var(--space-sm) var(--space-md); border: 1px solid var(--border-color); background: white; color: var(--text-main); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; transition: all var(--transition-fast); }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.loading-text { color: var(--text-muted); font-style: italic; }
.disabled-text { color: #ccc; }
/* Form Controls for Analysis Pages */
.form-control { width: 100%; padding: var(--space-sm) var(--space-md); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.9rem; background: white; font-family: var(--font-sans); transition: border-color var(--transition-fast); }
.form-control:focus { border-color: var(--accent); outline: none; }
/* Prevent Analysis Form from lifting on hover */
.analysis-form-stable:hover { transform: none !important; box-shadow: var(--shadow-md) !important; }


/* ── 14. ERROR & EMPTY STATES ─────────────────────────────────── */
.error-container { text-align: center; padding: 60px 20px; max-width: 600px; margin: 0 auto; }
.error-icon { font-size: 4rem; margin-bottom: 20px; display: block; }
.error-title { color: var(--primary); font-size: 2rem; margin-bottom: 15px; }
.error-message { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 30px; line-height: 1.6; }
.empty-state { text-align: center; padding: 60px 20px; background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.empty-state h3 { color: var(--primary); margin-bottom: var(--space-sm); }
.empty-state p { color: var(--text-muted); margin-bottom: var(--space-lg); }
.empty-icon { font-size: 4rem; display: block; margin-bottom: 20px; }

/* ── 15. CHAT WIDGET ─────────────────────────────────── */
.chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 1500; }
.chat-toggle { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #ffffff; border: none; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(12, 49, 102, 0.4); transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(12, 49, 102, 0.5); }
.chat-toggle.active { background: var(--accent); }
.chat-panel { position: absolute; bottom: 72px; right: 0; width: 380px; height: 500px; background: #ffffff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.95); transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast); }
.chat-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.chat-header { background: var(--primary); color: #ffffff; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { margin: 0; font-size: 1rem; font-weight: 600; color: #ffffff; font-family: var(--font-sans); }
.chat-close { background: none; border: none; color: #ffffff; font-size: 1.25rem; cursor: pointer; padding: 0.25rem; opacity: 0.8; transition: opacity var(--transition-fast); }
.chat-close:hover { opacity: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; background: #f8fafc; }
.chat-message { display: flex; gap: 0.5rem; max-width: 85%; }
.user-message { align-self: flex-end; flex-direction: row-reverse; }
.ai-message { align-self: flex-start; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; background: #e2e8f0; }
.user-message .chat-avatar { background: var(--primary); }
.ai-message .chat-avatar { background: var(--accent); }
.chat-bubble { padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.88rem; line-height: 1.45; word-wrap: break-word; }
.user-message .chat-bubble { background: var(--primary); color: #ffffff; border-bottom-right-radius: 4px; }
.ai-message .chat-bubble { background: #ffffff; color: var(--text-main); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.typing-indicator .chat-bubble { display: flex; gap: 4px; padding: 0.75rem 1rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; animation: typingBounce 1.4s infinite ease-in-out; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.chat-input-form { display: flex; padding: 0.75rem; border-top: 1px solid var(--border-color); background: #ffffff; gap: 0.5rem; }
.chat-input { flex: 1; padding: 0.65rem 0.9rem; border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.88rem; outline: none; transition: border-color var(--transition-fast); }
.chat-input:focus { border-color: var(--accent); }
.chat-send { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #ffffff; border: none; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background var(--transition-fast); }
.chat-send:hover { background: var(--accent); }

/* ── 16. RESPONSIVE ─────────────────────────────────── */
.menu-checkbox { display: none; }
.menu-icon { display: none; cursor: pointer; }
@media (max-width: 768px) { .menu-icon { display: block; } .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: white; padding: 20px; border-bottom: 3px solid var(--primary); box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .menu-checkbox:checked ~ .nav-menu { display: flex; } .menu-icon span { display: block; width: 25px; height: 3px; background: var(--primary); margin: 5px 0; } .hero-cta-btn { font-size: 0.9rem; } .social-link { color: var(--accent) !important; } .social-link svg { fill: var(--accent) !important; } .social-link:hover { color: #ffffff !important; } }
@media (max-width: 600px) { .dashboard-welcome h1 { font-size: 1.5rem; } .stat-number { font-size: 1.75rem; } .quick-actions-grid { grid-template-columns: 1fr; } .data-table thead { display: none; } .data-table tbody td { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid #eee; } .data-table tbody tr { margin-bottom: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); } .chat-panel { width: calc(100vw - 48px); height: 60vh; bottom: 68px; right: 0; } }

/* ── 17. MARKETING PAGE (Landing) ─────────────────────────────────── */
.mk-stats-bar { padding: 30px 0; border-bottom: 1px solid #eee; background: #fff; }
.mk-stats-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-around; text-align: center; flex-wrap: wrap; gap: 20px; }
.mk-stat-item { min-width: 160px; }
.mk-stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); font-family: var(--font-serif); line-height: 1.2; }
.mk-stat-txt { display: block; color: var(--accent); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1.5px; margin-top: 5px; }
.mk-section { padding: 60px var(--space-lg); max-width: 1100px; margin: 0 auto; }
.mk-section-title { text-align: center; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 40px; font-size: 1.25rem; font-weight: 600; color: var(--primary); padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); display: inline-block; width: 100%; }
.mk-section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent); margin: 15px auto 0; }
.mk-about-text { max-width: 850px; margin: 0 auto 50px; text-align: left; font-size: 1.1rem; line-height: 1.7; color: var(--text-main); }
.mk-full-width-bg { background: var(--bg-light); padding: 60px 0; width: 100%; }
.mk-full-width-bg .mk-section { padding: 0 var(--space-lg); max-width: 1100px; margin: 0 auto; }
.mk-news-section { background: transparent; padding: 0; }
.mk-card h3 { color: var(--primary); margin: 10px 0; font-size: 1.1rem; font-family: var(--font-serif); }
.mk-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin: 0 0 15px 0; }
.mk-date { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; display: block; margin-bottom: 5px; }
.mk-meta { font-size: 0.8rem; color: #666; margin-bottom: 10px; display: block; }
.mk-role { color: var(--accent); text-transform: uppercase; font-size: 0.75rem; font-weight: 600; display: block; margin-bottom: 15px; }
.mk-link { color: var(--primary); font-weight: 600; text-decoration: none; transition: color 0.2s; }
.mk-link:hover { color: var(--accent); }
.mk-meta-row { display: flex; align-items: baseline; margin-bottom: 10px; gap: 10px; }
.mk-meta-row .mk-date { display: inline; margin-bottom: 0; }
.mk-meta-row .mk-meta { display: inline; margin-bottom: 0; }
.mk-meta-row .mk-date::after { content: '•'; margin-left: 10px; color: var(--text-muted); }
.mk-empty-state { text-align: center; color: #999; grid-column: 1 / -1; }
#about, #services, #news, #team { scroll-margin-top: 100px; }
@media (max-width: 768px) { .mk-stats-container { flex-direction: column; } }


/* ── 18. ARTICLE CONTENT (News Detail) ─────────────────────────────────── */
.article-page { max-width: 1200px; padding: var(--space-2xl) var(--space-lg); }
.article-header { text-align: center; margin-bottom: 40px; }
.article-header .mk-meta-row { justify-content: center; margin-bottom: 0; }
.article-header .news-date { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; }
.article-header .news-meta { color: #666; font-size: 0.8rem; }
.article-header .news-date::after { content: '•'; margin-left: 10px; color: var(--text-muted); }
.article-header h1 { color: var(--primary); margin: 20px 0; font-size: 2.5rem; }
.article-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); }
.article-content h3 { color: var(--primary); margin-top: 30px; margin-bottom: 15px; }
.article-content h4 { color: var(--primary); margin-top: 25px; margin-bottom: 10px; }
.article-content ul, .article-content ol { margin: 15px 0; padding-left: 25px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 4px solid var(--accent); padding-left: 20px; margin: 20px 0; color: #666; font-style: italic; }
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; }
.article-content th, .article-content td { border: 1px solid #ddd; padding: 12px; text-align: left; }
.article-content th { background-color: var(--primary); color: white; font-weight: 600; }
.article-content tr:nth-child(even) { background-color: #f9f9f9; }
.article-content tr:hover { background-color: #f1f1f1; }
.article-content a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.article-content a:hover { color: var(--primary); border-bottom-style: solid; }
.article-content pre, .article-content code { background-color: #f4f4f4; padding: 2px 6px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 0.9rem; }
.article-back { margin-top: 60px; text-align: center; }
.article-section { padding: var(--space-lg); margin: 0 calc(-1 * var(--space-lg)) var(--space-md); border-radius: var(--radius-md); }
.article-section:nth-of-type(even) { background: var(--bg-light); }


/* ── 19. PREVIEW & REPORT VIEWS ─────────────────────────────────── */
.preview-container { max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }
.preview-header { background: var(--bg-light); padding: var(--space-lg); border-radius: var(--radius-md); margin-bottom: var(--space-lg); }
.preview-header h2 { color: var(--primary); margin-bottom: var(--space-sm); }
.preview-header p { color: var(--text-muted); margin: 0; }
.preview-meta-row { display: flex; gap: var(--space-md); flex-wrap: wrap; font-size: 0.95rem; }
.code-viewer-controls { display: flex; justify-content: flex-end; margin-bottom: var(--space-md); }


/* ── CUSTOM ACL MODAL ─────────────────────────────────── */
.acl-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.acl-modal-overlay.active { opacity: 1; visibility: visible; }
.acl-modal-box { background: #ffffff; width: 90%; max-width: 400px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(20px); transition: transform 0.3s ease; }
.acl-modal-overlay.active .acl-modal-box { transform: translateY(0); }
.acl-modal-header { background: var(--primary); color: #ffffff; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.acl-modal-title { font-size: 1.1rem; font-weight: 600; font-family: var(--font-sans); }
.acl-modal-close { font-size: 1.5rem; cursor: pointer; opacity: 0.8; line-height: 1; }
.acl-modal-close:hover { opacity: 1; }
.acl-modal-body { padding: 1.5rem; color: var(--text-main); font-size: 1rem; line-height: 1.6; white-space: pre-line; }
.acl-modal-footer { padding: 1rem 1.5rem; background: #f8fafc; text-align: right; border-top: 1px solid var(--border-color); }