:root {
    --bg: #020617;
    --card: #020617;
    --border: #1f2933;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #3b82f6;
}

* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #020617, #020617);
    color: var(--text);
}

.container {
    max-width: 420px;
    margin: auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.header p {
    color: var(--muted);
    font-size: 0.9rem;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.input {
  width: 100%;
  margin-top: 8px;
  background: #020617;
  color: var(--text);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
}

.lock-info {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #fbbf24;
}

label {
    font-size: 0.8rem;
    color: var(--muted);
}
/* =========================
   TOP UP BANNER
========================= */
.topup-banner { margin-bottom: 12px; }

.topup-banner__link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  text-decoration:none;
  color:inherit;

  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.topup-banner__left{ display:flex; flex-direction:column; gap:2px; }
.topup-banner__title{ font-weight:700; letter-spacing:.3px; }
.topup-banner__desc{ opacity:.85; font-size:13px; }
.topup-banner__cta{ font-weight:700; font-size:13px; white-space:nowrap; }

.topup-banner__link:hover{
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
}

.terminal-box{
  position: relative;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.65);
  overflow: hidden;
}

.terminal-copy{
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  opacity: .8;
  cursor: pointer;
  user-select: none;
}
.terminal-copy:hover{ opacity: 1; text-decoration: underline; }

.terminal{
  max-height: 260px;      
  overflow: auto;
  padding: 38px 14px 14px; /* atas kasih ruang buat Copy Output */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
}

/* baris status */
.t-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px 8px;
  border-radius: 10px;
}
.t-row:hover{ background: rgba(148,163,184,.08); }

.t-idx{
  min-width: 72px;
  opacity: .9;
}
.t-imei{
  flex: 1;
  letter-spacing: .3px;
}

.t-table-wrap{
  margin: 8px 10px 14px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 12px;
  overflow: auto;
}

.t-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
}

.t-table th, .t-table td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,.14);
  white-space: nowrap;
}

.t-table thead th{
  position: sticky;
  top: 0;
  background: rgba(2,6,23,.92);
  text-align: left;
  font-weight: 800;
  letter-spacing: .4px;
  z-index: 1;
}

.t-table tbody tr:nth-child(odd){
  background: rgba(148,163,184,.05);
}

.t-table .c-no{ width: 52px; text-align: right; opacity: .9; }
.t-table .c-date{ width: 170px; }
.t-table .c-action{ width: 120px; font-weight: 800; }
.t-table .c-imei, .t-table .c-imsi{ font-variant-numeric: tabular-nums; }

.t-empty{
  margin: 8px 10px 14px;
  padding: 10px 12px;
  opacity: .85;
  border: 1px dashed rgba(148,163,184,.22);
  border-radius: 12px;
}

.stt-badge{
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .4px;
  border: 1px solid rgba(255,255,255,.14);
}

.stt-roamer{
  background: rgba(239, 68, 68, .20);
  border-color: rgba(239, 68, 68, .35);
  color: #fecaca;
}

.stt-registered{
  background: rgba(34, 197, 94, .20);
  border-color: rgba(34, 197, 94, .35);
  color: #bbf7d0;
}

.stt-unknown{
  background: rgba(234, 179, 8, .20);
  border-color: rgba(234, 179, 8, .35);
  color: #fde68a;
}

.hidden{ display:none !important; }


textarea {
    width: 100%;
    min-height: 110px;
    margin-top: 8px;
    background: #020617;
    color: var(--text);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 12px;
    resize: none;
}

textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.select-wrap {
  position: relative;
  margin-top: 14px; 
}

#checkTypeSelect {
  width: 100%;
  margin-top: 8px;

  background-color: #020617 !important;
  color: var(--text) !important;

  border: 1px solid var(--border);
  border-radius: 10px;

  padding: 12px 44px 12px 12px;
  outline: none;

  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#checkTypeSelect:focus {
  border-color: var(--primary);
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: calc(50% + 12px);
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

#checkTypeSelect option {
  background: #020617;
  color: var(--text);
}

.options {
    margin-top: 14px;
}

.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.radio-group label {
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.radio-group input {
    display: none;
}

.radio-group input:checked + span {
    color: var(--primary);
    font-weight: 600;
}

button {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.button-group button {
    margin-top: 0; 
    flex: 1;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #020617;
    border-color: var(--primary);
    color: var(--primary);
}

.loading {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.preview-img {
    display: block;
    max-width: 260px; 
    width: 100%;
    margin: 12px auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* Terminal container */
.terminal-box{
  position: relative;
  margin-top: 16px;
}

.terminal-copy{
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  opacity: .85;
  z-index: 2;
}

.terminal-copy:hover{
  color: var(--primary);
  opacity: 1;
  text-decoration: underline;
}

.terminal{
  width: 100%;
  min-height: 140px;
  max-height: 360px;
  resize: vertical;          
  overflow: auto;

  background: #020617;
  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 38px 12px 12px 12px;  
  font-size: 0.85rem;
  line-height: 1.6;

  color: #22c55e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  word-break: break-word;
}

/* Optional: biar terminal kelihatan fokus */
.terminal:focus{
  outline: none;
  border-color: var(--primary);
}



.footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
}

.hidden {
    display: none;
}

.password-wrapper {
  position: relative;
  margin-top: 8px;
}

.input-password {
  margin-top: 0 !important;
  padding-right: 46px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--primary);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.eye-slash {
  stroke-dasharray: 30;
  stroke-dashoffset: 0;
  transition:
    stroke-dashoffset 0.25s ease,
    opacity 0.2s ease;
}

.toggle-password.show .eye-slash {
  stroke-dashoffset: 30;
  opacity: 0;
}

.swal-dark-popup {
    background: #020617 !important;
    color: #e5e7eb !important;
    border: 1px solid #1f2933;
    border-radius: 14px;
}

.swal-dark-title {
    color: #e5e7eb !important;
}
.swal2-close {
    color: #9ca3af !important;
}

.swal2-close:hover {
    color: #e5e7eb !important;
}

.swal-dark-html {
    color: #9ca3af !important;
}

.swal-dark-confirm {
    background: #3b82f6 !important;
    border-radius: 10px !important;
}

/* ===============================
   RESPONSIVE ADMIN TABLE
================================ */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
}

/* ===== MOBILE STACK MODE ===== */
@media (max-width: 640px) {
  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }
}
.btn-mini{ padding:6px 10px; font-size:12px; border-radius:10px; }
.btn-mini:disabled{ opacity:.45; cursor:not-allowed; }

