@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --canvas: #eef2f5;
    --canvas-strong: #ffffff;
    --subtle: #f7f9fb;
    --subtle-2: #f1f4f7;
    --ink: #16232e;
    --ink-soft: #5b6b7a;
    --navy: #16232e;
    --teal: #1c4f81;
    --accent: #1c4f81;
    --accent-hover: #17416b;
    --accent-soft: #eaf1f8;
    --gold: #1c4f81;
    --gold-dark: #1c4f81;
    --danger: #b3261e;
    --ok-bg: #e9f4ee;
    --ok-text: #0f5132;
    --ok-border: #bcdfcc;
    --warn-bg: #fdf4e3;
    --warn-text: #8a5a00;
    --warn-border: #e6d2a6;
    --line: #d7dee5;
    --line-input: #7d8b99;
    --placeholder: #667380;
    --card-shadow: 0 1px 2px rgba(16, 35, 46, 0.06);
    --shadow-md: 0 6px 18px rgba(16, 35, 46, 0.10);
    --radius-lg: 10px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --font-ui: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: 'Space Grotesk', 'Bahnschrift', 'Segoe UI', sans-serif;
}

html, body {
    font-family: var(--font-ui);
    background: var(--canvas);
    color: var(--ink);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
}

a, .btn-link {
    color: var(--accent);
}

.btn-primary {
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(28, 79, 129, 0.25);
}

.content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

h1:focus {
    outline: none;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
}

p {
    color: var(--ink-soft);
}

.hero-panel,
.info-card,
.toolbar,
.table-shell,
.form-shell,
.callout,
.metric-card {
    box-shadow: var(--card-shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-radius: 20px;
    background: var(--canvas-strong);
    color: var(--ink);
    margin-bottom: 1rem;
    border: 1px solid var(--line);
}

.hero-panel p,
.hero-panel h1,
.hero-panel h2 {
    color: inherit;
}

.hero-panel h1 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    margin-bottom: 0.35rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
}

.hero-copy {
    max-width: 72ch;
    font-size: 0.98rem;
    color: var(--ink-soft);
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.dashboard-summary {
    padding: 1rem 1.15rem;
    margin-bottom: 0.9rem;
}

.dashboard-state-board {
    padding: 0.95rem 1.05rem 1rem;
    margin-top: 0.85rem;
    margin-bottom: 0.85rem;
    overflow-x: auto;
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.dashboard-panel-header.compact {
    margin-bottom: 0.55rem;
}

.dashboard-panel-header h2 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.dashboard-panel-eyebrow {
    margin-bottom: 0.2rem;
}

.dashboard-summary-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-summary-copy {
    min-width: 0;
}

.dashboard-summary-copy h1 {
    margin-bottom: 0.25rem;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.dashboard-summary-copytext {
    margin-bottom: 0;
    max-width: 62ch;
}

.dashboard-actions {
    margin-top: 0;
    justify-content: flex-end;
}

.dashboard-eyebrow {
    margin-bottom: 0.4rem;
}

.dashboard-metrics {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0;
    margin-bottom: 0;
    min-width: 0;
    align-items: stretch;
}

.dashboard-metric {
    min-height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-metric:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 34px rgba(17, 32, 46, 0.14), 0 0 0 1px rgba(244, 186, 77, 0.14);
}

.dashboard-metric:nth-child(1) {
    background: linear-gradient(180deg, rgba(244, 186, 77, 0.26), rgba(255, 250, 240, 0.96));
    border-color: rgba(201, 143, 43, 0.32);
}

.dashboard-metric:nth-child(2) {
    background: linear-gradient(180deg, rgba(31, 83, 97, 0.18), rgba(246, 251, 252, 0.98));
    border-color: rgba(13, 81, 104, 0.24);
}

.dashboard-metric:nth-child(3) {
    background: linear-gradient(180deg, rgba(17, 32, 46, 0.11), rgba(249, 250, 252, 0.98));
    border-color: rgba(17, 32, 46, 0.18);
}

.button-primary,
.button-secondary,
.button-link,
.button-danger,
.button-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 36px;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--line-input);
    transition: background-color 120ms ease, border-color 120ms ease;
}

.button-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    font-weight: 600;
}

.button-secondary,
.button-muted {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line-input);
}

.button-muted {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line-input);
}

.button-link {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.button-danger {
    background: #ffffff;
    color: var(--danger);
    border-color: #e2b6b2;
}

.button-primary:hover,
.button-link:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button-secondary:hover,
.button-muted:hover {
    background: var(--subtle-2);
    border-color: #65737f;
}

.button-danger:hover {
    background: #fdeceb;
}

.button-primary:focus-visible,
.button-secondary:focus-visible,
.button-link:focus-visible,
.button-danger:focus-visible,
.button-muted:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button-primary:disabled,
.button-secondary:disabled,
.button-link:disabled,
.button-danger:disabled,
.button-muted:disabled,
.button-primary[aria-disabled="true"],
.button-secondary[aria-disabled="true"],
.button-link[aria-disabled="true"],
.button-danger[aria-disabled="true"],
.button-muted[aria-disabled="true"] {
    background: var(--subtle-2);
    color: #6c7a86;
    border-color: var(--line);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    pointer-events: none;
}

.hero-card-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.metric-card,
.info-card,
.toolbar,
.table-shell,
.form-shell,
.callout {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--canvas-strong);
}

.metric-card {
    padding: 1rem 1.05rem;
}

