<?php
// Admin panel CSS
?>
/* ============================================================
   Lina Mum — Admin Panel CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #FAF6F0;
  --gold:        #C9A96E;
  --gold-dark:   #A0804A;
  --rose:        #D4929A;
  --charcoal:    #2D2A26;
  --sidebar-bg:  #1E1B18;
  --sidebar-w:   240px;
  --white:       #FFFFFF;
  --muted:       #8A7E72;
  --border:      #ECE7E0;
  --shadow:      0 2px 12px rgba(45,42,38,.08);
  --radius:      10px;
  --danger:      #E05555;
  --success:     #25D366;
  --font:        'DM Sans', system-ui, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--charcoal);
  font-size: 15px;
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E1B18, #2D2A26);
}
.login-box {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo .logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-style: italic;
  color: var(--charcoal);
}
.login-logo .logo-sub {
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.login-logo .admin-tag {
  display: block;
  margin-top: .3rem;
  font-size: .72rem;
  color: var(--muted);
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 1.8rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo .logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: #fff;
}
.sidebar-logo .logo-sub {
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
}
.sidebar-logo .admin-badge {
  display: inline-block;
  background: rgba(201,169,110,.15);
  color: var(--gold);
  font-size: .62rem;
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-top: .3rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-nav { padding: 1rem 0; flex: 1; }

.nav-section-title {
  padding: .8rem 1.5rem .3rem;
  font-size: .63rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.5rem;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  text-decoration: none;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-link .icon { font-size: 1rem; width: 1.2rem; text-align: center; }
.sidebar-link:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(201,169,110,.1);
  border-left-color: var(--gold);
  color: var(--gold);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-footer a {
  color: rgba(255,255,255,.4);
  font-size: .8rem;
  text-decoration: none;
}
.sidebar-footer a:hover { color: var(--danger); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar h1 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--charcoal);
}
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-actions a {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: 6px;
  transition: all .2s;
}
.topbar-actions a:hover { background: var(--cream); color: var(--charcoal); }

.admin-content {
  padding: 2rem;
  flex: 1;
}

/* ── CARDS / STATS ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.stat-card.rose  { border-left-color: var(--rose); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.blue  { border-left-color: #6B9BD6; }
.stat-card-icon  { font-size: 1.5rem; }
.stat-card-num   { font-size: 2rem; font-weight: 600; color: var(--charcoal); line-height: 1; }
.stat-card-label { font-size: .8rem; color: var(--muted); }

/* ── TABLE ────────────────────────────────────────────────── */
.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-table-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.admin-table-header h2 { font-size: 1rem; font-weight: 500; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--cream);
  padding: .8rem 1.2rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.admin-table td {
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #FDFAF6; }

.table-img {
  width: 48px; height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--cream);
}

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 500;
}
.badge-success { background: rgba(37,211,102,.12); color: #0D7832; }
.badge-danger  { background: rgba(224,85,85,.1);   color: var(--danger); }
.badge-gold    { background: rgba(201,169,110,.15); color: var(--gold-dark); }
.badge-muted   { background: var(--cream); color: var(--muted); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 720px;
}
.form-group {
  margin-bottom: 1.4rem;
}
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: .4rem;
}
.form-control {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  font: inherit;
  font-size: .9rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--gold); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .75rem; color: var(--muted); margin-top: .3rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Image preview */
.img-preview {
  width: 120px; height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--border);
  margin-top: .5rem;
  background: var(--cream);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  font-family: var(--font);
  text-decoration: none;
}
.btn-gold   { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #C04444; }
.btn-muted  { background: var(--cream); color: var(--charcoal); border: 1px solid var(--border); }
.btn-muted:hover { background: var(--border); }
.btn-sm { padding: .35rem .8rem; font-size: .78rem; }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .88rem;
}
.alert-success { background: rgba(37,211,102,.1); color: #0D7832; border-left: 3px solid var(--success); }
.alert-error   { background: rgba(224,85,85,.1);  color: var(--danger); border-left: 3px solid var(--danger); }

/* ── TOGGLE ───────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: .6rem; }
.toggle {
  appearance: none;
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: background .25s;
  position: relative;
}
.toggle::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s;
}
.toggle:checked { background: var(--gold); }
.toggle:checked::before { transform: translateX(18px); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}
