:root {
    --bg: #eef3f7;
    --bg-strong: #d9e5ef;
    --panel: rgba(255, 255, 255, 0.92);
    --text: #173042;
    --muted: #607589;
    --line: rgba(23, 48, 66, 0.12);
    --primary: #1f6f78;
    --primary-dark: #184f56;
    --accent: #f2a65a;
    --danger: #a33b20;
    --success: #216e39;
    --shadow: 0 12px 28px rgba(31, 59, 79, 0.08);
    --radius: 22px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(242, 166, 90, 0.26), transparent 28%),
        radial-gradient(circle at bottom right, rgba(31, 111, 120, 0.18), transparent 30%),
        linear-gradient(135deg, var(--bg) 0%, #f7fafc 100%);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}
a { color: inherit; text-decoration: none; }
.login-body, .app-body { min-height: 100vh; }
.app-body {
    overflow: hidden;
}
.login-shell, .app-shell { display: grid; min-height: 100vh; }
.login-shell { grid-template-columns: 1.1fr 0.9fr; padding: 32px; gap: 24px; }
.brand-panel, .login-card, .sidebar, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.brand-panel, .login-card, .sidebar, .workspace { padding: 32px; }
.brand-panel { display: flex; flex-direction: column; justify-content: flex-end; min-height: 420px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.75rem; color: var(--muted); }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.1; }
.hero-copy, .sidebar-copy, .muted-copy { color: var(--muted); }
.brand-app-name {
    margin: 0 0 6px;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}
