/* ========================================================
   MODALS: PRICING, ACCOUNT, CHECKOUT
   ======================================================== */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}
.app-modal-backdrop.open {
  display: flex;
}
.app-modal-container {
  background: #0e121c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.25);
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(94vh, 94dvh);
}
.app-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #090c14;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}
.app-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}
.app-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: white;
}
.app-modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}
.app-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.app-modal-close:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #f87171;
  border-color: #f43f5e;
}
.app-modal-body {
  padding: 22px;
  overflow-y: auto;
}

/* ========================================================
   CUSTOM APP DIALOGS (CONFIRM, ALERT, PROMPT)
   ======================================================== */
.app-dialog-backdrop {
  z-index: 100002 !important;
}

.app-dialog-container {
  background: #0e121c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(99, 102, 241, 0.22);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dialogPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogPop {
  from {
    transform: scale(0.93) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.app-dialog-head {
  display: flex;
  gap: 16px;
  padding: 24px 24px 18px 24px;
}

.app-dialog-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-dialog-icon-box svg {
  width: 22px;
  height: 22px;
}

.app-dialog-icon-box.danger {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(225, 29, 72, 0.08));
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.app-dialog-icon-box.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.app-dialog-icon-box.primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.app-dialog-icon-box.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.app-dialog-icon-box.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.app-dialog-content {
  flex: 1;
}

.app-dialog-title {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.app-dialog-msg {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  white-space: pre-line;
}

.app-dialog-input-area {
  padding: 0 24px 18px 24px;
}

.app-dialog-input {
  width: 100%;
  padding: 12px 14px;
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.app-dialog-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.app-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 12, 20, 0.6);
}

.app-dialog-footer .btn {
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
}

.app-dialog-btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35) !important;
}
.app-dialog-btn-danger:hover {
  filter: brightness(1.1);
}

.app-dialog-btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}
.app-dialog-btn-warning:hover {
  filter: brightness(1.1);
}

