/* ============================================================
   Admin console styles
   ============================================================ */

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: min(400px, 100%); padding: 40px 34px; text-align: center;
  border-radius: var(--radius-xl);
  animation: cardIn 0.7s cubic-bezier(.22,1,.36,1);
}
.login-mark {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 20px;
  display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(150deg, rgba(124,196,255,0.55), rgba(177,140,255,0.45));
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: var(--inner-spec), 0 8px 26px rgba(120,120,255,0.35);
}
.login-card h1 { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.login-card .sub { color: var(--text-dim); font-size: 14px; margin: 8px 0 26px; }
.login-card .field { text-align: left; }
.login-hint {
  margin-top: 16px; font-size: 12.5px; color: var(--text-faint); line-height: 1.6;
}
.login-hint code {
  background: rgba(255,255,255,0.1); padding: 2px 7px; border-radius: 6px;
  font-size: 12px; color: var(--accent);
}
.back-link {
  display: inline-block; margin-top: 20px; color: var(--text-dim);
  font-size: 13px; text-decoration: none; transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ---------- dashboard ---------- */
.dash { min-height: 100vh; padding-bottom: 60px; }
.dash .nav { margin-bottom: 22px; }
.tabs {
  width: min(1220px, calc(100% - 28px)); margin: 0 auto 20px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text-dim); font-size: 14px; font-weight: 600; font-family: inherit;
  box-shadow: var(--inner-spec); transition: all 0.28s cubic-bezier(.22,1,.36,1);
}
.tab:hover { background: rgba(255,255,255,0.14); color: var(--text); }
.tab.active {
  background: linear-gradient(150deg, rgba(124,196,255,0.45), rgba(177,140,255,0.35));
  color: #fff; border-color: rgba(255,255,255,0.5);
  box-shadow: var(--shadow-glass), var(--inner-spec);
}
.pill {
  font-size: 11.5px; font-weight: 700; min-width: 22px; text-align: center;
  padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,0.18);
}
.tab.active .pill { background: rgba(255,255,255,0.32); }

.admin-wrap { width: min(1220px, calc(100% - 28px)); margin: 0 auto; }
.admin-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.acard {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-glass), var(--inner-spec);
  cursor: pointer;
  opacity: 0; transform: translateY(16px);
  animation: cardIn 0.6s cubic-bezier(.22,1,.36,1) forwards;
  transition: box-shadow 0.35s, transform 0.35s, border-color 0.35s;
}
.acard:hover { box-shadow: var(--shadow-lift), var(--inner-spec); transform: translateY(-4px); border-color: rgba(255,255,255,0.5); }
.acard-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: rgba(0,0,0,0.3); }
.acard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.22,1,.36,1); }
.acard:hover .acard-thumb img { transform: scale(1.06); }
.acard-status {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45); backdrop-filter: blur(8px);
  box-shadow: var(--inner-spec);
}
.s-pending { background: rgba(255,207,107,0.85); color: #3a2400; }
.s-approved { background: rgba(111,227,168,0.85); color: #063a20; }
.s-rejected { background: rgba(255,138,138,0.85); color: #40060a; }
.acard-star {
  position: absolute; top: 10px; right: 10px; font-size: 15px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.acard-body { padding: 14px 15px 16px; }
.acard-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard-author { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
.acard-time { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }

/* ---------- detail ---------- */
.detail-sheet {
  width: min(640px, 100%); padding: 0;
  display: flex; flex-direction: column;
  max-height: 88vh; overflow: hidden;
}
.detail-img {
  width: 100%; max-height: 32vh; flex-shrink: 0; object-fit: contain;
  background: rgba(0,0,0,0.35); display: block;
}
.detail-body { padding: 22px 28px 6px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.detail-body h2 { font-size: 21px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; }
.detail-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 14px; }
.detail-row .k { color: var(--text-faint); min-width: 76px; flex-shrink: 0; }
.detail-row span:last-child { color: var(--text); word-break: break-word; }
.detail-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 28px 22px; flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(12,14,26,0.35);
}
.detail-actions .btn { flex: 1; min-width: 120px; }

.hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: 22px 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); }
.switch {
  appearance: none; width: 46px; height: 27px; border-radius: 999px; position: relative;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.25); cursor: pointer;
  transition: background 0.3s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.switch:checked { background: linear-gradient(150deg, rgba(124,196,255,0.9), rgba(177,140,255,0.8)); }
.switch:checked::after { transform: translateX(19px); }

@media (max-width: 600px) {
  .admin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .detail-actions .btn { min-width: 100px; }
}