.brand-system-title {
    margin-bottom: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.login-logo {
    width: min(100%, 120px);
    height: auto;
    margin-bottom: 22px;
    background: transparent;
    object-fit: contain;
}
.company-logo-preview {
    display: block;
    max-width: 220px;
    max-height: 96px;
    width: auto;
    height: auto;
    margin-top: 8px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: transparent;
    padding: 10px;
    object-fit: contain;
}
.login-card { display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
.login-help-links {
    margin-top: 14px;
}
.login-help-links a {
    color: var(--primary-dark);
    text-decoration: underline;
}
.stack-form, .filters-grid { display: grid; gap: 14px; }
label span, legend { display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--muted); }
.field-label-with-meta {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.field-label-with-meta > span {
    margin-bottom: 0;
}
.field-counter-separator {
    color: var(--muted);
}
.field-counter {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}
input[data-force-uppercase] {
    text-transform: uppercase;
}
input[data-force-slug] {
    text-transform: lowercase;
}
input, select, button { font: inherit; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; color: var(--text);
}
select {
    transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
select:hover {
    filter: brightness(0.96);
}
textarea {
    resize: vertical;
    min-height: 96px;
}
.btn, .icon-btn, button {
    border: 0; border-radius: 14px; padding: 5px; cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn:hover, .icon-btn:hover, button:hover {
    transform: translateY(-1px);
    filter: brightness(0.94);
}
.btn:disabled, .icon-btn:disabled, button:disabled,
.btn[disabled], .icon-btn[disabled], button[disabled] {
    cursor: not-allowed;
    opacity: 0.42;
    filter: none;
    transform: none;
    box-shadow: none;
}
.btn:disabled:hover, .icon-btn:disabled:hover, button:disabled:hover,
.btn[disabled]:hover, .icon-btn[disabled]:hover, button[disabled]:hover {
    transform: none;
    filter: none;
}
.btn-primary { background: linear-gradient(145deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-secondary { background: rgba(31, 111, 120, 0.12); color: var(--primary-dark); }
.btn-ghost, .icon-btn { background: rgba(234, 179, 8, 0.2); color: #7a5600; }
.btn-download-all {
    background: linear-gradient(145deg, #0c4a8a, #082f63);
    border-color: #082f63;
    color: #fff;
}
.btn-download-all:hover {
    background: linear-gradient(145deg, #0f5aa9, #0a3978);
    border-color: #0a3978;
}
.btn-download-directory {
    background: linear-gradient(145deg, #d9efff, #b9dbff);
    border-color: #8ebdea;
    color: #0d3d6b;
}
.btn-download-directory:hover {
    background: linear-gradient(145deg, #e7f5ff, #c8e4ff);
    border-color: #79addf;
    color: #0a3359;
}
.btn-download-directory.btn-disabled,
.btn-download-directory[aria-disabled="true"] {
    background: linear-gradient(145deg, #eef6fd, #dfeefd);
    border-color: #c7dff3;
    color: #7a96b2;
}
.btn-filter-clear {
    min-height: 48px;
    padding: 10px 16px;
    background: rgba(120, 130, 140, 0.18);
    color: var(--text);
}
.btn-filter-submit {
    min-height: 48px;
    padding: 10px 16px;
}
.btn-view-soft { background: rgba(34, 197, 94, 0.16); color: #15803d; }
.repository-table .btn.btn-secondary[href*="download.php?file_id="] {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}
.btn-review-view { background: rgba(31, 111, 120, 0.12); color: var(--primary-dark); }
.btn-review-accept { background: linear-gradient(145deg, #1ea85f, #15803d); color: #fff; }
.btn-review-revalidate { background: linear-gradient(145deg, #5b9a70, #386a4c); color: #fff; }
.btn-review-reject { background: rgba(234, 179, 8, 0.28); color: #73510a; }
.btn-danger-soft,
.btn-review-danger { background: rgba(220, 38, 38, 0.14); color: #b91c1c; }
.btn-danger-soft-black { background: rgba(220, 38, 38, 0.14); color: #1f1f1f; }
.btn-danger-soft-red { background: rgba(220, 38, 38, 0.14); color: #b91c1c; }
.btn-danger-solid { background: rgba(220, 38, 38, 0.42); color: #1f1f1f; }
.btn-disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: none;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}
.credential-note, .flash, .empty-state {
    margin-top: 16px; border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7);
}
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(23, 48, 66, 0.24);
    backdrop-filter: blur(6px);
    z-index: 999;
}
.modal-overlay.is-open {
    display: flex;
}
.modal-card {
    position: relative;
    width: min(100%, 460px);
    padding: 28px 28px 24px;
    border-radius: 24px;
    border: 1px solid rgba(31, 111, 120, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 70px rgba(23, 48, 66, 0.22);
}
.modal-card-loading {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 8px;
}
.modal-card-preview {
    width: calc(100vw - 32px);
    min-width: 760px;
    height: calc(100vh - 32px);
    min-height: 560px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 22px 22px 18px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
}
.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-right: 28px;
}
.preview-modal-header .modal-kicker {
    margin-bottom: 6px;
}
.preview-modal-header h3 {
    margin-bottom: 0;
}
.preview-modal-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}
.preview-modal-actions .btn {
    height: 36px;
    min-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}
.preview-modal-inline-close {
    min-width: 36px;
    width: 36px;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.2rem;
    line-height: 1;
}
.preview-modal-frame-wrap {
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    min-height: 0;
    height: 100%;
}
.preview-modal-frame-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}
.modal-kicker {
    margin: 0 0 8px;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.modal-message {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.loading-spinner {
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    border-radius: 999px;
    border: 4px solid rgba(31, 111, 120, 0.16);
    border-top-color: var(--primary);
    border-right-color: var(--primary-dark);
    animation: modal-loading-spin 0.9s linear infinite;
}
@keyframes modal-loading-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.modal-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(163, 59, 32, 0.16);
    background: rgba(163, 59, 32, 0.05);
    color: var(--text);
}
.modal-checkbox-row input {
    width: auto;
    margin-top: 2px;
}
.modal-actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    background: rgba(31, 111, 120, 0.1);
    color: var(--primary-dark);
    font-size: 1.4rem;
    line-height: 1;
}
.flash-success { border-color: rgba(33, 110, 57, 0.2); color: var(--success); }
.flash-error { border-color: rgba(163, 59, 32, 0.2); color: var(--danger); }
.flash-warning { border-color: rgba(242, 166, 90, 0.3); color: #9a6118; }
.app-shell {
    grid-template-columns: 320px 1fr;
    align-items: start;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-radius: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
}
.sidebar-top,
.sidebar-center,
.sidebar-bottom {
    width: 100%;
    display: grid;
    justify-items: center;
    align-content: center;
}
.sidebar .brand-block {
    gap: 0;
}
.sidebar-logo {
    width: min(100%, 56px);
    height: auto;
    margin-bottom: 12px;
    background: transparent;
    object-fit: contain;
}
.sidebar .brand-app-name {
    font-size: 2rem;
}
.sidebar .brand-system-title {
    max-width: 220px;
    font-size: 0.96rem;
    letter-spacing: 0.18em;
}
.sidebar .sidebar-copy {
    margin: 0;
    font-size: 0.92rem;
    max-width: 220px;
}
.sidebar-company-divider {
    width: 100%;
    max-width: 220px;
    height: 1px;
    margin-top: 18px;
    background: rgba(23, 48, 66, 0.12);
}
.sidebar-company-stack {
    display: grid;
    gap: 16px;
    margin-top: 22px;
    width: 100%;
    max-width: 220px;
}
.sidebar-company-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 8px 0;
    border-radius: 18px;
    transition: background 0.18s ease, transform 0.18s ease;
}
.sidebar-company-stack.is-admin-sortable .sidebar-company-card {
    cursor: grab;
}
.sidebar-company-stack.is-admin-sortable .sidebar-company-card.is-dragging {
    opacity: 0.52;
    transform: scale(0.98);
}
.sidebar-company-stack.is-admin-sortable .sidebar-company-card.is-drop-target {
    background: rgba(23, 48, 66, 0.08);
}
.sidebar-company-logo {
    width: min(100%, 112px);
    max-height: 58px;
    object-fit: contain;
    background: transparent;
}
.sidebar-company-card:first-child .sidebar-company-logo {
    width: min(100%, 168px);
    max-height: 87px;
}
.sidebar-company-card:first-child .sidebar-company-logo-placeholder {
    width: 87px;
    height: 87px;
}
.sidebar-company-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(23, 48, 66, 0.1);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.3rem;
}
.sidebar-company-name {
    text-align: center;
    font-size: 0.86rem;
    line-height: 1.35;
}
.sidebar-nav {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}
.nav-link {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(23, 48, 66, 0.12);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.nav-link:hover {
    filter: brightness(0.94);
}
.nav-link.is-active { background: rgba(31, 111, 120, 0.15); border-color: rgba(31, 111, 120, 0.2); color: var(--primary-dark); font-weight: 700; }
.sidebar-footer {
    display: grid;
    gap: 8px;
    justify-items: center;
    align-content: end;
}
.sidebar-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 220px;
}
.sidebar-footer-actions .btn {
    width: 100%;
    text-align: center;
}
.sidebar-footer-actions .btn.is-active {
    background: rgba(31, 111, 120, 0.18);
    color: var(--primary-dark);
    font-weight: 700;
}
.sidebar-footer p {
    margin: 0;
}
.sidebar-powered-block {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 220px;
    padding: 10px 0 2px;
}
.sidebar-powered-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.sidebar-powered-link {
    display: inline-flex;
    justify-content: center;
    padding: 8px 3px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, font-weight 0.15s ease, filter 0.15s ease;
}
.sidebar-powered-link:hover,
.sidebar-powered-link:focus-visible,
.sidebar-powered-link.is-active {
    background: rgba(31, 111, 120, 0.15);
    border-color: rgba(31, 111, 120, 0.24);
    color: var(--primary-dark);
    font-weight: 700;
    outline: none;
}
.sidebar-powered-title {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}
.workspace {
    display: grid;
    gap: 12px;
    padding: 18px 22px 22px;
    align-content: start;
    min-height: 100vh;
    height: 100vh;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.workspace.workspace-chat {
    grid-template-rows: 78px minmax(0, 1fr);
    gap: 12px;
    align-content: stretch;
    padding: 18px 22px 22px;
    overflow: hidden;
}
.workspace.workspace-chat > .workspace-header {
    flex: 0 0 auto;
    min-height: 78px;
    max-height: 78px;
    padding: 2px 0 0;
    margin-right: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.workspace.workspace-chat > .chat-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    margin-top: -4px;
}
.workspace-manage {
    grid-template-rows: 78px minmax(0, 1fr);
    gap: 0;
    align-content: stretch;
    min-height: 0;
    overflow: hidden;
}
.workspace-manage > .workspace-header {
    flex: 0 0 auto;
    min-height: 78px;
    max-height: 78px;
    padding: 2px 0 0;
    margin-right: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.workspace-manage > .manage-layout {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
.workspace-header, .panel-header, .tree-summary, .file-row, .header-actions, .filter-actions {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 5px; margin-right: 15px;
}
.panel { padding: 24px; }
.workspace-embedded-page-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    height: auto;
    min-height: calc(100vh - 120px);
    overflow: visible;
}
.embedded-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.embedded-page-toolbar h3 {
    margin-bottom: 0;
}
.embedded-page-frame-wrap {
    min-height: 0;
    height: auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.embedded-page-frame-wrap iframe {
    display: block;
    width: 100%;
    min-height: 240px;
    height: auto;
    border: 0;
    background: #fff;
}
.embedded-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    min-width: 0;
}
.embedded-contact-image-stack {
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    width: 150px;
    height: 240px;
    min-width: 0;
}
.embedded-contact-image-stack[hidden] {
    display: none !important;
}
.embedded-contact-image-card {
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.embedded-contact-image-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.embedded-contact-image-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(23, 48, 66, 0);
    transition: background 0.15s ease;
}
.embedded-contact-image-button::after {
    content: "ampliar";
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 2;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(23, 48, 66, 0.86);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.embedded-contact-image-button:hover::before,
.embedded-contact-image-button:focus-visible::before {
    background: rgba(23, 48, 66, 0.28);
}
.embedded-contact-image-button:hover::after,
.embedded-contact-image-button:focus-visible::after {
    opacity: 1;
}
.embedded-contact-image-button:focus-visible {
    outline: 3px solid rgba(31, 111, 120, 0.34);
    outline-offset: -3px;
}
.embedded-contact-image-card img,
.embedded-contact-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.embedded-contact-image-credit {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}
.contact-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    place-items: center;
    padding: 28px;
    background: rgba(15, 23, 42, 0.56);
}
.contact-image-modal.is-open {
    display: grid;
}
.contact-image-modal-card {
    position: relative;
    display: inline-grid;
    width: fit-content;
    max-width: 92vw;
    max-height: 88vh;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}
.contact-image-modal-card img {
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 0;
    object-fit: contain;
}
.contact-image-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(23, 48, 66, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--primary-dark);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}
.contact-image-modal-close:hover,
.contact-image-modal-close:focus-visible {
    background: rgba(31, 111, 120, 0.12);
    outline: none;
}
.workspace-header {
    padding: 2px 0 0;
    margin: 0;
    min-height: 78px;
}
.workspace-header h2 {
    margin: 0;
    font-size: 1.2rem;
}
.workspace > .workspace-header + .settings-layout {
    margin-top: -4px;
}
.workspace-header-compact {
    padding-top: 0;
    min-height: 78px;
}
    .workspace-header-compact .header-actions {
        align-items: center;
    }
    .workspace-header-compact .header-actions-title {
        width: 100%;
        justify-content: flex-start;
        margin-right: 0;
    }
.workspace-repository-description {
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.95rem;
    white-space: normal;
    max-width: 720px;
}
.workspace-header-compact + .flash,
.workspace-header-compact + .panel {
    margin-top: -4px;
}
.tree-list, .tree-children, .file-list, .compact-list { display: grid; gap: 12px; }
.tree-node {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
    border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.72); padding: 5px 6px 5px;
}
.tree-node-private {
    background: rgba(102, 102, 102, 0.92);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}
.tree-node-private .tree-summary,
.tree-node-private .tree-node-actions-bar,
.tree-node-private .tree-node-body {
    background: transparent;
    transition: background 0.18s ease;
}
.tree-node-private .tree-title,
.tree-node-private .tree-node-description,
.tree-node-private .tree-node-meta-line,
.tree-node-private .tree-node-actions-bar,
.tree-node-private .tree-node-body {
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.tree-node-private:hover {
    background: rgba(150, 150, 150, 0.94);
}
.tree-node-private:hover .tree-summary,
.tree-node-private:hover .tree-node-actions-bar,
.tree-node-private:hover .tree-node-body {
    background: transparent;
}
.tree-node-private:hover .tree-title,
.tree-node-private:has(.tree-summary.is-expandable:hover) .tree-title,
.tree-node-private:has(> details > summary.is-static:hover) .tree-title {
    font-size: 1.05rem;
}
.tree-node-private .tree-summary.is-expandable,
.tree-node-private .tree-summary.is-static {
    cursor: pointer;
}
.tree-node-private details > summary.is-expandable,
.tree-node-private details > summary.is-expandable *,
.tree-node-private details > summary.is-static,
.tree-node-private details > summary.is-static *,
.tree-node-private .tree-title-line,
.tree-node-private .tree-title-line * {
    cursor: pointer;
}
.tree-node-private:has(.tree-summary.is-expandable:hover),
.tree-node-private:has(> details > summary.is-static:hover),
.tree-node-private:has(> details[open] > summary.is-expandable),
.tree-node-private:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) {
    background: rgba(150, 150, 150, 0.94);
}
.tree-node-private:has(.tree-summary.is-expandable:hover) .tree-summary,
.tree-node-private:has(> details > summary.is-static:hover) .tree-summary,
.tree-node-private:has(> details[open] > summary.is-expandable) .tree-summary,
.tree-node-private:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) .tree-summary,
.tree-node-private:has(.tree-summary.is-expandable:hover) .tree-node-actions-bar,
.tree-node-private:has(> details > summary.is-static:hover) .tree-node-actions-bar,
.tree-node-private:has(> details[open] > summary.is-expandable) .tree-node-actions-bar,
.tree-node-private:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) .tree-node-actions-bar,
.tree-node-private:has(.tree-summary.is-expandable:hover) .tree-node-body,
.tree-node-private:has(> details > summary.is-static:hover) .tree-node-body,
.tree-node-private:has(> details[open] > summary.is-expandable) .tree-node-body,
.tree-node-private:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) .tree-node-body {
    background: transparent;
}
.tree-node-private .muted-copy,
.tree-node-private .repository-meta-count,
.tree-node-private .repository-pending-warning-summary {
    color: rgba(255, 255, 255, 0.82);
}
.tree-node-private .repository-meta-count-validated {
    color: #86efac;
}
.tree-node-private .repository-meta-count-alert,
.tree-node-private .repository-pending-warning {
    color: #fca5a5;
}
.tree-node-toggle {
    grid-column: 1;
    grid-row: 1;
}
.tree-node details {
    position: relative;
}
.tree-title {
    display: block;
    font-size: 1rem;
}
.tree-title-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tree-node-description {
    margin: 4px 0;
    line-height: 1.45;
    white-space: pre-line;
}
.tree-summary .muted-copy {
    display: block;
    margin-left: 14px;
    margin-top: 4px;
}
.tree-node details > summary {
    list-style: none;
    cursor: pointer;
    /* padding-right: 150px; */
}
.tree-node details > summary::-webkit-details-marker { display: none; }
.tree-node details > summary.is-static {
    cursor: default;
}
.tree-node details > summary.is-expandable {
    cursor: pointer;
}
.tree-summary.is-expandable .tree-title {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.tree-node-toggle > summary.is-expandable .tree-title-line::after {
    content: "";
    margin-left: auto;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--primary-dark);
    transition: transform 0.18s ease;
    transform-origin: center;
    transform: rotate(-45deg);
    flex: 0 0 auto;
}
.tree-node-toggle[open] > summary.is-expandable .tree-title-line::after {
    transform: rotate(45deg);
}
.tree-node.tree-node-depth-0:has(.tree-summary.is-expandable:hover) {
    background: rgba(23, 48, 66, 0.08);
}
.tree-node.tree-node-depth-0:has(> details[open] > summary.is-expandable) {
    background: rgba(23, 48, 66, 0.08);
}
.tree-node.tree-node-depth-0:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) {
    background: rgba(23, 48, 66, 0.08);
}
.tree-node-private.tree-node-depth-0:has(.tree-summary.is-expandable:hover),
.tree-node-private.tree-node-depth-0:has(> details > summary.is-static:hover),
.tree-node-private.tree-node-depth-0:has(> details[open] > summary.is-expandable),
.tree-node-private.tree-node-depth-0:has(> .tree-node-actions-bar > .repository-upload-toggle[open]) {
    background: rgba(150, 150, 150, 0.94);
}
.tree-summary.is-expandable:hover .tree-title {
    font-size: 1.05rem;
}
.tree-node-actions-bar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    margin: 3px 3px 0 auto;
}
.repository-upload-toggle[open] > .repository-upload-popover {
    display: block;
}
.tree-node-body {
    grid-column: 1 / -1;
    grid-row: 2;
}
.tree-node:not(:has(> .tree-node-toggle[open])) > .tree-node-body {
    display: none;
}
.repository-upload-toggle {
    position: relative;
    flex: 0 0 auto;
}
.repository-upload-toggle > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}
.repository-upload-toggle > summary::-webkit-details-marker {
    display: none;
}
.repository-upload-popover {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(23, 48, 66, 0.14);
}
.repository-upload-inline-panel {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 8px 0 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(23, 48, 66, 0.14);
}
.repository-upload-inline-panel[hidden] {
    display: none !important;
}
.repository-upload-form {
    display: grid;
    gap: 10px;
}
.repository-upload-form label {
    display: grid;
    gap: 6px;
}
.repository-upload-form input[type="file"] {
    width: 100%;
}
.repository-upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.repository-upload-note {
    margin: 0;
}
.tree-node-meta-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.repository-meta-count {
    font-weight: 700;
}
.repository-meta-count-validated {
    color: var(--success);
}
.repository-meta-count-alert {
    color: var(--danger);
}
.repository-pending-warning {
    color: var(--danger);
    font-weight: 700;
}
.tree-node > .tree-node-toggle[open] .repository-pending-warning-summary {
    display: none;
}
.code-inline {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.85rem;
    word-break: break-word;
}
.review-file-meta {
    display: grid;
    gap: 4px;
}
.review-table {
    border-collapse: separate;
    border-spacing: 0 12px;
}
.review-table tbody tr > td {
    vertical-align: top;
}
.review-table th:first-child,
.review-table td:first-child {
    width: auto;
    min-width: 440px;
}
.review-file-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    align-items: start;
    width: 100%;
    min-width: 0;
}
.review-file-main {
    min-width: 0;
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
.review-file-title-line {
    min-width: 0;
    width: 100%;
}
.review-file-title-line strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.review-file-side {
    display: grid;
    width: 460px;
    min-width: 460px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    align-content: start;
    padding-top: 30px;
}
.review-admin-form {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}
.review-note-group > .review-admin-form {
    order: 1;
}
.review-note-toggle,
.review-note-group {
    display: grid;
    gap: 8px;
}
.review-note-toggle > summary,
.review-note-group > summary {
    list-style: none;
    cursor: pointer;
    width: fit-content;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.review-note-toggle > summary::-webkit-details-marker,
.review-note-group > summary::-webkit-details-marker {
    display: none;
}
.review-note-toggle > summary:hover,
.review-note-group > summary:hover {
    text-decoration: underline;
}
.review-note-input-wrap {
    display: grid;
    gap: 6px;
}
.review-note-input-wrap textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
}
.review-note-input-wrap textarea.is-invalid {
    border-color: var(--line);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.34);
}
.review-note-input-wrap textarea.is-invalid:focus,
.review-note-input-wrap textarea.is-invalid:focus-visible {
    border-color: var(--line);
    box-shadow: 0 0 0 1px var(--line), 0 0 0 5px rgba(185, 28, 28, 0.42);
    outline: none;
}
.review-history-status {
    justify-self: start;
    text-align: left;
    align-self: start;
    text-transform: uppercase;
}
.review-status-accepted {
    color: #15803d;
    font-weight: 700;
}
.review-file-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
    justify-self: end;
    align-self: start;
}
.review-file-actions .btn,
.review-file-actions .inline-form {
    white-space: nowrap;
    flex: 0 0 auto;
}
.review-note-block {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    align-self: start;
    justify-self: stretch;
    overflow: hidden;
}
.review-note-block-main {
    grid-column: 1 / -1;
}
.review-note-group > .review-note-block-admin {
    order: 2;
}
.review-note-group > .review-note-block-contributor {
    order: 3;
}
.review-note-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.review-note-meta {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.35;
}
.review-note-text {
    display: block;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.review-note-block-admin {
    background: rgba(239, 246, 255, 0.88);
}
.review-note-block-contributor {
    background: rgba(248, 250, 252, 0.92);
}
.review-note-entry {
    display: grid;
    gap: 4px;
}
.review-note-entry + .review-note-entry {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.review-summary-copy {
    margin: 0;
}
.panel-inline-counters {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-summary-title-row-inline {
    justify-content: flex-start;
    gap: 10px;
}
.panel-inline-counter {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}
.panel-inline-counter strong {
    color: var(--text);
}
.panel-inline-counter-label {
    margin-right: 4px;
}
.review-file-context {
    line-height: 1.4;
}
.trash-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.trash-selection-summary {
    margin: 0;
}
.trash-integrity-stack {
    margin-top: 8px;
}
.trash-restore-hint {
    display: block;
    margin-top: 6px;
    max-width: 280px;
    white-space: normal;
    text-align: left;
}
.review-history-row-validated > td {
    background: rgba(34, 197, 94, 0.08);
}
.review-history-row-rejected > td {
    background: rgba(239, 68, 68, 0.08);
}
.subpanel.review-pending-panel {
    background: rgba(148, 163, 184, 0.14);
}
.review-pending-row-highlighted > td {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.08));
    border-top: 2px solid rgba(217, 119, 6, 0.55);
    border-bottom: 2px solid rgba(217, 119, 6, 0.55);
}
.review-pending-row-highlighted > td:first-child {
    border-left: 2px solid rgba(217, 119, 6, 0.55);
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}
.review-pending-row-highlighted > td:last-child {
    border-right: 2px solid rgba(217, 119, 6, 0.55);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}
.review-pending-row-highlighted > td:not(:first-child) {
    border-left-color: transparent;
}
.review-highlight-pill {
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-top: 3px;
    margin-right: -2px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(145deg, #f59e0b, #ea580c);
    color: #fff7ed;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(194, 65, 12, 0.28);
    pointer-events: auto;
    animation: review-highlight-pill-blink 1.15s ease-in-out 5;
}
@keyframes review-highlight-pill-blink {
    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.42;
        transform: translateY(-2px);
    }
}
.review-path-segment::before {
    content: "/";
    margin-right: 8px;
    color: var(--muted);
}
.tree-children {
    margin-top: 12px;
    padding-left: 34px;
    border-left: 2px solid rgba(31, 111, 120, 0.14);
}
.tree-node-depth-1 {
    margin-left: 18px;
    background: rgba(246, 250, 252, 0.96);
}
.tree-node-depth-2 {
    margin-left: 34px;
    background: rgba(250, 252, 253, 0.98);
}
.tree-node-depth-3,
.tree-node-depth-4,
.tree-node-depth-5 {
    margin-left: 50px;
    background: rgba(252, 253, 254, 1);
}
.file-row, .compact-item {
    padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.88);
}
.compact-item-node {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    overflow: visible;
}
.compact-drop-slot,
.compact-item-node,
.compact-node-file-item {
    --compact-drop-line-height: 3px;
}
.compact-drop-slot {
    position: relative;
    min-height: 10px;
    border-radius: 999px;
}
.compact-drop-slot.is-active::after,
.compact-item-node.drop-before::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    height: var(--compact-drop-line-height);
    border-radius: 999px;
    background: var(--primary);
    pointer-events: none;
}
.compact-drop-slot.is-active::after {
    top: 50%;
    transform: translateY(-50%);
}
.compact-item-node.drop-before::before {
    top: -6px;
}
.compact-drop-slot-node {
    grid-column: 1 / -1;
    /* min-height: 20px; */
    margin: -9px 0;
}
.compact-drop-slot-tree-start {
    margin: 0 0 4px;
}
.compact-drop-slot-file {
    margin: -2px 0;
}
.compact-item-node.is-dragging {
    opacity: 0.55;
}
.compact-item-node.drop-after {
    box-shadow: none;
}
.compact-item-node.drop-inside {
    box-shadow: inset 3px 0 0 var(--accent);
    background: rgba(242, 166, 90, 0.14);
}
.compact-item-node.drop-after::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -6px;
    height: var(--compact-drop-line-height);
    border-radius: 999px;
    background: var(--primary);
    pointer-events: none;
}
.compact-node-main {
    width: 100%;
    padding-left: calc(var(--node-depth, 0) * 22px);
    min-width: 0;
    display: grid;
    justify-items: start;
    text-align: left;
}
.compact-node-main > .muted-copy {
    margin-left: 50px;
}
.compact-node-title-row,
.compact-node-file-title-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
}
.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    margin-bottom: 0;
    padding: 6px 10px;
    border: 1px dashed rgba(23, 48, 66, 0.28);
    border-radius: 10px;
    background: rgba(243, 246, 248, 0.9);
    color: var(--muted);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: grab;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
.drag-handle:hover {
    filter: brightness(0.96);
    border-color: rgba(23, 48, 66, 0.44);
    color: var(--text);
}
.drag-handle.is-drop-target {
    border-color: rgba(242, 166, 90, 0.7);
    background: rgba(242, 166, 90, 0.18);
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.16);
}
.drag-handle:active {
    cursor: grabbing;
}
.compact-node-actions {
    justify-self: end;
    justify-content: flex-end;
}
.compact-inline-toggle {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.compact-status-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: auto;
}
.compact-status-toggle input {
    margin: 0;
}
.compact-node-file-list {
    width: 100%;
    display: grid;
    gap: 0;
    margin-top: 12px;
    --compact-file-actions-width: 260px;
    --compact-file-origin-width: 118px;
    --compact-file-size-width: 88px;
    --compact-file-date-width: 148px;
}
.compact-node-file-head,
.compact-node-file-item {
    display: grid;
    grid-template-columns:
        minmax(0, 1.8fr)
        var(--compact-file-origin-width)
        var(--compact-file-size-width)
        var(--compact-file-date-width)
        var(--compact-file-date-width)
        var(--compact-file-actions-width);
    gap: 10px;
    align-items: center;
}
.compact-node-file-head {
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
}
.compact-node-file-head span:first-child {
    text-align: left;
    padding-left: 8px;
}
.compact-node-file-item {
    position: relative;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    overflow: visible;
}
.compact-node-file-item.is-dragging {
    opacity: 0.55;
}
.compact-node-file-item.is-drag-armed {
    background: rgba(223, 229, 234, 0.92);
    border-color: rgba(23, 48, 66, 0.28);
}
.compact-node-file-main {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 2px;
    justify-items: start;
    text-align: left;
}
.drag-handle-file {
    justify-self: start;
}
.compact-node-file-main strong,
.compact-node-file-main span {
    overflow-wrap: anywhere;
}
.compact-node-file-meta {
    min-width: 0;
    color: var(--text);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
    text-align: center;
}
.compact-node-file-origin.is-validated {
    color: #15803d;
    font-weight: 700;
}
.compact-node-file-origin.is-rejected {
    color: #b91c1c;
    font-weight: 700;
}
.compact-node-file-origin.is-neutral {
    color: var(--muted);
}
.compact-node-file-actions {
    justify-self: end;
    justify-content: flex-end;
    white-space: nowrap;
    padding-right: 6px;
}
.panel-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-summary::-webkit-details-marker { display: none; }
.admin-collapsible > summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--primary-dark);
}
.admin-collapsible[open] > summary::after {
    content: "−";
}
.panel-body-collapsible {
    margin-top: 18px;
    gap: 20px;
}
.admin-collapsible:not([open]) > .panel-body-collapsible {
    display: none;
}
.admin-collapsible[open] > .panel-body-collapsible {
    display: grid;
}
.subpanel {
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,0.55);
    margin-bottom: 20px;
}
.inventory-detached-panel {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 22px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}
.inventory-detached-panel .panel-summary {
    margin-bottom: 6px;
}
.repository-editor-panel {
    display: block;
    margin-bottom: 18px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.repository-editor-panel[open] {
    background: rgba(120, 130, 140, 0.14);
}
.repository-editor-panel:not([open]) {
    padding-bottom: 0;
}
.repository-editor-panel > .panel-summary {
    width: 100%;
    margin: 0;
    padding: 18px;
    border-radius: 18px;
    transition: background 0.15s ease, color 0.15s ease;
}
.repository-editor-panel > .panel-summary:hover {
    background: rgba(120, 130, 140, 0.14);
}
.repository-editor-panel[open] > .panel-summary {
    background: rgba(120, 130, 140, 0.14);
}
.repository-editor-panel > .panel-summary h3 {
    margin-bottom: 0;
}
.repository-editor-panel[open] > .panel-body-collapsible {
    padding: 0 18px 18px;
}
.file-meta, .file-actions, .company-selector, .manage-grid, .table-wrap, .inline-form { display: grid; gap: 8px; }
.list-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: end;
    grid-auto-flow: column;
}
.list-filters-actions {
    display: flex;
    justify-content: flex-end;
}
.list-filters-history-review {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: end;
    width: 100%;
    min-width: 0;
}
.list-filters-history-review > label {
    min-width: 0;
    flex: 1 1 0;
}
.list-filters-history-review > label:nth-of-type(1) {
    flex: 0 1 180px;
}
.list-filters-history-review > label:nth-of-type(2) {
    flex: 1 1 240px;
}
.list-filters-history-review > label:nth-of-type(3),
.list-filters-history-review > label:nth-of-type(4) {
    flex: 0 1 150px;
}
.list-filters-history-review > label > select,
.list-filters-history-review > label > input {
    width: 100%;
}
.list-filters-history-review .list-filters-actions {
    flex: 0 0 auto;
    align-self: end;
    white-space: nowrap;
    margin-left: auto;
}
.status-toggle-form {
    display: inline-grid;
    margin: 0;
}
.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.status-toggle.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.status-toggle input {
    width: auto;
    margin: 0;
}
.status-toggle.is-disabled input {
    cursor: not-allowed;
}
.integrity-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.integrity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid rgba(23, 48, 66, 0.1);
    background: rgba(23, 48, 66, 0.06);
    color: var(--primary-dark);
    white-space: nowrap;
}
.integrity-badge.is-ok {
    border-color: rgba(33, 110, 57, 0.18);
    background: rgba(33, 110, 57, 0.1);
    color: var(--success);
}
.integrity-badge.is-warning {
    border-color: rgba(242, 166, 90, 0.28);
    background: rgba(242, 166, 90, 0.14);
    color: #9a6118;
}
.integrity-badge.is-danger {
    border-color: rgba(163, 59, 32, 0.2);
    background: rgba(163, 59, 32, 0.1);
    color: var(--danger);
}
.user-identity-cell {
    white-space: normal;
}
.user-identity-primary,
.user-identity-secondary {
    display: block;
    line-height: 1.35;
}
.user-identity-primary {
    font-weight: 600;
}
.user-identity-secondary {
    color: var(--muted);
}
.current-password-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.stacked-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.manage-grid-span-full {
    grid-column: 1 / -1;
}
.node-tree-toolbar {
    margin-bottom: 14px;
}
.node-tree-toolbar.is-busy,
.manage-stage.is-busy {
    pointer-events: none;
}
.node-tree-repository-select {
    display: grid;
    gap: 8px;
    max-width: 420px;
}
.node-tree-repository-select.attention select {
    border-color: rgba(163, 59, 32, 0.7);
    box-shadow: 0 0 0 3px rgba(163, 59, 32, 0.14);
    animation: repositorySelectWarning 0.72s ease-in-out 3;
}
.node-tree-repository-select select.is-busy {
    opacity: 0.72;
    filter: grayscale(0.08);
}
.node-tree-stage.is-ready {
    animation: nodeTreeStageIn 0.22s ease;
}
.node-tree-stage.is-ready .compact-item-node {
    animation: nodeCascadeIn 0.28s ease both;
    animation-delay: calc(var(--node-seq, 0) * 0.04s);
}
.node-tree-stage.is-closing {
    animation: nodeTreeStageOut 0.2s ease forwards;
    pointer-events: none;
}
.node-tree-stage.is-closing .compact-item-node {
    animation: nodeCascadeOut 0.2s ease both;
    animation-delay: calc(var(--node-seq-out, 0) * 0.03s);
}
.node-tree-empty-state {
    margin-top: 6px;
}
.repository-list-panel table {
    table-layout: fixed;
    min-width: 0;
}
.repository-list-panel .table-wrap td,
.repository-list-panel .table-wrap th {
    white-space: normal;
}
.repository-list-panel .action-cell {
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
}
.repository-list-panel .action-cell .btn,
.repository-list-panel .action-cell .inline-form {
    display: inline-flex;
    vertical-align: middle;
}
.repository-list-panel .action-cell .inline-form {
    margin-left: 8px;
}
.repository-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 24%) minmax(0, 20%) minmax(0, 16%) minmax(0, 40%);
    gap: 12px;
    align-items: center;
    width: 100%;
}
.repository-meta-grid-head {
    width: 100%;
}
.repository-meta-grid-head span {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.repository-meta-actions-head {
    text-align: center;
}
.repository-meta-companies,
.repository-meta-directory,
.repository-meta-status {
    min-width: 0;
}
.repository-meta-directory {
    overflow-wrap: anywhere;
}
.repository-meta-actions {
    justify-self: end;
}
.manage-grid { grid-template-columns: 0.5fr 1.1fr; gap: 20px; }
.companies-manage-grid { grid-template-columns: 1fr 1fr; }
.companies-manage-grid > .subpanel {
    width: 100%;
    align-self: stretch;
}
.companies-manage-grid > .subpanel > .repository-editor-panel {
    width: 100%;
}
.manage-grid-top { margin-bottom: 20px; }
.manage-grid > .subpanel {
    min-width: 0;
}
.manage-layout {
    display: grid;
    gap: 10px;
    align-items: start;
}
.manage-layout-topbar {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    min-height: 100%;
    height: 100%;
    max-height: 100%;
    align-content: start;
    align-items: stretch;
    overflow: hidden;
}
.manage-nav-panel {
    margin: 0;
    padding: 0;
    background: transparent;
}
.manage-nav-panel-top {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
}
.manage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.manage-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    background: rgba(255, 255, 255, 0.48);
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(23, 48, 66, 0.08);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
.manage-nav-link:hover {
    filter: brightness(0.94);
    border-color: rgba(23, 48, 66, 0.16);
}
.manage-nav-link.is-active {
    background: linear-gradient(145deg, rgba(31, 111, 120, 0.18), rgba(24, 79, 86, 0.12));
    border-color: rgba(31, 111, 120, 0.28);
    color: var(--primary-dark);
}
.manage-stage {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-top: 8px;
}
.manage-stage-logs {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-right: 0;
}
.manage-stage-health {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}
.logs-layout {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
.manage-stage-logs .logs-layout {
    min-height: 0;
    height: 100%;
}
.manage-stage-logs .logs-panel {
    min-height: 0;
    height: 100%;
}
.manage-stage-panel {
    animation: managePanelIn 0.24s ease;
    transform-origin: top center;
    margin-top: 0;
}
.manage-stage-panel.is-closing {
    animation: managePanelOut 0.22s ease forwards;
}
.manage-stage-panel.is-empty {
    animation-duration: 0.18s;
}
.manage-empty-panel {
    min-height: 60vh;
    display: grid;
    place-items: center;
}
.manage-empty-state {
    max-width: 420px;
    text-align: center;
}
.manage-empty-state h3 {
    margin-bottom: 10px;
}
@keyframes managePanelIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scaleY(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}
@keyframes repositorySelectWarning {
    0%, 100% {
        border-color: var(--line);
        box-shadow: 0 0 0 0 rgba(163, 59, 32, 0);
        background: #fff;
    }
    50% {
        border-color: rgba(163, 59, 32, 0.8);
        box-shadow: 0 0 0 3px rgba(163, 59, 32, 0.16);
        background: rgba(163, 59, 32, 0.06);
    }
}
@keyframes managePanelOut {
    from {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scaleY(0.98);
    }
}
@keyframes nodeTreeStageIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes nodeCascadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes nodeTreeStageOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}
@keyframes nodeCascadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}
.filters-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.action-cell { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; /* margin-top: 20px; */ }
.table-wrap .inline-form { display: inline-grid; }
.repo-switch-form { display: flex; justify-content: flex-end; margin: 0; }
.repo-switch {
    display: grid;
    gap: 4px;
    min-width: 465px;
}
.repo-switch-title {
    min-width: 465px;
    max-width: 100%;
}
.repo-switch-title select,
.repo-switch-static {
    width: 100%;
    min-height: 65px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.2;
}
.repo-switch-title select {
    padding: 18px 52px 18px 20px;
}
.repo-switch-static {
    display: flex;
    align-items: center;
    padding: 18px 20px;
}
.repo-switch.repo-switch-title.repo-switch-static.repo-switch-static-single {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
    max-width: max-content;
}
.auto-meta {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
}
.repository-table-wrap {
    margin-top: 0;
    margin-left: 12px;
    margin-right: 12px;
    width: auto;
    box-sizing: border-box;
    padding-right: 12px;
}
.publication-links-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}
.publication-links-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.publication-links-list {
    display: grid;
    gap: 12px;
}
.publication-link-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    border-radius: 14px;
    background: rgba(244, 247, 250, 0.72);
}
.publication-link-checkbox {
    margin-bottom: 0;
}
.repository-table {
    min-width: 0;
    table-layout: fixed;
}
.repository-table th:first-child,
.repository-table td:first-child {
    text-align: left;
    width: 34%;
}
.repository-table th:not(:first-child):not(:last-child),
.repository-table td:not(:first-child):not(:last-child) {
    text-align: center;
}
.repository-table th,
.repository-table td {
    min-width: 0;
}
.repository-table td {
    vertical-align: top;
}
.repository-table th:last-child,
.repository-table td:last-child {
    width: 150px;
}
.repository-table-tree th:first-child,
.repository-table-tree td:first-child {
    width: 40%;
}
.repository-table-tree th:nth-child(2),
.repository-table-tree td:nth-child(2) {
    width: 11%;
}
.repository-table-tree th:nth-child(3),
.repository-table-tree td:nth-child(3) {
    width: 10%;
}
.repository-table-tree th:nth-child(4),
.repository-table-tree td:nth-child(4) {
    width: 12%;
}
.repository-table-tree th:nth-child(5),
.repository-table-tree td:nth-child(5) {
    width: 13%;
}
.repository-table-tree th:last-child,
.repository-table-tree td:last-child {
    width: 14%;
}
.repository-table-tree th:nth-child(2),
.repository-table-tree th:nth-child(3),
.repository-table-tree th:nth-child(4),
.repository-table-tree th:nth-child(5),
.repository-table-tree td:nth-child(2),
.repository-table-tree td:nth-child(3),
.repository-table-tree td:nth-child(4),
.repository-table-tree td:nth-child(5) {
    padding-left: 6px;
    padding-right: 6px;
}
.repository-table th:last-child {
    text-align: right;
    padding-right: 15px;
}
.repository-table td.action-cell {
    display: table-cell;
    text-align: right;
    vertical-align: middle;
    padding-right: 15px;
}
.repository-table td.action-cell > * {
    display: inline-flex;
    vertical-align: middle;
}
.repository-table td.action-cell > * + * {
    margin-left: 8px;
}
.repository-view-toggle {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    height: 32px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(23, 48, 66, 0.1);
    border: 1px solid rgba(23, 48, 66, 0.12);
    box-sizing: border-box;
}
.repository-view-toggle-option {
    height: 100%;
    padding: 0 16px;
    border-radius: 999px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
    box-sizing: border-box;
}
.repository-view-toggle-option:hover {
    transform: translateY(-1px);
}
.repository-view-toggle-option.is-active {
    background: linear-gradient(145deg, #0c4a8a, #082f63);
    color: #fff;
    box-shadow: 0 10px 24px rgba(8, 47, 99, 0.22);
}
.repository-explorer-shell {
    display: grid;
    gap: 14px;
}
.panel > .panel-header + .repository-explorer-shell,
.panel > .panel-header + .tree-list {
    margin-top: 20px;
}
.repository-explorer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 4px 12px 0;
    padding: 5px 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}
