:root {
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #18202a;
    background: #f2f5f7;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f2f5f7;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(145deg, #e8f1f0 0%, #f5f6f3 55%, #e6ecef 100%);
}

.auth-card,
.welcome-card,
.empty-state {
    border: 1px solid #dbe2e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(29, 46, 56, 0.09);
}

.auth-card {
    width: min(100%, 430px);
    padding: 38px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    line-height: 1.15;
}

h2 {
    font-size: 1.25rem;
}

.eyebrow {
    margin-bottom: 8px;
    color: #18766b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.identity-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.identity-meta .eyebrow {
    margin-bottom: 0;
}

.role-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    background: #e8f6f1;
    color: #155c52;
    font-size: 0.74rem;
    font-weight: 750;
}

.subtitle {
    color: #63717d;
}

form {
    display: grid;
    gap: 10px;
}

label {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid #b8c4ca;
    border-radius: 9px;
    padding: 12px 13px;
    background: #fff;
    color: #18202a;
    font: inherit;
}

input[type="checkbox"] {
    width: auto;
}

select {
    width: 100%;
    border: 1px solid #b8c4ca;
    border-radius: 9px;
    padding: 12px 13px;
    background: #fff;
    color: #18202a;
    font: inherit;
}

input:focus {
    border-color: #18766b;
    outline: 3px solid rgba(24, 118, 107, 0.16);
}

