/* ==========================================================================
   ASHUU CLOUD — DIVINE BLUE / NEON CYAN GLASSMORPHISM DESIGN SYSTEM
   Mobile-First Android Chrome Optimized • Zero Horizontal Overflow
   ========================================================================== */

:root {
  --bg-deep: #031329;
  --bg-secondary: #061B35;
  --glass-navy: rgba(7, 27, 53, 0.72);
  --glass-navy-elevated: rgba(10, 35, 68, 0.84);
  --glass-input: rgba(4, 18, 38, 0.78);
  --neon-cyan: #20DCFF;
  --ice-cyan: #A9F5FF;
  --electric-blue: #267BFF;
  --text-primary: #EAF8FF;
  --text-secondary: #91AFC8;
  --text-muted: #6082A0;
  --color-success: #18DF95;
  --color-warning: #FFB938;
  --color-danger: #FF5470;
  --border-glass: rgba(32, 220, 255, 0.18);
  --border-glass-strong: rgba(32, 220, 255, 0.52);
  --shadow-glass: 0 14px 36px -8px rgba(1, 9, 22, 0.72);
  --shadow-cyan-glow: 0 0 20px rgba(32, 220, 255, 0.24);
  --radius-card: 18px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --sidebar-width: 268px;
  --topbar-height: 68px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 12% 14%, rgba(38, 123, 255, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 86% 8%, rgba(32, 220, 255, 0.12) 0%, transparent 36%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-secondary) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--ice-cyan);
}

/* ==========================================================================
   APP SHELL LAYOUT (SIDEBAR + MAIN AREA)
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 22, 0.76);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.divine-sidebar {
  width: var(--sidebar-width);
  background: rgba(5, 21, 43, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(32, 220, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-crown {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(32, 220, 255, 0.22), rgba(38, 123, 255, 0.32));
  border: 1px solid rgba(32, 220, 255, 0.45);
  box-shadow: 0 0 16px rgba(32, 220, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ice-cyan);
  flex-shrink: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-top: 2px;
}

.sidebar-nav-section {
  padding: 14px 12px;
  flex: 1;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 8px 10px 6px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.nav-link-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.nav-icon {
  width: 22px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-link-item:hover {
  color: var(--text-primary);
  background: rgba(32, 220, 255, 0.08);
  border-color: rgba(32, 220, 255, 0.18);
  transform: translateX(2px);
}

.nav-link-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(32, 220, 255, 0.18) 0%, rgba(38, 123, 255, 0.16) 100%);
  border-color: rgba(32, 220, 255, 0.42);
  box-shadow: inset 3px 0 0 var(--neon-cyan), 0 4px 16px rgba(32, 220, 255, 0.14);
}

.sidebar-footer {
  padding: 14px 14px 18px;
  border-top: 1px solid rgba(32, 220, 255, 0.12);
  background: rgba(3, 15, 33, 0.55);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-version {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-viewport {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.divine-topbar {
  height: var(--topbar-height);
  background: rgba(5, 21, 44, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 80;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  background: rgba(32, 220, 255, 0.1);
  border: 1px solid rgba(32, 220, 255, 0.28);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

.topbar-title-group {
  min-width: 0;
}

.topbar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.system-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 223, 149, 0.1);
  border: 1px solid rgba(24, 223, 149, 0.34);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-success);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: softPulse 2.2s infinite ease-in-out;
}

@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(10, 35, 68, 0.8);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--electric-blue));
  color: #021024;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content {
  padding: 24px 22px 48px;
  max-width: 1360px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  animation: pageFadeIn 0.24s ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   GLASS CARDS & STATISTIC CARDS
   ========================================================================== */
.glass-card {
  background: var(--glass-navy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(169, 245, 255, 0.08);
  padding: 20px;
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.glass-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(32, 220, 255, 0.12);
  min-width: 0;
}

.glass-card-header > div {
  min-width: 0;
  max-width: 100%;
}

.glass-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.35;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid > * {
  min-width: 0;
  max-width: 100%;
}

.stat-glass-card {
  background: var(--glass-navy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-glass);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 220, 255, 0.38);
  box-shadow: var(--shadow-glass), 0 0 18px rgba(32, 220, 255, 0.14);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

.stat-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(32, 220, 255, 0.1);
  border: 1px solid rgba(32, 220, 255, 0.25);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   7-STYLE REUSABLE GLASS BUTTON SYSTEM
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  max-width: 100%;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.btn:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* 1. Primary Divine Cyan Button */
.btn-divine, .btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--electric-blue) 100%);
  color: #021124;
  border-color: rgba(169, 245, 255, 0.55);
  box-shadow: 0 6px 20px rgba(32, 220, 255, 0.25);
}