.repository-explorer-breadcrumb-shell {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}
.repository-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.repository-breadcrumb-root-picker {
    position: relative;
}
.repository-breadcrumb-root-picker > summary {
    list-style: none;
    cursor: pointer;
}
.repository-breadcrumb-root-picker > summary::-webkit-details-marker {
    display: none;
}
.repository-breadcrumb-root-picker[open] > summary {
    text-decoration: underline;
}
.repository-breadcrumb-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}
.repository-breadcrumb-link:hover {
    text-decoration: underline;
}
.repository-breadcrumb-root-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 240px;
    max-width: min(360px, calc(100vw - 120px));
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(23, 48, 66, 0.14);
    z-index: 20;
}
.repository-breadcrumb-root-option {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
}
.repository-breadcrumb-root-option:hover {
    background: rgba(23, 48, 66, 0.08);
}
.repository-breadcrumb-separator {
    color: rgba(23, 48, 66, 0.45);
}
.repository-explorer-actions {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.repository-explorer-nav-buttons {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.repository-nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(219, 234, 254, 0.64);
    color: #0d3d6b;
}
.repository-nav-icon-btn svg {
    width: 20px;
    height: 20px;
}
.repository-tree-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    box-sizing: border-box;
}
.repository-tree-home-btn svg {
    width: 20px;
    height: 20px;
}
.repository-nav-icon-btn.is-disabled,
.repository-nav-icon-btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.42;
}
.repository-explorer-upload-toggle {
    position: relative;
}
.repository-explorer-upload-toggle[open] {
    z-index: 3;
}
.repository-explorer-upload-toggle .repository-upload-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: min(calc(100vw - 120px), 980px);
    margin: 0;
}
.repository-explorer-table-wrap {
    margin-top: 0;
}
.repository-explorer-table td:last-child,
.repository-explorer-table th:last-child {
    width: 240px;
}
.repository-explorer-table th:nth-child(2),
.repository-explorer-table td:nth-child(2) {
    width: 16%;
}
.repository-explorer-table th:nth-child(3),
.repository-explorer-table td:nth-child(3) {
    width: 8%;
}
.repository-explorer-table td,
.repository-explorer-table th {
    background: transparent;
}
.repository-directory-row td {
    background: rgba(23, 48, 66, 0.05);
}
.repository-directory-row {
    cursor: default;
}
.repository-directory-row td:not(.action-cell) {
    cursor: pointer;
}
.repository-directory-row:focus-visible td {
    outline: 2px solid rgba(12, 74, 138, 0.45);
    outline-offset: -2px;
}
.repository-directory-row:hover td {
    background: rgba(23, 48, 66, 0.08);
}
.repository-directory-row-private td:not(.action-cell) {
    background: rgba(116, 116, 116, 0.92);
    color: #fff;
}
.repository-directory-row-private td.action-cell {
    background: rgba(116, 116, 116, 0.92);
}
.repository-directory-row-private:hover td:not(.action-cell) {
    background: rgba(132, 132, 132, 0.94);
}
.repository-directory-row-private:hover td.action-cell {
    background: rgba(132, 132, 132, 0.94);
}
.repository-directory-row-private .muted-copy,
.repository-directory-row-private .repository-meta-count {
    color: rgba(255, 255, 255, 0.82);
}
.repository-directory-row-private .repository-meta-count-validated {
    color: #86efac;
}
.repository-directory-row-private .repository-meta-count-alert {
    color: #fca5a5;
}
.repository-directory-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.repository-directory-title span:last-child {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.repository-directory-description {
    white-space: pre-line;
}
.repository-directory-icon {
    display: none;
}
.repository-private-company-badge {
    display: inline-block;
    width: auto;
    height: 22px;
    max-width: 72px;
    object-fit: contain;
    background: transparent;
    vertical-align: middle;
}
.btn-private-node-action,
.btn-download-directory-private {
    background: rgba(72, 72, 72, 0.96);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.btn-private-node-action:hover,
.btn-download-directory-private:hover {
    background: rgba(88, 88, 88, 0.98);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}
.btn-download-directory-private.btn-disabled,
.btn-download-directory-private[aria-disabled="true"] {
    background: rgba(92, 92, 92, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
}
.repository-directory-subtitle {
    margin-top: 4px;
}
.repository-directory-state {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.repository-directory-state .repository-file-state {
    grid-area: auto;
    padding: 5px 8px;
    font-size: 0.72rem;
}
.repository-file-row-rejected td {
    background: rgba(239, 68, 68, 0.05);
}
.repository-file-row-highlighted td {
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
}
.repository-file-row-highlighted:not(.repository-file-row-rejected) td {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(74, 222, 128, 0.08));
    border-top-color: rgba(22, 163, 74, 0.6);
    border-bottom-color: rgba(22, 163, 74, 0.6);
}
.repository-file-row-highlighted.repository-file-row-rejected td {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(248, 113, 113, 0.08));
    border-top-color: rgba(220, 38, 38, 0.62);
    border-bottom-color: rgba(220, 38, 38, 0.62);
}
.repository-file-row-highlighted > td:first-child {
    border-left: 2px solid transparent;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}
.repository-file-row-highlighted:not(.repository-file-row-rejected) > td:first-child {
    border-left-color: rgba(22, 163, 74, 0.6);
}
.repository-file-row-highlighted.repository-file-row-rejected > td:first-child {
    border-left-color: rgba(220, 38, 38, 0.62);
}
.repository-file-row-highlighted > td:last-child {
    border-right: 2px solid transparent;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}
.repository-file-row-highlighted:not(.repository-file-row-rejected) > td:last-child {
    border-right-color: rgba(22, 163, 74, 0.6);
}
.repository-file-row-highlighted.repository-file-row-rejected > td:last-child {
    border-right-color: rgba(220, 38, 38, 0.62);
}
.repository-file-row-highlighted > td:not(:first-child) {
    border-left-color: transparent;
}
.repository-file-state-stack {
    position: relative;
    display: inline-grid;
    align-items: center;
}
.repository-table td:nth-child(2) .repository-file-state-stack,
.repository-table th:nth-child(2) {
    justify-content: center;
}
.repository-highlight-pill {
    grid-area: 1 / 1;
    justify-self: stretch;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    animation: review-highlight-pill-blink 1.15s ease-in-out 5;
    z-index: 2;
}
.repository-highlight-pill-validated {
    background: linear-gradient(145deg, #22c55e, #15803d);
    border-color: rgba(21, 128, 61, 0.36);
    color: #f0fdf4;
}
.repository-highlight-pill-rejected {
    background: linear-gradient(145deg, #ef4444, #b91c1c);
    border-color: rgba(185, 28, 28, 0.4);
    color: #fef2f2;
}
.repository-file-state {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.repository-file-state-shadowed {
    opacity: 0;
}
.repository-file-state-neutral {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.18);
    color: #475569;
}
.repository-file-state-validated {
    background: rgba(21, 128, 61, 0.12);
    border-color: rgba(21, 128, 61, 0.18);
    color: #166534;
}
.repository-file-state-pending {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.22);
    color: #7a5600;
}
.repository-file-state-rejected {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
}
.repository-file-rejected-note {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    color: var(--danger);
    font-weight: 700;
}
.repository-mobile-inline-state,
.repository-mobile-details {
    display: none;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.trash-table td.action-cell {
    display: table-cell;
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
    padding-right: 12px;
}
.trash-table td.action-cell > * {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.trash-table td.action-cell > * + * {
    margin-left: 8px;
}
.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}
.repository-list-panel .table-wrap #repositories-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.repository-list-panel .table-wrap #repositories-table thead,
.repository-list-panel .table-wrap #repositories-table tbody,
.repository-list-panel .table-wrap #repositories-table tr {
    display: block;
    width: 100%;
}
.repository-list-panel .table-wrap #repositories-table thead tr,
.repository-list-panel .table-wrap #repositories-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
}
.repository-list-panel .table-wrap #repositories-table th,
.repository-list-panel .table-wrap #repositories-table td {
    min-width: 0;
}
.repository-list-panel .table-wrap #repositories-table th:first-child,
.repository-list-panel .table-wrap #repositories-table td:first-child {
    grid-column: 1;
}
.repository-list-panel .table-wrap #repositories-table th:last-child,
.repository-list-panel .table-wrap #repositories-table td:last-child {
    grid-column: 2 / 4;
}
.table-wrap td,
.table-wrap th {
    white-space: nowrap;
}
.repository-table-wrap td,
.repository-table-wrap th {
    white-space: normal;
}
.repository-table td:last-child,
.repository-table th:last-child {
    padding-right: 15px;
}
.logs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: stretch;
    background:
        linear-gradient(145deg, rgba(23, 48, 66, 0.08), rgba(255, 255, 255, 0.78)),
        rgba(255, 255, 255, 0.66);
}
.logs-hero-copy,
.logs-hero-metrics {
    display: grid;
    gap: 12px;
}
.logs-eyebrow {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}
.logs-hero-copy h3 {
    margin: 0;
}
.logs-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}
.logs-kpi {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    background: rgba(255, 255, 255, 0.76);
}
.logs-kpi-label {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.logs-kpi-value {
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1;
    color: var(--primary-dark);
}
.logs-kpi-note {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}
.logs-switch-panel {
    padding: 16px 18px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}
.logs-filters-panel {
    background: transparent;
    flex-shrink: 0;
}
.logs-filters-panel .filter-actions {
    gap: 2px;
}
.logs-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    background: rgba(255, 255, 255, 0.78);
}
.logs-view-switch-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.logs-view-switch-link:hover {
    background: rgba(23, 48, 66, 0.06);
    color: var(--primary-dark);
}
.logs-view-switch-link.is-active {
    background: linear-gradient(145deg, rgba(23, 48, 66, 0.2), rgba(227, 235, 241, 0.96));
    border: 1px solid rgba(23, 48, 66, 0.16);
    color: var(--primary-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.logs-view-switch-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(23, 48, 66, 0.08);
    color: inherit;
    font-size: 0.82rem;
}
.logs-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    margin-top: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}
.logs-panel-activity {
    border-color: rgba(23, 48, 66, 0.12);
    background:
        linear-gradient(180deg, rgba(23, 48, 66, 0.04), rgba(255, 255, 255, 0.82)),
        rgba(255, 255, 255, 0.72);
}
.logs-panel-access {
    border-color: rgba(40, 112, 78, 0.12);
    background:
        linear-gradient(180deg, rgba(40, 112, 78, 0.04), rgba(255, 255, 255, 0.82)),
        rgba(255, 255, 255, 0.72);
}
.logs-panel-header {
    align-items: center;
}
.logs-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
}
.logs-table-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    margin-top: 18px;
    margin-bottom: 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
}
.logs-table-wrap.table-wrap {
    overflow: hidden;
}
.logs-table {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}
.logs-table thead,
.logs-table tbody,
.logs-table tr {
    display: block;
    width: 100%;
}
.logs-table tbody {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding-bottom: 10px;
}
.logs-table-activity {
    --logs-columns: 134px minmax(120px, 0.95fr) minmax(120px, 0.9fr) minmax(170px, 1fr) 170px minmax(140px, 0.9fr) minmax(160px, 1fr);
}
.logs-table-access {
    --logs-columns: 134px minmax(150px, 1.1fr) minmax(130px, 1fr) 132px minmax(150px, 1fr);
}
.logs-table-activity thead tr,
.logs-table-activity tbody tr {
    display: grid;
    grid-template-columns: var(--logs-columns);
    width: 100%;
}
.logs-table-access thead tr,
.logs-table-access tbody tr {
    display: grid;
    grid-template-columns: var(--logs-columns);
    width: 100%;
}
.logs-table th,
.logs-table td {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}
.logs-table thead th {
    background: rgba(247, 250, 252, 0.96);
    backdrop-filter: blur(8px);
}
.logs-action-pill,
.logs-access-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    background: rgba(23, 48, 66, 0.06);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}
.logs-access-pill.is-success {
    border-color: rgba(40, 112, 78, 0.2);
    background: rgba(40, 112, 78, 0.1);
    color: #1f6d4a;
}
.logs-access-pill.is-failure {
    border-color: rgba(163, 59, 32, 0.2);
    background: rgba(163, 59, 32, 0.08);
    color: #a33b20;
}
.logs-empty-cell {
    padding: 22px 14px;
    text-align: center;
    color: var(--muted);
    font-style: italic;
}
.health-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
}
.health-hero.is-healthy {
    background:
        linear-gradient(145deg, rgba(40, 112, 78, 0.12), rgba(255, 255, 255, 0.68)),
        rgba(255, 255, 255, 0.6);
    border-color: rgba(40, 112, 78, 0.18);
}
.health-hero.is-attention {
    background:
        linear-gradient(145deg, rgba(176, 122, 24, 0.12), rgba(255, 255, 255, 0.68)),
        rgba(255, 255, 255, 0.6);
    border-color: rgba(176, 122, 24, 0.22);
}
.health-hero.is-warning {
    background:
        linear-gradient(145deg, rgba(163, 59, 32, 0.12), rgba(255, 255, 255, 0.68)),
        rgba(255, 255, 255, 0.6);
    border-color: rgba(163, 59, 32, 0.22);
}
.health-hero-copy,
.health-hero-meta {
    display: grid;
    gap: 10px;
}
.health-eyebrow {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}
.health-hero-copy h3 {
    margin: 0;
}
.health-kpi-card {
    display: grid;
    gap: 6px;
    align-content: start;
    justify-items: center;
    text-align: center;
    border-radius: 18px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    background: rgba(255, 255, 255, 0.72);
}
.health-kpi-card--summary {
    padding: 18px;
}
.health-kpi-label {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.health-kpi-value {
    font-size: clamp(1.8rem, 2.3vw, 2.5rem);
    line-height: 1;
    color: var(--primary-dark);
}
.health-kpi-value--small {
    font-size: 1rem;
    line-height: 1.35;
}
.health-kpi-note {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}
.health-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.health-kpi-chip {
    display: grid;
    gap: 4px;
    justify-items: center;
    text-align: center;
    padding: 12px 14px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
}
.operational-health-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.panel-summary-title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.panel-summary-title-row h3 {
    margin: 0;
}
.health-block-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(23, 48, 66, 0.08), rgba(23, 48, 66, 0.18), rgba(23, 48, 66, 0.08));
    margin: 4px 0 2px;
}
.health-grid-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}
.health-subpanel-compact {
    align-self: stretch;
}
.health-table-wrap {
    overflow-x: visible;
}
.health-table-compact {
    min-width: 0;
    table-layout: fixed;
}
.health-table-compact th,
.health-table-compact td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}
.health-table-compact th:last-child,
.health-table-compact td:last-child {
    width: 78px;
    text-align: right;
}
.health-inline-meta {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) auto minmax(0, 1.4fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}
.health-inline-meta--issue {
    border-color: rgba(163, 59, 32, 0.14);
    background: linear-gradient(145deg, rgba(163, 59, 32, 0.06), rgba(255, 255, 255, 0.76));
}
.health-inline-detail {
    min-width: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.health-action-row {
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.health-action-group {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(23, 48, 66, 0.09);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
}
.health-action-group-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.health-action-group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.health-action-row .inline-form {
    display: inline-grid;
}
.health-action-row .btn {
    padding: 8px 12px;
    border-radius: 12px;
    white-space: nowrap;
}
.companies-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.users-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.companies-table th,
.companies-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: middle;
}
.companies-table .company-description-cell {
    line-height: 1.4;
}
.company-role-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}
.btn-inline-info {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    align-self: center;
}
.inline-popup-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: center;
}
.inline-popup-card {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: min(320px, 42vw);
    min-width: min(600px, 42vw);
    max-width: min(320px, 42vw);
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(23, 48, 66, 0.16);
    text-align: left;
}
.inline-popup-wrap.is-right .inline-popup-card {
    left: auto;
    right: 0;
}
.inline-popup-title {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--text);
}
.inline-popup-text {
    margin: 0;
    line-height: 1.45;
    color: var(--muted);
    white-space: normal;
    overflow-wrap: anywhere;
}
.companies-table .company-repositories-cell span {
    display: block;
    line-height: 1.4;
}
.companies-table th:nth-child(4),
.companies-table td:nth-child(4) {
    width: 85px;
}
.companies-table th:nth-child(5) {
    text-align: center;
}
.users-table th:nth-child(5) {
    text-align: center;
}
.companies-table th:nth-child(1),
.companies-table td:nth-child(1) {
    width: 18%;
}
.companies-table th:nth-child(2),
.companies-table td:nth-child(2) {
    width: 20%;
}
.companies-table th:nth-child(3),
.companies-table td:nth-child(3) {
    width: 24%;
}
.companies-table th:nth-child(5),
.companies-table td:nth-child(5) {
    width: 220px;
}
.users-table th:nth-child(1),
.users-table td:nth-child(1) {
    width: 32%;
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) {
    width: 18%;
}
.users-table th:nth-child(3),
.users-table td:nth-child(3) {
    width: 22%;
}
.users-table th:nth-child(4),
.users-table td:nth-child(4) {
    width: 14%;
}
.users-table th:nth-child(5),
.users-table td:nth-child(5) {
    width: 220px;
}
.companies-table .action-cell,
.users-table .action-cell {
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
}
.companies-table td.action-cell,
.users-table td.action-cell {
    display: table-cell;
    vertical-align: middle;
    padding-right: 14px;
}
.companies-table td.action-cell > *,
.users-table td.action-cell > * {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.companies-table td.action-cell > * + *,
.users-table td.action-cell > * + * {
    margin-left: 8px;
}
.companies-table .action-cell .btn,
.companies-table .action-cell .inline-form,
.companies-table .action-cell .inline-popup-wrap,
.users-table .action-cell .btn,
.users-table .action-cell .inline-form,
.users-table .action-cell .inline-popup-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.chat-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    align-self: stretch;
    overflow: hidden;
}
.workspace > .chat-panel {
    min-height: 0;
    height: 100%;
    align-self: stretch;
}
.workspace > .chat-panel.chat-panel-fill {
    min-height: 0;
    height: 100%;
    max-height: 100%;
}
.chat-header-copy {
    margin: 0;
}
.chat-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
    height: 100%;
    align-self: stretch;
}
.chat-groups-panel,
.chat-main-panel {
    min-height: 0;
}
.chat-groups-panel {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    gap: 14px;
    height: 100%;
    max-height: 100%;
    padding-right: 14px;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}
