/* Shared dialog identity. Use native modal focus isolation with our visual style. */
.app-dialog {
  color:var(--ink,#273449); background:#fffefa; border:1px solid var(--line,#dcdedb);
  border-top:3px solid var(--gold,#b69a60); border-radius:14px; padding:0;
  box-shadow:0 24px 80px #162a4640; max-height:calc(100dvh - 32px);
}
.app-dialog::backdrop { background:#162a467a; backdrop-filter:blur(3px); }
.app-dialog .app-dialog-head { padding:20px 24px; border-bottom:1px solid var(--line,#dcdedb); }
.app-dialog .app-dialog-head h2 { margin:0; color:var(--navy,#162a46); font-size:20px; line-height:1.5; }
.app-confirm-dialog { width:min(720px,calc(100vw - 32px)); }
.app-dialog-frame { display:flex; flex-direction:column; max-height:calc(100dvh - 40px); }
.app-dialog-body { padding:18px 24px; overflow:auto; min-height:0; overscroll-behavior:contain; }
.app-dialog-body > p:first-child { margin:0 0 16px; line-height:1.7; }
.app-dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:16px 24px; border-top:1px solid var(--line,#dcdedb); background:#f6f3ed; }
.app-dialog button { background:#fff; border:1px solid #bdc6d3; border-radius:8px; color:#203b60; padding:var(--button-padding-y,6px) 14px; font:inherit; font-size:13px; line-height:1.4; font-weight:600; cursor:pointer; }
.app-dialog button:hover { background:#f0f3f7; }
.app-dialog button.primary { background:#203b60; border-color:#203b60; color:#fff; }
.app-dialog button.primary:hover { background:#142b49; }
.app-dialog-actions button { min-height:var(--button-height,36px); }
.app-dialog :focus-visible { outline:3px solid #54769f; outline-offset:3px; }
.app-dialog-head, .app-dialog-actions { flex-shrink:0; }
.app-dialog-change { border:1px solid var(--line,#dcdedb); border-radius:9px; margin:0 0 14px; background:#fff; overflow:hidden; }
.app-dialog-change:last-child { margin-bottom:0; }
.app-dialog-change h3 { margin:0; padding:10px 14px; background:#f6f3ed; color:var(--navy,#162a46); font-size:15px; }
.app-dialog-change dl { display:grid; grid-template-columns:76px minmax(0,1fr); gap:10px 14px; margin:0; padding:14px; font-size:14px; line-height:1.7; }
.app-dialog-change dt { font-weight:600; color:var(--muted,#627080); }
.app-dialog-change dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.app-dialog-change dd:nth-of-type(2) { background:#fff8e6; border-left:3px solid var(--gold,#b69a60); padding:4px 8px; }
.app-dialog-links { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0 0; }
.app-dialog-links[hidden] { display:none; }
.app-dialog-links .btn { display:inline-flex; align-items:center; gap:6px; min-height:var(--button-height,36px); padding:var(--button-padding-y,6px) 14px; border:1px solid #bdc6d3; border-radius:8px; background:#fff; color:#203b60; font-size:13px; font-weight:600; line-height:1.4; text-decoration:none; }
.app-dialog-links .btn:hover { background:#f0f3f7; }
.app-dialog-links .btn::after { content:'\2197'; color:var(--muted,#627080); font-weight:400; }
@media(max-width:650px) {
  .app-dialog-links .btn { flex:1 1 100%; justify-content:center; }
  .app-dialog .app-dialog-head, .app-dialog-body, .app-dialog-actions { padding:14px 16px; }
  .app-dialog .app-dialog-head h2 { font-size:18px; }
  .app-dialog-change dl { grid-template-columns:1fr; gap:4px; padding:12px; }
  .app-dialog-change dd { margin-bottom:10px; }
  .app-dialog-change dd:last-child { margin-bottom:0; }
  .app-dialog-actions { flex-direction:column-reverse; }
  .app-dialog-actions button { width:100%; }
}
