/* Readable native interface and matter covers; seals and signatures retain Arial 8.5 pt. */
:root {
  --ui-font-size: 14px;
  --ui-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The same cover typography is used on screen and when printing to PDF. */
#app :is(.digital-matter-cover, .folder-label-printable),
#app :is(.digital-matter-cover, .folder-label-printable) *,
#app :is(.digital-matter-cover, .folder-label-printable) *::before,
#app :is(.digital-matter-cover, .folder-label-printable) *::after {
  font-family: var(--ui-font-family) !important;
  font-size: 10.5pt !important;
  line-height: 1.5;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-heading h2 {
  font-size: 18px !important;
  line-height: 1.35;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-sections h3 {
  font-size: 15px !important;
  line-height: 1.4;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-sections dt {
  font-size: 13px !important;
  letter-spacing: normal;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 16px;
  letter-spacing: normal;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-footer * {
  font-size: 9pt !important;
}

#app :is(.digital-matter-cover, .folder-label-printable) .folder-label-attribution {
  grid-column: 1 / -1;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (max-width: 540px) {
  #app :is(.digital-matter-cover, .folder-label-printable) .folder-label-footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen {
  html, body, *, *::before, *::after, input::placeholder, textarea::placeholder,
  dialog#signature-builder, dialog#signature-builder *,
  dialog#signature-builder *::before, dialog#signature-builder *::after,
  dialog#signature-builder input::placeholder, dialog#signature-builder textarea::placeholder {
    font-family: var(--ui-font-family) !important;
    font-size: inherit !important;
  }

  /* Keep rem-based layout dimensions stable while making screen text readable. */
  html { font-size: 8.5pt !important; }
  body { font-size: var(--ui-font-size) !important; line-height: 1.5; }

  #app h1, #app h2, dialog#signature-builder h2 {
    font-size: 20px !important;
    line-height: 1.35;
  }

  #app h3, #app h4, dialog#signature-builder h3 {
    font-size: 16px !important;
    line-height: 1.4;
  }

  #app .auth-welcome h1 { font-size: 24px !important; }
  #app .brand-block h1 { font-size: 14px !important; }
  #app .sidebar-report h2, #app .sidebar-report h3 { font-size: 14px !important; }

  #app .eyebrow, #app .sidebar-report-kicker, #app th {
    font-size: 12.5px !important;
  }

  #app small, #app time, #app .sidebar-report, #app .context-trail,
  #app .status-pill, #app .filter-summary, #app .sidebar-footer,
  #app .field-hint, #app .field-error, dialog#signature-builder .signature-hint {
    font-size: 13px !important;
  }

  @media (min-width: 1181px) {
    #app.app-authenticated .shell { grid-template-columns: 272px minmax(0, 1fr); }
  }

  #app :is(.document-seal-card, .executive-seal),
  #app :is(.document-seal-card, .executive-seal) *,
  #app :is(.document-seal-card, .executive-seal) *::before,
  #app :is(.document-seal-card, .executive-seal) *::after,
  #signature-builder #signature-preview, #signature-builder #signature-preview *,
  #signature-builder #signature-preview *::before, #signature-builder #signature-preview *::after {
    font-family: Arial, sans-serif !important;
    font-size: 8.5pt !important;
  }

  #app .auth-shell.auth-shell-minimal {
    padding: 20px;
  }

  #app .auth-stage {
    width: min(100%, 1020px);
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    padding: 24px;
    gap: 24px;
    border-radius: 24px;
  }

  #app .auth-welcome {
    min-height: 320px;
    padding: 20px;
    gap: 12px;
  }

  #app .auth-welcome h1 {
    line-height: 1.45;
    letter-spacing: normal;
  }

  #app .auth-login-card.minimal {
    padding: 24px;
    border-radius: 20px;
  }

  #app .auth-login-card.minimal > p {
    margin: 8px 0 18px;
    line-height: 1.5;
    color: #506179;
  }

  #app .auth-login-card .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #app .auth-login-card .form-actions {
    grid-column: 1;
    gap: 10px;
    align-items: center;
  }

  #app .auth-login-card :is(input, button) {
    min-height: 40px;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.4;
  }

  #app .auth-login-card .primary-button {
    background: #1167c9;
    color: #fff;
  }

  #app .auth-login-card .primary-button:hover {
    background: #0e59af;
  }

  #app :is(button, a, input, select, textarea, summary):focus-visible {
    outline: 2px solid #185bb3;
    outline-offset: 3px;
  }

  #app .form-grid :is(input, select, textarea),
  #app .filter-toolbar :is(input, select) {
    border-color: #8492a4;
  }

  #app :is(input, textarea)::placeholder {
    color: #607087;
  }

  #app :is(.registration-modal, .folder-label-modal) {
    border-radius: 20px;
    padding: 20px;
  }

  #app :is(.registration-modal-head, .folder-label-modal-head) {
    gap: 12px;
  }

  #app :is(.notice-banner, .list-card, .detail-card) {
    overflow-wrap: anywhere;
  }

  #app.app-authenticated {
    --ui-gap: 12px;
    --ui-radius: 18px;
  }

  #app.app-authenticated .shell {
    padding: 12px;
    gap: var(--ui-gap);
  }

  #app.app-authenticated .sidebar {
    position: sticky;
    top: 12px;
    padding: 16px;
    gap: 14px;
    border-radius: 24px;
  }

  #app.app-authenticated .shell-theme-legal .sidebar {
    height: calc(100dvh - 24px);
  }

  #app.app-authenticated .workspace {
    padding: 20px;
    min-height: calc(100dvh - 24px);
    border-radius: 24px;
  }

  #app.app-authenticated .content-grid,
  #app.app-authenticated .feature-grid,
  #app.app-authenticated .list-stack,
  #app.app-authenticated .form-grid,
  #app.app-authenticated .digital-file-stats {
    gap: var(--ui-gap);
  }

  #app.app-authenticated .topbar.minimal {
    gap: var(--ui-gap);
    margin-bottom: 12px;
  }

  #app.app-authenticated .topbar-heading.minimal h2,
  #app.app-authenticated .panel-card h2,
  #app.app-authenticated .panel-card h3,
  #app.app-authenticated .brand-block h1 {
    line-height: 1.4;
    letter-spacing: normal;
  }

  #app.app-authenticated .topbar-copy {
    margin: 5px 0 0;
    line-height: 1.45;
    color: #506179;
  }

  #app.app-authenticated .context-trail {
    margin: 0 0 12px;
    gap: 6px;
    color: #506179;
  }

  #app.app-authenticated .context-trail button {
    min-height: 38px;
    padding: 4px 2px;
  }

  #app.app-authenticated .panel-card:not(.document-seal-card) {
    padding: 18px;
    border-radius: var(--ui-radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #app.app-authenticated .section-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  #app.app-authenticated .section-head .eyebrow {
    margin-bottom: 4px;
    color: #52657c;
  }

  #app.app-authenticated .filter-toolbar {
    padding: 12px;
    gap: 10px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  #app.app-authenticated .form-grid label,
  #app.app-authenticated .filter-toolbar label {
    gap: 6px;
  }

  #app.app-authenticated :is(.form-grid, .filter-toolbar) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) {
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.4;
  }

  #app.app-authenticated .form-grid textarea {
    min-height: 100px;
    padding: 12px;
    border-radius: 12px;
    line-height: 1.55;
  }

  #app.app-authenticated :is(input, textarea)::placeholder {
    color: #65738a;
  }

  #app.app-authenticated :is(.primary-button, .secondary-button, .ghost-button, .compact-button, .nav-item) {
    min-height: 38px;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.35;
  }

  #app.app-authenticated .primary-button {
    background: #1167c9;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(17, 103, 201, 0.12);
  }

  #app.app-authenticated .primary-button:hover {
    background: #0e59af;
  }

  #app.app-authenticated :is(.topbar-actions, .table-actions, .matter-actions, .form-actions) {
    gap: 8px;
  }

  #app.app-authenticated .row-more-actions > summary {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  #app.app-authenticated :is(.status-pill, .filter-summary) {
    min-height: 38px;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.35;
  }

  #app.app-authenticated .table-wrap {
    border-radius: 14px;
  }

  #app.app-authenticated :is(th, td) {
    padding: 12px;
    line-height: 1.45;
  }

  #app.app-authenticated th {
    letter-spacing: 0.06em;
    color: #52657c;
  }

  #app.app-authenticated :is(.feature-card, .profile-card, .stat-card) {
    min-height: 72px;
    padding: 14px;
    border-radius: 14px;
  }

  #app.app-authenticated :is(.list-card, .detail-card, .empty-state, .actionable-card, .quick-action-card) {
    padding: 14px;
    border-radius: 14px;
  }

  #app.app-authenticated .feature-card p {
    margin: 6px 0 0;
    line-height: 1.5;
  }

  #app.app-authenticated .sidebar-report {
    padding: 12px;
    border-radius: 16px;
  }

  #app.app-authenticated .sidebar-report-copy {
    margin: 5px 0 10px;
  }

  #app.app-authenticated .sidebar-metrics {
    margin: 8px 0 10px;
    gap: 7px 12px;
  }

  #app.app-authenticated .sidebar-activity ol {
    gap: 8px;
  }

  #app.app-authenticated .sidebar-footer {
    gap: 10px;
  }

  #app.app-authenticated .user-chip.minimal {
    padding: 10px;
    border-radius: 14px;
  }

  #app.app-authenticated .user-chip.minimal strong {
    line-height: 1.45;
  }

  #app.app-authenticated :is(button, a, input, select, textarea, summary):focus-visible {
    outline: 2px solid #185bb3;
    outline-offset: 3px;
  }
}