.btn-divine:hover:not(:disabled), .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(32, 220, 255, 0.4);
  color: #010a16;
}

/* 2. Secondary Glass Button */
.btn-glass, .btn-secondary {
  background: rgba(12, 41, 78, 0.68);
  color: var(--text-primary);
  border-color: rgba(145, 175, 200, 0.28);
  backdrop-filter: blur(10px);
}

.btn-glass:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
  background: rgba(18, 56, 104, 0.82);
  border-color: rgba(32, 220, 255, 0.4);
  color: var(--ice-cyan);
  transform: translateY(-1px);
}

/* 3. Outline Neon Button */
.btn-outline-neon {
  background: rgba(32, 220, 255, 0.06);
  color: var(--neon-cyan);
  border-color: rgba(32, 220, 255, 0.48);
}

.btn-outline-neon:hover:not(:disabled) {
  background: rgba(32, 220, 255, 0.16);
  box-shadow: 0 0 16px rgba(32, 220, 255, 0.22);
  color: var(--ice-cyan);
  transform: translateY(-1px);
}

/* 4. Success Glass Button */
.btn-success-glass {
  background: rgba(24, 223, 149, 0.15);
  color: var(--color-success);
  border-color: rgba(24, 223, 149, 0.42);
}

.btn-success-glass:hover:not(:disabled) {
  background: rgba(24, 223, 149, 0.25);
  box-shadow: 0 0 16px rgba(24, 223, 149, 0.22);
  transform: translateY(-1px);
}

/* 5. Danger Glass Button */
.btn-danger-glass {
  background: rgba(255, 84, 112, 0.15);
  color: var(--color-danger);
  border-color: rgba(255, 84, 112, 0.42);
}

.btn-danger-glass:hover:not(:disabled) {
  background: rgba(255, 84, 112, 0.26);
  box-shadow: 0 0 16px rgba(255, 84, 112, 0.22);
  transform: translateY(-1px);
}

/* 6. Icon Glass Button */
.btn-icon-glass {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  background: rgba(12, 41, 78, 0.65);
  color: var(--ice-cyan);
  border: 1px solid var(--border-glass);
}

.btn-icon-glass:hover:not(:disabled) {
  border-color: var(--neon-cyan);
  background: rgba(32, 220, 255, 0.15);
}

/* 7. Disabled Button */
.btn:disabled, .btn-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-sm {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 12px;
  border-radius: 9px;
}

/* ==========================================================================
   DARK GLASS FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
  min-width: 0;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
}

.form-control, .form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 14px;
  background: var(--glass-input);
  border: 1px solid rgba(145, 175, 200, 0.24);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus, .form-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(32, 220, 255, 0.16);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.form-row-2 > *,
.form-row-3 > * {
  min-width: 0;
  max-width: 100%;
}

/* ==========================================================================
   DARK GLASS TABLES & STATUS BADGES
   ========================================================================== */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.glass-table th {
  padding: 13px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(4, 17, 36, 0.65);
  border-bottom: 1px solid rgba(32, 220, 255, 0.18);
  white-space: nowrap;
}

.glass-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(145, 175, 200, 0.1);
  color: var(--text-primary);
  vertical-align: middle;
}

.glass-table tbody tr {
  transition: background var(--transition-fast);
}

