:root {
    color-scheme: light;
    --ink: #162a32;
    --muted: #667781;
    --paper: #ffffff;
    --canvas: #f3f5f6;
    --primary: #0b84f3;
    --accent: #ff8a1f;
    --danger: #db3349;
    --line: #dce3e7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 64px;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 54px;
    object-fit: contain;
}

.version {
    color: var(--primary);
    font-weight: 800;
}

.admin-actions,
.section-actions,
.card-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    display: flex;
    align-items: center;
    list-style: none;
    cursor: pointer;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-avatar,
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    background: #dce9f0;
    border: 3px solid white;
    box-shadow: 0 8px 22px rgb(22 42 50 / 18%);
}

.profile-menu summary .profile-avatar {
    width: 56px;
    height: 56px;
}

.profile-avatar-initials,
.user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1b9bc4;
    color: white;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    flex: 0 0 auto;
}

.profile-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 20;
    width: 240px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgb(22 42 50 / 18%);
    overflow: hidden;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.profile-card > div strong,
.profile-card > div span {
    display: block;
}

.profile-card > div span {
    color: var(--muted);
}

.profile-avatar-large {
    width: 56px;
    height: 56px;
    font-size: 1rem;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    background: white;
    color: var(--ink);
    text-decoration: none;
    text-align: left;
}

.profile-item span[aria-hidden="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    color: #53616a;
    flex: 0 0 18px;
}

.profile-item:hover {
    background: #f4f8fb;
}

.profile-button {
    cursor: pointer;
}

.breadcrumb {
    margin: 18px 0 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 100%;
    margin: 0;
    padding: 16px 20px;
    list-style: none;
    background: #e9edf0;
    border: 1px solid #dfe5e8;
    border-radius: 5px;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    color: var(--muted);
    white-space: nowrap;
}

.breadcrumb li + li::before {
    flex: 0 0 auto;
    margin: 0 18px;
    color: #7b8991;
    font-size: 1.35rem;
    line-height: 1;
    content: "\203A";
}

.breadcrumb a,
.breadcrumb span {
    display: block;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.breadcrumb [data-breadcrumb-collapse].is-collapsed {
    max-width: 44px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb [aria-current="page"] {
    color: #7aae22;
    font-style: italic;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-width: 2px;
    box-shadow: none;
    flex: 0 0 auto;
}

.user-avatar-preview {
    width: 86px;
    height: 86px;
    margin-top: 10px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 8px 22px rgb(22 42 50 / 14%);
}

.login-card,
.hero,
.empty,
.company-card,
.form-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.login-card {
    width: min(460px, 100%);
    margin: 80px auto;
    padding: 36px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: -6px 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.login-brand img {
    display: block;
    width: auto;
    height: 74px;
    object-fit: contain;
}

.login-brand span {
    color: var(--primary);
    font-weight: 900;
}

.login-card h1 {
    margin-top: 0;
    font-size: 1.45rem;
    text-transform: uppercase;
}

.stack {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 650;
}

input {
    width: 100%;
    border: 1px solid #bdc9d0;
    border-radius: 7px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fafdff;
}

select {
    width: 100%;
    border: 1px solid #bdc9d0;
    border-radius: 7px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fafdff;
}

input:focus,
select:focus {
    outline: 3px solid rgb(11 132 243 / 16%);
    border-color: var(--primary);
}

.form-card {
    overflow: hidden;
}

.form-section {
    padding: 28px;
    border-bottom: 1px solid var(--line);
}

.form-section h2 {
    margin: 4px 0 22px;
}

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

.span-2 {
    grid-column: span 2;
}

.project-option-card {
    margin-top: 4px;
    padding: 16px;
    background: #f7fbfd;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.document-edit-file-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    padding: 14px 16px;
    background: #f7fbfd;
    border: 1px solid #d8e7ee;
    border-radius: 12px;
}

.document-edit-file-summary > div {
    min-width: 0;
}

.document-edit-file-summary span:not(.file-type-mini) {
    display: block;
    margin-bottom: 3px;
    color: #66808f;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.document-edit-file-summary strong {
    display: block;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.document-edit-file-summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
}

.file-type-mini {
    display: inline-flex;
    min-width: 48px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    color: white;
    background: #111827;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 850;
    line-height: 1;
}

.file-type-mini.file-download-pdf {
    background: #e04444;
}

.file-type-mini.file-download-archive {
    background: #d8a10f;
}

.file-type-mini.file-download-image {
    background: #8b5a2b;
}

.file-type-mini.file-download-excel {
    background: #198754;
}

.file-type-mini.file-download-word {
    background: #2d67bd;
}

.file-type-mini.file-download-powerpoint {
    background: #cc5d32;
}

label small {
    font-weight: 400;
}

input[readonly] {
    background: #edf1f3;
    color: var(--muted);
}

.form-actions {
    padding: 22px 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    padding: 12px 18px;
    background: var(--primary);
    color: white;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
}

.button-secondary {
    background: var(--ink);
}

.button-danger {
    background: var(--danger);
}

.button-muted {
    background: #7b8991;
}

.button-small {
    padding: 9px 11px;
    font-size: .82rem;
}

.document-action-button {
    gap: 9px;
    border: 1px solid transparent;
    box-shadow: none;
}

.document-action-button-back {
    color: #ffffff;
    background: #607483;
    border-color: #607483;
}

.document-action-button-viewer {
    color: #ffffff;
    background: #1688dc;
    border-color: #1688dc;
}

.button-svg-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: currentColor;
}

.button-svg-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.document-add-button {
    gap: 10px;
    min-width: 132px;
    padding: 10px 14px;
    border: 1px solid transparent;
    box-shadow: none;
    line-height: 1.05;
}

.document-add-button-reference {
    color: #ffffff;
    background: #5b4ac8;
    border-color: #5b4ac8;
}

.document-add-button-project {
    color: #ffffff;
    background: #087fc4;
    border-color: #087fc4;
}

.document-add-button-mine {
    color: #ffffff;
    background: #168f9b;
    border-color: #168f9b;
}

.document-add-button-icon {
    display: inline-flex;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: currentColor;
}

.document-add-button-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.document-add-button-label {
    display: grid;
    gap: 2px;
    text-align: left;
    font-size: .82rem;
    font-weight: 760;
    letter-spacing: .01em;
}

.alert {
    margin-top: 24px;
    padding: 14px 18px;
    border-left: 5px solid var(--danger);
    background: #fff0f2;
}

.notice {
    margin-top: 24px;
    padding: 14px 18px;
    border-left: 5px solid #1a9a55;
    background: #e9f9f0;
}

.credential-box {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: #fff8ec;
}

.credential-box p {
    margin: 8px 0;
}

.credential-box code {
    font-size: 1rem;
    color: var(--ink);
}

.dashboard-hero {
    align-items: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    min-height: 180px;
    background: #ffffff;
    border-color: #dce8ef;
    box-shadow: 0 12px 34px rgb(22 42 50 / 7%);
}

.dashboard-hero > div:first-child {
    flex: 1 1 auto;
    padding: 38px 380px 38px 34px;
    position: relative;
    z-index: 2;
}

.dashboard-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 3vw, 2.85rem);
    letter-spacing: -.04em;
}

.dashboard-hero p:not(.eyebrow) {
    max-width: 620px;
    color: #4f6270;
    font-size: 1.03rem;
}

.dashboard-hero-logo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(34%, 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: #ffffff;
    border-left: 0;
}

.dashboard-hero-logo img {
    width: min(210px, 72%);
    height: min(150px, 70%);
    object-fit: contain;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.stat-card,
.dashboard-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.stat-card {
    padding: 20px;
    min-height: 118px;
    display: grid;
    gap: 8px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1.1;
}

.stat-card small,
.muted-text {
    color: var(--muted);
}

.stat-card-primary {
    border-color: rgb(11 132 243 / 26%);
    background: #ffffff;
}

.dashboard-stat-card {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    min-height: 112px;
    padding: 20px 22px;
    border-color: #dce7ee;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgb(22 42 50 / 7%);
}

.dashboard-stat-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--dashboard-stat-color);
    background: color-mix(in srgb, var(--dashboard-stat-color) 14%, white);
}

.dashboard-stat-icon svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.stat-card .dashboard-stat-icon {
    color: var(--dashboard-stat-color);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
}

.dashboard-stat-content {
    display: grid;
    gap: 5px;
}

.dashboard-stat-content > span {
    color: #3f5160;
    text-transform: none;
    letter-spacing: 0;
    font-size: .9rem;
    font-weight: 700;
}

.dashboard-stat-content strong {
    color: #102333;
    font-size: 1.7rem;
    line-height: .98;
}

.dashboard-stat-content small {
    color: #6f8190;
    font-size: .8rem;
    line-height: 1.32;
}

.dashboard-stat-blue {
    --dashboard-stat-color: #1677f2;
}

.dashboard-stat-green {
    --dashboard-stat-color: #20a963;
}

.dashboard-stat-purple {
    --dashboard-stat-color: #7650d8;
}

.dashboard-stat-orange {
    --dashboard-stat-color: #f19a15;
}

.dashboard-stat-yellow {
    --dashboard-stat-color: #f2b100;
}

.dashboard-stat-teal {
    --dashboard-stat-color: #14a99b;
}

.dashboard-stat-red {
    --dashboard-stat-color: #e8304f;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.dashboard-panel {
    padding: 22px;
}

.dashboard-panel:first-child {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 10px 20px 18px;
    border-color: #dce8ef;
    box-shadow: 0 12px 34px rgb(22 42 50 / 7%);
}