@media screen and (max-width: 960px) {
  #app .auth-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    max-width: 520px;
  }

  #app .auth-welcome {
    min-height: 0;
    padding: 12px;
    align-items: center;
    text-align: center;
  }
}

@media screen and (max-width: 1180px) {
  #app.app-authenticated .sidebar,
  #app.app-authenticated .shell-theme-legal .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }

  #app.app-authenticated .workspace {
    min-height: 0;
  }

  #app.app-authenticated .sidebar-report-copy {
    margin: 0;
  }
}

@media screen and (max-width: 720px) {
  #app :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  dialog#signature-builder :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px !important;
  }

  #app .auth-shell.auth-shell-minimal {
    padding: 12px;
  }

  #app .auth-stage {
    padding: 14px;
    border-radius: 18px;
  }

  #app .auth-login-card.minimal {
    padding: 18px;
    border-radius: 16px;
  }

  #app .auth-login-card :is(input, button) {
    min-height: 44px;
  }

  #app .auth-login-card .form-actions {
    align-items: stretch;
  }

  #app :is(.registration-modal, .folder-label-modal) {
    padding: 14px;
    border-radius: 16px;
  }

  #app.app-authenticated .shell {
    padding: 8px;
    gap: 10px;
  }

  #app.app-authenticated :is(.sidebar, .workspace) {
    padding: 12px;
    border-radius: 18px;
  }

  #app.app-authenticated .panel-card:not(.document-seal-card) {
    padding: 14px;
    border-radius: 16px;
  }

  #app.app-authenticated .sidebar-report {
    padding: 12px;
  }

  #app.app-authenticated .sidebar-metrics {
    margin: 0;
    gap: 7px;
  }

  #app.app-authenticated .sidebar-report-head {
    flex-wrap: wrap;
  }

  #app.app-authenticated :is(.primary-button, .secondary-button, .ghost-button, .compact-button, .nav-item),
  #app.app-authenticated :is(.form-grid, .filter-toolbar) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select),
  #app.app-authenticated .row-more-actions > summary {
    min-height: 44px;
  }

  #app.app-authenticated .context-trail button {
    min-height: 44px;
  }

  #app.app-authenticated tbody {
    gap: 10px;
  }

  #app.app-authenticated tr {
    padding: 14px;
    border-radius: 14px;
  }

  #app.app-authenticated td {
    padding: 0;
  }

  #app.app-authenticated td + td {
    margin-top: 10px;
  }
}

