/* ============================================================
   ADMIN DASHBOARD STYLES (AGHA NL)
   Dark Cyber Aesthetic matching Storefront
   ============================================================ */

/* ===== AUTH / LOGIN SCREEN ===== */
.admin-auth {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #16122b, #07070c 80%);
  padding: 16px;
  z-index: 100;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.15);
  text-align: center;
  animation: fadeUp 0.3s ease;
}

.auth-logo {
  font-size: 40px;
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.auth-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.auth-footer a:hover {
  color: #beaaff;
}

.auth-hint {
  color: #55556a;
}

/* ===== ADMIN SHELL & HEADER ===== */
.admin-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(16, 16, 25, 0.85);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-bottom: 14px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge {
  background: linear-gradient(135deg, var(--purple), #4f21c9);
  color: #fff;
  font-weight: 900;
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.admin-brand b {
  display: block;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.admin-brand span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 11px;
  border-radius: 10px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* ===== TABS ===== */
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s;
}

.tab-btn:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.3);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.15));
  border-color: var(--purple);
  color: #fff;
}

/* ===== TAB PANES ===== */
.tab-pane {
  display: none;
  animation: fadeUp 0.2s ease;
}

.tab-pane.active {
  display: block;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.pane-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.pane-header p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.pane-filter {
  margin-bottom: 14px;
}

.pane-filter input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

.pane-filter input:focus {
  border-color: var(--purple);
}

/* ===== CARDS & FORMS ===== */
.card-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.highlight-box {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}

.highlight-box h4 {
  font-size: 14px;
  margin-bottom: 6px;
  color: #d8b4fe;
}

.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.danger-zone h4 {
  color: #f87171;
  margin-bottom: 4px;
}

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

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

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: #b0b0c2;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: #151522;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #fff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.help-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.help-text a {
  color: var(--cyan);
  text-decoration: underline;
}

/* ===== PREVIEW BOX ===== */
.preview-box {
  margin-top: 12px;
}

.preview-box label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.qris-preview-img-wrap {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f0f18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qris-preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== PRODUCT LIST ITEMS ===== */
.admin-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  transition: 0.2s;
}

.admin-product-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: #141420;
}

.prod-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #191929;
  border: 1px solid #202035;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.prod-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-thumb-box .ph {
  font-size: 16px;
  font-weight: 800;
  color: #beaaff;
}

.prod-item-info {
  flex: 1;
  min-width: 0;
}

.prod-item-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-item-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

.prod-item-meta span {
  display: inline-flex;
  align-items: center;
}

.prod-item-meta b {
  color: var(--cyan);
}

.prod-item-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

/* ===== MODAL ===== */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-dialog {
  background: #11111c;
  border: 1px solid var(--line);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: fadeUp 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  transition: 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.icon-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.icon-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #191928;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== DURATION REPEATER ROWS ===== */
.durations-editor-wrap {
  margin-top: 16px;
}

.durations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.durations-head label {
  font-size: 11px;
  font-weight: 700;
  color: #b0b0c2;
  text-transform: uppercase;
}

.dur-rows-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dur-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #161625;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
}

.dur-row input[type="text"] {
  flex: 1.2;
  padding: 7px 10px;
  background: #0f0f18;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

.dur-row input[type="number"] {
  flex: 1;
  padding: 7px 10px;
  background: #0f0f18;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

.dur-row .btn-del-dur {
  background: transparent;
  border: none;
  color: #ff6b6b;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: 0.2s;
}

.dur-row .btn-del-dur:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ===== TOAST NOTIFICATION ===== */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1c1c2e;
  border: 1px solid var(--purple);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(139, 92, 246, 0.3);
  z-index: 200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.25s ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== GITHUB AUTO-UPDATE STYLES ===== */
.btn-github {
  background: linear-gradient(135deg, #1f2328 0%, #161b22 100%);
  border: 1px solid rgba(88, 166, 255, 0.4);
  color: #79c0ff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: 0.2s;
}

.btn-github:hover {
  background: #21262d;
  border-color: #58a6ff;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.25);
}

.input-with-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

.input-with-action input {
  flex: 1;
}

.github-status-card {
  border-left: 4px solid var(--line);
  transition: border-color 0.3s;
}

.github-status-card.connected {
  border-left-color: #10b981;
}

.gh-status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  background: #6b7280;
  transition: 0.3s;
}

.gh-dot.connected {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

.gh-dot.partial {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.gh-dot.disconnected {
  background: #ef4444;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.8; }
}

/* ===== FLOATING WINDOW STATUS SIMPAN & DEPLOY ===== */
.save-status-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: statusFadeIn 0.25s ease;
}

@keyframes statusFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.save-status-card {
  background: #121324;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 100%;
  max-width: 460px;
  padding: 32px 24px 26px;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(139, 92, 246, 0.18);
  text-align: center;
  animation: statusScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes statusScaleUp {
  from { transform: scale(0.92) translateY(15px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.save-status-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: 0.2s;
  padding: 4px;
}

.save-status-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.status-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
}

.status-icon-box.loading {
  background: rgba(56, 189, 248, 0.1);
  border: 2px solid rgba(56, 189, 248, 0.3);
}

.status-icon-box.success {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  color: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.35);
}

.status-icon-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.35);
}

.status-symbol {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.status-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-right-color: #818cf8;
  border-radius: 50%;
  animation: statusSpin 0.75s linear infinite;
}

@keyframes statusSpin {
  to { transform: rotate(360deg); }
}

.status-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.status-title.success-text {
  color: #34d399;
}

.status-title.error-text {
  color: #f87171;
}

.status-desc {
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 8px;
}

.status-alert-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0;
  color: #fef08a;
  font-size: 13px;
  line-height: 1.55;
}

.status-alert-icon {
  font-size: 22px;
  flex: none;
  line-height: 1.2;
}

.status-alert-text b {
  color: #fbbf24;
}

/* Deploy Countdown */
.deploy-countdown-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 20px;
}

.countdown-bar-wrap {
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.countdown-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
  border-radius: 6px;
  transition: width 1s linear;
}

.countdown-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
}

.countdown-timer {
  font-weight: 700;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}

.status-action-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.status-action-btns .btn {
  padding: 10px 18px;
  font-size: 13px;
}