.metric-card span {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.metric-card strong {
    display: block;
    font-size: 1.9rem;
    margin: 0.2rem 0 0.25rem;
}

.metric-card p {
    margin-bottom: 0;
}

.accent-gold {
    background: rgba(244, 186, 77, 0.16);
}

.accent-ink {
    background: rgba(17, 32, 46, 0.06);
}

.accent-teal {
    background: rgba(31, 83, 97, 0.12);
}

.content-grid {
    display: flex !important;
    gap: 1.25rem;
}

.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-up {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.toolbar,
.table-shell,
.form-shell,
.callout {
    padding: 1.1rem 1.2rem;
}

.dashboard-overview {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.dashboard-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

.module-group-card {
    display: grid;
    flex-direction: column;
    gap: 0.55rem;
}

.module-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.module-link-row {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    justify-items: center;
    gap: 0.5rem;
    padding: 0.8rem 0.9rem;
    min-height: 92px;
    border-radius: 16px;
    border: 1px solid rgba(16, 36, 56, 0.12);
    background: rgba(255, 253, 249, 0.92);
    box-shadow: 0 10px 24px rgba(17, 32, 46, 0.05);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.module-link-title-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.module-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    min-width: 1.55rem;
    height: 1.55rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: rgba(16, 36, 56, 0.04);
    color: #355463;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    font-weight: 800;
}

.module-link-row:hover {
    background: rgba(255, 248, 232, 0.98);
    border-color: rgba(201, 143, 43, 0.28);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 34px rgba(17, 32, 46, 0.14), 0 0 18px rgba(244, 186, 77, 0.18);
}

.module-link-title {
    display: block;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.3;
}

.module-link-description {
    display: block;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.45;
}

.module-link-row:hover .module-link-title {
    color: #0d5168;
}

.module-link-row:hover .module-link-icon {
    border-color: rgba(201, 143, 43, 0.4);
    background: rgba(244, 186, 77, 0.2);
    color: #7f5a19;
}

.module-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.module-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0;
}

.module-card p {
    margin-bottom: 0;
}

.roadmap-card {
    margin-top: 1.25rem;
}

.clean-list {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.clean-list li {
    margin-bottom: 0.65rem;
    color: var(--ink-soft);
}

.compact-list {
    margin-top: 0.9rem;
}

.compact-list li {
    margin-bottom: 0.5rem;
}

.dashboard-overview,
.dashboard-workflows {
    margin-bottom: 1.25rem;
}

.dashboard-counts {
    margin-bottom: 1.25rem;
}

.module-card,
.workflow-card,
.overview-card {
    height: 100%;
}

.count-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: space-between;
}

.count-card-link {
    color: inherit;
    text-decoration: none;
}

.count-card-link:hover {
    color: inherit;
}

.count-card-link .count-label::after {
    content: 'Open';
    margin-left: 0.6rem;
    font-size: 0.7rem;
    color: var(--teal);
}

.count-label {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.count-value {
    display: block;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.count-value-text {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.module-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.module-card .button-muted {
    align-self: flex-start;
    margin-top: auto;
}

.workflow-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.workflow-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem;
    border-radius: var(--radius-md);
    background: rgba(17, 32, 46, 0.035);
}

.workflow-step strong,
.overview-tile strong {
    display: block;
    margin-bottom: 0.2rem;
}

.workflow-step p,
.overview-tile p {
    margin-bottom: 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: #fbf4e7;
    font-weight: 700;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.overview-tile {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(244, 186, 77, 0.1);
    border: 1px solid rgba(16, 36, 56, 0.08);
}

.overview-tile span {
    display: block;
    font-size: 0.77rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.toolbar {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.export-dropdown {
    position: relative;
}

.export-dropdown summary {
    list-style: none;
    cursor: pointer;
}

.export-dropdown summary::-webkit-details-marker {
    display: none;
}

.export-dropdown-toggle {
    gap: 0.45rem;
}

.export-dropdown-toggle::after {
    content: "▾";
    font-size: 0.82rem;
    line-height: 1;
}

.export-dropdown[open] .export-dropdown-toggle::after {
    content: "▴";
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 190px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    padding: 0.35rem;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.35rem;
    column-gap: 0.8rem;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 52px;
    text-decoration: none;
    color: var(--ink);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--line-input);
    background: #ffffff;
}

.export-dropdown-item:hover {
    background: var(--subtle-2);
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.inline-edit-action-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.4rem;
}

.inline-edit-button {
    appearance: none;
    border: 1px solid rgba(13, 81, 104, 0.24);
    background: linear-gradient(180deg, rgba(31, 83, 97, 0.08), rgba(31, 83, 97, 0.02));
    padding: 0.28rem 0.75rem;
    margin: 0;
    min-height: 30px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #0d5168;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.inline-edit-button:hover {
    color: #0a3d4f;
    box-shadow: 0 8px 16px rgba(17, 32, 46, 0.1);
    transform: translateY(-1px);
}

.field-wide {
    grid-column: span 3;
}

.system-users-user-field {
    grid-column: span 2;
}

.field label,
.field legend {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-input);
    background: #ffffff;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--placeholder);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: #65737f;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(28, 79, 129, 0.15);
}

.field input[readonly],
.field input[disabled],
.field select[disabled],
.field textarea[disabled] {
    background: rgba(17, 32, 46, 0.06);
    border-color: rgba(16, 36, 56, 0.2);
    color: #4d5f6e;
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}

.field input[readonly]:hover,
.field input[disabled]:hover,
.field select[disabled]:hover,
.field textarea[disabled]:hover {
    background: rgba(17, 32, 46, 0.06);
}

.field .locked-field,
.field .locked-field:disabled,
.field .locked-field[readonly] {
    background-color: rgba(17, 32, 46, 0.1) !important;
    border-color: rgba(16, 36, 56, 0.24) !important;
    color: #3f5364 !important;
    -webkit-text-fill-color: #3f5364 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.field .serial-input.valid.modified,
.field .serial-input.invalid {
    outline: none !important;
}

.field .reason-input-invalid,
.field .reason-input-invalid:focus {
    border-color: #c81e1e !important;
    box-shadow: 0 0 0 2px rgba(200, 30, 30, 0.14);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.fieldset-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 50px;
    padding: 0.25rem 0;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.table-shell {
    overflow: hidden;
}

.table-shell table {
    width: 100%;
    border-collapse: collapse;
}

.table-shell thead th {
    background: var(--subtle);
    color: var(--ink-soft);
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line);
}

.table-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.table-sort-indicator {
    min-width: 0.7rem;
    font-size: 0.9em;
    opacity: 0.8;
}

.table-sort:hover {
    color: var(--accent);
}

.table-shell tbody td {
    padding: 0.65rem 0.75rem;
    border-top: 1px solid #edf1f4;
    font-size: 0.83rem;
    vertical-align: middle;
}

.table-shell tbody tr:nth-child(even) {
    background: transparent;
}

.table-shell tbody tr:hover td {
    background: #f8fbfd;
}

.table-shell tbody tr.owner-needs-verification {
    box-shadow: inset 4px 0 0 rgba(185, 28, 28, 0.72);
}

.table-shell tbody tr.owner-needs-verification td {
    background: linear-gradient(180deg, rgba(254, 226, 226, 0.95), rgba(255, 241, 242, 0.98)) !important;
}

.table-shell tbody tr.owner-needs-verification:hover td {
    background: linear-gradient(180deg, rgba(252, 208, 208, 0.98), rgba(254, 226, 226, 1)) !important;
}

.move-id-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 36, 56, 0.2);
    background: rgba(17, 32, 46, 0.07);
    color: #0d5168;
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.move-legend {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 36, 56, 0.16);
    background: rgba(17, 32, 46, 0.04);
    margin: 0.35rem 0 0.75rem;
}

.move-legend-title {
    font-weight: 700;
    color: var(--ink);
}

.move-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ink-soft);
}

.move-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: transparent;
    border-left: 4px solid transparent;
    border-top: 1px solid rgba(16, 36, 56, 0.14);
    border-right: 1px solid rgba(16, 36, 56, 0.14);
    border-bottom: 1px solid rgba(16, 36, 56, 0.14);
}

.move-legend-swatch.history-move-color-0 {
    border-left-color: rgba(13, 81, 104, 0.62);
}

.table-shell tbody tr.history-move-row.history-move-color-0 {
    box-shadow: inset 4px 0 0 rgba(13, 81, 104, 0.62);
}

.table-shell tbody tr.history-move-row.history-move-color-1 {
    box-shadow: inset 4px 0 0 rgba(123, 87, 24, 0.66);
}

.table-shell tbody tr.history-move-row.history-move-color-2 {
    box-shadow: inset 4px 0 0 rgba(101, 40, 122, 0.58);
}

.table-shell tbody tr.history-move-row.history-move-color-3 {
    box-shadow: inset 4px 0 0 rgba(29, 93, 73, 0.58);
}

.table-shell tbody tr.history-move-row.history-move-color-4 {
    box-shadow: inset 4px 0 0 rgba(128, 57, 36, 0.58);
}

.table-shell tbody tr.history-move-row.history-move-color-5 {
    box-shadow: inset 4px 0 0 rgba(24, 63, 135, 0.58);
}

.history-group-row td {
    background-clip: padding-box;
}

.history-group-toggle {
    align-self: flex-start;
    padding: 0.25rem 0.6rem;
    font-size: 0.74rem;
}

.history-group-detail-row td {
    background: rgba(17, 32, 46, 0.02);
}

.history-group-change-list {
    display: grid;
    gap: 0.5rem;
}

.history-group-change-item {
    border: 1px solid rgba(16, 36, 56, 0.12);
    border-left: 3px solid rgba(13, 81, 104, 0.42);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    background: rgba(255, 255, 255, 0.7);
}

.muted {
    color: var(--ink-soft);
}

.strong-stack {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tag-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 650;
    border: 1px solid transparent;
}

.tag-chip {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: #bcd0e4;
}

.status-chip {
    background: var(--warn-bg);
    color: var(--warn-text);
    border-color: var(--warn-border);
}

.status-chip.live {
    background: var(--ok-bg);
    color: var(--ok-text);
    border-color: var(--ok-border);
}

.certification-toggle-chip {
    border: 1px solid transparent;
    font: inherit;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.certification-toggle-chip:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(13, 81, 104, 0.35);
    box-shadow: 0 6px 16px rgba(17, 32, 46, 0.16);
}

.certification-toggle-chip:not(:disabled):focus-visible {
    outline: 2px solid rgba(13, 81, 104, 0.55);
    outline-offset: 2px;
}

.certification-toggle-chip:disabled {
    cursor: not-allowed;
}

.callout {
    margin-bottom: 1rem;
    background: var(--subtle);
}

.callout.warning {
    background: var(--warn-bg);
    border-color: var(--warn-border);
}

.callout.warning strong {
    color: var(--warn-text);
}

.callout.success {
    background: var(--ok-bg);
    border-color: var(--ok-border);
}

.callout.success strong {
    color: var(--ok-text);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--ink-soft);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.detail-tile {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(17, 32, 46, 0.035);
}

.detail-tile span {
    display: block;
    font-size: 0.77rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-tile strong {
    display: block;
    margin-top: 0.25rem;
}

.action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.inline-links {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inline-links a {
    text-decoration: none;
}

.validation-summary-errors {
    color: #8a2e1c;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@media (max-width: 1100px) {
    .hero-panel,
    .two-up,
    .three-up,
    .filter-grid,
    .form-grid,
    .detail-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: span 1;
    }

    .system-users-user-field {
        grid-column: span 1;
    }
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.25rem;
    min-height: 100vh;
    padding: 1.25rem;
    align-items: start;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: start;
    position: sticky;
    top: 1.25rem;
}

.sidebar-brand,
.nav-card,
.topbar-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 244, 0.96);
    box-shadow: var(--card-shadow);
}

