/* ============================================
   GUINEE TV 1 — Admin Panel
   ============================================ */
:root {
  --c-gold: #d4af37;
  --c-bg: #0a0e17;
  --c-bg2: #111827;
  --c-surface: rgba(255,255,255,0.06);
  --c-surface-strong: rgba(255,255,255,0.10);
  --c-border: rgba(255,255,255,0.12);
  --c-text: #f5f7fa;
  --c-text-muted: #9aa5b1;
  --c-red: #ce1126;
  --c-green: #009645;
  --sidebar-w: 250px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
  background: var(--c-bg); color: var(--c-text); line-height: 1.6;
  background-image: radial-gradient(circle at 80% 0%, rgba(212,175,55,0.08), transparent 40%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
.glass { background: var(--c-surface); backdrop-filter: blur(14px); border: 1px solid var(--c-border); border-radius: 14px; }

/* LOGIN */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 400px; padding: 32px 28px; text-align: center; }
.login-card .logo { font-size: 26px; font-weight: 900; background: linear-gradient(135deg,#d4af37,#f7e7a0,#d4af37); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 6px; }
.login-card h1 { font-size: 13px; font-weight: 700; color: var(--c-text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 28px; }
.login-card input { width: 100%; padding: 13px 15px; border-radius: 12px; background: var(--c-surface-strong); border: 1px solid var(--c-border); color: var(--c-text); font-size: 15px; margin-bottom: 12px; }
.login-card input:focus { outline: none; border-color: var(--c-gold); }
.login-card button { width: 100%; padding: 13px; border: 0; border-radius: 12px; background: linear-gradient(135deg,#d4af37,#f7e7a0,#d4af37); color: #0a0e17; font-weight: 800; font-size: 15px; cursor: pointer; transition: transform .2s; }
.login-card button:hover { transform: translateY(-2px); }
.err { color: #ff6b6b; font-size: 13px; margin-bottom: 12px; }

/* LAYOUT */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(20px); border-right: 1px solid var(--c-border);
  padding: 20px 14px; overflow-y: auto; z-index: 200;
}
.sidebar .logo { font-size: 18px; font-weight: 900; background: linear-gradient(135deg,#d4af37,#f7e7a0,#d4af37); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 24px; padding: 0 6px; word-break: break-word; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--c-text-muted); margin-bottom: 3px; transition: all .2s; }
.sidebar a:hover, .sidebar a.active { background: var(--c-surface-strong); color: var(--c-gold); }
.sidebar .sep { height: 1px; background: var(--c-border); margin: 14px 0; }
.main { flex: 1; padding: 24px; max-width: 100%; overflow-x: hidden; min-width: 0; }
.topbar-adm { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.topbar-adm h1 { font-size: 22px; font-weight: 800; }
.topbar-adm .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid var(--c-border); background: var(--c-surface-strong); color: var(--c-text); transition: all .2s; white-space: nowrap; }
.btn:hover { background: var(--c-surface-strong); border-color: var(--c-gold); color: var(--c-gold); }
.btn-primary { background: linear-gradient(135deg,#d4af37,#f7e7a0,#d4af37); border-color: transparent; color: #0a0e17; }
.btn-danger { background: var(--c-red); border-color: transparent; color: #fff; }
.btn-sm { padding: 7px 10px; font-size: 12px; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 18px; }
.stat-card .label { font-size: 12px; color: var(--c-text-muted); }
.stat-card .value { font-size: 28px; font-weight: 900; margin-top: 4px; background: linear-gradient(135deg,#d4af37,#f7e7a0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .icon { font-size: 24px; float: right; opacity: 0.6; }

/* TABLE */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); font-size: 13px; }
th { color: var(--c-text-muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
tr:hover td { background: var(--c-surface); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.published { background: rgba(0,150,69,0.2); color: #4ade80; }
.badge.draft { background: rgba(255,193,7,0.2); color: #ffc107; }

/* FORM */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--c-text-muted); }
input, select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 10px; background: var(--c-surface-strong);
  border: 1px solid var(--c-border); color: var(--c-text); font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-gold); }
textarea { resize: vertical; min-height: 100px; }
.row { margin-bottom: 16px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }

/* CARD */
.card { padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* COLOR INPUTS */
input[type=color] { height: 42px; padding: 4px; cursor: pointer; }

/* TOAST */
.toast { position: fixed; bottom: 20px; right: 20px; left: 20px; padding: 12px 18px; border-radius: 12px; background: var(--c-green); color: #fff; font-weight: 700; z-index: 1000; animation: slideIn .3s; box-shadow: 0 8px 32px rgba(0,0,0,0.4); text-align: center; }
@keyframes slideIn { from{transform:translateY(120%)} to{transform:translateY(0)} }

/* HAMBURGER */
.adm-burger { display: none; font-size: 20px; padding: 8px 12px; }

/* Dashboard layout */
@media (min-width: 769px) {
  .topbar-adm > div:first-child { flex: 1; }
}

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar { position: fixed; left: -100%; top: 0; height: 100vh; transition: left .3s cubic-bezier(.2,.8,.2,1); box-shadow: 4px 0 30px rgba(0,0,0,0.5); }
  .sidebar.open { left: 0; }
  .sidebar.open + .backdrop-adm { display: block; }
  .backdrop-adm { display: none; position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.6); }
  .main { padding: 16px 14px; }
  .adm-burger { display: inline-flex; }
  .topbar-adm h1 { font-size: 18px; }
  .card { padding: 16px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 22px; }
  th, td { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-adm { flex-direction: column; align-items: stretch; }
  .topbar-adm .actions { justify-content: flex-end; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .card { padding: 14px; }
}
