/* Minimal clean styling */
:root { --bg:#0b0f14; --card:#121821; --text:#e8eef5; --muted:#9fb0c3; --accent:#3aa3ff; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#0e141b; position:sticky; top:0; z-index:5; }
.topbar .brand { font-weight:700; letter-spacing:.2px; }
.topbar nav a, .topbar nav span { margin-left:12px; color:var(--muted); }
.container { max-width: 1100px; margin: 16px auto; padding: 0 12px; }
.filters { margin-bottom:12px; }
.filters select { background:var(--card); color:var(--text); border:1px solid #223; padding:6px 8px; border-radius:8px; }
.list .fax { display:flex; gap:12px; background:var(--card); padding:10px; border-radius:12px; margin-bottom:10px; border:1px solid #1a2230; }
.thumb { width:84px; height:110px; background:#09121a; display:flex; align-items:center; justify-content:center; border-radius:6px; overflow:hidden; border:1px solid #1a2230; }
.thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.no-thumb { color:#5f738a; font-weight:700; }
.meta .row { display:flex; align-items:center; justify-content:space-between; }
.meta .row.small { font-size:12px; color:var(--muted); margin-top:6px; }
.meta .title { font-weight:600; }
.empty { color:var(--muted); }

.auth { display:flex; min-height:100vh; align-items:center; justify-content:center; }
.auth .card { background:var(--card); padding:22px; border-radius:16px; min-width:300px; box-shadow: 0 10px 30px rgba(0,0,0,.3); border:1px solid #1a2230; }
.auth h1 { margin-top:0 }
.auth label { display:block; margin:10px 0 }
.auth input { width:100%; padding:8px; border-radius:8px; border:1px solid #263246; background:#0c1118; color:var(--text); }
.auth .error { background:#361a1a; border:1px solid #703; color:#fbb; padding:8px; border-radius:8px; }

.viewer h2 { margin:8px 0 6px; }
.viewer .meta { margin-bottom: 12px; color:var(--muted); }
.page-picker .pages { display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap:12px; }
.page-picker .page { background:#0f141c; border:1px solid #1a2230; border-radius:10px; padding:8px; display:flex; flex-direction:column; gap:6px; }
.page-picker img { width:100%; height:auto; border-radius:6px; display:block; }
.page-picker input[type=checkbox] { accent-color: #49a7ff; width:18px; height:18px; }
.page-picker .actions { margin-top:12px; }
button { background: linear-gradient(180deg, #49a7ff, #1273d1); border:none; padding:10px 14px; border-radius:10px; color:white; font-weight:600; cursor:pointer; }
button:hover { filter: brightness(1.05); }
