@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #2b2b3c;
  --bg-surface: #222230;
  --text-main: #ffffff;
  --text-muted: #9CA3AF;
  --border-color: #3b3b4f;
  
  --primary-blue: #00d2ff;
  --primary-blue-hover: #3a7bd5;
  
  --success-green: #10B981;
  --danger-red: #EF4444;
  --warning-yellow: #F59E0B;
}

body {
  background-color: var(--bg-main) !important;
  color: var(--text-main) !important;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748B; }

/* Layout Containers */
.custom-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Cards */
.custom-card, .popup-box, .modal-content {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  color: var(--text-main) !important;
  width: 600px;
  max-width: 100%;
}

@media (max-width: 576px) {
  .custom-card, .popup-box, .modal-content {
    padding: 16px;
  }
}

/* QRIS Modal */
.qris-premium-modal {
  background: var(--bg-surface) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden;
}

.qris-premium-header {
  background: var(--bg-surface);
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.qris-premium-header img {
  width: 90px;
  margin-bottom: 12px;
  background: white;
  padding: 4px;
  border-radius: 8px;
}

.qris-premium-header h5 {
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0;
  font-size: 1.25rem;
}

.qris-premium-body {
  padding: 24px;
  text-align: center;
  background: var(--bg-surface);
}

.qris-image-container {
  background: white;
  padding: 12px;
  border-radius: 12px;
  border: none;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.qris-image-container img {
  border-radius: 8px;
  width: 200px;
  height: 200px;
  object-fit: cover;
}

.qris-amount-highlight {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  background: rgba(0, 210, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 8px;
}

.qris-premium-footer {
  padding: 16px 24px 24px;
  background: var(--bg-surface);
}

.btn-qris-cancel {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger-red) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  width: 100%;
}

.btn-qris-cancel:hover {
  background: var(--danger-red) !important;
  color: white !important;
}

/* Header & Tabs */
.nav-tabs {
  border-bottom: none !important;
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-tabs .nav-link {
  border: none !important;
  color: #475569 !important;
  font-weight: 600;
  border-radius: 8px !important;
  background: #f8fafc !important;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-hover)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

/* Form Inputs */
.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control, .form-select {
  background: #1a1c29 !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2) !important;
  outline: none;
}

.form-control::placeholder {
  color: #64748b !important;
}

/* Buttons */
.btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  border: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary, .btn-gradient, .btn-renew {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-hover)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3) !important;
}

.btn-primary:hover, .btn-gradient:hover, .btn-renew:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 210, 255, 0.5) !important;
}

/* Checkbox */
.form-check-input {
  background-color: #1a1c29;
  border-color: var(--border-color);
}
.form-check-input:checked {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

/* Fake Notification Box (Glassmorphism) */
.notification-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.notification {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.notification-icon img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.notification-content {
  display: flex;
  flex-direction: column;
}

.notification-content strong {
  font-size: 0.95rem;
  color: #000000;
  margin-bottom: 2px;
}

.notification-content small {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: 500;
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Tables */
.table {
  color: var(--text-main) !important;
  margin-top: 10px;
}

.table thead th {
  background: var(--bg-surface) !important;
  border-bottom: 2px solid var(--border-color) !important;
  color: var(--text-muted) !important;
  padding: 12px 16px;
}

.table tbody tr {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.table tbody td {
  padding: 16px !important;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color) !important;
}

/* Disabled responsive table card view to match sadat */

/* .btn-download overridden in HTML head like sadat */

/* Utilities */
.text-muted {
  color: var(--text-muted) !important;
}

/* Badges */
.badge-pending {
  background: var(--warning-yellow);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-green);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}