* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }

/* ========================= WALL ========================= */

body.wall {
  background: radial-gradient(120% 120% at 50% 20%, #10131f 0%, #05060b 70%);
  color: #fff;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
}

.stage { position: fixed; inset: 0; background: #05060b; overflow: hidden; }

.layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.4s ease;
  animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

#empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease;
}
#empty.show { opacity: 1; }
.empty-emoji { font-size: 64px; filter: grayscale(.2); }
.empty-title { font-size: 30px; font-weight: 600; letter-spacing: .5px; }
.empty-send { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty-qr {
  width: 160px; height: 160px;
  background: #fff; padding: 10px; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.empty-sub { font-size: 17px; color: #9aa0b5; }
.empty-sub span { color: #f2b632; font-weight: 600; }

.brand {
  position: fixed; top: 28px; left: 34px;
  z-index: 20; pointer-events: none;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
  max-width: 70vw;
}
.brand h1 {
  font-size: clamp(24px, 4.2vw, 48px);
  font-weight: 700; letter-spacing: 1px;
  line-height: 1.1;
}
.brand p {
  margin-top: 8px; font-size: clamp(13px, 1.6vw, 17px);
  color: #cdd2e3; letter-spacing: .3px;
}

.live {
  position: fixed; top: 30px; right: 34px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 2px; font-weight: 600; color: #cdd2e3;
}
.live .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #38d37a;
  box-shadow: 0 0 0 0 rgba(56,211,122,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56,211,122,.6); }
  70% { box-shadow: 0 0 0 12px rgba(56,211,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,211,122,0); }
}

.counter {
  position: fixed; right: 34px; bottom: 105px; z-index: 20;
  font-size: 15px; color: #cdd2e3; letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}

/* ========================= COUNTDOWN ========================= */

.cd {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 22; text-align: center; pointer-events: none;
  transition: opacity .6s ease;
}
.cd.hidden { opacity: 0; }
.cd-title {
  font-size: 14px; letter-spacing: 3px; text-transform: uppercase;
  color: #f2b632; font-weight: 600; margin-bottom: 14px;
}
.cd-row {
  display: flex; align-items: center; gap: 10px;
}
.cd-group {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.cd-num {
  font-size: 56px; font-weight: 700; letter-spacing: 2px; color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 80px; text-align: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 10px 12px;
  backdrop-filter: blur(8px);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  transition: transform .2s ease;
}
.cd-sep {
  font-size: 42px; font-weight: 700; color: rgba(255,255,255,.35);
  margin-bottom: 18px;
  animation: cdBlink 1s ease-in-out infinite;
}
@keyframes cdBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}
.cd-label {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.5); font-weight: 600;
}

/* Countdown when wall has photos — compact bottom-center above filmstrip */
.cd.compact {
  top: auto; left: 50%; right: auto; bottom: 90px;
  transform: translateX(-50%);
}
.cd.compact .cd-title { font-size: 10px; margin-bottom: 6px; letter-spacing: 2px; }
.cd.compact .cd-num { font-size: 22px; min-width: 40px; padding: 5px 7px; }
.cd.compact .cd-sep { font-size: 20px; margin-bottom: 10px; }
.cd.compact .cd-label { font-size: 9px; }

.cd .done {
  font-size: 28px; font-weight: 700; color: #f2b632;
  letter-spacing: 1px; text-shadow: 0 2px 20px rgba(242,182,50,.5);
  animation: cdPulse 2s ease-in-out infinite;
}
@keyframes cdPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.04); }
}

/* ========================= COUNTDOWN MODE ========================= */
/* Active countdown: photos shrink to right, countdown big on left */

