.app-confirm-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}
.app-confirm-dialog::backdrop {
  background: rgba(4, 7, 11, 0.76);
  backdrop-filter: blur(5px);
}
.app-confirm-body { padding: 28px; }
.app-confirm-heading { display: flex; align-items: center; gap: 14px; }
.app-confirm-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 97, 45, 0.42);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 19px;
  font-weight: 900;
}
.app-confirm-dialog[data-tone="danger"] .app-confirm-icon {
  border-color: rgba(239, 106, 100, 0.45);
  background: rgba(239, 106, 100, 0.1);
  color: var(--red);
}
.app-confirm-heading h2 { margin: 4px 0 0; font-size: 27px; line-height: 1.2; letter-spacing: -0.04em; }
.app-confirm-message { margin: 20px 0 0; color: var(--muted); line-height: 1.7; white-space: pre-line; }
.app-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }

.app-status { min-height: 1.5em; }
.app-status[data-state="pending"] { color: #e7b37a; }
.app-status[data-state="success"] { color: var(--green); }
.app-status[data-state="error"] { color: #ff9c96; }

.mode-next-action {
  width: min(var(--content), calc(100% - 48px));
  margin: 18px auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(232, 97, 45, 0.3);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(232, 97, 45, 0.12), transparent 62%), var(--surface);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}
.mode-next-action-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 22px; font-weight: 900; }
.mode-next-action-copy { min-width: 0; }
.mode-next-action-copy > div { display: flex; align-items: center; gap: 10px; }
.mode-next-action-copy p { margin: 0; color: var(--accent-strong); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.mode-next-action-copy span { color: var(--muted); font-size: 11px; font-weight: 700; }
.mode-next-action-copy h2 { margin: 4px 0 2px; font-size: clamp(20px, 2.2vw, 27px); letter-spacing: -.035em; }
.mode-next-action-copy small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.mode-next-action-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.mode-next-action-buttons > a, .mode-next-action-buttons > button { min-width: 128px; text-align: center; }
.mode-next-action-status { margin-top: 3px; color: var(--accent-strong) !important; font-weight: 700; }
.mode-next-action.tone-attention { border-color: rgba(240, 177, 75, 0.32); background: linear-gradient(110deg, rgba(240, 177, 75, 0.1), transparent 62%), var(--surface); }
.mode-next-action.tone-attention .mode-next-action-mark { background: rgba(240, 177, 75, 0.13); color: #f0b14b; }
.mode-next-action.tone-success { border-color: rgba(92, 195, 133, 0.3); background: linear-gradient(110deg, rgba(92, 195, 133, 0.1), transparent 62%), var(--surface); }
.mode-next-action.tone-success .mode-next-action-mark { background: rgba(92, 195, 133, 0.13); color: var(--green); }

.app-toast-region {
  position: fixed;
  z-index: 1000;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 36px));
  display: grid;
  gap: 9px;
  pointer-events: none;
}
.app-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(23, 29, 39, 0.97);
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: app-toast-enter 0.18s ease-out;
}
.app-toast-copy { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
.app-toast-actions { display: flex; align-items: center; gap: 5px; }
.app-toast-action {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.app-toast-action:hover { border-color: var(--accent); color: var(--accent-strong); }
.app-toast-action.secondary { border-color: transparent; background: transparent; color: var(--muted); }
.app-toast-action.secondary:hover { color: var(--text); background: var(--surface-3); }
.app-toast[data-state="success"] { border-left-color: var(--green); }
.app-toast[data-state="error"] { border-left-color: var(--red); }
.app-toast-close { width: 36px; min-height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.app-toast-close:hover { background: var(--surface-3); color: var(--text); }
@keyframes app-toast-enter { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 560px) {
  .app-confirm-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 13px; }
  .app-confirm-body { padding: 20px; }
  .app-confirm-heading h2 { font-size: 24px; }
  .app-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .app-toast-region { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100vw - 20px); }
  .app-toast { align-items: start; padding: 13px 9px 13px 14px; }
  .app-toast-actions button { min-height: 44px; }
  .mode-next-action { width: calc(100% - 28px); padding: 16px; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
  .mode-next-action-mark { width: 38px; height: 38px; }
  .mode-next-action-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; width: 100%; }
  .mode-next-action-copy > div { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-toast { animation: none; }
}
.save-lease-dialog{width:min(560px,calc(100% - 28px));padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.55)}.save-lease-dialog::backdrop{background:rgba(4,7,11,.78);backdrop-filter:blur(5px)}.save-lease-dialog>div,.save-lease-dialog>p{margin-left:24px;margin-right:24px}.save-lease-heading{display:flex;align-items:center;gap:14px;margin-top:24px}.save-lease-heading>span{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:50%;background:rgba(232,97,45,.14);color:var(--accent);font-size:22px;font-weight:800}.save-lease-heading h2{margin:3px 0 0;font-size:22px}.save-lease-dialog>p{color:var(--text);font-size:14px;line-height:1.65}.save-lease-note{padding:12px;border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:12px;line-height:1.6}.save-lease-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:20px;margin-bottom:24px}.save-lease-actions a,.save-lease-actions button{min-height:44px;text-align:center}@media(max-width:620px){.save-lease-actions{grid-template-columns:1fr}.save-lease-dialog>div,.save-lease-dialog>p{margin-left:16px;margin-right:16px}.save-lease-heading{margin-top:18px}.save-lease-actions{margin-bottom:18px}}