.dashboard-panel:first-child::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 0;
    width: 240px;
    height: 86px;
    opacity: .42;
    background:
        linear-gradient(#b6d3f5 0 0) 148px 38px / 90px 9px no-repeat,
        linear-gradient(#d8e9fb 0 0) 148px 56px / 70px 8px no-repeat,
        linear-gradient(#d8e9fb 0 0) 226px 74px / 13px 34px no-repeat,
        linear-gradient(#d8e9fb 0 0) 248px 52px / 13px 56px no-repeat,
        linear-gradient(#d8e9fb 0 0) 270px 28px / 13px 80px no-repeat,
        radial-gradient(circle at 92px 92px, rgb(11 132 243 / 12%) 0 55px, transparent 56px);
    pointer-events: none;
}

.compact-title {
    margin: 0 0 12px;
}

.section-title.compact-title {
    margin-top: 0;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.button.dashboard-action-button {
    min-width: 142px;
    min-height: 38px;
    justify-content: center;
    gap: 10px;
    padding: 9px 15px;
    color: #172d40;
    background: #ffffff;
    border: 1px solid #c7d6e2;
    border-radius: 7px;
    font-size: .86rem;
    font-weight: 800;
    box-shadow: none;
}

.button.dashboard-action-button:hover {
    color: #0b72f0;
    background: #f7fbff;
    border-color: #a7c7e6;
}

.dashboard-action-button .button-svg-icon {
    color: #24435c;
}

.permission-diagnostic-panel {
    display: grid;
    gap: 22px;
}

.diagnostic-accounts {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #d8e7f1;
    border-radius: 14px;
    background: #f7fbff;
}

.diagnostic-accounts-header {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.4fr);
    gap: 16px;
    align-items: end;
}

.diagnostic-accounts-header h2 {
    margin: 0;
    color: #102333;
}

.diagnostic-accounts-header p {
    margin: 6px 0 0;
    color: #607586;
}

.diagnostic-search {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}

.diagnostic-search label {
    margin: 0;
}

.diagnostic-search-query input {
    min-width: 220px;
}

.diagnostic-selector {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid #d8e7f1;
    border-radius: 12px;
    background: #f7fbff;
}

.diagnostic-selector label {
    margin: 0;
}

.diagnostic-warnings {
    padding: 14px 16px;
    color: #8a3b00;
    border: 1px solid #f2c078;
    border-radius: 12px;
    background: #fff7e8;
}

.diagnostic-warnings p {
    margin: 0;
}

.diagnostic-warnings p + p {
    margin-top: 6px;
}

.diagnostic-account-list {
    display: grid;
    gap: 8px;
}

.diagnostic-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid #d8e7f1;
    border-radius: 10px;
    background: #ffffff;
}

.diagnostic-account-row.is-selected {
    border-color: #0b72f0;
    box-shadow: 0 0 0 2px rgba(11, 114, 240, .08);
}

.diagnostic-account-row strong {
    display: block;
    color: #102333;
    font-size: .92rem;
}

.diagnostic-account-row small {
    display: block;
    margin-top: 3px;
    color: #607586;
    font-size: .78rem;
}

.diagnostic-audit-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    color: #31536a;
    background: #eef6fb;
    border: 1px solid #c7dceb;
    border-radius: 8px;
    font-size: .74rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.diagnostic-audit-button:hover,
.diagnostic-audit-button:focus-visible {
    color: #0b72f0;
    background: #ffffff;
    border-color: #91bfdf;
    outline: none;
}

.diagnostic-status {
    font-weight: 900;
}

.diagnostic-status-active {
    color: #08743d;
}

.diagnostic-status-suspended,
.diagnostic-status-deleted {
    color: #b71932;
}

.diagnostic-status-archived {
    color: #6d7680;
}

.diagnostic-status-neutral {
    color: #8a5b00;
}

.diagnostic-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #607586;
    font-size: .84rem;
}

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

.diagnostic-summary article {
    padding: 16px;
    border: 1px solid #d8e7f1;
    border-radius: 14px;
    background: #ffffff;
}

.diagnostic-summary span,
.diagnostic-group h2 {
    color: #0b72f0;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.diagnostic-summary strong {
    display: block;
    margin-top: 6px;
    color: #102333;
    font-size: 1.2rem;
}

.diagnostic-summary small {
    display: block;
    margin-top: 4px;
    color: #607586;
}

.diagnostic-group {
    display: grid;
    gap: 12px;
}

.diagnostic-group h2 {
    margin: 0;
}

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

.diagnostic-row,
.diagnostic-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid #d8e7f1;
    border-radius: 12px;
    background: #ffffff;
}

.diagnostic-row strong,
.diagnostic-project-row strong {
    display: block;
    color: #102333;
}

.diagnostic-row small,
.diagnostic-project-row small {
    display: block;
    margin-top: 4px;
    color: #607586;
    line-height: 1.35;
}

.diagnostic-pill,
.diagnostic-project-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.diagnostic-allowed {
    color: #06703c;
    background: #dff7e9;
}

.diagnostic-denied {
    color: #af1730;
    background: #ffe4e9;
}

.diagnostic-project-list {
    display: grid;
    gap: 10px;
}

.diagnostic-project-status {
    color: #325064;
    background: #e9f1f6;
}

.diagnostic-empty {
    margin: 0;
}

@media (max-width: 900px) {
    .diagnostic-accounts-header,
    .diagnostic-search,
    .diagnostic-selector,
    .diagnostic-summary,
    .diagnostic-grid {
        grid-template-columns: 1fr;
    }

    .diagnostic-pagination,
    .diagnostic-account-row,
    .diagnostic-row,
    .diagnostic-project-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.dashboard-directory-trash,
.dashboard-directory-add {
    gap: 10px;
    min-height: 48px;
    padding-inline: 18px;
    box-shadow: none;
}

.dashboard-directory-trash {
    color: #ffffff;
    background: #172d40;
    border-color: #172d40;
}

.dashboard-directory-add {
    color: #ffffff;
    background: #0b72f0;
    border-color: #0b72f0;
}

.dashboard-company-directory {
    border-color: #dce8ef;
    box-shadow: 0 12px 34px rgb(22 42 50 / 7%);
}

.dashboard-company-directory .section-title {
    margin-top: 0;
}

.dashboard-company-directory .company-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.dashboard-company-directory .company-card {
    border-radius: 12px;
    box-shadow: 0 12px 28px rgb(22 42 50 / 8%);
}

.dashboard-company-directory .company-cover {
    height: 132px;
}

.dashboard-company-directory .company-card-body {
    padding: 16px;
}

.dashboard-company-directory .company-card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.02rem;
}

.dashboard-company-directory .company-card-body p {
    margin: 5px 0;
    font-size: .88rem;
}

.dashboard-company-directory .card-actions {
    gap: 7px;
    margin-top: 12px;
}

.dashboard-company-directory .button-small {
    padding: 7px 9px;
    font-size: .76rem;
}

.dashboard-company-overview,
.dashboard-company-projects {
    grid-column: 1 / -1;
}

.dashboard-company-directory {
    grid-column: 1 / -1;
}

.dashboard-company-card {
    display: grid;
    grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.dashboard-company-card-archived {
    background: #eef1f3;
    color: #7b878e;
}

.dashboard-company-card-archived .dashboard-company-media {
    opacity: .65;
    filter: grayscale(1);
}

.dashboard-company-media {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #edf5f8;
}

.dashboard-company-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-company-media > span {
    width: 94px;
    height: 94px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--primary);
    border-radius: 24px;
    font-size: 1.6rem;
    font-weight: 900;
}

.dashboard-company-content {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 26px;
}

.dashboard-company-content h2 {
    margin: 0;
}

.dashboard-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-company-meta span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf4f7;
    color: #41525c;
    font-size: .78rem;
    font-weight: 800;
}

.panel-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-list a,
.mini-list div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbfd;
    color: var(--ink);
    text-decoration: none;
}

.mini-list small {
    color: var(--muted);
}

.recent-company-list {
    display: grid;
    gap: 16px;
}

.recent-company-card {
    display: grid;
    grid-template-columns: minmax(150px, 36%) minmax(0, 1fr);
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 14px 35px rgb(22 42 50 / 10%);
}

.recent-company-card-archived {
    background: #eef1f3;
    border-color: #cfd8dd;
    box-shadow: none;
}

.recent-company-card-archived .recent-company-media {
    background: #dde5e9;
    opacity: .62;
    filter: grayscale(1);
}

.recent-company-card-archived .recent-company-content strong,
.recent-company-card-archived .recent-company-content small,
.recent-company-card-archived .recent-company-content em {
    color: #7b878e;
}

.recent-company-media {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eef4f7;
}

.recent-company-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-company-media > span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--primary);
    border-radius: 24px;
    font-weight: 900;
    font-size: 1.5rem;
}

.recent-company-content {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 24px;
}

.recent-company-content strong {
    font-size: 1.25rem;
}

.recent-company-content small {
    color: var(--muted);
}

.recent-company-content em {
    color: #84664d;
    font-style: normal;
    font-weight: 800;
    text-decoration: underline;
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 34px;
}

.timeline-list::before {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 18px;
    width: 3px;
    content: "";
    background: #53616a;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 18px;
    --timeline-color: #25b9df;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    margin-left: 4px;
    background: white;
    border: 4px solid var(--timeline-color);
    border-radius: 999px;
}

.timeline-marker::after {
    content: none;
}

.timeline-create {
    --timeline-color: #27ae60;
}

.timeline-update {
    --timeline-color: #f39c12;
}

.timeline-delete {
    --timeline-color: #db3349;
}

.timeline-trash {
    --timeline-color: #7b8991;
}

.timeline-radmin {
    --timeline-color: #db3349;
}

.timeline-radmin .timeline-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: #db3349;
    border-color: #db3349;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.timeline-radmin .timeline-marker::before {
    content: "!";
}

.timeline-content {
    position: relative;
    display: grid;
    gap: 4px;
    padding-top: 0;
}

.timeline-content::before {
    content: none;
}

.timeline-content time {
    display: block;
    order: 1;
    color: var(--timeline-color);
    font-size: 1.9rem;
    font-weight: 900;
    line-height: .95;
    white-space: nowrap;
}

.timeline-content strong {
    order: 2;
    color: var(--timeline-color);
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.timeline-content p {
    order: 3;
    max-width: 72ch;
    margin: 4px 0 0;
    color: #354b55;
    line-height: 1.45;
}

.timeline-content p small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 750;
}

.timeline-list-compact {
    gap: 24px;
}

.timeline-list-compact .timeline-content time {
    font-size: 1.35rem;
}

.timeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.timeline-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    padding-left: 56px;
}

.timeline-pagination a {
    min-width: 38px;
    padding: 9px 12px;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    background: #eef3f5;
    border-radius: 7px;
    font-weight: 800;
}

.timeline-pagination a.active {
    color: white;
    background: var(--primary);
}

.timeline-pagination a.is-disabled {
    color: #a7b0b5;
    pointer-events: none;
    background: #f3f6f7;
}

.filter-card,
.password-card,
.table-card {
    margin: 20px 0;
    padding: 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.list-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0;
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.list-tools label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-tools label:last-child {
    width: min(430px, 100%);
}

.list-tools select {
    width: auto;
    min-width: 76px;
}

.list-footer {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px 0 24px;
}

.list-summary {
    color: var(--muted);
    font-size: .88rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 11px;
    background: var(--paper);
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
}

.pagination-button:hover:not(:disabled),
.pagination-button:not(.is-disabled):hover,
.pagination-button.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.pagination-button:disabled,
.pagination-button.is-disabled {
    color: #a7b0b5;
    cursor: default;
    pointer-events: none;
}

[data-list-item][hidden] {
    display: none !important;
}

.filter-card {
    max-width: 520px;
}

.scope-tabs {
    display: flex;
    gap: 10px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.password-card {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 18px;
}

.password-card h2,
.password-card p {
    margin: 0 0 6px;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
}

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

th,
td {
    padding: 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    background: #edf3f6;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.role-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 7px;
    background: #eaf4fc;
    color: #176aa8;
    font-size: .78rem;
    font-weight: 800;
}

.owner-badge {
    display: inline-flex;
    margin-top: 6px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #fff1d6;
    color: #895600;
    font-size: .72rem;
    font-weight: 800;
}

.admin-row-actions,
.inline-delete-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-delete-form input {
    width: 190px;
    padding: 8px 10px;
    font-size: .8rem;
}

.status-invited {
    background: #e7f1ff;
    color: #245f9b;
}

.page-heading {
    margin: 34px 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 4px 0 8px;
}

.hero {
    margin: 36px 0;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hero h1,
.section-title h2 {
    margin: 4px 0 8px;
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.role-badge,
.counter,
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.role-badge {
    min-width: 110px;
    min-height: 110px;
    background: var(--ink);
    color: white;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 34px 0 18px;
}

.counter {
    min-width: 42px;
    min-height: 42px;
    background: var(--accent);
    color: white;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
}

.company-card {
    overflow: hidden;
    padding: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.company-card-archived {
    background: #eef1f3;
    border-color: #cfd8dd;
}

.company-card-archived .company-cover {
    opacity: .48;
    filter: grayscale(1);
}

.company-card-archived h3,
.company-card-archived p,
.company-card-archived small {
    color: #7b878e;
}

.company-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.company-cover {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #dfe8ed;
}

.company-cover-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.company-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.3rem;
    font-weight: 850;
}

.company-card-body {
    padding: 20px;
}

.company-logo,
.company-logo-preview,
.project-image-preview {
    display: block;
    object-fit: contain;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.company-logo {
    width: 72px;
    height: 72px;
}

.company-logo-preview {
    max-width: 240px;
    max-height: 140px;
    margin-top: 18px;
    padding: 10px;
}

.project-image-preview {
    width: min(520px, 100%);
    max-height: 280px;
    margin-top: 18px;
}

.company-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf4fc;
    color: var(--primary);
    font-weight: 850;
    font-size: 1.15rem;
}

.company-card h3 {
    margin-bottom: 6px;
}

.company-card h3 a {
    color: inherit;
    text-decoration: none;
}

.company-card h3 a:hover {
    color: var(--primary);
}

.status-suspended {
    background: #fff0cf;
    color: #8b5a00;
}

.status-archived {
    background: #e8ebed;
    color: #53616a;
}

.status-trash {
    background: #ffe1e6;
    color: #9a2034;
}

.trash-list {
    display: grid;
    gap: 18px;
}

.trash-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 24px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.trash-card h2 {
    margin: 12px 0 6px;
}

.trash-actions {
    display: grid;
    gap: 16px;
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.purge-form {
    display: grid;
    gap: 12px;
}

.purge-form code {
    color: var(--danger);
}

.card-actions {
    margin-top: 20px;
}

.form-help {
    color: var(--muted);
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.member-option {
    display: flex;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fbfdfe;
}

.member-option input {
    width: auto;
    margin-top: 3px;
}

.member-option small {
    display: block;
    margin-top: 4px;
}

.member-automatic {
    background: #edf7ff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
}

.project-card {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.project-card-trash {
    border-color: #efb8c1;
    background: #fff7f8;
}

.project-card-trash .project-cover {
    filter: grayscale(.25);
    opacity: .9;
}

.project-trash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.project-trash-actions form {
    margin: 0;
}

.project-cover-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-cover {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #dfe8ed;
}

.project-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 850;
}

.project-card-body {
    padding: 20px;
}

.project-card h3 {
    margin-bottom: 6px;
}

.project-card h3 a {
    color: inherit;
    text-decoration: none;
}

.project-card h3 a:hover {
    color: var(--primary);
}

.project-number {
    color: var(--primary);
    font-weight: 800;
}

.project-stat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.project-stat-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf4f7;
    color: #41525c;
    font-size: .75rem;
    font-weight: 800;
}

.project-stat-tags .project-stat-warning {
    background: #fff0d9;
    color: #9b5d00;
}

.project-admin-authorizations {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.member-count {
    color: var(--muted);
    font-size: .78rem;
}

.project-hero,
.project-live-overview,
.ged-tabs,
.ged-dashboard {
    margin-bottom: 20px;
}

.project-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #f7fbfd, #e8f5fa);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.project-hero-image {
    width: 250px;
    height: 145px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 3px solid white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgb(22 42 50 / 14%);
}

.project-hero-content {
    flex: 1 1 auto;
}

.project-hero h1 {
    margin: 0 0 6px;
}

.project-hero-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
}

.project-hero-actions .button {
    justify-content: center;
    min-width: 220px;
}

.project-synthesis-button {
    background: #0f86c8;
    border-color: #0f86c8;
    color: white;
}

.project-synthesis-button:hover {
    background: #0b74ad;
    border-color: #0b74ad;
}

.project-live-overview {
    padding: 22px 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 7%);
}

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

.project-live-heading h2 {
    margin: 0;
}

.project-live-heading p:last-child {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    text-align: right;
}

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

.project-live-metric {
    min-width: 0;
    padding: 16px;
    background: #f8fcfe;
    border: 1px solid #d7e7ef;
    border-radius: 12px;
}

.project-live-metric-title {
    color: #526674;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.project-live-total {
    margin: 6px 0 12px;
    color: var(--ink);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.project-live-bar,
.project-live-empty-bar {
    display: flex;
    width: 100%;
    height: 14px;
    overflow: hidden;
    background: #e8f0f5;
    border-radius: 999px;
}

.project-live-segment {
    min-width: 4px;
    background: var(--segment-color);
}

.project-live-segment + .project-live-segment {
    border-left: 2px solid #f8fcfe;
}

.project-live-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 12px;
}

.project-live-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #526674;
    font-size: .82rem;
}

.project-live-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    background: var(--segment-color);
    border-radius: 3px;
}

.project-live-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .86rem;
}