button,
.button-link {
    border: 0;
    border-radius: 9px;
    padding: 12px 18px;
    background: #176f65;
    color: #fff;
    font: inherit;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.auth-card button {
    margin-top: 14px;
}

.secondary-auth-action {
    margin-top: 10px;
}

.secondary-auth-action button {
    width: 100%;
    margin-top: 0;
}

button:hover,
.button-link:hover {
    background: #105b53;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.notice {
    margin: 18px 0 8px;
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 0.92rem;
}

.notice-error {
    border: 1px solid #efc6c2;
    background: #fff2f0;
    color: #8b241e;
}

.notice-success {
    border: 1px solid #b9ddd3;
    background: #eefaf6;
    color: #155c52;
}

.notice-warning {
    border: 1px solid #e4ca80;
    background: #fff8e3;
    color: #684d00;
}

.notice-info {
    border: 1px solid #c8dce8;
    background: #f1f8fc;
    color: #2e566c;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px 18px;
    border-right: 1px solid #d8e0e2;
    background: #fff;
}

.sidebar-brand {
    display: grid;
    gap: 2px;
    margin: 0 8px 28px;
    color: inherit;
    text-decoration: none;
}

.sidebar-brand .eyebrow {
    margin-bottom: 0;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 3px;
}

.sidebar-section-label {
    margin: 20px 13px 3px;
    color: #89949b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-link {
    border-radius: 10px;
    padding: 11px 13px;
    color: #53616b;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link-active {
    background: #e8f3f0;
    color: #155c52;
}

.sidebar-link-active {
    box-shadow: inset 3px 0 #18766b;
}

.sidebar-account {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding: 18px 8px 2px;
    border-top: 1px solid #e4e9eb;
}

.sidebar-user {
    display: grid;
    justify-items: start;
    gap: 4px;
    min-width: 0;
}

.sidebar-user strong,
.sidebar-user > span:not(.role-badge) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user > span:not(.role-badge) {
    color: #6c7880;
    font-size: 0.84rem;
}

.sidebar-account form {
    display: block;
}

.sidebar-logout {
    width: 100%;
}

.app-main {
    min-width: 0;
}

.button-secondary {
    border: 1px solid #aebbc1;
    padding: 9px 14px;
    background: #fff;
    color: #26323b;
}

.button-secondary:hover {
    background: #edf1f2;
}

.page-content {
    display: grid;
    gap: 20px;
    width: min(1100px, calc(100% - 40px));
    margin: 42px auto;
}

.page-content-wide {
    width: min(1240px, calc(100% - 40px));
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.workspace-sync-action {
    display: grid;
    justify-items: end;
    gap: 12px;
    max-width: 390px;
    text-align: right;
}

.table-actions form {
    margin: 0;
}

.sync-form {
    display: block;
}

.table-card {
    overflow-x: auto;
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 18px;
    border-bottom: 1px solid #e6ebed;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #66747d;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-secondary {
    display: block;
    margin-top: 4px;
    color: #6c7880;
    font-size: 0.86rem;
}

.numeric-value {
    font-variant-numeric: tabular-nums;
}

.table-actions {
    text-align: right;
}

.table-actions-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions a,
.back-link {
    color: #176f65;
    font-weight: 700;
    text-decoration: none;
}

.actions-heading {
    text-align: right;
}

.table-actions .table-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 8px 12px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.table-actions .table-action-primary {
    border-color: #176f65;
    background: #176f65;
    color: #fff;
}

.table-actions .table-action-primary:hover {
    border-color: #105b53;
    background: #105b53;
    color: #fff;
}

.table-actions .table-action-secondary {
    border-color: #b8c4ca;
    background: #fff;
    color: #26323b;
}

.table-actions .table-action-secondary:hover {
    border-color: #8d9ba3;
    background: #edf1f2;
    color: #18202a;
}

.table-actions .table-action-button:focus-visible {
    outline: 3px solid rgba(24, 118, 107, 0.22);
    outline-offset: 2px;
}

.organization-status-actions {
    min-width: 220px;
}

.organization-status-actions .table-actions-inner,
.kontur-column-actions .table-actions-inner {
    justify-content: flex-start;
}

.kontur-column-actions {
    min-width: 275px;
}

.kontur-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.8rem;
    font-weight: 750;
}

.status-active {
    background: #e8f6f1;
    color: #155c52;
}

.status-inactive {
    background: #eef0f1;
    color: #5e6870;
}

.status-disabled {
    background: #eef0f1;
    color: #5e6870;
}

.status-not-configured {
    background: #eef0f1;
    color: #5e6870;
}

.status-error {
    background: #fff0ed;
    color: #982f27;
}

.status-pending {
    background: #fff5d9;
    color: #785600;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.section-heading .eyebrow {
    margin-bottom: 3px;
}

.section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.transportation-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
    align-items: end;
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.filter-field-organization,
.filter-field-number {
    grid-column: span 2;
}

.section-card-grid,
.directory-organization-list {
    display: grid;
    gap: 16px;
}

.section-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-card,
.directory-organization-card {
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 22px;
    background: #fff;
}

.section-card > p,
.directory-organization-card > div > p:last-child {
    color: #66747d;
}

.section-link-list,
.directory-type-grid {
    display: grid;
    gap: 8px;
}

.section-link-list a,
.directory-type-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbe2e5;
    border-radius: 10px;
    padding: 12px 14px;
    background: #f8faf9;
    color: #176f65;
    font-weight: 750;
    text-decoration: none;
}

.section-link-list a:hover,
.directory-type-grid a:hover {
    border-color: #8fbdb5;
    background: #eef7f4;
}

.directory-organization-card {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    gap: 24px;
}

.directory-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transportation-filters.directory-filters {
    grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto;
}

.transportation-filters label {
    margin-top: 0;
}

.filter-field {
    display: grid;
    gap: 7px;
}

.filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    grid-column: 1 / -1;
}

.transportation-more-filters {
    grid-column: 1 / -1;
    border-top: 1px solid #e4e9eb;
    padding-top: 12px;
}

.transportation-more-filters summary {
    width: fit-content;
    cursor: pointer;
    color: #176f65;
    font-weight: 750;
}

.transportation-more-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.table-next-step {
    display: block;
    margin-top: 7px;
    color: #465760;
    font-size: 0.84rem;
    font-weight: 650;
}

.workflow-next-step {
    border-color: #8fbdb5;
    background: #f4faf8;
}

.workflow-next-step-content,
.signing-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.workflow-next-step-content p {
    max-width: 760px;
    margin: 6px 0 0;
    color: #53636c;
}

