﻿/* Operational design-system layer for shared shell, tables, and page surfaces. */

:where(h1, h2, h3, h4, h5, h6, p, label, th, td, button, input, select, textarea) {
  letter-spacing: 0;
  word-break: normal;
}

:where(.u-hidden) {
  display: none;
}

:where(.u-muted) {
  color: var(--muted);
}

:where(.u-nowrap) {
  white-space: nowrap;
}

:where(.u-scroll) {
  overflow: auto;
}

:where(.u-full-width) {
  width: 100%;
}

.start-news-item footer > span:first-child,
.news-target-check strong,
.news-target-check small,
.access-remove-item-body strong,
.access-remove-item-body small,
.operational-focus-item strong,
.operational-focus-item em,
.operational-focus-item small,
.operational-health-item span,
.operational-health-item strong,
.operational-health-item em,
.control-position-cell > strong,
:where(.table-settings-row label span),
:where(.table-column-head > span),
:where(.excel-filter-choice span),
.live-feed-body strong,
.live-feed-body span,
.live-feed-body small,
.live-feed-meta span,
.live-feed-meta time,
.live-feed-meta small,
.structure-tree-node-main strong,
.structure-tree-node-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-info-status-top > div,
.access-choice-current span,
.access-function-group > summary span,
.access-manager-dialog .access-step-title > div,
.info-action-summary-label,
.position-info-section-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.news-table th,
.equipment-group-title,
.access-choice-current small,
.access-manager-meta span,
.account-facts-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.logistics-status-dialog-head,
.access-template-dialog-section,
.repeat-status-field,
.position-info-title,
.reference-detail-children,
.work-event-item,
.work-activity-item {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.logistics-info-title,
.access-choice-options > button > span:first-child,
.access-function-cell span,
.access-current-head > div,
.access-remove-head > div,
.access-grant-preview-head > div,
.access-grant-preview-block,
.access-grant-preview-grid > div,
.person-form-account-summary div,
.device-notification-status > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kv-detail-list li,
.table-access-row > span,
.army-subordinate-row span,
.operational-focus-item > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.access-editor-current .access-current-modules.is-compact,
.access-grant-ack-meta,
.notification-filter-preview > div,
.notification-rule-details,
.work-people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.news-target-check small,
.news-selected-summary,
.access-function-group > summary small,
.table-access-row small,
.access-remove-item-body small,
.access-grant-preview-head span,
.access-grant-preview-block > span,
.access-grant-preview-grid span,
.access-grant-preview-empty,
.pwa-capability-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.access-remove-item-body,
.army-tree-node,
.army-tree-children,
.live-feed-category,
.live-feed-list,
.work-equipment-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-facts-grid,
.notification-detail-grid,
.crew-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.equipment-panel-head,
.equipment-item-row,
.work-status-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

:where(.table-settings-move),
.work-event-actions .repeat-button,
.work-event-actions .position-info-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}

.start-section-head span,
.work-dialog-kv span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-list,
.audit-chip-list,
.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logistics-status-cell .logistics-status-line .decision-badge > span:last-child,
.logistics-status-cell .logistics-status-line .badge,
.column-filter-menu[open] :where(.excel-filter-choice span, .excel-column-sort-button span) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logistics-info-alert strong,
.access-function-cell strong,
.access-remove-head strong,
.access-remove-section-head strong,
.access-remove-item-body strong,
.access-grant-preview-head strong,
.access-grant-preview-grid strong,
.access-save-toast strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.logistics-info-action.primary,
.logistics-status-dialog .action-row.primary {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--text);
}

