*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Segoe UI',-apple-system,sans-serif;background:#0f172a;color:#e2e8f0;min-height:100vh}
a{color:#3b82f6;text-decoration:none}a:hover{text-decoration:underline}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:220px;background:#1e293b;border-right:1px solid #334155;padding:20px 0;display:flex;flex-direction:column}
.sidebar-brand{padding:0 20px 20px;font-size:1.1rem;font-weight:700;color:#3b82f6;border-bottom:1px solid #334155}
.nav-link{display:block;padding:12px 20px;color:#94a3b8;font-size:0.9rem;font-weight:500;transition:all 0.2s}
.nav-link:hover{background:#334155;color:#fff;text-decoration:none}
.nav-link.logout{margin-top:auto;color:#ef4444}
main{padding:32px}
main.with-sidebar{margin-left:220px}
.auth-container{display:flex;align-items:center;justify-content:center;min-height:100vh}
.auth-card{background:#1e293b;border:1px solid #334155;border-radius:16px;padding:40px;width:100%;max-width:400px;text-align:center}
.auth-card h1{font-size:1.5rem;color:#3b82f6;margin-bottom:4px}
.subtitle{color:#64748b;margin-bottom:24px;font-size:0.9rem}
.auth-card input{width:100%;padding:12px 16px;margin-bottom:12px;background:#0f172a;border:1px solid #334155;border-radius:8px;color:#e2e8f0;font-size:0.95rem}
.auth-card input:focus{outline:none;border-color:#3b82f6}
.auth-link{margin-top:16px;color:#64748b;font-size:0.85rem}
.btn-primary{display:inline-block;background:#3b82f6;color:#fff;padding:12px 24px;border-radius:8px;font-weight:600;border:none;cursor:pointer;font-size:0.95rem;width:100%}
.btn-primary:hover{background:#2563eb;text-decoration:none}
.btn-secondary{display:inline-block;background:#1e293b;color:#3b82f6;border:1px solid #3b82f6;padding:8px 16px;border-radius:8px;font-weight:500;font-size:0.85rem}
.btn-outline{display:inline-block;background:transparent;color:#94a3b8;border:1px solid #334155;padding:8px 16px;border-radius:8px;font-size:0.85rem}
.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.page-header h1{font-size:1.5rem;font-weight:700}
.header-actions{display:flex;gap:8px}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:32px}
.stat-card{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:20px}
.stat-value{font-size:1.5rem;font-weight:700;color:#3b82f6}
.stat-label{color:#64748b;font-size:0.8rem;margin-top:4px}
.usage-bar{height:6px;background:#334155;border-radius:3px;margin-top:8px;overflow:hidden}
.usage-fill{height:100%;background:#3b82f6;border-radius:3px;transition:width 0.3s}
.reports-list{display:flex;flex-direction:column;gap:8px}
.report-card{display:block;background:#1e293b;border:1px solid #334155;border-radius:10px;padding:16px 20px;transition:all 0.2s}
.report-card:hover{border-color:#3b82f6;text-decoration:none}
.report-topic{font-weight:600;color:#e2e8f0;margin-bottom:6px}
.report-meta{display:flex;gap:12px;font-size:0.8rem;color:#64748b}
.status{padding:2px 8px;border-radius:4px;font-size:0.75rem;font-weight:600}
.status-complete{background:rgba(34,197,94,0.15);color:#22c55e}
.status-generating{background:rgba(59,130,246,0.15);color:#3b82f6}
.status-failed{background:rgba(239,68,68,0.15);color:#ef4444}
.status-pending{background:rgba(148,163,184,0.15);color:#94a3b8}
.report-form{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:28px;max-width:600px}
.form-group{margin-bottom:16px}
.form-group label{display:block;font-size:0.85rem;font-weight:600;color:#94a3b8;margin-bottom:6px}
.form-group input,.form-group textarea,.form-group select{width:100%;padding:10px 14px;background:#0f172a;border:1px solid #334155;border-radius:8px;color:#e2e8f0;font-size:0.9rem}
.form-group textarea{resize:vertical}
.form-group select{cursor:pointer}
.form-note{color:#64748b;font-size:0.8rem;margin-bottom:16px}
.report-content{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:32px;line-height:1.8;font-size:0.95rem}
.report-content h1{font-size:1.4rem;color:#3b82f6;margin:24px 0 12px;border-bottom:1px solid #334155;padding-bottom:8px}
.report-content h2{font-size:1.2rem;color:#60a5fa;margin:20px 0 8px}
.report-content h3{font-size:1rem;color:#93c5fd;margin:16px 0 6px}
.report-content p{margin:8px 0;color:#cbd5e1}
.report-content ul,.report-content ol{margin:8px 0 8px 24px;color:#cbd5e1}
.report-content li{margin:4px 0}
.report-content table{width:100%;border-collapse:collapse;margin:12px 0}
.report-content th{background:#334155;padding:8px;text-align:left;font-size:0.85rem}
.report-content td{padding:6px 8px;border-bottom:1px solid #334155;font-size:0.85rem}
.flash{padding:12px 16px;border-radius:8px;margin-bottom:16px;font-size:0.9rem}
.flash-error{background:rgba(239,68,68,0.15);color:#ef4444;border:1px solid rgba(239,68,68,0.3)}
.flash-success{background:rgba(34,197,94,0.15);color:#22c55e;border:1px solid rgba(34,197,94,0.3)}
.generating{text-align:center;padding:40px;color:#3b82f6;font-size:1.1rem}
.empty{color:#64748b;padding:20px;text-align:center}
@media(max-width:768px){.sidebar{display:none}main.with-sidebar{margin-left:0}}
