/* ═══════════════════════════════════════════════
   DFX GAMES — Admin Panel Styles
═══════════════════════════════════════════════ */

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

:root {
  --org:   #FF6B1A;
  --org2:  #FF8C42;
  --ylw:   #FFD600;
  --dark:  #0F0500;
  --dark2: #1C0800;
  --dark3: #2A1000;
  --sidebar-w: 260px;
  --header-h:  64px;
  --font: 'Nunito', sans-serif;
  --font-d: 'Fredoka', sans-serif;
  --shad: 0 4px 20px rgba(0,0,0,.3);
  --r: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 100px;
}

body {
  font-family: var(--font);
  background: #160800;
  color: #E8D0BE;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--dark2);
  border-right: 1px solid rgba(255,107,26,.15);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform .3s;
}

.sidebar-logo {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,107,26,.1);
  min-height: var(--header-h);
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #FF6B1A, #FFD600);
  border-radius: 10px; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(255,107,26,.4);
}
.sidebar-logo-text { font-family: var(--font-d); font-size: 1.2rem; font-weight: 700; }
.sidebar-logo-text span:first-child { color: var(--org); }
.sidebar-logo-text span:last-child  { color: #E8D0BE; }

.sidebar-nav { flex: 1; padding: 1rem .75rem; overflow-y: auto; }

.sidebar-section-label {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.3);
  padding: 0 .75rem; margin: 1.25rem 0 .4rem;
}
.sidebar-section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-radius: var(--r);
  color: rgba(255,255,255,.65); font-weight: 600; font-size: .92rem;
  transition: all .2s; cursor: pointer;
  text-decoration: none; margin-bottom: .15rem;
}
.nav-item:hover { background: rgba(255,107,26,.12); color: #FF8C42; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(255,107,26,.2), rgba(255,214,0,.1));
  color: var(--ylw);
  border: 1px solid rgba(255,107,26,.25);
}
.nav-item-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--org); color: white;
  font-size: .7rem; font-weight: 800; padding: .1rem .45rem;
  border-radius: var(--r-pill);
}

.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1px solid rgba(255,107,26,.1);
}
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: var(--r);
  background: rgba(255,255,255,.05);
  margin-bottom: .5rem;
}
.sidebar-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #FF6B1A, #FFD600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: white;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: .85rem; font-weight: 700; color: #E8D0BE; }
.sidebar-user-role { font-size: .72rem; color: rgba(255,255,255,.4); }

/* ── MAIN AREA ── */
.admin-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.admin-header {
  height: var(--header-h);
  background: rgba(15,5,0,.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,107,26,.12);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  position: sticky; top: 0; z-index: 100;
}
.admin-header-title { font-family: var(--font-d); font-size: 1.15rem; color: #E8D0BE; }
.admin-header-actions { display: flex; align-items: center; gap: 1rem; }

.header-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem; border-radius: var(--r-pill);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none;
}
.header-btn-primary {
  background: linear-gradient(135deg, #FF6B1A, #FFD600);
  color: white; box-shadow: 0 4px 16px rgba(255,107,26,.4);
}
.header-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.header-btn-ghost {
  background: rgba(255,255,255,.06); color: #E8D0BE;
  border: 1px solid rgba(255,255,255,.1);
}
.header-btn-ghost:hover { background: rgba(255,107,26,.15); color: var(--org); }

/* ── CONTENT ── */
.admin-content { padding: 2rem; flex: 1; }

/* ── CARDS ── */
.admin-card {
  background: var(--dark2);
  border: 1px solid rgba(255,107,26,.12);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shad);
}

/* ── STAT CARDS ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-box {
  background: var(--dark3);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  border: 1px solid rgba(255,107,26,.12);
  position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.stat-box:hover { transform: translateY(-3px); border-color: rgba(255,107,26,.35); }
.stat-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #FF6B1A, #FFD600);
}
.stat-box-num { font-family: var(--font-d); font-size: 2.2rem; font-weight: 700; }
.stat-box-num.orange { color: var(--org); }
.stat-box-num.yellow { color: var(--ylw); }
.stat-box-num.green  { color: #4CAF50; }
.stat-box-num.blue   { color: #64B5F6; }
.stat-box-label { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .1em; margin-top: .25rem; }
.stat-box-icon { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; opacity: .15; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid rgba(255,107,26,.15); }
th {
  padding: .75rem 1rem; text-align: left;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.4);
}
td {
  padding: .85rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .9rem; color: #D4B8A8;
  vertical-align: middle;
}
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,107,26,.05); }

/* ── FORMS ── */
.form-section { margin-bottom: 2rem; }
.form-section-title {
  font-family: var(--font-d); font-size: 1.1rem; color: var(--ylw);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,107,26,.2);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }

.admin-label {
  display: block; font-size: .82rem; font-weight: 700;
  color: rgba(255,255,255,.6); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .05em;
}
.admin-input {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,107,26,.2);
  border-radius: var(--r); color: #E8D0BE;
  font-family: var(--font); font-size: .95rem;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.admin-input:focus {
  border-color: var(--org);
  box-shadow: 0 0 0 3px rgba(255,107,26,.2);
}
.admin-input::placeholder { color: rgba(255,255,255,.25); }
select.admin-input { cursor: pointer; }
textarea.admin-input { resize: vertical; min-height: 120px; }

