/* --- Toasts --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  background: #0d121f;
  color: #f1f5f9;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- Premium Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(30px); }
  to { transform: translateY(0); }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
}
.modal-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px 0;
  font-weight: 500;
}
.doctype-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.doctype-card {
  background: #111726;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-align: center;
}
.doctype-card:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.04);
  transform: translateY(-2px);
}
.doctype-card.selected {
  border-color: #06b6d4;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.03) 100%);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}
.doctype-card .dc-icon {
  font-size: 26px;
  transition: transform 0.2s;
}
.doctype-card:hover .dc-icon {
  transform: scale(1.1);
}
.doctype-card .dc-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}
.doctype-card.selected .dc-label {
  color: #fff;
}
.modal-details {
  background: rgba(17, 23, 41, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
}
.modal-footer {
  padding: 16px 24px;
  background: rgba(8, 12, 23, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ──────────────────────────────────────────────────────────────
   PREMIUM LIGHT MODE OVERRIDES
   ────────────────────────────────────────────────────────────── */
.toast {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.modal-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}
.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.modal-header h2 {
  color: #0f172a !important;
}
.modal-close {
  color: #64748b !important;
}
.modal-close:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
.modal-subtitle {
  color: #475569 !important;
}
.doctype-card {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.doctype-card:hover {
  border-color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.04) !important;
}
.doctype-card.selected {
  border-color: #4f46e5 !important;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.02) 100%) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}
.doctype-card .dc-label {
  color: #475569 !important;
}
.doctype-card.selected .dc-label {
  color: #4f46e5 !important;
  font-weight: 700 !important;
}
.modal-details {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}
.modal-details input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
.modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN OVERRIDES
   ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    max-width: none;
  }
}