body.countdown-mode .stage {
  left: auto; width: 28vw;
}
body.countdown-mode .cd.compact {
  top: 50%; left: 36vw; right: auto; bottom: auto;
  transform: translate(-50%, -50%);
}
body.countdown-mode .cd.compact .cd-title {
  font-size: 14px; letter-spacing: 3px; margin-bottom: 14px;
}
body.countdown-mode .cd.compact .cd-num {
  font-size: 56px; min-width: 80px; padding: 10px 12px;
}
body.countdown-mode .cd.compact .cd-sep {
  font-size: 42px; margin-bottom: 18px;
}
body.countdown-mode .cd.compact .cd-label {
  font-size: 11px; letter-spacing: 2px;
}
body.countdown-mode .brand {
  left: 36vw; transform: translateX(-50%); text-align: center;
}
body.countdown-mode .filmstrip {
  left: auto; right: 0; width: 28vw;
}
body.countdown-mode .counter {
  right: 20px; bottom: 105px;
}
body.countdown-mode .controls {
  left: 20px; bottom: 105px;
}

/* ========================= PERSISTENT QR ========================= */

.qr-persistent {
  position: fixed; bottom: 105px; right: 24px; z-index: 21;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,255,255,.95); padding: 10px; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  transition: opacity .5s ease, transform .5s ease;
}
.qr-persistent.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.qr-persistent-img { width: 80px; height: 80px; display: block; }
.qr-persistent-text {
  font-size: 10px; font-weight: 700; color: #1c2140;
  letter-spacing: 1px; text-transform: uppercase;
}
body.countdown-mode .qr-persistent {
  bottom: auto; right: auto;
  left: 36vw; top: 68%; transform: translateX(-50%);
}
body.countdown-mode .qr-persistent.hidden {
  transform: translateX(-50%) translateY(10px);
}

/* ========================= FIREWORKS ========================= */

.fireworks-canvas {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none; width: 100%; height: 100%;
}

.controls {
  position: fixed; left: 34px; bottom: 105px; z-index: 30;
  display: flex; gap: 10px; align-items: center;
  transition: opacity .5s ease;
}
.controls.hidden { opacity: 0; pointer-events: none; }
.ctl {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: 14px; letter-spacing: .5px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .2s ease, transform .1s ease;
}
.ctl:hover { background: rgba(255,255,255,.22); }
.ctl:active { transform: scale(.96); }
.ctl.danger:hover { background: rgba(255,80,80,.4); border-color: rgba(255,80,80,.5); }

