:root {
  --bg: #0f0f12;
  --card: #1a1a20;
  --fg: #f5f5f7;
  --muted: #9a9aa3;
  --accent: #BA1FB5;
  --accent2: #6c5ce7;
  --border: #2a2a32;
  --danger: #ff5252;
  --ok: #2ecc71;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display:flex; align-items:center; justify-content:space-between; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { display:flex; align-items:center; gap:12px; color: var(--fg); font-weight: 600; }
.brand:hover { text-decoration: none; }
.logo { height: 36px; width: auto; }
nav { display:flex; gap: 16px; align-items:center; }
nav .user { color: var(--muted); font-size: 14px; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
h1, h2, h3 { margin-top: 0; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-info { background: #1d2a3a; }
.flash-ok { background: #1d3a2a; color: #b6f0c8; }
.flash-error { background: #3a1d1d; color: #ffb0b0; }

.btn { display:inline-block; padding:10px 16px; background: var(--accent); color: white; border:none; border-radius: 8px; cursor:pointer; font-weight: 600; font-size: 14px; }
.btn:hover { opacity: 0.9; text-decoration: none; color: white; }
.btn-secondary { background: #333; }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 12px; }

.form-group { margin-bottom: 16px; }
.form-group label { display:block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; background: #0a0a0d; color: var(--fg); border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
}
.form-group input:focus { outline: none; border-color: var(--accent); }

.login-box { max-width: 420px; margin: 60px auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.thumb { position: relative; aspect-ratio: 1/1; background: #000; border-radius: 8px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display:block; }
.thumb .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; display:flex; align-items:center; justify-content:center; transition: opacity .2s; }
.thumb:hover .overlay { opacity: 1; }
.thumb .check { position: absolute; top: 8px; left: 8px; }

.albums-list { list-style: none; padding: 0; }
.albums-list li { padding: 12px 16px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); display:none; align-items:center; justify-content:center; z-index: 1000; flex-direction: column; padding: 24px; }
.lightbox.open { display:flex; }
.lightbox img { max-width: 95vw; max-height: 80vh; object-fit: contain; }
.lightbox .lb-actions { margin-top: 16px; display:flex; gap: 12px; }
.lightbox .close { position: absolute; top: 16px; right: 24px; color:white; font-size: 32px; cursor:pointer; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }

.footer { text-align:center; padding: 32px; color: var(--muted); }
.footer a { color: var(--muted); }
.badge { display:inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #333; }
.badge-admin { background: var(--accent2); }
.badge-manager { background: var(--accent); }