.sidebar-brand {
    padding: 1.35rem;
}

.sidebar-brand .eyebrow {
    color: var(--gold-dark);
}

.sidebar-brand h2,
.topbar-shell strong {
    color: var(--navy);
}

.sidebar-brand h2 {
    margin-bottom: 0.35rem;
}

.sidebar-brand p {
    color: var(--ink-soft);
    margin-bottom: 0;
}

.nav-card {
    padding: 1rem;
}

.nav-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-section-label {
    margin-top: 0.85rem;
    margin-bottom: 0.35rem;
    padding: 0 0.45rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
}

.nav-link {
    display: block;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(244, 186, 77, 0.26);
    box-shadow: inset 0 0 0 1px rgba(201, 143, 43, 0.28);
    color: var(--navy);
}

.app-sidebar .nav-link,
.app-sidebar .nav-link:visited,
.app-sidebar .nav-card a,
.app-sidebar .nav-card a:visited {
    color: var(--ink) !important;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active:visited,
.app-sidebar .nav-link:hover:visited,
.app-sidebar .nav-card a.active,
.app-sidebar .nav-card a:hover {
    color: var(--navy) !important;
}

.admin-user-scope {
    align-items: start;
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-self: start;
}

.topbar-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.35rem;
    position: sticky;
    top: 1.25rem;
    z-index: 5;
}

