/* ============================================================
   CARNIVOR BURGER — Admin Panel CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #050505;
  --bg-card:     #0d0d0d;
  --bg-sidebar:  #090909;
  --gray:        #1a1a1a;
  --gray-mid:    #252525;
  --gray-light:  #333333;
  --gold:        #ff9d00;
  --gold-light:  #ffb74d;
  --gold-glow:   rgba(255,157,0,0.2);
  --white:       #ffffff;
  --text-sec:    #a0a0a0;
  --text-muted:  #606060;
  --glass:       rgba(255,255,255,0.03);
  --border:      rgba(255,157,0,0.1);
  --danger:      #e53935;
  --success:     #43a047;
  --font-main:   'Inter', sans-serif;
  --font-brand:  'Cinzel', serif;
  --radius:      10px;
  --sidebar-w:   240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font-main); background: var(--bg); color: var(--white); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a    { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img  { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 4px; }

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,157,0,0.05) 0%, transparent 60%),
    var(--bg);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-flame {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(255,157,0,0.6));
}

.login-brand-name {
  font-family: var(--font-brand);
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  display: block;
}

.login-brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.login-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  margin-bottom: 28px;
}

.a-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.a-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
}

.a-input {
  background: var(--gray);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--white);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color 0.25s;
  width: 100%;
}

.a-input:focus {
  outline: none;
  border-color: rgba(255,157,0,0.5);
  box-shadow: 0 0 0 3px rgba(255,157,0,0.08);
}

.a-input::placeholder { color: var(--text-muted); }

.a-btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: #050505;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
}

.a-btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 20px rgba(255,157,0,0.3);
  transform: translateY(-1px);
}

.login-error {
  background: rgba(229,57,53,0.1);
  border: 1px solid rgba(229,57,53,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #ef9a9a;
  text-align: center;
  margin-bottom: 18px;
}

/* ── ADMIN LAYOUT ── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand-name {
  font-family: var(--font-brand);
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  display: block;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav { padding: 16px 0; flex: 1; }
.sidebar-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 20px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sec);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover { color: var(--white); background: var(--glass); }
.sidebar-link.active { color: var(--gold); border-left-color: var(--gold); background: rgba(255,157,0,0.06); }
.sidebar-link-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  width: 100%;
  text-align: left;
}

.sidebar-logout:hover { color: var(--danger); }

/* Main Content */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-sec);
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255,157,0,0.15);
  border: 1px solid rgba(255,157,0,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
}

.admin-content { padding: 28px; flex: 1; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.25s;
}

.stat-card:hover { border-color: rgba(255,157,0,0.3); }

.stat-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── TABLE ── */
.a-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.a-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.a-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}

.a-table-wrap { overflow-x: auto; }

.a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.a-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.a-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-sec);
  vertical-align: middle;
}

.a-table tr:hover td { background: var(--glass); }

.a-table-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.a-table-img img { width: 100%; height: 100%; object-fit: cover; }

.a-product-name { font-weight: 600; color: var(--white); }

.a-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.a-badge-active  { background: rgba(67,160,71,0.15); color: #81c784; border: 1px solid rgba(67,160,71,0.3); }
.a-badge-inactive{ background: rgba(229,57,53,0.1);  color: #ef9a9a; border: 1px solid rgba(229,57,53,0.2); }
.a-badge-gold    { background: rgba(255,157,0,0.1);  color: var(--gold); border: 1px solid rgba(255,157,0,0.2); }

/* ── ACTION BUTTONS ── */
.a-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
}

.a-btn-icon.edit   { color: var(--gold); border-color: rgba(255,157,0,0.2); }
.a-btn-icon.edit:hover   { background: rgba(255,157,0,0.1); border-color: rgba(255,157,0,0.4); }
.a-btn-icon.delete { color: var(--danger); border-color: rgba(229,57,53,0.2); }
.a-btn-icon.delete:hover { background: rgba(229,57,53,0.1); border-color: rgba(229,57,53,0.4); }
.a-btn-icon.toggle { color: var(--text-muted); border-color: rgba(255,255,255,0.1); }
.a-btn-icon.toggle:hover { background: var(--glass); color: var(--white); }

.a-actions { display: flex; align-items: center; gap: 6px; }

.a-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.a-btn-gold  { background: var(--gold); color: #050505; }
.a-btn-gold:hover  { background: var(--gold-light); box-shadow: 0 4px 14px rgba(255,157,0,0.3); }
.a-btn-ghost { background: transparent; color: var(--text-sec); border-color: var(--border); }
.a-btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,0.2); }
.a-btn-danger { background: rgba(229,57,53,0.1); color: var(--danger); border-color: rgba(229,57,53,0.3); }
.a-btn-danger:hover { background: rgba(229,57,53,0.2); }

/* ── MODAL / DRAWER ── */
.a-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.a-modal-overlay.open { opacity: 1; pointer-events: all; }

.a-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.a-modal-overlay.open .a-modal { transform: translateY(0); }

.a-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a-modal-title { font-size: 1rem; font-weight: 600; color: var(--white); }

.a-modal-close {
  width: 32px;
  height: 32px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sec);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.a-modal-close:hover { border-color: var(--gold); color: var(--gold); }

.a-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }

.a-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── FORM ELEMENTS ── */
.a-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.a-textarea {
  background: var(--gray);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-main);
  font-size: 0.88rem;
  width: 100%;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.25s;
}

.a-textarea:focus { outline: none; border-color: rgba(255,157,0,0.5); }

.a-select {
  background: var(--gray);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-main);
  font-size: 0.88rem;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.25s;
  -webkit-appearance: none;
}

.a-select:focus { outline: none; border-color: rgba(255,157,0,0.5); }

.a-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.a-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-sec);
  cursor: pointer;
  padding: 8px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 7px;
  transition: all 0.2s;
}

.a-checkbox-label:hover { border-color: rgba(255,157,0,0.3); color: var(--white); }

.a-checkbox-label input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Image Upload */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--glass);
}

.upload-area:hover { border-color: rgba(255,157,0,0.4); background: rgba(255,157,0,0.04); }

.upload-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 12px;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-label { font-size: 0.78rem; color: var(--text-muted); }
.upload-label span { color: var(--gold); }

/* ── ALERTS ── */
.a-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.a-alert-success { background: rgba(67,160,71,0.12); border: 1px solid rgba(67,160,71,0.3); color: #81c784; }
.a-alert-error   { background: rgba(229,57,53,0.1);  border: 1px solid rgba(229,57,53,0.3);  color: #ef9a9a; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.mobile-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .a-form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
