/* ============================================================
   PERFECTION BEAUTY HOME — admin.css
   ============================================================ */

:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C97B;
  --gold-dark:   #9A7B2E;
  --black:       #0A0A0A;
  --dark:        #111111;
  --card-bg:     #1A1A1A;
  --surface:     #161616;
  --border:      rgba(201,168,76,0.2);
  --text-light:  #F5F0E8;
  --text-muted:  #9A9080;
  --text-dim:    #6A6050;
  --success:     #4CAF50;
  --error:       #F44336;
  --warning:     #FF9800;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Josefin Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html { font-size:16px; }
body {
  background: var(--black);
  color: var(--text-light);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }

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

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--dark);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}
.admin-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar-logo img { height: 44px; width: auto; }
.admin-sidebar-label {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: 8px;
}
.admin-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.admin-nav-section {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 8px 8px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: all 0.2s;
  margin-bottom: 2px;
}
.admin-nav-item:hover {
  background: rgba(201,168,76,0.08);
  color: var(--gold-light);
}
.admin-nav-item.active {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.admin-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}
.admin-logout:hover { background: rgba(244,67,54,0.1); color: #F44336; }

/* Main Content */
.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-topbar-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-light);
}
.admin-topbar-actions { display: flex; gap: 12px; align-items: center; }
.admin-content { padding: 32px 28px; flex: 1; }

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- ADMIN BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 400;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--black);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger {
  background: rgba(244,67,54,0.1);
  color: #F44336;
  border: 1px solid rgba(244,67,54,0.3);
}
.btn-danger:hover { background: rgba(244,67,54,0.2); }
.btn-sm { padding: 7px 14px; font-size: 10px; }

/* ---- ADMIN TABLES ---- */
.admin-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  background: var(--surface);
  padding: 14px 16px;
  text-align: left;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(201,168,76,0.06);
  font-size: 13px;
  color: var(--text-muted);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(201,168,76,0.03); }
.admin-table .col-thumb {
  width: 60px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.admin-table .col-name { color: var(--text-light); font-weight: 400; }
.table-actions { display: flex; gap: 8px; }

/* ---- FORMS ---- */
.admin-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  max-width: 900px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-light);
  font-family: var(--font-body);
  transition: border-color 0.2s;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Image upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: rgba(201,168,76,0.04);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.upload-zone-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.upload-zone-text { font-size: 13px; color: var(--text-muted); }
.upload-zone-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

.image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.image-preview-item {
  position: relative;
  width: 90px;
  height: 110px;
}
.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.image-preview-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: #F44336;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Toggle/Checkbox */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle {
  position: relative;
  width: 42px;
  height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--gold-dark); border-color: var(--gold); }
.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--gold);
}

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.3); color: #81C784; }
.alert-error   { background: rgba(244,67,54,0.1);  border: 1px solid rgba(244,67,54,0.3);  color: #EF9A9A; }
.alert-warning { background: rgba(255,152,0,0.1); border: 1px solid rgba(255,152,0,0.3); color: #FFCC80; }

/* ---- STATUS BADGE ---- */
.status-badge {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  font-weight: 600;
}
.status-active   { background: rgba(76,175,80,0.15);  color: #81C784; }
.status-inactive { background: rgba(100,100,100,0.15); color: #888; }
.status-new      { background: rgba(201,168,76,0.15);  color: var(--gold); }

/* ---- ADMIN LOGIN ---- */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1A1408 0%, #0A0A0A 70%);
  padding: 24px;
}
.admin-login-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.admin-login-logo { height: 56px; margin: 0 auto 8px; }
.admin-login-subtitle {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 36px;
}
.admin-login-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-light);
  margin-bottom: 28px;
}

/* Mobile sidebar */
.admin-sidebar-toggle { display: none; }
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-260px); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-sidebar-toggle {
    display: flex;
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    padding: 4px;
  }
  .admin-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