.topbar-subtitle {
    color: var(--ink-soft);
    margin-top: 0.2rem;
}

.topbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: flex-end;
}

.mode-pill,
.user-pill,
.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: #fffdf9;
    color: var(--ink);
    font-size: 0.85rem;
}

.mode-pill-warning {
    background: rgba(244, 186, 77, 0.2);
    border-color: rgba(201, 143, 43, 0.28);
}

.emulation-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0 0 0.9rem;
    padding: 0.95rem 1.2rem;
    border-radius: 20px;
    border: 2px solid rgba(123, 47, 247, 0.45);
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.96), rgba(123, 47, 247, 0.96));
    box-shadow: 0 18px 34px rgba(88, 28, 135, 0.28);
    color: #fff;
}

.emulation-banner strong {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.emulation-banner span {
    flex: 1 1 260px;
    font-weight: 700;
}

.emulation-banner-action {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
}

.emulation-banner-action:hover {
    background: rgba(255, 255, 255, 0.22);
}

.tag-chip {
    margin-bottom: 0.85rem;
    background: rgba(244, 186, 77, 0.18);
    border-color: rgba(201, 143, 43, 0.22);
}

.app-content {
    padding-top: 0;
}

.hero-card-stack .metric-card {
    background: #fffdf9;
    border: 1px solid var(--line);
    box-shadow: var(--card-shadow);
}

.hero-card-stack .metric-card span {
    color: #355463;
    font-weight: 700;
}

.hero-card-stack .metric-card strong {
    color: #11202e;
    font-size: 2rem;
}

.hero-card-stack .metric-card p {
    color: #4d5f6e;
}

.hero-panel .button-secondary {
    background: #fffdf9;
    color: var(--ink);
    border-color: rgba(16, 36, 56, 0.16);
}

.hero-panel .button-secondary:hover {
    background: rgba(17, 32, 46, 0.05);
}

.sidebar-brand .eyebrow {
    color: #8a641f !important;
    opacity: 1;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 1.25rem;
}

.proxies-layout {
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
}

.proxies-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proxies-form-grid .field {
    min-width: 0;
}

.proxies-form-grid .field-wide {
    grid-column: 1 / -1;
}

.admin-grid {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--ink-soft);
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.toolbar-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}

.toolbar-search .field {
    flex: 1 1 240px;
}

.inventory-pager-row {
    justify-content: space-between;
    align-items: flex-end;
}

.inventory-page-nav {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.pager-status-text {
    align-self: center;
}

.pager-row-spacing {
    margin-bottom: 0.75rem;
}

.pager-row-inline-tight {
    margin: 0;
    gap: 0.45rem;
}

.inventory-page-size {
    min-width: 130px;
    margin-left: auto;
    display: inline-flex;
    flex-direction: row !important;
    align-items: center;
    gap: 0.45rem;
}

.inventory-page-size-inline {
    margin-left: 0;
}

.inventory-page-size label {
    margin: 0;
    white-space: nowrap;
    order: 2;
}

.inventory-page-size select {
    order: 1;
    width: auto;
    min-width: 90px;
}

.inventory-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
    padding: 0.55rem 0.15rem;
    position: sticky;
    top: 1rem;
    z-index: 22;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(251, 248, 242, 0.96);
    backdrop-filter: blur(3px);
}