.detail-section-collapsible > summary {
    cursor: pointer;
    color: #25343c;
    font-size: 1.15rem;
    font-weight: 800;
}

.detail-section-collapsible-content {
    margin-top: 18px;
}

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.pagination > :last-child {
    justify-self: end;
}

.secret-output {
    overflow-wrap: anywhere;
    margin: 20px 0 10px;
    border: 1px solid #b8d8d2;
    border-radius: 12px;
    padding: 18px;
    background: #f0f8f6;
    color: #124f47;
    font-size: 0.95rem;
    user-select: all;
}

.form-page {
    width: min(760px, calc(100% - 40px));
    margin: 34px auto 60px;
}

.form-card {
    margin-top: 18px;
    border: 1px solid #dbe2e5;
    border-radius: 16px;
    padding: clamp(24px, 5vw, 42px);
    background: #fff;
    box-shadow: 0 18px 45px rgba(29, 46, 56, 0.07);
}

.integration-heading {
    align-items: center;
    margin: 22px 0 4px;
}

.connection-error-card {
    border: 1px solid #efc6c2;
    border-radius: 12px;
    padding: 18px 20px;
    background: #fff8f7;
}

.connection-error-card h2 {
    margin-bottom: 8px;
    color: #8b241e;
}

.disconnect-form {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e2e7e9;
}

.button-danger-secondary {
    border: 1px solid #d7a4a0;
    background: #fff;
    color: #8b241e;
}

.button-danger-secondary:hover {
    background: #fff0ed;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.user-form-page {
    width: min(920px, calc(100% - 40px));
}

.t1-form-page {
    width: min(920px, calc(100% - 40px));
}

