
:root {
  --bg: #111214;
  --surface: #1B1C1F;
  --surface-hover: #242529;
  --gold: #A88B4A;
  --gold-light: #C5AD76;
  --text: #E8E5DE;
  --muted: #92918D;
  --border: rgba(255,255,255,.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* DASHBOARD */

.dashboard-body {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
  width: 250px;
  min-height: 100vh;
  padding: 30px 18px 20px;
  background: #151619;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 36px;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #151515;
  border-radius: 11px;
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 2.5px;
}

.brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 2px;
}

.sidebar-label {
  padding: 0 12px;
  margin-bottom: 13px;
  color: #777773;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.navigation {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  color: #aaa9a4;
  font-size: 12px;
  text-decoration: none;
  border-radius: 9px;
  transition: .2s;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-item.active {
  color: var(--gold-light);
  background: rgba(168,139,74,.12);
  border: 1px solid rgba(168,139,74,.16);
}

.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-bottom .sidebar-label {
  margin-top: 25px;
}

.admin-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 8px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.admin-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(168,139,74,.18);
  color: var(--gold-light);
  font-size: 13px;
}

.admin-mini-info {
  min-width: 0;
}

.admin-mini-info strong,
.admin-mini-info span {
  display: block;
}

.admin-mini-info strong {
  font-size: 11px;
}

.admin-mini-info span {
  margin-top: 4px;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}

.logout-button {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: #b7aaa0;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: .2s;
}

.logout-button:hover {
  color: #e8a09a;
  border-color: rgba(232,160,154,.35);
  background: rgba(232,160,154,.05);
}

/* MAIN CONTENT */

.main-content {
  width: calc(100% - 250px);
  max-width: 1600px;
  padding: 38px 45px 25px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.topbar-date {
  margin: 0 0 9px;
  color: var(--gold-light);
  font-size: 9px;
  letter-spacing: 2px;
}

.topbar h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
}

.admin-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: #bdbbb4;
  font-size: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #79b995;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(121,185,149,.4);
}

/* WELCOME */

.welcome-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 180px;
  padding: 32px 36px;
  background:
    linear-gradient(110deg, rgba(168,139,74,.12), transparent 70%),
    #1B1C1F;
  border: 1px solid rgba(168,139,74,.2);
  border-radius: 15px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
}

.welcome-section h2 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 400;
}

.welcome-section p:last-child {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.welcome-decoration {
  position: absolute;
  right: 40px;
  color: rgba(197,173,118,.12);
  font-family: Georgia, serif;
  font-size: 125px;
  font-style: italic;
}

/* STATS */

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 38px 0 18px;
}

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.section-heading p,
.panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.period-label {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--gold-light);
  font-size: 9px;
  letter-spacing: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: .2s;
}

.stat-card:hover {
  border-color: rgba(168,139,74,.35);
  transform: translateY(-2px);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #aaa9a4;
  font-size: 10px;
}

.stat-icon {
  color: var(--gold);
  font-size: 19px;
}

.stat-card strong {
  display: block;
  margin-top: 20px;
  color: var(--text);
  font-size: 27px;
  font-weight: 500;
}

.stat-card p {
  margin: 7px 0 0;
  color: #777773;
  font-size: 9px;
}

/* PANELS */

.content-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.panel {
  min-height: 280px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.coming-soon {
  color: var(--gold-light);
  font-size: 8px;
  letter-spacing: 1px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 185px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 13px;
  background: rgba(168,139,74,.1);
  border-radius: 12px;
  color: var(--gold-light);
  font-size: 21px;
}

.empty-state h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
}

.empty-state p {
  max-width: 260px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

/* FOOTER */

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: #666661;
  font-size: 8px;
  letter-spacing: 1.3px;
}

/* LOGIN - TETAP DIPERTAHANKAN */

body:not(.dashboard-body) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 560px;
}

.container > .eyebrow {
  color: var(--gold-light);
}

.container h1 {
  font-size: clamp(28px, 6vw, 42px);
  margin: 14px 0;
}

.description {
  color: #a5a5a5;
  line-height: 1.6;
}

.status-card,
.login-card {
  margin-top: 30px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid #383838;
  border-radius: 16px;
}