.inventory-bulk-toolbar-tight {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.inventory-bulk-selection {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inventory-bulk-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: rgba(17, 32, 46, 0.06);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.inventory-bulk-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.row-actions-inline-end {
    justify-content: flex-end;
    margin: 0;
    gap: 0.5rem;
}

.table-shell thead th.select-column,
.table-shell tbody td:first-child {
    width: 44px;
    text-align: center;
}

.inventory-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0d5168;
}

.table-shell tbody tr.inventory-row-selected td {
    background: rgba(244, 186, 77, 0.22) !important;
}

.table-shell tbody tr.inventory-row-pending {
    box-shadow: inset 4px 0 0 rgba(200, 30, 30, 0.72);
}

.table-shell tbody tr.inventory-row-pending td {
    background: linear-gradient(180deg, rgba(255, 241, 242, 0.72), rgba(255, 251, 244, 0.96));
}

.pending-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(200, 30, 30, 0.35);
    background: rgba(254, 226, 226, 0.9);
    color: #8a2e1c;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.pending-pill:hover,
.pending-pill:focus {
    background: rgba(254, 202, 202, 0.95);
    border-color: rgba(200, 30, 30, 0.52);
    color: #7f1d1d;
}

.table-shell tbody tr.pending-group-row td {
    background: rgba(17, 32, 46, 0.015);
}

.table-shell tbody tr.pending-group-detail-row td {
    background: rgba(17, 32, 46, 0.04);
}

.pending-group-count-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    margin-left: 0.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(13, 81, 104, 0.14);
    border: 1px solid rgba(13, 81, 104, 0.25);
    color: #0d5168;
    font-size: 0.72rem;
    font-weight: 800;
}

.bulk-edit-summary {
    margin-bottom: 0;
}

.bulk-edit-preview {
    margin-top: -0.2rem;
    margin-bottom: 0.85rem;
    color: var(--ink-soft);
}

.bulk-edit-guidance {
    margin-bottom: 0.9rem;
}

.bulk-edit-progress {
    margin-top: -0.45rem;
    margin-bottom: 0.85rem;
    color: #0d5168;
    font-weight: 700;
}

.previous-value-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    padding: 0;
    margin: 0;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.previous-value-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #0d5168;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.previous-value-list {
    margin-top: 0.3rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: rgba(17, 32, 46, 0.02);
}

.previous-value-list ul {
    margin: 0.3rem 0 0;
    padding-left: 1rem;
}

.previous-value-list li {
    color: var(--ink);
    line-height: 1.35;
}

.bulk-edit-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.bulk-edit-action-row {
    margin-top: 0.9rem;
}

.bulk-mode-toggle-row {
    margin-top: 0;
    margin-bottom: 0.8rem;
    gap: 0.5rem;
    justify-content: flex-end;
}

