/* Admin — B&W minimal */
.admin-body { cursor: none; background: #000; color: #fff; }

.login-screen {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 2rem;
}
.login-box {
  width: 100%; max-width: 400px;
  border: 1px solid #222; padding: 3rem 2.5rem;
  background: #0a0a0a; text-align: center;
}
.login-sigil { color: #fff; margin: 0 auto 1.8rem; opacity: 0.5; }
.login-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 2rem; color: #fff; font-weight: 400;
  margin-bottom: 0.3rem; letter-spacing: 0.03em;
}
.login-sub { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; color: #555; letter-spacing: 0.25em; margin-bottom: 2rem; }
.login-error { min-height: 1.2rem; color: #aaa; font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; margin-bottom: 0.5rem; text-align: left; }
.login-form { text-align: left; }

.admin-panel { min-height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; border-bottom: 1px solid #222; background: #0a0a0a;
  position: sticky; top: 0; z-index: 50;
}
.admin-title { font-family: 'UnifrakturMaguntia', cursive; font-size: 1.2rem; font-weight: 400; color: #fff; letter-spacing: 0.04em; }
.admin-header-right { display: flex; align-items: center; gap: 1rem; }

.admin-nav { display: flex; border-bottom: 1px solid #222; overflow-x: auto; background: #0a0a0a; }
.admin-tab {
  background: none; border: none; border-right: 1px solid #222;
  color: #555; font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.8rem 1.5rem; cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.admin-tab:hover { color: #fff; }
.admin-tab.active { color: #fff; border-bottom: 1px solid #fff; }

.admin-content { flex: 1; padding: 2.5rem 2rem; max-width: 820px; width: 100%; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-title {
  font-family: 'UnifrakturMaguntia', cursive; font-size: 1.5rem; font-weight: 400;
  color: #fff; margin-bottom: 2rem; padding-bottom: 0.8rem; border-bottom: 1px solid #222; letter-spacing: 0.04em;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-group.full-width { grid-column: 1 / -1; }
.field-label { font-family: 'Share Tech Mono', monospace; font-size: 0.62rem; letter-spacing: 0.22em; color: #555; text-transform: uppercase; }
.field-input {
  background: #0a0a0a; border: 1px solid #222; color: #fff;
  font-family: 'Share Tech Mono', monospace; font-size: 0.82rem;
  padding: 0.6rem 0.9rem; width: 100%; outline: none; transition: 0.15s;
}
.field-input:focus { border-color: #fff; }
.field-input::placeholder { color: #333; }
.field-textarea { resize: vertical; }
.field-hint { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; color: #444; line-height: 1.5; }

.entry-row {
  display: grid; gap: 0.6rem; align-items: end;
  margin-bottom: 0.6rem; padding: 1rem;
  border: 1px solid #1a1a1a; background: #080808;
}
.entry-row-gallery { grid-template-columns: 1fr 1fr auto; }
.entry-row-social  { grid-template-columns: 1fr 1fr 1fr 56px auto; }
@media (max-width:600px) {
  .entry-row-gallery { grid-template-columns: 1fr auto; }
  .entry-row-social  { grid-template-columns: 1fr 1fr auto; }
}
.btn-remove {
  background: none; border: 1px solid #222; color: #444;
  font-family: 'Share Tech Mono', monospace; font-size: 0.75rem;
  padding: 0.5rem 0.6rem; cursor: pointer; transition: 0.15s; align-self: flex-end;
}
.btn-remove:hover { border-color: #fff; color: #fff; }
.btn-add {
  background: none; border: 1px dashed #222; color: #444;
  font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.15em; padding: 0.7rem 1.5rem; cursor: pointer;
  margin-top: 0.5rem; transition: 0.15s; width: 100%;
}
.btn-add:hover { border-color: #fff; color: #fff; }

/* Sigil upload grid */
.sigil-grid-preview { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.8rem; margin-top: 1rem; }
.sigil-preview-item {
  border: 1px solid #222; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: #0a0a0a; position: relative; overflow: hidden;
}
.sigil-preview-item img { max-width: 90%; max-height: 90%; filter: grayscale(100%); opacity: 0.7; }
.sigil-empty-label { font-family: 'Share Tech Mono', monospace; font-size: 0.6rem; color: #333; letter-spacing: 0.15em; }
.sigil-remove-btn {
  position: absolute; top: 4px; right: 4px;
  background: #0a0a0a; border: 1px solid #333; color: #555;
  font-size: 0.65rem; cursor: pointer; padding: 2px 4px;
}
.sigil-remove-btn:hover { color: #fff; border-color: #fff; }

/* Toggle */
.toggle-label { display: flex; align-items: center; gap: 0.8rem; cursor: pointer; }
.toggle-input { display: none; }
.toggle-track { width: 32px; height: 16px; background: #222; border-radius: 8px; position: relative; transition: 0.2s; flex-shrink: 0; }
.toggle-track::after { content: ''; position: absolute; width: 10px; height: 10px; background: #444; border-radius: 50%; top: 3px; left: 3px; transition: 0.2s; }
.toggle-input:checked + .toggle-track { background: #333; }
.toggle-input:checked + .toggle-track::after { left: 19px; background: #fff; }
.toggle-text { font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: #555; }

.color-picker { width: 40px; height: 36px; border: 1px solid #222; background: #0a0a0a; padding: 2px; cursor: pointer; }

.photo-preview-wrap { margin-top: 0.5rem; }
.photo-preview { width: 72px; height: 96px; object-fit: cover; border: 1px solid #222; filter: grayscale(100%); }

.save-bar {
  position: sticky; bottom: 0; z-index: 50;
  background: #0a0a0a; border-top: 1px solid #222;
  padding: 1rem 2rem; display: flex; align-items: center;
  justify-content: flex-end; gap: 1.5rem;
}
.save-status { font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; color: #777; }

.btn-primary {
  background: none; border: 1px solid #fff; color: #fff;
  font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.15em; padding: 0.7rem 1.5rem; cursor: pointer; transition: 0.15s;
}
.btn-primary:hover { background: #fff; color: #000; }
.btn-ghost {
  background: none; border: 1px solid #333; color: #555;
  font-family: 'Share Tech Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.1em; padding: 0.4rem 0.8rem; cursor: pointer; transition: 0.15s;
}
.btn-ghost:hover { border-color: #fff; color: #fff; }

.status-dot { width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.1; } }
.dim { color: #555; }

/* file drop zone */
.drop-zone {
  border: 1px dashed #333; padding: 2rem; text-align: center;
  font-family: 'Share Tech Mono', monospace; font-size: 0.7rem; color: #444;
  letter-spacing: 0.15em; cursor: pointer; transition: 0.15s; position: relative;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: #fff; color: #fff; }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ── Upload Widgets ── */
.upload-widget { display: flex; flex-direction: column; gap: 0.4rem; max-width: 100%; }

.upload-preview {
  position: relative;
  background: #0a0a0a;
  border: 1px solid #222;
  overflow: hidden;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  max-width: 180px;
}
.upload-preview.aspect-photo   { aspect-ratio: 3/4; }
.upload-preview.aspect-square  { aspect-ratio: 1/1; }
.upload-preview.aspect-portrait{ aspect-ratio: 3/4; }

/* Inside gallery/sigil grids, stretch to full column width */
.gallery-upload-row .upload-preview,
.sigil-upload-grid  .upload-preview {
  max-width: 100%;
}

@media (max-width: 500px) {
  .upload-preview { max-width: 120px; }
  .gallery-upload-row .upload-preview,
  .sigil-upload-grid  .upload-preview { max-width: 100%; }
}

.upload-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}
.upload-placeholder {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem; color: #333;
  letter-spacing: 0.2em; text-align: center; padding: 1rem;
}
.upload-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: 0.15s;
}
.upload-preview:hover .upload-overlay { opacity: 1; }
.upload-overlay span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem; color: #fff; letter-spacing: 0.2em;
}
.upload-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem; color: #555;
}
.btn-clear {
  background: none; border: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem; color: #444; cursor: pointer;
  letter-spacing: 0.1em; padding: 0; text-align: left;
  transition: 0.15s;
}
.btn-clear:hover { color: #fff; }

/* Gallery upload list */
.gallery-upload-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.gallery-upload-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid #1a1a1a;
  background: #080808;
}
.gallery-upload-row .upload-preview {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 1;
}
@media (max-width: 480px) {
  .gallery-upload-list { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .gallery-upload-row { padding: 0.5rem; }
}

.btn-remove-row {
  background: none; border: 1px solid #222; color: #444;
  font-family: 'Share Tech Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.1em; padding: 0.4rem 0.7rem; cursor: pointer;
  transition: 0.15s; width: 100%; margin-top: 0.2rem;
}
.btn-remove-row:hover { border-color: #fff; color: #fff; }

/* Sigil upload grid */
.sigil-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 600px) {
  .sigil-upload-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
}
.sigil-upload-grid .upload-widget { width: 100%; }
.sigil-upload-grid .upload-preview {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
}