.glass-table tbody tr:hover {
  background: rgba(32, 220, 255, 0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success, .badge-active, .badge-approved, .badge-running {
  background: rgba(24, 223, 149, 0.14);
  color: var(--color-success);
  border: 1px solid rgba(24, 223, 149, 0.36);
}

.badge-warning, .badge-pending, .badge-waiting_approval, .badge-awaiting_utr {
  background: rgba(255, 185, 56, 0.14);
  color: var(--color-warning);
  border: 1px solid rgba(255, 185, 56, 0.36);
}

.badge-danger, .badge-rejected, .badge-expired, .badge-error, .badge-suspended {
  background: rgba(255, 84, 112, 0.14);
  color: var(--color-danger);
  border: 1px solid rgba(255, 84, 112, 0.36);
}

.badge-info, .badge-offline, .badge-none {
  background: rgba(145, 175, 200, 0.14);
  color: var(--text-secondary);
  border: 1px solid rgba(145, 175, 200, 0.28);
}

/* ==========================================================================
   PAYMENT SETTINGS SELECTOR CARDS (RECTANGULAR GLASS CARD + METHOD CARDS)
   ========================================================================== */
.payment-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.payment-selector-grid > * {
  min-width: 0;
  max-width: 100%;
}

.gateway-method-card {
  background: rgba(5, 21, 44, 0.72);
  border: 1.5px solid rgba(145, 175, 200, 0.22);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.gateway-method-card:hover {
  border-color: rgba(32, 220, 255, 0.45);
  transform: translateY(-2px);
}

.gateway-method-card.selected {
  background: linear-gradient(180deg, rgba(12, 46, 88, 0.85) 0%, rgba(7, 27, 53, 0.9) 100%);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 24px rgba(32, 220, 255, 0.22), inset 0 0 12px rgba(32, 220, 255, 0.08);
}

.gateway-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(32, 220, 255, 0.18);
  color: var(--ice-cyan);
  border: 1px solid rgba(32, 220, 255, 0.45);
}

/* ==========================================================================
   FLASH ALERTS & BOT SUB-NAVIGATION
   ========================================================================== */
.flash-stack {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flash-banner {
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(12px);
}

.flash-success {
  background: rgba(24, 223, 149, 0.14);
  border: 1px solid rgba(24, 223, 149, 0.4);
  color: #B8FFE3;
}

.flash-warning {
  background: rgba(255, 185, 56, 0.15);
  border: 1px solid rgba(255, 185, 56, 0.42);
  color: #FFE4B0;
}

.flash-danger {
  background: rgba(255, 84, 112, 0.16);
  border: 1px solid rgba(255, 84, 112, 0.45);
  color: #FFC2CC;
}

.flash-info {
  background: rgba(32, 220, 255, 0.13);
  border: 1px solid rgba(32, 220, 255, 0.38);
  color: var(--ice-cyan);
}

.bot-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.bot-subnav a {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(7, 27, 53, 0.72);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.bot-subnav a.active, .bot-subnav a:hover {
  color: var(--text-primary);
  border-color: var(--neon-cyan);
  background: rgba(32, 220, 255, 0.14);
}

/* ==========================================================================
   AUTH CARD LAYOUT
   ========================================================================== */
.auth-viewport {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-glass-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-navy-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass-strong);
  border-radius: 22px;
  padding: 30px 26px;
  box-shadow: var(--shadow-glass), var(--shadow-cyan-glow);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (360px, 390px, 430px Mobile, Tablet, Desktop)
   ========================================================================== */
@media (max-width: 991px) {
  .divine-sidebar {
    transform: translateX(-100%);
  }
  .divine-sidebar.open {
    transform: translateX(0);
  }
  .main-viewport {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .form-row-2, .form-row-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .divine-topbar {
    padding: 0 14px;
  }
  .page-content {
    padding: 16px 12px 40px;
  }
  .glass-card {
    padding: 15px;
  }
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .system-online-pill span.online-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   V4.0 CELESTIAL CONTROL SYSTEM (SCREENSHOT 4 & 5) + WATER RIPPLE & BUBBLES
   ========================================================================== */

.btn, .nav-link-item, .stat-glass-card, .celestial-metric-card, .vip-stat-card, .vip-nav-btn, button {
  position: relative;
  overflow: hidden;
}

.water-ripple-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(32, 220, 255, 0.42) 0%, rgba(38, 123, 255, 0.18) 55%, transparent 72%);
  border: 1.5px solid rgba(169, 245, 255, 0.82);
  box-shadow: 0 0 18px rgba(32, 220, 255, 0.55);
  transform: translate(-50%, -50%) scale(0.15);
  animation: waterRippleExpand 0.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 30;
}

@keyframes waterRippleExpand {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.15);
  }
  70% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.6);
  }
}