.audit-details-grid,
.account-hero-grid,
.position-info-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.notification-storage-summary,
.pwa-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.access-remove-section-head span,
.access-remove-note span,
.person-form-section-head span,
.person-form-account-summary span,
.notification-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-hero-title,
.local-alert-content,
.control-position-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.account-grid,
.person-form-grid,
.position-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-layout__content > .panel,
.page-layout__content > .stack,
.page-layout__content .panel.stack,
.page-layout__content .table-scroll,
.page-layout__content .audit-table,
.content.content--wide > .panel,
.content.content--wide > .stack,
.content.content--wide .panel.stack,
.content.content--wide .table-scroll,
.content.content--wide .audit-table,
.control-page,
.control-page .control-table-scroll,
.module-page {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.credential-box div,
.account-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-item__head,
.history-item__meta,
.local-alert-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.event-calendar-head button,
.photo-chip button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.event-day-metrics,
.summary-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.stats-unit-overview,
.table-access-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.logistics-status-dialog-context strong,
.access-structure-head strong,
.access-manager-dialog .access-step-title strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.logistics-info-alert span,
.table-access-open-card span,
.table-access-section-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.logistics-form-disclosure--route .route-editor,
.news-target-summary.is-inline {
  padding: 0;
  border: 0;
  background: transparent;
}

.audit-before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-function-cell small,
.access-manager-dialog .access-step-title small,
.access-save-toast span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.access-current-empty span,
.work-dialog-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.account-management-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

:root {
  --tab-track-bg: color-mix(in srgb, var(--bg) 82%, var(--panel));
  --tab-hover-bg: color-mix(in srgb, var(--text) 7%, transparent);
  --tab-active-bg: color-mix(in srgb, var(--accent) 82%, var(--mix-accent-deep));
  --tab-active-border: color-mix(in srgb, var(--accent) 76%, var(--line));
  --tab-active-text: var(--on-accent);
}

:where(.l-shell) {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

:where(.l-main) {
  min-width: 0;
}

:where(.l-page) {
  display: grid;
  gap: var(--gap-lg);
}

:where(.l-page-header) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap-md);
  min-width: 0;
}

:where(.l-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-md);
}

:where(.c-panel, .panel, .panel-sub, .c-card, .card) {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

:where(.c-panel, .panel) {
  display: grid;
  gap: var(--gap-md);
  padding: var(--gap-lg);
  overflow: visible;
  overflow-wrap: anywhere;
}

:where(.panel-sub, .c-card, .card) {
  padding: var(--gap-md);
  background: var(--soft-panel);
}

:where(.settings-section, .embedded-panel) {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
}

:where(.settings-section) {
  gap: 10px;
}

:where(.settings-section h3) {
  margin: 0;
}

:where(.embedded-panel .section-title) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

:where(.c-panel, .panel, .panel-sub, .c-card, .card) > :first-child {
  margin-top: 0;
}

:where(.c-panel, .panel, .panel-sub, .c-card, .card) > :last-child {
  margin-bottom: 0;
}

:where(.toolbar, .table-toolbar, .stats-toolbar, .stats-history-toolbar, .logistics-toolbar, .news-stats-toolbar) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--soft-panel) 62%, var(--panel));
}

:where(.panel-title-count) {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  min-width: 0;
}

:where(.panel-title-count h2) {
  margin: 0;
}

:where(.toolbar > label, .form-grid > label, .stack > label) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

:where(
  .toolbar > label > input,
  .toolbar > label > select,
  .toolbar > label > textarea,
  .form-grid > label > input,
  .form-grid > label > select,
  .form-grid > label > textarea,
  .stack > label > input,
  .stack > label > select,
  .stack > label > textarea
) {
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
}

:where(.c-button, button, .file-button, .action-menu-file, .side-file-button, .account-action-button, .info-action-summary-button, .action-menu summary) {
  min-height: var(--control-height);
  max-width: 100%;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}

:where(.c-button, button, .file-button, .action-menu-file, .side-file-button, .account-action-button, .info-action-summary-button) {
  gap: var(--gap-sm);
  padding-inline: 14px;
}

:is(.c-button.is-primary, button.primary, .button-primary) {
  border-color: color-mix(in srgb, var(--accent) 76%, var(--line));
  background: color-mix(in srgb, var(--accent) 82%, var(--mix-accent-deep));
  color: var(--on-accent);
}

