.cwr-page { display: grid; gap: 18px; }
.cwr-page .page-heading { margin-bottom: 0; }
.cwr-page a.button, .cwr-dialog a.button { text-decoration: none; }
.cwr-page button, .cwr-dialog button { touch-action: manipulation; }
.cwr-steps { display: flex; gap: 32px; padding: 0 0 6px; color: var(--muted-bright); font-size: 12px; flex-wrap: wrap; }
.cwr-steps span { display: flex; align-items: center; gap: 9px; }
.cwr-steps b { display: grid; place-items: center; width: 25px; height: 25px; color: var(--brand); background: rgba(var(--brand-rgb), .09); border: 1px solid rgba(var(--brand-rgb), .23); border-radius: 50%; font: 600 10px 'DM Mono', monospace; }
.cwr-section { padding: 23px; overflow: hidden; }
.cwr-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.cwr-section-head h2 { margin: 0 0 6px; font: 700 17px 'Manrope', sans-serif; letter-spacing: -.025em; }
.cwr-section-head .eyebrow { display: block; margin-bottom: 8px; }
.cwr-section-head p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.cwr-batch-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto; align-items: end; gap: 14px; }
.cwr-field { display: flex; flex-direction: column; gap: 7px; color: #c5cdc8; font-size: 12px; font-weight: 600; min-width: 0; }
.cwr-field input, .cwr-field select, .cwr-field textarea, .cwr-search input, .cwr-share-table input { width: 100%; min-height: 41px; border: 1px solid #384043; border-radius: 8px; background: #171c1e; color: var(--text); padding: 9px 11px; outline: none; }
.cwr-field input:focus, .cwr-field select:focus, .cwr-field textarea:focus, .cwr-search input:focus, .cwr-share-table input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10); }
.cwr-field textarea { resize: vertical; line-height: 1.6; }
.cwr-field small, .cwr-field-note { color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 400; margin: 0; }
.cwr-field input::placeholder, .cwr-share-table input::placeholder, .cwr-search input::placeholder { color: #75817f; }
.cwr-badge { display: inline-flex; align-items: center; flex-shrink: 0; width: fit-content; padding: 5px 9px; border-radius: 30px; background: #2b3234; color: #bac5c0; font: 600 10px 'DM Sans', sans-serif; white-space: nowrap; }
.cwr-badge-success { color: #b8e6cb; background: rgba(108, 216, 187, .10); }
.cwr-badge-warn { color: #ebca86; background: rgba(234, 194, 111, .10); }
.cwr-notice { padding: 12px 14px; border: 1px solid #354346; border-radius: 9px; background: #1d282b; color: #b4c8cb; font-size: 12px; line-height: 1.65; }
.cwr-notice-warn { background: rgba(234, 194, 111, .045); color: #dfc895; border-color: rgba(234, 194, 111, .21); }
.cwr-notice-error { background: rgba(240, 137, 128, .055); color: #f0ada5; border-color: rgba(240, 137, 128, .28); }
[data-profile-status] { margin-top: 16px; }
.cwr-profile-summary { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; font-size: 11px; color: var(--muted-bright); }
.cwr-profile-summary + .cwr-notice { margin-top: 12px; }
.cwr-search-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cwr-search { flex: 1; max-width: 570px; }
.cwr-search input { padding-left: 13px; font-size: 12px; }
.cwr-table-scroll { overflow: auto; max-width: 100%; }
.cwr-table { border-collapse: collapse; width: 100%; text-align: left; }
.cwr-table th { font: 500 9px 'DM Mono', monospace; letter-spacing: .06em; color: #8c9996; padding: 11px 10px; border-bottom: 1px solid #343c3d; white-space: nowrap; }
.cwr-table td { padding: 13px 10px; border-bottom: 1px solid #2b3233; font-size: 12px; vertical-align: middle; }
.cwr-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.cwr-table td strong { font-size: 12px; display: block; font-weight: 600; min-width: 150px; overflow-wrap: anywhere; }
.cwr-table td small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.cwr-table td:last-child { text-align: right; }
.cwr-check-column { width: 28px; }
.cwr-page input[type="checkbox"], .cwr-dialog input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; accent-color: var(--brand-deep); flex-shrink: 0; cursor: pointer; }
.cwr-page input[type="checkbox"]:disabled, .cwr-dialog input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .5; }
.cwr-small-button { min-height: 32px; padding: 0 11px; font-size: 11px; white-space: nowrap; }
.cwr-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; padding: 14px 0 4px; }
.cwr-pager > div { display: flex; gap: 7px; }
.cwr-selection-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #333b3c; padding-top: 19px; margin-top: 15px; }
.cwr-selection-footer > p { margin: 0; max-width: 65%; color: var(--muted-bright); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.cwr-selection-footer + .cwr-notice { margin-top: 14px; }
.cwr-empty { text-align: center; padding: 30px 15px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.cwr-preview { border-color: #47504b; }
.cwr-preview-facts { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 16px; margin: 20px 0; padding: 15px; background: #151a1b; border-radius: 9px; border: 1px solid #2c3535; }
.cwr-preview-facts small, .cwr-preview-facts strong { display: block; }
.cwr-preview-facts small { color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.cwr-preview-facts strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.cwr-issues { border-radius: 10px; padding: 14px; margin: 13px 0; border: 1px solid rgba(234, 194, 111, .2); background: rgba(234, 194, 111, .035); }
.cwr-issues-error { border-color: rgba(240, 137, 128, .25); background: rgba(240, 137, 128, .035); }
.cwr-issues h3 { font-size: 12px; color: #e4c58c; margin: 0 0 7px; }
.cwr-issues-error h3 { color: #efaaa3; }
.cwr-issues ul { list-style: none; padding: 0; margin: 0; max-height: 340px; overflow: auto; }
.cwr-issues li { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .055); }
.cwr-issues li strong { font-size: 11px; line-height: 1.65; font-weight: 500; display: block; }
.cwr-issues li small { display: block; font-size: 10px; color: var(--muted-bright); margin-top: 4px; overflow-wrap: anywhere; }
.cwr-file-preview { border: 1px solid #37413f; border-radius: 9px; overflow: hidden; }
.cwr-file-preview summary { padding: 13px 15px; color: #cbd6ce; font-size: 12px; cursor: pointer; }
.cwr-file-preview p { margin: 0 15px 12px; color: var(--muted); font-size: 11px; }
.cwr-file-preview pre, .cwr-saved-text { margin: 0; padding: 17px; overflow: auto; max-height: 390px; color: #b6c9bb; background: #101415; font: 11px/1.7 'DM Mono', Consolas, monospace; tab-size: 2; white-space: pre; }
.cwr-saved-text { max-height: 440px; border: 1px solid #303c37; border-radius: 9px; }
.cwr-audit-details { margin-bottom: 17px; }
.cwr-audit-body { padding: 0 15px 15px; }
.cwr-audit-body dl { margin: 0 0 15px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 9px 14px; font-size: 11px; line-height: 1.6; }
.cwr-audit-body dt { color: var(--muted); }
.cwr-audit-body dd { margin: 0; overflow-wrap: anywhere; }
.cwr-generate-area { border-top: 1px solid #333d3a; padding-top: 18px; margin-top: 20px; }
.cwr-check-label { display: flex; align-items: flex-start; gap: 10px; color: #c7d0c9; font-size: 12px; line-height: 1.6; margin: 13px 0 0; cursor: pointer; }
.cwr-check-label input { margin-top: 2px; }
.cwr-generate-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; }
.cwr-generate-row p { color: var(--muted-bright); font-size: 12px; line-height: 1.65; margin: 0; max-width: 65%; }
.cwr-generate-row p small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.cwr-generate-row .button { flex-shrink: 0; }
.cwr-generate-area > .cwr-notice { margin-top: 15px; }
.cwr-dialog { color: var(--text); background: #191e20; border: 1px solid #3a4243; border-radius: 15px; padding: 0; width: min(1000px, calc(100vw - 36px)); max-width: 1000px; height: min(860px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); overflow: hidden; box-shadow: 0 32px 100px #0008; }
.cwr-dialog[open] { display: flex; flex-direction: column; }
.cwr-dialog::backdrop { background: rgba(5, 8, 9, .76); backdrop-filter: blur(4px); }
.cwr-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 26px; border-bottom: 1px solid #323a3b; flex-shrink: 0; }
.cwr-dialog-head h2 { margin: 8px 0 0; font: 700 21px 'Manrope', sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
.cwr-dialog-head > div { min-width: 0; }
.cwr-dialog-head .icon-button { flex-shrink: 0; }
.cwr-dialog-body { overflow-y: auto; min-height: 0; flex: 1; padding: 22px 26px; overscroll-behavior: contain; }
.cwr-dialog-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 26px; background: #1a2022; border-top: 1px solid #3a4343; flex-shrink: 0; }
.cwr-form-error { width: 100%; margin: 0 0 3px; color: #f0a49a; font-size: 12px; line-height: 1.6; max-height: 105px; overflow: auto; }
.cwr-form { display: grid; gap: 20px; }
.cwr-form fieldset { border: 1px solid #354040; padding: 19px; margin: 0; border-radius: 11px; min-width: 0; }
.cwr-form fieldset:disabled { opacity: .8; }
.cwr-form fieldset:disabled input, .cwr-form fieldset:disabled select, .cwr-form fieldset:disabled textarea { opacity: 1; -webkit-text-fill-color: var(--text); color: var(--text); }
.cwr-form legend { padding: 0 8px; font-size: 13px; font-weight: 700; color: #e2e8e2; }
.cwr-form fieldset > .text-button { margin-top: 10px; white-space: normal; text-align: left; line-height: 1.6; }
.cwr-grid { display: grid; gap: 15px; }
.cwr-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cwr-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cwr-party-card .cwr-grid + .cwr-grid { margin-top: 15px; }
.cwr-party-card { border: 1px solid #3b4544; border-radius: 10px; padding: 17px; margin: 13px 0; background: #1d2425; }
.cwr-party-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.cwr-party-head strong { font-size: 13px; line-height: 1.6; }
.cwr-party-head small { display: block; font-size: 10px; color: var(--muted-bright); line-height: 1.7; margin-top: 3px; }
.cwr-party-head .text-button { flex-shrink: 0; }
.cwr-form-subheading { margin: 22px 0 7px; font-size: 14px; }
.cwr-source-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; font-size: 11px; color: var(--muted); }
.cwr-source-summary strong { margin-left: 6px; color: var(--text); font-weight: 500; }
.cwr-share-scroll { overflow-x: auto; margin-top: 15px; }
.cwr-share-table { width: 100%; text-align: left; border-collapse: collapse; }
.cwr-share-table th { padding: 7px 10px 7px 0; color: #b3c0b8; font-size: 11px; font-weight: 500; width: 40%; }
.cwr-share-table thead th { font: 500 9px 'DM Mono', monospace; color: var(--muted); white-space: nowrap; width: 30%; }
.cwr-share-table td { padding: 5px 8px 5px 0; }
.cwr-share-table td:last-child { padding-right: 0; }
.cwr-share-table input { min-height: 36px; padding: 7px 10px; font-size: 12px; min-width: 85px; }
.cwr-share-table + .cwr-field-note { margin-top: 8px; }
.cwr-template-box, .cwr-preset-box { padding: 14px; border-radius: 9px; background: rgba(var(--brand-rgb), .045); border: 1px solid rgba(var(--brand-rgb), .18); }
.cwr-template-box strong, .cwr-preset-box strong { font-size: 12px; }
.cwr-template-box p, .cwr-preset-box p { color: var(--muted-bright); font-size: 11px; line-height: 1.65; margin: 7px 0 12px; }
.cwr-template-box .button { font-size: 11px; white-space: normal; text-align: left; }
.cwr-template-box + .cwr-field-note { margin: 11px 0 8px; color: #e8c590; }
.cwr-inline-fields { display: flex; align-items: end; gap: 12px; }
.cwr-inline-fields .cwr-field { flex: 1; }
.cwr-inline-fields .button { flex-shrink: 0; }
.cwr-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1150px) {
  .cwr-batch-grid { grid-template-columns: 1fr 1fr; }
  .cwr-batch-grid > .button { justify-self: start; }
  .cwr-steps { gap: 15px 24px; }
}
@media (max-width: 720px) {
  .cwr-section { padding: 17px; }
  .cwr-section-head { align-items: flex-start; gap: 12px; }
  .cwr-batch-grid, .cwr-grid-3 { grid-template-columns: 1fr; }
  .cwr-page .page-heading { align-items: flex-start; }
  .cwr-page .page-heading h1 { font-size: 26px; }
  .cwr-steps { gap: 11px; font-size: 10px; }
  .cwr-steps b { width: 20px; height: 20px; }
  .cwr-selection-footer, .cwr-generate-row { flex-direction: column; align-items: stretch; }
  .cwr-selection-footer > p, .cwr-generate-row p { max-width: none; }
  .cwr-preview-facts { grid-template-columns: 1fr 1fr; }
  .cwr-issues li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cwr-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 20px); height: calc(100dvh - 20px); }
  .cwr-dialog-head { padding: 18px; }
  .cwr-dialog-body { padding: 17px 13px; }
  .cwr-dialog-foot { padding: 12px 16px; }
  .cwr-form fieldset { padding: 13px; }
  .cwr-party-card { padding: 13px; }
  .cwr-party-head { flex-wrap: wrap; }
  .cwr-inline-fields { flex-direction: column; align-items: stretch; }
  .cwr-share-table th { font-size: 10px; }
  .cwr-share-table thead th { white-space: normal; font-size: 8px; }
}
@media (max-width: 460px) {
  .cwr-grid-2 { grid-template-columns: 1fr; }
  .cwr-section-head > .cwr-badge { white-space: normal; max-width: 100px; text-align: center; }
  .cwr-pager { align-items: flex-start; flex-direction: column; }
  .cwr-search-row { align-items: stretch; flex-direction: column; }
  .cwr-search-row > .button { align-self: flex-start; }
}