.water-bubble {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(190, 250, 255, 0.95);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #ffffff, rgba(32, 220, 255, 0.55));
  box-shadow: 0 0 10px rgba(32, 220, 255, 0.65);
  animation: waterPop 0.62s ease-out forwards;
  z-index: 31;
}

@keyframes waterPop {
  0% {
    opacity: 0.95;
    transform: translate(0, 0) scale(0.35);
  }
  55% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 14px), var(--dy, -24px)) scale(1.18);
  }
}

/* Screenshot 4: Celestial Control System Top Toggle & Hero Banner */
.celestial-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 6px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}

.celestial-hamburger-btn {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(10, 42, 82, 0.88), rgba(4, 21, 46, 0.94));
  border: 1.5px solid rgba(32, 220, 255, 0.38);
  box-shadow: 0 0 18px rgba(32, 220, 255, 0.18), inset 0 1px 0 rgba(169, 245, 255, 0.2);
  color: var(--neon-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.celestial-hamburger-btn:hover {
  transform: translateY(-2px);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 24px rgba(32, 220, 255, 0.35);
}

.celestial-hero-banner {
  background: linear-gradient(145deg, rgba(8, 34, 68, 0.86) 0%, rgba(4, 19, 41, 0.92) 100%);
  border: 1px solid rgba(32, 220, 255, 0.24);
  border-radius: 24px;
  padding: 24px 24px;
  margin-bottom: 24px;
  box-shadow: 0 18px 42px -10px rgba(0, 8, 22, 0.78), inset 0 1px 0 rgba(169, 245, 255, 0.12);
}

.celestial-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #58C7F3;
  margin-bottom: 8px;
}

.celestial-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.celestial-online-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #63E6BE;
}

.celestial-greeting-box {
  margin-bottom: 22px;
}

