.ws-dialog-root { color: var(--ink, #17243d); }
.ws-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line, #e0e7f2);
  border-radius: 18px;
  background: #fff;
  color: var(--ink, #17243d);
  box-shadow: 0 24px 80px rgba(20, 39, 78, .2);
  overflow: auto;
}
.ws-dialog::backdrop { background: rgba(22, 35, 59, .48); backdrop-filter: blur(3px); }
.ws-dialog-panel { padding: 24px; }
.ws-dialog-panel.is-wide { width: min(100%, 680px); }
.ws-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ws-dialog-head h2 { margin: 0; color: var(--ink, #17243d); font-size: 21px; line-height: 1.3; font-weight: 750; letter-spacing: -.02em; }
.ws-dialog-head p { margin: 6px 0 0; color: var(--muted, #74809a); font-size: 13px; }
.ws-dialog-close { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; color: #73809a; background: #f3f6fb; cursor: pointer; }
.ws-dialog-close:hover { color: var(--ink, #17243d); background: #e9eff9; }
.ws-dialog-close:focus-visible, .ws-dialog button:focus-visible, .ws-dialog input:focus-visible, .ws-dialog textarea:focus-visible, .ws-dialog select:focus-visible { outline: 3px solid rgba(49, 94, 223, .28); outline-offset: 2px; }
.ws-dialog-content { min-width: 0; }
.ws-dialog-form { display: grid; gap: 16px; }
.ws-dialog-field { display: grid; gap: 7px; color: #34425d; font-size: 13px; font-weight: 650; }
.ws-dialog-field input, .ws-dialog-field textarea, .ws-dialog-field select { box-sizing: border-box; width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line, #dfe6f1); border-radius: 10px; color: var(--ink, #17243d); background: #fff; font: inherit; font-size: 14px; font-weight: 450; }
.ws-dialog-field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.ws-dialog-field input::placeholder, .ws-dialog-field textarea::placeholder { color: #a2acc0; }
.ws-dialog-field small { color: var(--muted, #74809a); font-size: 12px; font-weight: 450; }
.ws-dialog .ws-dialog-submit { min-height: 44px; justify-content: center; margin-top: 3px; }
.ws-dialog .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid var(--line, #e0e7f2); border-radius: 9px; color: #33415c; background: #fff; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.ws-dialog .btn:hover:not(:disabled) { border-color: #c5d2e8; background: #f5f8fd; }
.ws-dialog .btn.primary { border-color: var(--blue, #315edf); color: #fff; background: var(--blue, #315edf); }
.ws-dialog .btn.primary:hover:not(:disabled) { border-color: #234fcf; background: #234fcf; }
.ws-dialog .btn:disabled { opacity: .58; cursor: wait; }
.ws-dialog-switch { margin: 0; color: var(--muted, #74809a); text-align: center; font-size: 13px; font-weight: 450; }
.ws-dialog-link { padding: 0; border: 0; color: var(--blue, #315edf); background: none; font: inherit; font-weight: 700; cursor: pointer; }
.ws-dialog-error { margin: 0; padding: 10px 12px; border: 1px solid #ffd4d1; border-radius: 9px; color: #b33231; background: #fff6f5; font-size: 13px; line-height: 1.45; }
.ws-dialog-loading, .ws-dialog-muted { margin: 0; padding: 24px 8px; color: var(--muted, #74809a); text-align: center; font-size: 13px; }
.ws-dialog-empty { display: grid; justify-items: center; padding: 20px 12px 28px; text-align: center; }
.ws-dialog-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--blue, #315edf); background: #edf2ff; }
.ws-dialog-empty h3 { margin: 16px 0 5px; font-size: 16px; }
.ws-dialog-empty p { margin: 0 0 18px; color: var(--muted, #74809a); font-size: 13px; }
.ws-dialog-pending-list { display: grid; gap: 10px; }
.ws-dialog-pending { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 14px; border: 1px solid var(--line, #e4eaf3); border-radius: 13px; }
.ws-dialog-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ws-dialog-person > div { display: grid; gap: 3px; min-width: 0; }
.ws-dialog-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ws-dialog-person div span, .ws-dialog-pending time { color: var(--muted, #74809a); font-size: 12px; }
.ws-dialog-pending time { text-align: right; }
.ws-dialog-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #315edf; background: #eaf0ff; font-size: 15px; font-weight: 750; }
.ws-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.ws-dialog-tabs { display: flex; gap: 6px; margin: -4px 0 20px; padding: 4px; border-radius: 11px; background: #f2f5fa; }
.ws-dialog-tabs [role="tab"] { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 0; border-radius: 8px; color: #77839a; background: transparent; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.ws-dialog-tabs [role="tab"][aria-selected="true"] { color: var(--blue, #315edf); background: #fff; box-shadow: 0 1px 4px rgba(29, 48, 83, .1); }
.ws-dialog-file-list { color: var(--muted, #74809a); font-size: 12px; font-weight: 450; overflow-wrap: anywhere; }
.ws-dialog-member { display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; border-bottom: 1px solid var(--line, #e4eaf3); }
.ws-dialog-avatar-large { width: 52px; height: 52px; font-size: 20px; }
.ws-dialog-member h3 { margin: 0 0 4px; font-size: 17px; }
.ws-dialog-member p { margin: 0; color: var(--muted, #74809a); font-size: 12px; }
.ws-dialog-member-section { display: grid; gap: 4px; margin-top: 19px; }
.ws-dialog-member-section h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 5px; font-size: 14px; }
.ws-dialog-member-section h3 span { display: grid; place-items: center; min-width: 24px; height: 23px; padding: 0 5px; border-radius: 20px; color: #65728a; background: #f1f4f9; font-size: 11px; }
.ws-dialog-case { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 7px; border: 0; border-bottom: 1px solid #edf0f5; color: var(--ink, #17243d); background: transparent; text-align: left; cursor: pointer; }
.ws-dialog-case:hover { background: #f7f9fd; }
.ws-dialog-case-kind { flex: 0 0 auto; padding: 5px 7px; border-radius: 6px; color: #315edf; background: #edf2ff; font-size: 11px; font-weight: 700; }
.ws-dialog-case-main { display: grid; flex: 1; gap: 4px; min-width: 0; }
.ws-dialog-case strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ws-dialog-case small { color: var(--muted, #74809a); font-size: 11px; }
@media (max-width: 560px) {
  .ws-dialog { width: 100vw; max-height: min(92dvh, 920px); margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .ws-dialog-panel { padding: 20px 17px max(20px, env(safe-area-inset-bottom)); }
  .ws-dialog-pending { grid-template-columns: minmax(0, 1fr); }
  .ws-dialog-pending time { text-align: left; margin-left: 49px; }
  .ws-dialog-actions { justify-content: stretch; }
  .ws-dialog-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-dialog .btn { transition: none; }
}
