/* ══════════════════════════════════════════════════════
   theme-pages.css — InvoiceFlow Pro v3
   Modal, Notifications, Tags, Utils, Receipt, Responsive, Print, ImpEx
   Lines: 399
   ══════════════════════════════════════════════════════ */

/* ══ MODAL ══ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 30, .65);
  backdrop-filter: blur(6px);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--white);
  border-radius: var(--r3);
  padding: 24px;
  width: 520px;
  max-width: 95vw;
  box-shadow: 0 24px 60px rgba(10, 12, 30, .3), 0 0 0 1px rgba(124, 58, 237, .1);
  max-height: 90vh;
  overflow-y: auto;
}

/* Animation scoped to direct child of overlay only — 
   prevents dropdowns/datepickers inside modal from flashing */
.overlay > .modal {
  animation: mIn .22s cubic-bezier(.34, 1.56, .64, 1) both;
}
.overlay-nested { z-index: 750; }
/* No animation on anything inside the modal */
.modal input, .modal select, .modal textarea,
.modal .card, .modal .fi, .modal .fs,
.modal [class*="picker"], .modal [class*="dropdown"] {
  animation: none !important;
}

@keyframes mIn {
  from { opacity: 0; transform: translateY(20px) scale(.97) }
  to { opacity: 1; transform: translateY(0) scale(1) }
}

.modal-t {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--s2);
  letter-spacing: -.3px;
}

.modal-f {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

/* ══ NOTIFICATIONS ══ */
.nstack {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 310px;
}

.notif {
  background: var(--white);
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: var(--sh3), 0 0 0 1px rgba(124, 58, 237, .1);
  border-left: 4px solid var(--pu);
  pointer-events: all;
  animation: nIn .3s cubic-bezier(.34, 1.56, .64, 1);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
}

.notif.gr { border-left-color: var(--gr); }
.notif.bl { border-left-color: var(--in); }
.notif.re { border-left-color: var(--re); }
.notif.te { border-left-color: var(--te); }
.notif.warn { border-left-color: var(--am); }

.ni { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.nt2 { font-weight: 700; font-size: 12px; color: var(--s2); letter-spacing: -.1px; }
.ns { font-size: 10px; color: var(--s4); margin-top: 2px; line-height: 1.4; }

.nc {
  position: absolute;
  top: 7px;
  right: 9px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

@keyframes nIn {
  from { opacity: 0; transform: translateX(20px) }
  to { opacity: 1; transform: translateX(0) }
}

/* ══ TAGS ══ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.tg { background: var(--gr-bg); color: var(--gr); }
.to { background: var(--pu-bg); color: var(--pu); }
.tr { background: var(--re-bg); color: var(--re); }
.tb { background: var(--in-bg); color: var(--in); }
.tp { background: var(--pu-bg); color: var(--pu); }
.ta { background: var(--am-bg); color: var(--am); }
.tte { background: var(--te-bg); color: var(--te); }

.alert {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 10px;
  border-width: 1px;
  border-style: solid;
}

.al-g { background: var(--gr-bg); color: #065F46; border-color: rgba(16, 185, 129, .25); }
.al-b { background: var(--in-bg); color: var(--in); border-color: rgba(79, 70, 229, .25); }
.al-a { background: var(--am-bg); color: #92400E; border-color: #FDE68A; }
.al-r { background: var(--re-bg); color: #991B1B; border-color: rgba(239, 68, 68, .25); }
.al-p { background: var(--pu-bg); color: var(--pu2); border-color: rgba(124, 58, 237, .25); }

/* Spinner */
.sp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--border);
  border-top-color: var(--pu);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg) } }

