/* =========================================================
   SHOAM — Admin / content studio
   Uses css/style.css for the design system, adds only the
   bits this page needs.
   ========================================================= */

body.admin { background: var(--mist); }

.admin-wrap { padding: calc(var(--header-h) + 34px) 0 80px; max-width: 1080px; }

.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.admin-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--navy-800); margin-bottom: .3rem; }
.admin-head .sub { color: var(--muted); margin: 0; max-width: 52ch; }
.admin-user { display: flex; align-items: center; gap: .7rem; font-size: .82rem; color: var(--muted); }
.admin-user span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tabs */
.admin-tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 2px solid rgba(15, 63, 158, .12); margin-bottom: 1.4rem; }
.admin-tabs button {
  font: inherit; font-family: var(--font-head); font-size: .9rem; font-weight: 600;
  color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent;
  padding: .7rem 1rem; cursor: pointer; margin-bottom: -2px;
}
.admin-tabs button:hover { color: var(--blue-700); }
.admin-tabs button.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }

/* Toolbar + list */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-bar h2 { font-size: 1.15rem; color: var(--navy-800); margin: 0; }
.admin-bar .count { font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: .4rem; }

.admin-list { display: grid; gap: .55rem; }
.admin-row {
  display: flex; align-items: center; gap: .9rem; background: var(--white);
  border: 1px solid rgba(15, 63, 158, .1); border-radius: 14px; padding: .7rem .9rem;
  box-shadow: 0 4px 14px rgba(4, 15, 42, .04);
}
.admin-row .thumb { width: 52px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; background: var(--mist); }
.admin-row .thumb.empty { display: grid; place-items: center; color: #9DB0C9; font-size: .7rem; }
.admin-row .grow { min-width: 0; flex: 1; }
.admin-row strong { display: block; color: var(--navy-800); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row small { color: var(--muted); font-size: .78rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .flag { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 999px; background: #EAF1FB; color: var(--blue-700); }
.admin-row .flag.off { background: #F4EFE3; color: #8A6A22; }
.admin-row .flag.feat { background: #FFF4D6; color: var(--gold-700); }
.admin-row .actions { display: flex; gap: .35rem; flex: none; }
.admin-row .actions button { font-size: .78rem; padding: .35rem .6rem; }

/* Sign-in / setup cards */
.admin-card {
  max-width: 520px; margin: 2rem auto; background: var(--white); border-radius: 20px;
  border: 1px solid rgba(15, 63, 158, .1); box-shadow: var(--shadow-lg); padding: clamp(1.6rem, 4vw, 2.4rem);
}
.admin-card.wide { max-width: 760px; }
.admin-card h2 { color: var(--navy-800); font-size: 1.4rem; margin-bottom: .5rem; }
.admin-card p { color: var(--muted); font-size: .92rem; }
.admin-card ol { color: var(--muted); font-size: .9rem; padding-left: 1.2rem; display: grid; gap: .55rem; }
.admin-card code { background: var(--mist); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

/* Editor modal */
.editor-panel { max-width: 780px; width: 100%; }
.editor-body { padding: clamp(1.2rem, 3vw, 1.9rem); }
.editor-body h2 { font-size: 1.3rem; color: var(--navy-800); margin-bottom: .3rem; }
.editor-body .hint { color: var(--muted); font-size: .8rem; }
.editor-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }
.editor-actions .spacer { flex: 1; }

.upload-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.upload-row input[type="file"] { max-width: 100%; font-size: .82rem; background: var(--white); border-style: dashed; }
.photo-strip { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.photo-tile { position: relative; width: 104px; }
.photo-tile img { width: 104px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(15,63,158,.12); display: block; }
.photo-tile .tile-tools { display: flex; gap: .2rem; margin-top: .25rem; justify-content: space-between; }
.photo-tile button { font-size: .62rem; padding: .15rem .3rem; border-radius: 5px; border: 1px solid rgba(15,63,158,.2); background: var(--white); cursor: pointer; color: var(--muted); }
.photo-tile button:hover { color: var(--navy-800); border-color: var(--blue-600); }
.photo-tile .cover-tag { position: absolute; top: 4px; left: 4px; background: var(--gold-500); color: var(--navy-800); font-size: .58rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .35rem; border-radius: 4px; }

.check-row { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: .9rem 0 .2rem; }
.check-row label { display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--navy-800); font-weight: 500; cursor: pointer; }
.check-row input { width: auto; }

.admin-note { font-size: .8rem; margin-top: .8rem; min-height: 1.2em; color: var(--muted); }
.admin-note.err { color: var(--danger); }
.admin-note.ok { color: var(--green-700, #1E7A4B); }

@media (max-width: 640px) {
  .admin-row { flex-wrap: wrap; }
  .admin-row .actions { width: 100%; justify-content: flex-end; }
  .admin-tabs button { padding: .6rem .7rem; }
}