@media screen and (max-width: 540px) {
  #app.app-authenticated .sidebar-matter-total,
  #app.app-authenticated .sidebar-metrics {
    grid-column: 1 / -1;
  }

  #app.app-authenticated .sidebar-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 16px;
  }

  #app.app-authenticated .sidebar-footer {
    grid-template-columns: 1fr;
  }

  #app.app-authenticated .sidebar-footer .ghost-button {
    width: 100%;
  }
}

@media screen and (prefers-reduced-motion: reduce) {
  #app *,
  #app *::before,
  #app *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Document descriptions share the existing modal and never replace the action form. */
#app .matter-file-content { flex: 1 1 auto; min-width: 0; }
#app .matter-file-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-line;
  margin: 8px 0 0;
  color: #42546c;
  line-height: 1.5;
  font-size: 13px !important;
}
#app .matter-file-description.is-empty,
#app .file-description-text.is-empty { color: #64748b; font-style: italic; }
#app .matter-file-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px; }
#app .file-details-modal { width: min(760px, 100%); }
#app .file-details-modal .registration-modal-head { align-items: flex-start; }
#app .file-details-modal .registration-modal-head > div { min-width: 0; }
#app .file-details-modal h3 { overflow-wrap: anywhere; }
#app .file-details-modal .registration-modal-head > button { flex-shrink: 0; }
#app .file-description-block {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dce6f2;
  border-radius: 14px;
  background: #f5f8fd;
}
#app .file-description-block h4 { margin: 0 0 8px; font-size: 14px !important; color: #24486f; }
#app .file-description-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: #26374e; }
#app .file-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 22px 0 0; }
#app .file-details-grid > div { min-width: 0; }
#app .file-details-grid dt { margin-bottom: 4px; color: #64748b; font-size: 13px !important; }
#app .file-details-grid dd { margin: 0; color: #26374e; font-weight: 600; overflow-wrap: anywhere; }
#app .file-details-actions { justify-content: flex-end; }
#app .case-sharing-modal { width: min(720px, 100%); }
#app .case-sharing-modal .registration-modal-head { align-items: flex-start; }
#app .case-sharing-modal .registration-modal-head > div { min-width: 0; overflow-wrap: anywhere; }
#app .case-sharing-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin: 20px 0; }
#app .case-sharing-fields label { display: grid; gap: 8px; min-width: 0; }
#app .case-sharing-fields label > span { color: #52647c; font-weight: 500; font-size: 13px !important; }
#app .case-sharing-fields select { width: 100%; min-width: 0; }
#app .case-sharing-current { display: grid; gap: 7px; padding: 14px 16px; border: 1px solid #dce7f5; border-radius: 12px; background: #f0f5fc; color: #294a70; line-height: 1.6; }
#app .case-sharing-current small { color: #62738b; }
#app .case-sharing-status { padding: 16px 0; line-height: 1.6; color: #52647c; }
#app .case-sharing-status.error { color: #9b3d3d; }
#app .case-sharing-drive-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin-top: 18px; cursor: pointer; line-height: 1.6; color: #405570; }
#app .case-sharing-drive-choice input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin-top: 3px; accent-color: #3d6da7; }
#app .case-sharing-actions { justify-content: flex-end; gap: 10px; margin-top: 18px; }
#app .case-sharing-drive-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #e5ecf5; color: #65758b; line-height: 1.6; font-size: 13px !important; }
#app .accreditation-sidebar-button { width: 100%; text-align: left; margin-bottom: 10px; }
#app .accreditation-modal { width: min(940px, 100%); }
#app .accreditation-modal .registration-modal-head { align-items: flex-start; }
#app .accreditation-modal .registration-modal-head > div { min-width: 0; }
#app .accreditation-person, #app .accreditation-file { display: grid; gap: 8px; margin-top: 18px; }
#app .accreditation-person > span, #app .accreditation-file > span { color: #52647c; font-size: 13px !important; font-weight: 500; }
#app .accreditation-person select { width: 100%; }
#app .accreditation-identity { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 22px 0; padding-bottom: 18px; border-bottom: 1px solid #e5ecf5; }
#app .accreditation-identity > div { min-width: 0; }
#app .accreditation-identity h4 { margin: 0; color: #26374e; font-size: 17px !important; overflow-wrap: anywhere; }
#app .accreditation-identity p { margin: 7px 0 0; color: #62738b; line-height: 1.6; overflow-wrap: anywhere; }
#app .accreditation-status { display: inline-flex; flex-shrink: 0; padding: 6px 11px; border-radius: 20px; font-size: 13px !important; font-weight: 600; line-height: 1.5; background: #edf2f8; color: #52647c; }
#app .accreditation-status.active { background: #e9f5ef; color: #28674b; }
#app .accreditation-status.suspended { background: #fbf1df; color: #866327; }
#app .accreditation-view { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 22px; }
#app .accreditation-view > section { min-width: 0; padding: 18px; border: 1px solid #dfe7f1; border-radius: 14px; background: #f8fafd; }
#app .accreditation-modal h5 { margin: 0 0 14px; font-size: 14px !important; color: #315477; }
#app .accreditation-original img { display: block; width: 100%; max-height: 380px; object-fit: contain; border-radius: 8px; background: #fff; }
#app .accreditation-original object { display: block; width: 100%; height: 380px; border: 0; border-radius: 8px; background: #fff; }
#app .accreditation-original > a { margin-top: 16px; }
#app .accreditation-placeholder { display: grid; place-items: center; min-height: 200px; text-align: center; padding: 20px; color: #64748b; line-height: 1.65; }
#app .accreditation-verification { text-align: center; }
#app .accreditation-qr { display: grid; place-items: center; margin: 16px auto; width: min(190px, 100%); padding: 12px; background: #fff; border-radius: 10px; }
#app .accreditation-qr svg { display: block; width: 100%; height: auto; }
#app .accreditation-serial { overflow-wrap: anywhere; color: #405570; font-size: 13px !important; letter-spacing: .02em; }
#app .accreditation-message { color: #62738b; padding: 12px 0; line-height: 1.65; }
#app .accreditation-message.error { color: #9b3d3d; }
#app .accreditation-management { margin-top: 24px; border-top: 1px solid #e5ecf5; padding-top: 20px; }
#app .accreditation-file input { width: 100%; min-width: 0; }
#app .accreditation-actions { justify-content: flex-end; gap: 10px; margin-top: 18px; }
#app .restricted-sidebar-note { margin: 18px 16px; color: #64748b; font-size: 13px !important; }
#app .restricted-empty { display: grid; place-items: center; min-height: 55vh; padding: 24px; color: #64748b; text-align: center; }
#app .restricted-record-group > h3 { margin-top: 0; }
#app .restricted-record { display: block; }
#app .restricted-record h4 { margin: 0; overflow-wrap: anywhere; }
#app .restricted-record p { margin: 8px 0 0; overflow-wrap: anywhere; }
#app .restricted-record-description { white-space: pre-wrap; line-height: 1.65; }
#app .restricted-record .secondary-button { margin-top: 12px; }
#app .restricted-overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; background: linear-gradient(115deg, #f0f6fe, #fff); border-color: #d7e5f6; }
#app .restricted-overview h3 { margin: 5px 0 8px; overflow-wrap: anywhere; }
#app .restricted-overview > div > p:last-child { margin: 0; max-width: 76ch; color: #52647c; line-height: 1.6; }
#app .restricted-access-badge,
#app .restricted-record-status { display: inline-flex; align-items: center; border-radius: 20px; padding: 6px 10px; background: #e9f1fb; color: #274d7a; font-size: 13px !important; font-weight: 600; line-height: 1.4; }
#app .restricted-access-badge { white-space: nowrap; flex-shrink: 0; }
#app .restricted-group-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
#app .restricted-group-heading h3 { margin: 0; }
#app .restricted-group-heading > span { display: inline-grid; place-items: center; min-width: 26px; padding: 4px 8px; border-radius: 20px; color: #48627f; background: #edf2f8; font-size: 13px !important; }
#app .restricted-record-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #e8eef5; }
#app .restricted-record-heading > div { min-width: 0; }
#app .restricted-record .restricted-record-code { margin: 5px 0 0; color: #536b89; font-size: 13px !important; letter-spacing: .02em; }
#app .restricted-data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin: 18px 0 0; }
#app .restricted-data-grid > div { min-width: 0; }
#app .restricted-data-grid dt { color: #62738b; font-size: 13px !important; line-height: 1.5; }
#app .restricted-data-grid dd { margin: 4px 0 0; color: #27384e; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
#app .restricted-description { margin-top: 20px; padding: 16px; background: #f7f9fc; border: 1px solid #e4ebf4; border-radius: 12px; }
#app .restricted-description h5 { margin: 0; font-size: 13px !important; color: #526982; }
#app .restricted-description .restricted-record-description { margin: 8px 0 0; color: #27384e; }
#app .restricted-registration { margin-top: 18px; border-top: 1px solid #e8eef5; }
#app .restricted-registration > summary { padding: 12px 0 4px; cursor: pointer; color: #315c8c; line-height: 1.6; font-size: 13px !important; }
#app .restricted-registration > summary:focus-visible { outline: 2px solid #4b81bd; outline-offset: 4px; border-radius: 4px; }
#app .restricted-registration .restricted-data-grid { margin-top: 14px; padding-bottom: 4px; }
#app .restricted-record .restricted-record-empty { margin-top: 18px; color: #64748b; font-style: italic; }
#app .restricted-document-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
#app .restricted-document-actions .secondary-button { margin-top: 0; }
@media screen and (max-width: 1100px) {
  #app .restricted-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 780px) {
  #app .accreditation-view { grid-template-columns: minmax(0, 1fr); }
  #app .accreditation-identity { flex-wrap: wrap; }
  #app .matter-file-item { align-items: stretch; flex-direction: column; }
  #app .matter-file-actions { justify-content: flex-end; }
  #app .matter-file-actions .danger-button { width: auto; }
}
@media screen and (max-width: 540px) {
  #app .accreditation-actions > button { width: 100%; min-height: 44px; }
  #app .accreditation-view > section { padding: 14px; }
  #app .matter-file-actions > button { min-height: 44px; }
  #app .file-details-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #app .file-description-block { padding: 14px; }
  #app .file-details-actions .primary-button { width: 100%; }
  #app .case-sharing-fields { grid-template-columns: minmax(0, 1fr); }
  #app .case-sharing-actions > button { width: 100%; min-height: 44px; }
  #app .restricted-overview { flex-direction: column; gap: 14px; }
  #app .restricted-record-heading { flex-direction: column; gap: 10px; }
  #app .restricted-data-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #app .restricted-description { padding: 14px; }
  #app .restricted-document-actions .secondary-button { width: 100%; min-height: 44px; }
  #app .restricted-registration > summary { min-height: 44px; }
}

