/* Admin-specific styles (reuses album.css variables and base) */

/* ============ LOGIN ============ */
.admin-login {
  position: relative; z-index: 2;
  display: flex; justify-content: center; align-items: center;
  min-height: 80vh; padding: 22px;
}
.login-card {
  width: min(400px, 100%);
  padding: 34px 30px 28px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid rgba(90, 58, 74, 0.12);
  box-shadow: var(--shadow);
  text-align: center;
  animation: popIn 0.5s cubic-bezier(0.22,1,0.36,1);
}
.login-card h2 {
  font-family: 'Dancing Script', cursive; font-size: 2rem; color: var(--ink);
  margin-bottom: 6px;
}
.login-sub { font-size: 0.88rem; color: var(--ink-light); margin-bottom: 22px; }
.login-error { margin-top: 12px; font-size: 0.85rem; color: var(--red); min-height: 1em; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 0.8rem; color: var(--ink-light); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid rgba(90, 58, 74, 0.2); background: rgba(255, 255, 255, 0.8);
  color: var(--ink); font-family: inherit; font-size: 0.92rem; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 143, 177, 0.2);
}
.btn-primary {
  width: 100%; margin-top: 4px; padding: 12px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--pink)); color: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 92, 124, 0.35); transition: transform 0.18s, filter 0.25s;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============ ADMIN CONTENT ============ */
.admin-content { display: none; position: relative; z-index: 2; max-width: 900px; margin: 0 auto; padding: 90px 22px 50px; }
.admin-section { margin-bottom: 36px; }
.section-title {
  font-family: 'Dancing Script', cursive; font-size: 1.7rem; color: var(--ink);
  margin-bottom: 16px;
}
.count { font-family: 'Poppins', sans-serif; font-size: 0.85rem; color: var(--ink-light); font-weight: 400; }

.upload-form {
  background: var(--glass-strong); border-radius: 18px; padding: 22px;
  border: 1px solid rgba(90, 58, 74, 0.1); box-shadow: var(--polaroid);
}
.field-row { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
.form-status { margin-top: 10px; text-align: center; font-size: 0.85rem; color: var(--ink-light); min-height: 1em; }

.admin-grid {
  display: flex; flex-direction: column; gap: 10px;
}
.admin-loading { text-align: center; padding: 30px 0; color: var(--ink-light); font-weight: 300; }

.admin-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass-strong); border-radius: 14px; padding: 10px;
  border: 1px solid rgba(90, 58, 74, 0.1); box-shadow: var(--polaroid);
  transition: box-shadow 0.2s;
}
.admin-card:hover { box-shadow: var(--shadow-hover); }
.admin-thumb {
  width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: rgba(90,58,74,0.06);
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-info { flex: 1; min-width: 0; }
.admin-info-date { font-size: 0.72rem; color: var(--ink-light); }
.admin-info-cap {
  font-size: 0.88rem; color: var(--ink); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.admin-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-icon {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: rgba(90, 58, 74, 0.08); font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-icon:hover { background: rgba(90, 58, 74, 0.16); transform: scale(1.08); }
.btn-delete:hover { background: rgba(255, 92, 124, 0.2); }

/* ============ EDIT MODAL ============ */
.edit-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: center; justify-content: center; padding: 22px;
  background: rgba(90, 58, 74, 0.4); backdrop-filter: blur(8px);
}
.edit-overlay.open { display: flex; }
.edit-card {
  position: relative; width: min(460px, 100%);
  padding: 30px 28px 26px; border-radius: 20px;
  background: #fff; box-shadow: 0 24px 60px rgba(90, 58, 74, 0.3);
  animation: popIn 0.35s cubic-bezier(0.22,1,0.36,1);
}
.edit-card h3 {
  font-family: 'Dancing Script', cursive; font-size: 1.6rem; color: var(--ink);
  margin-bottom: 16px;
}
.edit-preview {
  margin-bottom: 16px; border-radius: 10px; overflow: hidden;
  max-height: 200px; background: #fafafa;
}
.edit-preview img { width: 100%; max-height: 200px; object-fit: contain; display: block; }

@media (max-width: 640px) {
  .admin-content { padding: 80px 16px 40px; }
  .field-row { grid-template-columns: 1fr; }
  .admin-thumb { width: 56px; height: 56px; }
}