.repeatable-list {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.repeatable-card,
.repeatable-inline,
.t1-review-summary {
    border: 1px solid #dbe2e5;
    border-radius: 12px;
    padding: 16px;
    background: #fafcfc;
}

.repeatable-card-heading,
.repeatable-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.repeatable-card-heading h2,
.access-fieldset > h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.repeatable-inline > div {
    flex: 1 1 auto;
}

.repeatable-add {
    margin-top: 12px;
}

.field-error {
    margin: 6px 0 0;
    color: #9f251d;
    font-size: 0.92rem;
}

.t1-review-summary {
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .repeatable-card-heading,
    .repeatable-inline {
        align-items: stretch;
        flex-direction: column;
    }
}

.access-fieldset {
    margin: 22px 0 0;
    border: 0;
    padding: 0;
}

.access-fieldset legend {
    padding: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.access-card {
    border: 1px solid #dbe2e5;
    border-radius: 12px;
    padding: 17px;
    background: #fafcfc;
}

.access-card-inactive {
    background: #f4f5f5;
}

.access-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    cursor: pointer;
}

.checkbox-option input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.checkbox-option span {
    display: grid;
    gap: 2px;
}

.checkbox-option small {
    color: #6c7880;
    font-weight: 400;
}

.user-access-list {
    display: grid;
    gap: 9px;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.capability-card {
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 22px;
    background: #fff;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.summary-card {
    display: grid;
    gap: 7px;
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 20px 22px;
    background: #fff;
}

.summary-card span {
    color: #66747d;
    font-size: 0.86rem;
    font-weight: 700;
}

.summary-card strong {
    font-size: 1.8rem;
}

.summary-card-attention {
    border-color: #e4ca80;
    background: #fffaf0;
}

.system-status-page {
    display: grid;
    gap: 28px;
}

.system-status-section {
    display: grid;
    gap: 16px;
}

.system-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.system-status-card,
.system-queue-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #8ca0b3;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(28, 45, 61, 0.06);
}

.system-status-card-healthy {
    border-left-color: #2f855a;
}

.system-status-card-waiting,
.system-status-card-not-configured {
    border-left-color: #b7791f;
}

.system-status-card-error {
    border-left-color: #c53030;
}

.system-status-card-inactive {
    border-left-color: #718096;
}

.system-status-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.system-status-heading h3 {
    margin: 0;
}

.system-status-heading p,
.system-status-card > p {
    margin: 8px 0 0;
    color: #52606d;
}

.system-status-badge-healthy {
    color: #22543d;
    background: #c6f6d5;
}

.system-status-badge-waiting,
.system-status-badge-not-configured {
    color: #744210;
    background: #fefcbf;
}

.system-status-badge-error {
    color: #822727;
    background: #fed7d7;
}

.system-status-badge-inactive {
    color: #4a5568;
    background: #edf2f7;
}

.system-status-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

.system-status-dates div {
    display: grid;
    gap: 3px;
}

.system-status-dates dt {
    color: #718096;
    font-size: 0.82rem;
}

.system-status-dates dd {
    margin: 0;
    font-weight: 600;
}

.system-status-error {
    margin-top: 16px;
    padding: 12px 14px;
    color: #822727;
    background: #fff5f5;
    border-radius: 10px;
}

.system-queue-list {
    display: grid;
    gap: 14px;
}

.system-queue-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.system-queue-counts span {
    padding: 8px 12px;
    color: #52606d;
    background: #f4f7fa;
    border-radius: 999px;
}

.system-queue-counts strong {
    margin-left: 5px;
    color: #1f2933;
}

.system-quarantine-section {
    padding: 20px;
    border: 1px solid #feb2b2;
    border-radius: 14px;
    background: #fffafa;
}

.system-quarantine-total {
    padding: 9px 13px;
    color: #822727;
    background: #fed7d7;
    border-radius: 999px;
}

.system-quarantine-section code {
    overflow-wrap: anywhere;
}

.document-list {
    display: grid;
    gap: 0;
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.document-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
}

.document-list-item + .document-list-item {
    border-top: 1px solid #e8edef;
}

.document-list-item > div {
    display: grid;
    gap: 5px;
}

.document-list-item small {
    color: #66747d;
}

.organization-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.organization-overview-card {
    display: grid;
    gap: 16px;
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 20px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.organization-overview-card:hover {
    border-color: #8fbdb5;
    box-shadow: 0 10px 24px rgba(29, 46, 56, 0.08);
}

.organization-overview-heading,
.organization-overview-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.organization-overview-heading > strong {
    font-size: 1.08rem;
}

.organization-overview-counts span {
    display: grid;
    gap: 4px;
    color: #66747d;
    font-size: 0.8rem;
}

.organization-overview-counts strong {
    color: #18202a;
    font-size: 1.15rem;
}

.organization-overview-card small {
    color: #73808a;
}

.transportation-link {
    color: #176f65;
    font-weight: 800;
    text-decoration: none;
}

.transportation-link:hover {
    text-decoration: underline;
}

.transportation-details-eyebrow {
    margin-top: 20px;
}

.transportation-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.transportation-title-line h1 {
    margin-bottom: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-card,
.detail-section {
    border: 1px solid #dbe2e5;
    border-radius: 14px;
    padding: 22px;
    background: #fff;
}

.detail-card h2 {
    margin: 10px 0 8px;
}

.participant-contacts {
    margin-top: 14px;
}

.cargo-summary-grid {
    margin-bottom: 16px;
}

.cargo-conditions {
    margin: 0 0 18px;
    border: 1px solid #e2e8ea;
    border-radius: 12px;
    padding: 16px;
    background: #fafcfc;
}

.cargo-items-table {
    margin-top: 16px;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-list > div {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
    gap: 14px;
}

.detail-list dt {
    color: #66747d;
}

.detail-list dd {
    margin: 0;
    font-weight: 650;
}

.route-timeline,
.history-list {
    display: grid;
    gap: 0;
}

.route-point,
.history-list > div {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 22px;
}

.route-point:not(:last-child)::before,
.history-list > div:not(:last-child)::before {
    position: absolute;
    top: 16px;
    bottom: 0;
    left: 7px;
    width: 2px;
    background: #c8d8d5;
    content: "";
}

.route-marker,
.history-dot {
    z-index: 1;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border: 4px solid #d9efea;
    border-radius: 50%;
    background: #18766b;
}

.route-point h2 {
    margin-bottom: 5px;
}

.route-point p {
    margin-bottom: 7px;
}

.route-point small {
    display: block;
    color: #66747d;
}

.history-list > div {
    grid-template-columns: 22px minmax(0, 1fr) auto;
}

.history-list time {
    color: #66747d;
    font-variant-numeric: tabular-nums;
}

.field-help {
    margin: 5px 0 2px;
    color: #73808a;
    font-size: 0.8rem;
}

.signing-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
    border: 1px solid #cce2dd;
    border-radius: 12px;
    padding: 18px;
    background: #f4fbf9;
}

.signing-confirmation p {
    max-width: 760px;
    margin: 5px 0 0;
    color: #586970;
}

.signing-confirmation form {
    flex: 0 0 auto;
}

.form-actions,
.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.button-cancel {
    padding: 11px 8px;
    color: #58656e;
    font-weight: 700;
    text-decoration: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.welcome-card,
.empty-state {
    padding: clamp(24px, 5vw, 42px);
}

.empty-state {
    box-shadow: none;
}

@media (max-width: 520px) {
    .signing-confirmation {
        align-items: stretch;
        flex-direction: column;
    }

    .signing-confirmation button {
        width: 100%;
    }
    .auth-card {
        padding: 26px 22px;
    }

    .page-heading,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .access-grid {
        grid-template-columns: 1fr;
    }

    .capability-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-summary,
    .organization-overview-grid,
    .details-grid,
    .system-status-grid,
    .section-card-grid,
    .directory-organization-card,
    .directory-type-grid {
        grid-template-columns: 1fr;
    }

    .system-status-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-status-dates {
        grid-template-columns: 1fr;
    }

    .history-list > div {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .history-list time {
        grid-column: 2;
    }

    .document-list-item {
        align-items: stretch;
        flex-direction: column;
    }
}

.participant-picker {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #d8e0e2;
    border-radius: 12px;
    background: #f8faf9;
}

.participant-picker h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.participant-picker-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.participant-picker-actions button {
    width: auto;
}

.participant-selected {
    color: #176c55;
    font-weight: 700;
}

.participant-search-status {
    min-height: 22px;
    margin-top: 10px;
    color: #4d5e59;
}

.participant-results {
    display: grid;
    gap: 8px;
}

.participant-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c8d5d1;
    border-radius: 10px;
    background: #fff;
    color: #17362e;
    text-align: left;
}

.participant-result:hover,
.participant-result:focus-visible {
    border-color: #1b8265;
    background: #f0f8f5;
}

.participant-result span {
    margin-top: 3px;
    color: #60706b;
    font-size: .9rem;
}

.field-optional {
    color: #6d7b77;
    font-weight: 400;
}

.directory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.directory-tabs a {
    padding: 8px 12px;
    border: 1px solid #cbd7d9;
    border-radius: 8px;
    color: #26474c;
    text-decoration: none;
}

.directory-tabs a:hover,
.directory-tabs a.is-active {
    border-color: #19706f;
    background: #e8f5f3;
    color: #0c5554;
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr auto;
        height: auto;
        padding: 16px 18px;
        border-right: 0;
        border-bottom: 1px solid #d8e0e2;
    }

    .sidebar-brand {
        margin: 0;
    }

    .sidebar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 14px;
    }

    .sidebar-account {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .sidebar-user > span:not(.role-badge) {
        display: none;
    }

    .sidebar-account form {
        width: auto;
    }

    .sidebar-logout {
        width: auto;
    }

    .page-content,
    .form-page {
        width: min(100% - 28px, 1240px);
        margin-top: 24px;
    }

    .transportation-filters,
    .transportation-filters.directory-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .transportation-more-filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .transportation-filters,
    .transportation-filters.directory-filters,
    .transportation-more-filters-grid {
        grid-template-columns: 1fr;
    }

    .workflow-next-step-content {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-field-organization,
    .filter-field-number {
        grid-column: auto;
    }

    .filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pagination > * {
        justify-self: stretch;
    }
}
