/*
 * Product Tracking component foundation.
 * Component behavior is retained here. The canonical colours, typography and
 * density are defined in workspace.css, loaded after this stylesheet.
 */
/* ==========================================================================
 * Foundation — base elements and component behaviour (low-priority layer)
 * ========================================================================== */
/* Compatibility styles retain component behavior; the Workspace section owns the visual system. */
@layer components {
  /* Product Tracking: a single, shared enterprise design system. */
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font: 14px/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  }
  button, input, textarea, select {
    font: inherit;
  }
  button, a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
  }
  button:hover {
    background: var(--surface-2);
    border-color: var(--ring);
  }
  button:active {
    background: var(--primary-soft);
  }
  button:disabled {
    cursor: not-allowed;
  }
  button.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  button.text {
    color: var(--primary);
  }
  button.text:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  svg {
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
  }
  h1, h2, h3, p {
    margin: 0;
  }
  h3 {
    font-weight: 600;
  }
  .muted {
    color: var(--muted);
  }
  .small {
    font-size: 12px;
  }
  .hidden {
    display: none !important;
  }
  /* Workspace shell */
  .shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100vh;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    z-index: 20;
  }
  .brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    white-space: nowrap;
  }
  .brand-mark {
    display: grid;
    place-items: center;
  }
  .workspace {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    font-size: 11px;
  }
  .workspace strong {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
  }
  .workspace > svg {
    width: 14px;
    margin-left: auto;
    color: var(--muted);
  }
  .workspace-icon {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 5px;
    color: var(--muted);
    flex-shrink: 0;
  }
  .nav-label {
    font-weight: 600;
    color: var(--muted);
  }
  .nav {
    display: flex;
    flex-direction: column;
  }
  .nav button {
    justify-content: flex-start;
    white-space: nowrap;
  }
  .count-pill {
    margin-left: auto;
    font-size: 10px;
    min-width: 22px;
    text-align: center;
    background: var(--surface-3);
    color: var(--muted);
    padding: 2px 6px;
    border-radius: 5px;
    font-variant-numeric: tabular-nums;
  }
  .sidebar-bottom {
    margin-top: auto;
  }
  .profile {
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
  }
  .profile strong {
    font-size: 12px;
    display: block;
    font-weight: 600;
  }
  .profile .small {
    font-size: 10px;
  }
  .avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
  }
  .main {
    grid-column: 2;
    min-width: 0;
  }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .crumb {
    display: flex;
    align-items: center;
    color: var(--muted);
  }
  .crumb strong {
    color: var(--text);
    font-weight: 500;
  }
  .top-actions {
    display: flex;
    align-items: center;
  }
  .global-search {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
  }
  .global-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: none;
    font-size: 12px;
    min-width: 0;
    color: var(--text);
  }
  .global-search:focus-within {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }
  .global-search input:focus-visible {
    outline: none;
  }
  .key {
    font-size: 10px;
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 4px;
  }
  .top-divider {
    height: 24px;
    width: 1px;
    background: var(--line);
  }
  .bell {
    position: relative;
    border: 0;
  }
  .bell:after {
    content: "";
    position: absolute;
    right: 10px;
    top: 9px;
    width: 5px;
    height: 5px;
    background: var(--warning);
    border: 1px solid var(--surface);
    border-radius: 50%;
  }
  .content {
    margin: auto;
  }
  .page-heading {
    display: flex;
    justify-content: space-between;
  }
  .page-heading p {
    color: var(--muted);
  }
  .heading-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
  }
  .heading-actions button {
    white-space: nowrap;
  }
  .eyebrow {
    font-weight: 600;
    color: var(--muted);
  }
  .date-button {
    font-size: 12px;
  }
  .footer {
    display: flex;
    align-items: center;
    color: var(--muted);
  }
  .footer .status-dot {
    margin-left: auto;
    color: var(--success);
  }
  .mobile-toggle, .sidebar-close, .nav-backdrop {
    display: none;
  }
  .skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 100;
    background: var(--surface);
    color: var(--primary);
    padding: 12px 18px;
    border-radius: 6px;
  }
  .skip-link:focus {
    top: 12px;
  }
  /* Dashboard and summaries */
  .metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .metric {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .metric-icon {
    display: grid;
    place-items: center;
  }
  .metric-number {
    font-variant-numeric: tabular-nums;
  }
  .metric-foot {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
  }
  .metric-foot .positive {
    color: var(--success);
  }
  .notice {
    display: flex;
    align-items: center;
    border: 1px solid var(--warning-line);
    font-size: 12px;
  }
  .notice .strong {
    font-weight: 600;
  }
  .notice button {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--warning);
    padding: 3px 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .notice > svg {
    width: 17px;
    height: 17px;
  }
  .middle-grid, .portfolio-grid {
    display: grid;
  }
  .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    min-width: 0;
  }
  .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .panel-subtitle {
    color: var(--muted);
  }
  .panel-head .text {
    font-size: 12px;
  }
  .tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .tabs button {
    position: relative;
    border: 0;
    background: transparent;
    border-radius: 0;
    white-space: nowrap;
    color: var(--muted);
  }
  .tabs button.active {
    font-weight: 600;
  }
  .tabs button.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
  }
  .number {
    font-size: 10px;
    background: var(--surface-3);
    color: var(--muted);
  }
  .tabs button.active .number {
    color: var(--primary);
  }
  .quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 24px;
  }
  .quick-actions > span {
    color: var(--muted);
    margin-right: 4px;
  }
  .quick-actions button {
    font-size: 12px;
  }
  .quick-actions button svg {
    width: 15px;
    height: 15px;
  }
  .quick-actions .text {
    margin-left: auto;
  }
  .overview-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
  }
  /* Data tables */
  .table-wrap {
    overflow: auto;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
  table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
  }
  th {
    border-bottom: 1px solid var(--line);
  }
  td {
    border-bottom: 1px solid var(--surface-3);
  }
  tr:last-child td {
    border-bottom: 0;
  }
  .click-row {
    cursor: pointer;
  }
  .product-name {
    display: flex;
    align-items: center;
  }
  .product-name strong {
    display: block;
  }
  .product-name small, .table-subline {
    display: block;
    color: var(--muted);
  }
  .picon, .picon.blue, .picon.purple, .picon.amber {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid var(--line);
  }
  .badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  .badge:before {
    content: "";
    height: 4px;
    width: 4px;
    border-radius: 50%;
    background: currentColor;
  }
  .badge.amber {
    border-color: var(--warning-line);
  }
  .badge.red {
    border-color: var(--danger-soft);
  }
  .badge.gray {
    border-color: var(--line);
  }
  .table-footer {
    border-top: 1px solid var(--line);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 11px;
    color: var(--muted);
  }
  .table-footer button {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 4px 0;
  }
  .product-register {
    white-space: normal;
  }
  .product-register td, .product-register th {
    padding: 13px 12px;
  }
  .product-register th {
    line-height: 1.5;
  }
  .product-register td:last-child {
    padding-left: 0;
    padding-right: 8px;
  }
  .product-register td:last-child svg {
    width: 14px;
  }
  .toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  .product-search-row {
    align-items: flex-end;
  }
  .product-search-field {
    flex: 1;
  }
  .product-search-field .field {
    width: 100%;
  }
  .product-filters {
    display: grid;
    border-bottom: 1px solid var(--line);
  }
  .product-filters label {
    font-size: 11px;
    color: var(--muted);
  }
  .product-filters .field {
    font-size: 12px;
    width: 100%;
    min-width: 0;
  }
  .empty {
    text-align: center;
    color: var(--muted);
  }
  .empty svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    color: var(--muted);
  }
  .progress i {
    height: 100%;
    display: block;
    background: var(--primary);
  }
  /* Calendar and history */
  .cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .cal-head strong {
    font-size: 12px;
    font-weight: 500;
  }
  .cal-head button {
    min-height: 28px;
    min-width: 28px;
    border: 0;
    color: var(--muted);
  }
  .cal-head svg {
    width: 14px;
    height: 14px;
  }
  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
  }
  .day-name {
    font-size: 10px;
    color: var(--muted);
    padding: 3px 0 6px;
  }
  .cal-day {
    border: 0;
    font-size: 11px;
    border-radius: 5px;
    position: relative;
    font-weight: 400;
  }
  .cal-day.dim {
    color: var(--muted);
  }
  .cal-day.today {
    background: var(--primary);
    color: var(--surface);
  }
  .cal-day.selected {
    box-shadow: inset 0 0 0 1px var(--primary);
  }
  .cal-day.event:after {
    content: "";
    height: 3px;
    width: 3px;
    position: absolute;
    bottom: 2px;
    left: calc(50% - 1.5px);
    background: var(--warning);
    border-radius: 50%;
  }
  .cal-day.today:after {
    background: var(--surface);
  }
  .cal-legend {
    display: flex;
    gap: 16px;
    font-size: 10px;
    color: var(--muted);
  }
  .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 4px;
  }
  .dot.gold {
    background: var(--warning);
  }
  .calendar-bottom h3 {
    color: var(--muted);
    margin-bottom: 12px;
  }
  .deadline-mini {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .deadline-mini .dot {
    margin-top: 6px;
    flex-shrink: 0;
  }
  .deadline-mini strong {
    display: block;
    font-size: 11px;
    font-weight: 500;
  }
  .deadline-mini p {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.6;
  }
  .cal-selected {
    font-size: 11px;
    line-height: 1.6;
    margin-top: 14px;
    color: var(--primary);
  }
  .activity-item {
    display: flex;
    border-bottom: 1px solid var(--line);
  }
  .activity-item:last-child {
    border: 0;
  }
  .activity-symbol {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--ring);
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .activity-symbol svg {
    height: 14px;
    width: 14px;
  }
  .activity-item strong {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.7;
  }
  .activity-item p {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
  }
  .risk-caption {
    border-top: 1px solid var(--line);
    font-size: 10px;
    color: var(--muted);
  }
  /* Clients and product workspace */
  .client-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .client-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
  }
  .client-card:hover {
    background: var(--surface);
    border-color: var(--ring);
    box-shadow: 0 4px 16px #244e8710;
  }
  .client-avatar {
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 14px;
    font-weight: 600;
  }
  .client-card h2 {
    font-size: 15px;
  }
  .client-card p {
    font-size: 12px;
    color: var(--muted);
    overflow-wrap: anywhere;
  }
  .client-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--primary);
  }
  .client-foot svg {
    width: 14px;
  }
  .back {
    border: 0;
    background: none;
    font-size: 12px;
    color: var(--muted);
    padding: 0;
    min-height: 30px;
    margin-bottom: 12px;
  }
  .detail-header {
    display: flex;
    align-items: center;
  }
  .detail-header .picon {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary-line);
  }
  .detail-header h2 {
    letter-spacing: -0.5px;
  }
  .detail-header p {
    color: var(--muted);
  }
  .product-statuses {
    display: flex;
    margin-left: auto;
    flex-shrink: 0;
  }
  .product-statuses > span > small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
  }
  .detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .detail-meta small {
    display: block;
    color: var(--muted);
  }
  .detail-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .detail-box dl {
    display: grid;
  }
  .detail-box dt {
    color: var(--muted);
  }
  .detail-box dd {
    white-space: pre-wrap;
  }
  .correspondence {
    border-bottom: 1px solid var(--line);
  }
  .correspondence-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .correspondence p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
  }
  .requirement {
    white-space: pre-wrap;
    font-size: 13px;
  }
  .correspondence .requirement {
    background: var(--surface-2);
    border-radius: 6px;
  }
  .file-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .file-item:last-child {
    border: 0;
  }
  .file-item p {
    color: var(--muted);
  }
  .file-item button {
    margin-left: auto;
    font-size: 12px;
  }
  .status-strip {
    font-size: 11px;
    color: var(--muted);
  }
  .status-strip strong {
    color: var(--primary);
    font-weight: 500;
  }
  /* Alerts */
  .alert-cards {
    display: flex;
    flex-direction: column;
  }
  .alert-card {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .alert-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--primary-line);
    border-radius: 7px;
    background: var(--primary-soft);
  }
  .alert-date b {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
  }
  .alert-date small {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 3px;
  }
  .alert-info {
    flex: 1;
    min-width: 0;
  }
  .alert-info h3 {
    font-size: 14px;
  }
  .alert-info p {
    font-size: 11px;
    color: var(--muted);
  }
  .alert-card .detail-controls button {
    font-size: 11px;
  }
  .reminder-feed {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .reminder-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    min-width: 0;
  }
  .reminder-item:hover {
    background: var(--surface-2);
  }
  .reminder-item strong {
    font-weight: 500;
    line-height: 1.6;
  }
  .reminder-item p {
    color: var(--muted);
  }
  .reminder-item .badge {
    margin-left: auto;
    align-self: center;
  }
  .audit-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    border-bottom: 1px solid var(--line);
  }
  .audit-row span {
    font-size: 11px;
    color: var(--muted);
  }
  /* Settings and forms */
  .settings-grid {
    display: grid;
  }
  .settings-nav {
    display: flex;
    flex-direction: column;
  }
  .settings-nav button {
    justify-content: flex-start;
    border: 0;
    background: none;
  }
  .settings-nav button.active {
    font-weight: 600;
  }
  .settings-body > p {
    color: var(--muted);
    margin-top: 6px;
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .full {
    grid-column: 1/-1;
  }
  label {
    display: block;
    font-weight: 500;
  }
  .field {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
  }
  .field:hover {
    border-color: var(--ring);
  }
  input, select, textarea {
    max-width: 100%;
  }
  textarea {
    min-height: 96px;
    resize: vertical;
  }
  .form-help {
    color: var(--muted);
  }
  .check-row {
    display: flex;
    align-items: center;
    font-size: 13px;
  }
  .check-row input, .inline-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
  }
  .check-row label, .inline-check label {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
  }
  .inline-check {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .settings-actions {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
  }
  .info-box {
    font-size: 12px;
  }
  .info-box.warn {
    color: var(--warning);
  }
  .permission-yes {
    color: var(--success);
  }
  .permissions td {
    font-size: 12px;
  }
  .upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--ring);
    background: var(--surface-2);
    text-align: center;
    cursor: pointer;
  }
  .upload-zone:hover {
    background: var(--primary-soft);
  }
  .upload-zone svg {
    color: var(--primary);
  }
  .upload-zone p {
    font-size: 12px;
    color: var(--muted);
  }
  .upload-zone input {
    font-size: 12px;
    max-width: 100%;
    margin-top: 8px;
  }
  .modal-file {
    border: 1px dashed var(--ring);
    border-radius: 6px;
  }
  .modal-file input {
    font-size: 12px;
  }
  .review-tag {
    font-size: 11px;
    color: var(--primary);
  }
  dialog {
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 1px solid var(--line);
    box-shadow: 0 24px 80px #14284c33;
    color: var(--text);
  }
  dialog::backdrop {
    background: #172b4d66;
  }
  .modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  .modal-head p {
    color: var(--muted);
  }
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    position: sticky;
    bottom: 0;
  }
  .modal-error {
    color: var(--red);
    background: var(--danger-soft);
    border: 1px solid var(--danger-soft);
    border-radius: 6px;
    font-size: 12px;
  }
  #toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    max-width: calc(100vw - 32px);
    padding: 14px 20px;
    background: var(--primary-hover);
    color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 8px 30px #172b4d25;
    font-size: 13px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  #toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  /* Responsive layouts */
  @media (min-width: 1600px) {
    .content {
      padding: 36px 44px;
    }
    .topbar {
      padding: 0 44px;
    }
    .middle-grid, .portfolio-grid {
      grid-template-columns: minmax(0, 1fr) 330px;
    }
    .metric {
      padding: 24px;
    }
    .product-register td, .product-register th {
      padding: 16px;
    }
  }
  @media (max-width: 1200px) {

    .sidebar {
      padding-left: 12px;
      padding-right: 12px;
    }
    .brand {
      font-size: 14px;
      gap: 8px;
    }
    .content {
      padding: 26px 24px;
    }
    .topbar {
      padding: 0 24px;
    }
    .middle-grid, .portfolio-grid {
      gap: 16px;
    }
    .metrics {
      gap: 12px;
    }
    .metric {
      padding: 17px;
    }
    .reset-filters {
      grid-column: 1/-1;
      justify-self: end;
      min-height: 28px;
    }
    .page-heading {
      align-items: flex-start;
    }
    .heading-actions {
      flex-wrap: wrap;
      justify-content: flex-end;
      max-width: 340px;
    }
    .detail-header {
      flex-wrap: wrap;
    }
    .product-statuses {
      margin-left: 0;
    }
    .detail-grid {
      grid-template-columns: 1fr;
    }
    .reminder-feed {
      grid-template-columns: 1fr;
    }
    .client-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 1024px) {
    .middle-grid, .portfolio-grid {
      grid-template-columns: 1fr;
    }
    .calendar-panel {
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
    .calendar-panel > .panel-head {
      grid-column: 1/-1;
    }
    .calendar-bottom {
      border-top: 0;
      border-left: 1px solid var(--line);
    }
    .metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-filters {
      grid-template-columns: 1fr 1fr;
    }
    .reset-filters {
      grid-column: auto;
    }
    .global-search {
      width: 210px;
    }
    .page-heading {
      flex-wrap: wrap;
    }
    .heading-actions {
      max-width: none;
      justify-content: flex-start;
    }
    .detail-meta {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .settings-grid {
      grid-template-columns: 145px minmax(0, 1fr);
    }
    .settings-body {
      padding: 22px;
    }
    .alert-card {
      flex-wrap: wrap;
    }
    .alert-card .detail-controls {
      margin-left: auto;
    }
  }
  @media (min-width: 761px) and (max-width: 1100px) {
    .settings-grid {
      grid-template-columns: 1fr;
    }
    .settings-nav {
      flex-direction: row;
      flex-wrap: wrap;
    }
    .settings-nav button {
      white-space: nowrap;
    }
  }
  @media (max-width: 760px) {
    .shell {
      display: block;
    }
    .main {
      width: 100%;
    }
    .sidebar {
      width: 260px;
      visibility: hidden;
      transform: translateX(-100%);
      transition: transform 0.18s, visibility 0.18s;
      height: 100dvh;
      overflow: auto;
      z-index: 40;
      padding: 26px 16px 16px;
    }
    .sidebar.open {
      visibility: visible;
      transform: translateX(0);
      box-shadow: 12px 0 40px #172b4d20;
    }
    .sidebar-close {
      display: inline-flex;
      position: absolute;
      top: 21px;
      right: 10px;
      border: 0;
      background: transparent;
      min-width: 30px;
      padding: 5px;
    }
    .brand {
      padding-right: 22px;
      font-size: 15px;
    }
    .sidebar.open ~ .nav-backdrop {
      display: block;
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100dvh;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: #172b4d55;
      z-index: 30;
    }
    .mobile-toggle {
      display: inline-flex;
    }
    .topbar {
      gap: 12px;
    }
    .workspace-crumb, .global-search, .top-divider, .top-actions > .avatar {
      display: none;
    }
    .top-actions {
      gap: 4px;
    }
    .page-heading {
      display: block;
      margin-bottom: 22px;
    }
    .page-heading h1 {
      font-size: 25px;
    }
    .heading-actions {
      margin-top: 16px;
      gap: 8px;
    }
    .heading-actions button {
      min-height: 44px;
      font-size: 12px;
    }
    .heading-actions .date-button {
      display: none;
    }
    .eyebrow {
      font-size: 9px;
    }
    .notice {
      padding: 12px;
      gap: 8px;
      font-size: 12px;
    }
    .notice > svg {
      margin-top: 3px;
    }
    .notice button {
      font-size: 11px;
      min-height: 28px;
    }
    .metrics {
      margin-bottom: 18px;
    }
    .metric-top {
      align-items: flex-start;
      font-size: 11px;
      min-height: 34px;
      gap: 6px;
    }
    .metric-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      flex-shrink: 0;
    }
    .metric-icon svg {
      width: 16px;
      height: 16px;
    }
    .metric-number {
      margin-top: 6px;
    }
    .metric-foot {
      font-size: 10px;
      gap: 3px;
    }
    .quick-actions {
      gap: 8px;
      margin-bottom: 20px;
    }
    .quick-actions > span {
      font-size: 11px;
    }
    .quick-actions button {
      min-height: 40px;
      font-size: 11px;
    }
    .panel-head {
      gap: 10px;
    }
    .panel-head h2 {
      font-size: 15px;
    }
    .panel-subtitle {
      font-size: 11px;
    }
    .panel-head .text {
      font-size: 11px;
    }
    .panel-head > button {
      font-size: 11px;
      padding: 8px;
      flex-shrink: 0;
    }
    .tabs {
      padding: 0 18px;
    }
    .tabs button {
      min-height: 44px;
      font-size: 12px;
    }
    .table-footer {
      padding: 12px 18px;
      flex-wrap: wrap;
      gap: 4px;
    }
    .calendar-panel {
      display: block;
    }
    .calendar-bottom {
      border-left: 0;
      border-top: 1px solid var(--line);
    }
    .calendar {
      padding: 0 18px 20px;
    }
    .cal-day {
      font-size: 12px;
    }
    .cal-head button {
      min-height: 36px;
      min-width: 36px;
    }
    .client-grid {
      grid-template-columns: 1fr;
    }
    .client-card {
      padding: 22px;
    }
    .toolbar {
      padding: 16px;
    }
    .product-search-field {
      min-width: 0;
    }
    .product-filters {
      padding: 16px;
    }
    .product-filters > div {
      min-width: 0;
    }
    .field, .product-filters .field {
      font-size: 16px;
      min-height: 46px;
      padding: 10px;
    }
    .reset-filters {
      min-height: 40px;
      font-size: 12px;
    }
    .detail-header {
      padding: 20px;
    }
    .detail-header p {
      line-height: 1.7;
    }
    .product-statuses {
      flex-wrap: wrap;
    }
    .detail-meta {
      padding: 0 20px 20px;
    }
    .detail-grid {
      gap: 16px;
    }
    .detail-box {
      padding: 18px;
    }
    .detail-controls {
      gap: 8px;
    }
    .alert-card {
      gap: 12px;
    }
    .alert-card .detail-controls {
      width: 100%;
      justify-content: flex-end;
    }
    .reminder-feed {
      padding: 0 18px 8px;
    }
    .reminder-item > div {
      flex: 1;
      min-width: 160px;
    }
    .settings-nav {
      overflow: auto;
    }
    .settings-nav button {
      font-size: 12px;
      min-height: 44px;
    }
    .form-grid {
      grid-template-columns: 1fr;
    }
    .modal-head, .modal-body {
      padding: 20px;
    }
    .modal-head h2 {
      font-size: 19px;
    }
    .modal-footer {
      padding: 16px 20px;
    }
    .modal-footer button {
      min-height: 44px;
    }
    .footer {
      font-size: 10px;
      margin-top: 22px;
    }
    .file-item {
      flex-wrap: wrap;
    }
    .file-item > div {
      flex: 1;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .file-item button {
      min-height: 44px;
    }
    .audit-row {
      flex-direction: column;
      gap: 6px;
    }
    .correspondence {
      padding: 18px;
    }
    .correspondence-head {
      flex-wrap: wrap;
    }
    .nav button:nth-child(5) {
      margin-top: 22px;
    }
    .profile {
      padding-bottom: 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    * {
      transition: none !important;
      animation: none !important;
      scroll-behavior: auto !important;
    }
  }
  /* Shared controls and connected workflow surfaces */
  .native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    clip-path: inset(50%);
  }
  .smart-select {
    position: relative;
    min-width: 0;
    width: 100%;
  }
  .select-trigger {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    font-weight: 400;
    gap: 10px;
  }
  .select-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .select-trigger svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
  }
  .select-popup {
    position: fixed;
    z-index: 90;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .select-popup[hidden] {
    display: none;
  }
  .select-search {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--text);
  }
  .select-options {
    max-height: 210px;
    overflow: auto;
    margin-top: 6px;
    overscroll-behavior: contain;
  }
  .select-options button {
    display: flex;
    width: 100%;
    border: 0;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    line-height: 1.6;
    white-space: normal;
  }
  .select-options button[aria-selected="true"] {
    color: var(--primary);
    background: var(--primary-soft);
  }
  .select-options button.keyboard-active {
    box-shadow: inset 0 0 0 1px var(--ring);
    background: var(--primary-soft);
  }
  .select-empty {
    font-size: 12px;
    padding: 12px;
    color: var(--muted);
  }
  .product-context {
    background: var(--surface-2);
    border: 1px solid var(--primary-line);
    border-radius: 8px;
  }
  .context-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    margin-bottom: 12px;
  }
  .context-heading > .badge {
    margin-left: auto;
  }
  .product-context dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .product-context dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 3px;
  }
  .product-context dd {
    font-size: 12px;
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .classification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 16px;
  }
  .classification-head strong {
    font-size: 12px;
  }
  .classification-head a {
    font-size: 11px;
    color: var(--primary);
  }
  .classification-head svg {
    width: 12px;
    height: 12px;
  }
  .classification-options {
    margin-top: 16px;
  }
  .classification-options > .form-grid {
    grid-column: 1/-1;
  }
  .field-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 6px;
    line-height: 1.6;
  }
  [aria-invalid="true"] {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 1px #b4231815;
  }
  .modal-error ul {
    margin: 6px 0 0;
    padding-left: 18px;
  }
  .modal-error .text {
    color: var(--red);
    font-weight: 400;
    text-align: left;
    justify-content: flex-start;
    padding: 2px 0;
    min-height: 24px;
    font-size: 12px;
  }
  .operation-status {
    font-size: 11px;
    color: var(--muted);
    margin-right: auto;
    align-self: center;
  }
  .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff66;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
  }
  @keyframes spin {
  to {
    transform: rotate(360deg);
  }
  }
  .table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
  .table-search {
    display: flex;
    align-items: center;
    min-width: 140px;
    flex: 1;
    color: var(--muted);
  }
  .table-search input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--text);
    font-size: 12px;
  }
  .table-search svg {
    width: 16px;
  }
  .table-options {
    display: flex;
    align-items: center;
  }
  .table-options > label {
    display: flex;
    align-items: center;
    margin: 0;
    color: var(--muted);
  }
  .table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
    background: var(--surface);
  }
  .table-pagination > div {
    display: flex;
    align-items: center;
  }
  .table-pagination svg {
    width: 14px;
    height: 14px;
  }
  th button {
    color: inherit;
    white-space: normal;
  }
  th[aria-sort="ascending"] .sort-indicator, th[aria-sort="descending"] .sort-indicator {
    color: var(--primary);
  }
  tr[hidden] {
    display: none;
  }
  .table-empty-row .empty {
    padding: 24px 12px;
  }
  .table-wrap table:not(.product-register) td {
    white-space: normal;
    min-width: 90px;
  }
  .table-wrap table:not(.product-register) td:first-child {
    min-width: 180px;
  }
  .table-wrap td {
    vertical-align: middle;
  }
  .table-wrap .product-name small {
    max-width: 280px;
  }
  .table-wrap table {
    min-width: 520px;
  }
  .panel {
    overflow: visible;
  }
  .modal-body .form-grid > div {
    min-width: 0;
  }
  .form-grid label {
    line-height: 1.5;
  }
  @media (max-width: 760px) {
    .select-search {
      font-size: 16px;
      min-height: 42px;
    }
    .select-options button {
      min-height: 44px;
      font-size: 13px;
    }
    .product-context {
      padding: 14px;
    }
    .product-context dl {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .classification-head {
      flex-wrap: wrap;
    }
    .table-controls {
      padding: 12px 16px;
      gap: 12px;
    }
    .table-search input {
      font-size: 16px;
      min-height: 44px;
    }
    .table-options {
      justify-content: space-between;
      width: 100%;
    }
    .table-options > label {
      min-width: 0;
      flex: 1;
    }
    .table-options .smart-select {
      flex: 1;
      min-width: 0;
    }
    .table-options .field {
      min-height: 44px;
      font-size: 13px;
    }
    .table-pagination {
      padding: 12px 16px;
    }
    .table-pagination button {
      min-height: 40px;
      min-width: 40px;
    }
    .operation-status {
      display: none;
    }
    .context-heading {
      flex-wrap: wrap;
    }
    .product-context .badge {
      margin-left: 0;
    }
    .form-grid.classification-options {
      gap: 20px;
    }
    .panel-head h2 {
      line-height: 1.5;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .spinner {
      animation: none;
      border: 2px solid currentColor;
    }
  }
  .collection-controls {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
  }
  .collection-empty {
    grid-column: 1/-1;
  }
  .client-grid + .table-pagination, .alert-cards + .table-pagination {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 18px;
  }
  /* Output folder review */
  .folder-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .folder-path {
    overflow-wrap: anywhere;
    max-width: 680px;
    color: var(--text);
  }
  .folder-conflict {
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .folder-conflict p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .folder-source {
    max-height: 320px;
    overflow: auto;
    background: var(--bg);
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  [data-folder-reference] {
    display: flex;
    text-align: left;
    margin: 6px 0;
    max-width: 320px;
    overflow-wrap: anywhere;
  }
  /* Shared workspace density: compact desktop rows, consistent panel edges. */
  .sidebar {
    padding-top: 18px;
  }
  .brand {
    padding-bottom: 18px;
  }
  .metrics, .middle-grid, .portfolio-grid, .client-grid {
    gap: 16px;
  }
  .tabs {
    padding-left: 16px;
    padding-right: 16px;
  }
  .tabs button {
    padding-bottom: 10px;
  }
  .toolbar, .product-filters {
    padding: 12px 16px;
    gap: 12px;
  }
  td {
    vertical-align: middle;
  }
  .workspace-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .workspace-actions .back {
    min-height: 36px;
  }
  .workspace-actions .heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .detail-header .picon svg {
    width: 20px;
    height: 20px;
  }
  .detail-header h2 {
    font-size: 20px;
  }
  .detail-box {
    border-radius: 0;
  }
  .detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .detail-section-head .detail-controls {
    gap: 8px;
  }
  .requirement {
    line-height: 1.6;
  }
  .notes-heading {
    margin-top: 16px;
  }
  .alert-cards {
    gap: 8px;
  }
  .alert-card {
    padding: 12px 16px;
    gap: 12px;
  }
  .alert-date {
    width: 44px;
    height: 48px;
  }
  .alert-info h3 {
    margin-bottom: 3px;
  }
  .alert-info p {
    line-height: 1.5;
  }
  .client-card {
    padding: 16px;
  }
  .client-avatar {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
  }
  .client-card h2 {
    margin-bottom: 4px;
  }
  .client-card p {
    line-height: 1.6;
  }
  .client-foot {
    padding-top: 12px;
    margin-top: 12px;
  }
  .audit-row {
    gap: 12px;
  }
  .settings-body > p {
    margin-bottom: 16px;
  }
  .form-grid {
    gap: 14px 16px;
  }
  .field {
    min-height: 38px;
    padding: 8px 10px;
  }
  .folder-conflict .detail-grid {
    padding: 8px 0;
  }
  .path-picker {
    display: flex;
    gap: 8px;
    align-items: stretch;
  }
  .path-picker input {
    flex: 1;
    min-width: 0;
  }
  .path-picker button {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .picker-status {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
  }
  @media (min-width: 761px) {
    .detail-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 1024px) {

    .detail-grid {
      grid-template-columns: 1fr;
    }
    .detail-box + .detail-box {
      border-left: 0;
      padding-left: 0;
      border-top: 1px solid var(--line);
      padding-top: 16px;
    }
  }
  @media (max-width: 760px) {
    .content {
      padding-top: 16px;
      padding-bottom: 16px;
    }
    .nav button, .tabs button, .detail-controls button, .path-picker button {
      min-height: 44px;
    }
    .field {
      min-height: 44px;
      font-size: 16px;
    }
    .workspace-actions {
      gap: 8px;
    }
    .detail-header {
      gap: 10px;
    }
    .detail-header h2 {
      font-size: 18px;
    }
    .detail-grid {
      padding: 14px;
    }
    .folder-summary {
      margin: 0 14px 12px;
      padding: 14px;
    }
    .table-controls, .table-pagination {
      flex-wrap: wrap;
    }
    .form-grid {
      gap: 14px;
    }
    .alert-card {
      padding: 12px;
    }
    .alert-info {
      min-width: 0;
      flex-basis: calc(100% - 60px);
    }
  }
  .detail-header h1 {
    font-size: 20px;
    letter-spacing: -0.3px;
  }
  @media (max-width: 760px) {
    .detail-section-head {
      min-height: 44px;
    }
  }
  .submission-table {
    table-layout: fixed;
  }
  .submission-table td {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .submission-table .badge {
    white-space: nowrap;
  }
  /* Readable data text retains the compact row spacing. */
  td, .product-name strong, .detail-meta strong, .detail-box dl {
    font-size: 13px;
  }
  .product-name small,
  .table-subline,
  .table-options > label,
  .table-pagination,
  .table-footer,
  .form-help,
  .alert-info p,
  .reminder-item p {
    font-size: 12px;
  }
  .detail-meta small, .footer {
    font-size: 11px;
  }
  /* Submission filters share table edges and preserve compact rows. */
  .submission-filters {
    border-bottom: 1px solid var(--line);
  }
  .submission-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
  }
  .submission-filter-grid {
    display: grid;
  }
  .submission-filter-grid > div {
    min-width: 0;
  }
  .submission-filter-grid label {
    font-size: 12px;
  }
  .submission-filter-grid .field {
    font-size: 12px;
    min-height: 36px;
  }
  .filter-error {
    color: var(--red);
    font-size: 12px;
    margin: 10px 0 0;
  }
  @media (max-width: 1100px) {
    .submission-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 760px) {
    .submission-filters {
      padding: 12px 14px;
    }
    .submission-filter-grid {
      grid-template-columns: 1fr;
    }
    .submission-filter-grid .field {
      min-height: 44px;
      font-size: 16px;
    }
  }
  /* Compact, aligned controls for daily regulatory work. */
  .product-filters {
    align-items: end;
  }
  .product-filters label, .submission-filter-grid label, .product-search-field label {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .product-filters .field,
  .submission-filters .field,
  .table-controls .field,
  .product-search-row .field {
    min-height: 32px;
    height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }
  .product-search-row {
    padding: 10px 14px;
    gap: 8px;
  }
  .table-controls {
    padding: 8px 14px;
    gap: 8px;
  }
  .table-controls input[type="search"] {
    max-width: 280px;
    min-height: 32px;
    height: 32px;
    padding: 5px 8px;
  }
  .record-menu-trigger {
    line-height: 1;
    flex-shrink: 0;
    letter-spacing: 1px;
  }
  .record-menu-popover {
    z-index: 1200;
    width: 144px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 4px;
    display: grid;
    gap: 2px;
  }
  .record-menu-popover button {
    border: 0;
    text-align: left;
    justify-content: flex-start;
    padding: 8px 10px;
    min-height: 34px;
    background: var(--surface);
    border-radius: 3px;
  }
  .record-menu-popover button:hover, .record-menu-popover button:focus-visible {
    background: var(--surface-3);
  }
  .record-menu-popover .danger {
    color: var(--danger);
  }
  .record-view-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
  }
  .record-facts {
    display: grid;
    grid-template-columns: minmax(130px, 35%) 1fr;
    margin: 0 0 18px;
  }
  .record-facts dt {
    color: var(--muted);
    font-size: 12px;
  }
  .record-facts dd {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .holder-section {
    border-top: 1px solid var(--line);
  }
  .holder-section .detail-section-head {
    gap: 12px;
  }
  .client-card {
    position: relative;
    cursor: pointer;
  }
  .client-card > .record-menu-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  .table-subline {
    line-height: 1.5;
  }
  .submission-table td:last-child {
    width: 42px;
  }
  .record-view-head .record-menu-trigger {
    border: 1px solid var(--line);
  }
  @media (max-width: 1000px) {
    .product-filters {
      grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
    .submission-filter-grid {
      grid-template-columns: repeat(3, minmax(110px, 1fr));
    }
  }
  @media (max-width: 640px) {
    .product-filters, .submission-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-filters .field,
    .submission-filters .field,
    .table-controls .field,
    .product-search-row .field,
    .table-controls input[type="search"] {
      min-height: 44px;
      height: 44px;
      font-size: 16px;
    }
    .record-menu-trigger {
      min-width: 44px;
      min-height: 44px;
    }
    .record-facts {
      grid-template-columns: 1fr;
      gap: 4px;
    }
    .record-facts dd {
      margin-bottom: 10px;
    }
    .holder-section .detail-section-head {
      flex-wrap: wrap;
    }
  }
  .record-menu-trigger {
    padding: 4px !important;
  }
  .record-menu-trigger:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
  /* Reserve space for row actions within the existing table width. */
  /* One restrained visual language for registers, forms and settings. */
  .application-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
  }
  .application-facts dt {
    color: var(--muted);
  }
  .application-facts dd {
    margin: 0;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .application-facts dd small {
    display: block;
    color: var(--muted);
    font-weight: 400;
  }
  .inline-notes {
    line-height: 1.6;
    font-size: 13px;
  }
  .holder-section {
    margin-top: 0;
    padding-top: 14px;
  }
  .holder-register th:first-child {
    width: 21%;
  }
  .holder-register td {
    vertical-align: top;
  }
  .row-actions {
    white-space: nowrap;
  }
  .manufacturing-section table {
    min-width: 1000px;
  }
  .manufacturing-section td:first-child {
    max-width: 320px;
    overflow-wrap: anywhere;
  }
  .manufacturing-section td {
    vertical-align: top;
  }
  .holder-section .detail-section-head {
    align-items: center;
  }
  .holder-section .detail-section-head h3 {
    margin: 0;
  }
  .holder-section .form-help {
    margin-bottom: 10px;
  }
  .ownership-form-section {
    border: 1px solid var(--line);
    border-radius: 6px;
  }
  .section-caption h3 {
    font-size: 14px;
    margin: 0 0 4px;
  }
  .section-caption p {
    font-size: 12px;
    color: var(--muted);
  }
  .ownership-form-section .form-grid {
    gap: 12px;
  }
  .settings-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .connection-chip {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
    white-space: nowrap;
  }
  .connection-chip.connected {
    border-color: var(--success);
    background: var(--success-soft);
    color: var(--success);
  }
  .settings-section {
    border-top: 1px solid var(--line);
  }
  .settings-section .form-grid {
    gap: 12px 16px;
  }
  .settings-section label {
    font-size: 12px;
  }
  .smtp-fields .field {
    min-height: 36px;
  }
  .template-tokens {
    display: flex;
    flex-wrap: wrap;
  }
  .template-tokens button {
    font-family: ui-monospace, monospace;
    border-radius: 4px;
    background: var(--surface-3);
    color: var(--primary);
  }
  .email-preview {
    border: 1px solid var(--line);
  }
  .email-preview h4 {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
  }
  .email-preview strong {
    font-size: 13px;
  }
  .email-preview pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 13px/1.7 inherit;
    margin: 10px 0 0;
  }
  .inline-test {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px;
  }
  .inline-test > div {
    flex: 1;
    min-width: 200px;
  }
  .delivery-error {
    display: block;
    max-width: 500px;
    color: var(--red);
    font-size: 12px;
    margin-top: 4px;
  }
  .settings-body .settings-section .info-box {
    margin: 0;
  }
  .email-log td {
    vertical-align: top;
  }
  .client-register td {
    vertical-align: top;
  }
  .alerts-register .table-wrap {
    margin: 0;
  }
  .alerts-register .row-actions .icon {
    min-width: 30px;
    min-height: 30px;
    padding: 5px;
  }
  .alerts-register td:first-child {
    width: 58%;
  }
  .settings-grid .panel {
    min-width: 0;
  }
  [hidden] {
    display: none !important;
  }
  @media (max-width: 1000px) {
    .settings-title {
      flex-wrap: wrap;
    }
  }
  @media (max-width: 640px) {
    .application-facts {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .holder-section .detail-section-head {
      align-items: flex-start;
    }
    .holder-section .detail-controls {
      flex-wrap: wrap;
    }
    .settings-section .field {
      font-size: 16px;
      min-height: 44px;
    }
    .template-tokens button {
      min-height: 36px;
    }
    .inline-test button {
      min-height: 44px;
    }
    .row-actions .text {
      min-height: 44px;
      padding: 8px;
    }
    .settings-title p {
      line-height: 1.6;
    }
  }
  .channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  .channel-row strong {
    font-size: 13px;
  }
  .channel-row p {
    color: var(--muted);
  }
  .channel-row .check-row {
    margin: 0;
    white-space: nowrap;
  }
  .settings-section .email-preview p {
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
  }
  .settings-section input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  .holder-register {
    table-layout: fixed;
  }
  .holder-register td {
    overflow-wrap: anywhere;
  }
  .holder-register .row-actions {
    gap: 4px;
  }
}
@layer components {
/* ==========================================================================
 * Workspace — layout, navigation, tables, forms and dialogs
 * ========================================================================== */
/*
 * Product Tracking workspace visual system.
 * Legacy component rules remain in the components layer; workspace.css owns presentation.
 * Current dimensions and responsive rules are defined in workspace.css.
 */

body {
  line-height: 1.45;
}
h1 {
  line-height: 1.25;
}
h2 {
  letter-spacing: -.2px;
}
h3 {
  font-size: 13px;
}
button {
  min-height: 34px;
  padding: 6px 10px;
  gap: 6px;
  font-size: 12px;
  border-radius: 4px;
  box-shadow: none;
}
button.primary {
  box-shadow: none;
}
button.icon {
  min-height: 32px;
  min-width: 32px;
  padding: 6px;
}
button.text {
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
button:disabled {
  opacity: .45;
}
svg {
  width: 16px;
  height: 16px;
}
.sidebar {
  padding: 16px 10px 12px;
}
.brand {
  padding: 0 6px 16px;
  gap: 8px;
  font-size: 15px;
  letter-spacing: -.4px;
}
.brand-mark {
  width: 29px;
  height: 29px;
}
.brand-mark svg {
  width: 21px;
  height: 21px;
}
.workspace {
  padding: 9px;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--surface-3);
  border-radius: 5px;
}
.workspace strong {
  font-size: 12px;
  line-height: 1.4;
}
.workspace-icon {
  width: 28px;
  height: 30px;
}
.nav-label {
  margin: 0 10px 7px;
  font-size: 10px;
  letter-spacing: .8px;
}
.nav {
  gap: 3px;
}
.nav button {
  min-height: 36px;
  padding: 8px 10px;
  gap: 9px;
  font-size: 12px;
  border-radius: 4px;
}
.nav button:nth-child(5) {
  margin-top: 16px;
}
.profile {
  padding: 12px 4px 0;
  gap: 8px;
}
.avatar {
  width: 29px;
  height: 29px;
}
.topbar {
  height: 50px;
  padding: 0 var(--page-gutter);
  gap: 16px;
}
.crumb {
  gap: 8px;
  font-size: 12px;
}
.top-actions {
  gap: 10px;
}
.global-search {
  padding: 6px 9px;
  width: 245px;
  background: var(--surface-2);
}
.content {
  padding: 16px var(--page-gutter);
  max-width: 1920px;
}
.page-heading {
  margin-bottom: 12px;
  gap: 12px;
  align-items: center;
}
.page-heading p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}
.heading-actions {
  gap: 6px;
}
.eyebrow {
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: .7px;
}
.footer {
  margin-top: 14px;
  padding-top: 0;
  font-size: 10px;
  gap: 6px;
  line-height: 1.4;
}
.panel {
  border-radius: var(--radius);
  box-shadow: none;
}
.panel > .panel-head:first-child, .panel > .toolbar:first-child {
  border-radius: 6px 6px 0 0;
}
.panel-head {
  padding: 10px 12px;
  gap: 10px;
  min-height: 48px;
}
.panel-head h2 {
  font-size: 15px;
}
.panel-subtitle {
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.4;
}
.tabs {
  padding: 0 12px;
  gap: 18px;
}
.tabs button {
  min-height: 35px;
  padding: 7px 0 9px;
  font-size: 12px;
}
.number {
  padding: 1px 5px;
  border-radius: 3px;
}
.tabs button.active .number {
  background: var(--line);
}
.metrics {
  gap: 10px;
  margin-bottom: 12px;
}
.metric {
  padding: 12px;
  border-radius: 6px;
}
.metric-icon {
  width: 27px;
  height: 27px;
}
.metric-number {
  line-height: 1.1;
  margin-top: 3px;
  letter-spacing: -.7px;
}
.metric-foot {
  margin-top: 5px;
  line-height: 1.4;
}
.notice {
  padding: 8px 12px;
  margin-bottom: 12px;
  gap: 8px;
  border-radius: 5px;
}
.notice button {
  min-height: 28px;
}
.quick-actions {
  gap: 6px;
  margin-bottom: 12px;
}
.quick-actions > span {
  font-size: 10px;
  letter-spacing: .4px;
}
.quick-actions button {
  min-height: 30px;
  padding: 5px 9px;
}
.middle-grid, .portfolio-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}
.calendar {
  padding: 0 12px 12px;
}
.cal-head {
  padding-bottom: 6px;
}
.cal-grid {
  gap: 2px;
}
.cal-day {
  height: 27px;
  min-height: 27px;
  padding: 0;
}
.cal-head button {
  padding: 4px;
}
.cal-legend {
  margin-top: 8px;
}
.calendar-bottom {
  padding: 10px 12px;
  background: var(--surface-2);
}
.calendar-bottom h3 {
  font-size: 10px;
  letter-spacing: .6px;
}
.deadline-mini {
  margin-top: 9px;
}
.activity-list {
  padding: 0 12px;
}
.activity-item {
  padding: 10px 0;
  gap: 8px;
}
.risk-caption {
  padding: 8px 12px;
}
/* Registers: restrained headers, legible data and consistent edges. */
.table-wrap {
  border-radius: 0 0 6px 6px;
  overscroll-behavior-x: contain;
}
table {
  font-variant-numeric: tabular-nums;
}
th {
  padding: 7px 10px;
  background: var(--surface-3);
  line-height: 1.4;
  vertical-align: middle;
}
td {
  padding: 8px 10px;
  line-height: 1.45;
  border-bottom-color: var(--line);
}
th button {
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  gap: 4px;
  overflow-wrap: normal;
  justify-content: flex-start;
  text-align: left;
}
.sort-indicator {
  font-size: 11px;
  color: var(--muted);
}
.click-row:hover td {
  background: var(--surface-3);
}
.click-row:focus-visible {
  outline-offset: -2px;
}
.product-register {
  table-layout: fixed;
  min-width: 1130px;
}
.product-register th, .product-register td {
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.product-register .product-name strong {
  max-width: none;
  min-width: 0;
}
.product-register th {
  white-space: normal;
}
.product-filters .reset-filters {
  grid-column: auto;
}
.product-register th {
  font-size: 10px;
  overflow-wrap: normal;
}
.product-name strong {
  font-size: 12px;
  line-height: 1.45;
}
.product-name small, .table-subline {
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.4;
}
.picon, .picon.blue, .picon.purple, .picon.amber {
  width: 28px;
  height: 30px;
  border-radius: 4px;
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--muted);
}
.picon svg {
  width: 16px;
  height: 16px;
}
.badge.blue {
  border-color: var(--line);
}
.table-controls, .toolbar {
  padding: 8px 12px;
  gap: 8px;
}
.table-search {
  max-width: 270px;
  gap: 6px;
}
.table-search input {
  min-height: 32px;
  height: 32px;
  padding: 5px 8px;
  background: var(--surface);
}
.table-options {
  gap: 10px;
}
.table-options > label {
  gap: 6px;
  font-size: 11px;
}
.table-options .smart-select {
  min-width: 64px;
  max-width: 150px;
}
.table-options .field {
  min-height: 30px;
  height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}
.table-pagination, .table-footer {
  padding: 7px 12px;
  min-height: 40px;
  gap: 8px;
  font-size: 11px;
}
.table-pagination > div {
  gap: 8px;
}
.table-pagination button {
  min-width: 28px;
  min-height: 28px;
  padding: 4px;
}
.table-footer button {
  min-height: 26px;
  font-size: 11px;
}
.toolbar.product-search-row {
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
}
.product-search-field {
  max-width: 350px;
  min-width: 180px;
}
.product-search-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.product-search-field .field {
  padding-left: 10px;
}
.register-summary {
  margin-left: auto;
  white-space: nowrap;
}
.product-filters {
  grid-template-columns: repeat(5, minmax(100px, 1fr)) auto;
  padding: 8px 12px;
  gap: 8px;
  background: var(--surface-2);
}
.product-filters > div {
  min-width: 0;
}
.product-filters label, .submission-filter-grid label {
  font-size: 11px;
  margin-bottom: 3px;
  color: var(--muted);
}
.product-filters .field, .product-search-row .field, .submission-filters .field {
  min-height: 30px;
  height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}
.reset-filters {
  min-height: 30px;
  font-size: 11px;
}
.submission-filters {
  padding: 7px 12px 9px;
  background: var(--surface-2);
}
.submission-filter-heading {
  margin-bottom: 4px;
  min-height: 24px;
}
.submission-filter-heading strong {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.submission-filter-heading button {
  min-height: 24px;
  font-size: 11px;
}
.submission-filter-grid {
  grid-template-columns: 1.2fr 1.2fr 1.2fr 1fr 1fr;
  gap: 8px;
}
.cell-secondary {
  margin-top: 2px;
}
.record-menu-trigger {
  min-width: 28px;
  min-height: 28px;
  font-size: 20px;
  border-color: transparent;
}
.row-actions .text {
  min-height: 28px;
  padding: 4px;
  font-size: 11px;
}
.record-menu-popover {
  border-radius: 5px;
  box-shadow: 0 6px 24px #20324726;
}
.record-menu-popover button {
  font-size: 12px;
}
/* Product and client workspaces use a compact identity header and row registers. */
.workspace-actions {
  margin-bottom: 8px;
  gap: 8px;
}
.workspace-actions .back, .back {
  min-height: 30px;
  margin-bottom: 8px;
  font-size: 12px;
}
.workspace-actions .back {
  margin: 0;
}
.detail-header {
  padding: 12px;
  gap: 10px;
}
.detail-header .picon {
  width: 34px;
  height: 36px;
  border-radius: 5px;
}
.detail-header h1, .detail-header h2 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.4px;
}
.detail-header p {
  margin-top: 3px;
  font-size: 12px;
}
.product-statuses {
  gap: 14px;
}
.product-statuses small {
  font-size: 9px;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.detail-meta {
  padding: 0 12px 10px;
  gap: 12px;
}
.detail-meta small {
  font-size: 10px;
  margin-bottom: 2px;
}
.detail-meta strong {
  font-size: 12px;
  font-weight: 500;
}
.detail-body {
  margin-top: 10px;
}
.detail-grid {
  padding: 12px;
  gap: 16px;
  align-items: start;
}
.detail-box {
  padding: 0;
  border: 0;
  min-width: 0;
}
.detail-box + .detail-box {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.detail-box h3 {
  margin-bottom: 8px;
}
.detail-box dl {
  margin: 0;
  gap: 7px 10px;
  grid-template-columns: 125px minmax(0, 1fr);
  font-size: 12px;
}
.detail-box dd {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.application-facts {
  padding: 0 12px 12px;
  gap: 12px 20px;
}
.application-facts dt {
  font-size: 11px;
  margin-bottom: 3px;
}
.application-facts dd {
  font-size: 12px;
}
.application-facts dd small {
  font-size: 11px;
  margin-top: 2px;
}
.inline-notes {
  padding: 0 12px 12px;
}
.holder-section {
  padding: 10px 12px 0;
  margin: 0;
}
.holder-section .table-wrap {
  margin: 0 -12px;
}
.holder-section td {
  padding: 8px 10px;
}
.detail-section-head {
  min-height: 34px;
  margin-bottom: 8px;
  gap: 10px;
}
.detail-section-head h3 {
  margin: 0;
}
.holder-section .form-help {
  margin: 3px 0 0;
  max-width: none;
  font-size: 11px;
}
.holder-section .detail-controls {
  gap: 6px;
}
.holder-register {
  min-width: 1000px;
}
.manufacturing-section td {
  line-height: 1.45;
}
.correspondence {
  padding: 12px;
}
.correspondence .requirement {
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 12px;
  line-height: 1.6;
}
.file-list {
  padding: 0 12px;
}
.file-item {
  padding: 10px 0;
  gap: 8px;
}
.file-item strong {
  font-size: 12px;
}
.file-item p {
  font-size: 11px;
  margin-top: 2px;
}
.reminder-feed {
  padding: 0 12px;
  gap: 0 16px;
}
.reminder-item {
  padding: 8px 0;
  gap: 8px;
}
.reminder-item strong {
  font-size: 12px;
}
.reminder-item p {
  font-size: 11px;
  margin-top: 2px;
}
.reminder-icon {
  width: 28px;
  height: 28px;
}
.audit-row {
  padding: 8px 12px;
}
.empty {
  padding: 24px 12px;
  font-size: 12px;
  line-height: 1.6;
}
/* Forms and settings share one field scale and one section rhythm. */
.settings-grid {
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.settings-grid > .panel {
  max-width: none;
}
.settings-nav {
  gap: 3px;
}
.settings-nav button {
  padding: 8px 10px;
  min-height: 36px;
  font-size: 12px;
}
.settings-nav button.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.settings-body {
  padding: 16px;
  max-width: none;
}
.settings-body > p {
  margin: 4px 0 14px;
  font-size: 12px;
  line-height: 1.5;
}
.settings-title h2 {
  margin-bottom: 3px;
}
.settings-title p {
  font-size: 12px;
  line-height: 1.5;
}
.settings-section {
  margin-top: 14px;
  padding-top: 12px;
}
.settings-section h3 {
  margin-bottom: 8px;
}
.settings-section .form-grid, .form-grid {
  gap: 12px;
}
.settings-actions {
  margin-top: 14px;
  padding-top: 12px;
  gap: 6px;
}
.section-description {
  margin: 6px 0 10px;
  line-height: 1.5;
}
label {
  font-size: 12px;
  margin-bottom: 4px;
}
.field, .smtp-fields .field {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
  border-radius: 4px;
  background: var(--surface);
  border-color: var(--line-strong);
}
.field:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
textarea.field {
  min-height: 80px;
  height: auto;
  line-height: 1.5;
}
.form-help {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}
.check-row {
  gap: 8px;
  margin-bottom: 8px;
  min-height: 26px;
}
.check-row label {
  font-size: 12px;
}
.info-box {
  margin: 10px 0;
  padding: 9px 10px;
  border-color: var(--line);
  line-height: 1.5;
  border-radius: 4px;
}
.ownership-form-section {
  padding: 10px;
  background: var(--surface-2);
}
.section-caption p {
  margin: 3px 0 10px;
  line-height: 1.5;
}
.product-context {
  padding: 10px;
}
.product-context dl {
  gap: 10px;
}
.classification-head {
  gap: 8px;
  margin-bottom: 8px;
}
.connection-chip {
  padding: 4px 7px;
  font-size: 11px;
}
.channel-row {
  padding: 10px 0;
  gap: 12px;
}
.channel-row p {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.5;
}
.email-preview {
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--surface-2);
}
.email-preview pre {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
}
.template-tokens {
  gap: 4px;
}
.template-tokens button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 11px;
}
.inline-test {
  margin-bottom: 10px;
}
.inline-test button {
  min-height: 34px;
}
.select-popup {
  padding: 6px;
  border-radius: 5px;
  box-shadow: 0 6px 24px #20324726;
}
.select-search {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}
.select-options button {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 3px;
}
.upload-zone {
  padding: 18px 16px;
  min-height: 120px;
  gap: 8px;
  border-radius: 5px;
}
.upload-zone svg {
  width: 24px;
  height: 24px;
}
.modal-file {
  padding: 10px;
  background: var(--surface-2);
}
dialog {
  width: 780px;
  border-radius: 7px;
  max-height: 92dvh;
}
.modal-head {
  padding: 12px 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.modal-head h2 {
  font-size: 17px;
  letter-spacing: -.3px;
}
.modal-head p {
  margin-top: 3px;
  line-height: 1.45;
  font-size: 12px;
}
.modal-body {
  padding: 14px 16px;
}
.modal-footer {
  padding: 10px 16px;
  gap: 6px;
  background: var(--surface-3);
  z-index: 2;
}
.modal-error {
  margin-bottom: 10px;
  padding: 9px 10px;
}
.record-facts {
  gap: 8px 14px;
  margin-bottom: 12px;
}
.record-facts dd {
  font-size: 13px;
}
.folder-summary {
  margin: 0 12px 10px;
  padding: 12px;
  gap: 12px;
  background: var(--surface-2);
}
.folder-summary h3 {
  font-size: 14px;
  margin: 3px 0;
}
.folder-summary p {
  margin: 3px 0;
  line-height: 1.5;
}
.folder-help {
  padding: 10px 12px;
  line-height: 1.5;
}
.folder-conflict {
  padding: 10px;
  margin-bottom: 10px;
}
.detail-body .info-box {
  margin-left: 12px;
  margin-right: 12px;
}
.folder-source {
  padding: 12px;
}
@media (min-width: 1100px) {
  .smtp-fields, .settings-section .delivery-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .email-template-grid > :nth-child(1),
  .email-template-grid > :nth-child(2),
  .email-template-grid > :nth-child(3),
  .email-template-grid > :nth-child(5) {
    grid-column: 1;
  }
  .email-template-grid > .email-preview {
    grid-column: 2;
    grid-row: 1 / 5;
    align-self: start;
  }
  .email-template-grid textarea {
    min-height: 160px;
  }
}
@media (max-width: 1200px) {
  .product-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .submission-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-filters .reset-filters {
    justify-self: start;
  }
  .middle-grid, .portfolio-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}
@media (max-width: 1000px) {
  .middle-grid, .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-grid {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-box + .detail-box {
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .application-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px), (pointer: coarse) {
  button,
  button.icon,
  th button,
  .nav button,
  .settings-nav button,
  .tabs button,
  .record-menu-trigger,
  .row-actions .text,
  .row-actions .icon,
  .alerts-register .row-actions .icon,
  .table-pagination button,
  .table-footer button,
  .select-options button,
  .template-tokens button,
  .inline-test button,
  .detail-section-head,
  .back,
  .workspace-actions .back,
  .quick-actions button,
  .cal-head button {
    min-height: 44px;
  }
  button.icon, .record-menu-trigger, .table-pagination button, .cal-head button {
    min-width: 44px;
  }
  .field,
  .smtp-fields .field,
  .settings-section .field,
  .product-filters .field,
  .submission-filters .field,
  .table-controls .field,
  .product-search-row .field,
  .table-options .field,
  .table-search input,
  .select-search {
    min-height: 44px;
    height: 44px;
    font-size: 16px;
  }
  textarea.field {
    height: auto;
  }
}
@media (max-width: 760px) {

  .content {
    padding: 12px;
  }
  .topbar {
    height: 56px;
    padding: 0 12px;
  }
  h1 {
    font-size: 21px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .metrics {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 10px;
  }
  .metric-number {
    font-size: 25px;
  }
  .metric-icon {
    display: none;
  }
  .notice {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .notice > span {
    flex: 1;
    min-width: 180px;
  }
  .notice button {
    margin-left: 24px;
  }
  .quick-actions > span {
    width: 100%;
  }
  .quick-actions .text {
    margin-left: 0;
  }
  .middle-grid, .portfolio-grid {
    gap: 10px;
  }
  .cal-grid {
    gap: 4px;
  }
  .cal-day {
    min-height: 38px;
    height: 38px;
  }
  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .panel-head > div {
    min-width: 0;
  }
  .toolbar.product-search-row {
    gap: 8px;
  }
  .product-search-field {
    max-width: none;
    flex-basis: 100%;
  }
  .register-summary {
    margin-left: 0;
    margin-right: auto;
  }
  .product-search-row .table-options {
    margin-left: auto;
  }
  .product-filters, .submission-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-filters {
    gap: 8px;
  }
  .table-controls {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .table-search {
    flex-basis: 100%;
    max-width: none;
  }
  .table-options {
    flex-wrap: wrap;
    gap: 8px;
  }
  .table-options .smart-select {
    max-width: 180px;
  }
  .table-pagination {
    flex-wrap: wrap;
  }
  .detail-header {
    flex-wrap: wrap;
  }
  .detail-header > div:not(.product-statuses) {
    flex: 1;
    min-width: 180px;
  }
  .detail-header h1 {
    font-size: 18px;
  }
  .product-statuses {
    width: 100%;
    padding-top: 0;
    gap: 16px;
  }
  .detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .detail-meta strong {
    overflow-wrap: anywhere;
  }
  .tabs {
    gap: 16px;
  }
  .workspace-actions {
    flex-wrap: wrap;
  }
  .workspace-actions .heading-actions {
    width: auto;
  }
  .detail-section-head {
    flex-wrap: wrap;
  }
  .detail-box dl {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .application-facts {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .settings-nav button {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .settings-body {
    padding: 12px;
  }
  .settings-title {
    flex-wrap: wrap;
  }
  .form-grid, .settings-section .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .form-grid .full {
    grid-column: 1;
  }
  .form-help {
    font-size: 12px;
  }
  .channel-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .check-row {
    min-height: 36px;
  }
  .reminder-feed {
    grid-template-columns: minmax(0, 1fr);
  }
  .reminder-item {
    flex-wrap: wrap;
  }
  .reminder-item .badge {
    margin-left: 36px;
  }
  .folder-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .path-picker {
    flex-direction: column;
  }
  dialog {
    max-width: calc(100vw - 20px);
    max-height: 94dvh;
  }
  .modal-head, .modal-body, .modal-footer {
    padding: 12px;
  }
  .modal-footer {
    flex-wrap: wrap;
  }
  .record-facts {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .record-facts dd {
    margin-bottom: 8px;
  }
  .footer {
    flex-wrap: wrap;
    gap: 5px;
  }
  .footer > span:first-child {
    width: 100%;
  }
  .footer .status-dot {
    margin-left: 0;
  }
}
@media (max-width: 380px) {
  .product-filters, .submission-filter-grid, .application-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-box dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .detail-box dd {
    margin-bottom: 6px;
  }
}
/* ==========================================================================
 * Theme — colour, type and spacing tokens with component styling
 * ========================================================================== */
/* Semantic component surfaces use the tokens in workspace.css. */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
button, input, select, textarea {
  font-family: inherit;
}
button, [role="button"], .click-row, summary {
  cursor: pointer;
}
button, .field, .nav button, .badge {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
/* Focus and brand surfaces */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.brand-mark {
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
}
/* Light navigation rail */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar .brand {
  color: var(--text);
  font-weight: 700;
}
.sidebar .nav-label {
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.nav button {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 500;
}
.nav button svg {
  color: var(--subtle);
}
.nav button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.nav button.active {
  background: var(--primary-soft);
  color: var(--primary-hover);
  box-shadow: none;
  font-weight: 600;
}
.nav button.active svg {
  color: var(--primary);
}
.count-pill, .nav button .count-pill {
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 600;
}
.nav button.active .count-pill {
  background: var(--primary);
  color: #fff;
}
.sidebar-bottom {
  border-top: 1px solid var(--line);
}
.sidebar .help-link {
  color: var(--muted);
}
.sidebar .help-link:hover {
  color: var(--primary);
}
/* Top bar and panels */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.panel, .metric {
  border-color: var(--line);
}
.metric-icon {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
}
.metric-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}
.metric-icon.amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.metric-icon.blue {
  background: var(--primary-soft);
  color: var(--primary);
}
.notice {
  background: var(--warning-soft);
  border-color: var(--warning-line);
  color: var(--text);
}
.tabs button.active {
  color: var(--primary);
  box-shadow: inset 0 -2px var(--primary);
}
thead th {
  background: var(--surface-2);
}
tbody tr.click-row:hover {
  background: var(--surface-2);
}
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
button.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.avatar {
  background: var(--primary-soft);
  color: var(--primary);
}
/* Status badges: one consistent semantic mapping */
.badge {
  background: var(--success-soft);
  color: var(--success);
}
.badge.blue {
  background: var(--primary-soft);
  color: var(--primary);
}
.badge.amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge.red {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.gray {
  background: var(--surface-3);
  color: var(--muted);
}
/* Table headers read in sentence case */
th {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 600;
}
/* ---------- Info tips ---------- */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  min-height: 0;
  min-width: 0;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--subtle);
  cursor: help;
}
.info-tip svg {
  width: 15px;
  height: 15px;
}
.info-tip:hover, .info-tip:focus-visible {
  color: var(--primary);
}
.info-tip .tip-body {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.info-tip:hover .tip-body,
.info-tip:focus-visible .tip-body,
.info-tip[aria-expanded="true"] .tip-body {
  opacity: 1;
  visibility: visible;
}
/* ---------- Sign-in ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 16px;
  background: var(--bg);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.auth-logo .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.auth-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.auth-field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.auth-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.auth-field .field {
  min-height: 44px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
}
.auth-field .field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: none;
}
.auth-field .field[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.auth-input {
  position: relative;
}
.auth-input .field {
  width: 100%;
  padding-right: 48px;
}
.auth-input .reveal {
  position: absolute;
  top: 50%;
  right: 4px;
  min-height: 36px;
  min-width: 36px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  transform: translateY(-50%);
}
.auth-input .reveal:hover {
  color: var(--text);
}
.auth-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.auth-error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}
.auth-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.auth-hint.warn {
  color: var(--warning);
}
.auth-alert {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
}
.auth-alert.info {
  border-color: var(--primary-line);
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.auth-alert svg {
  flex: none;
  margin-top: 2px;
}
.auth-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 22px;
  font-size: 14px;
  color: var(--muted);
}
.auth-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.auth-card button.primary {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.auth-card button.primary[aria-busy="true"] {
  opacity: 0.75;
  cursor: progress;
}
.auth-foot {
  margin: 0;
  font-size: 13px;
  color: var(--subtle);
  text-align: center;
}
.strength {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.strength span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.strength[data-score="1"] span:nth-child(-n + 1) {
  background: var(--danger);
}
.strength[data-score="2"] span:nth-child(-n + 2) {
  background: var(--warning);
}
.strength[data-score="3"] span:nth-child(-n + 3) {
  background: var(--success);
}
.strength[data-score="4"] span {
  background: var(--success);
}
/* Top-bar account menu */
.account-menu {
  position: relative;
}
.account-menu > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 2px 6px 2px 2px;
  border: 0;
  background: transparent;
}
.account-menu .menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.account-menu .menu-panel[hidden] {
  display: none;
}
.account-menu .menu-head {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.account-menu .menu-head strong {
  display: block;
  font-size: 13px;
}
.account-menu .menu-head span {
  font-size: 12px;
  color: var(--muted);
}
.account-menu .menu-panel button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
}
.account-menu .menu-panel button:hover {
  background: var(--surface-3);
}
@media (max-width: 600px) {
  .auth-page {
    justify-content: flex-start;
    padding-top: 32px;
  }
  .auth-card {
    padding: 24px 20px;
    box-shadow: none;
  }
  .auth-field .field {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .info-tip .tip-body {
    transition: none;
  }
}
/* Sidebar help link and static form values */
.help-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}
.help-link:hover {
  color: var(--primary);
}
.field-static {
  margin: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.form-section-title {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.form-section-title strong {
  font-size: 13px;
}
.form-section-title .form-help {
  margin: 4px 0 0;
}
.info-box {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--primary-line);
  background: var(--primary-soft);
  color: var(--text);
}
.info-box.warn {
  border-color: var(--warning-line);
  background: var(--warning-soft);
}
.field::placeholder {
  color: var(--subtle);
  opacity: 1;
}
/* ---------- Standard enterprise presentation ---------- */
body {
  font-size: 14px;
}
h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 16px;
  font-weight: 600;
}
.page-heading p, .panel-subtitle {
  color: var(--muted);
  font-size: 13px;
}
.panel, .metric {
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: 8px;
}
td {
  font-size: 13px;
}
th {
  font-size: 12px;
}
.table-subline, td small {
  font-size: 12px;
  color: var(--subtle);
}
/* Plain rows: no decorative icon tile beside every record */
td .picon, .metric-icon, .deadline-mini .dot {
  display: none;
}
.product-name {
  gap: 0;
}
.product-name strong {
  font-weight: 600;
  color: var(--text);
}
/* Status labels: flat, readable, no bullet dot */
.badge {
  gap: 0;
  padding: 2px 8px;
  border-radius: 4px;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.badge:before {
  display: none;
}
/* Metric cards: label, number, context — nothing else */
.metric-top {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.metric-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.metric-foot {
  font-size: 12px;
  color: var(--subtle);
}
.quick-actions > span:first-child {
  display: none;
}
.sidebar .workspace {
  background: transparent;
  border: 0;
  padding-left: 6px;
}
.sidebar .workspace-icon {
  display: none;
}
/* ---------- Filters: each control is as wide as its selected value ---------- */
.product-filters, .submission-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.product-filters > div, .submission-filter-grid > div {
  flex: 0 0 auto;
  min-width: 0;
}
.product-filters .smart-select,
.submission-filter-grid .smart-select,
.table-options .smart-select {
  display: inline-block;
  width: auto;
  min-width: 0;
  max-width: 240px;
}
.product-filters .select-trigger,
.submission-filter-grid .select-trigger,
.table-options .select-trigger {
  width: auto;
  min-width: 72px;
  max-width: 240px;
  padding-right: 8px;
}
.submission-filter-grid input[type="date"] {
  width: 150px;
}
.product-filters .reset-filters {
  margin-left: auto;
  align-self: center;
}
.select-options button {
  font-size: 13px;
}
@media (max-width: 760px) {
  .product-filters > div, .submission-filter-grid > div {
    flex: 1 1 100%;
  }
  .product-filters .smart-select,
  .submission-filter-grid .smart-select,
  .product-filters .select-trigger,
  .submission-filter-grid .select-trigger {
    width: 100%;
    max-width: none;
  }
  .product-filters .reset-filters {
    margin-left: 0;
  }
}
th {
  white-space: nowrap;
  padding-right: 12px;
}
/* Dashboard calendar: always one column; move below the table when space is tight */
.calendar-panel {
  display: block;
}
.calendar-bottom {
  border-left: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 1280px) {
  .middle-grid, .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .calendar-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  }
  .calendar-panel > .panel-head {
    grid-column: 1 / -1;
  }
  .calendar-bottom {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .calendar-panel {
    display: block;
  }
  .calendar-bottom {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
/* Product header: title only, no decorative icon */
.detail-header .picon {
  display: none;
}
/* Cloud connection controls keep the workspace density consistent. */
.cloud-banner[hidden],.auth-alert[hidden] {
  display: none !important;
}
.cloud-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cloud-banner>span {
  flex: 1 1 300px;
}
.cloud-banner button {
  font-size: 12px;
  padding: 5px 9px;
}
.cloud-auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.cloud-auth-card form {
  display: grid;
  gap: 12px;
}
.cloud-workspaces {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.assignment-options {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--border,#dce2e9);
  padding: 8px;
}
.cloud-auth-card input {
  width: 100%;
  box-sizing: border-box;
}
.cloud-access-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.cloud-requests {
  margin-bottom: 12px;
}
.cloud-requests .count-pill {
  font-size: 12px;
  margin-left: 6px;
}
.request-email {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.request-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.request-actions button {
  padding: 5px 9px;
  font-size: 12px;
}
/* ==========================================================================
 * Modules — Working Status, reports, import, settings, dashboard and detail views
 * ========================================================================== */
/*
 * Working Status, Reports, Import, Edition settings and the customizable
 * dashboard. Uses the tokens defined in workspace.css only.
 */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.text-danger {
  color: var(--danger) !important;
}
/* ---------- Shared filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.filter-bar > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  flex: 1 1 150px;
  max-width: 240px;
}
.filter-bar > div.filter-search {
  flex: 2 1 220px;
  max-width: 320px;
}
.filter-bar > div.filter-end {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.filter-bar label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dash-filters {
  margin-bottom: 12px;
}
.dash-filters .filter-bar {
  border-bottom: 0;
}
.register-summary {
  margin: 0;
  padding: 10px 14px 0;
  font-size: 12px;
  color: var(--subtle);
}
.field.compact {
  min-height: 30px;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.segmented button + button {
  border-left: 1px solid var(--line-strong);
}
.segmented button.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.segmented svg {
  width: 14px;
  height: 14px;
}
/* ---------- People ---------- */
.assignee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar.xs {
  width: 20px;
  height: 20px;
  min-width: 20px;
  font-size: 9px;
}
.assignee-picker .assignee-options {
  max-height: 200px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
.assignee-picker .check-row {
  align-items: flex-start;
}
.module-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px 12px;
}
.small-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 4px;
  padding: 0;
  min-height: 0;
}
.small-link svg {
  width: 13px;
  height: 13px;
}
/* ---------- Progress ---------- */
.progress {
  width: 100%;
  max-width: 120px;
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
/* ---------- Kanban ---------- */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.kanban-col header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.kanban-col.drop-target {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
}
.kanban-card:hover {
  border-color: var(--line-strong);
}
.kanban-card:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.kanban-card.dragging {
  opacity: 0.5;
}
.kanban-card > small {
  color: var(--subtle);
}
.kanban-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.kanban-meta svg {
  width: 12px;
  height: 12px;
  margin-right: 3px;
  vertical-align: -2px;
}
.kanban-status .field {
  width: 100%;
}
.kanban-empty {
  color: var(--subtle);
  font-size: 12px;
  text-align: center;
  margin: 12px 0;
}
/* ---------- Task details ---------- */
.task-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 18px 18px 8px;
}
.task-detail-head h1 {
  font-size: 20px;
  margin: 4px 0 8px;
}
.task-description {
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0 0 12px;
}
.task-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.task-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 0;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.task-facts dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
  margin-bottom: 4px;
}
.task-facts dd {
  margin: 0;
  font-size: 13px;
}
.task-facts .progress {
  margin-top: 6px;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.comment {
  display: flex;
  gap: 10px;
}
.comment-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 2px;
}
.comment-text {
  margin: 0;
  white-space: pre-wrap;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 720px;
}
.comment-form label {
  font-weight: 600;
  font-size: 13px;
}
.comment-form textarea {
  min-height: 84px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: flex;
  gap: 12px;
  padding: 0 0 14px;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::before {
  display: none;
}
.timeline-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 5px;
}
.timeline p {
  margin: 0 0 2px;
}
.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.upload-row label {
  font-weight: 600;
  font-size: 13px;
  width: 100%;
}
.upload-row .form-help {
  width: 100%;
  margin: 0;
}
/* ---------- Correspondence additions ---------- */
.correspondence-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 8px 0;
}
.correspondence-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.response-list {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.response-item {
  display: flex;
  gap: 8px;
}
.response-item svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  color: var(--subtle);
  margin-top: 3px;
}
.response-item p {
  margin: 0;
  white-space: pre-wrap;
}
.history-head {
  margin-top: 18px;
}
/* ---------- Reports ---------- */
.reports-grid .settings-nav .nav-label {
  margin: 10px 10px 4px;
}
.reports-grid .settings-nav .nav-label:first-child {
  margin-top: 0;
}
.summary-tiles {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.modal-body .summary-tiles {
  padding: 0 0 14px;
}
.summary-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
}
.summary-tile span {
  font-size: 12px;
  color: var(--muted);
}
.summary-tile strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.summary-tile.danger {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}
.summary-tile.danger strong {
  color: var(--danger);
}
.report-chart {
  padding: 0 14px 10px;
  max-width: 620px;
}
th.num, td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* ---------- Charts ---------- */
.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-bar {
  fill: var(--chart-1);
}
.chart g:hover .chart-bar {
  fill: var(--primary-hover);
}
.chart-label {
  font-size: 11px;
  fill: var(--muted);
  font-family: var(--font);
}
.chart-value {
  font-size: 11px;
  fill: var(--text);
  font-weight: 600;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}
.chart-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.chart-empty {
  padding: 24px 0;
  text-align: center;
}
.donut-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.chart.donut {
  width: 150px;
  min-width: 150px;
}
.donut-total {
  font-size: 22px;
  font-weight: 700;
  fill: var(--text);
  font-family: var(--font);
}
.donut-seg {
  transition: stroke-width 0.15s;
}
.donut-seg:hover {
  stroke-width: 26;
}
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  flex: 1;
  min-width: 140px;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.s0 {
  stroke: var(--chart-1);
  background: var(--chart-1);
}
.s1 {
  stroke: var(--chart-2);
  background: var(--chart-2);
}
.s2 {
  stroke: var(--chart-3);
  background: var(--chart-3);
}
.s3 {
  stroke: var(--chart-4);
  background: var(--chart-4);
}
.s4 {
  stroke: var(--chart-5);
  background: var(--chart-5);
}
.s5 {
  stroke: var(--chart-6);
  background: var(--chart-6);
}
.s6 {
  stroke: var(--chart-7);
  background: var(--chart-7);
}
.s7 {
  stroke: var(--chart-8);
  background: var(--chart-8);
}
.mini-table {
  width: 100%;
  font-size: 13px;
}
.mini-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
/* ---------- Dashboard grid ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.widget {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.widget.w-full {
  grid-column: span 6;
}
.widget.w-half {
  grid-column: span 3;
}
.widget.w-third {
  grid-column: span 2;
}
.widget .panel-head {
  gap: 8px;
  flex-wrap: wrap;
}
.widget-body {
  padding: 0 14px 14px;
  flex: 1;
  min-width: 0;
}
.widget-body > .table-wrap, .widget-body > .empty {
  margin: 0 -14px;
}
.widget.editing {
  outline: 1px dashed var(--primary-line);
  outline-offset: 2px;
}
.widget-tools {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.widget-tools .icon {
  width: 30px;
  height: 30px;
  min-height: 30px;
}
.dash-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-editor > span {
  flex: 1 1 320px;
}
.dash-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.kpi-grid {
  display: grid;
  gap: 10px;
}
.kpi {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-height: 0;
  height: auto;
}
.kpi:hover {
  border-color: var(--primary-line);
  background: var(--surface-2);
}
.kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-foot {
  font-size: 11px;
  color: var(--subtle);
}
.kpi.warn {
  border-color: var(--danger-line);
}
.kpi.warn .kpi-value {
  color: var(--danger);
}
.widget-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}
.widget-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.widget-list li:last-child {
  border-bottom: 0;
}
.widget-list li span:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.widget-list small {
  color: var(--subtle);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.widget-list li > span:last-child {
  white-space: nowrap;
}
/* ---------- Import & settings ---------- */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  height: auto;
  min-height: 0;
  width: 100%;
}
.choice:hover {
  border-color: var(--primary-line);
  background: var(--primary-soft);
}
.choice svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--primary);
  margin-top: 2px;
}
.choice span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.choice small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
.import-heading {
  font-size: 14px;
  margin: 14px 0 6px;
}
.import-table {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.modal-inline-actions {
  margin-top: 14px;
}
.plain-list {
  margin: 0;
  padding-left: 18px;
}
.plain-list li {
  margin-bottom: 4px;
}
.edition-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.edition-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
}
.edition-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.edition-card input {
  margin-top: 3px;
}
.edition-card span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.edition-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
}
.switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.perm-matrix caption {
  text-align: left;
  font-weight: 700;
  padding: 10px 0 6px;
  font-size: 13px;
}
.perm-matrix td, .perm-matrix th {
  text-align: center;
}
.perm-matrix th[scope="row"], .perm-matrix thead th:first-child {
  text-align: left;
}
.perm-matrix input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.perm-matrix tr.module-off th[scope="row"] {
  color: var(--subtle);
}
.status-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  max-width: 520px;
}
.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 34px;
  gap: 8px;
  align-items: center;
}
@media (max-width: 1100px) {
  .widget.w-third {
    grid-column: span 3;
  }
  .task-detail-head {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .widget.w-full, .widget.w-half, .widget.w-third {
    grid-column: 1 / -1;
  }
  .filter-bar > div, .filter-bar > div.filter-search {
    max-width: none;
    flex-basis: 100%;
  }
  .filter-bar > div.filter-end {
    margin-left: 0;
  }
  .task-facts {
    grid-template-columns: 1fr;
  }
  .status-row {
    grid-template-columns: 1fr 120px 34px;
  }
}
/* Product detail additions */
.correspondence-head .badge {
  align-self: flex-start;
}
/* Working Status has its own search across table and Kanban. */
.task-panel .table-controls .table-search {
  display: none;
}
/* Horizontal bar chart (HTML) */
.hbars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.hbar {
  display: grid;
  grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.hbar-label {
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbar-track {
  height: 12px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.hbar-fill {
  display: block;
  height: 100%;
  background: var(--chart-1);
  border-radius: 3px;
}
.hbar:hover .hbar-fill {
  background: var(--primary-hover);
}
.hbar-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.legend {
  max-width: 320px;
}
.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .filter-bar > div {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .filter-bar > div.filter-search {
    flex-basis: 100%;
  }
}
/* Sequence columns are sized by WorkspaceUI and workspace.css. */
.submission-table {
  min-width: 1040px;
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.filter-toggle svg {
  width: 14px;
  height: 14px;
}
.filter-toggle[aria-expanded="true"] {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-line);
}
.submission-filters[hidden] {
  display: none !important;
}
/* ---------- Record detail dialog ---------- */
dialog.wide {
  width: 860px;
}
.rd {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.rd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.rd-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rd-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rd-actions button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rd-actions svg {
  width: 14px;
  height: 14px;
}
.danger-text {
  color: var(--danger) !important;
}
.danger-text:hover {
  background: var(--danger-soft) !important;
  border-color: var(--danger-line) !important;
}
.rd-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rd-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.rd-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subtle);
  margin: 0 0 10px;
}
.rd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0;
}
.rd-grid dt {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 2px;
}
.rd-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}
.rd-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--text);
}
.rd-links, .rd-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-links button, .rd-files button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  min-height: 0;
  font-size: 13px;
  text-align: left;
}
.rd-links svg, .rd-files svg {
  width: 15px;
  height: 15px;
  min-width: 15px;
}
.rd-files li {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rd .response-list {
  border-top: 0;
  padding-top: 0;
  margin: 0;
}
@media (max-width: 760px) {
  .rd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Labelled row actions */
.row-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.row-btn svg {
  width: 13px;
  height: 13px;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.alerts-register .tabs {
  padding-top: 4px;
}
.rd-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  padding: 0 18px 6px;
}
.rd-columns .rd-section {
  border-bottom: 0;
}
.rd-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-header + .summary-tiles {
  padding-top: 4px;
}
@media (max-width: 760px) {
  .rd-columns {
    grid-template-columns: 1fr;
  }
}
.summary-tiles {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* Activity register column balance */
.activity-table {
  table-layout: auto;
  width: 100%;
}
.activity-table th:first-child, .activity-table td:first-child {
  width: 30%;
}
.activity-table td, .activity-table th {
  white-space: normal;
}
.activity-table td:last-child {
  width: 1%;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .task-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .task-facts {
    grid-template-columns: 1fr 1fr;
  }
}
.task-facts .field.compact {
  width: 100%;
}
.task-detail + .detail-body {
  padding: 16px 18px 18px;
  margin-top: 12px;
}
.task-detail + .detail-body .panel-head {
  padding: 0 0 12px;
}
.task-detail + .detail-body .table-wrap {
  margin: 0 -18px;
}
/* Reports navigation */
.reports-grid {
  grid-template-columns: 230px minmax(0, 1fr);
}
.reports-grid .settings-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.reports-grid .settings-nav .nav-label {
  width: 100%;
  display: block;
}
.reports-grid .settings-nav button {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}
@media (max-width: 900px) {
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .reports-grid .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .reports-grid .settings-nav .nav-label {
    display: none;
  }
  .reports-grid .settings-nav button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
  }
}
/* Workspace guide */
.guide-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.guide-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.guide-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.guide-icon svg {
  width: 16px;
  height: 16px;
}
.guide-steps strong {
  font-size: 14px;
}
.guide-steps p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Visual tokens, density, table schemas and responsive rules are in workspace.css.
 * The component definitions above remain for workflow-specific behavior. */

}