#app .accreditation-view.accreditation-qr-only { grid-template-columns: 1fr; }
#app .accreditation-qr-only .accreditation-verification { width: 100%; max-width: 620px; margin: 0 auto; }
#app .accreditation-verification .accreditation-actions { display: flex; flex-wrap: wrap; justify-content: center; }
#app .accreditation-optional { margin-top: 16px; }
#app .accreditation-optional summary { cursor: pointer; font-weight: 600; }
#app .accreditation-optional .accreditation-file { margin: 12px 0; }
@media screen and (max-width: 540px) {
  #app .accreditation-actions > a { width: 100%; min-height: 44px; }
}

/* Read-only matter details. Full text remains selectable and never clamped. */
#app .matter-details-trigger { margin-top: 10px; white-space: normal; text-align: left; color: #244f77; background: #eef5fc; border-color: #ccdeef; }
#app .matter-details-modal { width: min(880px, 100%); }
#app .matter-details-modal .registration-modal-head { align-items: flex-start; gap: 16px; }
#app .matter-details-modal .registration-modal-head > div { min-width: 0; overflow-wrap: anywhere; }
#app .matter-details-modal .registration-modal-head > button { flex-shrink: 0; }
#app .matter-full-description { margin-top: 18px; padding: 18px; border-radius: 14px; border: 1px solid #d7e5f3; background: #f6f9fd; }
#app .matter-details-modal h4 { margin: 0 0 10px; font-size: 15px !important; color: #24486f; }
#app .matter-full-text { display: block; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; max-height: none; overflow: visible; -webkit-line-clamp: unset; font-size: 14px !important; color: #26374e; }
#app .matter-full-text.is-empty { color: #64748b; font-style: italic; }
#app .matter-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 22px 0; }
#app .matter-details-grid > div { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid #e6edf5; }
#app .matter-details-grid dt { margin-bottom: 5px; color: #64748b; font-size: 13px !important; }
#app .matter-details-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; color: #26374e; }
#app .matter-detail-section { margin-top: 18px; }
#app .matter-registration-details { margin: 20px 0; padding-top: 14px; border-top: 1px solid #e6edf5; }
#app .matter-registration-details summary { cursor: pointer; color: #244f77; font-weight: 600; padding: 6px 0; }
#app .matter-registration-details .matter-full-text { margin-top: 12px; }
#app .matter-context-preview { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px; margin: 12px 0 18px; border-radius: 14px; background: #f6f9fd; border: 1px solid #d7e5f3; }
#app .matter-context-preview > div { flex: 1; min-width: 0; }
#app .matter-context-preview h4 { margin: 0 0 8px; font-size: 16px !important; overflow-wrap: anywhere; }
#app .matter-context-preview .matter-details-trigger { flex-shrink: 0; margin-top: 0; }
@media (max-width: 700px) {
  #app .matter-details-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #app .matter-context-preview { flex-direction: column; }
  #app .matter-details-trigger { min-height: 44px; }
  #app .matter-context-preview .matter-details-trigger { width: 100%; text-align: center; }
  #app .matter-full-description { padding: 14px; }
}
#app .getsemani-contact-message { margin: 22px 0; padding: 18px; border: 1px solid #ccdeef; border-radius: 14px; background: #f6f9fd; }
#app .getsemani-message-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#app .getsemani-message-head h4 { margin: 0; }
#app .getsemani-contact-message textarea { display: block; width: 100%; min-height: 300px; margin-top: 12px; padding: 14px; line-height: 1.65; white-space: pre-wrap; resize: vertical; font: inherit; color: #26374e; background: #fff; }
#app .getsemani-contact-message .copy-status { margin: 10px 0 0; color: #244f77; }
@media (max-width: 700px) {
  #app .getsemani-message-head { align-items: stretch; flex-direction: column; }
  #app .getsemani-message-head button { min-height: 44px; }
  #app .getsemani-contact-message { padding: 14px; }
  #app .getsemani-contact-message textarea { font-size: 16px !important; }
}