:is(.c-button.is-success, button.success, .button-success) {
  border-color: color-mix(in srgb, var(--green) 74%, var(--line));
  background: color-mix(in srgb, var(--green) 80%, var(--mix-success-deep));
  color: var(--on-status);
}

:is(.c-button.is-danger, button.danger, .button-danger, .account-action-button.danger) {
  border-color: color-mix(in srgb, var(--red) 76%, var(--line));
  background: color-mix(in srgb, var(--red) 84%, var(--mix-danger-deep));
  color: var(--on-status);
}

:is(.c-button.is-ghost, button.ghost, .button-ghost) {
  background: transparent;
}

:where(button:disabled, .c-button.is-disabled, .is-disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

:where(.actions, .row-actions:not(td), .notification-actions, .notification-header-actions, .modal-footer, .action-dialog-footer) {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}

:where(.actions > .action-menu) {
  flex: 0 0 auto;
}

:where(.actions:not(.topbar-actions)) > :where(button, .file-button, .action-menu) {
  min-width: 118px;
}

:where(.actions:not(.topbar-actions)) > .action-menu summary {
  width: 100%;
}

:where(.actions > select, .toolbar > select, .topbar .actions > select) {
  width: auto;
  min-width: 160px;
  max-width: min(100%, 280px);
}

:where(.actions > button, .actions > .file-button, .row-actions button, .notification-actions button) {
  white-space: normal;
}

@media (max-width: 960px) {
  .actions:not(.topbar-actions) {
    display: flex;
    flex-wrap: wrap;
  }

  .actions:not(.topbar-actions) > button,
  .actions:not(.topbar-actions) > select,
  .actions:not(.topbar-actions) > .file-button,
  .actions:not(.topbar-actions) > .action-menu {
    flex: 1 1 150px;
  }
}

@media (max-width: 760px) {
  .actions:not(.topbar-actions) > button,
  .actions:not(.topbar-actions) > .file-button,
  .actions:not(.topbar-actions) > .action-menu {
    min-width: 0;
  }

  .actions > select,
  .toolbar > select,
  .topbar .actions > select {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .actions:not(.topbar-actions) {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .actions:not(.topbar-actions) > button,
  .actions:not(.topbar-actions) > select,
  .actions:not(.topbar-actions) > .file-button,
  .actions:not(.topbar-actions) > .action-menu {
    flex-basis: 100%;
    width: 100%;
  }
}

:where(.form-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

:where(.form-grid .wide) {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  :where(.toolbar, .table-toolbar, .stats-toolbar, .stats-history-toolbar, .logistics-toolbar, .news-stats-toolbar, .form-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
}

:where(.c-badge, .badge, .state-pill, .nav-badge, .notify-badge) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-xs);
  max-width: 100%;
  min-height: 26px;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow-wrap: normal;
  color: var(--text);
}

:where(.item > *, .notice, .table-link, .action-menu-panel button, .quick-chip, .state-pill) {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice {
  color: var(--muted);
  font-size: 14px;
}

:where(.state-pill) {
  flex: 0 1 auto;
  width: fit-content;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

:where(.actions h2, .actions > strong, .panel > .actions:first-child h2) {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

:where(.panel > .actions:first-child h2) {
  font-size: 20px;
  line-height: 1.18;
}

:where(.panel > .actions:first-child .state-pill) {
  margin-left: auto;
}

:where(.panel.structure-list-panel > .actions:first-child .state-pill) {
  margin-left: 0;
}

:where(.panel.structure-list-panel > .actions:first-child h2) {
  flex: 0 0 auto;
}

:where(.panel.structure-list-panel > .actions:first-child > .panel-title-count) {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 1 auto;
  width: auto !important;
  min-width: 0;
  margin-right: auto;
}

:where(.panel.structure-list-panel > .actions:first-child > .panel-title-count h2) {
  flex: 0 0 auto !important;
  margin: 0;
}

:where(.panel.structure-list-panel > .actions:first-child > .panel-title-count .state-pill) {
  flex: 0 0 auto;
  width: fit-content !important;
  margin-left: 0 !important;
}

:where(.c-badge.is-success, .badge.success, .BG) {
  background: color-mix(in srgb, var(--green) 82%, var(--mix-success-deep));
  color: var(--on-status);
}

:where(.c-badge.is-danger, .badge.danger, .NOT_BG, .NO_REPORT) {
  background: color-mix(in srgb, var(--red) 82%, var(--mix-danger-deep));
  color: var(--on-status);
}

:where(.c-badge.is-warning, .badge.warning, .WAITING, .FOLDING) {
  background: color-mix(in srgb, var(--yellow) 78%, var(--mix-warning-deep));
  color: var(--on-warning);
}

:where(.c-badge.is-purple, .badge.purple) {
  background: color-mix(in srgb, var(--purple) 74%, var(--mix-purple-deep));
  color: var(--on-status);
}

:where(.c-badge.is-neutral, .badge.neutral, .FOLDED, .NO_GROUP, .NO_REPORT_REQUIRED) {
  background: color-mix(in srgb, var(--neutral) 78%, var(--panel));
  color: var(--text);
}

:where(.c-badge.is-info, .badge.info, .DEPLOYING) {
  background: var(--info);
  color: var(--on-status);
}

:where(.decision-badge) {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  max-width: 100%;
  min-height: 30px;
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

:where(.decision-square) {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08), 0 0 0 2px color-mix(in srgb, currentColor 12%, transparent);
}

:where(.decision-allowed) {
  color: var(--green);
}

:where(.decision-allowed .decision-square) {
  background: var(--green);
}

:where(.decision-waiting) {
  color: var(--yellow);
}

:where(.decision-waiting .decision-square) {
  background: var(--yellow);
}

:where(.decision-rejected) {
  color: var(--red);
}

:where(.decision-rejected .decision-square) {
  background: var(--red);
}

:where(.empty-state, .page-layout-state, .start-notification-empty, [data-empty-actions="true"]) {
  border: 1px dashed color-mix(in srgb, var(--line) 82%, var(--accent));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--soft-panel) 56%, transparent);
  color: var(--muted);
}

.compact-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center start;
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  margin: 0;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--panel) 68%, transparent);
  color: var(--muted);
  overflow-wrap: anywhere;
}

:where(.item, .panel-sub, .route-editor, .settings-section, .embedded-panel, .notification-item) {
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.03);
}