.admin-checkbox-wrap { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.admin-checkbox-wrap input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--org); cursor: pointer;
}
.admin-checkbox-label { font-size: .9rem; color: #D4B8A8; font-weight: 600; }

/* Image preview */
.upload-area {
  border: 2px dashed rgba(255,107,26,.3);
  border-radius: var(--r-lg); padding: 2rem 1rem; text-align: center;
  cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden;
}
.upload-area:hover { border-color: var(--org); background: rgba(255,107,26,.05); }
.upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.upload-text { font-size: .85rem; color: rgba(255,255,255,.5); }
.upload-hint { font-size: .75rem; color: rgba(255,255,255,.3); margin-top: .25rem; }
.image-preview {
  max-width: 180px; border-radius: var(--r);
  border: 2px solid rgba(255,107,26,.3); margin-top: .75rem;
  display: none;
}

/* ── ACTION BUTTONS ── */
.action-btns { display: flex; gap: .5rem; align-items: center; }
.btn-edit {
  padding: .35rem .85rem; border-radius: var(--r-pill);
  background: rgba(255,214,0,.12); color: var(--ylw);
  border: 1px solid rgba(255,214,0,.2); font-size: .78rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all .2s;
}
.btn-edit:hover { background: rgba(255,214,0,.25); }
.btn-delete {
  padding: .35rem .85rem; border-radius: var(--r-pill);
  background: rgba(255,80,80,.12); color: #FF6B6B;
  border: 1px solid rgba(255,80,80,.2); font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.btn-delete:hover { background: rgba(255,80,80,.25); }
.btn-view {
  padding: .35rem .85rem; border-radius: var(--r-pill);
  background: rgba(100,181,246,.1); color: #64B5F6;
  border: 1px solid rgba(100,181,246,.2); font-size: .78rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all .2s;
}

/* ── ALERTS ── */
.alert {
  padding: .9rem 1.25rem; border-radius: var(--r); margin-bottom: 1.5rem;
  font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .6rem;
}
.alert-success { background: rgba(76,175,80,.12); border: 1px solid rgba(76,175,80,.3); color: #81C784; }
.alert-error   { background: rgba(244,67,54,.12); border: 1px solid rgba(244,67,54,.3); color: #EF9A9A; }

/* ── MOBILE SIDEBAR TOGGLE ── */
.sidebar-toggle {
  display: none; background: none; border: none; cursor: pointer; color: #E8D0BE; font-size: 1.3rem;
}

/* ── PILL TAGS ── */
.pill {
  display: inline-block; padding: .2rem .6rem; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
}
.pill-orange { background: rgba(255,107,26,.15); color: var(--org2); }
.pill-yellow { background: rgba(255,214,0,.12); color: var(--ylw); }
.pill-green  { background: rgba(76,175,80,.12);  color: #81C784; }
.pill-gray   { background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); }

/* Login page */
.admin-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0F0500 0%, #2A0A00 50%, #1A0800 100%);
  padding: 1.5rem; position: relative; overflow: hidden;
}
.login-bubble {
  position: absolute; border-radius: 50%;
  background: rgba(255,107,26,.06);
  animation: float 8s ease-in-out infinite;
}
.login-bubble:nth-child(1) { width:300px;height:300px; top:-100px; right:-100px; animation-delay:0s; }
.login-bubble:nth-child(2) { width:200px;height:200px; bottom:-50px; left:-50px; animation-delay:2s; }
.login-bubble:nth-child(3) { width:150px;height:150px; top:40%; right:10%; animation-delay:4s; }
@keyframes float { 0%,100%{transform:translateY(0)}50%{transform:translateY(-20px)} }

.login-card {
  background: var(--dark2); border: 1px solid rgba(255,107,26,.2);
  border-radius: 28px; padding: 3rem; width: 100%; max-width: 420px;
  box-shadow: 0 32px 64px rgba(0,0,0,.5); position: relative;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-icon {
  width: 70px; height: 70px; border-radius: 20px;
  background: linear-gradient(135deg, #FF6B1A, #FFD600);
  font-size: 2rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem; box-shadow: 0 8px 32px rgba(255,107,26,.5);
}
.login-title { font-family: var(--font-d); font-size: 1.5rem; color: #E8D0BE; }
.login-subtitle { font-size: .85rem; color: rgba(255,255,255,.4); margin-top: .25rem; }
.login-btn {
  width: 100%; padding: .9rem; border: none; cursor: pointer;
  background: linear-gradient(135deg, #FF6B1A, #FFD600);
  color: white; font-family: var(--font); font-size: 1rem; font-weight: 800;
  border-radius: var(--r-pill); box-shadow: 0 8px 24px rgba(255,107,26,.5);
  transition: all .2s; margin-top: .5rem;
}
.login-btn:hover { opacity: .9; transform: translateY(-2px); }
.login-credentials {
  margin-top: 1.5rem; padding: 1rem; border-radius: var(--r);
  background: rgba(255,107,26,.07); border: 1px solid rgba(255,107,26,.15);
  font-size: .8rem; color: rgba(255,255,255,.5); text-align: center;
}
.login-credentials strong { color: var(--ylw); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .admin-content { padding: 1rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