.chat-groups-header {
    display: grid;
    gap: 12px;
}
.chat-toolbar {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.chat-toolbar-info {
    position: relative;
}
.chat-toolbar-info > summary {
    list-style: none;
}
.chat-toolbar-info-button {
    min-width: 44px;
    width: auto;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
}
.chat-toolbar-info > summary::-webkit-details-marker {
    display: none;
}
.chat-toolbar-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: min(320px, 70vw);
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}
.chat-toolbar-popover p {
    margin: 0;
}
.chat-groups-header h4,
.chat-thread-header h4 {
    margin: 0;
}
.chat-thread-section {
    display: grid;
    gap: 10px;
}
.chat-thread-subsection h5 {
    margin: 0;
}
.chat-thread-subsection {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
}
.chat-thread-subsection-linked {
    background: rgba(254, 242, 242, 0.88);
    border-color: rgba(220, 38, 38, 0.26);
}
.chat-thread-subsection-shared {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(202, 138, 4, 0.22);
}
.chat-thread-subsection > summary::-webkit-details-marker {
    display: none;
}
.chat-thread-subsection-body {
    display: grid;
    gap: 10px;
}
.chat-notifications-panel {
    color: #111111;
}
.chat-notifications-panel > summary {
    list-style: none;
    min-height: 32px;
    margin: 0;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(254, 226, 226, 0.96);
    color: #991b1b;
}
.chat-notifications-panel > summary::-webkit-details-marker {
    display: none;
}
.chat-notifications-panel > summary h5 {
    letter-spacing: 0.08em;
}
.chat-notifications-panel .chat-thread-section-count {
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}
.chat-notifications-panel-body {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    color: #111111;
}
.chat-notifications-panel .chat-thread-section-copy {
    color: #3f3f46;
}
.chat-thread-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}
.chat-thread-subsection-shared > .chat-thread-section-header {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(254, 240, 138, 0.92);
    color: #713f12;
}
.chat-thread-section-header h5 {
    margin: 0;
}
.chat-thread-section-copy {
    margin: 0;
}
.chat-thread-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.78rem;
}
.chat-groups-list {
    display: grid;
    grid-auto-rows: min-content;
    gap: 10px;
    padding-right: 6px;
    overflow: visible;
}
.chat-groups-list-section {
    max-height: none;
    padding-right: 4px;
}
.chat-group-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}
.chat-group-card.is-archived {
    background: rgba(248, 250, 252, 0.9);
    border-style: dashed;
}
.chat-group-card.is-shared {
    background: rgba(255, 255, 255, 0.9);
}
.chat-group-card.is-linked {
    background: rgba(240, 249, 255, 0.95);
    border-color: rgba(14, 116, 144, 0.18);
}
.chat-group-card.is-private {
    background: rgba(102, 102, 102, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}
.chat-group-card.is-private .chat-group-link,
.chat-group-card.is-private .chat-group-meta,
.chat-group-card.is-private .chat-group-file,
.chat-group-card.is-private .chat-group-private-company {
    color: rgba(255, 255, 255, 0.86);
}
.chat-group-card.is-private.is-active {
    background: rgba(150, 150, 150, 0.94);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.18);
}
.chat-group-card.is-filtered-out {
    display: none !important;
}
.canonical-home-panel {
    padding: 24px;
}
.canonical-home-grid {
    display: grid;
    gap: 16px;
}
.canonical-home-card {
    padding: 20px 22px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
}
.canonical-home-card h3 {
    margin: 0 0 10px;
}
.settings-layout {
    display: grid;
    gap: 18px;
}
.settings-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    gap: 18px;
    align-items: start;
}
.settings-kicker {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-dark);
}
.settings-hero-copy h2 {
    margin-bottom: 10px;
}
.settings-hero-meta {
    display: grid;
    gap: 10px;
}
.settings-meta-chip {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 18px;
    background: rgba(247, 250, 252, 0.92);
}
.settings-meta-chip strong {
    font-size: 1rem;
}
.settings-meta-chip span {
    color: var(--muted);
    font-size: 0.84rem;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.settings-panel {
    display: grid;
    gap: 16px;
    align-content: start;
}
.settings-panel-wide {
    grid-column: 1 / -1;
}
.settings-panel-head {
    display: grid;
    gap: 6px;
}
.settings-panel-head h3,
.settings-panel-head p {
    margin: 0;
}
.settings-form {
    gap: 16px;
}
.settings-logo-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 2px;
}
.settings-link-grid {
    align-items: stretch;
}
.settings-note-card {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    background: rgba(247, 250, 252, 0.9);
    color: var(--text);
}
.settings-note-card span {
    color: var(--muted);
    line-height: 1.45;
}
.canonical-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.canonical-kpi {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
}
.canonical-kpi strong {
    font-size: 1.5rem;
    line-height: 1;
}
.canonical-kpi span {
    color: var(--muted);
    font-size: 0.9rem;
}
.canonical-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.canonical-link-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
    color: inherit;
    text-decoration: none;
}
.canonical-link-card strong {
    line-height: 1.3;
}
.canonical-link-card span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}
.canonical-summary-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.6;
}
.canonical-summary-list strong {
    color: var(--text);
}
.canonical-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.canonical-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(31, 111, 120, 0.08);
    color: var(--primary-dark);
    font-size: 0.86rem;
    font-weight: 700;
}
.manage-home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.manage-home-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: #111111;
}
.manage-nav-link-home {
    min-width: 46px;
    width: auto;
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.repo-switch-placeholder {
    visibility: hidden;
    pointer-events: none;
}
.chat-group-link {
    display: grid;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}
.chat-group-card.is-active {
    border-color: rgba(31, 111, 120, 0.45);
    box-shadow: 0 14px 32px rgba(31, 111, 120, 0.12);
    background: rgba(255, 255, 255, 0.96);
}
.chat-group-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.chat-group-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
    white-space: nowrap;
}
.chat-group-type.is-linked {
    background: rgba(31, 111, 120, 0.12);
    color: #155e75;
}
.chat-group-type.is-shared {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}
.chat-group-type.is-private {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.chat-group-code {
    display: inline-flex;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.82rem;
}
.chat-group-file,
.chat-thread-related {
    color: var(--muted);
    font-size: 0.92rem;
}
.chat-group-private-company {
    font-size: 0.88rem;
}
.chat-group-meta,
.chat-thread-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.88rem;
}
.chat-main-panel {
    display: grid;
    gap: 14px;
    grid-auto-rows: min-content;
    align-content: start;
    min-height: 0;
    overflow: hidden;
    height: 100%;
    align-self: stretch;
}
.chat-main-panel:not(.is-canonical) {
    grid-template-rows: min-content minmax(0, 1fr) min-content;
    grid-auto-rows: min-content;
    align-content: stretch;
}
.chat-main-panel.is-canonical {
    grid-template-rows: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: stretch;
}
.chat-private-shell {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(102, 102, 102, 0.24);
    border-radius: 20px;
    background: rgba(102, 102, 102, 0.08);
}
.chat-private-zone,
.chat-archive-panel {
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px;
}
.chat-private-zone {
    background: rgba(39, 0, 153, 0.08);
    border-color: rgba(39, 0, 153, 0.24);
}
.chat-private-zone > summary {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(39, 0, 153, 0.94);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.chat-private-zone > summary .chat-thread-section-count {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.chat-private-zone > summary,
.chat-archive-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
    min-height: 32px;
    margin: 0;
}
.chat-private-zone > summary::-webkit-details-marker,
.chat-archive-panel > summary::-webkit-details-marker {
    display: none;
}
.chat-private-zone-body {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.chat-private-actions,
.chat-private-create-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.chat-private-create-form select {
    min-width: 240px;
}
.chat-layout.is-compact {
    gap: 14px;
}
.chat-layout.is-compact .chat-groups-panel,
.chat-layout.is-compact .chat-main-panel {
    padding: 16px 18px;
}
.chat-layout.is-compact .chat-group-card,
.chat-layout.is-compact .chat-message,
.chat-layout.is-compact .chat-canonical-card {
    border-radius: 12px;
}
.chat-layout.is-compact .chat-thread {
    gap: 4px;
}
.chat-layout.is-compact .chat-composer {
    gap: 10px;
}
.chat-canonical-frame {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    align-self: stretch;
    justify-self: stretch;
}
.chat-canonical-state {
    display: grid;
    gap: 14px;
    min-height: 0;
    overflow: hidden;
    padding: 4px 8px 0 0;
}
.chat-canonical-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    min-height: 0;
    height: 100%;
}
.chat-canonical-column {
    display: grid;
    gap: 12px;
    align-content: start;
    align-self: stretch;
    min-height: 0;
    justify-items: stretch;
    text-align: center;
}
.chat-canonical-action-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}
.chat-canonical-action-btn.is-group {
    border-color: rgba(202, 138, 4, 0.26);
    background: rgba(254, 240, 138, 0.92);
    color: #713f12;
}
.chat-canonical-action-btn.is-notifications {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 226, 226, 0.96);
    color: #991b1b;
}
.chat-canonical-action-btn.is-private {
    border-color: rgba(39, 0, 153, 0.44);
    background: rgba(39, 0, 153, 0.94);
    color: #ffffff;
}
.chat-canonical-action-btn.is-active {
    border-color: rgba(31, 111, 120, 0.36);
    background: rgba(31, 111, 120, 0.12);
    color: var(--primary-dark);
}
.chat-canonical-action-btn.is-group.is-active {
    border-color: rgba(202, 138, 4, 0.5);
    background: rgba(253, 224, 71, 0.98);
    color: #713f12;
}
.chat-canonical-action-btn.is-notifications.is-active {
    border-color: rgba(185, 28, 28, 0.5);
    background: rgba(254, 202, 202, 0.98);
    color: #7f1d1d;
}
.chat-canonical-action-btn.is-private.is-active {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(39, 0, 153, 0.98);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.chat-canonical-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    width: 100%;
    justify-items: stretch;
    text-align: center;
}
.chat-canonical-panel-header h4 {
    margin: 0;
}
.chat-canonical-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.chat-canonical-metric-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    justify-items: center;
    text-align: center;
}
.chat-canonical-metric-card strong {
    font-size: 1.32rem;
    line-height: 1;
}
.chat-canonical-metric-card span {
    color: var(--muted);
    font-size: 0.9rem;
}
.chat-canonical-metric-card.is-linked {
    border-color: rgba(14, 116, 144, 0.16);
    background: rgba(240, 249, 255, 0.92);
}
.chat-canonical-metric-card.is-private {
    border-color: rgba(102, 102, 102, 0.24);
    background: rgba(102, 102, 102, 0.1);
}
.chat-canonical-card-private {
    background: rgba(102, 102, 102, 0.08);
    border-color: rgba(102, 102, 102, 0.18);
}
.chat-canonical-card-linked {
    background: rgba(240, 249, 255, 0.9);
    border-color: rgba(14, 116, 144, 0.16);
}
.chat-repo-selection-state {
    min-height: calc(100vh - 240px);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
    text-align: center;
}
.chat-repo-selection-state.is-submitting {
    animation: chat-repo-selection-exit 0.28s ease forwards;
}
.chat-repo-selection-state.is-flight-active {
    opacity: 0.35;
}
.chat-repo-selection-copy {
    margin: 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.55;
    transition: opacity 0.14s ease;
}
.chat-repo-selection-copy-hidden {
    opacity: 0;
}
.chat-repo-selection-form {
    width: min(100%, 420px);
    display: flex;
    justify-content: center;
}
.chat-repo-selection-switch {
    width: min(100%, 420px);
    margin: 0 auto;
}
.chat-repo-selection-switch select[data-repository-canonical-list="1"] {
    overflow: hidden;
    transition: height 0.34s cubic-bezier(0.22, 0.8, 0.2, 1), min-height 0.34s cubic-bezier(0.22, 0.8, 0.2, 1), box-shadow 0.24s ease, background 0.24s ease;
}
.chat-repo-selection-switch select[data-repository-canonical-list="1"]:not([size="1"]) {
    min-height: 0;
}
.chat-repo-selection-switch.is-listbox {
    align-items: start;
}
.chat-repo-selection-switch.is-listbox select[data-repository-canonical-list="1"] {
    border-radius: 18px;
}
.chat-repo-selection-switch.is-collapsing select[data-repository-canonical-list="1"] {
    overflow: hidden;
}
.chat-repo-source-hidden {
    opacity: 0 !important;
    visibility: hidden;
}
.chat-repo-flight {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    margin: 0;
    transform-origin: top left;
    box-shadow: 0 18px 44px rgba(23, 48, 66, 0.18);
}
.chat-repo-flight select {
    min-height: 48px;
}
.chat-repo-flight-landed {
    box-shadow: 0 18px 44px rgba(23, 48, 66, 0.18);
}
.chat-repo-destination-arriving {
    will-change: opacity, filter;
    animation: chat-repo-destination-pulse 0.56s ease;
}
@keyframes chat-repo-destination-pulse {
    0% {
        opacity: 0.48;
        filter: brightness(1.06);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
    }
}
@keyframes chat-repo-selection-exit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-52px) scale(0.98);
    }
}
.chat-canonical-alert {
    border-color: rgba(220, 38, 38, 0.22);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.92));
}
.chat-repo-switch-attention {
    animation: chat-textarea-attention-blink 1.15s ease-in-out 5;
    border-radius: 16px;
}
.chat-repo-selection-switch[data-repository-repo-source].chat-repo-switch-attention {
    animation-iteration-count: 3;
}
.chat-repo-switch-attention select {
    border-color: rgba(220, 38, 38, 0.96);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.36);
    background: rgba(254, 226, 226, 0.96);
}
.chat-canonical-card {
    padding: 18px 20px;
    border: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: start;
    min-height: 0;
    width: 100%;
    justify-items: stretch;
    text-align: center;
}
.chat-canonical-card-search {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    margin-bottom: 10px;
    width: 100%;
}
.chat-canonical-card-search .input {
    width: 100%;
    max-width: 320px;
}
.chat-canonical-card h4 {
    margin: 0 0 10px;
}
.chat-canonical-card p {
    margin: 0;
}
.chat-canonical-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.chat-canonical-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.55;
}
.chat-canonical-shortcuts {
    display: grid;
    gap: 10px;
}
.chat-shortcut-card {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(23, 48, 66, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    text-decoration: none;
}
.chat-shortcut-card[type="button"],
.chat-shortcut-card.is-notification,
.chat-shortcut-card.chat-shortcut-card-private {
    appearance: none;
    font: inherit;
}
.chat-shortcut-card strong {
    line-height: 1.35;
}
.chat-shortcut-card span {
    color: var(--muted);
    font-size: 0.9rem;
}
.chat-shortcut-card.is-notification {
    border-color: rgba(31, 111, 120, 0.18);
    background: rgba(240, 249, 255, 0.92);
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.chat-shortcut-card-private {
    border-color: rgba(102, 102, 102, 0.22);
    background: rgba(102, 102, 102, 0.1);
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.chat-canonical-list-shell {
    display: grid;
    gap: 10px;
    min-height: 0;
    align-content: start;
    width: 100%;
}
.chat-canonical-list-shell > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}
.chat-canonical-list-shell > summary::-webkit-details-marker {
    display: none;
}
.chat-canonical-list-shell h6 {
    margin: 0;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.chat-canonical-list-items {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    min-height: 0;
    max-height: min(42vh, 100%);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    width: 100%;
}
.chat-canonical-empty {
    margin: 0;
}
.chat-canonical-actions {
    display: flex;
    justify-content: flex-start;
}
.chat-thread-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.chat-thread-header.is-linked {
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(240, 249, 255, 0.94);
}
.chat-thread-header.is-private {
    border: 1px solid rgba(102, 102, 102, 0.28);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(102, 102, 102, 0.92);
    color: #fff;
}
.chat-thread-header.is-private .chat-thread-header-meta,
.chat-thread-header.is-private .chat-thread-related {
    color: rgba(255, 255, 255, 0.86);
}
.chat-group-admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid rgba(23, 48, 66, 0.08);
}
.chat-archive-panel {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(248, 250, 252, 0.98));
}
.chat-archive-panel > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
}
.chat-archive-panel > summary::-webkit-details-marker {
    display: none;
}
.chat-archive-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 0.84rem;
}
.chat-archive-copy {
    margin: 12px 0 0;
}
.chat-archive-list {
    margin-top: 14px;
}
.chat-archived-banner {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
}
.chat-archived-empty {
    margin-top: 0;
}
.chat-thread-header {
    padding-bottom: 2px;
}
.chat-thread-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.chat-thread-header-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.chat-thread-header-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex: 0 0 auto;
}
.chat-thread-close-btn {
    min-width: 0;
    padding: 3px 8px;
    min-height: 0;
    line-height: 1.1;
    margin-right: 35px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 48, 66, 0.16);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}