.project-live-metric-placeholder {
    border-style: dashed;
}

.ged-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #74d7ee;
    border: 1px solid #58c7e1;
    border-radius: 10px;
}

.ged-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    color: white;
    font-weight: 800;
    text-decoration: none;
    border-radius: 7px;
}

.ged-tabs a.active {
    background: #173843;
}

.ged-tabs a.disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ged-tabs span {
    display: inline-block;
    min-width: 22px;
    padding: 2px 6px;
    color: #173843;
    background: white;
    border-radius: 999px;
    text-align: center;
}

.ged-tabs .nav-count {
    display: inline-flex;
    width: 24px;
    height: 24px;
    min-width: 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
    font-weight: 900;
    line-height: 1;
    border-radius: 50%;
}

.ged-tabs .nav-count-recent {
    background: #f2b705;
}

.ged-tabs .nav-count-documents {
    background: #22c55e;
}

.ged-tabs .nav-count-private {
    background: #ef4444;
}

.ged-tabs .nav-count-base {
    background: #6b7280;
}

.ged-tabs .nav-count-mine {
    background: #1d7df2;
}

.ged-tabs .nav-tab-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    min-width: 22px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: inherit;
    background: transparent;
    border-radius: 0;
}

.ged-tabs .nav-tab-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.ged-tabs .nav-tab-icon + span {
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border-radius: 0;
}

.ged-tabs .nav-tab-stack {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border-radius: 0;
    line-height: 1.05;
    text-align: left;
}

.ged-tabs .nav-tab-stack span {
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border-radius: 0;
}

.ged-dashboard {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 8%);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin: 18px 0;
}

