/* Shopify-style admin shell v1.0.1 */
.sp-admin-body {
  background: #f1f1f1 !important;
  overflow: hidden;
}
.sp-admin-body .nav,
.sp-admin-body .mobile-drawer,
.sp-admin-body .drawer-backdrop {
  display: none !important;
}

.sp-admin {
  display: flex;
  min-height: 100vh;
  background: #f1f1f1;
  color: #202223;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#adminApp[hidden],
.sp-admin[hidden] {
  display: none !important;
}

.admin-gate.hidden {
  display: none !important;
}

.sp-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #ebebeb;
  border-right: 1px solid #e1e3e5;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sp-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 14px;
  text-decoration: none;
}
.sp-sidebar__brand .nav__logo-mark { width: 28px; height: 28px; font-size: 11px; }
.sp-sidebar__brand .nav__logo-dark,
.sp-sidebar__brand .nav__logo-red { font-size: 15px; font-weight: 800; }

.sp-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-nav--bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.sp-nav__item,
.sp-nav .admin-tab,
.sp-nav .admin-tab.active,
.sp-nav__item.admin-tab,
.sp-nav__item.admin-tab.active {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #202223;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.sp-nav__item[hidden] {
  display: none !important;
}
.sp-nav__item--sub {
  padding-left: 36px;
  font-size: 13px;
  font-weight: 650;
}
.sp-nav__item--sub svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}
.sp-nav__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}
.sp-nav__item:hover,
.sp-nav .admin-tab:hover {
  background: rgba(0,0,0,.05);
  color: #202223;
  border: 0;
}
.sp-nav__item.active,
.sp-nav .admin-tab.active,
.sp-nav__item.admin-tab.active {
  background: #fff;
  color: #202223;
  border: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.sp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sp-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e1e3e5;
  flex-shrink: 0;
}
.sp-topbar h1 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}
.sp-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-topbar__link {
  font-size: 13px;
  font-weight: 600;
  color: #2c6ecb;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.sp-topbar__link:hover { background: #f1f1f1; }

.sp-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sp-menu-btn svg { width: 20px; height: 20px; }

.sp-content {
  flex: 1;
  overflow: auto;
  padding: 20px 24px 48px;
}

.sp-content .admin-wrap,
.sp-content .admin-wrap--wide {
  max-width: none;
  margin: 0;
  padding: 0;
}

.sp-kicker {
  font-size: 13px;
  color: #6d7175;
  margin: 0 0 4px;
}
.sp-home-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.sp-home-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.sp-page-intro h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.sp-range {
  display: flex;
  background: #fff;
  border: 1px solid #c9cccf;
  border-radius: 8px;
  overflow: hidden;
}
.sp-range__btn {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: #6d7175;
  cursor: pointer;
}
.sp-range__btn + .sp-range__btn { border-left: 1px solid #e1e3e5; }
.sp-range__btn.active {
  background: #202223;
  color: #fff;
}

.sp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.sp-kpi {
  background: #fff;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 16px 18px;
}
.sp-kpi__label {
  font-size: 12.5px;
  font-weight: 650;
  color: #6d7175;
  margin-bottom: 8px;
}
.sp-kpi__value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.sp-kpi__delta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 650;
}
.sp-kpi__delta.is-up { color: #108043; }
.sp-kpi__delta.is-down { color: #d72c0d; }

.sp-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.sp-card {
  background: #fff;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 16px 18px 18px;
}
.sp-card h3,
.sp-card__head h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
}
.sp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sp-card__head h3 { margin: 0; }
.sp-link {
  border: 0;
  background: none;
  color: #2c6ecb;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.sp-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding-top: 8px;
}
.sp-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.sp-chart__bar {
  width: 100%;
  max-width: 28px;
  background: #8c9196;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.sp-chart__col.is-max .sp-chart__bar { background: #202223; }
.sp-chart__lbl {
  margin-top: 6px;
  font-size: 10px;
  color: #8c9196;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f1f1f1;
  font-size: 13.5px;
}
.sp-row:first-of-type { border-top: 0; padding-top: 0; }
.sp-row strong { font-weight: 700; }
.sp-row__meta { color: #6d7175; font-size: 12px; }

.sp-empty {
  color: #6d7175;
  font-size: 13.5px;
  padding: 18px 0 8px;
}

.sp-admin input,
.sp-admin textarea,
.sp-admin select {
  font-family: inherit;
  font-size: inherit;
  color: #202223;
  background: #fff;
  caret-color: #202223;
  color-scheme: light;
}
.sp-admin input:-webkit-autofill,
.sp-admin input:-webkit-autofill:hover,
.sp-admin input:-webkit-autofill:focus {
  -webkit-text-fill-color: #202223;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

.sp-pkg-list {
  max-width: 760px;
  background: #fff;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  overflow: hidden;
}
.sp-pkg-list__head,
.sp-pkg-row,
.sp-pkg-row.admin-row,
.sp-pkg-row.admin-pkg-row,
.sp-pkg-row.admin-month-pkg-row,
.sp-pkg-row.admin-translate-pkg-row {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 80px 96px 110px minmax(132px, auto);
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}
.sp-pkg-list--plain .sp-pkg-list__head,
.sp-pkg-list--plain .sp-pkg-row,
.sp-pkg-list--plain .sp-pkg-row.admin-row,
.sp-pkg-list--plain .admin-month-pkg-row,
.sp-pkg-list--plain .admin-translate-pkg-row {
  grid-template-columns: minmax(0, 1fr) 80px 96px 110px minmax(132px, auto);
}
.sp-pkg-list__head > *,
.sp-pkg-row > * {
  min-width: 0;
}
.sp-pkg-list__head {
  background: #fafafa;
  border-bottom: 1px solid #e1e3e5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6d7175;
}
.sp-pkg-row.admin-row,
.sp-pkg-row.admin-pkg-row {
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f1f1f1;
  border-radius: 0;
  flex-wrap: nowrap;
}
.sp-pkg-row:last-child { border-bottom: 0; }
.sp-pkg-row.admin-pkg-row--hidden { background: #fafafa; opacity: 1; }
.sp-pkg-row input,
.sp-pkg-row input[type="text"],
.sp-pkg-row input[type="number"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 34px;
  padding: 6px 10px !important;
  border: 1px solid #c9cccf;
  border-radius: 8px;
  background: #fff !important;
  color: #202223 !important;
  -webkit-text-fill-color: #202223 !important;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.sp-pkg-row__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #202223;
  white-space: nowrap;
}
.sp-pkg-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.sp-pkg-row__saved {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.sp-pkg-row__saved--error,
.product-form__saved--error {
  color: #d72c0d;
}
.product-form__saved {
  margin: 8px 0 0;
  font-size: 13px;
}
.sp-pkg-row .pkg-reorder { gap: 2px; }
.sp-pkg-row .btn-pkg-move {
  width: 28px;
  height: 20px;
  font-size: 12px;
}
.sp-pkg-row .btn { min-height: 32px; padding: 6px 10px; }

@media (max-width: 720px) {
  .sp-pkg-list__head { display: none; }
  .sp-pkg-row.admin-row,
  .sp-pkg-list--plain .sp-pkg-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .sp-pkg-row .pkg-reorder { grid-column: 1 / -1; flex-direction: row; }
  .sp-pkg-row input[data-f="name"] { grid-column: 1 / -1; }
  .sp-pkg-row__status { grid-column: 1 / -1; }
  .sp-pkg-row__actions { grid-column: 1 / -1; }
}

.sp-card .admin-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}
.sp-card .stat-box {
  padding: 12px 14px;
  border-radius: 10px;
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.sp-table th,
.sp-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f1f1;
}
.sp-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6d7175;
  font-weight: 700;
}
.sp-table td:last-child,
.sp-table th:last-child { text-align: right; }

.sp-sidebar-backdrop {
  display: none;
}

@media (max-width: 1100px) {
  .sp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sp-menu-btn { display: inline-flex; }
  .sp-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: none;
  }
  .sp-sidebar.is-open { transform: none; box-shadow: 8px 0 24px rgba(0,0,0,.12); }
  .sp-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  .sp-sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .sp-content { padding: 16px 14px 40px; }
  .sp-kpi__value { font-size: 22px; }
}

.jpcenter-topup {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  max-width: 640px;
}
.jpcenter-topup__balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.jpcenter-topup__balance {
  background: #fafafa;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 14px 16px;
}
.jpcenter-topup__balance-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #6d7175;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.jpcenter-topup__balance-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.jpcenter-topup__service {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 14px 16px;
}
.jpcenter-topup__service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.jpcenter-topup__service-meta {
  margin: 6px 0 10px;
  font-size: 13px;
}
.jpcenter-topup__service-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.jpcenter-topup__limit {
  background: #fafafa;
  border: 1px solid #e8eaeb;
  border-radius: 8px;
  padding: 8px 10px;
}
.jpcenter-topup__limit-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6d7175;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.jpcenter-topup__limit strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.jpcenter-topup__service-note {
  margin: 0;
  font-size: 12px;
}
.jpcenter-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.jpcenter-status-badge--loading {
  background: #f1f2f3;
  color: #6d7175;
}
.jpcenter-status-badge--active {
  background: #e3f1df;
  color: #108043;
}
.jpcenter-status-badge--inactive {
  background: #fde2e1;
  color: #d72c0d;
}
.jpcenter-status-badge--warn {
  background: #fff5ea;
  color: #b98900;
}
.jpcenter-topup__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.jpcenter-topup__card {
  background: #fff;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 16px;
}
.jpcenter-topup__card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.jpcenter-topup__rate {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6d7175;
}
.jpcenter-topup__qty {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 10px;
}
.jpcenter-topup__qty input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #c9cccf;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}
.jpcenter-topup__line-total {
  margin: 0;
  font-size: 14px;
}
.jpcenter-topup__grand {
  margin: 16px 0 12px;
  font-size: 15px;
  font-weight: 650;
}
.jpcenter-topup__wa {
  margin-top: 4px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.jpcenter-topup__wa-note {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}
.jpcenter-topup__wa.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 640px) {
  .jpcenter-topup__balances,
  .jpcenter-topup__grid {
    grid-template-columns: 1fr;
  }
  .jpcenter-topup__service-limits {
    grid-template-columns: 1fr;
  }
}