:where(.item:hover, .summary-zpm-row:hover, .notification-item:hover) {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

:where(.error, .form-error, .alert-error) {
  border-color: color-mix(in srgb, var(--red) 62%, var(--line));
  background: color-mix(in srgb, var(--red) 11%, var(--panel));
  color: color-mix(in srgb, var(--red) 28%, var(--text));
}

:where(.error, .form-error, .alert-error):empty {
  display: none;
}

:where(.site-message.success, .alert-success) {
  border-color: color-mix(in srgb, var(--green) 58%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, var(--panel));
}

:where(.start-notification, .notification-item, .notification-detail-dialog, .access-grant-ack-dialog) {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--bg));
}

:where(.start-notification.is-danger, .notification-item.is-danger) {
  border-color: color-mix(in srgb, var(--red) 62%, var(--line));
}

:where(.start-notification.is-warning, .notification-item.is-warning) {
  border-color: color-mix(in srgb, var(--yellow) 62%, var(--line));
}

:where(.start-notification.is-info, .notification-item.is-info) {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
}

.tabs,
.segmented,
.c-tabs,
.c-segmented,
.page-tabs,
.module-tabs,
.deadline-mode-tabs,
.notification-view-tabs,
.account-tabs,
.equipment-tabs,
.army-mobile-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tab-track-bg);
  padding: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

:where(.tabs) {
  margin-bottom: var(--gap-md);
}

:where(.tabs > .action-menu) {
  margin-left: auto;
}

