/* =========================================================
   LUCHIA PI & DELIVERY NOTE (DDT) GENERATOR - APP STYLES
   ========================================================= */

:root {
  --primary: #1e3a8a;       /* Deep Navy */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f766e;     /* Deep Teal / Starera accent */
  --secondary-light: #f0fdfa;
  --accent: #2563eb;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --bg-app: #f1f5f9;
  --bg-panel: #ffffff;
  --card-bg: #f8fafc;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-paper: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ================= TOP NAVIGATION BAR ================= */
.app-navbar {
  height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

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

.logo-badge {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  letter-spacing: 0.5px;
}

.app-title-group h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.app-title-group p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Doc Type Switcher */
.doc-switcher {
  display: flex;
  background-color: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.switcher-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.switcher-btn:hover {
  color: var(--text-dark);
}

.switcher-btn.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language Switcher */
.lang-switch-group {
  display: flex;
  background-color: #e2e8f0;
  padding: 2px;
  border-radius: 6px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--text-dark);
}

.lang-btn.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: var(--text-dark);
}
.btn-secondary:hover {
  background-color: var(--bg-app);
  border-color: var(--text-muted);
}

.btn-accent {
  background-color: #0284c7;
  color: #ffffff;
}
.btn-accent:hover {
  background-color: #0369a1;
}

.btn-success {
  background-color: #10b981;
  color: #ffffff;
}
.btn-success:hover {
  background-color: #059669;
}

/* ================= MAIN WORKSPACE LAYOUT ================= */
.main-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 520px 1fr;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Responsive workspace */
@media (max-width: 1280px) {
  .main-workspace {
    grid-template-columns: 460px 1fr;
  }
}

@media (max-width: 960px) {
  .main-workspace {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
}

/* ================= LEFT EDITOR PANEL ================= */
.editor-panel {
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Section Cards */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-dark);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* Quick Fill Buttons */
.quick-fill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip-btn {
  background-color: #e2e8f0;
  border: none;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  background-color: #cbd5e1;
  color: var(--text-dark);
}

/* Items Table inside Form */
.items-form-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}

.items-form-table th {
  text-align: left;
  padding: 6px 8px;
  background-color: #e2e8f0;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 11px;
}

.items-form-table td {
  padding: 6px 4px;
  vertical-align: middle;
}

.items-form-table input,
.items-form-table select {
  padding: 6px 8px;
  font-size: 12px;
}

.btn-icon-danger {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
}

.btn-icon-danger:hover {
  background-color: #fee2e2;
}

/* ================= RIGHT PREVIEW PANEL ================= */
.preview-panel {
  background-color: #64748b;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  position: relative;
}

.preview-toolbar {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 10px;
  z-index: 30;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.toolbar-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ================= A4 CANVAS SIMULATION ================= */
.a4-container {
  width: 210mm;
  min-height: 297mm;
  background-color: #ffffff;
  box-shadow: var(--shadow-paper);
  border-radius: 2px;
  margin: 0 auto 40px auto;
  box-sizing: border-box;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

/* Generic A4 Document Styling */
.a4-document {
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 16mm 14mm 16mm;
  background: #ffffff;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
  box-sizing: border-box;
}

/* Utility classes inside document */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.text-primary { color: #1e3a8a; }
.text-accent { color: #2563eb; }
.text-dark { color: #0f172a; }
.text-muted { color: #64748b; }
.text-xs { font-size: 11px; }

/* ================= PROFORMA INVOICE (PI) STYLES ================= */
.pi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 2px solid #1e3a8a;
  margin-bottom: 14px;
}

.brand-block .brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.5px;
}

.brand-block .brand-subtitle {
  font-size: 10px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.brand-block .brand-meta {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.invoice-badge-title {
  font-size: 22px;
  font-weight: 900;
  color: #1e3a8a;
  text-align: right;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.doc-meta-card {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px 12px;
  min-width: 220px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 3px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-label {
  color: #64748b;
}

/* Parties Grid (Buyer & Shipping) */
.doc-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.party-box {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  background-color: #ffffff;
}

.party-box-header {
  background-color: #f1f5f9;
  padding: 5px 10px;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box-tag {
  font-size: 11px;
  font-weight: 700;
  color: #1e3a8a;
}

.tag-shipping {
  color: #0f766e;
}

.party-subtitle {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
}

.party-box-body {
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.4;
}

.party-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.party-line {
  color: #334155;
}

.party-line.note-line {
  margin-top: 3px;
  font-size: 10.5px;
  color: #64748b;
}

/* Table Section */
.doc-table-section {
  margin-bottom: 12px;
}

.section-title-bar {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.doc-table th {
  background-color: #1e3a8a;
  color: #ffffff;
  padding: 6px 8px;
  font-weight: 600;
  text-align: left;
  border: 1px solid #1e3a8a;
}

.doc-table td {
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

.row-alt {
  background-color: #f8fafc;
}

.blank-row td {
  color: #cbd5e1;
}

.summary-sub-row td {
  background-color: #f8fafc;
  font-size: 11px;
  border-top: 1px solid #cbd5e1;
}

.summary-label {
  font-weight: 600;
  color: #334155;
  text-align: right;
  padding-right: 12px !important;
}

.grand-total-row td {
  background-color: #eff6ff;
  border-top: 2px solid #1e3a8a;
  border-bottom: 2px solid #1e3a8a;
  padding: 8px 10px;
}

.total-qty-cell {
  font-size: 12px;
  color: #1e3a8a;
}

.total-title-cell {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
}

.grand-total-amount {
  font-size: 16px;
  font-weight: 900;
  color: #1e3a8a;
}

.currency-tag {
  font-size: 13px;
  margin-left: 2px;
}

.vat-legal-notice {
  font-size: 10px;
  color: #64748b;
  font-style: italic;
  margin-top: 4px;
}

/* Terms and Banking Grid */
.doc-terms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.terms-card, .banking-card {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
}

.card-header-bar {
  background-color: #f1f5f9;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #1e3a8a;
  border-bottom: 1px solid #cbd5e1;
  text-transform: uppercase;
}

.card-content-body {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
}

.terms-text {
  font-weight: 600;
  color: #0f172a;
}

.terms-subnote {
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
}

.bank-row {
  display: flex;
  margin-bottom: 2px;
}

.bank-lbl {
  width: 95px;
  color: #64748b;
  flex-shrink: 0;
}

.bank-val {
  color: #0f172a;
}

/* Signatures & Stamp */
.doc-signatures-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: auto;
}

.sign-column {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
}

.sign-title {
  background-color: #f1f5f9;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
}

.sign-box-inner {
  padding: 10px 10px;
  font-size: 11px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  position: relative;
}

.relative-container {
  position: relative;
}

.signature-script {
  font-family: 'Brush Script MT', 'Segoe Script', cursive;
  font-size: 18px;
  color: #1e3a8a;
  font-weight: normal;
}

.stamp-wrapper {
  position: absolute;
  right: 12px;
  top: 8px;
  width: 140px;
  pointer-events: none;
}

.official-stamp-img {
  width: 100%;
  height: auto;
  opacity: 0.88;
  filter: contrast(1.05);
  transform: rotate(-3deg);
}

.stamp-hidden {
  display: none !important;
}

.stamp-space-placeholder {
  margin-top: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stamp-caption {
  font-size: 10px;
  color: #94a3b8;
}

/* ================= DELIVERY NOTE (DDT) SPECIFIC STYLES ================= */
.ddt-document {
  padding: 14mm 16mm 12mm 16mm;
}

.ddt-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.ddt-main-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.ddt-legal-ref {
  font-size: 9.5px;
  color: #64748b;
}

.ddt-issuer-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.ddt-meta-badge {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-top: 2px;
}

.ddt-table-parties {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}

.ddt-table-parties th {
  background-color: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  text-align: left;
  border: 1px solid #0f172a;
}

.ddt-table-parties td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  vertical-align: top;
}

.party-cell .firm-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.party-cell .firm-detail {
  color: #334155;
  margin-bottom: 2px;
}

.ddt-delivery-location-bar {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
  font-size: 10.5px;
  margin-bottom: 8px;
}

.loc-label {
  font-weight: 700;
  color: #0f172a;
  margin-right: 6px;
}

/* Causale and Trasporto Bar */
.ddt-transport-spec-bars {
  border: 1px solid #cbd5e1;
  margin-bottom: 10px;
  font-size: 11px;
}

.spec-row {
  display: flex;
  align-items: center;
  padding: 5px 8px;
}

.causale-row {
  border-bottom: 1px solid #cbd5e1;
  background-color: #ffffff;
}

.trasporto-row {
  background-color: #f8fafc;
}

.spec-title {
  width: 90px;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
}

.spec-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.check-box-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475569;
}

.check-box-item.checked {
  color: #0f172a;
  font-weight: 700;
}

.check-box-item .chk {
  font-size: 13px;
  line-height: 1;
}

.vettore-inline {
  margin-left: 14px;
}

.vettore-name {
  color: #0f766e;
  font-weight: 700;
}

/* DDT Goods Table */
.ddt-goods-table-section {
  margin-bottom: 10px;
}

.ddt-table th {
  background-color: #0f172a;
  border-color: #0f172a;
}

.ddt-summary-row td {
  background-color: #f1f5f9;
  border-top: 2px solid #0f172a;
  padding: 6px 8px;
}

/* DDT Footer Receipt */
.ddt-footer-receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.ddt-notes-card, .ddt-receipt-card {
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
}

.footer-card-header {
  background-color: #0f172a;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-card-body {
  padding: 8px 10px;
  font-size: 11px;
  min-height: 85px;
}

.notes-text {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.ddt-carrier-disclaimer {
  font-size: 9.5px;
  color: #64748b;
  font-style: italic;
}

.receipt-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.receipt-row-split {
  display: flex;
  justify-content: space-between;
}

.receipt-lbl {
  font-weight: 600;
  color: #475569;
  margin-right: 4px;
}

.ddt-stamp-wrapper {
  bottom: 6px;
  right: 12px;
  top: auto;
  width: 120px;
}

/* DDT Statutory Footer */
.ddt-statutory-footer {
  text-align: center;
  font-size: 9px;
  color: #64748b;
  line-height: 1.4;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
}

.ddt-statutory-footer .operator-notice {
  font-weight: 600;
  color: #475569;
}

/* ================= MODALS & TOAST NOTIFICATIONS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background-color: var(--card-bg);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastIn 0.25s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-success {
  background-color: #0f766e;
}

.toast.toast-info {
  background-color: #1e3a8a;
}

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