.status-card p {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.status-label {
  display: block;
  color: #999;
  font-size: 12px;
  margin-top: 12px;
}

.success {
  color: #79d6a0;
}

.error {
  color: #ff8585;
}

.footer {
  margin-top: 35px;
  color: #777;
  font-size: 10px;
  letter-spacing: 2px;
}

.login-container {
  display: block;
  visibility: visible;
  opacity: 1;
  width: 100%;
  max-width: 430px;
  margin: auto;
}

.login-card {
  display: block;
  visibility: visible;
}

.login-card label {
  display: block;
  margin: 18px 0 8px;
  color: #c9c9c9;
  font-size: 13px;
}

.login-card input {
  width: 100%;
  padding: 14px;
  color: #fff;
  background: #101114;
  border: 1px solid #444;
  border-radius: 9px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--gold);
}

.login-card button {
  width: 100%;
  margin-top: 25px;
  padding: 14px;
  background: var(--gold);
  color: #151515;
  border: none;
  border-radius: 9px;
  font-weight: bold;
  cursor: pointer;
}

.login-card button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

#login-message {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
}

#login-message.success {
  color: #79d6a0;
}

#login-message.error {
  color: #ff8585;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
  .sidebar {
    width: 215px;
  }

  .main-content {
    width: calc(100% - 215px);
    padding: 30px 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dashboard-body {
    display: block;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    padding: 17px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    padding: 0 5px 17px;
  }

  .sidebar-label {
    display: none;
  }

  .sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 0 0;
    border-top: 1px solid var(--border);
  }

  .sidebar-bottom .sidebar-label {
    display: block;
    margin: 4px 0 2px;
  }

  .sidebar-bottom .nav-item {
    display: flex;
    width: 100%;
    justify-content: flex-start;
  }

  .sidebar-bottom .admin-mini {
    margin-top: 4px;
    padding: 10px 8px;
  }

  .navigation {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 5px 0 10px;
    scrollbar-width: thin;
  }

  .navigation .nav-item,
  .navigation .nav-item:not(.active) {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px 14px;
    background: #202124;
    color: #aaa9a4;
  }

  .navigation .nav-item.active {
    color: var(--gold-light);
    background: rgba(168,139,74,.15);
    border: 1px solid var(--gold);
  }

  .main-content {
    width: 100%;
    padding: 25px 17px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-section {
    min-height: 165px;
    padding: 25px;
  }

  .welcome-decoration {
    right: 10px;
    font-size: 90px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card strong {
    font-size: 23px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-footer {
    flex-direction: column;
    line-height: 1.8;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.brand-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  display: block;
}


.website-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* ======================================================
   GAELIZPIXEL SETTINGS MODULE
   ====================================================== */
#gp-settings {
  width: 100%;
  margin: 10px 0 30px;
  color: var(--text);
}

#gp-settings[hidden] { display: none !important; }

#gp-settings .settings-heading { margin-bottom: 24px; }
#gp-settings .settings-eyebrow {
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}
#gp-settings .settings-heading h2 {
  color: var(--text);
  font-size: 25px;
  font-weight: 600;
}
#gp-settings .settings-muted {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
#gp-settings .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
#gp-settings .settings-card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
#gp-settings .settings-card h3 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 600;
}
#gp-settings .settings-field {
  display: block;
  margin-top: 17px;
  color: #aaa9a4;
  font-size: 10px;
}
#gp-settings .settings-field input,
#gp-settings .settings-field select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 10px 12px;
  color: var(--text);
  background: #111214;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  outline: none;
  font: inherit;
  font-size: 11px;
}
#gp-settings .settings-field input:focus,
#gp-settings .settings-field select:focus { border-color: var(--gold); }
#gp-settings .settings-field input[readonly] { color: #aaa9a4; }
#gp-settings .settings-action {
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  padding: 10px 14px;
  color: #171717;
  background: var(--gold-light);
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
#gp-settings .settings-action:hover { filter: brightness(1.08); }
#gp-settings .settings-action:disabled { opacity: .6; cursor: wait; }
#gp-settings .settings-status {
  margin-top: 12px;
  color: #83c6a0;
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#gp-settings .settings-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  color: #d5d1c9;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
#gp-settings .settings-switch input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  cursor: pointer;
}

@media (max-width: 700px) {
  #gp-settings .settings-grid { grid-template-columns: 1fr; }
  #gp-settings .settings-card { padding: 18px; }
  #gp-settings .settings-heading h2 { font-size: 22px; }
}


/* OVERVIEW LIVE DATA */
.overview-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.overview-list-item strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.overview-list-item span {
  color: var(--muted);
  font-size: 10px;
}
.brand img {
  width: 150px;
  height: auto;
  object-fit: contain;
}