/* ============================================================
   Eilise — admin panel (extends style.css)
   ============================================================ */

.admin-body { min-height: 100vh; display: flex; flex-direction: column; }

.admin-main {
  width: 100%;
  max-width: 860px;
  padding-block: clamp(32px, 5vw, 56px) 72px;
  display: grid;
  gap: 24px;
}

.admin-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  vertical-align: middle;
}

.wordmark-static { display: inline-flex; align-items: center; }

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(35, 32, 27, 0.05), 0 16px 40px -24px rgba(35, 32, 27, 0.3);
  padding: clamp(22px, 3.5vw, 34px);
}

.card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.card h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }

/* ---------- Gate ---------- */

.gate-card { max-width: 480px; margin-inline: auto; width: 100%; }
.gate-title { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 10px; }
.gate-card .lede { font-size: 0.95rem; }

#gate-form { display: grid; gap: 14px; margin-top: 8px; }
#gate-form .btn { justify-self: start; }

/* ---------- Fields ---------- */

.field { display: grid; gap: 7px; }

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.field-label small { color: var(--ink-soft); font-weight: 400; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 78, 42, 0.18);
}

code {
  font-size: 0.85em;
  background: var(--paper-deep);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------- Dropzone ---------- */

.dropzone {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: clamp(26px, 4vw, 40px) 20px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dropzone:hover { border-color: var(--ink-soft); }
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(163, 78, 42, 0.06);
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.dz-icon { font-size: 1.6rem; color: var(--accent); }
.dz-text { font-size: 0.95rem; line-height: 1.5; }
.dz-text small { color: var(--ink-soft); }

/* ---------- Upload layout ---------- */

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.field-wide { grid-column: 1 / -1; }

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

#upload-btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Status messages ---------- */

.form-status {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-status.success {
  background: rgba(63, 122, 74, 0.12);
  color: #2f5c38;
  border: 1px solid rgba(63, 122, 74, 0.35);
}

.form-status.error {
  background: rgba(163, 78, 42, 0.1);
  color: var(--accent-deep);
  border: 1px solid rgba(163, 78, 42, 0.35);
}

/* ---------- Upload preview ---------- */

.upload-preview { margin: 22px 0 0; text-align: center; }
.upload-preview img {
  max-height: 320px;
  margin-inline: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.upload-preview figcaption {
  margin-top: 10px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Works list ---------- */

.works-count {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.works-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.work-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.work-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  flex: none;
}

.work-meta { min-width: 0; flex: 1; }

.work-meta .w-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-meta .w-cat {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.delete-btn {
  appearance: none;
  border: 1px solid rgba(163, 78, 42, 0.4);
  background: transparent;
  color: var(--accent-deep);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.delete-btn:hover { background: var(--accent); color: var(--white); }

.works-empty {
  margin: 0;
  padding: 18px;
  text-align: center;
  color: var(--ink-soft);
  border: 2px dashed var(--line);
  border-radius: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .upload-grid { grid-template-columns: 1fr; }
  .work-item img { width: 52px; height: 52px; }
}
