/* Shared visual system for the application and its existing Blade/Livewire views. */
:root {
  --ui-bg: #eeeef2;
  --ui-panel: #fff;
  --ui-ink: #24252b;
  --ui-muted: #71727d;
  --ui-line: #e7e7ed;
  --ui-accent: #f2d96b;
  --ui-radius: 26px;
  --ui-shadow: 0 8px 32px rgba(38, 39, 56, .035);
}
body.legal-shell, body.ui-auth {
  --tm-primary: var(--ui-ink);
  --tm-dark: var(--ui-ink);
  --tm-border: var(--ui-line);
  --tm-border-soft: var(--ui-line);
  --tm-bg: var(--ui-bg);
  --tm-muted: var(--ui-muted);
  --tm-surface: var(--ui-bg);
  --tm-panel: var(--ui-panel);
  --tm-panel-soft: #f7f7fa;
  --tm-ink: var(--ui-ink);
  --tm-line: var(--ui-line);
  --tm-line-dark: var(--ui-line);
  --tm-accent: #75651e;
  --tm-accent-soft: #faf4d7;
  background: var(--ui-bg) !important;
  color: var(--ui-ink);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.legal-shell h1, .legal-shell h2, .legal-shell h3, .legal-shell h4, .legal-shell h5, .legal-shell h6,
.ui-auth h5 { color: var(--ui-ink); font-weight: 500; letter-spacing: -.035em; }
.legal-shell a { color: var(--ui-ink); }
.legal-shell-bg { display: none; }
.legal-shell .main-content { background: transparent; min-height: 100vh; }
.legal-shell .main-content > .container-fluid { padding: 12px 32px 32px; }
.legal-shell .legal-sidenav {
  background: #eeeef2 !important;
  border-right: 1px solid #dedee6 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  height: 100vh;
  max-width: 270px;
  display: flex;
  flex-direction: column;
}
.legal-sidenav .sidenav-header { height: auto; padding: 30px 26px 20px; }
.legal-sidenav .navbar-brand { padding: 0; }
.legal-sidenav .navbar-brand-img { max-height: 42px; }
.legal-sidenav #sidenav-collapse-main { flex: 1; overflow-y: auto; }
.legal-shell .legal-sidenav, .legal-sidenav #sidenav-collapse-main { overflow-x: hidden; }
.legal-sidenav .horizontal { margin: 6px 24px 12px !important; background: var(--ui-line); }
.legal-sidenav .navbar-nav { padding: 0 16px; }
.legal-sidenav .nav-link {
  border-radius: 50px !important; padding: 12px 16px !important;
  margin: 3px 0; color: #62636f !important; font-weight: 400;
  gap: 12px; box-shadow: none !important;
}
.legal-sidenav .nav-link > .bi { font-size: 19px; width: 23px; flex-shrink: 0; }
.legal-sidenav .nav-link-text { margin-left: 0 !important; }
.legal-sidenav .nav-link.active { background: #fff !important; color: var(--ui-ink) !important; }
.legal-sidenav .nav-link:hover { background: #f8f8fb !important; color: var(--ui-ink) !important; }
.legal-sidenav h6 { color: #888994 !important; font-size: 10px; letter-spacing: .14em; margin: 14px 0 8px !important; padding-left: 16px !important; }
.legal-sidenav .legal-submenu, .legal-sidenav .legal-submenu-items { margin: 5px 0 8px 25px; border-left: 1px solid #dcdce5; padding-left: 8px; }
.legal-sidenav .legal-submenu .nav-link { font-size: 12px; padding: 8px 12px !important; }
.legal-sidebar-profile { border-top: 1px solid #dedee6; padding-top: 18px; }
.legal-sidebar-name { font-size: 13px; font-weight: 500; }
.legal-sidebar-role { color: var(--ui-muted); font-size: 11px; margin-top: 4px; }
.legal-shell .legal-navbar { background: transparent !important; padding: 22px 0 14px !important; margin: 0 20px !important; }
.legal-breadcrumb a, .legal-breadcrumb .breadcrumb-item { color: var(--ui-muted) !important; font-weight: 400; }
.legal-breadcrumb .breadcrumb-item.active { color: var(--ui-ink) !important; }
.legal-navbar .sidenav-toggler-line { background: var(--ui-ink) !important; }
.legal-shell .legal-user-menu { border: 0 !important; background: #fff !important; color: var(--ui-ink) !important; border-radius: 50px !important; margin-bottom: 0; }
.legal-shell .card, .ui-auth .card,
.legal-shell .tm-search-panel, .legal-shell .tm-results-panel, .legal-shell .tm-file-shell {
  background: var(--ui-panel) !important; border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: var(--ui-radius) !important; box-shadow: var(--ui-shadow) !important;
}
.legal-shell .card-header { background: transparent !important; padding: 24px 26px 16px; border-bottom-color: var(--ui-line); border-radius: 26px 26px 0 0 !important; }
.legal-shell .card-body { padding: 24px 26px; }
.legal-shell .tm-search-panel h5, .legal-shell .tm-results-panel h5 { font-size: 21px; letter-spacing: -.035em; text-transform: none; font-weight: 500; }
.legal-shell .tm-header { background: #f7f7fa; border: 0; border-radius: 20px; padding: 24px; }
.legal-shell .tm-title { text-transform: none; font-weight: 400; letter-spacing: -.055em; line-height: 1.12; }
.legal-shell .tm-record-header { grid-template-columns: minmax(0, 1fr); }
.legal-shell .tm-record-header .tm-title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0; overflow-wrap: anywhere; }
.legal-shell .tm-title-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.legal-shell .tm-header-meta { display: grid; gap: 4px; font-size: 14px; }
.legal-shell .tm-page-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.legal-shell .tm-status-pill.is-registered { background: #e2f2e8; color: #286441; font-weight: 600; }
.legal-shell .tm-btn.tm-btn-primary { background: var(--ui-ink) !important; color: #fff !important; }
.legal-shell .tm-section-heading { text-transform: none; font-weight: 500; font-size: 18px; }
.legal-shell .tm-field { background: #f8f8fb; border: 1px solid var(--ui-line); border-radius: 14px; }
.legal-shell .tm-label { border-right: 1px solid var(--ui-line); color: var(--ui-muted); font-size: 13px; font-weight: 400; align-items: center; }
.legal-shell .tm-preview-wrap { border-radius: 16px; border-color: var(--ui-line); }
.legal-shell .form-control, .legal-shell .form-select, .ui-auth .form-control,
.legal-shell .tm-search-panel .form-control,
.legal-shell .select2-container--default .select2-selection--single {
  background: #f7f7fa !important; color: var(--ui-ink); border: 1px solid var(--ui-line) !important;
  border-radius: 14px !important; min-height: 44px; padding: 10px 14px; box-shadow: none !important; font-weight: 400;
}
.legal-shell .tm-input, .legal-shell .tm-select { border-radius: 0 14px 14px 0 !important; }
.legal-shell .tm-date-control { align-items: center; flex-wrap: wrap; }
.legal-shell .tm-date-display { width: 100%; padding-right: 40px !important; }
.legal-shell .tm-date-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.legal-shell .tm-date-picker { position: absolute; right: 10px; top: 10px; border: 0; background: transparent; color: var(--ui-muted); padding: 2px 4px; }
.legal-shell .tm-date-feedback { color: #a34039; font-size: 12px; padding: 4px 10px; }
.legal-shell .tm-value { display: flex; align-items: center; min-height: 44px; }
.legal-shell #general .tm-field.is-tall { min-height: 64px; }
.legal-shell label, .legal-shell .form-label { color: #62636f; font-weight: 500; }
.legal-shell .form-control:focus, .ui-auth .form-control:focus, .legal-shell .tm-field:focus-within { border-color: #a69c6c !important; box-shadow: 0 0 0 3px rgba(242,217,107,.2) !important; }
.legal-shell .btn, .ui-auth .btn, .legal-shell .tm-btn,
.legal-shell .tm-search-panel .btn, .legal-shell .tm-results-panel .btn, .legal-shell .tm-index-actions .btn {
  border-radius: 50px !important; border: 1px solid var(--ui-line) !important;
  background: #fff !important; color: var(--ui-ink) !important; box-shadow: none !important;
  font-weight: 500; text-transform: none; letter-spacing: 0; padding: 10px 18px;
  transition: background .18s ease, box-shadow .18s ease;
}
.legal-shell .btn-primary, .legal-shell .btn-success, .ui-auth .btn-primary,
.legal-shell button[type="submit"], .legal-shell .tm-search-panel button[type="submit"], .legal-shell .tm-btn-save,
.legal-shell .tm-index-actions .tm-primary-action { background: var(--ui-ink) !important; color: #fff !important; border-color: var(--ui-ink) !important; }
.legal-shell .btn-danger, .legal-shell .btn_remove { background: #fff0ee !important; color: #a34039 !important; border-color: #f0d9d6 !important; }
.legal-shell .btn:hover, .legal-shell .tm-btn:hover, .ui-auth .btn:hover { box-shadow: 0 4px 12px rgba(38,39,56,.1) !important; }
.legal-shell .table { color: var(--ui-ink); }
.legal-shell .table thead th { background: #f7f7fa !important; color: var(--ui-muted); border-color: var(--ui-line); font-size: 11px; font-weight: 500; letter-spacing: .045em; padding: 16px !important; }
.legal-shell .table td { border-color: var(--ui-line); padding: 16px !important; font-weight: 400; }
.legal-shell .table tbody tr:hover { background: #fafafd !important; }
.legal-shell .table-responsive { border-radius: 16px; }
.legal-shell .badge { border-radius: 50px; letter-spacing: 0; }
.legal-shell .bg-gradient-primary, .legal-shell .bg-gradient-dark { background: var(--ui-ink) !important; }
.legal-shell .bg-gradient-success, .legal-shell .badge.bg-success { background: #e6f1e9 !important; color: #376a4b !important; }
.legal-shell .bg-gradient-danger, .legal-shell .badge.bg-danger { background: #fae8e5 !important; color: #a34039 !important; }
.legal-shell .bg-gradient-warning, .legal-shell .badge.bg-warning { background: #faf4d7 !important; color: #75651e !important; }
.legal-shell .dropdown-menu, .legal-shell .modal-content, .legal-shell .autocomplete-box { border: 1px solid var(--ui-line); border-radius: 20px; box-shadow: 0 12px 40px rgba(38,39,56,.09); }
.legal-shell .modal-header, .legal-shell .modal-footer { border-color: var(--ui-line); }
.legal-shell .page-link { border-radius: 50px !important; color: var(--ui-ink); box-shadow: none; }
.legal-shell .page-item.active .page-link { background: var(--ui-ink); border-color: var(--ui-ink); color: white; }
.legal-shell .fc-theme-standard td, .legal-shell .fc-theme-standard th, .legal-shell .fc-theme-standard .fc-scrollgrid { border-color: var(--ui-line); }
.legal-shell .fc .fc-button-primary { background: #f5f5f9; color: var(--ui-ink); border: 1px solid var(--ui-line); border-radius: 50px; box-shadow: none; }
.legal-shell .fc .fc-day-today { background: #faf7e7 !important; }
.legal-shell .fc-event { border: 0; border-radius: 7px; background: #eeedf5; color: #494657; }
.legal-shell .fc-event .fc-event-main { color: inherit; }
.legal-shell .fc-event.bg-gradient-primary { color: #fff; }
.legal-shell .fc-event.bg-gradient-info { background: #e6edf6 !important; color: #415d7c; }
.legal-shell .fc .fc-toolbar-title { font-size: 26px; font-weight: 400; }
.legal-shell .footer { color: var(--ui-muted); font-size: 12px; }
.ui-auth .page-header { background: radial-gradient(ellipse at 20% 20%, #faf6e7, transparent 45%), var(--ui-bg) !important; }
.ui-auth .mask { display: none; }
.ui-auth .card { padding: 20px 0; }
.ui-auth h5 { font-size: 32px; }
.ui-auth .footer { background: var(--ui-bg); }
:is(.legal-shell, .ui-auth) :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #93803a; outline-offset: 3px; }
@media (min-width: 1200px) {
  .legal-shell.g-sidenav-show .main-content { margin-left: 270px; }
  .legal-shell.g-sidenav-hidden .main-content { margin-left: 0; }
}
@media (max-width: 1199.98px) {
  .legal-shell .legal-sidenav { background: #eeeef2 !important; z-index: 1040; }
  .legal-shell .main-content > .container-fluid { padding: 12px 20px 24px; }
  .legal-shell .legal-navbar #navbar { display: flex !important; flex-basis: auto; margin: 0 !important; }
}
@media (max-width: 575.98px) {
  .legal-shell .main-content > .container-fluid { padding: 8px 12px 20px; }
  .legal-shell .legal-navbar { margin: 0 4px !important; }
  .legal-shell .card-body, .legal-shell .card-header { padding: 18px; }
  .legal-shell .tm-file-shell { padding: 14px; }
  .legal-shell .tm-label { border-right: 0; border-bottom: 1px solid var(--ui-line); }
  .legal-shell .tm-input, .legal-shell .tm-select { border-radius: 0 0 14px 14px !important; }
  .legal-shell .fc .fc-toolbar { gap: 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .legal-shell *, .ui-auth * { transition: none !important; scroll-behavior: auto !important; } }

/* Compact editable table for the two sections approved in the preview. */
.legal-shell .tm-compact-file { margin-top: 0 !important; }
.legal-shell .tm-compact-file .tm-page-actions { margin-bottom: 10px; }
.legal-shell .tm-compact-file .tm-page-actions .tm-btn { padding: 7px 13px; min-height: 34px; font-size: 12px; }
.legal-shell .tm-compact-file .tm-file-shell { padding: 20px; }
.legal-shell .tm-compact-file .tm-record-header { padding: 16px 20px; }
.legal-shell .tm-compact-file .tm-record-header .tm-title { font-size: clamp(23px, 2.3vw, 28px); }
.legal-shell .tm-compact-file .tm-header-meta { font-size: 14px; gap: 3px; }
.legal-shell .tm-compact-file .tm-status-pill { padding: 2px 7px; font-size: 11px; font-weight: 500; line-height: 1.3; }
.legal-shell .tm-status-pill.is-pending { background: #fff2d5; color: #8b6110; }
.legal-shell .tm-status-pill.is-abandoned { background: #fbe8e6; color: #a33d35; }
.legal-shell .tm-compact-file .tm-section { margin-top: 30px; }
.legal-shell .tm-compact-file .tm-section-heading, .legal-shell .tm-compact-file .tm-section-heading span { font-size: 16px; font-weight: 600; }
.legal-shell .tm-compact-file .tm-section-heading { margin-bottom: 16px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-section-heading,
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-section-heading span { font-weight: 600; font-size: 16px; margin-bottom: 16px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-field-grid { gap: 0; border-top: 1px solid var(--ui-line); }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-field { min-height: 32px; grid-template-columns: 136px minmax(0, 1fr); border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0; background: transparent; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-label { justify-content: flex-start; text-align: left; background: #f7f7fa; border: 0; padding: 5px 9px; font-size: 13px; line-height: 1.35; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-control { min-width: 0; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) :is(.tm-input, .tm-select, .tm-value) { min-height: 32px; font-size: 14px; line-height: 1.4; padding: 6px 9px; border: 0 !important; background: transparent !important; border-radius: 0 !important; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) :is(input.tm-input, select.tm-select) { height: 32px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .select2-container--default .select2-selection--single { min-height: 32px; height: 32px; padding: 3px 9px; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .select2-selection__rendered { line-height: 26px; font-size: 14px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .select2-selection__arrow { height: 32px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-date-picker { top: 5px; right: 7px; font-size: 12px; }
.legal-shell .tm-approved-section :is(.tm-label, .tm-input, .tm-select, .tm-value, .tm-date-display) { font-weight: 400; }
.legal-shell .tm-approved-section .tm-field-emphasis :is(.tm-input, .tm-select, .tm-value, .tm-date-display) { font-weight: 600; }

.legal-shell .tm-compact-file .tm-field:focus-within { box-shadow: none !important; border-color: var(--ui-line) !important; }
.legal-shell .tm-compact-file :is(input, select, textarea):focus { box-shadow: none !important; border-color: #a7abb4 !important; outline: 1px solid #8a909b; outline-offset: -1px; background: transparent !important; }
.legal-shell .tm-compact-file :is(input, select, textarea):focus-visible { outline: 1px solid #8a909b; outline-offset: -1px; }
@media (min-width: 768px) {
  .legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file .tm-file-shell { padding: 12px; }
  .legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) :is(input.tm-input, select.tm-select, .select2-selection--single) { min-height: 40px; height: 40px; font-size: 16px; }
  .legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-date-picker { top: 9px; }
}

/* Independent columns follow the readable References / General reference. */
.legal-shell .tm-compact-file .tm-split-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 32px; align-items: start; max-width: 752px; }
.legal-shell .tm-compact-file .tm-field-column { min-width: 0; border: 1px solid var(--ui-line); border-radius: 6px; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-field-column .tm-field:last-child { border-bottom: 0; }
.legal-shell .tm-compact-file :is(#references, #general, #maintenance) .tm-field-column:last-child .tm-field { grid-template-columns: 172px minmax(0, 1fr); }
@media (max-width: 991.98px) {
  .legal-shell .tm-compact-file .tm-split-tables { grid-template-columns: minmax(0, 360px); gap: 16px; }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file :is(#references, #general, #maintenance, #trademark-section) .tm-field { grid-template-columns: 44% minmax(0, 1fr); }
  .legal-shell .tm-compact-file :is(#references, #general, #maintenance) .tm-field-column:last-child .tm-field { grid-template-columns: 44% minmax(0, 1fr); }
}

/* Approved three-section details: spacing and controls, with no new input boxes. */
.legal-shell .tm-compact-file .tm-record-header .tm-title,
.legal-shell .tm-compact-file .tm-section-heading,
.legal-shell .tm-approved-section,
.legal-shell .tm-approved-section :is(.tm-label, .tm-input, .tm-select, .tm-value, .tm-date-display) { letter-spacing: normal; }
.legal-shell .tm-approved-section input::placeholder { letter-spacing: normal; }
.legal-shell .tm-approved-section .tm-spacer-row { height: 12px; border-bottom: 1px solid var(--ui-line); background: #fff; }
.legal-shell .tm-approved-section .tm-empty-value { color: #868993; }
.legal-shell .tm-approved-section .tm-date-control { gap: 10px; }
.legal-shell .tm-approved-section .tm-date-display { flex: 0 1 auto; width: 118px; max-width: calc(100% - 30px); padding-right: 2px !important; }
.legal-shell .tm-approved-section .tm-date-picker { position: static; flex: 0 0 20px; width: 20px; height: 32px; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: flex-start; }
.legal-shell .tm-approved-section select.tm-select:not(.select2-hidden-accessible) { appearance: none; -webkit-appearance: none; width: min(100%, 150px); padding-right: 30px; }
.legal-shell .tm-approved-section .tm-select-chevron { position: absolute; pointer-events: none; left: min(calc(100% - 20px), 130px); top: 13px; width: 6px; height: 6px; border-right: 1px solid #71727d; border-bottom: 1px solid #71727d; transform: rotate(45deg); }
.legal-shell .tm-approved-section .tm-control:has(.select2-container) > .tm-select-chevron { display: none; }
.legal-shell .tm-approved-section .tm-control > .select2-container { width: 150px !important; max-width: 100%; }
.legal-shell #maintenance .tm-field-column:first-child .tm-field { grid-template-columns: 172px minmax(0, 1fr); }
@media (max-width: 575.98px) {
  .legal-shell #maintenance .tm-field-column:first-child .tm-field { grid-template-columns: 44% minmax(0, 1fr); }
  .legal-shell .tm-approved-section .tm-select-chevron { top: 17px; }
  .legal-shell .tm-approved-section .tm-date-picker { height: 40px; }
}

/* Trademark uses the approved cells and three independent table groups. */
.legal-shell .tm-record-header [data-header="refs"] { color: inherit; }
.legal-shell .tm-mark-layout { max-width: 752px; display: grid; gap: 10px; }
.legal-shell .tm-mark-middle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.legal-shell .tm-compact-file #trademark-section .tm-field { grid-template-columns: 136px minmax(0, 1fr); }
.legal-shell .tm-compact-file #trademark-section .tm-label { align-items: center; font-weight: 400; }
.legal-shell .tm-compact-file #trademark-section .tm-mark-multiline { min-height: 64px; }
.legal-shell .tm-compact-file #trademark-section textarea.tm-input { height: 64px; min-height: 64px; resize: vertical; display: block; }
.legal-shell .tm-compact-file #trademark-section .tm-value { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 400; }
.legal-shell .tm-mark-logo { background: #f7f7fa; }
.legal-shell .tm-mark-logo .tm-logo-control { height: 100%; min-height: 196px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; gap: 8px; position: relative; }
.legal-shell .tm-mark-logo .tm-preview-image { max-width: 100%; max-height: 180px; width: auto; height: auto; object-fit: contain; }
.legal-shell .tm-mark-logo .tm-preview-image[hidden] { display: none; }
.legal-shell .tm-upload-hint { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; }
.legal-shell .tm-upload-hint i { font-size: 28px; color: var(--ui-muted); }
.legal-shell .tm-upload-hint label { margin: 0; font-size: 14px; }
.legal-shell .tm-upload-hint span, .legal-shell .tm-upload-hint small, .legal-shell .tm-logo-empty { color: var(--ui-muted); }
.legal-shell .tm-upload-hint .tm-file-link { color: #2255a0; cursor: pointer; }
.legal-shell .tm-mark-logo input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.legal-shell .tm-mark-logo:focus-within { outline: 1px solid #8a909b; outline-offset: -1px; }
.legal-shell .tm-approved-section .select2-selection__arrow { right: 0; }
@media (max-width: 767.98px) {
  .legal-shell .tm-mark-middle { grid-template-columns: minmax(0, 1fr); }
  .legal-shell .tm-mark-section .tm-mobile-empty { display: none; }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file #trademark-section .tm-field { grid-template-columns: 44% minmax(0, 1fr); }
}
/* October review: a distinct navigation card with a persistent icon rail. */
.legal-shell .legal-sidenav {
  background: #fff !important; border: 1px solid rgba(36,37,43,.035) !important;
  border-radius: 24px !important; box-shadow: var(--ui-shadow) !important;
  margin: 16px !important; width: 280px; max-width: 280px; height: calc(100dvh - 32px);
  transition: width .2s ease, transform .2s ease;
}
.legal-sidenav .sidenav-header { position: relative; padding: 36px 28px 24px; flex-shrink: 0; }
.legal-sidenav .navbar-brand { display: block; overflow: hidden; }
.legal-sidenav .navbar-brand-img { width: 210px; max-width: 100%; max-height: 52px; object-fit: contain; }
.legal-sidenav > .horizontal { display: none; }
.legal-sidenav #sidenav-collapse-main { padding-top: 4px; min-height: 0; }
.legal-sidenav .navbar-nav { padding: 0 12px 12px; }
.legal-sidenav h6 { margin: 16px 0 9px !important; padding-left: 18px !important; font-size: 11px; }
.legal-sidenav .nav-link { min-height: 46px; padding: 11px 18px !important; gap: 16px; font-size: 14px; }
.legal-sidenav .nav-link > .bi { font-size: 22px; width: 26px; text-align: center; }
.legal-sidenav .nav-link.active { background: #f0f0f4 !important; font-weight: 600; }
.legal-sidebar-toggle { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; color: var(--ui-muted); padding: 4px; line-height: 1; }
.legal-sidebar-profile { flex-shrink: 0; margin: 0 28px; padding: 18px 0 22px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--ui-line); }
.legal-sidebar-avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: #b6b7c0; color: white; display: grid; place-items: center; font-size: 16px; }
.legal-sidebar-details { min-width: 0; }
.legal-sidebar-name { overflow-wrap: anywhere; font-size: 14px; }
.legal-sidebar-role { font-size: 12px; }
@media (min-width: 1200px) {
  .legal-shell.g-sidenav-show .main-content, .legal-shell.g-sidenav-hidden .main-content { margin-left: 312px; }
  .legal-shell.legal-sidebar-collapsed .legal-sidenav { width: 80px; }
  .legal-shell.legal-sidebar-collapsed .main-content { margin-left: 112px; }
  .legal-sidebar-collapsed .legal-sidenav .sidenav-header { padding: 42px 16px 16px; }
  .legal-sidebar-collapsed .legal-sidenav .navbar-brand { width: 44px; height: 44px; }
  .legal-sidebar-collapsed .legal-sidenav .navbar-brand-img { max-width: none; width: 190px; object-fit: contain; object-position: left; }
  .legal-sidebar-collapsed .legal-sidenav .nav-link { justify-content: center; padding: 11px 0 !important; gap: 0; }
  .legal-sidebar-collapsed .legal-sidenav .nav-link-text,
  .legal-sidebar-collapsed .legal-sidenav h6,
  .legal-sidebar-collapsed .legal-sidebar-details,
  .legal-sidebar-collapsed .legal-sidenav .collapse:not(#sidenav-collapse-main),
  .legal-sidebar-collapsed .legal-sidenav [data-bs-toggle="collapse"]::after { display: none !important; }
  .legal-sidebar-collapsed .legal-sidebar-profile { margin: 0 12px; justify-content: center; }
}
@media (max-width: 1199.98px) {
  .legal-shell .legal-sidenav { transform: translateX(-320px); z-index: 1050; }
  .legal-shell.legal-sidebar-open .legal-sidenav { transform: translateX(0); }
  .legal-shell .main-content { margin-left: 0 !important; }
}
/* Restore the file header and action proportions; approved data cells stay compact. */
.legal-shell .tm-compact-file .tm-record-header { padding: 24px; }
.legal-shell .tm-compact-file .tm-record-header .tm-title { font-size: clamp(24px, 3vw, 36px); }
.legal-shell .tm-compact-file .tm-header-meta { font-size: 16px; gap: 3px; }
.legal-shell .tm-compact-file .tm-title-line { margin-bottom: 3px; }
.legal-shell .tm-compact-file .tm-page-actions { margin-bottom: 18px; }
.legal-shell .tm-compact-file .tm-page-actions .tm-btn { font-size: 14px; min-height: 40px; padding: 10px 18px; }
.legal-shell .tm-compact-file #trademark-section .tm-mark-name :is(.tm-input,.tm-value) { font-weight: 600; }
.legal-shell .tm-compact-file #trademark-section.tm-mark-edit .tm-mark-footer-field { min-height: 32px; }
.legal-shell .tm-compact-file #trademark-section.tm-mark-edit .tm-mark-footer-field textarea { min-height: 32px; height: 32px; resize: vertical; display: block; }
.legal-shell .tm-compact-file #trademark-section .tm-mark-info { display: grid; grid-template-rows: auto auto 12px minmax(64px,1fr) 12px minmax(64px,1fr); }
.legal-shell .tm-compact-file #trademark-section .tm-label { height: 100%; }

.legal-shell .tm-mark-logo .has-image .tm-upload-hint { display: none; }
.legal-shell .tm-logo-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 1px solid var(--ui-line); border-radius: 50%; background: white; color: var(--ui-ink); display: grid; place-items: center; z-index: 1; }
.legal-shell .tm-logo-remove[hidden] { display: none; }
.legal-shell .tm-mark-middle .tm-mark-info { overflow: hidden; }
.legal-shell .tm-compact-file .tm-text-table { max-width: 752px; }
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-field { display: grid; grid-template-columns: 136px minmax(0,1fr); min-height: 32px; border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0; background: transparent; }
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-field:last-child { border-bottom: 0; }
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-label { align-items: center; justify-content: flex-start; text-align: left; padding: 5px 9px; background: #f7f7fa; border: 0; font-size: 13px; font-weight: 400; }
.legal-shell .tm-compact-file :is(#accounts,#notes) :is(.tm-input,.tm-select,.tm-value) { min-height: 32px; font-size: 14px; line-height: 1.4; padding: 6px 9px; border: 0 !important; border-radius: 0 !important; background: transparent !important; margin: 0; }
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-select { height: 32px; }
.legal-shell .tm-compact-file :is(#accounts,#notes) textarea { display: block; min-height: 64px; height: 64px; resize: vertical; }
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-value { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
  .legal-shell .tm-mark-readonly .tm-mark-info { grid-template-rows: none !important; grid-auto-rows: auto; }
  .legal-shell .tm-mark-readonly .tm-mark-spacer:has(+ .tm-mobile-empty) { display: none; }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file :is(#accounts,#notes) .tm-field { grid-template-columns: 44% minmax(0,1fr); }
  .legal-shell .tm-compact-file :is(#accounts,#notes) :is(input,select,textarea) { font-size: 16px; }
}
.legal-shell .legal-sidenav { width: 280px !important; max-width: 280px !important; }
.legal-shell .legal-sidenav .nav-link > .bi { font-size: 22px !important; }
@media (min-width: 1200px) {
  .legal-shell.legal-sidebar-collapsed .legal-sidenav { width: 80px !important; }
}

/* A single label width across all three Trademark table groups. */
.legal-shell .tm-compact-file #trademark-section { --tm-mark-label-width: 136px; }
.legal-shell .tm-compact-file #trademark-section .tm-field { grid-template-columns: var(--tm-mark-label-width) minmax(0, 1fr); }
.legal-shell .tm-compact-file :is(.tm-section-heading, .tm-section-heading span, .tm-header-meta strong),
.legal-shell .tm-compact-file .tm-field-emphasis :is(.tm-input, .tm-select, .tm-value, .tm-date-display),
.legal-shell .tm-compact-file #trademark-section .tm-mark-name :is(.tm-input, .tm-value),
.legal-shell .legal-sidenav .nav-link.active {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: normal;
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file #trademark-section { --tm-mark-label-width: min(136px, 36vw); }
}
/* File header and section 06–08 use the established typography and field surfaces. */
.legal-shell .tm-compact-file .tm-record-header .tm-title { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: normal; }
.legal-shell .legal-sidenav .navbar-brand { display: flex; align-items: center; justify-content: center; width: 100%; }
.legal-shell.legal-sidebar-collapsed .legal-sidenav .navbar-brand { justify-content: flex-start; width: 44px; }
.legal-shell .tm-contact-layout { display: grid; gap: 12px; max-width: 752px; }
.legal-shell .tm-contact-pair, .legal-shell .tm-deadline-tables, .legal-shell .tm-deadline-identifiers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.legal-shell .tm-deadline-tables, .legal-shell .tm-deadline-identifiers { max-width: 752px; align-items: start; }
.legal-shell .tm-deadline-identifiers { margin-top: 12px; }
.legal-shell .tm-compact-file :is(.tm-contact-section,.tm-deadline-section) .tm-field { display: grid; grid-template-columns: 152px minmax(0,1fr); min-height: 32px; border: 0; border-radius: 0; border-bottom: 1px solid var(--ui-line); background: transparent; }
.legal-shell .tm-compact-file .tm-contact-section .tm-field { border: 1px solid var(--ui-line); border-radius: 6px; overflow: hidden; }
.legal-shell .tm-compact-file .tm-contact-section .autocomplete-wrap { overflow: visible; }
.legal-shell .tm-compact-file .tm-deadline-section .tm-field { grid-template-columns: 204px minmax(0,1fr); }
.legal-shell .tm-compact-file .tm-deadline-section .tm-field:last-child { border-bottom: 0; }
.legal-shell .tm-compact-file :is(.tm-contact-section,.tm-deadline-section) .tm-label { display: flex; align-items: center; justify-content: flex-start; text-align: left; background: #f7f7fa; font-size: 13px; font-weight: 400; line-height: 1.35; border: 0; padding: 6px 9px; margin: 0; }
.legal-shell .tm-compact-file :is(.tm-contact-section,.tm-deadline-section) :is(.tm-input,.tm-select,.tm-value) { min-height: 32px; font-size: 14px; line-height: 1.4; font-weight: 400; padding: 6px 9px; background: transparent !important; border: 0 !important; border-radius: 0 !important; margin: 0; }
.legal-shell .tm-compact-file .tm-deadline-section :is(.tm-input,.tm-select) { height: 32px; }
.legal-shell .tm-contact-section .tm-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-shell .tm-contact-pair .tm-field { min-height: 80px; }
.legal-shell .tm-contact-section .tm-field.is-tall { min-height: 80px; }
.legal-shell .tm-contact-section .select2-container { max-width: 100%; }
@media (max-width: 767.98px) {
  .legal-shell .tm-contact-pair,.legal-shell .tm-deadline-tables,.legal-shell .tm-deadline-identifiers { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file .tm-contact-section .tm-field { grid-template-columns: 44% minmax(0,1fr); }
  .legal-shell .tm-compact-file .tm-deadline-section .tm-field { grid-template-columns: 50% minmax(0,1fr); }
  .legal-shell .tm-compact-file :is(.tm-contact-section,.tm-deadline-section) :is(input,select) { font-size: 16px; }
}
.legal-shell .tm-compact-file .tm-contact-addresses .tm-field { min-height: 80px; }
/* ROMEROIP brand assets and the three independently scrolling sidebar areas. */
.legal-shell .legal-sidenav { overflow: hidden !important; }
.legal-shell .legal-sidenav .sidenav-header { flex: 0 0 auto; }
.legal-shell .legal-sidenav #sidenav-collapse-main { flex: 1 1 0 !important; min-height: 0 !important; max-height: none !important; height: auto !important; overflow-y: auto !important; overscroll-behavior: contain; }
.legal-shell .legal-sidenav .legal-sidebar-profile { flex: 0 0 auto; }
.legal-shell .legal-sidenav .navbar-brand { width: 100%; height: 52px; display: flex; justify-content: center; align-items: center; }
.legal-shell .legal-sidenav .legal-brand-full { display: block; width: 210px; max-width: 100%; height: auto; max-height: 52px; object-fit: contain; }
.legal-shell .legal-sidenav .legal-brand-symbol { display: none; width: 40px; height: auto; max-height: 44px; object-fit: contain; }
@media (min-width: 1200px) {
  .legal-shell.legal-sidebar-collapsed .legal-sidenav .navbar-brand { width: 100%; height: 44px; justify-content: center; }
  .legal-shell.legal-sidebar-collapsed .legal-sidenav .legal-brand-full { display: none; }
  .legal-shell.legal-sidebar-collapsed .legal-sidenav .legal-brand-symbol { display: block; }
}
/* Only the requested Edit fields start at four text lines (4 x 19.6 + padding). */
.legal-shell .tm-compact-file #trademark-section.tm-mark-edit .tm-edit-four-lines textarea.tm-input,
.legal-shell .tm-compact-file :is(#accounts,#notes) .tm-edit-four-lines textarea.tm-input { height: 92px; min-height: 92px; resize: vertical; }
/* In View the text rows take their own intrinsic height instead of sharing 1fr. */
.legal-shell .tm-compact-file #trademark-section.tm-mark-readonly .tm-mark-info { display: flex; flex-direction: column; }
.legal-shell .tm-compact-file #trademark-section.tm-mark-readonly .tm-mark-info > .tm-field { flex: 0 0 auto; }
.legal-shell .tm-compact-file #trademark-section.tm-mark-readonly .tm-mark-info > .tm-spacer-row { flex: 0 0 12px; }
.legal-shell .tm-mark-readonly .tm-mark-middle { align-items: stretch; }
.legal-shell .tm-mark-readonly .tm-mark-logo .tm-logo-control { min-height: 0; }
/* Compact contact columns, multiline full-cell choices, and equal lower table heights. */
.legal-shell .tm-compact-file .tm-contact-section .tm-field { grid-template-columns: 100px minmax(0,1fr); }
.legal-shell .tm-compact-file .tm-contact-section .tm-label { height: 100%; }
.legal-shell .tm-contact-pair { align-items: stretch; }
.legal-shell .tm-contact-table { border: 1px solid var(--ui-line); border-radius: 6px; min-width: 0; overflow: hidden; }
.legal-shell .tm-compact-file .tm-contact-table .tm-field { border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0; height: 100%; }
.legal-shell .tm-compact-file .tm-contact-table .tm-field:last-child { border-bottom: 0; }
.legal-shell .tm-client-details { display: grid; grid-template-rows: minmax(40px,1fr) minmax(40px,1fr); }
.legal-shell .tm-client-address { display: grid; min-height: 80px; }
.legal-shell .tm-contact-section .tm-control { display: flex; align-items: stretch; }
.legal-shell .tm-compact-file .tm-contact-section .tm-control > .select2-container { width: 100% !important; max-width: 100%; flex: 1 1 0; min-width: 0; }
.legal-shell .tm-contact-section .select2-container .selection { display: block; height: 100%; }
.legal-shell .tm-compact-file .tm-contact-section .select2-selection--single { height: 100%; min-height: 40px; display: flex; align-items: center; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 0; }
.legal-shell .tm-compact-file .tm-contact-section .select2-selection__rendered { white-space: pre-wrap; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.4; padding: 8px 30px 8px 9px; font-size: 14px; width: 100%; }
.legal-shell .tm-compact-file .tm-contact-section .select2-selection__arrow { right: 8px; top: 50%; transform: translateY(-50%); height: 24px; }
.legal-shell .tm-contact-section .select2-container--focus .select2-selection,
.legal-shell .tm-contact-section .select2-container--open .select2-selection { outline: 1px solid #8a909b; outline-offset: -1px; }
.tm-contact-options .select2-results__option { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; font-family: 'Inter', sans-serif; font-size: 14px; padding: 10px 12px; border-bottom: 1px solid var(--ui-line); }
.tm-contact-options .select2-results__option:last-child { border-bottom: 0; }
.tm-contact-options .select2-results__options { max-height: 320px !important; }
.legal-shell .legal-sidenav .sidenav-header { width: 100%; align-self: stretch; }
/* Header tools stay in the main column and never cover the application sidebar. */
:root { --legal-header-height: 68px; --tm-section-offset: 100px; }
.legal-shell .legal-topbar { position: sticky !important; top: 0; z-index: 1030; display: grid; grid-template-columns: minmax(220px,1fr) minmax(250px,1.4fr) auto; align-items: center; gap: 16px; margin: 0 20px !important; padding: 12px 0 !important; min-height: 68px; background: rgba(238,238,242,.97) !important; backdrop-filter: blur(12px); }
.legal-topbar-left { min-width: 0; display: flex; gap: 12px; align-items: center; }
.legal-menu-toggle { flex: 0 0 28px; border: 0; background: transparent; color: var(--ui-ink); padding: 4px; font-size: 20px; }
.legal-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 7px; font-size: 12px; }
.legal-breadcrumb li + li::before { content: '›'; color: var(--ui-muted); margin-right: 7px; }
.legal-quick-search { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--ui-line); border-radius: 50px; height: 38px; min-width: 0; padding: 0 12px; }
.legal-quick-search:focus-within { outline: 1px solid #8a909b; }
.legal-quick-search button { padding: 0; background: transparent; border: 0; color: var(--ui-muted); }
.legal-quick-search input { border: 0; outline: 0; min-width: 0; width: 100%; font-size: 12px; color: var(--ui-ink); background: transparent; }
.legal-search-status { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 10px 12px; margin: 0; border-radius: 10px; border: 1px solid var(--ui-line); background: #fff; box-shadow: var(--ui-shadow); font-size: 12px; }
.legal-profile-button { border: 1px solid var(--ui-line); background: #fff; border-radius: 50px; padding: 6px 10px 6px 6px; display: flex; align-items: center; gap: 9px; color: var(--ui-ink); font-size: 12px; }
.legal-profile-avatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #9698b9; color: white; object-fit: cover; font-size: 11px; }
.legal-chevron { width: 6px; height: 6px; border-right: 1px solid #71727d; border-bottom: 1px solid #71727d; transform: rotate(45deg); }
.legal-shell .tm-file-shell { container-type: inline-size; }
.legal-shell .tm-compact-file .tm-section { scroll-margin-top: var(--tm-section-offset); }
.legal-shell .tm-sections-panel { position: sticky; top: calc(var(--legal-header-height) + 8px); float: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 16px 0 0; background: #fff; border: 1px solid var(--ui-line); border-radius: 10px; z-index: 900; }
.tm-sections-wide { display: none; }
.tm-sections-compact { flex: 1; display: flex; align-items: center; gap: 12px; margin: 0; font-size: 11px; min-width: 0; }
.tm-sections-compact select { min-width: 0; width: 100%; max-width: 300px; border: 0; background: transparent; font: inherit; font-size: 13px; padding: 5px; }
.tm-sections-save { flex-shrink: 0; }
.legal-shell .tm-sections-save .tm-btn { font-size: 12px; min-height: 32px; padding: 6px 12px; }
.tm-sections-wide h2 { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; margin: 0 0 10px; color: var(--ui-muted); }
.tm-sections-wide a { display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 8px; border-radius: 6px; font-size: 12px; }
.tm-sections-wide a > span:first-child { width: 17px; color: var(--ui-muted); }
.tm-section-divider { color: #9a9ca6; }
.tm-sections-wide a.is-active { background: #f0f0f4; }
@container (min-width: 988px) {
  .legal-shell .tm-sections-panel { float: right; display: block; width: 220px; margin: 30px 0 0 16px; padding: 14px 10px; top: calc(var(--legal-header-height) + 16px); max-height: calc(100dvh - var(--legal-header-height) - 32px); overflow-y: auto; }
  .tm-sections-wide { display: block; }
  .tm-sections-compact { display: none; }
  .tm-sections-save { border-top: 1px solid var(--ui-line); padding-top: 12px; margin-top: 12px; }
  .legal-shell .tm-sections-save .tm-btn { width: 100%; justify-content: center; }
}
.legal-search-results { width: min(560px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid var(--ui-line); border-radius: 18px; background: #fff; color: var(--ui-ink); padding: 20px; }
.legal-search-results::backdrop { background: rgba(36,37,43,.28); }
.legal-search-results-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal-search-results-heading h2 { margin: 0; font-size: 18px; letter-spacing: normal; }
.legal-search-results-heading button { background: none; border: 0; }
.legal-search-results [data-result-count] { color: var(--ui-muted); font-size: 12px; margin: 8px 0 16px; }
.legal-search-result { border: 1px solid var(--ui-line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.legal-search-result h3 { font-size: 14px; font-weight: 600; letter-spacing: normal; overflow-wrap: anywhere; }
.legal-search-result p { font-size: 12px; overflow-wrap: anywhere; }
.legal-search-match { color: var(--ui-muted); }
.legal-search-result .tm-btn { display: flex; width: 100%; justify-content: center; font-size: 12px; }
.legal-shell .tm-compact-file #references .tm-field-column:last-child .tm-field { grid-template-columns: 136px minmax(0,1fr); }
.legal-shell .tm-compact-file [data-field="client_ref"] .tm-value { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.legal-shell .tm-compact-file .tm-class-value :is(.tm-select,.tm-value),
.legal-shell .tm-compact-file .tm-party-name :is(.tm-input,.tm-value,.select2-selection__rendered) { font-family: 'Inter',sans-serif; font-weight: 600; letter-spacing: normal; }
.legal-shell .tm-compact-file .tm-contact-section .select2-selection__arrow b { border: 0 !important; border-right: 1px solid #71727d !important; border-bottom: 1px solid #71727d !important; width: 6px; height: 6px; margin: -4px 0 0 -3px; transform: rotate(45deg); }
.account-panel { max-width: 700px; margin: 0 auto; }
.account-panel h1 { font-size: 24px; letter-spacing: normal; }
.account-panel label { margin-top: 14px; }
@media (max-width: 767.98px) {
  .legal-shell .legal-topbar { grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin: 0 12px !important; }
  .legal-quick-search { grid-column: 1 / -1; grid-row: 2; }
  .legal-profile-name { display: none; }
}
@media (max-width: 575.98px) {
  .legal-shell .tm-compact-file #references .tm-field-column:last-child .tm-field { grid-template-columns: 44% minmax(0,1fr); }
}
/* Perfect Scrollbar's legacy overflow rule must not trap the sticky tools. */
.legal-shell .main-content { overflow: visible !important; }
.legal-shell .main-content > .ps__rail-x, .legal-shell .main-content > .ps__rail-y { display: none; }
.legal-shell .legal-quick-search button[type="submit"] { background: transparent !important; color: var(--ui-muted) !important; border: 0 !important; box-shadow: none !important; }
/* Long references must not widen the file header on narrow screens. */
.legal-shell .tm-record-header .tm-header-meta { min-width: 0; grid-template-columns: minmax(0,1fr); overflow-wrap: anywhere; }
.legal-profile-button { max-width: 230px; }
.legal-profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Search organization: one full-width query, four primary filters, optional ranges. */
.legal-shell .tm-index-page .tm-search-panel .tm-global-search { flex: 0 0 100%; max-width: 100%; }
.legal-shell .tm-index-page .tm-search-panel .form-control { min-height: 36px; border: 1px solid #e1e3ec !important; border-radius: 8px !important; background: #f7f7fa !important; padding: 7px 10px; font-weight: 400; }
.legal-shell .tm-index-page .tm-search-panel .form-label { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 13px; }
.legal-shell .tm-index-page .tm-search-panel .row { row-gap: 12px; }
.legal-shell .tm-search-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.legal-shell .tm-search-actions .has-active-filters { border-color: #626b83 !important; background: #eef0f5 !important; }
.legal-shell .tm-search-panel #advancedSearch { margin-top: 0; }
.legal-shell .tm-search-panel #advancedSearch.show { padding-top: 0; }
/* Override the old collapsed rule that forced the full brand image to 190px. */
.legal-shell .legal-sidenav .navbar-brand .legal-brand-full { width: 190px !important; max-width: 100% !important; height: auto !important; max-height: 42px !important; object-position: center; }
.legal-shell .legal-sidenav .navbar-brand .legal-brand-symbol { width: 36px !important; max-width: 100% !important; height: auto !important; max-height: 40px !important; object-position: center; }
.legal-shell .tm-index-page .tm-search-panel select.form-control { appearance: auto !important; padding-right: 10px; }
/* Pending file refinements: preserve the approved table dimensions. */
.legal-breadcrumb { font-size: 14px; }
.legal-shell .legal-topbar.legal-topbar-no-search { grid-template-columns: minmax(0,1fr) auto; }
.legal-shell #notes.tm-text-readonly .tm-field { min-height: 56px; }
.legal-shell #notes.tm-text-readonly .tm-value { min-height: 56px; white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-shell .tm-compact-file #notes { margin-top: 30px; }
@container (min-width: 988px) {
  .legal-shell .tm-sections-panel { float: right; margin-left: 16px; margin-right: calc(100% - 988px); }
}
.legal-shell .tm-compact-file .tm-control:has(> .tm-country-select):focus-within { outline: 1px solid #8a909b; outline-offset: -1px; }
.legal-shell .tm-compact-file select.tm-country-select { width: 100%; max-width: none; padding-right: 24px; appearance: auto; border: 0 !important; outline: 0; box-shadow: none; }
.legal-shell .account-photo { margin-bottom: 24px; }
.legal-shell .account-photo > .legal-profile-avatar { width: 64px; height: 64px; margin-bottom: 12px; }
/* Search controls use the same date entry and keyboard behavior as the file. */
.legal-shell .tm-search-page .tm-search-date { position: relative; }
.legal-shell .tm-search-page .tm-search-date .tm-date-display { padding-right: 34px; }
.legal-shell .tm-search-page .tm-date-picker { top: 3px; right: 15px; width: 26px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.legal-shell .tm-search-page .tm-date-feedback { display: block; font-size: 12px; color: #b33b3b; }
.legal-shell .tm-search-page .tm-date-feedback[hidden] { display: none; }
.legal-shell .tm-index-page .tm-search-panel select.form-control { appearance: none !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23646b7d' stroke-width='1.5'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; padding-right: 34px; }
.legal-shell .tm-index-page .tm-search-panel .form-control:focus { outline: 1px solid #8a909b !important; outline-offset: -1px; border-color: #8a909b !important; box-shadow: none !important; }
/* November refinements are scoped to record headers and trademark search. */
.legal-shell .tm-compact-file .tm-record-header .tm-title { display: block; font: 600 24px/1.25 'Inter', sans-serif; letter-spacing: normal; margin: 0; overflow-wrap: anywhere; }
.legal-shell .tm-record-header .tm-title .tm-status-pill { display: inline-block; vertical-align: middle; margin-left: 10px; white-space: nowrap; font: 500 12px/1.3 'Inter', sans-serif; letter-spacing: normal; }
.legal-shell .tm-record-header .tm-title .tm-status-pill[hidden] { display: none; }
.legal-shell .legal-topbar:not(.legal-topbar-no-search) { grid-template-columns: minmax(0,1fr) auto auto; }
.legal-shell .legal-quick-search { width: 38px; height: 38px; padding: 0; gap: 0; border-radius: 50%; justify-content: center; }
.legal-shell .legal-quick-search.is-expanded { width: 425px; max-width: 100%; border-radius: 50px; padding: 0 12px; gap: 8px; }
.legal-shell .legal-quick-search input, .legal-shell .legal-quick-search input:focus { outline: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; font-size: 12px; }
.legal-shell .legal-quick-search [hidden] { display: none !important; }
.legal-shell .legal-quick-search button { flex-shrink: 0; display: grid; place-items: center; width: 20px; height: 28px; }
.legal-shell .legal-quick-search:not(.is-expanded) button { width: 36px; height: 36px; border-radius: 50%; }
.legal-shell .tm-search-page > .container-fluid { padding-left: 0; padding-right: 0; }
.legal-shell .main-content > .container-fluid:has(> .tm-search-page) { padding-left: 16px; padding-right: 16px; }
.legal-shell .tm-search-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal-shell .tm-search-heading .tm-search-actions { margin-top: 0; flex-shrink: 0; }
.legal-shell .tm-search-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.legal-shell .tm-advanced-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; padding-top: 24px; }
.legal-shell .tm-search-range { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.legal-shell .tm-search-date { min-width: 0; position: relative; }
.legal-shell .tm-search-page .tm-date-picker { right: 5px; }
.legal-shell #tm-search-error { color: #a53636; margin: 12px 0 0; font-size: 13px; }
.legal-shell .tm-country-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23646b7d' stroke-width='1.5'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; }
.legal-shell .tm-compact-file select.tm-country-select { appearance: none; padding-right: 32px; }
.legal-shell .tm-compact-file select.tm-country-select:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
@media(max-width: 767.98px) {
  .legal-shell .legal-topbar:not(.legal-topbar-no-search) { grid-template-columns: minmax(0,1fr) 38px auto; }
  .legal-shell .legal-quick-search { grid-column: 2; grid-row: 1; }
  .legal-shell .legal-quick-search.is-expanded { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .legal-shell .legal-topbar:not(.legal-topbar-no-search) .legal-profile { grid-column: 3; grid-row: 1; }
  .legal-shell .tm-search-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .legal-shell .tm-advanced-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 479.98px) {
  .legal-shell .tm-search-heading { flex-wrap: wrap; }
  .legal-shell .tm-search-heading .tm-search-actions { margin-left: auto; }
  .legal-shell .legal-quick-search.is-expanded input { font-size: 10px; }
}
.legal-shell .tm-compact-file .tm-record-header .tm-title { display: inline-flex; align-items: baseline; max-width: 100%; gap: 10px; }
.legal-shell .tm-record-header .tm-title > [data-header="title"] { min-width: 0; }
.legal-shell .tm-record-header .tm-title .tm-status-pill { flex: 0 0 auto; margin-left: 0; }
/* November 4: compact header tools, one advanced panel, and single-box date ranges. */
.legal-shell > .main-content { background: var(--ui-bg) !important; border-radius: 0 !important; }
.legal-shell .legal-topbar.legal-topbar-global { grid-template-columns: minmax(120px,.55fr) minmax(0,2fr); margin: 0 !important; padding: 12px 20px !important; width: 100%; background: var(--ui-bg) !important; border: 0 !important; box-shadow: none !important; }
.legal-header-tools { display: flex; align-items: center; gap: 8px; min-width: 0; justify-content: flex-end; }
.legal-global-search { position: relative; flex: 1 1 360px; max-width: 440px; min-width: 180px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; background: #fff; border: 1px solid var(--ui-line); border-radius: 50px; }
.legal-global-search:focus-within { outline: 1px solid #9b9eae; outline-offset: -1px; }
.legal-shell .legal-global-search input, .legal-shell .legal-global-search input:focus { min-width: 0; width: 100%; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; font: 400 12px 'Inter',sans-serif; padding: 0 !important; }
.legal-shell .legal-global-search button { flex: 0 0 16px; border: 0 !important; background: transparent !important; color: #7b7e8e !important; padding: 0; box-shadow: none !important; font-size: 13px; }
.legal-global-search [data-global-clear] { font-size: 16px; }
.legal-global-status { position: absolute; left: 34px; right: 28px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #7b7e8e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; background: #fff; }
.legal-global-search.has-message input { color: transparent; }
.legal-header-tools > .dropdown { flex-shrink: 0; }
.legal-new-button,.legal-language-button,.legal-header-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: 50px; border: 1px solid var(--ui-line); background: #fff; color: var(--ui-ink); font-size: 12px; }
.legal-new-button { color: #fff; background: #24252b; border-color: #24252b; white-space: nowrap; }
.legal-new-button .legal-chevron { border-color: #fff; }
.legal-header-icon { width: 36px; padding: 0; font-size: 18px; }
.legal-header-tools .legal-profile-button { max-width: 155px; }
.legal-shell .tm-record-header .tm-title { align-items: flex-start !important; font-size: 24px !important; }
.legal-shell .tm-record-header .tm-title .tm-status-pill { margin-top: 3px; align-self: flex-start; }
.legal-shell .tm-record-header .tm-header-meta { font-size: 15px; }
.legal-shell .tm-compact-file select.tm-country-select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; width: 100%; padding-right: 34px !important; background-position: right 10px center !important; }
.legal-shell .tm-compact-file [data-field="country"] .tm-value,.legal-shell .tm-compact-file [data-field="country_office"] .tm-value,.legal-shell .tm-compact-file [data-field="contracting_organization"] .tm-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.legal-shell .tm-search-page .tm-search-panel .card-header { border-bottom: 0 !important; padding-bottom: 24px !important; }
.legal-shell .tm-search-page .tm-search-heading h5 { font: 600 24px/1.3 'Inter',sans-serif; letter-spacing: normal; text-transform: none; margin-bottom: 8px; }
.legal-shell .tm-search-page .tm-search-heading p { color: var(--ui-muted); font-size: 13px; line-height: 1.5; }
.legal-shell .tm-search-page #tm-advanced-toggle { background: #24252b !important; color: #fff !important; gap: 8px; }
.legal-shell .tm-search-page #tm-advanced-toggle[aria-expanded="true"] { background: #fff !important; color: #24252b !important; border-color: var(--ui-line) !important; }
.tm-advanced-chevron { display: none; font-size: 10px; }
#tm-advanced-toggle[aria-expanded="true"] .tm-advanced-chevron { display: inline; }
.legal-shell .tm-search-page .tm-search-grid { grid-template-columns: .9fr .85fr .65fr 1.15fr 1.35fr; margin-top: 0 !important; }
.legal-shell .tm-search-page .tm-date-ranges-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 22px; }
.legal-shell .tm-search-page .form-label { display: block; }
.tm-range-control { position: relative; }
.legal-shell .tm-search-page .tm-range-control .form-control { padding-right: 32px; font-size: 12px; text-overflow: ellipsis; }
.tm-range-control > button { position: absolute; top: 0; right: 5px; height: 36px; width: 26px; border: 0; background: transparent; color: #7b7e8e; padding: 0; }
.tm-range-dialog { width: min(720px,calc(100vw - 28px)); border: 1px solid var(--ui-line); border-radius: 18px; padding: 20px; background: #fff; color: var(--ui-ink); max-height: calc(100dvh - 32px); overflow-y: auto; }
.tm-range-dialog::backdrop { background: rgba(36,37,43,.25); }
.tm-range-dialog h2 { font: 600 18px 'Inter',sans-serif; letter-spacing: normal; margin: 0; }
.tm-range-heading,.tm-range-footer { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tm-range-heading button,.tm-range-month-nav button { border: 0; background: transparent; font-size: 20px; color: var(--ui-ink); }
.tm-range-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.tm-range-inputs label { font-size: 13px; }
.tm-range-inputs input { display: block; width: 100%; border: 1px solid var(--ui-line); border-radius: 8px; padding: 8px 10px; margin-top: 4px; font-size: 13px; }
.tm-range-help { color: var(--ui-muted); font-size: 12px; margin: 12px 0; }
.tm-range-calendars { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.tm-range-calendars h3 { font: 500 14px 'Inter',sans-serif; letter-spacing: normal; text-align: center; }
.tm-range-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; text-align: center; }
.tm-range-days span { padding: 6px 0; font-size: 11px; color: var(--ui-muted); }
.tm-range-days button { border: 0; border-radius: 6px; background: transparent; color: var(--ui-ink); min-height: 32px; font-size: 12px; padding: 0; }
.tm-range-days button:hover { background: #f0f0f5; }
.tm-range-days .is-endpoint { background: #414958; color: #fff; }
.tm-range-days .is-in-range { background: #eef0f5; }
.tm-range-month-nav { display: flex; justify-content: space-between; }
.tm-range-footer { justify-content: flex-end; margin-top: 20px; }
.tm-range-footer button { background: #fff; border: 1px solid var(--ui-line); color: var(--ui-ink); padding: 7px 12px; font-size: 12px; border-radius: 50px; }
.tm-range-footer [data-apply] { background: #24252b; color: #fff; }
.tm-range-footer [data-clear] { margin-right: auto; }
.tm-range-dialog [data-range-error] { color: #a53636; font-size: 12px; }
@media (max-width: 1100px) {
  .legal-shell .legal-topbar.legal-topbar-global { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .legal-header-tools { width: 100%; }
  .legal-global-search { max-width: none; }
  .legal-shell .tm-search-page .tm-search-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .legal-shell .tm-search-page .tm-date-ranges-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
  .legal-header-tools { display: grid; grid-template-columns: auto auto auto minmax(0,1fr); gap: 6px; }
  .legal-global-search { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .legal-header-tools .legal-profile { grid-column: auto !important; grid-row: auto !important; justify-self: end; }
  .legal-shell .tm-search-page .tm-search-grid,.legal-shell .tm-search-page .tm-date-ranges-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .legal-shell .tm-search-page .tm-search-grid > :last-child { grid-column: 1 / -1; }
  .tm-range-calendars { grid-template-columns: minmax(0,1fr); }
  .tm-range-calendars > section + section { display: none; }
  .tm-range-dialog { padding: 14px; }
}
@media(max-width: 575.98px) {
  .legal-shell .tm-search-page .tm-date-ranges-grid .form-label { min-height: 38px; }
}
/* Search filters and synchronized results controls. */
html:has(.tm-search-page) { scrollbar-gutter: stable; }
.legal-shell .tm-search-page .tm-search-panel { overflow-anchor: none; }
.legal-shell .tm-search-page .tm-search-panel .card-header { padding-bottom: 14px !important; }
.legal-shell .tm-search-page #advancedSearch { padding: 0 !important; }
.legal-shell .tm-search-page #advancedSearch.collapsing { transition: height 240ms ease; overflow: hidden; }
.legal-shell .tm-search-page #advancedSearch .card-body { padding-top: 12px !important; }
.legal-shell .tm-search-page #tm-advanced-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 0; min-width: 88px; padding: 0 18px; outline: 0 !important; box-shadow: none !important; }
.legal-shell .tm-search-page #tm-advanced-toggle:focus-visible { outline: 1px solid #8a909b !important; outline-offset: 2px; }
.legal-shell .tm-search-page .tm-results-panel { overflow-anchor: none; }
.legal-shell .tm-search-page .tm-results-panel .card-header { border-bottom: 0 !important; }
.legal-shell .tm-search-page .tm-results-panel .card-header h5 { font: 600 24px/1.3 'Inter',sans-serif; text-transform: none; letter-spacing: normal; margin-bottom: 8px !important; }
.legal-shell .tm-results-subtitle { font-family: inherit; font-weight: 400; color: var(--ui-muted); font-size: 13px; line-height: 1.5; }
.legal-shell .tm-search-page .tm-results-panel .card-body { padding-top: 0 !important; }
.legal-shell .tm-results-table tbody { background: #fff; }
.legal-shell .tm-results-table .tm-empty-results { text-align: left !important; font-weight: 400; color: var(--ui-muted); }
.tm-results-pagination { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; padding: 16px 32px; color: var(--ui-muted); font-size: 13px; }
.tm-results-pages { display: flex; align-items: center; justify-content: center; gap: 4px; }
.tm-results-pages > * { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 50px; font-size: 12px; }
.tm-results-pages a:hover { background: #f2f2f6; }
.tm-results-pages .is-current { background: #24252b; color: #fff; }
.tm-results-pages .tm-page-disabled { opacity: .4; }
.tm-results-pages .tm-page-gap { min-width: 12px; padding: 0; }
.tm-results-page-size { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 0; color: var(--ui-muted); font-size: 13px; }
.tm-results-page-size select { width: 68px; height: 32px; padding: 4px 10px; border: 1px solid var(--ui-line); border-radius: 50px; background: #fff; color: var(--ui-ink); font: inherit; }
.tm-sections-wide h2 { font-size: 12px; }
.tm-sections-wide a { font-size: 13px; }
.legal-shell .tm-sections-save .tm-btn { font-size: 13px; }
.tm-sections-compact { font-size: 12px; }
.tm-sections-compact select { font-size: 14px; }
@media (max-width: 767.98px) {
  .tm-results-pagination { grid-template-columns: minmax(0,1fr) auto; padding: 14px 20px; gap: 12px; }
  .tm-results-pages { grid-column: 1 / -1; grid-row: 2; }
  .tm-results-page-size { grid-column: 2; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-shell .tm-search-page #advancedSearch.collapsing { transition: none; }
}
.tm-results-page-size select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23646b7d' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }
.legal-shell .tm-search-page .tm-results-panel .card-header { padding-bottom: 12px !important; }
.legal-shell .tm-search-page .tm-results-pagination { padding: 12px 0; }

/* Results personalization: fixed widths, four frozen columns, two-line cells. */
.legal-shell .tm-results-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.legal-shell .tm-results-table th,
.legal-shell .tm-results-table td { position: relative; box-sizing: border-box; text-align: center !important; vertical-align: middle !important; padding: 10px 8px !important; white-space: normal !important; overflow: hidden; }
.legal-shell .tm-results-table thead th { font-family: Inter, sans-serif; font-weight: 600; letter-spacing: normal; text-transform: none !important; background: #f7f7fa; }
.legal-shell .tm-results-table tbody td { background: #fff; font-weight: 400; }
.legal-shell .tm-results-table .tm-frozen-column { position: sticky; z-index: 2; }
.legal-shell .tm-results-table thead .tm-frozen-column { z-index: 3; }
.legal-shell .tm-results-table [data-column="trademark"].tm-frozen-column { border-right: 1px solid #e4e5eb; }
.legal-shell .tm-cell-content { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 20px; max-height: 40px; white-space: normal; }
.legal-shell a.tm-result-reference { color: #065bff !important; text-decoration: none; }
.legal-shell a.tm-result-reference:hover { text-decoration: underline; }
.legal-shell .tm-pencil-link { display: inline-flex; color: #555b68; justify-content: center; align-items: center; }
.legal-shell .tm-results-panel button.tm-column-sort { padding: 0; border: 0; background: transparent !important; color: inherit !important; font: inherit; text-align: center; white-space: normal; line-height: 18px; }
.legal-shell .tm-column-sort:focus-visible { outline: 1px solid #878b98; outline-offset: 2px; }
.legal-shell .tm-column-resize { position: absolute; right: 0; top: 0; width: 7px; height: 100%; cursor: col-resize; touch-action: none; z-index: 4; }
.legal-shell .tm-column-resize:hover, .legal-shell .tm-column-resize:focus-visible { border-right: 2px solid #7b8091; }
.legal-shell .tm-results-table input[type="checkbox"] { appearance: none; -webkit-appearance: none; display: inline-block; float: none; margin: 0; width: 18px; height: 18px; border: 1px solid #cdd0d8 !important; border-radius: 50% !important; background: #fff !important; cursor: pointer; box-shadow: none; vertical-align: middle; }
.legal-shell .tm-results-table input[type="checkbox"]:checked { background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 9 3 3 7-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center/18px !important; border-color: #111 !important; }
.legal-shell .tm-results-table input[type="checkbox"]:checked::after { display: none; }
.legal-shell .tm-results-table input[type="checkbox"]:indeterminate { background: #111 !important; box-shadow: inset 0 0 0 5px #fff; }
.legal-shell .tm-results-table .tm-empty-results { text-align: left !important; }
.tm-column-preferences { margin: 12px 24px; padding: 16px; border: 1px solid #e2e3eb; border-radius: 12px; font-size: 13px; }
.tm-column-preferences[hidden], .tm-results-table [hidden] { display: none !important; }
[data-column-options] { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 20px; margin-bottom: 12px; }
.tm-column-option { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm-column-option label { flex: 1; margin: 0; font-size: 13px; font-weight: 400; }
.tm-column-option input[type="checkbox"] { margin-right: 8px; }
.tm-column-option input[type="number"] { width: 60px; border: 1px solid #d8dae3; border-radius: 5px; }
.tm-column-option button { border: 1px solid #d8dae3; border-radius: 5px; background: white; }
.tm-column-option button:disabled { opacity: .3; }

.legal-shell .tm-results-panel button.tm-column-sort { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; max-height: 36px; width: 100%; }

/* November 12: Results toolbar, sticky headings, and uniform filters. */
.legal-shell .legal-header-tools .dropdown-menu::before, .legal-shell .legal-header-tools .dropdown-menu::after,
.legal-shell .tm-results-tools .dropdown-menu::before, .legal-shell .tm-results-tools .dropdown-menu::after { display: none !important; }
.legal-shell .legal-new-button { background: #fff; color: #24252b; border-color: var(--ui-line); }
.legal-shell .legal-new-button .legal-chevron { border-color: #24252b; }
.legal-shell .legal-global-search { max-width: 500px; }
.legal-shell .legal-profile-button { gap: 7px; padding: 4px 9px 4px 5px; }
.legal-avatar-crop { display: inline-block; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; flex-shrink: 0; }
.legal-avatar-crop img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-frame { display: block; height: 100px; width: 100px; border-radius: 50%; overflow: hidden; margin: 12px 0; }
.account-avatar-frame img { height: 100%; width: 100%; object-fit: cover; }
.legal-shell .tm-search-page .tm-search-grid, .legal-shell .tm-search-page .tm-date-ranges-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.legal-shell .tm-search-page .form-control { height: 36px !important; min-height: 36px !important; }
.legal-shell .tm-search-page .form-label { min-height: 32px; display: flex; align-items: end; }
.legal-shell .tm-table-wrap { max-height: min(65vh, 650px); overflow: auto; isolation: isolate; }
.legal-shell .tm-results-table thead th { position: sticky; top: 0; z-index: 4; font-size: 12px !important; font-weight: 500 !important; }
.legal-shell .tm-results-table thead th.tm-frozen-column { z-index: 5; }
.legal-shell .tm-results-table thead .tm-column-sort { font-weight: 500 !important; }
.legal-shell .tm-results-panel .card-header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.tm-results-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.legal-shell .tm-results-panel .tm-results-tools .btn { height: 36px; min-height: 36px; margin: 0 !important; padding: 0 18px; border-radius: 50px !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.legal-shell .tm-results-panel .tm-results-tools .tm-columns-button { background: #fff !important; color: #343843 !important; border: 1px solid var(--ui-line) !important; min-width: 60px; font-size: 19px; }
.legal-shell .tm-results-panel .tm-results-tools .tm-export-button { background: #111 !important; color: #fff !important; border: 1px solid #111 !important; }
.tm-export-button .legal-chevron { border-color: #fff; }
.legal-shell .tm-results-panel .tm-export-menu .dropdown-item { background: #fff !important; color: #24252b !important; border: 0 !important; box-shadow: none !important; text-align: left; padding: 9px 18px; font-weight: 400; width: 100%; }
.legal-shell .tm-results-panel .tm-export-menu .dropdown-item:hover { background: #f2f2f6 !important; }
.tm-export-status { font-size: 13px; margin: 12px 32px 0; color: #777b8a; }
.tm-template-dialog { width: min(440px,calc(100vw - 32px)); border: 1px solid var(--ui-line); border-radius: 18px; padding: 24px; }
.tm-template-dialog::backdrop { background: #24252b44; }
.tm-template-dialog h2 { font: 600 18px Inter,sans-serif; margin-bottom: 20px; }
.tm-template-dialog p { font-size: 12px; color: #777b8a; margin-top: 12px; }
.tm-template-dialog form > div { display: flex; justify-content: end; gap: 10px; }
.legal-shell .tm-results-pages .tm-page-arrow { font: 400 25px/1 Inter,sans-serif; color: #414653; }
.legal-shell .tm-results-pages .tm-page-disabled.tm-page-arrow { color: #bdc0ca; opacity: 1; }
@media(max-width:991px) { .legal-shell .tm-search-page .tm-search-grid, .legal-shell .tm-search-page .tm-date-ranges-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:575px) { .legal-shell .legal-header-tools { grid-template-columns: auto auto auto; } }

/* November 16: profile, keyboard focus, shared feedback, and Owners. */
.legal-shell [data-sidebar-toggle]:focus,
.legal-shell [data-sidebar-toggle]:focus-visible { outline: 2px solid #b7d2fb !important; outline-offset: 3px; box-shadow: 0 0 0 2px #e9f1ff !important; }
.legal-shell .legal-header-tools .legal-profile-button { width: 36px; height: 36px; min-width: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; gap: 0; }
.legal-shell .legal-header-avatar { width: 36px; height: 36px; }
.legal-avatar-initials { display: grid; place-items: center; width: 100%; height: 100%; background: #9698b9; color: #fff; font-size: 12px; }
.legal-shell .legal-profile-menu { width: 310px; max-width: calc(100vw - 24px); min-width: 0; padding: 16px 10px 10px; margin-top: 10px !important; border-radius: 20px; background: rgba(255,255,255,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.65); box-shadow: 0 18px 45px rgba(0,0,0,.14),0 4px 12px rgba(0,0,0,.06); max-height: calc(100dvh - 80px); overflow-y: auto; }
.legal-profile-summary { display: flex; align-items: center; gap: 12px; padding: 0 6px 12px; }
.legal-profile-summary > div { min-width: 0; }
.legal-profile-summary strong { display: block; font: 600 15px/1.35 Inter,sans-serif; color: #17181c; overflow-wrap: anywhere; }
.legal-profile-summary div > span { display: block; font: 400 12px/1.45 Inter,sans-serif; color: #71727d; overflow-wrap: anywhere; }
.legal-menu-avatar { width: 58px; height: 58px; }
.legal-menu-avatar .legal-avatar-initials { font-size: 19px; }
.legal-profile-divider { height: 0; border: 0; border-top: 1px solid #dedfe6; margin: 0 5px 8px; opacity: 1; }
.legal-shell .dropdown-menu .dropdown-item:not(.active),
.legal-shell .dropdown-menu.tm-export-menu .dropdown-item:not(.active) { background: transparent !important; color: #17181c !important; border: 0 !important; border-radius: 5px !important; box-shadow: none !important; font-family: Inter,sans-serif; text-transform: none; letter-spacing: normal; }
.legal-shell .legal-profile-menu .dropdown-item { display: block; width: 100%; padding: 7px 10px; margin: 0; font-size: 14px; line-height: 20px; text-align: left; }
.legal-shell .dropdown-menu .dropdown-item:not(.active):is(:hover,:focus-visible),
.legal-shell .dropdown-menu.tm-export-menu .dropdown-item:not(.active):is(:hover,:focus-visible) { background: #e9eaf0 !important; color: #17181c !important; outline: none; }
.legal-shell .dropdown-menu form { margin: 0; }
.account-profile-avatar { width: 64px; height: 64px; margin-bottom: 14px; }
.legal-shell #tm-advanced-toggle,
.legal-shell .tm-results-panel .tm-export-button,
.legal-shell .tm-btn { font-family: Inter,sans-serif !important; font-size: 13px !important; letter-spacing: normal; }
.legal-shell a.tm-result-reference:hover,
.legal-shell a.tm-result-reference:focus-visible { color: #065bff !important; text-decoration: none !important; cursor: pointer; }
.legal-shell :is(.btn,.tm-btn,[data-sidebar-toggle],.legal-profile-button,.legal-header-icon,.legal-new-button,.dropdown-item,.tm-date-picker,.tm-column-sort) { transition: translate 140ms ease,scale 140ms ease,background-color 140ms ease,box-shadow 140ms ease; }
.legal-shell :is(.btn,.tm-btn,[data-sidebar-toggle],.legal-profile-button,.legal-header-icon,.legal-new-button,.dropdown-item,.tm-date-picker,.tm-column-sort):not(:disabled):not([aria-disabled="true"]):active { translate: 0 1px; scale: .98; box-shadow: 0 1px 3px rgba(38,39,56,.08) !important; }
.legal-shell :is(.legal-profile-button,.legal-header-icon,.legal-new-button,[data-sidebar-toggle]):hover { box-shadow: 0 3px 9px rgba(38,39,56,.1); }
.legal-shell .owner-page { max-width: 1000px; padding: 24px; margin: 0 auto 32px 0; font-family: Inter,sans-serif; }
.owner-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.legal-shell .owner-heading h1 { font: 600 22px/1.3 Inter,sans-serif; margin: 0; letter-spacing: normal; }
.owner-heading > div { display: flex; gap: 8px; }
.legal-shell .owner-section { border: 1px solid #e3e5ee; background: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.legal-shell .owner-section h2 { font: 600 16px/1.3 Inter,sans-serif; letter-spacing: normal; margin: 0 0 16px; }
.legal-shell .owner-section label { display: block; font-size: 13px; font-weight: 400; color: #353946; margin: 0 0 6px; }
.owner-type { display: flex; align-items: center; gap: 28px; margin: 0 0 16px; padding: 0; border: 0; }
.legal-shell .owner-type legend { float: left; width: auto; font-size: 13px; margin: 0; }
.legal-shell .owner-type label { display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
.owner-type input { accent-color: #2875f4; }
.owner-information-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; }
.owner-information-grid > div { grid-column: span 2; min-width: 0; }
.owner-information-grid > .owner-full { grid-column: 1 / -1; }
.owner-information-grid[data-owner-type="Company"] > .owner-common-field { grid-column: span 3; }
.owner-information-grid [hidden] { display: none !important; }
.owner-address-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.owner-address-row + .owner-address-row { margin-top: 16px; }
.legal-shell .owner-section .form-control { width: 100%; min-height: 36px; padding: 7px 10px; font: 400 14px/1.4 Inter,sans-serif; color: #24252b; background-color: #f7f7fa !important; border: 1px solid #e0e3ef !important; border-radius: 8px !important; box-shadow: none !important; }
.legal-shell .owner-section .form-control:focus { border-color: #a9c7f4 !important; outline: 2px solid #dceaff !important; outline-offset: 0; }
.legal-shell .owner-section textarea.form-control { min-height: 92px; height: auto; resize: vertical; }
.legal-shell .owner-section select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23777c8b' stroke-width='1.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.legal-shell .owner-add-address { margin-top: 10px; padding: 6px 12px; min-height: 32px; }
.owner-contact-grid { display: grid; grid-template-columns: 1.1fr .6fr 1.1fr 1.3fr; gap: 16px; }
.owner-page .tm-date-control { width: 100%; }
.owner-page .tm-date-display { height: 36px; border-radius: 8px; }
@media(max-width:650px) {
  .legal-shell .owner-page { padding: 16px; }
  .owner-information-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .owner-information-grid > div, .owner-information-grid[data-owner-type="Company"] > .owner-common-field { grid-column: span 1; }
  .owner-information-grid > .owner-full { grid-column: 1 / -1; }
  .owner-contact-grid,.owner-address-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:420px) { .owner-contact-grid,.owner-address-row { grid-template-columns: 1fr; } }
@media(prefers-reduced-motion:reduce) {
 .legal-shell :is(.btn,.tm-btn,[data-sidebar-toggle],.legal-profile-button,.legal-header-icon,.legal-new-button,.dropdown-item,.tm-date-picker,.tm-column-sort) { transition: none !important; }
 .legal-shell :is(.btn,.tm-btn,[data-sidebar-toggle],.legal-profile-button,.legal-header-icon,.legal-new-button,.dropdown-item,.tm-date-picker,.tm-column-sort):active { translate: none; scale: none; }
}

.legal-profile-summary strong,.legal-profile-summary div > span { letter-spacing: normal; }
.legal-shell .owner-section .select2-container { width: 100% !important; }
.legal-shell .owner-section .select2-selection--single { height: 36px; background: #f7f7fa; border: 1px solid #e0e3ef; border-radius: 8px; }
.legal-shell .owner-section .select2-selection__rendered { font: 400 14px/34px Inter,sans-serif; color: #24252b; padding-left: 10px; padding-right: 32px; }
.legal-shell .owner-section .select2-selection__arrow { height: 34px; right: 10px; }
.legal-shell .owner-section .select2-selection__arrow b { width: 7px; height: 7px; border: solid #777c8b; border-width: 0 1px 1px 0; transform: rotate(45deg); margin-top: -5px; }
.legal-shell .owner-section .select2-container--focus .select2-selection { border-color: #a9c7f4; outline: 2px solid #dceaff; }

/* November 18: scoped menu proportions, column settings, and Company alignment. */
.legal-shell .legal-new .dropdown-menu { width: 210px; max-width: calc(100vw - 24px); min-width: 0; padding: 8px 10px; box-sizing: border-box; }
.legal-shell .legal-new .dropdown-menu .dropdown-item { display: block; width: 100%; min-height: 34px; box-sizing: border-box; padding: 7px 10px; line-height: 20px; }
.legal-shell .tm-column-preferences > .tm-results-subtitle { margin: 0 0 18px; }
.tm-column-preferences [data-column-options] { grid-template-columns: repeat(4,minmax(0,1fr)); }
.tm-column-preferences-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-column-preferences-footer .btn { margin: 0; }
.tm-column-preferences-footer [hidden] { display: none !important; }
.tm-column-option label { display: flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.tm-column-option input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; min-width: 14px; flex: 0 0 14px; border: 1px solid #c6c9d1; border-radius: 50%; background: #fff; margin: 0; cursor: pointer; }
.tm-column-option input[type="checkbox"]:checked { border-color: #111; background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px; }
.tm-column-option input[type="checkbox"]:disabled { cursor: not-allowed; border-color: #d2d4db; background-color: #d2d4db; }
.tm-column-option input[type="checkbox"]:focus-visible { outline: 2px solid #b7d2fb; outline-offset: 2px; }
.legal-shell .tm-results-table .tm-pencil-link { position: relative; display: flex; align-items: center; justify-content: center; width: 28px; height: 20px; margin: 0 auto; line-height: 1; color: #0d0d0d !important; background: transparent; cursor: pointer; }
.legal-shell .tm-results-table .tm-pencil-link svg { display: block; position: relative; z-index: 1; width: 20px; height: 20px; flex: 0 0 20px; }
.legal-shell .tm-results-table .tm-pencil-link::before { content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%,-50%); border-radius: 50%; background: #f2f2f2; opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
.legal-shell .tm-results-table .tm-pencil-link:hover::before { opacity: 1; }
.legal-shell .owner-page [hidden] { display: none !important; }
.owner-page form[data-owner-type="Company"] .owner-information-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.owner-page form[data-owner-type="Company"] .owner-information-grid > .owner-full { grid-column: span 2; }
.owner-page form[data-owner-type="Company"] .owner-information-grid > .owner-common-field { grid-column: span 1; }
.owner-page form[data-owner-type="Company"] .owner-contact-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.legal-shell .owner-section .owner-country .select2-container { display: block; margin: 0; height: 36px; }
.legal-shell .owner-section .select2-container--default .select2-selection--single { box-sizing: border-box; height: 36px !important; min-height: 36px !important; padding: 0; }
.legal-shell .owner-section .select2-selection__rendered { display: flex; align-items: center; height: 34px; line-height: normal; }
.legal-shell .owner-section .select2-selection__arrow { top: 0; height: 34px; }
.owner-address-row[data-additional-address] { position: relative; padding-top: 34px; }
.legal-shell .owner-remove-address { position: absolute; right: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #0d0d0d; color: #fff; cursor: pointer; transition: background-color 150ms ease; }
.legal-shell .owner-remove-address:hover { background: #303036; }
.legal-shell .legal-topbar.legal-topbar-global.legal-search-frosted { background: rgba(248,249,251,.78) !important; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: visible; }
.legal-search-frosted::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 8px; pointer-events: none; background: linear-gradient(rgba(248,249,251,.25),rgba(248,249,251,0)); }
@media(max-width:1000px) { .tm-column-preferences [data-column-options] { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) {
 .owner-page form[data-owner-type="Company"] .owner-information-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .owner-page form[data-owner-type="Company"] .owner-information-grid > .owner-full { grid-column: 1 / -1; }
 .owner-page form[data-owner-type="Company"] .owner-contact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:420px) { .tm-column-preferences [data-column-options],.owner-page form[data-owner-type="Company"] .owner-contact-grid { grid-template-columns: 1fr; } }
@media(prefers-reduced-transparency:reduce) { .legal-shell .legal-topbar.legal-topbar-global.legal-search-frosted { background: #f8f9fb !important; backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media(prefers-reduced-motion:reduce) { .legal-shell .tm-results-table .tm-pencil-link::before { transition: none; } }