.celestial-greeting-title {
  font-size: 25px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.celestial-greeting-sub {
  font-size: 14px;
  color: #8BA9C4;
  margin: 0;
}

.celestial-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.celestial-stat-grid > * {
  min-width: 0;
  max-width: 100%;
}

.celestial-metric-card {
  background: linear-gradient(160deg, rgba(7, 30, 60, 0.86) 0%, rgba(3, 15, 34, 0.94) 100%);
  border: 1px solid rgba(32, 220, 255, 0.2);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 14px 34px -10px rgba(0, 6, 18, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.celestial-metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(32, 220, 255, 0.48);
  box-shadow: 0 18px 38px -10px rgba(32, 220, 255, 0.22);
}

.celestial-metric-icon {
  color: #36D6FF;
  font-size: 22px;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
}

.celestial-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #87A7C3;
  margin-bottom: 8px;
}

.celestial-metric-val {
  font-size: 32px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 8px;
}

.celestial-metric-desc {
  font-size: 12.5px;
  color: #6B8BA8;
}

/* Staggered Sidebar Menu Entrance Animation */
.divine-sidebar.open .nav-link-item {
  animation: navItemSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.divine-sidebar.open .nav-link-item:nth-child(2) { animation-delay: 0.03s; }
.divine-sidebar.open .nav-link-item:nth-child(3) { animation-delay: 0.06s; }
.divine-sidebar.open .nav-link-item:nth-child(4) { animation-delay: 0.09s; }
.divine-sidebar.open .nav-link-item:nth-child(5) { animation-delay: 0.12s; }
.divine-sidebar.open .nav-link-item:nth-child(6) { animation-delay: 0.15s; }
.divine-sidebar.open .nav-link-item:nth-child(7) { animation-delay: 0.18s; }
.divine-sidebar.open .nav-link-item:nth-child(8) { animation-delay: 0.21s; }

@keyframes navItemSlideIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 380px) {
  .celestial-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .celestial-metric-card {
    padding: 16px 14px;
    min-height: 148px;
  }
  .celestial-metric-val {
    font-size: 26px;
  }
}

/* ==========================================================================
   V3.0 DARK GAMING / CLOUD SAAS PURPLE & ELECTRIC BLUE ACCENT EXTENSIONS
   ========================================================================== */
:root {
  --accent-purple: #8B5CF6;
  --accent-purple-bright: #A855F7;
  --border-purple-glow: rgba(139, 92, 246, 0.35);
}

.badge-successful {
  background: rgba(24, 223, 149, 0.14);
  color: var(--color-success);
  border: 1px solid rgba(24, 223, 149, 0.36);
}

.badge-grace_period {
  background: rgba(168, 85, 247, 0.18);
  color: #D8B4FE;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.badge-refunded, .badge-failed {
  background: rgba(255, 84, 112, 0.14);
  color: var(--color-danger);
  border: 1px solid rgba(255, 84, 112, 0.36);
}


/* ==========================================================================
   RESPONSIVE ACTION BAR & MOBILE-FIRST BUTTONS (SUPER ADMIN & CUSTOMER PANELS)
   Desktop : hint text on the left, buttons on the right.
   Phone   : (<= 640px) buttons stack full-width or flex evenly with 44-46px tap height.
   ========================================================================== */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.action-bar-end {
  justify-content: flex-end;
}

.action-bar-hint {
  flex: 1 1 280px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.action-bar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.action-bar-buttons .btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

/* Gold outline variant used by the Gram UPI card */
.btn-gold-outline {
  border-color: #FFB938;
  color: #FFE4B0;
}

.btn-gold-outline:hover:not(:disabled) {
  background: rgba(255, 185, 56, 0.14);
  border-color: #FFC966;
  box-shadow: 0 0 16px rgba(255, 185, 56, 0.24);
  color: #FFF1D2;
}

/* Reusable Mobile Button Group & Backup Item Cards */
.mobile-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.mobile-btn-group form {
  margin: 0;
  display: inline-flex;
  min-width: 0;
}

.backup-filename-code {
  display: inline-block;
  font-family: monospace;
  font-size: 12.5px;
  color: var(--ice-cyan);
  background: rgba(3, 14, 30, 0.72);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(32, 220, 255, 0.18);
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

@media (max-width: 640px) {
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-bar-hint {
    flex: 0 0 auto;
  }

  .action-bar-buttons {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
  }

  .action-bar-buttons .btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 12px;
  }

  /* Make all buttons wrap long labels gracefully and never exceed phone width */
  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    min-height: 42px;
    padding: 10px 14px;
  }

  .btn-sm {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 12.5px;
  }

  /* Card headers stack cleanly on phone screens */
  .glass-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .glass-card-header > form,
  .glass-card-header > div:last-child:not(:first-child) {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .glass-card-header > form > .btn,
  .glass-card-header > div > form,
  .glass-card-header > div > form > .btn,
  .glass-card-header > div > a.btn,
  .glass-card-header > a.btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  /* Make direct form submit buttons inside cards full-width on phone */
  .glass-card > form > .btn,
  .glass-card > form > button.btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Override inline fixed widths on inputs/selects inside forms on mobile */
  .glass-card form input.form-control,
  .glass-card form select.form-select,
  .glass-card form select.form-control {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Mobile button group: buttons fill available width in neat 2-col or full-width rows */
  .mobile-btn-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-btn-group > form,
  .mobile-btn-group > a.btn,
  .mobile-btn-group > button.btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 110px;
  }

  .mobile-btn-group > form > .btn {
    width: 100%;
    justify-content: center;
  }

  /* Mobile-Stacked Table: converts wide tables into vertical mobile cards on phones */
  .mobile-stack-table,
  .mobile-stack-table tbody {
    display: block;
    width: 100%;
  }

  .mobile-stack-table thead {
    display: none;
  }

  .mobile-stack-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(4, 18, 38, 0.78);
    border: 1px solid rgba(32, 220, 255, 0.24);
    border-radius: 14px;
    box-shadow: 0 8px 20px -8px rgba(0, 8, 22, 0.65);
  }

  .mobile-stack-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .mobile-stack-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(145, 175, 200, 0.08);
    width: 100%;
    min-width: 0;
    text-align: right;
  }

  .mobile-stack-table tbody td:last-child {
    border-bottom: none;
    padding-top: 8px;
  }

  .mobile-stack-table tbody td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    text-align: left;
    flex-shrink: 0;
  }

  .mobile-stack-table tbody td.mobile-cell-stack {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .mobile-stack-table tbody td.mobile-actions-cell {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding-top: 10px;
  }

  .mobile-stack-table tbody td.mobile-actions-cell::before {
    margin-bottom: 4px;
  }
}