.modal-toolbar-wrap {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-spacing-md {
    margin-bottom: 1rem;
}

.section-spacing-top-sm {
    margin-top: 1rem;
}

.section-spacing-bottom-sm {
    margin-bottom: 1rem;
}

.callout-spacing-compact {
    margin-bottom: 0.75rem;
}

.callout-no-bottom {
    margin-bottom: 0;
}

.import-result-actions {
    margin-top: 0.65rem;
}

.action-row-top-zero {
    margin-top: 0;
}

.block-spacing-compact {
    margin-bottom: 0.75rem;
}

.callout-spacing-top-compact {
    margin-top: 0.75rem;
}

.callout-spacing-soft-bottom {
    margin-bottom: 0.8rem;
}

.callout-spacing-soft-top {
    margin-top: 0.8rem;
}

.content-grid-align-start {
    align-items: start;
}

.table-row-actions {
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.table-row-actions > .button-link,
.table-row-actions > .button-muted,
.table-row-actions > .button-danger,
.table-row-actions > .button-secondary,
.table-row-actions > .button-primary,
.table-row-actions > a.button-link,
.table-row-actions > a.button-muted,
.table-row-actions > a.button-danger,
.table-row-actions > a.button-secondary,
.table-row-actions > a.button-primary {
    min-width: 6.35rem;
}

.table-row-actions-compact > .button-link,
.table-row-actions-compact > .button-muted,
.table-row-actions-compact > .button-danger,
.table-row-actions-compact > .button-secondary,
.table-row-actions-compact > .button-primary,
.table-row-actions-compact > a.button-link,
.table-row-actions-compact > a.button-muted,
.table-row-actions-compact > a.button-danger,
.table-row-actions-compact > a.button-secondary,
.table-row-actions-compact > a.button-primary {
    min-width: 5.25rem;
}

.table-shell th.action-column,
.table-shell td.action-column-cell {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.table-shell td.action-column-cell {
    padding-right: 0.55rem;
}

.bulk-edit-layout .field-wide {
    grid-column: 1 / -1;
}

.bulk-edit-half {
    min-width: 0;
}

.unique-bulk-edit-shell {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.unique-bulk-edit-progress-panel {
    flex: 0 0 15rem;
    display: flex;
    flex-direction: column;
    min-height: 20rem;
    max-height: 68vh;
    border-right: 1px solid rgba(16, 36, 56, 0.14);
    padding-right: 0.8rem;
}

.unique-bulk-edit-progress-summary {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.unique-bulk-edit-progress-list {
    margin-top: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.unique-bulk-edit-progress-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.22rem 0.35rem;
    border-radius: 10px;
    margin-bottom: 0.2rem;
}

.unique-bulk-edit-progress-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8rem;
    line-height: 1;
}

.unique-bulk-edit-progress-item.is-complete {
    background: rgba(34, 122, 74, 0.14);
    border: 1px solid rgba(34, 122, 74, 0.28);
}

.unique-bulk-edit-progress-item.is-complete .unique-bulk-edit-progress-icon {
    background: rgba(34, 122, 74, 0.92);
    color: #fff;
}

.unique-bulk-edit-progress-item.is-current {
    background: rgba(13, 81, 104, 0.14);
    border: 1px solid rgba(13, 81, 104, 0.28);
}

.unique-bulk-edit-progress-item.is-current .unique-bulk-edit-progress-icon {
    background: rgba(13, 81, 104, 0.92);
    color: #fff;
}

.unique-bulk-edit-progress-item.is-pending {
    background: rgba(17, 32, 46, 0.04);
    border: 1px solid rgba(17, 32, 46, 0.1);
}

.unique-bulk-edit-progress-item.is-pending .unique-bulk-edit-progress-icon {
    background: rgba(17, 32, 46, 0.1);
    color: var(--ink-soft);
}

.unique-bulk-edit-card-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.unique-bulk-edit-card-header {
    margin-bottom: 0.8rem;
}

.unique-bulk-edit-card {
    border: 1px solid rgba(16, 36, 56, 0.16);
    border-radius: 14px;
    padding: 0.9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(251, 248, 242, 0.92));
    animation: unique-bulk-card-slide 180ms ease-out;
}

@keyframes unique-bulk-card-slide {
    from {
        opacity: 0;
        transform: translateX(14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.results-summary {
    color: var(--ink-soft);
    margin-bottom: 0.85rem;
}

.import-format-example {
    margin-bottom: 1rem;
}

.import-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.import-tab-button {
    margin-bottom: 0.45rem;
    border-width: 2px;
    font-weight: 700;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.import-tab-button.tab-button-active {
    background: linear-gradient(180deg, #fff6df, #fef0cf);
    color: #11202e;
    border-color: #f4ba4d;
    box-shadow: 0 0 0 2px rgba(244, 186, 77, 0.32), 0 8px 16px rgba(17, 32, 46, 0.12);
    transform: translateY(-1px);
}

.import-tab-button.tab-button-inactive {
    background: #ffffff;
    color: #3c5368;
    border-color: rgba(16, 36, 56, 0.2);
}

.import-tab-button.tab-button-inactive:hover,
.import-tab-button.tab-button-inactive:focus-visible {
    border-color: rgba(16, 36, 56, 0.36);
}

.import-active-tab-label {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 0.93rem;
}

.import-example-actions {
    margin-top: 0.35rem;
    margin-bottom: 0.55rem;
    align-items: center;
}

.import-example-sheet {
    margin-top: 0.6rem;
    border: 1px solid rgba(16, 36, 56, 0.28);
    border-radius: 14px;
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(17, 32, 46, 0.03), rgba(17, 32, 46, 0.01));
}

.import-example-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.import-example-table th,
.import-example-table td {
    border: 1px solid rgba(16, 36, 56, 0.34);
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
    text-align: left;
}

.import-example-table thead th {
    background: #11202e;
    color: #fbf4e7;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.import-example-table .header-cell {
    background: rgba(244, 186, 77, 0.2);
    font-weight: 700;
}

table tbody tr.import-history-focus td {
    background: rgba(244, 186, 77, 0.22) !important;
    border-top-color: rgba(201, 143, 43, 0.38);
}

.import-count-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: #0d5168;
    font-weight: 700;
    text-decoration: underline;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.import-count-link:hover {
    color: #0a3d4f;
}

.import-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.import-progress {
    width: min(560px, 100%);
    height: 14px;
    accent-color: #0d5168;
}

.import-progress-text {
    margin-bottom: 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 32, 46, 0.42);
    backdrop-filter: blur(4px);
    z-index: 60;
}

.modal-shell {
    position: fixed;
    inset: 1rem auto 1rem 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100vw - 1.25rem));
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    padding: 1.25rem 1.25rem 2.4rem;
    border-radius: 28px;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: #fffdf9;
    box-shadow: 0 28px 70px rgba(17, 32, 46, 0.28);
    z-index: 61;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-close {
    appearance: none;
    border: 1px solid rgba(16, 36, 56, 0.14);
    background: rgba(17, 32, 46, 0.04);
    color: var(--ink);
    border-radius: 999px;
    width: 2.4rem;
    height: 2.4rem;
    font-weight: 800;
}

.modal-close:hover {
    background: rgba(17, 32, 46, 0.08);
}

.modal-actions {
    margin-bottom: 1rem;
    flex: 0 0 auto;
}

.modal-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0 0 2rem;
}

.modal-table-wrap::after {
    content: "";
    display: block;
    height: 4rem;
}

.owner-assets-modal table {
    margin-bottom: 2rem;
}

.owner-assets-modal thead th {
    background: #11202e;
    color: #fbf4e7;
    text-align: left;
    padding: 0.9rem 1rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.owner-assets-modal tbody td {
    padding: 0.95rem 1rem;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

.owner-assets-modal tbody tr:nth-child(odd) {
    background: rgba(17, 32, 46, 0.018);
}

.owner-assets-modal tbody tr:nth-child(even) {
    background: rgba(17, 32, 46, 0.05);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-0 {
    box-shadow: inset 4px 0 0 rgba(13, 81, 104, 0.62);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-1 {
    box-shadow: inset 4px 0 0 rgba(123, 87, 24, 0.66);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-2 {
    box-shadow: inset 4px 0 0 rgba(101, 40, 122, 0.58);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-3 {
    box-shadow: inset 4px 0 0 rgba(29, 93, 73, 0.58);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-4 {
    box-shadow: inset 4px 0 0 rgba(128, 57, 36, 0.58);
}

.owner-assets-modal tbody tr.history-move-row.history-move-color-5 {
    box-shadow: inset 4px 0 0 rgba(24, 63, 135, 0.58);
}

@media (max-width: 1100px) {
    .hero-panel,
    .split-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .hero-card-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }

    .dashboard-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .proxies-form-grid {
        grid-template-columns: 1fr;
    }

    .proxies-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .modal-shell {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        padding: 1rem 1rem 1.75rem;
    }

    .modal-header {
        flex-direction: column;
    }

    .emulation-banner {
        align-items: flex-start;
    }

    .topbar-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-meta {
        justify-content: flex-start;
    }

    .hero-card-stack,
    .dashboard-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metrics {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        min-width: 600px;
    }

    .module-link-row {
        padding: 0.7rem 0.8rem;
    }
}

@media (max-width: 700px) {
    .hero-panel,
    .info-card,
    .toolbar,
    .table-shell,
    .form-shell,
    .callout {
        padding: 1rem;
        border-radius: 18px;
    }

    .app-shell {
        padding: 1rem;
    }

    .nav-card {
        padding: 0.75rem;
    }

    .table-shell {
        overflow-x: auto;
    }

    .toolbar-header,
    .form-header {
        flex-direction: column;
    }

    .hero-card-stack,
    .dashboard-overview {
        grid-template-columns: 1fr;
    }

    .dashboard-summary,
    .dashboard-state-board {
        padding: 0.9rem;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        min-width: 560px;
    }

    .module-link-list {
        grid-template-columns: 1fr;
    }

    .module-link-row {
        min-height: 0;
    }

    .hero-actions {
        margin-top: 0.75rem;
    }

    .bulk-edit-layout {
        grid-template-columns: 1fr;
    }

    .unique-bulk-edit-shell {
        grid-template-columns: 1fr;
    }

    .unique-bulk-edit-progress-panel {
        border-right: 0;
        border-bottom: 1px solid rgba(16, 36, 56, 0.14);
        padding-right: 0;
        padding-bottom: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .inventory-bulk-toolbar {
        align-items: flex-start;
        position: static;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
    }

    .inventory-bulk-actions {
        width: 100%;
    }
}

/* Theme Refresh: unified modern UI */
.toolbar,
.form-shell,
.table-shell,
.info-card,
.callout {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--canvas-strong);
    box-shadow: var(--card-shadow);
}

.toolbar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.field label,
.field legend {
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
    font-weight: 700;
    text-transform: uppercase;
}

input,
select,
textarea,
.form-control,
.form-select,
.filter-grid input,
.filter-grid select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-input);
    background: #fff;
    color: var(--ink);
    min-height: 38px;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(28, 79, 129, 0.15);
}

.button-link,
.button-muted,
.button-danger,
.button-primary,
.button-secondary {
    min-height: 36px;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    font-size: 0.82rem;
}

.button-link,
.button-primary {
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}

.button-muted,
.button-secondary {
    background: #fff;
    border: 1px solid var(--line-input);
    color: var(--ink);
}

.button-danger {
    background: #fff;
    border: 1px solid #e2b6b2;
    color: var(--danger);
}

.button-link:hover,
.button-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: none;
    box-shadow: none;
}

.button-muted:hover,
.button-secondary:hover {
    background: var(--subtle-2);
    border-color: #65737f;
    transform: none;
    box-shadow: none;
}

.button-danger:hover {
    background: #fdeceb;
    transform: none;
    box-shadow: none;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

thead th {
    background: var(--subtle);
    color: var(--ink-soft);
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line);
}

tbody td {
    border-bottom: 1px solid #edf1f4;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f8fbfd;
}

.status-chip,
.pending-pill,
.tag-chip,
.mode-pill,
.user-pill {
    border-radius: var(--radius-sm);
    font-weight: 650;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    text-align: center;
    color: var(--ink-soft);
    background: var(--subtle);
}

.property-manager-roster-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
}

.property-manager-roster-page > .form-shell,
.property-manager-roster-page > .table-shell {
    min-width: 0;
    width: 100%;
}

.property-manager-editor {
    padding: 1rem 1.2rem 0.85rem;
}

.property-manager-editor .form-header {
    margin-bottom: 0.75rem;
}

.property-manager-editor .form-header h1 {
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.property-manager-editor .form-header p:last-child {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.property-manager-editor .form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.7rem 0.8rem;
}

.property-manager-editor .field-wide {
    grid-column: span 6;
}

.property-manager-editor .form-grid > .field:not(.field-wide),
.property-manager-editor .form-grid > fieldset {
    grid-column: span 3;
}

.property-manager-editor .field,
.property-manager-editor fieldset {
    gap: 0.25rem;
}

.property-manager-editor .field label,
.property-manager-editor fieldset legend {
    font-size: 0.64rem;
}

.property-manager-editor .checkbox-row {
    min-height: 26px;
    font-size: 0.78rem;
}

.property-manager-editor .action-row {
    margin-top: 0.75rem;
}

.property-manager-roster-table thead th {
    white-space: nowrap;
}

.property-manager-roster-table tbody td {
    vertical-align: middle;
    padding: 0.75rem 0.85rem;
}

.property-manager-roster-table .checkbox-row {
    min-height: 28px;
    white-space: nowrap;
    font-size: 0.76rem;
}

.property-manager-roster-table .checkbox-row input:checked + span {
    color: var(--accent);
    font-weight: 700;
}

.property-manager-roster-table .strong-stack strong {
    font-size: 0.84rem;
}

.property-manager-roster-table .strong-stack .muted {
    font-family: var(--font-ui);
    font-size: 0.73rem;
}

@media (max-width: 900px) {
    .property-manager-editor .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-manager-editor .field-wide,
    .property-manager-editor .form-grid > .field:not(.field-wide),
    .property-manager-editor .form-grid > fieldset {
        grid-column: span 1;
    }
}

.inventory-scope-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.inventory-scope-switch {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--line-input);
    border-radius: var(--radius-sm);
    background: var(--subtle-2);
}

.inventory-scope-option {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    border-radius: 4px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.inventory-scope-option:hover {
    color: var(--ink);
}

.inventory-scope-option.is-active {
    background: #ffffff;
    border-color: var(--line);
    color: var(--accent);
    box-shadow: var(--card-shadow);
}

.inventory-scope-option:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.inventory-scope-hint {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

@media (max-width: 1100px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-header {
        flex-direction: column;
    }

    .toolbar-actions {
        margin-left: 0;
        width: 100%;
    }

    .table-row-actions {
        justify-content: flex-start;
    }

    .table-row-actions > .button-link,
    .table-row-actions > .button-muted,
    .table-row-actions > .button-danger,
    .table-row-actions > .button-secondary,
    .table-row-actions > .button-primary,
    .table-row-actions > a.button-link,
    .table-row-actions > a.button-muted,
    .table-row-actions > a.button-danger,
    .table-row-actions > a.button-secondary,
    .table-row-actions > a.button-primary {
        min-width: 0;
    }

    .inventory-filter-grid .inventory-filter-tag {
        order: 1;
    }

    .inventory-filter-grid .inventory-filter-custodian {
        order: 2;
    }

    .inventory-filter-grid .inventory-filter-building {
        order: 3;
    }

    .inventory-filter-grid .inventory-filter-description {
        order: 4;
    }

    .inventory-filter-grid .inventory-filter-class {
        order: 5;
    }

    .inventory-filter-grid .inventory-filter-serial {
        order: 6;
    }

    .inventory-filter-grid .inventory-filter-room {
        order: 7;
    }

    .pending-filter-grid .pending-filter-tag,
    .completed-filter-grid .completed-filter-tag {
        order: 1;
    }

    .pending-filter-grid .pending-filter-type,
    .completed-filter-grid .completed-filter-type {
        order: 2;
    }

    .pending-filter-grid .pending-filter-custodian,
    .completed-filter-grid .completed-filter-custodian {
        order: 3;
    }

    .pending-filter-grid .pending-filter-from,
    .completed-filter-grid .completed-filter-from {
        order: 4;
    }

    .pending-filter-grid .pending-filter-to,
    .completed-filter-grid .completed-filter-to {
        order: 5;
    }

    .review-filter-grid .review-filter-custodian {
        order: 1;
    }

    .review-filter-grid .review-filter-username {
        order: 2;
    }

    .review-filter-grid .review-filter-status {
        order: 3;
    }
}

/* ============================================================
   Design system normalization.
   Overrides legacy gold/teal accents and pill geometry that predate
   the current token set. Declared last so it wins without touching
   the original rules.
   ============================================================ */

.owner-assets-modal thead th,
.import-example-table thead th {
    background: var(--subtle);
    color: var(--ink-soft);
    padding: 0.6rem 0.75rem;
    font-size: 0.67rem;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.import-example-table .header-cell {
    background: var(--accent-soft);
}

.mode-pill,
.user-pill,
.inventory-bulk-count,
.pending-group-count-chip,
.move-id-chip {
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 650;
}

.mode-pill,
.user-pill {
    padding: 0.28rem 0.6rem;
    background: #ffffff;
    border-color: var(--line);
    color: var(--ink);
}

.mode-pill-warning {
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-text);
}

.tag-chip {
    background: var(--accent-soft);
    border-color: #bcd0e4;
    color: var(--accent);
}

.pending-group-count-chip,
.move-id-chip {
    background: var(--accent-soft);
    border-color: #bcd0e4;
    color: var(--accent);
}

.inventory-bulk-count {
    background: var(--accent-soft);
    border-color: #bcd0e4;
    color: var(--accent);
}

.inventory-select-checkbox,
.form-check-input {
    accent-color: var(--accent);
}

.table-shell tbody tr.inventory-row-selected td {
    background: var(--accent-soft) !important;
}

.table-shell tbody tr.inventory-row-pending td {
    background: var(--warn-bg);
}

.table-shell tbody tr.inventory-row-pending {
    box-shadow: inset 3px 0 0 var(--warn-text);
}

.pending-pill {
    border-radius: var(--radius-sm);
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-text);
    font-weight: 700;
}

.pending-pill:hover,
.pending-pill:focus {
    background: #f9e9c9;
    border-color: var(--warn-text);
    color: var(--warn-text);
}

.module-link-row:hover .module-link-title,
.bulk-edit-progress,
.previous-value-link {
    color: var(--accent);
}

.module-link-row:hover .module-link-icon {
    background: var(--accent-soft);
    border-color: #bcd0e4;
    color: var(--accent);
}

.hero-panel,
.hero-card-stack .metric-card,
.hero-panel .button-secondary {
    background: #ffffff;
}

.hero-card-stack .metric-card strong {
    color: var(--ink);
}

.hero-panel {
    border-radius: var(--radius-lg);
}

.accent-gold {
    background: var(--accent-soft);
}

.emulation-banner,
.emulation-banner-action {
    border-radius: var(--radius-lg);
}

.empty-state {
    padding: 2rem;
    color: var(--ink-soft);
}