.chat-thread-close-btn:hover {
    background: #ffffff;
}
.chat-thread {
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-auto-rows: min-content;
    align-content: start;
    align-items: start;
    gap: 6px;
    padding-right: 6px;
    min-height: 0;
    height: 100%;
}
.chat-thread.is-linked {
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 18px;
    padding: 12px;
    background: rgba(248, 252, 255, 0.92);
}
.chat-thread.is-private {
    border: 1px solid rgba(102, 102, 102, 0.24);
    border-radius: 18px;
    padding: 12px;
    background: rgba(102, 102, 102, 0.12);
}
.chat-message {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
}
.chat-message.is-private {
    background: rgba(102, 102, 102, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
}
.chat-message.is-private .chat-message-meta-inline,
.chat-message.is-private .chat-message-date,
.chat-message.is-private .chat-message-display-name {
    color: rgba(255, 255, 255, 0.82);
}
.chat-message-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    min-width: 0;
}
.chat-message.depth-1 { margin-left: 28px; }
.chat-message.depth-2 { margin-left: 56px; }
.chat-message.depth-3 { margin-left: 84px; }
.chat-message.depth-4,
.chat-message.depth-5,
.chat-message.depth-6 { margin-left: 112px; }
.chat-message-meta-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.chat-message-author {
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}
.chat-message-display-name,
.chat-message-meta {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.2;
}
.chat-message-dot {
    padding: 0 2px;
}
.chat-message-date {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
    line-height: 1.2;
}
.chat-message-body-inline {
    line-height: 1.2;
    word-break: break-word;
    min-width: 0;
}
.chat-reply-btn {
    white-space: nowrap;
    padding: 3px 8px;
    min-height: 0;
    line-height: 1.1;
    align-self: start;
}
.chat-composer-wrap {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.chat-composer-wrap-canonical {
    position: relative;
    z-index: 4;
    margin-top: auto;
    padding: 0 0 0;
    border-top: none;
    background: linear-gradient(180deg, rgba(246, 248, 251, 0), rgba(246, 248, 251, 0.82) 16%, rgba(246, 248, 251, 1) 46%);
    align-self: end;
}
.chat-composer-wrap.is-private {
    border: 1px solid rgba(102, 102, 102, 0.24);
    border-radius: 18px;
    padding: 14px;
    background: rgba(102, 102, 102, 0.08);
}
.chat-composer-wrap.is-linked {
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 18px;
    padding: 14px;
    background: rgba(240, 249, 255, 0.62);
}
.chat-composer {
    display: grid;
    gap: 12px;
}
.chat-composer-canonical {
    padding: 16px 18px 18px;
    border-top: 1px solid rgba(23, 48, 66, 0.12);
    border-radius: 0 0 20px 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -10px 28px rgba(23, 48, 66, 0.06);
}
.chat-canonical-locked-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.14);
    color: #334155;
}
.chat-canonical-locked-banner span {
    color: #475569;
}
.chat-private-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(102, 102, 102, 0.9);
    color: #fff;
}
.chat-textarea-attention-target {
    position: relative;
}
.chat-textarea-attention-target.is-attention-pulsing {
    animation: chat-textarea-attention-blink 1.15s ease-in-out 5;
    border-color: rgba(220, 38, 38, 0.96);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.36);
    background: rgba(254, 226, 226, 0.96);
}
@keyframes chat-textarea-attention-blink {
    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
        background: rgba(254, 226, 226, 0.96);
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.36);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-1px);
        background: rgba(248, 113, 113, 0.52);
        box-shadow: 0 0 0 9px rgba(220, 38, 38, 0.56);
    }
}
.chat-replying {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(31, 111, 120, 0.18);
    background: rgba(31, 111, 120, 0.08);
}
.chat-replying[hidden] {
    display: none !important;
}
.chat-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chat-emoji-btn {
    min-width: 42px;
    font-size: 1rem;
}
.chat-composer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.chat-composer-cancel {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}
.chat-composer-cancel:hover {
    color: var(--danger);
}
.chat-composer-cancel.is-disabled {
    color: #94a3b8;
    text-decoration: none;
    cursor: default;
}
@media (max-width: 860px) {
    .chat-canonical-columns,
    .chat-canonical-metrics {
        grid-template-columns: 1fr;
    }
    .chat-canonical-locked-banner {
        align-items: flex-start;
        flex-direction: column;
    }
    .embedded-contact-layout {
        grid-template-columns: 1fr;
    }
    .embedded-contact-image-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, auto) auto;
        width: 100% !important;
        height: auto !important;
    }
    .embedded-contact-image-credit {
        grid-column: 1 / -1;
    }
    .embedded-contact-image-card {
        aspect-ratio: 16 / 10;
    }
}
@media (max-width: 1120px) {
    html,
    body {
        min-height: 100%;
        height: auto;
    }
    .app-body {
        min-height: 100vh;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .app-shell {
        display: block !important;
        min-height: 100vh;
        height: auto !important;
        overflow: visible !important;
        align-items: start !important;
        align-content: start !important;
    }
    .login-shell, .app-shell, .manage-grid, .filters-grid { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        display: grid;
        width: auto;
        height: auto;
        min-height: auto;
        margin-bottom: 0;
        border-radius: 0 0 var(--radius) var(--radius);
        grid-template-rows: auto;
        justify-items: stretch;
    }
    .sidebar-top,
    .sidebar-center,
    .sidebar-bottom {
        justify-items: stretch;
    }
    .sidebar-top {
        justify-items: center;
        text-align: center;
    }
    .sidebar .brand-system-title {
        max-width: none;
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }
    .sidebar-nav {
        max-width: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .sidebar-nav .nav-link {
        padding: 12px 10px;
        text-align: center;
        font-size: 0.82rem;
        line-height: 1.2;
    }
    .sidebar-footer {
        width: max-content;
        max-width: 100%;
        margin: 0 auto;
        grid-template-columns: auto auto auto;
        align-items: center;
        gap: 10px;
        justify-items: center;
        justify-content: center;
    }
    .sidebar-powered-block {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
        padding: 2px 0 0;
    }
    .sidebar-powered-links {
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
    }
    .sidebar-powered-title {
        justify-items: center;
    }
    .sidebar-footer > p {
        margin: 0;
        min-width: 0;
        text-align: center;
    }
    .sidebar-footer > p:first-child {
        font-size: 0.92rem;
        line-height: 1.2;
    }
    .sidebar-footer > p.muted-copy {
        font-size: 0.82rem;
        line-height: 1.2;
    }
    .sidebar-footer-actions {
        grid-column: 3;
        grid-row: 1;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        align-content: center;
        width: auto;
        max-width: none;
    }
    .sidebar-footer-actions .btn {
        white-space: nowrap;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 0.8rem;
        line-height: 1.2;
    }
    .workspace,
    .workspace.workspace-chat,
    .workspace.workspace-manage {
        display: block !important;
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        width: auto;
        margin-top: 0 !important;
        padding-top: 0 !important;
        overflow: visible !important;
        overflow-y: visible !important;
    }
    .workspace-embedded-page-panel {
        min-height: auto;
    }
    .workspace.workspace-chat,
    .workspace.workspace-manage {
        grid-template-rows: auto !important;
        align-content: start;
    }
    .workspace.workspace-chat > .workspace-header,
    .workspace-manage > .workspace-header,
    .workspace.workspace-chat > .chat-panel,
    .workspace-manage > .manage-layout,
    .workspace > .chat-panel,
    .workspace > .chat-panel.chat-panel-fill {
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .manage-nav-panel {
        position: static;
    }
    .manage-nav {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        display: grid;
    }
    .list-filters {
        grid-template-columns: 1fr;
    }
    .form-two-columns {
        grid-template-columns: 1fr;
    }
    .health-hero,
    .health-grid-triple,
    .logs-hero {
        grid-template-columns: 1fr;
    }
    .logs-hero-metrics {
        grid-template-columns: 1fr;
    }
    .logs-view-switch {
        display: grid;
        grid-template-columns: 1fr;
    }
    .health-inline-meta {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .health-kpi-strip {
        grid-template-columns: 1fr;
    }
    .panel-inline-counters {
        justify-content: flex-start;
    }
    .panel-summary-title-row-inline {
        align-items: flex-start;
    }
}
@media (max-width: 720px) {
    .login-shell, .workspace, .sidebar, .brand-panel, .login-card, .panel { padding: 20px; }
    .file-row, .workspace-header, .tree-summary { flex-direction: column; align-items: stretch; }
    .action-cell { align-items: stretch; }
    .panel-header { flex-direction: column; align-items: stretch; }
    .workspace { padding: 14px; }
    .workspace:not(.workspace-manage),
    .workspace.workspace-chat {
        padding-top: 0 !important;
    }
    .sidebar { gap: 14px; padding-top: 14px; padding-bottom: 14px; }
    .workspace-header,
    .workspace-header-compact,
    .workspace.workspace-chat > .workspace-header,
    .workspace-manage > .workspace-header {
        min-height: 0 !important;
        max-height: none !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    .workspace-header.workspace-header-compact {
        display: block;
        padding: 0 !important;
        border: 0;
    }
    .workspace-header,
    .workspace-header-compact {
        gap: 6px;
    }
    .workspace-header-compact .header-actions-title {
        display: contents;
        width: auto;
        margin: 0;
    }
    .workspace-header-compact > .header-actions:not(.header-actions-title),
    .workspace-header-compact > :not(.header-actions-title) {
        display: none !important;
    }
    .workspace-header-compact:has(.header-actions-title) {
        margin: 0 !important;
    }
    .workspace-header-compact + .flash,
    .workspace-header-compact + .panel,
    .workspace > .workspace-header + .settings-layout {
        margin-top: 0 !important;
    }
    .workspace-repository-description {
        margin-top: 0;
    }
    .chat-repo-selection-state,
    .chat-repo-selection-form,
    .chat-repo-selection-switch {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .chat-repo-selection-state {
        align-content: start;
    }
    .chat-repo-selection-switch.is-listbox {
        display: grid;
        justify-items: stretch;
    }
    .chat-repo-selection-switch select[data-repository-canonical-list="1"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .repo-switch,
    .repo-switch-title {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .workspace-header-compact .repo-switch.repo-switch-title:not(.chat-repo-selection-switch) {
        margin-top: 8px;
    }
    .repo-switch-form {
        width: 100%;
    }
    .workspace-header-compact .workspace-repository-description {
        width: 100%;
        max-width: 100%;
    }
    .repo-switch-title select,
    .repo-switch-static {
        width: 100%;
        max-width: 100%;
        min-height: 52px;
        font-size: 0.94rem;
        line-height: 1.15;
        box-sizing: border-box;
    }
    .repo-switch-title select {
        padding: 14px 42px 14px 14px;
    }
    .repo-switch-static {
        padding: 14px;
    }
    .chat-layout {
        grid-template-columns: 1fr;
    }
    .workspace-repository-description {
        max-width: none;
    }
    .canonical-link-grid,
    .canonical-kpi-grid {
        grid-template-columns: 1fr;
    }
    .settings-hero-panel,
    .settings-grid,
    .chat-canonical-grid {
        grid-template-columns: 1fr;
    }
    .chat-groups-panel {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-right: 0;
        padding-bottom: 12px;
    }
    .chat-message.depth-1,
    .chat-message.depth-2,
    .chat-message.depth-3,
    .chat-message.depth-4,
    .chat-message.depth-5,
    .chat-message.depth-6 {
        margin-left: 0;
    }
    .chat-message-line {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .logs-panel-header {
        align-items: stretch;
    }
    .logs-panel-count {
        min-width: 0;
        justify-content: flex-start;
    }
    .health-kpi-card--summary {
        padding: 16px;
    }
    .modal-overlay {
        padding: 12px;
        align-items: center;
        justify-content: center;
    }
    .modal-card {
        width: min(calc(100vw - 24px), 460px);
        max-width: 100%;
        padding: 22px 18px 18px;
        margin: 0 auto;
    }
    .modal-card-preview {
        width: min(calc(100vw - 24px), 1180px);
        min-width: 0;
        min-height: 0;
        height: auto;
        max-height: none;
        padding: 18px 14px 14px;
        resize: none;
    }
    .preview-modal-header {
        flex-direction: column;
        align-items: stretch;
        padding-right: 22px;
        margin-bottom: 12px;
    }
    .preview-modal-actions {
        justify-content: flex-start;
    }
    .preview-modal-actions .btn {
        width: auto;
    }
    .preview-modal-frame-wrap,
    .preview-modal-frame-wrap iframe {
        min-height: 72vh;
        height: 72vh;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions .btn {
        width: 100%;
    }
    .embedded-page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .embedded-page-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
    .repository-panel-header {
        margin-right: 0;
        gap: 10px;
    }
    .repository-header-actions {
        width: 100%;
        margin-right: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 8px;
        align-items: center;
    }
    .repository-header-actions:has(.repository-tree-home-btn) {
        grid-template-columns: 44px minmax(0, 1fr) max-content;
    }
    .repository-tree-home-btn,
    .repository-header-actions > .btn-download-all {
        min-width: 0;
        justify-content: center;
    }
    .repository-tree-home-btn {
        height: 40px;
        width: 100%;
    }
    .repository-header-actions > .btn-download-all {
        width: auto;
        padding-left: 10px;
        padding-right: 10px;
        justify-self: end;
        white-space: nowrap;
        font-size: 0.84rem;
        line-height: 1.15;
    }
    .repository-header-actions > .btn-download-all,
    .repository-view-toggle-option {
        font-size: 0.84rem;
        line-height: 1.15;
    }
    .repository-view-toggle {
        width: 100%;
        min-width: 0;
        grid-auto-columns: minmax(0, 1fr);
    }
    .repository-view-toggle-option {
        min-width: 0;
        padding: 0 10px;
    }
    .repository-explorer-toolbar {
        margin-left: 0;
        margin-right: 0;
        padding: 12px;
        display: grid;
        gap: 12px;
    }
    .repository-explorer-breadcrumb-shell {
        display: grid;
        gap: 12px;
    }
    .repository-explorer-nav-buttons {
        gap: 8px;
        flex-wrap: wrap;
    }
    .repository-nav-icon-btn {
        width: 40px;
        height: 40px;
    }
    .repository-breadcrumb-root-menu {
        max-width: min(320px, calc(100vw - 56px));
    }
    .repository-explorer-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    .repository-explorer-actions > * {
        flex: 1 1 180px;
        justify-content: center;
        text-align: center;
    }
    .repository-explorer-upload-toggle .repository-upload-popover {
        position: static;
        width: 100%;
        margin-top: 10px;
    }
    .tree-node {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .tree-node-toggle > summary.is-expandable .tree-title-line::after {
        width: 0.3rem;
        height: 0.3rem;
    }
    .tree-node-actions-bar {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .tree-node-actions-bar > * {
        flex: 1 1 180px;
        justify-content: center;
        text-align: center;
    }
    .tree-node-body {
        grid-column: 1;
        grid-row: 3;
    }
    .repository-upload-inline-panel,
    .repository-upload-popover {
        padding: 12px;
    }
    .repository-upload-actions {
        flex-direction: column;
    }
    .repository-upload-actions .btn {
        width: 100%;
    }
    .repository-table-wrap {
        margin-left: 0;
        margin-right: 0;
        padding-right: 0;
        overflow: visible;
    }
    .repository-table {
        min-width: 0;
        display: block;
        table-layout: auto;
    }
    .repository-table thead {
        display: none;
    }
    .repository-table tbody {
        display: grid;
        gap: 12px;
    }
    .repository-table tr {
        display: block;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.82);
    }
    .repository-table td {
        display: block;
        padding: 0;
        border-bottom: 0;
    }
    .repository-table td:first-child,
    .repository-table td:last-child {
        width: auto;
    }
    .repository-cell-status,
    .repository-cell-size,
    .repository-cell-uploaded,
    .repository-cell-updated {
        display: none !important;
    }
    .repository-cell-primary {
        margin-bottom: 10px;
    }
    .repository-cell-actions {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 8px;
        padding-top: 10px !important;
        border-top: 1px solid var(--line);
        text-align: left !important;
        align-items: center;
    }
    .repository-cell-actions > * {
        flex: 1 1 0;
        min-width: 0;
        margin-left: 0 !important;
        justify-content: center;
        text-align: center;
    }
    .repository-directory-row td,
    .repository-directory-row:hover td,
    .repository-directory-row-private td,
    .repository-directory-row-private:hover td,
    .repository-directory-row-private td.action-cell,
    .repository-directory-row-private:hover td.action-cell {
        background: transparent !important;
    }
    .repository-directory-row {
        background: rgba(23, 48, 66, 0.05);
    }
    .repository-directory-row-private {
        background: rgba(116, 116, 116, 0.92);
        color: #fff;
    }
    .repository-directory-row-private .repository-cell-actions {
        border-top-color: rgba(255, 255, 255, 0.16);
    }
    .repository-mobile-inline-state {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
    }
    .repository-directory-mobile-state .repository-file-state {
        justify-content: center;
    }
    .repository-mobile-details {
        display: block;
        margin-top: 8px;
    }
    .repository-mobile-details-summary {
        list-style: none;
        cursor: pointer;
        color: var(--primary-dark);
        font-weight: 700;
        text-align: left;
    }
    .repository-mobile-details-summary::-webkit-details-marker {
        display: none;
    }
    .repository-mobile-details-label-hide {
        display: none;
    }
    .repository-mobile-details[open] .repository-mobile-details-label-show {
        display: none;
    }
    .repository-mobile-details[open] .repository-mobile-details-label-hide {
        display: inline;
    }
    .repository-mobile-details-panel {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-top: 8px;
    }
    .repository-mobile-details-item {
        display: inline-flex;
        align-items: baseline;
        gap: 4px;
        color: var(--muted);
        font-size: 0.88rem;
    }
    .repository-mobile-details-key {
        font-weight: 700;
        color: var(--text);
    }
    .repository-directory-row-private .repository-mobile-details-item,
    .repository-directory-row-private .repository-mobile-details-key,
    .repository-directory-row-private .repository-mobile-details-summary {
        color: rgba(255, 255, 255, 0.92);
    }
}
