/* =====================================================
   DEALSSPRINT — ADMIN THEME
   Loads AFTER css/style.css. Reuses the same variables,
   buttons (.btn/.btn-primary/.btn-danger/.btn-outline),
   .card and form input styles — this file only adds the
   admin layout: sidebar, topbar, stats, table, login.
===================================================== */

body { overflow-x: hidden; }
body::before { opacity: 0.6; }

/* ---------- LAYOUT ---------- */
.admin-body {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 240px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
}

.admin-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  padding: 0 10px 26px;
}
.admin-logo .logo-blue { color: var(--blue); }

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}
.admin-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.admin-nav a.active {
  color: var(--text);
  background: var(--blue-soft);
  border: 1px solid var(--border-hover);
}

.admin-nav .logout-link {
  margin-top: auto;
  color: #f87171;
}
.admin-nav .logout-link:hover { background: rgba(248, 113, 113, 0.1); }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 34px 42px 60px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.admin-topbar h1 { font-size: 24px; }

.admin-topbar form {
  display: flex;
  gap: 8px;
}
.admin-topbar form input {
  width: 240px;
  margin-bottom: 0 !important;
}

/* ---------- STAT CARDS ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-glow);
}
.stat-card .stat-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
}
.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.gold .stat-value { color: var(--gold); }

/* ---------- ARTICLE LIST ---------- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.admin-row:hover { border-color: var(--border-hover); transform: translateX(2px); }

.admin-row .row-title {
  flex: 1;
  min-width: 0;
}
.admin-row h3 {
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-row .row-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.admin-row .row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-badge.published { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-badge.draft { background: rgba(148, 163, 184, 0.15); color: var(--muted); }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

/* ---------- FORM CARD (add/edit article) ---------- */
.admin-form-card {
  max-width: 780px;
  padding: 30px;
}

.admin-form-card label.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14.5px;
  margin-bottom: 20px;
  cursor: pointer;
}
.admin-form-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.admin-form-card input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
}
.alert.success { background: rgba(34, 197, 94, 0.1); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.alert.error { background: rgba(248, 113, 113, 0.1); color: #f87171; border-color: rgba(248, 113, 113, 0.3); }

/* ---------- LOGIN ---------- */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 34px;
  text-align: center;
}

.admin-login-card .admin-logo {
  justify-content: center;
  padding: 0 0 6px;
  font-size: 22px;
}
.admin-login-card p.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}
.admin-login-card form { text-align: left; }
.admin-login-card button { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-topbar form input { width: 160px; }
}

@media (max-width: 760px) {
  .admin-body { flex-direction: column; }
  .admin-sidebar {
    position: relative;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-logo { padding: 0 12px 0 0; }
  .admin-nav { flex-direction: row; flex: 1; overflow-x: auto; }
  .admin-nav .logout-link { margin-top: 0; }
  .admin-main { padding: 24px 18px 50px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-row { flex-wrap: wrap; }
}

/* Add this to the end of your admin.css */
.status-badge.pending { 
    background: rgba(245, 158, 11, 0.15); 
    color: #fbbf24; 
}