.tag-cloud-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.document-tag-panel {
    margin: 18px 0 28px;
    padding: 18px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.document-tag-search {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.document-tag-search label {
    flex: 1 1 auto;
}

.all-documents-filter {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: #0877c9;
    background: white;
    border: 2px solid #1594ee;
    border-radius: 6px;
    font: inherit;
    font-size: .82rem;
    font-weight: 850;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.all-documents-filter.is-active {
    color: white;
    background: #1594ee;
}

.tag-filter-button {
    display: inline-flex;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
}

.tag-filter-button:hover,
.tag-filter-button.is-active {
    outline: 3px solid #173843;
    outline-offset: 2px;
}

.tag-filter-button[hidden] {
    display: none;
}

.tag-filter-button-inline:hover,
.tag-filter-button-inline.is-active {
    outline-width: 2px;
    outline-offset: 1px;
}

.tag-chip {
    display: inline-block;
    padding: 6px 10px;
    color: white;
    background: var(--tag-color, #3db5ff);
    border-radius: 7px;
    font-size: .8rem;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    text-shadow: none;
    white-space: nowrap;
}

.document-empty {
    margin-top: 20px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.tag-form {
    max-width: 900px;
    margin-inline: auto;
}

.tag-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-actions {
    margin-top: 0;
    flex-wrap: nowrap;
}

.document-upload-form {
    max-width: 1040px;
    margin-inline: auto;
}

.upload-dropzone {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    color: var(--muted);
    border: 2px dashed #a9c4cf;
    border-radius: 12px;
    background: #f8fcfd;
    text-align: center;
    cursor: pointer;
}

.upload-dropzone strong {
    color: var(--ink);
    font-size: 1.25rem;
}

.upload-dropzone input {
    max-width: 520px;
}

.upload-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1900;
    width: min(520px, calc(100vw - 32px));
    margin: 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #c9ddec;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgb(7 18 27 / 26%);
    transform: translate(-50%, -50%);
}

.upload-progress::before {
    display: block;
    margin-bottom: 12px;
    color: #08283b;
    content: "Envoi du document";
    font-size: 1.05rem;
    font-weight: 850;
}

.upload-progress-bar {
    height: 12px;
    overflow: hidden;
    background: #dce8ec;
    border-radius: 999px;
}

.upload-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #34b7d6);
    transition: width .2s ease;
}

.upload-progress.is-processing .upload-progress-bar span {
    width: 100% !important;
    background: linear-gradient(90deg, #14b8a6 0%, #34b7d6 35%, #eaf6fb 50%, #34b7d6 65%, #14b8a6 100%);
    background-size: 220% 100%;
    animation: upload-processing 1.1s linear infinite;
}

.upload-progress.is-processing [data-upload-progress-text] {
    color: #0f5f7a;
    font-weight: 750;
}

.upload-progress [data-upload-progress-text] {
    margin-top: 12px;
    color: #496778;
    font-size: .92rem;
    line-height: 1.35;
}

@keyframes upload-processing {
    from {
        background-position: 220% 0;
    }

    to {
        background-position: 0 0;
    }
}

.mask-helper {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe0e6;
    border-radius: 10px;
    background: #f8fcfd;
    color: var(--muted);
}

.mask-helper code {
    color: var(--ink);
    white-space: normal;
}

.mask-helper-success {
    border-color: #9bd9b4;
    background: #eefaf2;
    color: #1f7a3f;
}

.mask-helper-warning {
    border-color: #f6c46f;
    background: #fff8ea;
    color: #9a5d00;
}

.mask-helper small {
    display: block;
}

.mask-example-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
}

.mask-example-line code {
    padding: 4px 7px;
    border-radius: 6px;
    background: #edf4f7;
    color: var(--ink);
}

.tag-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-choice {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.tag-choice input {
    width: auto;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.checkbox-card input {
    width: auto;
    margin-top: 3px;
}

.checkbox-card strong,
.checkbox-card small {
    display: block;
}

.checkbox-card small {
    margin-top: 4px;
    color: var(--muted);
}

.private-access[hidden],
.upload-progress[hidden],
[data-upload-error][hidden] {
    display: none;
}

.doe-upload-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgb(8 25 36 / 58%);
}

.doe-upload-modal.is-open {
    display: grid;
}

.doe-upload-modal-card {
    width: min(540px, 100%);
    padding: 24px;
    border: 1px solid #b8d4e8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 90px rgb(7 18 27 / 30%);
}

.doe-upload-modal-card h2 {
    margin: 0 0 8px;
    color: #08283b;
    font-size: 1.35rem;
}

.doe-upload-modal-card p {
    margin: 0;
}

.doe-upload-progress-bar {
    height: 12px;
    overflow: hidden;
    margin: 18px 0 12px;
    border-radius: 999px;
    background: #dce8ec;
}

.doe-upload-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: #168ee6;
    transition: width .2s ease;
}

.doe-upload-progress-bar.is-indeterminate span,
.doe-upload-modal.is-processing .doe-upload-progress-bar span {
    width: 100% !important;
    background: linear-gradient(90deg, #168ee6 0%, #56c5dd 35%, #eef9fc 50%, #56c5dd 65%, #168ee6 100%);
    background-size: 220% 100%;
    animation: upload-processing 1.1s linear infinite;
}

.doe-upload-status {
    color: #496778;
    font-size: .95rem;
    font-weight: 750;
}

.doe-upload-warning {
    margin-top: 8px !important;
    color: #6c8190;
    font-size: .86rem;
}

.doe-upload-modal.is-error .doe-upload-status {
    color: #b42331;
}

.document-table td:nth-child(n+3) {
    text-align: center;
}

.document-table td small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.document-row-archived td {
    color: #6f7a80;
    background: #edf0f1;
}

.document-list-row.document-row-archived {
    color: #6f7a80;
    background: #edf0f1;
}

.document-row-archived strong,
.document-row-archived small,
.document-row-archived .document-title-link {
    color: #6f7a80;
}

.document-row-archived .tag-chip {
    filter: grayscale(1);
    opacity: .58;
}

.tag-row-archived td {
    color: #6f7a80;
    background: #edf0f1;
}

.tag-row-archived .tag-chip {
    filter: grayscale(1);
    opacity: .58;
}

.button-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 7px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
}

.document-status-badge {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.document-search-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
    padding: 18px 20px;
    color: var(--ink);
    background: #f7fbfd;
    border: 1px solid #d8e7ee;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgb(22 42 50 / 6%);
}

.document-search-summary > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.document-search-summary strong {
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.35;
}

.document-search-summary .document-search-reset {
    flex: 0 0 auto;
    gap: 7px;
    padding: 10px 15px;
    color: white;
    background: #df3342;
    border-radius: 999px;
    box-shadow: none;
}

.document-search-summary .document-search-reset:hover {
    background: #b92432;
}

.document-list {
    display: grid;
    gap: 18px;
}

.document-list > .document-list-row {
    position: relative;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 124px;
    padding: 16px 46px 16px 18px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #c9ddec;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgb(13 37 47 / 5%);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.document-bulk-check {
    position: absolute;
    top: 13px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.document-bulk-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.document-bulk-check span {
    display: block;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #a9becc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgb(13 37 47 / 8%);
}

.document-bulk-check input:checked + span {
    background: #1687e8;
    border-color: #1687e8;
    box-shadow: inset 0 0 0 3px #fff, 0 2px 6px rgb(13 37 47 / 8%);
}

.document-bulk-zip-form {
    margin: 0 0 14px;
}

.document-bulk-zip-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    color: #0f2b3d;
    background: #eff8ff;
    border: 1px solid #b9d8ee;
    border-radius: 16px;
}

.document-bulk-summary {
    display: grid;
    gap: 6px;
}

.document-bulk-help {
    color: #496778;
    font-size: .86rem;
}

.document-bulk-help[hidden] {
    display: none;
}

.document-bulk-zip-bar[hidden] {
    display: none;
}

.document-bulk-zip-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: #0f86d8;
    border: 0;
}

.document-bulk-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

.document-bulk-zip-button span {
    display: inline-flex;
    min-width: 34px;
    justify-content: center;
    padding: 3px 6px;
    color: #0f2b3d;
    background: #fff;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 900;
}

.document-bulk-zip-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.document-bulk-zip-button[hidden] {
    display: none;
}

.document-bulk-clear-button {
    color: #8a2430;
    background: #fff;
    border: 1px solid #f0b4bd;
}

.document-bulk-clear-button:hover {
    color: #6f1721;
    background: #fff4f6;
}

.document-view-switch {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0 0 14px;
}

.document-view-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    color: #0f2b3d;
    background: #f5fbff;
    border: 1px solid #c8dbe8;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
}

.document-view-switch-button:hover,
.document-view-switch-button:focus-visible {
    border-color: #7bb9df;
    outline: none;
}

.document-view-switch-button.is-active {
    color: #fff;
    background: #0f2b3d;
    border-color: #0f2b3d;
}

.document-list-simple {
    gap: 10px;
    padding: 0;
    border: 2px solid #c9ddec;
    border-radius: 18px;
    overflow: hidden;
    background: #fafdff;
    box-shadow: 0 10px 26px rgb(13 37 47 / 5%);
}

.document-list-simple * {
    min-width: 0;
}

.document-simple-header,
.document-simple-row {
    display: grid;
    grid-template-columns: 44px 64px minmax(180px, 1fr) minmax(110px, 136px) 64px 66px 64px 82px;
    gap: 8px;
    align-items: center;
}

.document-simple-header {
    padding: 18px 20px 14px;
    color: #193448;
    background: #f6fbff;
    border-bottom: 1px solid #dbe9f2;
    font-size: .82rem;
    font-weight: 900;
}

.document-simple-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-simple-header span:nth-child(4),
.document-simple-header span:nth-child(5),
.document-simple-header span:nth-child(6),
.document-simple-header span:nth-child(7),
.document-simple-header span:nth-child(8) {
    text-align: center;
    transform: translateX(-4px);
}

.document-simple-header span:nth-child(4) {
    transform: translateX(-14px);
}

.document-simple-header span:nth-child(1),
.document-simple-header span:nth-child(2) {
    text-align: left;
}

.document-simple-header span:nth-child(3) {
    transform: translateX(-20px);
}

.document-simple-header span:nth-child(1) {
    padding-left: 4px;
}

.document-simple-row {
    position: relative;
    margin: 0 12px 12px;
    min-height: 76px;
    padding: 13px 34px 13px 14px;
    overflow: hidden;
    color: #183448;
    background: #fff;
    border: 2px solid #c9ddec;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgb(13 37 47 / 4%);
}

.document-list-simple .document-simple-unread-badge {
    width: 18px;
    padding: 6px 1px;
    color: #7dafd9;
    background: #eef9ff;
    border-left: 1px solid #e3f0f7;
    border-radius: 0 14px 14px 0;
    font-size: .5rem;
    letter-spacing: .06em;
}

.document-simple-row:first-of-type {
    margin-top: 12px;
}

.document-simple-cell {
    min-width: 0;
    font-size: .84rem;
    font-weight: 700;
}

.document-simple-title .document-title-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #102b3c;
    font-size: .84rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration-thickness: 1px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-simple-title {
    transform: translateX(-20px);
}

.document-simple-author-date,
.document-simple-number {
    color: #33546a;
}

.document-simple-author-date {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    color: #24445a;
    font-size: .68rem;
    line-height: 1.2;
    text-align: center;
    transform: translateX(-10px);
}

.document-simple-author-name,
.document-simple-upload-date {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-simple-author-name {
    font-weight: 760;
}

.document-simple-upload-date {
    font-weight: 650;
}

.document-simple-number {
    overflow: hidden;
    font-size: .78rem;
}

.document-simple-selection,
.document-simple-type,
.document-simple-number,
.document-simple-revision,
.document-simple-visa,
.document-simple-comments {
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-simple-selection,
.document-simple-type {
    justify-content: flex-start;
    transform: translateX(-10px);
}

.document-simple-selection {
    padding-left: 2px;
    transform: none;
}

.document-simple-check {
    position: relative;
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.document-simple-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.document-simple-check span {
    display: block;
    width: 15px;
    height: 15px;
    background: #fff;
    border: 2px solid #a9becc;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgb(13 37 47 / 8%);
}

.document-simple-check input:checked + span {
    background: #1687e8;
    border-color: #1687e8;
    box-shadow: inset 0 0 0 3px #fff, 0 2px 6px rgb(13 37 47 / 8%);
}

.document-simple-download {
    gap: 0;
}

.document-simple-download .file-type-icon {
    width: 34px;
    height: 42px;
    font-size: .68rem;
}

.document-simple-download .file-ref-badge {
    display: none;
}

.document-simple-download .file-type-label {
    width: auto;
    min-height: 16px;
    justify-content: center;
    padding: 2px 0;
    color: white;
    background: var(--file-color, #111827);
    border-radius: 0;
    font-size: .66rem;
    font-weight: 850;
}

.document-simple-download.file-download-archive .file-type-label {
    color: #172033;
    -webkit-text-fill-color: #172033;
}

.document-simple-empty {
    color: #8aa0ad;
    font-weight: 800;
}

.document-simple-row .document-ref-badge {
    min-width: 36px;
    justify-content: center;
    padding: 7px 9px;
    font-size: .76rem;
}

.document-simple-row .document-number-badge {
    min-width: 44px;
}

.document-simple-row .document-visa-link {
    min-width: 50px;
    justify-content: center;
    padding: 7px 9px;
    font-size: .74rem;
}

.document-simple-row .document-opinion-link {
    min-width: 58px;
    justify-content: center;
    padding: 7px 9px;
    font-size: .78rem;
}

.document-simple-row .document-comment-icon svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-company-directory .company-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .document-simple-header,
    .document-simple-row {
        grid-template-columns: 40px 58px minmax(150px, 1fr) minmax(94px, 116px) 58px 58px 58px 72px;
        gap: 7px;
    }

    .document-simple-header,
    .document-simple-row {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 900px) {
    .document-view-switch {
        display: none;
    }

    .document-list-simple {
        padding: 10px;
        border-radius: 16px;
    }

    .document-simple-header {
        display: none;
    }

    .document-simple-row,
    .document-simple-row:first-of-type {
        display: grid;
        grid-template-columns: 44px 52px auto auto auto auto minmax(0, 1fr);
        grid-template-areas:
            "selection type title title title title title"
            ". type author author author author author"
            ". type number revision visa comments .";
        gap: 8px 12px;
        margin: 0 0 10px;
        padding: 13px;
    }

    .document-simple-selection {
        grid-area: selection;
        align-self: start;
    }

    .document-simple-type {
        grid-area: type;
        align-self: start;
    }

    .document-simple-title {
        grid-area: title;
    }

    .document-simple-author-date {
        grid-area: author;
        align-items: flex-start;
        text-align: left;
        transform: none;
    }

    .document-simple-number,
    .document-simple-revision,
    .document-simple-visa,
    .document-simple-comments {
        display: inline-flex;
        justify-content: flex-start;
    }

    .document-simple-number {
        grid-area: number;
    }

    .document-simple-revision,
    .document-simple-visa,
    .document-simple-comments {
        margin-left: 0;
    }

    .document-simple-revision {
        grid-area: revision;
    }

    .document-simple-visa {
        grid-area: visa;
    }

    .document-simple-comments {
        grid-area: comments;
    }

    .document-simple-cell {
        font-size: .86rem;
    }

    .document-list-simple .document-simple-unread-badge {
        width: 7px;
        padding: 6px 1px;
        color: transparent;
        border-radius: 0;
    }
}

.document-list-row:hover {
    border-color: #afcfe4;
    box-shadow: 0 22px 48px rgb(13 37 47 / 10%);
}

.document-trash-dashboard {
    background: #fff7f8;
    border-color: #f4c8cf;
}

.document-trash-list .document-list-row {
    grid-template-columns: 118px minmax(0, 1fr) 150px;
    min-height: 132px;
    background: #fffafa;
    border-color: #efc8cf;
}

.document-trash-list .document-list-row:hover {
    border-color: #e8aeb8;
}

.document-row-new {
    background: #fff;
}

.document-unread-badge {
    position: absolute;
    inset: 0 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-height: 100%;
    padding: 8px 2px;
    color: #78a9d7;
    background: #eef9ff;
    border-left: 1px solid #e3f0f7;
    border-radius: 0 18px 18px 0;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

.document-unread-badge span {
    display: inline-block;
    transform: rotate(180deg);
}

.document-list > .document-list-row .document-list-download {
    align-self: center;
    justify-self: center;
    width: 78px;
    min-width: 78px;
    min-height: 92px;
    padding: 8px 7px 7px;
    background: #fff;
    border: 2px solid #dbe9f2;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgb(13 37 47 / 5%);
}

.document-list > .document-list-row .document-list-download .file-type-icon {
    width: 48px;
    height: 58px;
    font-size: .72rem;
}

.document-list > .document-list-row .document-list-download .file-type-label {
    width: auto;
    min-height: 19px;
    justify-content: center;
    padding: 3px 0;
    color: white;
    background: var(--file-color, #111827);
    border-radius: 0;
    font-size: .76rem;
    font-weight: 750;
}

.document-list > .document-list-row .document-list-download .file-size {
    font-size: .82rem;
}

.document-list-download .file-type-label::first-line {
    color: white;
}

.document-list-download .file-type-label {
    background: var(--file-color, #111827);
    -webkit-text-fill-color: white;
}

.document-list-download.file-download-archive .file-type-label {
    color: #172033;
    -webkit-text-fill-color: #172033;
}

.file-download-archive .file-type-label {
    color: #172033;
    -webkit-text-fill-color: #172033;
}

.document-list > .document-list-row .document-list-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title facts"
        "meta facts"
        "tags facts";
    column-gap: 24px;
    min-width: 0;
    align-self: start;
    padding-top: 7px;
}

.document-list > .document-list-row.document-row-with-preview .document-list-main {
    grid-template-columns: minmax(340px, 1fr) minmax(120px, 160px) minmax(210px, auto);
    grid-template-areas:
        "title preview facts"
        "meta preview facts"
        "tags preview facts";
    column-gap: 24px;
}

.document-list > .document-list-row.document-row-with-preview .document-list-meta {
    flex-wrap: nowrap;
    max-width: 100%;
}

.document-list > .document-list-row.document-row-with-preview .document-list-facts {
    min-width: 230px;
}

.document-list-image-preview {
    grid-area: preview;
    align-self: center;
    justify-self: center;
    display: flex;
    width: min(150px, 100%);
    height: 82px;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: #fff;
    border: 1px solid #d8e7ef;
    border-radius: 10px;
    cursor: zoom-in;
}

.document-list-image-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.document-list-image-preview:hover,
.document-list-image-preview:focus-visible {
    border-color: #8fc8ec;
    box-shadow: 0 8px 22px rgb(13 37 47 / 10%);
    outline: none;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgb(7 18 27 / 78%);
}

.image-preview-modal.is-open {
    display: flex;
}

.image-preview-modal-card {
    position: relative;
    display: grid;
    width: min(1120px, calc(100vw - 56px));
    max-width: calc(100vw - 56px);
    max-height: 92vh;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.image-preview-modal-title {
    padding-right: 44px;
    color: #08283b;
    font-weight: 800;
    line-height: 1.3;
}

.image-preview-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: #08283b;
    background: #edf5fa;
    border: 1px solid #cfe1eb;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.image-preview-modal-image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: calc(92vh - 98px);
    object-fit: contain;
    border-radius: 10px;
}

.document-list > .document-list-row .document-list-title-block {
    grid-area: title;
    display: grid;
    gap: 2px;
    justify-items: start;
    transform: none;
}

.document-list > .document-list-row .document-list-designation {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    color: #122a38;
    font-size: clamp(.88rem, .9vw, 1rem);
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-decoration: none !important;
}

.document-private-lock {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #dc2626;
    background: currentColor;
    content: "";
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1Zm2 0h6V8a3 3 0 0 0-6 0v2Zm3 4a1.5 1.5 0 0 0-.75 2.8V19h1.5v-2.2A1.5 1.5 0 0 0 12 14Z'/%3E%3C/svg%3E");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.document-list-designation:hover {
    color: var(--primary);
    text-decoration: none !important;
}

.document-list-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin-top: 4px;
    color: #6b7d8e;
    font-size: .78rem;
    font-weight: 600 !important;
    line-height: 1.3;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    text-decoration: none !important;
}

.document-list-title::before {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: #111827;
    background: currentColor;
    content: "";
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.8V9h5.2L13 3.8ZM7 13h10v2H7v-2Zm0 4h7v2H7v-2Z'/%3E%3C/svg%3E");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.document-list-title-text {
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.document-list > .document-list-row .document-list-meta,
.document-list > .document-list-row .document-list-facts {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px 14px;
    margin-top: 9px;
    color: #6b7d8e;
    font-size: .78rem;
    font-weight: 600;
}

.document-list > .document-list-row .document-list-meta {
    grid-area: meta;
}

.document-list > .document-list-row .document-list-facts {
    grid-area: facts;
    justify-content: flex-end;
    align-self: center;
    min-width: 350px;
    gap: 10px;
    margin-top: 0;
    color: #52636d;
}

.document-list > .document-list-row .document-list-meta span + span,
.document-list > .document-list-row .document-list-facts > * + * {
    position: relative;
}

.document-list > .document-list-row .document-list-facts > * + *::before {
    position: absolute;
    top: 50%;
    left: -7px;
    width: 1px;
    height: 24px;
    content: "";
    background: #d8e2e8;
    transform: translateY(-50%);
}

.document-list > .document-list-row .document-list-meta span + span::after {
    position: absolute;
    top: 50%;
    left: -8px;
    width: 1px;
    height: 24px;
    content: "";
    background: #d8e2e8;
    transform: translateY(-50%);
}

.document-list > .document-list-row .document-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.document-list > .document-list-row .document-list-meta span::before {
    display: inline-flex;
    width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
    color: #1887e8;
    background: currentColor;
    line-height: 1;
    content: "";
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.document-list > .document-list-row .document-list-meta span:nth-child(1)::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1.5A2.5 2.5 0 0 1 22 6.5v12A2.5 2.5 0 0 1 19.5 21h-15A2.5 2.5 0 0 1 2 18.5v-12A2.5 2.5 0 0 1 4.5 4H6V3a1 1 0 0 1 1-1Zm12.5 8h-15v8.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5V10ZM5 6a.5.5 0 0 0-.5.5V8h15V6.5A.5.5 0 0 0 19 6H5Z'/%3E%3C/svg%3E");
}

.document-list > .document-list-row .document-list-meta span:nth-child(2)::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-8 2.24-8 5v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E");
}

.document-list > .document-list-row .document-list-meta span:nth-child(3)::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5c5.5 0 9.6 4.9 10.8 6.5.27.36.27.64 0 1C21.6 14.1 17.5 19 12 19S2.4 14.1 1.2 12.5a.8.8 0 0 1 0-1C2.4 9.9 6.5 5 12 5Zm0 3.2a3.8 3.8 0 1 0 0 7.6 3.8 3.8 0 0 0 0-7.6Zm0 2a1.8 1.8 0 1 1 0 3.6 1.8 1.8 0 0 1 0-3.6Z'/%3E%3C/svg%3E");
}

.document-ref-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    color: white;
    background: #09263a;
    border: 1px solid #061928;
    border-radius: 7px;
    box-shadow: 0 4px 10px rgb(3 24 39 / 12%);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
}

.search-highlight {
    display: inline;
    padding: 0 .16em;
    color: #122a38;
    background: #fff176;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.document-ref-badge .search-highlight {
    color: #09263a;
    background: #ffe36a;
}

.tag-chip .search-highlight {
    color: inherit;
    background: rgb(255 255 255 / 62%);
}

.document-list .document-tags {
    grid-area: tags;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    overflow: visible;
}

.document-list .document-row-actions {
    align-self: center;
    justify-self: end;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 124px;
    padding-left: 22px;
    margin-top: 0;
    border-left: 2px solid #dce8ef;
}

.document-list .document-row-actions form {
    width: 100%;
}

.document-list .document-row-actions .admin-button {
    width: 100%;
    white-space: nowrap;
}

.document-warning-mark {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    color: white;
    background: #e12d39;
    border-radius: 50%;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1;
}

.visa-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    color: white;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 850;
}

.visa-badge-small {
    margin-top: 6px;
    font-size: .72rem;
}

.visa-vso {
    background: #1f9d55;
}

.visa-vao {
    color: #172033;
    background: #facc15;
}

.visa-vaob,
.visa-auc {
    background: #f59e0b;
}

.visa-vu {
    color: #42515a;
    background: #d9e1e5;
}

.visa-ref {
    background: #dc2626;
}

.visa-pending {
    color: #4f5f68;
    background: #e8eef1;
}

.document-visa-panel {
    display: grid;
    gap: 16px;
    margin: 18px 0 24px;
    padding: 18px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.document-visa-panel h3 {
    margin: 6px 0 10px;
}

.document-visa-panel small,
.visa-conditions {
    color: var(--muted);
}

.visa-conditions {
    margin: 8px 0;
    padding: 10px 12px;
    background: white;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
}

.document-visa-form {
    display: grid;
    gap: 10px;
}

.visa-current-card,
.visa-register-card,
.visa-exchange-card {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgb(22 42 50 / 5%);
}

.visa-current-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 18px;
    align-items: start;
}

.visa-reviewer-register {
    overflow: hidden;
}

.visa-board {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.visa-board-index {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    color: white;
    background: #8fa197;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .04em;
}

.visa-board-index span {
    color: #f8fbfc;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.visa-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 14px;
}

.visa-actor-column {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
    background: #fbfbfb;
    border: 1px solid #8aa399;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgb(22 42 50 / 8%);
}

.visa-actor-header {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    min-height: 58px;
    text-align: center;
    background: #e8f0eb;
    border-bottom: 1px solid #8aa399;
}

.visa-actor-header strong {
    color: #0b2f2a;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.visa-actor-header span {
    color: #334155;
    font-size: .8rem;
}

.visa-actor-cell {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 260px;
    padding: 12px;
    background: #fbfbfb;
}

.visa-actor-cell.is-pending {
    background: #f7fafb;
}

.visa-card-status {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin: -6px -6px 0;
    padding: 8px 10px;
    color: white;
    border-radius: 8px 8px 0 0;
    font-size: .82rem;
    font-weight: 900;
}

.visa-card-status.visa-vao {
    color: #111827;
}

.visa-card-status.visa-pending {
    color: #475569;
    background: #edf2f4;
}

.visa-card-status span {
    font-size: .72rem;
    font-weight: 800;
    opacity: .9;
}

.visa-card-section {
    display: grid;
    gap: 6px;
}

.visa-card-section > strong {
    color: #111827;
    font-size: .82rem;
}

.visa-inline-meta {
    margin: 0;
    color: #111827;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
}

.visa-inline-meta span {
    color: var(--muted);
    font-weight: 700;
}

.visa-comment-box {
    max-height: 230px;
    overflow: auto;
    padding: 9px 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #203744;
    font-size: .88rem;
    line-height: 1.45;
    white-space: normal;
}

.visa-attachment-link {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
    color: var(--blue);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.visa-attachment-link small {
    color: var(--muted);
    font-weight: 700;
}

.visa-replies-section {
    padding-top: 8px;
    border-top: 1px dashed #cbd5dc;
}

.visa-reply-list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
}

.visa-reply {
    padding: 8px 9px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.visa-reply-heading {
    display: grid;
    gap: 2px;
    margin: 0 0 6px;
    color: #1f2f38;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.35;
}

.visa-reply-heading strong {
    color: #102932;
    font-size: .78rem;
}

.visa-reply-heading span {
    color: #526672;
    font-weight: 800;
}

.visa-reply-body {
    color: #203744;
    font-size: .86rem;
    line-height: 1.45;
}

.visa-reply-attachment {
    margin-top: 6px;
    font-size: .82rem;
}

.visa-reply-details {
    margin-top: 8px;
}

.visa-reply-details summary {
    display: inline-grid;
    gap: 3px;
    align-items: start;
    color: var(--blue);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 900;
}

.visa-reply-details summary span {
    color: var(--muted);
    font-weight: 800;
}

.visa-reply-details summary strong {
    text-decoration: underline;
}

.visa-reply-form {
    display: grid;
    gap: 7px;
    margin-top: 8px;
    padding: 9px;
    background: #f1f1f1;
    border-radius: 6px;
}

.visa-reply-form label {
    display: grid;
    gap: 4px;
    color: #111827;
    font-size: .8rem;
    font-weight: 700;
}

.visa-reply-form textarea,
.visa-reply-form input[type="file"] {
    width: 100%;
}

.visa-reply-form input[type="file"],
.visa-inline-form input[type="file"] {
    display: block;
    max-width: 100%;
    padding: 6px;
    overflow: hidden;
    color: #64748b;
    background: white;
    border: 1px solid #cbd5dc;
    border-radius: 7px;
    font-size: .72rem;
    line-height: 1.25;
}

.visa-reply-form input[type="file"]::file-selector-button,
.visa-inline-form input[type="file"]::file-selector-button {
    margin: 0 0 4px;
    padding: 4px 8px;
    color: #102932;
    background: #eef3f6;
    border: 1px solid #b6c5ce;
    border-radius: 5px;
    font: inherit;
    font-weight: 800;
}

.visa-reply-form textarea {
    min-height: 64px;
    resize: vertical;
}

.visa-inline-form {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.visa-inline-form select,
.visa-inline-form textarea,
.visa-inline-form input[type="file"] {
    width: 100%;
    font-size: .9rem;
}

.visa-inline-form textarea {
    min-height: 82px;
    resize: vertical;
}

.file-picker {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 7px;
    background: white;
    border: 1px solid #cbd5dc;
    border-radius: 7px;
    cursor: pointer;
}

.file-picker-input {
    position: absolute;
    width: 1px !important;
    height: 1px;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-picker-button {
    justify-self: start;
    padding: 4px 8px;
    color: #102932;
    background: #eef3f6;
    border: 1px solid #b6c5ce;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.1;
}

.file-picker-name {
    display: block;
    min-width: 0;
    color: #64748b;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.visa-row-done {
    background: #fbfdfd;
}

.visa-row-pending {
    background: white;
}

.visa-current-main {
    display: grid;
    gap: 12px;
}

.visa-current-main h3 {
    margin: 0;
}

.visa-action-card {
    padding: 14px;
    background: #f8fbfc;
    border: 1px dashed #c7d4dc;
    border-radius: 14px;
}

.visa-action-card .eyebrow {
    margin-bottom: 10px;
}

.visa-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 0;
}

.visa-meta-grid div {
    padding: 10px 12px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.visa-meta-grid dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.visa-meta-grid dd {
    margin: 0;
    color: var(--primary);
    font-weight: 900;
}

.visa-observation-box {
    padding: 12px 14px;
    background: #fff9eb;
    border: 1px solid #fed7aa;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
}

.visa-observation-box p {
    margin: 6px 0 0;
    color: var(--ink);
    line-height: 1.55;
}

.visa-history {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.visa-history > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.visa-retrospective-header,
.visa-exchange-header,
.visa-index-card header,
.visa-decision-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.visa-report-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.visa-retrospective-header h3 {
    margin: 4px 0 0;
}

.visa-register-count {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    color: var(--primary);
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
}

.visa-register-count-inline {
    margin: 4px 0 10px;
    color: #526672;
    background: #f8fbfc;
}

.visa-index-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.visa-index-card {
    padding: 14px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.visa-index-card.is-current {
    border-color: rgb(14 145 243 / 45%);
    box-shadow: 0 10px 24px rgb(14 145 243 / 8%);
}

.visa-index-title {
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.visa-index-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.visa-decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.visa-decision-card {
    display: grid;
    gap: 6px;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.visa-decision-card p {
    margin: 4px 0;
    color: var(--ink);
    font-size: .88rem;
}

.visa-actor-admin {
    margin: 18px 0;
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgb(22 42 50 / 5%);
}

.visa-actor-form {
    display: grid;
    grid-template-columns: 120px minmax(180px, 1fr) 160px minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.visa-actor-list {
    display: grid;
    gap: 10px;
}

.visa-actor-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.visa-actor-card.is-archived {
    color: #7a878f;
    background: #edf1f3;
    filter: grayscale(.8);
}

.visa-actor-card > div {
    display: grid;
    gap: 2px;
}

.visa-actor-card strong {
    color: var(--primary);
    letter-spacing: .08em;
}

.visa-actor-card span {
    font-weight: 900;
}

.visa-actor-card small {
    color: var(--muted);
}

.visa-replies {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.document-card-section {
    margin: 18px 0;
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgb(22 42 50 / 5%);
}

.document-management-card .section-title {
    margin: 0 0 14px;
}

.document-management-card .section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.document-management-card .section-actions form {
    margin: 0;
}

.document-detail-designation {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.document-private-lock-title {
    width: 1em;
    height: 1em;
}

.document-detail-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 18px 20px;
    background: #fbfdfe;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.document-detail-card-with-actions {
    grid-template-columns: 82px minmax(0, 1fr) 128px;
}

.document-detail-card .document-list-download {
    align-self: center;
    justify-self: center;
    width: 106px;
    min-width: 106px;
    min-height: 132px;
    padding: 12px 9px 10px;
    background: #fff;
    border: 2px solid #dbe9f2;
    border-radius: 18px;
    box-shadow: 0 12px 26px rgb(13 37 47 / 5%);
}

.document-detail-card .document-list-download .file-type-icon {
    width: 62px;
    height: 80px;
    font-size: .88rem;
}

.document-detail-card .document-list-download .file-type-label {
    width: auto;
    min-height: 24px;
    justify-content: center;
    padding: 4px 0;
    border-radius: 0;
    font-size: .92rem;
}

.document-detail-card .document-list-download .file-size {
    font-size: .85rem;
}

.document-detail-card .document-list-main {
    display: block;
    min-width: 0;
}

.document-detail-card .document-list-title-block {
    display: grid;
    gap: 5px;
    justify-items: start;
    transform: translateY(2px);
}

.document-detail-card .document-list-meta,
.document-detail-card .document-list-facts {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px 16px;
    margin-top: 16px;
    color: #6b7d8e;
    font-size: .78rem;
    font-weight: 600;
}

.document-detail-card .document-list-facts {
    gap: 12px;
    color: #52636d;
}

.document-detail-card .document-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.document-detail-card .document-list-facts > * + * {
    position: relative;
}

.document-detail-card .document-list-facts > * + *::before {
    position: absolute;
    top: 50%;
    left: -7px;
    width: 1px;
    height: 24px;
    content: "";
    background: #d8e2e8;
    transform: translateY(-50%);
}

.document-detail-card .document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.document-detail-actions {
    align-self: stretch;
    justify-self: end;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 124px;
    padding-left: 16px;
    border-left: 1px solid #dce8ef;
}

.document-detail-actions form,
.document-detail-actions .admin-button {
    width: 100%;
}

.document-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.document-info-item {
    min-width: 0;
    padding: 11px 12px;
    background: #f7fbfd;
    border: 1px solid #d8e7ee;
    border-radius: 10px;
}

.document-info-item span {
    display: block;
    margin-bottom: 4px;
    color: #66808f;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.document-info-item strong {
    display: block;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.document-preview-card {
    padding: 18px;
}

.document-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.document-preview-header .eyebrow {
    margin: 0;
}

.document-preview-card .document-large-preview {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.document-pdf-viewer-card {
    padding: 18px;
}

.document-pdf-viewer-frame {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: min(78vh, 820px);
    min-height: 520px;
    border: 1px solid #d4e2ea;
    border-radius: 14px;
    background: #eef5f8;
}

.document-pdf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #d4e2ea;
    background: #fff;
}

.document-pdf-toolbar .button {
    padding: 8px 12px;
    font-size: .82rem;
}

.document-pdf-toolbar .button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.document-pdf-page-status,
.document-pdf-zoom {
    color: #486271;
    font-size: .9rem;
    font-weight: 700;
}

.document-pdf-search {
    display: inline-flex;
    flex-basis: 100%;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px auto 0;
}

.document-pdf-search input {
    width: min(220px, 42vw);
    padding: 8px 10px;
    border: 1px solid #bcd2dc;
    border-radius: 10px;
    color: var(--ink);
    background: #f8fbfd;
    font: inherit;
    font-size: .86rem;
}

.document-pdf-search-status {
    min-width: 86px;
    color: #486271;
    font-size: .82rem;
    font-weight: 700;
}

.document-pdf-status {
    padding: 12px 14px;
    color: #486271;
    background: #f8fbfd;
    border-bottom: 1px solid #d4e2ea;
    font-weight: 700;
}

.document-pdf-status.is-error {
    color: #a4161a;
    background: #fff1f2;
}

.document-pdf-status[hidden] {
    display: none;
}

.document-pdf-canvas-wrap {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    padding: 18px;
    background: #dfe8ed;
    text-align: center;
}

.document-pdf-page-layer {
    position: relative;
    display: inline-block;
}

.document-pdf-canvas-wrap canvas {
    display: inline-block;
    max-width: none;
    background: #fff;
    box-shadow: 0 14px 34px rgba(13, 38, 51, .18);
}

.document-pdf-highlight-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.document-pdf-search-highlight {
    position: absolute;
    display: block;
    border-radius: 3px;
    background: rgba(255, 230, 0, .48);
    box-shadow: 0 0 0 1px rgba(255, 193, 7, .45);
    mix-blend-mode: multiply;
}

.document-related-header {
    margin: 0 0 14px;
}

.document-related-header h3 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.document-workspace-card {
    padding: 18px;
}

.document-workspace-card .document-detail-panel {
    margin: 0;
}

.document-workspace-card.document-visa-panel {
    padding: 18px;
}

.document-workspace-card.document-visa-panel .visa-register-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.document-workspace-card.document-comments {
    margin: 0;
}

.document-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.document-comments-header h3 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.document-comments-count {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    color: white;
    background: var(--primary);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 900;
}

.document-back-card {
    justify-content: center;
}

.document-description {
    margin: 18px 0;
    padding: 20px;
    border: 1px solid #bcd2dc;
    border-left: 5px solid var(--primary);
    border-radius: 10px;
    background: #f7fbfd;
}

.document-description h3 {
    margin: 0 0 12px;
    color: var(--ink);
}

.document-description div {
    color: #29434d;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: normal;
}

.document-related-table .related-current td {
    background: #eef8fc;
    font-weight: 700;
}

.document-related-table table {
    table-layout: fixed;
    overflow: hidden;
    border: 1px solid #d8e8f0;
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
}

.document-related-table th,
.document-related-table td {
    padding: 14px 13px;
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: .86rem;
    line-height: 1.35;
    vertical-align: middle;
}

.document-related-table th {
    color: #66808f;
    background: #f0f7fb;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.document-related-table tbody tr {
    border-top: 1px solid #d8e8f0;
}

.document-related-table th:nth-child(1),
.document-related-table td:nth-child(1) {
    width: 72px;
}

.document-related-table th:nth-child(2),
.document-related-table td:nth-child(2) {
    width: 112px;
}

@media (min-width: 721px) {
    .document-related-table th:nth-child(2),
    .document-related-table td:nth-child(2) {
        display: none;
    }
}

.document-related-table th:nth-child(4),
.document-related-table td:nth-child(4) {
    width: 138px;
}

.document-related-table th:nth-child(5),
.document-related-table td:nth-child(5) {
    width: 82px;
}

.document-related-table th:nth-child(6),
.document-related-table td:nth-child(6) {
    width: 162px;
}

.document-related-table td:nth-child(3) {
    max-width: none;
}

.related-file-name {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    color: #092638;
    font-size: .86rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.document-related-table td:nth-child(1) strong {
    display: inline-flex;
    min-width: 34px;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    color: white;
    background: #092638;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 800;
}

.document-related-table .button-small,
.document-related-table .status {
    white-space: nowrap;
}

.document-related-table .button-small {
    min-height: 34px;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.document-related-table .status {
    min-height: 30px;
    padding: 7px 12px;
    font-size: .72rem;
}

.related-visa-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.related-visa-square {
    display: inline-flex;
    width: 16px;
    height: 16px;
    border: 2px solid #9fb0b9;
    border-radius: 4px;
    background: white;
}

.related-visa-square.visa-vso {
    border-color: #1f9d55;
    background: #1f9d55;
}

.related-visa-square.visa-vao {
    border-color: #d6a900;
    background: #facc15;
}

.related-visa-square.visa-vaob,
.related-visa-square.visa-auc {
    border-color: #c77800;
    background: #f59e0b;
}

.related-visa-square.visa-ref {
    border-color: #dc2626;
    background: #dc2626;
}

.related-visa-square.visa-vu {
    border-color: #c7d1d7;
    background: #d9e1e5;
}

.related-visa-square.visa-pending {
    border-color: #9fb0b9;
    background: white;
}

.related-visa-none {
    color: var(--muted);
}

@media (max-width: 720px) {
    .document-search-summary {
        display: grid;
        gap: 12px;
        padding: 15px;
    }

    .document-search-summary .document-search-reset {
        justify-self: start;
    }

    .document-related-table {
        overflow: visible;
    }

    .document-related-table table,
    .document-related-table thead,
    .document-related-table tbody,
    .document-related-table tr,
    .document-related-table th,
    .document-related-table td {
        display: block;
    }

    .document-related-table table {
        border: 0;
    }

    .document-related-table thead {
        display: none;
    }

    .document-related-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "index action"
            "file file"
            "visa visa"
            "date size";
        gap: 9px 14px;
        margin-bottom: 12px;
        padding: 16px;
        border: 1px solid #d8e8f0;
        border-radius: 16px;
        background: white;
        box-shadow: 0 10px 24px rgb(22 42 50 / 8%);
    }

    .document-related-table .related-current {
        background: #eef8fc;
    }

    .document-related-table .related-current td {
        background: transparent;
    }

    .document-related-table td {
        width: auto !important;
        max-width: none;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .document-related-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .document-related-table td:nth-child(1) {
        grid-area: index;
    }

    .document-related-table td:nth-child(1)::before {
        display: none;
    }

    .document-related-table td:nth-child(1) strong {
        display: inline-flex;
        min-width: 36px;
        min-height: 26px;
        align-items: center;
        justify-content: center;
        padding: 4px 10px;
        color: white;
        background: #092638;
        border-radius: 8px;
        font-size: .82rem;
    }

    .document-related-table td:nth-child(2) {
        grid-area: date;
    }

    .document-related-table td:nth-child(3) {
        grid-area: file;
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: normal;
        overflow-wrap: normal;
        line-height: 1.35;
    }

    .related-file-name {
        display: -webkit-box;
        overflow: hidden;
        font-size: .88rem;
        line-height: 1.35;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .document-related-table td:nth-child(3)::before {
        display: none;
    }

    .document-related-table td:nth-child(4) {
        grid-area: visa;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding-top: 3px;
    }

    .document-related-table td:nth-child(4)::before {
        display: inline;
        margin: 0;
        content: attr(data-label) " :";
    }

    .document-related-table td:nth-child(5) {
        grid-area: size;
    }

    .document-related-table td:nth-child(6) {
        grid-area: action;
        text-align: right;
    }

    .document-related-table td:nth-child(6)::before {
        display: none;
    }

    .document-related-table td:nth-child(6) .button {
        min-height: 34px;
        padding: 8px 11px;
        font-size: .74rem;
        white-space: nowrap;
    }

    .document-related-table td:nth-child(6) .status {
        justify-content: center;
        min-height: 31px;
        padding: 7px 10px;
        font-size: .7rem;
    }
}

.document-comments {
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.document-comments .section-title {
    margin-bottom: 16px;
}

.comment-count {
    display: inline-flex;
    min-width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0 8px;
    color: white;
    background: var(--primary);
    border-radius: 999px;
    font-size: .78rem;
    vertical-align: middle;
}

.comment-empty {
    margin-bottom: 18px;
    padding: 16px;
    color: var(--muted);
    background: #f8fbfc;
    border: 1px dashed #b9cbd2;
    border-radius: 9px;
}

.comment-forum {
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 10px 26px rgb(22 42 50 / 5%);
}

.comment-thread {
    display: grid;
    gap: 0;
    padding: 6px 30px;
}

.conversation-status {
    display: inline-flex;
    padding: 3px 7px;
    color: white;
    border-radius: 3px;
    font-size: .67rem;
    font-weight: 850;
}

.conversation-status-open {
    background: #69767c;
}

.conversation-status-resolved {
    background: #4fb34a;
}

.conversation-status-closed {
    background: #d44855;
}

.comment-card[hidden] {
    display: none;
}

.comment-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 16px;
    width: 100%;
    margin-left: 0;
    padding: 26px 0;
    background: transparent;
    border-bottom: 1px solid #dfe7eb;
    border-radius: 0;
}

.comment-card + .comment-card {
    padding-top: 26px;
}

.comment-card:last-child {
    border-bottom: 0;
}

.comment-avatar {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(145deg, #36b8d8, #187aa2);
    border: 3px solid #e9f5f8;
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 850;
}

.comment-number {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    color: #64717a;
    font-size: .74rem;
    font-weight: 850;
}

.comment-message {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.conversation-root-status,
.conversation-status-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.conversation-root-status {
    margin-top: 4px;
}

.conversation-status-actions form {
    margin: 0;
}

.conversation-solve-button {
    color: #17652a;
    background: #e1f5e5;
    border-color: #84c890;
}

.conversation-close-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.conversation-close-form input {
    width: 190px;
    padding: 6px 8px;
}

.conversation-close-reason {
    color: #9a303e;
    font-size: .82rem;
    font-weight: 700;
}

.comment-subject-field {
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.comment-card-deleted {
    color: var(--muted);
}

.comment-deleted-message {
    font-style: italic;
}

.comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #edf2f4;
}

.comment-actions form {
    margin: 0;
}

.comment-edited {
    margin-left: auto;
    color: var(--muted);
}

.comment-inline-editor {
    margin-top: 14px;
}

.comment-inline-editor[hidden] {
    display: none;
}

.comment-editor-inline {
    min-height: 120px;
}

.comment-new-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 30px 0 12px;
}

.comment-new-heading h3,
.comment-new-heading p {
    margin: 0 0 5px;
}

.comment-new-heading p {
    color: var(--muted);
}

.comment-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-card header > div {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.comment-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .82rem;
}

.comment-meta-item span[aria-hidden="true"] {
    color: #768696;
    font-size: .98rem;
}

.comment-reply-small {
    display: inline-flex;
    width: 34px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
    background: #df4d52;
    border: 1px solid #c93f45;
    border-radius: 5px;
    font: inherit;
    font-size: .98rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgb(223 77 82 / 18%);
}

.comment-reply-small:hover {
    color: white;
    background: #c93f45;
    border-color: #b5343b;
}

.comment-reply-reference {
    margin: 4px 0 12px;
    padding: 8px 12px;
    color: #64717a;
    background: #f6fafc;
    border-left: 3px solid #35a9cf;
    border-radius: 7px;
    font-size: .82rem;
    line-height: 1.4;
}

.comment-reply-reference strong {
    display: block;
    margin-bottom: 2px;
    color: #1c3f4c;
    font-size: .78rem;
}

.comment-reply-reference span {
    display: block;
}

.comment-trash-button {
    min-width: 30px;
    padding-inline: 8px;
    font-size: .9rem;
}

.comment-body {
    color: #29434d;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.comment-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 30px 22px;
    color: #51626d;
    border-top: 1px solid var(--line);
}

.comment-pagination-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.comment-pagination-controls button {
    min-width: 34px;
    padding: 8px 10px;
    color: #51626d;
    background: #f4f7f8;
    border: 1px solid #dce6ea;
    border-radius: 7px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.comment-pagination-controls button:hover,
.comment-pagination-controls button.is-active {
    color: white;
    background: #14a6c9;
    border-color: #14a6c9;
}

.comment-body > :first-child {
    margin-top: 0;
}

.comment-body > :last-child {
    margin-bottom: 0;
}

.comment-body img {
    display: block;
    max-width: min(100%, 980px);
    max-height: 760px;
    margin: 14px auto;
    object-fit: contain;
    background: white;
    border: 1px solid #cbd8dd;
    border-radius: 7px;
    box-shadow: 0 5px 16px rgb(22 42 50 / 10%);
}

.comment-editor-card {
    overflow: hidden;
    background: white;
    border: 1px solid #b9cbd2;
    border-radius: 10px;
}

.comment-editor-card[hidden] {
    display: none;
}

.comment-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #edf4f6;
    border-bottom: 1px solid #cbd8dd;
}

.comment-toolbar button {
    min-width: 38px;
    padding: 7px 10px;
    color: var(--ink);
    background: white;
    border: 1px solid #b8c9d0;
    border-radius: 5px;
    font: inherit;
    cursor: pointer;
}

.comment-toolbar button:hover {
    border-color: var(--primary);
}

.comment-editor {
    min-height: 190px;
    padding: 18px;
    outline: 0;
    line-height: 1.6;
}

.comment-editor:focus {
    box-shadow: inset 0 0 0 3px rgb(11 132 243 / 14%);
}

.comment-editor:empty::before {
    color: #82929a;
    content: attr(data-placeholder);
    pointer-events: none;
}

.comment-editor img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    margin: 12px auto;
    object-fit: contain;
}

.comment-editor-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #f8fbfc;
    border-top: 1px solid #d6e0e4;
}

.comment-editor-footer small {
    color: var(--muted);
}

.comment-editor-status {
    flex: 1;
    color: #a0273a;
    font-size: .85rem;
    font-weight: 700;
}

.document-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 12px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.document-tab {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 18px;
    color: var(--muted);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 900;
    letter-spacing: .02em;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.document-tab:hover,
.document-tab:focus-visible {
    color: var(--primary);
    background: rgb(255 255 255 / 70%);
    outline: none;
}

.document-tab.is-active {
    color: var(--primary);
    background: white;
    border-color: #111827;
    box-shadow: 0 10px 24px rgb(22 42 50 / 10%);
}

.document-tab-count {
    display: inline-flex;
    min-width: 24px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    color: white;
    background: rgb(21 41 50 / 78%);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 900;
    line-height: 1;
}

.document-tab.is-active .document-tab-count {
    background: var(--primary);
}

.document-tab-visa:hover,
.document-tab-visa:focus-visible,
.document-tab-visa.is-active {
    color: var(--primary);
}

.document-detail-panel[hidden] {
    display: none;
}

.comment-chat {
    overflow: hidden;
    background: #f8fbfd;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
}

.document-comments:has(.comment-chat-form) .comment-chat {
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
}

.comment-chat-thread {
    display: flex;
    max-height: 560px;
    min-height: 250px;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 24px 28px;
}

.chat-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(72%, 720px);
    margin: 4px auto 2px;
    color: #99a8b2;
    font-size: .78rem;
    font-weight: 700;
}

.chat-date-separator::before,
.chat-date-separator::after {
    width: min(80px, 18%);
    height: 1px;
    content: "";
    background: #dce7ec;
}

.chat-date-separator span {
    padding: 0 12px;
    white-space: nowrap;
}

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 11px;
}

.chat-message-own {
    flex-direction: row-reverse;
}

.chat-avatar {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(145deg, #36b8d8, #187aa2);
    border: 2px solid white;
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 900;
    object-fit: cover;
    box-shadow: 0 4px 10px rgb(22 42 50 / 12%);
}

.chat-content {
    display: grid;
    max-width: min(76%, 760px);
    gap: 5px;
}

.chat-message-own .chat-content {
    justify-items: end;
}

.chat-message-other .chat-content {
    justify-items: start;
}

.chat-author-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.chat-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #91a0aa;
    font-size: .72rem;
}

.chat-message-own .chat-meta {
    justify-content: flex-end;
}

.chat-meta strong {
    color: #60717b;
    font-size: .75rem;
}

.chat-bubble {
    padding: 11px 14px;
    color: #23475a;
    background: #eaf1f6;
    border-radius: 14px 14px 14px 5px;
    font-size: .95rem;
    line-height: 1.55;
}

.chat-message-own .chat-bubble {
    color: white;
    background: #2f80ed;
    border-radius: 14px 14px 5px 14px;
}

.chat-time {
    color: #9aa9b4;
    font-size: .72rem;
}

.chat-message-footer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
}

.chat-message-own .chat-message-footer {
    justify-self: end;
}

.chat-body {
    color: inherit;
}

.chat-body p {
    margin: 0 0 8px;
}

.chat-body p:last-child {
    margin-bottom: 0;
}

.comment-body.chat-body img {
    display: block;
    width: min(220px, 100%);
    max-height: 160px;
    margin: 8px 0 0;
    object-fit: cover;
    background: white;
    border: 3px solid rgb(255 255 255 / 70%);
    border-radius: 7px;
    box-shadow: none;
    cursor: zoom-in;
}

.chat-delete-form {
    margin: 0;
}

.chat-delete-button {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #af2436;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    opacity: .65;
}

.chat-delete-button:hover {
    background: #ffe8ed;
    opacity: 1;
}

.comment-chat-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: end;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 16px 16px;
}

.comment-chat-form textarea {
    min-height: 42px;
    max-height: 180px;
    resize: none;
}

.chat-attach-button,
.chat-send-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
}

.chat-attach-button {
    width: 42px;
    color: #60717b;
    background: #f0f5f7;
    border: 1px solid #d8e3e7;
}

.chat-attach-button input {
    display: none;
}

.chat-send-button {
    padding: 0 16px;
    color: white;
    background: var(--primary);
    border: 1px solid var(--primary);
    font: inherit;
    font-weight: 850;
}

.chat-attachment-preview {
    grid-column: 2 / -1;
    display: inline-flex;
    width: fit-content;
    align-items: flex-start;
    gap: 6px;
    padding: 6px;
    background: #eef6fa;
    border: 1px solid #cfe0e7;
    border-radius: 10px;
}

.chat-attachment-preview[hidden] {
    display: none;
}

.chat-attachment-preview img {
    width: 96px;
    height: 68px;
    object-fit: cover;
    border-radius: 7px;
}

.chat-attachment-preview button {
    color: #9a2032;
    background: white;
    border: 1px solid #efbfca;
    border-radius: 50%;
    cursor: pointer;
}

.comment-image-lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgb(7 18 24 / 76%);
}

.comment-image-lightbox[hidden] {
    display: none;
}

.comment-image-lightbox img {
    max-width: min(100%, 1200px);
    max-height: 86vh;
    object-fit: contain;
    background: white;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 35%);
}

.comment-image-lightbox button {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    color: white;
    background: rgb(255 255 255 / 14%);
    border: 1px solid rgb(255 255 255 / 32%);
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
}

@media (max-width: 720px) {
    .document-detail-card {
        grid-template-columns: 1fr;
        padding-left: 28px;
    }

    .document-detail-card-with-actions {
        grid-template-columns: 1fr;
    }

    .document-detail-actions {
        justify-self: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        padding: 12px 0 0;
        border-top: 1px solid #dce8ef;
        border-left: 0;
    }

    .document-list-row,
    .document-list > .document-list-row {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 16px 14px 16px 22px;
        border-radius: 14px;
    }

    .document-bulk-check,
    .document-bulk-zip-form {
        display: none !important;
    }

    .document-list-download,
    .document-list > .document-list-row .document-list-download {
        width: 54px;
        min-width: 54px;
        min-height: 76px;
        padding: 8px 5px;
        border-radius: 10px;
        justify-self: start;
    }

    .document-list-download .file-type-icon,
    .document-list > .document-list-row .document-list-download .file-type-icon {
        width: 34px;
        height: 44px;
        font-size: .62rem;
    }

    .document-list-download .file-type-label,
    .document-list > .document-list-row .document-list-download .file-type-label {
        width: auto;
        padding: 2px 0;
        font-size: .62rem;
    }

    .document-list-download .file-size,
    .document-list > .document-list-row .document-list-download .file-size {
        font-size: .72rem;
    }

    .document-list-title {
        font-size: .9rem;
        line-height: 1.32;
    }

    .document-unread-badge {
        width: 8px;
        min-height: 100%;
        padding: 8px 2px;
        color: transparent;
        border-radius: 0;
    }

    .document-list > .document-list-row .document-list-main {
        display: block;
    }

    .document-list-image-preview {
        display: none;
    }

    .document-list-meta,
    .document-list-facts,
    .document-list > .document-list-row .document-list-meta,
    .document-list > .document-list-row .document-list-facts {
        align-items: flex-start;
        flex-direction: column;
        min-width: 0;
        margin-top: 9px;
    }

    .document-list .document-row-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        margin-top: 2px;
    }

    .document-list .document-row-actions .admin-button {
        width: 100%;
    }

    .document-visa-panel {
        padding: 12px;
    }

    .visa-current-card {
        grid-template-columns: 1fr;
    }

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

    .document-tab {
        justify-content: space-between;
        width: 100%;
    }

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

    .visa-actor-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-chat-thread {
        max-height: 560px;
        padding: 16px 12px;
    }

    .chat-content {
        max-width: calc(100% - 44px);
    }

    .comment-chat-form {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .comment-chat-form .comment-editor-status {
        grid-column: 1 / -1;
    }

    .chat-attachment-preview {
        grid-column: 1 / -1;
    }

    .comment-thread {
        padding: 4px 16px;
    }

    .comment-card {
        grid-template-columns: 36px minmax(0, 1fr);
        width: 100%;
        margin-left: 0;
    }

    .comment-avatar {
        width: 34px;
        height: 34px;
    }

    .comment-card header,
    .comment-editor-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-edited {
        margin-left: 0;
    }

    .comment-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding-inline: 16px;
    }
}

@media (max-width: 460px) {
    .document-list-row {
        grid-template-columns: 48px minmax(0, 1fr);
        padding-right: 12px;
    }

    .document-list .document-row-actions {
        grid-template-columns: 1fr;
    }
}

.document-large-preview {
    display: flex;
    justify-content: center;
    margin: 18px 0 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f4f7f8;
}

.document-large-preview img {
    display: block;
    max-width: 100%;
    max-height: 720px;
    border-radius: 6px;
    box-shadow: 0 5px 18px rgba(22, 42, 51, .14);
}

.document-preview-card .document-large-preview img {
    border-radius: 8px;
}

.document-preview-empty {
    width: 100%;
    padding: 28px 18px;
    border: 1px dashed #b8ccd6;
    border-radius: 12px;
    color: #536b78;
    background: #f8fbfd;
    text-align: center;
    font-weight: 700;
}

.document-file-cell {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.document-file-content {
    min-width: 0;
    flex: 1;
}

.document-thumbnail-link {
    flex: 0 0 88px;
    width: 88px;
    height: 66px;
    overflow: hidden;
    border: 1px solid #d5dde1;
    border-radius: 6px;
    background: #fff;
}

.document-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.document-row-archived .document-thumbnail {
    filter: grayscale(1);
    opacity: .62;
}

.document-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.document-row-actions form {
    margin: 0;
}

.document-status-form {
    margin-top: 6px;
}

.document-title-link {
    color: var(--ink);
    font-weight: 760;
    text-decoration: underline;
    text-decoration-color: #9fcbd8;
    text-underline-offset: 3px;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    color: #29434d;
    background: #eef7ff;
    border: 1px solid #acd1f0;
    border-radius: 9px;
    font: inherit;
    font-size: .76rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.admin-button-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: currentColor;
}

.admin-button-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.admin-button:hover {
    color: #0f3550;
    filter: brightness(.98);
}

.admin-button-edit {
    color: #1769b5;
    background: #eef7ff;
    border-color: #afd4f2;
}

.admin-button-version {
    background: #e4f6f0;
    border-color: #9dccbd;
}

.admin-button-status {
    color: #122a38;
    background: #fff5d8;
    border-color: #e7cf86;
}

.admin-button-trash {
    color: #b4232f;
    background: #fdecef;
    border-color: #efb8c0;
}

.admin-button-danger {
    color: #8d2133;
    background: #fae8eb;
    border-color: #e1a9b2;
}

.document-purge-form {
    display: grid;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.document-purge-form input {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 9px 10px;
    border: 1px solid #e1a9b2;
    border-radius: 5px;
    color: #8d2133;
    font-size: .75rem;
    text-overflow: ellipsis;
}

.purge-warning {
    display: inline-block;
    max-width: 260px;
    color: #8d2133;
    font-weight: 700;
}

.document-download-cell,
.document-opinion-cell {
    min-width: 78px;
    vertical-align: middle;
    text-align: center;
}

.document-opinion-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 27px;
    padding: 5px 10px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #dfe8ee;
    border-radius: 7px;
    box-shadow: none;
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
}

.document-opinion-link:hover {
    color: var(--primary);
}

.document-comment-icon {
    display: inline-flex;
    width: 19px;
    height: 19px;
    color: #153242;
}

.document-comment-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.document-visa-link {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 10px;
    color: white;
    background: #74838c;
    border: 1px solid #63727a;
    border-radius: 7px;
    box-shadow: none;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.document-visa-link:hover {
    filter: brightness(.95);
}

.document-visa-link.visa-vso {
    color: white;
    background: #1f9d55;
    border-color: #15803d;
}

.document-visa-link.visa-vao {
    color: #1f2937;
    background: #facc15;
    border-color: #d6a900;
}

.document-visa-link.visa-vaob,
.document-visa-link.visa-auc {
    color: white;
    background: #d97706;
    border-color: #b45309;
}

.document-visa-link.visa-vu {
    color: white;
    background: #6b7280;
    border-color: #4b5563;
}

.document-visa-link.visa-ref {
    color: white;
    background: #dc2626;
    border-color: #b91c1c;
}

.document-visa-link.visa-pending {
    color: white;
    background: #74838c;
    border-color: #63727a;
}

.file-download {
    --file-color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: #2162d1;
    font-size: .68rem;
    font-weight: 850;
    text-decoration: none;
}

.file-type-icon {
    position: relative;
    display: inline-flex;
    width: 23px;
    height: 28px;
    align-items: flex-end;
    justify-content: center;
    padding: 0 3px 5px;
    color: var(--file-color, #111827);
    background: white;
    border: 2px solid currentColor;
    border-radius: 3px;
    font-size: .8rem;
    line-height: 1;
}

.file-type-label {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    min-height: 28%;
    margin-inline: 0;
    padding: 2px 0;
    color: white;
    background: var(--file-color, #111827);
    border-radius: 0;
    line-height: 1;
    font-weight: 900;
    text-align: center;
}

.file-ref-badge {
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    color: white;
    background: #111827;
    border-radius: 3px;
    font-size: .58rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .03em;
    transform: translateX(-50%);
    pointer-events: none;
}

.file-type-icon::after {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    content: "";
    background: linear-gradient(225deg, white 47%, currentColor 49%, currentColor 56%, #edf2f4 58%);
    border-left: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

.file-download-pdf {
    --file-color: #e04444;
}

.file-download-archive {
    --file-color: #d8a10f;
}

.file-download-image {
    --file-color: #8b5a2b;
}

.file-download-excel {
    --file-color: #198754;
}

.file-download-word {
    --file-color: #2d67bd;
}

.file-download-powerpoint {
    --file-color: #cc5d32;
}

.file-download-excel .file-type-icon::after,
.file-download-word .file-type-icon::after,
.file-download-powerpoint .file-type-icon::after {
    display: block;
}

.file-download-cad {
    --file-color: #111827;
}

.file-download-text {
    --file-color: #111827;
}

.file-size {
    color: #0878d9;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

.document-row-archived .file-download {
    color: #425963;
    opacity: 1;
}

.document-row-archived .file-type-icon {
    color: #596c75;
    background: #f8fafb;
}

.document-opinion-cell {
    white-space: nowrap;
}

.opinion-icon {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 25px;
    vertical-align: middle;
}

.opinion-icon i {
    position: absolute;
    width: 15px;
    height: 11px;
    border: 1px solid #34464e;
    border-radius: 3px;
}

.opinion-icon i::after {
    position: absolute;
    bottom: -4px;
    left: 3px;
    width: 5px;
    height: 5px;
    content: "";
    background: white;
    border-left: 1px solid #34464e;
    transform: skew(-25deg);
}

.opinion-icon i:first-child {
    top: 2px;
    left: 1px;
}

.opinion-icon i:last-child {
    right: 1px;
    bottom: 1px;
}

.document-row-archived .opinion-icon {
    opacity: .6;
}

.opinion-count {
    display: inline-block;
    margin-left: 2px;
    vertical-align: middle;
}

.button-trash-main {
    color: #9a2034;
    background: #fff0f2;
    border-color: #e4a6b0;
}

.button-trash-main:hover {
    color: white;
    background: #b52c43;
    border-color: #b52c43;
}

.document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.tag-chip-mini {
    padding: 5px 9px;
    font-size: .8rem;
    line-height: 1.1;
}

.card-actions form {
    margin: 0;
}

.company-card p,
.company-card small {
    color: var(--muted);
}

.company-card small {
    overflow-wrap: anywhere;
}

.status {
    padding: 5px 10px;
    background: #def7e8;
    color: #14713b;
    font-size: .72rem;
    text-transform: uppercase;
}

.empty {
    padding: 28px;
}

.empty code {
    display: block;
    overflow-x: auto;
    padding: 14px;
    background: #eef3f5;
}

.mobile-view-dashboard {
    gap: 18px;
}

.mobile-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-view-tabs a {
    padding: 11px 18px;
    color: #0b2230;
    background: #edf6fb;
    border: 1px solid #c9dce8;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
}

.mobile-view-tabs a.active {
    color: white;
    background: #0b2230;
    border-color: #0b2230;
}

.mobile-view-note {
    padding: 14px 16px;
    color: #496273;
    background: #f7fbfd;
    border: 1px dashed #b9d1de;
    border-radius: 14px;
}

.mobile-tag-sections {
    display: grid;
    gap: 16px;
}

.mobile-tag-section {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.mobile-tag-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-tag-heading > span:last-child {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.mobile-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.mobile-document-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    color: #0b2230;
    background: #f8fbfd;
    border: 1px solid #cfe0ea;
    border-radius: 14px;
    text-decoration: none;
}

.mobile-document-card:hover {
    border-color: #1489e6;
}

.mobile-document-preview {
    display: grid;
    place-items: center;
    min-height: 118px;
    overflow: hidden;
    background: white;
    border: 1px solid #dbe8ef;
    border-radius: 12px;
}

.mobile-document-preview img {
    display: block;
    max-width: 100%;
    max-height: 118px;
    object-fit: contain;
}

.mobile-document-title {
    font-weight: 800;
    line-height: 1.25;
}

.mobile-document-meta {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.doe-dashboard,
.doe-browser {
    display: grid;
    gap: 18px;
}

.doe-lot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.doe-lot-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.doe-lot-card.is-archived {
    opacity: .68;
    background: #f1f5f8;
}

.doe-lot-card h3 {
    margin: 10px 0 4px;
    color: #071f2e;
}

.doe-lot-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.doe-lot-form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.doe-lot-form-card .form-actions {
    padding: 20px 28px;
    border-top: 1px solid var(--line);
}

.doe-lot-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doe-lot-stats span {
    padding: 6px 10px;
    color: #143642;
    background: #eef7fb;
    border: 1px solid #d1e4ef;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
}

.doe-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #f3f8fb;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.doe-breadcrumb a {
    color: #0077d9;
    font-weight: 800;
    text-decoration: none;
}

.doe-actions-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    padding: 16px;
    background: #f8fbfd;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.doe-inline-form {
    display: grid;
    gap: 10px;
}

.doe-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.doe-folder-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.doe-folder-card a {
    display: grid;
    gap: 4px;
    color: #071f2e;
    text-decoration: none;
}

.doe-folder-icon {
    color: #f3a21a;
    font-size: 2rem;
    line-height: 1;
}

.text-danger-button {
    padding: 0;
    color: #c92a35;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    text-decoration: underline;
}

.document-simple-list-doe {
    display: grid;
    gap: 8px;
}

.document-simple-list-doe .document-simple-header {
    grid-template-columns: 64px minmax(180px, 1fr) minmax(150px, .45fr) 90px auto;
    padding: 14px;
}

.document-simple-list-doe .document-simple-header span,
.document-simple-list-doe .document-simple-header span:nth-child(n) {
    text-align: left;
    transform: none;
}

.doe-file-row {
    display: grid;
    grid-template-columns: 64px minmax(180px, 1fr) minmax(150px, .45fr) 90px auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.doe-file-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 20px, 1120px);
    }

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

    .breadcrumb {
        margin: 12px 0 16px;
    }

    .breadcrumb ol {
        padding: 12px 14px;
    }

    .breadcrumb li + li::before {
        margin: 0 10px;
    }

    .hero {
        align-items: flex-start;
    }

    .page-heading,
    .topbar,
    .project-hero {
        align-items: flex-start;
    }

    .page-heading,
    .topbar,
    .hero,
    .project-hero {
        flex-direction: column;
    }

    .project-live-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-live-heading p:last-child {
        text-align: left;
    }

    .project-live-grid {
        grid-template-columns: 1fr;
    }

    .project-hero-image {
        width: 100%;
        height: 190px;
    }

    .project-hero-actions,
    .project-hero-actions .button {
        width: 100%;
    }

    .project-hero-actions .button {
        justify-content: center;
    }

    .document-tag-search {
        align-items: stretch;
        flex-direction: column;
    }

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

    .trash-card {
        grid-template-columns: 1fr;
    }

    .password-card {
        grid-template-columns: 1fr;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-logo {
        width: 130px;
        min-height: 100%;
        border-left: 1px solid var(--line);
        border-top: 0;
    }

    .dashboard-hero > div:first-child {
        padding-right: 158px;
    }

    .dashboard-panel:first-child {
        grid-column: auto;
    }

    .recent-company-card {
        grid-template-columns: 1fr;
    }

    .dashboard-company-card {
        grid-template-columns: 1fr;
    }

    .dashboard-company-media {
        min-height: 180px;
    }

    .recent-company-media {
        min-height: 180px;
    }

    .timeline-item div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .list-tools,
    .list-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .list-tools label,
    .list-tools label:last-child {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .trash-actions {
        padding-left: 0;
        padding-top: 20px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .span-2 {
        grid-column: span 1;
    }

    .role-badge {
        min-width: auto;
        min-height: auto;
        padding: 10px 14px;
    }

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

    .mobile-tag-section {
        padding: 12px;
    }

    .doe-file-row {
        grid-template-columns: 48px 1fr;
    }

    .doe-file-row > span:nth-last-child(-n + 2) {
        grid-column: 1 / -1;
    }

    .doe-file-actions {
        justify-content: flex-start;
    }
}
