/* admin.css — Admin-only additions (pairs with style.css) */

/* ── Login ────────────────────────────────────────────────────────────── */
.admin-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 2rem;
}
.admin-login-box {
  max-width: 320px; width: 100%; text-align: center;
}
.admin-login-box h1 {
  font-weight: 200; font-size: 1.4rem; letter-spacing: .15em;
  text-transform: uppercase; margin: 1rem 0 1.5rem; color: #999;
}
.admin-logo { height: 60px; width: auto; filter: invert(1); opacity: .7; }
.admin-login-box form { display: flex; flex-direction: column; gap: .75rem; }
.admin-login-box input {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: #ddd; padding: .65rem .9rem; font-size: .95rem; border-radius: 4px;
  font-family: inherit;
}
.admin-login-box input:focus { outline: none; border-color: rgba(255,255,255,.3); }
.admin-login-box button {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #ccc; padding: .6rem; font-size: .9rem; cursor: pointer;
  border-radius: 4px; font-family: inherit; letter-spacing: .05em;
}
.admin-login-box button:hover { background: rgba(255,255,255,.14); color: #fff; }
.admin-error { color: #e55; font-size: .85rem; }

/* ── Admin bar (fixed top) ────────────────────────────────────────────── */
.adm-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .5rem 1rem; background: rgba(22,22,22,.96);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.adm-brand { display: flex; align-items: center; }
.adm-logo { height: 32px; width: auto; filter: invert(1); opacity: .55; }
.adm-tabs { display: flex; gap: .15rem; margin-left: .5rem; }
.adm-tab {
  background: none; border: none; color: #999; font-size: .82rem;
  padding: .4rem .75rem; cursor: pointer; border-radius: 4px;
  font-family: inherit; letter-spacing: .03em; transition: all .12s;
}
.adm-tab:hover { color: #bbb; background: rgba(255,255,255,.05); }
.adm-tab.active { color: #ddd; background: rgba(255,255,255,.08); }
.adm-tools { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.adm-gear {
  background: none; border: none; color: #999; font-size: 1.1rem;
  cursor: pointer; padding: .3rem;
}
.adm-gear:hover { color: #ccc; }
.adm-signout {
  color: #888; font-size: .78rem; text-decoration: none; letter-spacing: .04em;
}
.adm-signout:hover { color: #aaa; }

/* ── Settings dropdown ────────────────────────────────────────────────── */
.adm-settings-drop {
  position: fixed; top: 48px; right: 1rem; z-index: 55;
  background: rgba(30,30,30,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; padding: .75rem 1rem; min-width: 260px;
  backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.adm-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 0; gap: .5rem; cursor: default;
}
.adm-toggle-row span { color: #bbb; font-size: .85rem; }
.adm-toggle {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #bbb; padding: .25rem .6rem; font-size: .78rem; cursor: pointer;
  border-radius: 4px; min-width: 44px; text-align: center; font-family: inherit;
}
.adm-toggle:hover { border-color: rgba(255,255,255,.25); }
.adm-toggle.on { background: rgba(40,160,80,.2); border-color: rgba(40,160,80,.5); color: rgba(40,160,80,.9); }
.adm-tool-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: #aaa; padding: .4rem 0;
  font-size: .82rem; cursor: pointer; font-family: inherit;
}
.adm-tool-btn:hover { color: #ddd; }
.adm-tool-btn:disabled { opacity: .4; cursor: default; }
.adm-tool-status { font-size: .75rem; color: #888; display: block; padding-top: .3rem; }
.adm-settings-drop hr {
  border: none; border-top: 1px solid rgba(255,255,255,.06); margin: .5rem 0;
}

/* ── Content area ─────────────────────────────────────────────────────── */
.adm-content { padding-top: 56px; min-height: 100dvh; }

/* ── Pill filters bar ─────────────────────────────────────────────────── */
.adm-pills {
  position: sticky; top: 48px; z-index: 35;
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .65rem 1rem; background: rgba(30,30,30,.95);
  border-bottom: 1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
}
.adm-search {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #ddd; padding: .4rem .7rem; font-size: .85rem; border-radius: 4px;
  width: 200px; font-family: inherit;
}
.adm-search:focus { outline: none; border-color: rgba(255,255,255,.25); }
.adm-pill-group { display: flex; gap: .3rem; flex-wrap: wrap; }
.adm-pill {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: #aaa; padding: .25rem .6rem; font-size: .75rem; cursor: pointer;
  border-radius: 20px; font-family: inherit; transition: all .12s;
}
.adm-pill:hover { border-color: rgba(255,255,255,.2); color: #bbb; }
.adm-pill.active { background: rgba(255,255,255,.12); color: #ddd; border-color: rgba(255,255,255,.25); }
.adm-pill-add { border-style: dashed; }
.adm-pill-add:hover { color: #ddd; border-color: rgba(255,255,255,.3); }
.adm-count { color: #888; font-size: .78rem; margin-left: auto; white-space: nowrap; }

/* ── Gallery grid (reuses .gr from style.css layout where possible) ──── */
.adm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: .5rem; padding: .8rem 1rem;
}
.adm-tile {
  position: relative; cursor: pointer; border-radius: 4px;
  overflow: hidden; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: border-color .15s;
}
.adm-tile:hover { border-color: rgba(255,255,255,.15); }
.adm-tile.selected { border-color: rgba(255,255,255,.35); }
.adm-tile img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; opacity: .85;
}
.adm-tile-noimg {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,.02);
  color: #555; font-size: .75rem; font-style: italic;
}
.adm-tile-info { padding: .35rem .45rem; font-size: .73rem; color: #bbb; line-height: 1.3; }
.adm-tile-title { color: #eee; font-style: italic; }
.adm-tile-meta { color: #888; font-size: .68rem; margin-top: .1rem; }
.adm-tile-badges {
  position: absolute; top: .3rem; right: .3rem;
  display: flex; gap: .2rem;
}
.adm-badge {
  font-size: .58rem; padding: .12rem .3rem; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.adm-badge-sale { background: rgba(40,160,80,.85); color: #fff; }
.adm-badge-lic  { background: rgba(60,120,200,.85); color: #fff; }
.adm-badge-sold { background: rgba(180,60,60,.75); color: #fff; }
.adm-badge-nfs  { background: rgba(120,120,120,.7); color: #ddd; }

/* ── Side panel — capture-panel pattern ────────────────────────────────── */
:root { --adm-panel-w: 480px; }
@media (max-width: 600px) { :root { --adm-panel-w: 90vw; } }

.adm-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--adm-panel-w); max-width: 94vw;
  z-index: 60;
  background: rgba(20,20,20,.97);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border-left: 1px solid rgba(255,255,255,.08);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.adm-panel.open { transform: translateX(0); }

/* Squeeze page when panel open (like capture panel) */
body.adm-panel-open {
  transition: margin-right .28s cubic-bezier(.4,0,.2,1);
  margin-right: var(--adm-panel-w);
}
body.adm-panel-open .adm-bar {
  right: var(--adm-panel-w);
  transition: right .28s cubic-bezier(.4,0,.2,1);
}

.adm-panel-inner {
  flex: 1 1 auto; overflow-y: auto;
  padding: 1rem 1.1rem 3rem;
}
.adm-panel-close {
  position: sticky; top: 0; float: right;
  background: rgba(20,20,20,.9); border: none; color: #777;
  font-size: 1.3rem; cursor: pointer; padding: .4rem .5rem; z-index: 5;
}
.adm-panel-close:hover { color: #ddd; }
.adm-panel-title {
  font-size: 1.05rem; font-weight: 400; font-style: italic; color: #ddd;
  margin: 0; padding: .5rem 0 0;
}
.adm-panel-subtitle {
  font-size: .82rem; color: #888; margin: 0 0 .3rem;
}
.adm-panel-hero {
  width: 100%; border-radius: 4px; margin: .5rem 0; opacity: .8;
  max-height: 260px; object-fit: contain; background: rgba(0,0,0,.3);
}
.adm-panel-section {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: .7rem 0; margin-top: .2rem;
}
.adm-panel-section-title {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: #999; margin-bottom: .5rem; font-weight: 500;
}
.adm-muted-inline { text-transform: none; letter-spacing: 0; font-size: .63rem; color: #777; }

/* ── Form fields ──────────────────────────────────────────────────────── */
.adm-field {
  display: flex; align-items: flex-start; gap: .5rem;
  margin-bottom: .4rem; font-size: .82rem;
}
.adm-field-label {
  flex: 0 0 95px; color: #aaa; font-size: .75rem;
  padding-top: .3rem; text-align: right;
}
.adm-field-value { flex: 1; color: #ddd; }
.adm-field select, .adm-field input, .adm-field textarea {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #eee; padding: .28rem .45rem; font-size: .8rem; border-radius: 3px;
  width: 100%; font-family: inherit; box-sizing: border-box;
}
.adm-field select:focus, .adm-field input:focus, .adm-field textarea:focus {
  outline: none; border-color: rgba(255,255,255,.25);
}
.adm-field textarea { resize: vertical; min-height: 48px; line-height: 1.4; }

.adm-field-row {
  display: flex; gap: .5rem; margin-bottom: .4rem; padding-left: 100px;
}
.adm-field-sm { display: flex; align-items: center; gap: .25rem; flex: 1; }
.adm-field-sm label { font-size: .68rem; color: #aaa; flex: 0 0 auto; }
.adm-field-sm input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #eee; padding: .28rem .35rem; font-size: .8rem; border-radius: 3px;
  width: 100%; font-family: inherit; box-sizing: border-box;
}
.adm-field-sm input:focus { outline: none; border-color: rgba(255,255,255,.25); }

/* ── Save button (sticky footer in panel) ─────────────────────────────── */
.adm-panel-footer {
  position: sticky; bottom: 0; padding: .7rem 0;
  background: rgba(20,20,20,.95); border-top: 1px solid rgba(255,255,255,.06);
}
.adm-btn-save {
  width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #ccc; padding: .5rem; font-size: .88rem; cursor: pointer;
  border-radius: 4px; font-family: inherit; transition: all .15s;
}
.adm-btn-save:hover { background: rgba(255,255,255,.14); color: #fff; }
.adm-btn-save.saving { opacity: .5; pointer-events: none; }
.adm-btn-save.saved { border-color: rgba(80,180,100,.5); color: rgba(80,180,100,.9); }

/* ── Image cards in panel ─────────────────────────────────────────────── */
.adm-images {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .4rem;
}
.adm-img-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 4px; overflow: hidden;
}
.adm-img-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; opacity: .8;
}
.adm-img-info { padding: .25rem .35rem; }
.adm-img-file {
  font-size: .58rem; color: #888; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; margin-bottom: .15rem;
}
.adm-img-role {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #ddd; padding: .12rem .25rem; font-size: .68rem; border-radius: 2px;
  width: 100%; font-family: inherit; box-sizing: border-box;
}
.adm-img-role:focus { outline: none; border-color: rgba(255,255,255,.25); }
.adm-empty { color: #777; font-size: .8rem; font-style: italic; }
.adm-empty-state { padding: 2rem 1rem; color: #777; font-style: italic; text-align: center; }

/* ── Edition cards ────────────────────────────────────────────────────── */
.adm-edition {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 4px; padding: .4rem .55rem; margin-bottom: .3rem;
}
.adm-edition-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .1rem;
}
.adm-edition-label { font-size: .78rem; font-weight: 600; color: #ccc; }
.adm-edition-detail { font-size: .7rem; color: #888; }

/* ── Exhibition items ─────────────────────────────────────────────────── */
.adm-exh-item { color: #bbb; font-size: .78rem; padding: .1rem 0; }

/* ── Keyword pill editor ──────────────────────────────────────────────── */
.adm-kw-group { margin-bottom: .6rem; }
.adm-kw-group-label {
  font-size: .68rem; color: #999; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .3rem;
}
.adm-kw-pills {
  display: flex; flex-wrap: wrap; gap: .25rem; align-items: center;
}
.adm-kw-pill {
  display: inline-flex; align-items: center; gap: .2rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #ddd; padding: .18rem .5rem; font-size: .73rem; border-radius: 14px;
}
.adm-kw-x {
  background: none; border: none; color: #888; font-size: .8rem;
  cursor: pointer; padding: 0 .1rem; line-height: 1;
}
.adm-kw-x:hover { color: #e55; }
.adm-kw-input {
  background: transparent; border: 1px solid transparent;
  color: #aaa; padding: .18rem .4rem; font-size: .73rem;
  border-radius: 14px; width: 110px; font-family: inherit;
  outline: none;
}
.adm-kw-input:focus { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.04); }

/* ── Dashboard ────────────────────────────────────────────────────────── */
.adm-dash {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: .7rem; padding: 1rem;
}
.adm-dash-module {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px; padding: .75rem .9rem; overflow: hidden;
}
.adm-dash-module-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: #999; margin-bottom: .5rem; font-weight: 500;
}
.adm-dash-module-body { font-size: .82rem; color: #ccc; }
.adm-dash-config { text-align: center; padding: .5rem 1rem 2rem; }
.adm-config-btn {
  background: none; border: 1px solid rgba(255,255,255,.1);
  color: #999; padding: .4rem 1rem; font-size: .8rem; cursor: pointer;
  border-radius: 4px; font-family: inherit;
}
.adm-config-btn:hover { color: #ccc; border-color: rgba(255,255,255,.2); }

/* ── Dashboard stats row ──────────────────────────────────────────────── */
.adm-stats-row {
  display: flex; gap: .6rem; flex-wrap: wrap;
}
.adm-stat { text-align: center; flex: 1; min-width: 60px; }
.adm-stat-n { font-size: 1.4rem; font-weight: 300; color: #ddd; }
.adm-stat-l { font-size: .65rem; color: #888; text-transform: uppercase; letter-spacing: .05em; }

/* ── Dashboard bar chart ──────────────────────────────────────────────── */
.adm-bar-chart { display: flex; flex-direction: column; gap: .3rem; }
.adm-bar-row { display: flex; align-items: center; gap: .5rem; }
.adm-bar-label { flex: 0 0 95px; font-size: .72rem; color: #aaa; text-align: right; }
.adm-bar-track {
  flex: 1; height: 14px; background: rgba(255,255,255,.04);
  border-radius: 3px; overflow: hidden;
}
.adm-bar-fill {
  height: 100%; background: rgba(255,255,255,.12);
  border-radius: 3px; transition: width .3s;
}
.adm-bar-val { flex: 0 0 28px; font-size: .72rem; color: #999; }

/* ── Dashboard misc ───────────────────────────────────────────────────── */
.adm-good { color: rgba(80,180,100,.8); font-size: .82rem; }
.adm-muted { color: #777; font-size: .75rem; font-style: italic; padding: .2rem 0; }
.adm-sub-title {
  font-size: .68rem; color: #888; text-transform: uppercase;
  letter-spacing: .06em; margin: .5rem 0 .25rem; padding-top: .4rem;
  border-top: 1px solid rgba(255,255,255,.04);
}
.adm-issue-count { font-size: .78rem; color: #aaa; margin-bottom: .4rem; }
.adm-issue-list { display: flex; flex-direction: column; gap: .2rem; }
.adm-issue-row { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.adm-issue-name { font-size: .78rem; color: #ccc; flex: 0 0 auto; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-issue-tags { display: flex; flex-wrap: wrap; gap: .2rem; }
.adm-issue-tag {
  font-size: .6rem; background: rgba(220,120,60,.15); color: rgba(220,140,80,.9);
  padding: .1rem .35rem; border-radius: 3px;
}

.adm-orphan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .35rem;
}
.adm-orphan-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 3px; overflow: hidden;
}
.adm-orphan-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; opacity: .7; }
.adm-orphan-name { font-size: .55rem; color: #888; padding: .15rem .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.adm-exh-list { display: flex; flex-direction: column; gap: .15rem; }
.adm-exh-row { display: flex; justify-content: space-between; padding: .15rem 0; }
.adm-exh-title { font-size: .78rem; color: #ccc; }
.adm-exh-count { font-size: .72rem; color: #888; }

.adm-price-summary { font-size: .82rem; color: #aaa; margin-bottom: .4rem; }
.adm-price-list { display: flex; flex-direction: column; gap: .15rem; }
.adm-price-row { display: flex; justify-content: space-between; padding: .12rem 0; }
.adm-price-name { font-size: .78rem; color: #ccc; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-price-val { font-size: .78rem; color: #aaa; }

.adm-kw-cloud { display: flex; flex-wrap: wrap; gap: .3rem; }
.adm-kw-tag {
  background: rgba(255,255,255,.06); color: #bbb;
  padding: .15rem .45rem; font-size: .72rem; border-radius: 12px;
}
.adm-kw-tag sup { font-size: .55rem; color: #888; margin-left: .15rem; }

.adm-inquiry-list { display: flex; flex-direction: column; gap: .15rem; }
.adm-inquiry-row { display: flex; gap: .5rem; font-size: .78rem; }
.adm-inquiry-date { color: #888; flex: 0 0 70px; }
.adm-inquiry-name { color: #ccc; flex: 0 0 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-inquiry-piece { color: #aaa; }

.adm-collab-list { display: flex; flex-direction: column; gap: .15rem; }
.adm-collab-row { display: flex; justify-content: space-between; padding: .12rem 0; }
.adm-collab-name { font-size: .78rem; color: #ccc; }
.adm-collab-count { font-size: .72rem; color: #888; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .adm-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .adm-bar { flex-wrap: wrap; gap: .5rem; }
  .adm-field-label { flex: 0 0 70px; font-size: .7rem; }
  .adm-field-row { padding-left: 75px; }
  .adm-dash { grid-template-columns: 1fr; }
}
