/* =========================================================
   SELECTRA Admin Panel — Stylesheet
   Tema biru tua premium, selaras dengan public site.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --navy:       #001B44;
  --navy-2:     #002B66;
  --blue:       #0F52BA;
  --blue-soft:  #2E6FD6;
  --cyan:       #4ED6E0;
  --gold:       #FFB94D;
  --red:        #E74C3C;
  --red-soft:   #FF6B6B;
  --green:      #2ECC71;
  --text:       #FFFFFF;
  --text-2:     rgba(255,255,255,0.70);
  --text-3:     rgba(255,255,255,0.45);
  --surface:    rgba(255,255,255,0.05);
  --border:     rgba(255,255,255,0.10);
  --shadow:     0 8px 30px rgba(0,0,0,0.4);
  --radius:     14px;
  --radius-sm:  8px;
  --pill:       999px;
  --font:       'Poppins', sans-serif;
  --mono:       'JetBrains Mono', monospace;
  --ease:       cubic-bezier(0.22,1,0.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background atmosphere */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 800px 500px at 0% 0%, rgba(15,82,186,0.3), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(78,214,224,0.1), transparent 60%),
    linear-gradient(180deg, var(--navy), #000F28);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--navy-2); border-radius:8px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* =========================================================
   LAYOUT — Sidebar + Main
   ========================================================= */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(0,10,28,0.8);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.sidebar__brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar__brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.sidebar__brand .logo .mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 16px rgba(15,82,186,0.6);
  padding: 5px;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar__brand .logo span {
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sidebar__brand .badge {
  font-size: 0.68rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 42px;
}

.sidebar__nav {
  padding: 18px 14px;
  flex: 1;
}
.sidebar__nav .nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-3);
  padding: 0 12px;
  margin: 18px 0 8px;
  font-family: var(--mono);
}
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.2s var(--ease);
  margin-bottom: 2px;
}
.sidebar__nav a:hover { background: var(--surface); color: #fff; }
.sidebar__nav a.active {
  background: linear-gradient(135deg, rgba(15,82,186,0.35), rgba(15,82,186,0.1));
  color: #fff;
  border: 1px solid rgba(15,82,186,0.4);
}
.sidebar__nav a .icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  background: var(--surface);
  flex-shrink: 0;
}
.sidebar__nav a.active .icon {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.sidebar__footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border);
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 10px;
}
.sidebar__user .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.sidebar__user .info small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-3);
}
.sidebar__user .info strong { font-size: 0.85rem; }

/* ---- Main area ---- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,10,28,0.5);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  gap: 16px;
}
.topbar__title h1 {
  font-size: 1.2rem;
  font-weight: 700;
}
.topbar__title p {
  font-size: 0.8rem;
  color: var(--text-3);
}
.topbar__actions { display: flex; gap: 10px; align-items: center; }

/* ---- Content area ---- */
.content {
  padding: 32px;
  flex: 1;
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .content { padding: 20px; }
  .topbar { padding: 14px 20px; }
}

/* =========================================================
   COMPONENTS
   ========================================================= */

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--pill);
  font-weight: 600; font-size: 0.88rem;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
  color: #fff;
  box-shadow: 0 6px 20px rgba(15,82,186,0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,82,186,0.65); }
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-soft));
  color: #fff;
  box-shadow: 0 6px 20px rgba(231,76,60,0.35);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(231,76,60,0.55); }
.btn-success {
  background: linear-gradient(135deg, #1a9550, var(--green));
  color: #fff;
  box-shadow: 0 6px 20px rgba(46,204,113,0.35);
}
.btn-success:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-xs { padding: 6px 12px; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- Card / Panel ---- */
.card {
  background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card-sm { padding: 20px; }

/* ---- Stat cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(15,82,186,0.4); }
.stat-card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px;
}
.stat-card .val {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .lbl { font-size: 0.78rem; color: var(--text-3); }
.stat-card.blue .icon { background: rgba(15,82,186,0.25); }
.stat-card.cyan .icon { background: rgba(78,214,224,0.18); }
.stat-card.gold .icon { background: rgba(255,185,77,0.18); }
.stat-card.green .icon { background: rgba(46,204,113,0.18); }
.stat-card.blue .val { color: var(--cyan); }
.stat-card.cyan .val { color: var(--cyan); }
.stat-card.gold .val { color: var(--gold); }
.stat-card.green .val { color: var(--green); }

/* ---- Table ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table.data-table {
  width: 100%; border-collapse: collapse; min-width: 700px;
}
.data-table thead th {
  background: rgba(0,10,28,0.8);
  padding: 14px 18px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  font-family: var(--mono);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table tbody td .price { font-family: var(--mono); color: var(--gold); font-weight: 600; }
.data-table tbody td .actions { display: flex; gap: 8px; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge-gaming { background: rgba(78,214,224,0.18); color: var(--cyan); }
.badge-harian { background: rgba(15,82,186,0.22); color: #7BAAF7; }
.badge-kamera { background: rgba(255,185,77,0.18); color: var(--gold); }

/* ---- Forms ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid.col3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px) { .form-grid.col3 { grid-template-columns: 1fr 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1/-1; }
.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cyan);
  font-family: var(--mono);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0,8,22,0.6);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--blue-soft); }
.form-control::placeholder { color: var(--text-3); }
select.form-control option { background: var(--navy-2); color: #fff; }
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ---- Alerts ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.35); color: var(--green); }
.alert-error   { background: rgba(231,76,60,0.15);  border: 1px solid rgba(231,76,60,0.35);  color: var(--red-soft); }
.alert-info    { background: rgba(15,82,186,0.15);  border: 1px solid rgba(15,82,186,0.35);  color: #7BAAF7; }

/* ---- Search / Filter bar ---- */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-box input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: var(--pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.88rem;
}
.search-box input:focus { outline: none; border-color: var(--blue-soft); }
.search-box input::placeholder { color: var(--text-3); }
.search-box .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-3);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--cyan); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-3); }
.breadcrumb .current { color: var(--text); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }

/* ---- Confirm dialog overlay ---- */
.overlay {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}
.overlay.open { display: flex; }
.dialog {
  background: #001630;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.dialog .icon { font-size: 2.5rem; margin-bottom: 14px; }
.dialog h3 { font-size: 1.1rem; margin-bottom: 10px; }
.dialog p { color: var(--text-2); font-size: 0.9rem; margin-bottom: 24px; }
.dialog .actions { display: flex; gap: 12px; justify-content: center; }

/* ---- Login page ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 46px 40px;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.login-card .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.login-card .brand.brand--stacked {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 16px;
}
.login-card .brand .mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 20px rgba(15,82,186,0.7);
  padding: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.login-card .brand .mark.mark--lg {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 0 40px rgba(15,82,186,0.55);
}
.login-card .brand-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 36px;
}
.login-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.login-card .subtitle { font-size: 0.88rem; color: var(--text-3); margin-bottom: 28px; }
