/* EventLens — shared premium dark theme */
:root {
  --bg: #0e0f13; --panel: #16181f; --panel-2: #1d2029; --line: #2a2d38;
  --text: #e9e7e1; --muted: #989ba4;
  --gold: #c9a35c; --gold-2: #e0be7d; --danger: #d06060; --ok: #5fae7f;
  --radius: 14px; --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: .2px; }
a { color: var(--gold-2); text-decoration: none; }
img { max-width: 100%; display: block; }

/* layout */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
  padding: 14px 22px; background: rgba(14,15,19,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 21px; color: var(--gold); font-style: italic; }
.brand small { color: var(--muted); font-style: normal; font-family: inherit; font-size: 12px; margin-left: 8px; letter-spacing: 1.5px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 7px 13px; border-radius: 999px; font-size: 14px; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--panel-2); }
.spacer { flex: 1; }
.userchip { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }
.pagehead { display: flex; align-items: baseline; gap: 14px; margin: 6px 0 20px; flex-wrap: wrap; }
.pagehead h1 { font-size: 26px; }
.pagehead .sub { color: var(--muted); font-size: 14px; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; border: 0;
  background: var(--gold); color: #17130a; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 10px; transition: .15s;
}
.btn:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; }
input, select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }

/* auth */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(201,163,92,.13), transparent 60%), var(--bg); }
.authcard { width: 400px; max-width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px; box-shadow: var(--shadow); }
.authcard .brand { font-size: 30px; display: block; text-align: center; margin-bottom: 4px; }
.authcard .tag { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.authtabs { display: flex; gap: 6px; margin-bottom: 14px; }
.authtabs button { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 8px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px; }
.authtabs button.active { color: var(--gold-2); border-color: var(--gold); }

/* chips & badges */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.chip.active { color: #17130a; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line); color: var(--muted); }
.badge.gold { color: var(--gold-2); border-color: var(--gold); }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.red { color: var(--danger); border-color: var(--danger); }

/* photo grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s; position: relative; }
.pcard:hover { transform: translateY(-3px); border-color: #3a3e4d; box-shadow: var(--shadow); }
.pcard .ph { aspect-ratio: 4/3; overflow: hidden; cursor: pointer; position: relative; background: #0a0b0e; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .meta { padding: 10px 13px 12px; display: flex; align-items: center; gap: 8px; }
.pcard .meta .t { flex: 1; min-width: 0; }
.pcard .meta .t b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .meta .t span { font-size: 12px; color: var(--muted); }
.iconbtn { background: none; border: 0; cursor: pointer; font-size: 17px; color: var(--muted); padding: 4px; border-radius: 7px; }
.iconbtn:hover { color: var(--gold-2); background: var(--panel-2); }
.iconbtn.on { color: var(--gold); }
.tagline { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; }

/* album cards */
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .18s; }
.acard:hover { transform: translateY(-3px); border-color: var(--gold); }
.acard .ph { aspect-ratio: 16/9; background: #0a0b0e; }
.acard .ph img { width: 100%; height: 100%; object-fit: cover; }
.acard .meta { padding: 13px 15px; }
.acard .meta b { font-family: Georgia, serif; font-size: 16.5px; }
.acard .meta div { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* panels, stats, tables */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-family: Georgia, serif; color: var(--gold-2); }
.stat span { color: var(--muted); font-size: 12.5px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; padding: 9px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,.015); }

/* clusters & faces */
.cluster { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.cluster .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.faces { display: flex; gap: 8px; flex-wrap: wrap; }
.facecrop { width: 68px; height: 68px; border-radius: 10px; background-color: #0a0b0e; background-repeat: no-repeat;
  border: 2px solid var(--line); cursor: pointer; flex: none; }
.facecrop.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,163,92,.35); }
.facecrop.big { width: 110px; height: 110px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(5,6,8,.82); z-index: 100; display: grid; place-items: center; padding: 20px; }
.viewer { max-width: 980px; width: 100%; }
.viewer .img { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.viewer .img img { width: 100%; max-height: 74vh; object-fit: contain; }
.viewer .bar { display: flex; align-items: center; gap: 10px; padding: 14px 4px; flex-wrap: wrap; }
.viewer .bar .t { flex: 1; }
.dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: 480px; max-width: 96vw; max-height: 90vh; overflow: auto; }
.dialog h3 { margin-bottom: 14px; }
.watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: rgba(255,255,255,.30); font-size: 20px; transform: rotate(-18deg); text-shadow: 0 1px 6px rgba(0,0,0,.5); letter-spacing: 2px; }

/* misc */
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--panel-2); border: 1px solid var(--gold); color: var(--text);
  padding: 11px 20px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.notice { background: rgba(201,163,92,.09); border: 1px solid rgba(201,163,92,.4); color: var(--gold-2);
  border-radius: 12px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 18px; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* admin shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 220px; flex: none; border-right: 1px solid var(--line); padding: 20px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .brand { padding: 4px 12px 18px; display: block; }
.side a { display: block; color: var(--muted); padding: 9px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 2px; }
.side a.active, .side a:hover { background: var(--panel-2); color: var(--text); }
.side a .badge { float: right; }
.main { flex: 1; padding: 26px 30px 80px; min-width: 0; }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; display: flex; gap: 4px; overflow-x: auto; padding: 10px; }
  .side .brand { padding: 6px 10px; }
  .side a { white-space: nowrap; }
  .main { padding: 18px 16px 60px; }
}
