/* Admin Panel CSS */
:root {
  --gold: #C9A84C;
  --dark: #111;
  --sidebar-w: 260px;
  --font: 'Jost', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font), sans-serif; background: #f4f5f7; color: #333; }
a { color: inherit; text-decoration: none; }

/* LAYOUT */
.admin-wrap { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: #0d0d0d;
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo span { font-size: 1.3rem; }
.sidebar-menu { padding: 12px 0; }
.sidebar-section { padding: 12px 20px 6px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.3); }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-link.active { background: rgba(201,168,76,0.1); color: var(--gold); border-left-color: var(--gold); }
.sidebar-icon { width: 18px; text-align: center; }

/* MAIN */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e0;
  padding: 0 24px;
  height: 60px;
  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: 600; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.admin-avatar { width: 34px; height: 34px; background: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #000; font-size: 0.85rem; }

.admin-content { padding: 24px; flex: 1; }

/* CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 6px; padding: 20px; border: 1px solid #e8e8e0; }
.stat-card-num { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat-card-label { font-size: 0.8rem; color: #888; margin-top: 4px; }

/* TABLE */
.admin-table-wrap { background: #fff; border-radius: 6px; border: 1px solid #e8e8e0; overflow: hidden; }
.admin-table-head { padding: 16px 20px; border-bottom: 1px solid #f0f0ea; display: flex; justify-content: space-between; align-items: center; }
.admin-table-head h3 { font-size: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead { background: #f8f8f5; }
thead th { padding: 11px 16px; text-align: left; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #666; white-space: nowrap; }
tbody tr { border-bottom: 1px solid #f5f5f0; }
tbody tr:hover { background: #fafaf7; }
tbody td { padding: 11px 16px; }

/* FORM */
.admin-form-wrap { background: #fff; border-radius: 6px; border: 1px solid #e8e8e0; padding: 24px; max-width: 800px; }
.form-group { margin-bottom: 1.2rem; }
label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; color: #555; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=url], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: 10px 14px;
  border: 1px solid #ddd; border-radius: 4px;
  font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* BUTTONS */
.btn { padding: 9px 20px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: #d4ae5a; }
.btn-dark { background: #111; color: #fff; }
.btn-outline { border: 1px solid #ddd; background: #fff; color: #555; }
.btn-outline:hover { border-color: #999; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-success { background: #16a34a; color: #fff; }

/* ALERT */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 0.88rem; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* LOGIN */
.login-wrap { min-height: 100vh; background: #0d0d0d; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; border-radius: 8px; padding: 40px; width: 380px; }
.login-logo { text-align: center; margin-bottom: 2rem; color: var(--gold); font-size: 1.2rem; font-weight: 700; }
.login-logo .logo-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }

/* PREVIEW IMAGE */
.preview-img { max-width: 120px; max-height: 80px; object-fit: contain; border: 1px solid #ddd; border-radius: 4px; margin-top: 8px; display: block; }
.image-upload-group { position: relative; }
.current-img { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.82rem; color: #888; }

/* Toggle */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { width: 40px; height: 22px; background: #ddd; border-radius: 11px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}