/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; width: 580px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal.modal-lg { width: 820px; }
.modal.modal-xl { width: 1080px; }
.modal-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: var(--panel); }
.modal-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; text-transform: uppercase; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all .15s; }
.modal-close:hover { color: var(--text); background: var(--dark); }
.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0; flex-wrap: wrap; background: var(--panel); }

/* Full-screen modal on mobile */
@media (max-width: 768px) {
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal,
  .modal.modal-lg,
  .modal.modal-xl {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .modal-header { position: sticky; top: 0; z-index: 2; }
  .modal-footer { position: sticky; bottom: 0; z-index: 2; justify-content: stretch; }
  .modal-footer .btn { flex: 1; min-height: 44px; justify-content: center; }
}
.modal-section-title { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin: 16px 0 10px; }
.modal-section-title:first-child { margin-top: 0; }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 18px; font-size: 13px; box-shadow: 0 8px 32px rgba(0,0,0,.4); display: flex; align-items: center; gap: 10px; animation: slideIn .3s ease; min-width: 260px; max-width: 380px; pointer-events: auto; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--steel); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast.fade-out { animation: fadeOut .3s ease forwards; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(40px); opacity: 0; } }

/* CONFIRM MODAL CONTENT */
.confirm-icon { font-size: 36px; text-align: center; margin-bottom: 12px; }
.confirm-msg { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.confirm-msg strong { color: var(--text); }
