*{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:#10b981;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:#10b981;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:#10b981;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}
.btn-primary{display:inline-block;background:#10b981;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:#059669;text-decoration:none}
.btn-secondary{display:inline-block;background:#1e293b;color:#10b981;border:1px solid #10b981;padding:8px 16px;border-radius:8px;font-weight:500;font-size:0.85rem;cursor:pointer}
.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}
.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:#10b981}
.stat-label{color:#64748b;font-size:0.8rem;margin-top:4px}
.books-list,.chapters-list{display:flex;flex-direction:column;gap:8px}
.book-card,.chapter-card{display:flex;align-items:center;gap:12px;background:#1e293b;border:1px solid #334155;border-radius:10px;padding:16px 20px;transition:all 0.2s}
.book-card:hover,.chapter-card:hover{border-color:#10b981;text-decoration:none}
.book-title,.ch-title{font-weight:600;color:#e2e8f0;flex:1}
.book-meta,.ch-meta{font-size:0.8rem;color:#64748b}
.ch-num{background:#10b981;color:#0f172a;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.8rem}
.genre{background:rgba(16,185,129,0.15);color:#10b981;padding:2px 8px;border-radius:4px;font-size:0.75rem}
.status{padding:2px 8px;border-radius:4px;font-size:0.75rem;font-weight:600}
.status-draft{background:rgba(59,130,246,0.15);color:#3b82f6}
.status-outline{background:rgba(148,163,184,0.15);color:#94a3b8}
.status-complete{background:rgba(34,197,94,0.15);color:#22c55e}
.status-writing{background:rgba(245,158,11,0.15);color:#f59e0b}
.report-form,.editor-form,.ai-edit-form{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:28px;max-width:700px;margin-bottom:16px}
.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}
.editor{width:100%;min-height:400px;padding:16px;background:#0f172a;border:1px solid #334155;border-radius:8px;color:#e2e8f0;font-size:0.95rem;line-height:1.7;font-family:Georgia,serif;resize:vertical;margin-bottom:12px}
.editor-actions{margin-bottom:16px}
.book-desc{color:#64748b;margin-bottom:20px}
.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)}
.empty{color:#64748b;padding:20px;text-align:center}
.auth-link{margin-top:16px;color:#64748b;font-size:0.85rem}
@media(max-width:768px){.sidebar{display:none}main.with-sidebar{margin-left:0}}