.toast {
  position: fixed; top: 30px; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 40; background: rgba(20,26,45,.9);
  border: 1px solid rgba(242,182,50,.6); color: #f2b632;
  padding: 10px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .35s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========================= FILMSTRIP ========================= */

.filmstrip {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
  padding: 10px 20px 14px; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  background: linear-gradient(transparent, rgba(5,6,11,.85) 30%);
  transition: opacity .5s ease;
}
.filmstrip.hidden { opacity: 0; pointer-events: none; }
.film-label {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: #f2b632; font-weight: 700;
}
.film-label .off { opacity: 0; }
.film-track {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth; padding: 4px 6px 8px;
  max-width: 90vw; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.film-track::-webkit-scrollbar { height: 4px; }
.film-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.film-item {
  flex: 0 0 auto; width: 64px; height: 48px;
  border-radius: 6px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  opacity: .45; transition: all .3s ease;
}
.film-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-item.current {
  border-color: rgba(255,255,255,.7);
  opacity: 1; transform: scale(1.08);
}
.film-item.next {
  border-color: #f2b632;
  opacity: 1;
  box-shadow: 0 0 10px rgba(242,182,50,.45);
}
.film-item:hover { opacity: .85; }

/* ========================= UPLOAD ========================= */

body.upload {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(160deg, #1d2a52 0%, #3a1d52 55%, #521d3e 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.upload-card {
  width: 100%; max-width: 460px;
  background: rgba(255,255,255,.97);
  border-radius: 22px; padding: 30px 26px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  text-align: center;
}

.upload-head .upload-emoji { font-size: 46px; }
.upload-head h1 { font-size: 26px; color: #1c2140; margin-top: 6px; }
.upload-head p { color: #6a6f8e; margin-top: 6px; font-size: 15px; }

.drop {
  margin-top: 20px; border: 2px dashed #c3c7dd;
  border-radius: 16px; padding: 18px 16px;
  transition: all .2s ease; background: #f7f8fc;
}
.drop.drag { border-color: #f2b632; background: #fff7e6; }
.drop-hint { color: #8a8fa8; font-size: 14px; }

#prompt .big {
  display: inline-block; background: #1c2140; color: #fff;
  border: none; font-size: 17px; font-weight: 600;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  transition: transform .1s ease, background .2s ease;
}
#prompt .big:hover { background: #2a3060; }
#prompt .big:active { transform: scale(.97); }
#prompt .big.alt { background: #eef0f7; color: #1c2140; border: 1px solid #d5d9ea; }
#prompt .big.alt:hover { background: #e2e5f2; }
#prompt .btn-col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
#prompt .hint { margin-top: 14px; color: #8a8fa8; font-size: 13px; }

.hidden { display: none; }

#preview img {
  max-width: 100%; max-height: 340px; border-radius: 12px;
  object-fit: contain; background: #1c2140;
}

.row { display: flex; gap: 12px; margin-top: 16px; justify-content: center; }
.row button {
  flex: 1; border: none; border-radius: 999px; cursor: pointer;
  font-size: 15px; font-weight: 600; padding: 13px 10px;
  transition: transform .1s ease, opacity .2s ease;
}
.row button:active { transform: scale(.97); }
.row button:disabled { opacity: .5; cursor: wait; }
.row .primary { background: #f2b632; color: #1c2140; }
.row .primary:hover { background: #f6c65c; }
.row .ghost { background: #eef0f7; color: #1c2140; }
.row .ghost:hover { background: #e2e5f2; }

.status { margin-top: 16px; font-size: 15px; font-weight: 600; color: #1c2140; min-height: 22px; }
.status.error { color: #d1362f; }

/* ========================= ADMIN ========================= */

:root {
  --bg: #0f1422;
  --bg-elevated: #151c2e;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --ghost-bg: rgba(15,20,34,.08);
  --ghost-border: rgba(15,20,34,.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

body.admin {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(245,158,11,.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(15,20,34,.4) 0%, transparent 50%),
    var(--bg);
  padding: 24px;
  color: var(--text);
}
.admin-wrap { max-width: 1100px; margin: 0 auto; }

/* Header */
.admin-header {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between; margin-bottom: 28px;
  padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #fbbf24 100%);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
}
.admin-header h1 { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.subtitle { color: #94a3b8; font-size: 15px; margin-top: 2px; }

.header-right { display: flex; gap: 24px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-value { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: #64748b; }

/* Login View */
.login-view { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); padding: 40px 36px;
  border: 1px solid var(--border);
}
.login-icon { font-size: 40px; margin-bottom: 8px; }
.login-card h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-hint { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }

.field { margin-bottom: 20px; }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; padding: 14px 16px; padding-right: 52px;
  border-radius: 10px; border: 1.5px solid var(--border);
  font-size: 16px; background: var(--card); color: var(--text);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.input-wrap input::placeholder { color: #94a3b8; }
.toggle-pwd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.toggle-pwd:hover { background: var(--ghost-bg); color: var(--text); }
.toggle-pwd svg { display: block; }
.toggle-pwd svg.hidden { display: none; }

.err { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 20px; }
.err.hidden { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 10px; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .15s ease; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #1e293b; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 4px 14px rgba(245,158,11,.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); box-shadow: 0 4px 14px rgba(239,68,68,.35); }
.btn-ghost { background: var(--ghost-bg); color: var(--text); border: 1px solid var(--ghost-border); }
.btn-ghost:hover:not(:disabled) { background: rgba(15,20,34,.12); }
.btn-block { width: 100%; }
.btn-text { display: inline; }
.btn-loader {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
.btn-loader:not(.hidden) { display: block; }
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.login-footer code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* Panel View */
.panel-toolbar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
  padding: 18px 22px; background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.toolbar-left .photo-count {
  display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--text);
}
.count-value { background: linear-gradient(135deg, var(--primary), #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.plural { color: var(--text-muted); font-weight: 400; }
.toolbar-right { display: flex; gap: 10px; flex-wrap: wrap; }

/* Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.photo-card {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.photo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.photo-card .thumb {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--bg-elevated);
}
.photo-card .meta { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.photo-card .name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.photo-card .details { font-size: 12px; color: var(--text-muted); margin-top: auto; }
.photo-card .card-actions {
  display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border);
  justify-content: flex-end; background: #fafbfc;
}
.photo-card .card-actions a, .photo-card .card-actions button {
  width: 40px; height: 40px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 18px;
  background: var(--card); border: 1px solid var(--border); cursor: pointer; color: var(--text);
  transition: all .15s ease; text-decoration: none;
}
.photo-card .card-actions a:hover, .photo-card .card-actions button:hover {
  background: var(--primary); border-color: var(--primary); color: #1e293b; transform: scale(1.05);
}
.photo-card .card-actions button.del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Empty State */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  grid-column: 1 / -1; padding: 60px 24px; text-align: center;
  background: var(--card); border-radius: var(--radius-lg); border: 1px dashed var(--border);
}
.empty-state.hidden { display: none; }
.empty-icon { color: var(--border); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 15px; }

/* Settings Panel */
.settings-panel {
  margin-top: 24px; padding: 22px 24px;
  background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.settings-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 18px;
}
.settings-row label {
  display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.settings-input-group {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.settings-input {
  padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 15px; background: var(--card); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s; flex: 1; min-width: 200px;
}
.settings-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.settings-hint { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.settings-saved {
  font-size: 13px; font-weight: 600; color: #16a34a; margin-top: 8px;
  animation: fadeIn .2s ease;
}
.settings-saved.hidden { display: none; }

/* Toggle switch */
.settings-toggle-group {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #cbd5e1; border-radius: 999px;
  transition: background .2s ease;
}
.switch .slider::before {
  content: ""; position: absolute; width: 20px; height: 20px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(245,158,11,.35); }

/* File input + upload status */
.settings-file {
  padding: 9px 12px; border-radius: 8px; border: 1.5px dashed var(--border);
  background: var(--card); font-size: 13px; color: var(--text-muted);
  flex: 1; min-width: 200px; cursor: pointer;
}
.settings-hint.ok { color: #16a34a; font-weight: 600; }
.settings-hint.err { color: var(--danger); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); animation: fadeIn .2s ease;
}
.modal-content {
  position: relative; width: 100%; max-width: 420px;
  background: var(--card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); padding: 28px 24px;
  animation: slideUp .25s ease; border: 1px solid var(--border);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.modal-content h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.modal-content p { color: var(--text-muted); font-size: 15px; line-height: 1.5; margin-bottom: 24px; }
.modal-content strong { color: var(--text); }

.modal-pwd-field { margin-bottom: 20px; }
.modal-pwd-field label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.modal-pwd-field input {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 15px; background: var(--card); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.modal-pwd-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
.modal-actions .btn { flex: 1; max-width: 140px; }

/* Visually hidden */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 768px) {
  .admin-header { flex-direction: column; align-items: flex-start; }
  .header-right { width: 100%; justify-content: space-between; }
  .panel-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { width: 100%; }
  .toolbar-right .btn { flex: 1; justify-content: center; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}
@media (max-width: 480px) {
  body.admin { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .photo-grid { grid-template-columns: 1fr; }
  .header-right { flex-direction: column; align-items: flex-start; gap: 16px; }
}