.tabs button,
.tabs .action-menu summary,
.segmented button,
.c-tabs > button,
.c-segmented > button,
.page-tabs > button,
.module-tabs > button,
.deadline-mode-tabs button,
.notification-view-tabs button,
.account-tabs button,
.equipment-tabs button,
.army-mobile-tabs button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: var(--control-height);
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 15px;
  font-weight: 800;
  gap: 6px;
  line-height: 1.15;
  padding: 9px 14px;
  text-align: center;
  white-space: nowrap;
}

.tabs button:hover,
.tabs .action-menu summary:hover,
.segmented button:hover,
.c-tabs > button:hover,
.c-segmented > button:hover,
.page-tabs > button:hover,
.module-tabs > button:hover,
.deadline-mode-tabs button:hover,
.notification-view-tabs button:hover,
.account-tabs button:hover,
.equipment-tabs button:hover,
.army-mobile-tabs button:hover {
  background: var(--tab-hover-bg);
}

.tabs button.active,
.tabs button.is-active,
.tabs .action-menu.active summary,
.segmented button.active,
.segmented button.is-active,
.c-tabs > button.active,
.c-tabs > button.is-active,
.c-segmented > button.active,
.c-segmented > button.is-active,
.page-tabs > button.active,
.page-tabs > button.is-active,
.module-tabs > button.active,
.module-tabs > button.is-active,
.deadline-mode-tabs button.active,
.notification-view-tabs button.active,
.account-tabs button.active,
.equipment-tabs button.active,
.army-mobile-tabs button.active {
  border-color: var(--tab-active-border);
  background: var(--tab-active-bg);
  color: var(--tab-active-text);
}

:where(.nav-badge, .notify-badge) {
  min-width: 22px;
  min-height: 22px;
  margin-left: 6px;
  padding: 2px 6px;
  background: var(--red);
  color: var(--on-status);
  font-weight: 800;
  line-height: 1;
}

:where(.notify-button) {
  position: relative;
}

:where(.notify-button.has-unread) {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  box-shadow: none;
}

:where(.notify-button .notify-badge) {
  background: var(--accent);
}

:where(.section-head) {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin-bottom: var(--gap-md);
}

:where(.section-head .segmented) {
  width: 100%;
}

:where(.section-head .segmented button) {
  flex: 0 0 auto;
}

.page-tabs {
  margin-bottom: var(--gap-md);
}

.page-tabs > button {
  max-width: min(240px, 72vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-tabs .nav-badge,
.module-tabs .nav-badge,
.tabs .nav-badge,
.segmented .nav-badge {
  min-width: 20px;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
}

:where(.c-form-field, label) {
  min-width: 0;
}

:where(.c-form-field > span, label > span, .field-label) {
  display: inline-block;
  margin-bottom: var(--gap-xs);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

:where(input, select, textarea) {
  min-height: var(--control-height);
  border-radius: var(--radius);
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
}

:where(textarea) {
  line-height: 1.35;
}

:where(.check-list) {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

:where(.check-row) {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  min-width: 0;
  padding: var(--gap-sm);
}

/* News dialog controls: keep shared form label rules from stretching compact choices. */
.news-dialog .news-priority-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.news-dialog .news-priority-options label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 112px;
  width: auto;
  white-space: nowrap;
}

.news-dialog .news-priority-options label > span {
  display: inline;
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.news-dialog .news-options > .check-row {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  max-width: 100%;
  padding: 4px 0;
  color: var(--text);
  line-height: 1.3;
}

.news-dialog .news-priority-options input,
.news-dialog .news-options > .check-row input,
.news-target-picker .news-target-check input {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

.news-target-picker .news-target-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.news-target-picker .news-target-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.news-target-picker .news-target-check > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin: 0;
  color: inherit;
  line-height: 1.2;
}

.news-target-picker .news-target-check strong {
  color: var(--text);
}

.news-target-picker .news-target-check small {
  color: var(--muted);
}


