:root {
    --bg: #f7f5fb;
    --surface: #ffffff;
    --text: #160f22;
    --muted: #655a72;
    --line: #ded6ea;
    --primary: #6d35c8;
    --primary-dark: #4b217e;
    --primary-hover: #8754ed;
    --primary-soft: #ead9ff;
    --primary-soft-strong: #ddc4fb;
    --accent: #9b6bea;
    --panel-soft: #fbf9ff;
    --branch: #c3addf;
    --warning-soft: #fff7ed;
    --danger: #b91c1c;
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
    --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.07);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body,
body * {
    user-select: none;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

body.login-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #5d4771 0%, #b88bd0 100%);
}

body.login-page .shell {
    min-height: calc(100vh - 82px);
    display: flex;
    align-items: center;
    justify-content: center;
}

input,
select,
textarea {
    max-width: 100%;
    user-select: text;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #ece7f4;
    padding: 14px 30px;
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: none;
}

.navbar > * {
    min-width: 0;
}

.brand,
.navbar a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 850;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.navbar nav a {
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 10px 16px;
    background: var(--primary-soft);
    color: var(--text);
    font-size: 13px;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.navbar nav a:hover,
.navbar nav a:focus-visible,
.profile-button:hover,
.profile-button:focus-visible {
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.site-footer {
    background: var(--primary-dark);
    color: #ffffff;
}

.site-footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.8fr;
    gap: 54px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 36px 24px 32px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.site-footer p,
.site-footer a {
    margin: 0;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.55;
}

.site-footer a {
    display: block;
    width: fit-content;
    text-decoration: none;
}

.site-footer a + a {
    margin-top: 7px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 10px 20px;
    color: #ffffff;
    font-size: 12px;
    text-align: center;
}

/* SEooC sheets: keep every attribute stacked vertically. */
.traceability-instance-panel .seooc-section,
.workspace2-panel .seooc-section,
.template-preview .seooc-section {
    display: grid;
    grid-template-columns: 1fr !important;
}

.traceability-instance-panel .seooc-section > label,
.workspace2-panel .seooc-section > label,
.template-preview .seooc-section > label {
    grid-column: 1 / -1 !important;
    width: 100%;
}

.profile-menu {
    position: relative;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    display: none;
    min-width: 220px;
    border: 1px solid #e7ddf7;
    border-radius: 8px;
    padding: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 14px 28px rgba(76, 32, 128, 0.1);
}

.navbar nav .profile-dropdown {
    background: #ffffff;
    color: var(--text);
}

.profile-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 14px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #e7ddf7;
    border-left: 1px solid #e7ddf7;
    background: #ffffff;
    transform: rotate(45deg);
}

.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
    display: grid;
    gap: 4px;
}

.profile-summary {
    display: grid;
    gap: 2px;
    border-bottom: 1px solid #eee7f8;
    padding: 10px 10px 12px;
}

.profile-summary strong,
.profile-summary span {
    overflow-wrap: anywhere;
}

.profile-summary strong {
    color: var(--primary-dark);
    font-size: 13px;
}

.profile-summary span {
    color: #6f647a;
    font-size: 12px;
}

.profile-dropdown a,
.navbar nav .profile-dropdown a {
    display: block;
    border: 0;
    border-radius: 7px;
    padding: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 750;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.profile-dropdown a:hover,
.profile-dropdown a:focus-visible,
.navbar nav .profile-dropdown a:hover,
.navbar nav .profile-dropdown a:focus-visible {
    background: #f6efff;
    color: var(--primary-dark);
    box-shadow: none;
    transform: translateX(2px);
    outline: none;
}

.profile-dropdown a[href*="logout"],
.navbar nav .profile-dropdown a[href*="logout"] {
    color: #c4483c;
}

.profile-dropdown a[href*="logout"]:hover,
.profile-dropdown a[href*="logout"]:focus-visible,
.navbar nav .profile-dropdown a[href*="logout"]:hover,
.navbar nav .profile-dropdown a[href*="logout"]:focus-visible {
    background: #fff7f7;
    color: #b42318;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    color: var(--primary-dark);
    letter-spacing: 0;
    min-width: 0;
}

.brand span {
    overflow-wrap: anywhere;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center top;
}

.shell {
    width: min(calc(100% - 20px), 1440px);
    margin: 10px auto 24px;
}

.choice-shell {
    min-height: 100vh;
    margin-top: 0;
    margin-bottom: 0;
    display: grid;
    align-items: start;
    padding-block: 12px;
}

.choice-shell:has(.project-dashboard),
.choice-shell:has(.create-project-page) {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding-block: 0;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    color: #05010a;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.12;
}

h2 {
    margin-bottom: 12px;
    color: #05010a;
    font-size: 20px;
    line-height: 1.2;
}

h3 {
    font-size: 17px;
}

p:last-child {
    margin-bottom: 0;
}

.card {
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--surface);
    box-shadow: none;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 400;
}

.form label span {
    color: #0f172a;
    font-size: 13px;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    background: #f8f8fb;
    color: var(--text);
    font: inherit;
    font-weight: 400;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 143, 147, 0.14);
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input[readonly],
textarea[readonly],
select:disabled {
    background: #f3f2f6;
    color: var(--muted);
    cursor: not-allowed;
}

fieldset {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--panel-soft);
}

fieldset label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

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

.asil-box legend {
    color: var(--primary-dark);
    font-weight: 900;
}

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

.check-option,
.inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-option {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #ffffff;
}

.check-option input,
.inline-check input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--primary);
}

.login-card {
    width: min(440px, 100%);
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.login-card h1 {
    margin-bottom: 22px;
    text-align: center;
}

.login-card .actions {
    justify-content: stretch;
}

.login-card .btn {
    width: 100%;
}

.register-card {
    display: grid;
    gap: 16px;
}

.register-card form {
    gap: 12px;
}

.inline-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.login-card .btn.compact {
    width: auto;
    min-width: 96px;
    padding-inline: 14px;
}

.password-rules {
    display: grid;
    gap: 4px;
    margin: -4px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.auth-switch {
    margin: 2px 0 0;
    text-align: center;
    font-weight: 750;
}

.auth-switch a {
    color: var(--primary-dark);
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    padding-right: 48px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--primary-dark);
    cursor: pointer;
}

.password-toggle:hover {
    background: #eadcff;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.compact-form {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 180px) auto auto;
    align-items: end;
}

.attribute-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.attribute-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 120px auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #ffffff;
}

.fixed-attributes .attribute-row {
    grid-template-columns: minmax(180px, 1fr) 150px 120px;
}

.attribute-controls .section-head {
    margin-bottom: 18px;
}

.active-project-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.active-project-banner span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.active-project-banner strong {
    color: var(--primary-dark);
    font-size: 15px;
}

.attribute-panel[hidden] {
    display: none;
}

.workspace {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.project-setup-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

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

.sidebar {
    align-self: start;
    position: sticky;
    top: 82px;
}

.wp-item {
    display: block;
    width: 100%;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 12px 13px;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.wp-item:hover,
.wp-item:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    outline: none;
    transform: translateY(-1px);
}

.wp-item.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: inset 4px 0 0 var(--primary);
}

.wp-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 12px;
    font-weight: 900;
}

.active-project-banner em {
    border-radius: 999px;
    padding: 4px 9px;
    background: #e5e7eb;
    color: #4b5563;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
}

.readonly-project-notice {
    margin: 0 0 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 800;
}

.wp-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.version-list {
    margin-top: 8px;
    padding-left: 16px;
}

.version-item {
    margin-top: 8px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.preview-card {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--panel-soft);
}

.setup-submit {
    margin-top: 18px;
    width: 100%;
}

.setup-submit .btn {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.saved-workspace2-table {
    margin-top: 18px;
}

.fmeda-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #ffffff;
}

.fmeda-card + .fmeda-card {
    margin-top: 18px;
}

.fmeda-card > h3,
.fmeda-table > h3 {
    margin: 0 0 12px;
    color: var(--primary-dark);
}

.fmeda-table th {
    background: #f7cde2;
    color: #4b1640;
}

.fmeda-summary-row td,
.fmeda-summary-row th {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.fmeda-summary-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.fmeda-summary-scroll table {
    width: max-content;
    min-width: 100%;
}

.fmeda-summary-scroll th,
.fmeda-summary-scroll td {
    min-width: 96px;
    padding: 9px 10px;
    white-space: nowrap;
}

.fmeda-metric-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    justify-items: start;
}

.fmeda-metric-box {
    width: max-content;
    max-width: 100%;
}

.fmeda-metric-box table {
    width: max-content;
    min-width: 0;
}

.table-input {
    min-width: 150px;
    min-height: 38px;
    padding: 8px;
    font-size: 14px;
}

.table-textarea {
    min-height: 70px;
}

.uploaded-file-field {
    display: grid;
    gap: 10px;
}

.uploaded-file-preview {
    display: grid;
    gap: 8px;
}

.uploaded-file-preview img {
    max-width: 100%;
    max-height: 280px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
}

.uploaded-file-preview a {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.uploaded-file-field .danger.light {
    justify-self: start;
    min-height: 36px;
    background: #ffe4e6;
    color: #b91c1c;
}

.uploaded-file-field .file-remove-btn {
    justify-self: start;
    width: auto;
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.1;
}

.table-asil-edit {
    display: grid;
    gap: 8px;
    min-width: 190px;
}

.table-asil-edit label {
    display: grid;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
}

.table-asil-edit select {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 14px;
}

.compact-empty {
    min-height: 90px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    position: sticky;
    top: 0;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
}

tbody tr:nth-child(even) {
    background: #fafcfd;
}

tbody tr:hover {
    background: #faf6ff;
}

.asil-values {
    display: grid;
    gap: 8px;
    min-width: 160px;
}

.asil-values div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dac8f4;
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--panel-soft);
}

.asil-values span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.asil-values strong {
    min-width: 70px;
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}

.seooc-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.wide {
    grid-column: 1 / -1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 850;
    cursor: pointer;
    letter-spacing: 0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.2);
    outline: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.primary {
    background: var(--primary);
    color: #ffffff;
}

.primary:hover,
.primary:focus-visible {
    background: var(--primary-hover);
}

.secondary {
    border-color: transparent;
    background: var(--primary-soft);
    color: var(--text);
}

.secondary:hover,
.secondary:focus-visible {
    border-color: transparent;
    background: var(--primary-hover);
    color: #ffffff;
}

.danger {
    background: var(--danger);
    color: #ffffff;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.saved-row-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.inline-action-form {
    margin: 0;
}

.panel-divider {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.actions {
    display: flex;
    justify-content: flex-end;
}

.tlsr-instance-actions {
    margin: -4px 0 12px;
}

.tlsr-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.tlsr-action-grid .btn {
    width: auto;
    min-width: 118px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
}

.tlsr-create-panel,
.tlsr-view-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #ffffff;
}

.tlsr-create-panel .attribute-list-panel,
.tlsr-view-panel .attribute-list-panel {
    margin-bottom: 14px;
}

.review-actions {
    margin-top: 16px;
}

.review-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.review-checks {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.review-check-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.review-rule-box,
.review-manual-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid var(--line);
    border-radius: 4px;
    background: #e5e7eb;
    color: #374151;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.review-rule-box.rule-pass {
    border-color: #047857;
    background: #16a34a;
}

.review-rule-box.rule-fail {
    border-color: #991b1b;
    background: #dc2626;
}

.review-rule-box.rule-warn {
    border-color: #92400e;
    background: #f59e0b;
}

.review-rule-box.rule-none {
    border-color: #64748b;
    background: #94a3b8;
}

.review-manual-box {
    cursor: pointer;
}

.review-correct {
    border-color: #047857;
    color: #047857;
}

.review-wrong {
    border-color: #991b1b;
    color: #991b1b;
}

.review-correct.selected {
    border-color: #047857;
    background: #16a34a;
    color: #ffffff;
}

.review-wrong.selected {
    border-color: #991b1b;
    background: #dc2626;
    color: #ffffff;
}

.review-comment-input {
    width: min(360px, 32vw);
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
}

.review-feedback-panel {
    display: grid;
    gap: 8px;
    margin: 12px 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #fffaf0;
}

.review-feedback-panel h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 15px;
}

.review-feedback-item {
    border-top: 1px solid #ead7b7;
    padding-top: 8px;
}

.review-feedback-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.review-feedback-item p {
    margin: 0;
    color: var(--muted);
}

.split-page {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    min-height: calc(100vh - 120px);
    justify-self: stretch;
    align-items: stretch;
}

.split-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.split-left {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 520px;
    padding: 24px;
}

.split-left h1 {
    margin-bottom: 12px;
    font-size: 28px;
    text-align: center;
    color: var(--text);
}

.split-action {
    width: 100%;
    min-height: 56px;
    font-size: 15px;
}

.split-left > .split-action,
.split-left > .project-option-form .split-action {
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 10px 22px rgba(91, 33, 182, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.split-left > .split-action:hover,
.split-left > .split-action:focus-visible,
.split-left > .project-option-form .split-action:hover,
.split-left > .project-option-form .split-action:focus-visible {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(91, 33, 182, 0.24);
}

.split-left > .split-action:active,
.split-left > .project-option-form .split-action:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(91, 33, 182, 0.18);
}

.sub-action {
    min-height: 50px;
}

.template-inline-list .sub-action {
    border: 1px solid #d7c4ef;
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: none;
}

.template-inline-list .sub-action:hover,
.template-inline-list .sub-action:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: none;
    box-shadow: none;
}

.template-inline-list {
    display: grid;
    gap: 10px;
    padding-left: 16px;
}

.project-scroll-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.split-right {
    min-height: 420px;
    padding: 24px;
}

.split-right:has(.project-create-panel:not([hidden])),
.split-right:has(.project-list-panel:not([hidden])) {
    background: linear-gradient(180deg, #5d4771 0%, #b88bd0 100%);
}

.project-create-panel {
    max-width: 560px;
    margin: 28px auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    color: var(--text);
}

.create-project-page {
    display: grid;
    place-items: center;
    min-height: calc(100svh - 78px);
    margin: 0;
    padding: 32px 18px 64px;
    background: linear-gradient(180deg, #5d4771 0%, #b88bd0 100%);
}

.create-project-page .project-create-panel {
    width: min(100%, 436px);
    margin: 0;
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 40px rgba(40, 19, 62, 0.22);
    color: #ffffff;
}

.create-project-page .template-preview-head {
    margin-bottom: 26px;
    color: #ffffff;
}

.create-project-page .template-preview-head h1 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    text-align: center;
}

.create-project-page .project-create-form {
    gap: 16px;
}

.create-project-page .project-create-form label {
    gap: 7px;
    font-size: 12px;
}

.create-project-page .project-create-form label span {
    color: #ffffff;
}

.create-project-page .project-create-form label b {
    color: #ffb8b8;
}

.create-project-page .project-create-form input,
.create-project-page .project-create-form select {
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.create-project-page .project-create-form input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.create-project-page .project-create-form select option {
    color: #ffffff;
}

.create-project-page .project-create-form .btn {
    width: 100%;
    margin-top: 2px;
}

.back-dashboard-link {
    display: block;
    width: fit-content;
    margin: 16px auto -6px;
    padding: 9px 18px;
    border-radius: 6px;
    background: #5b218f;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.back-dashboard-link:hover,
.back-dashboard-link:focus-visible {
    background: #6d2eaa;
}

.project-create-panel .template-preview-head {
    justify-content: center;
    text-align: center;
}

.project-create-form {
    display: grid;
    gap: 16px;
}

.project-create-form label {
    display: grid;
    gap: 8px;
    font-weight: 900;
}

.project-create-form input,
.project-create-form select {
    border-color: var(--line);
    background: #f8f8fb;
    color: var(--text);
}

.project-create-form input::placeholder {
    color: #9ca3af;
}

.project-create-form select option {
    color: var(--text);
    background: #ffffff;
}

.create-project-page .project-create-form select option {
    color: #0f172a;
    background: #ffffff;
}

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

.project-create-form .actions {
    justify-content: stretch;
}

.project-create-form .actions .btn {
    width: 100%;
}

.project-dashboard {
    display: grid;
    align-content: start;
    gap: 28px;
    min-height: calc(100svh - 78px);
    margin: 0;
    padding: 24px min(7vw, 134px) 64px;
    background: linear-gradient(180deg, #5d4771 0%, #b88bd0 100%);
    color: #ffffff;
}

.project-dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 1120px;
    margin-bottom: 2px;
}

.project-dashboard-hero h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 950;
}

.project-dashboard-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.55;
}

.welcome-wave {
    display: inline-block;
    margin-left: 8px;
    font-size: 28px;
    vertical-align: 3px;
}

.project-list-panel {
    display: grid;
    align-content: start;
    gap: 18px;
    color: #ffffff;
}

.project-list-panel[hidden] {
    display: none;
}

.project-list-panel .template-preview-head {
    display: block;
    color: #ffffff;
}

.project-list-panel h2 {
    color: #ffffff;
    font-size: 28px;
}

.project-list-panel .muted {
    color: rgba(255, 255, 255, 0.78);
}

.project-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1235px;
    margin-top: 0;
}

.project-list-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 21px;
}

.add-project-button {
    min-width: 140px;
}

.inline-create-panel {
    max-width: 620px;
    margin: 0;
}

.project-filter-panel {
    display: grid;
    gap: 10px;
    max-width: 760px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.12);
}

.project-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 86px;
    gap: 8px;
}

.project-search-row input,
.project-search-row button,
.project-filter-grid input,
.project-filter-grid select {
    min-height: 40px;
}

.project-search-row input,
.project-filter-grid input,
.project-filter-grid select {
    background: #f8f8fb;
}

.compact-icon {
    width: 42px;
    padding: 0;
    text-transform: uppercase;
}

.compact-search {
    min-width: 86px;
    padding-inline: 12px;
}

.project-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(135px, 160px) minmax(150px, 175px);
    gap: 12px;
    align-items: end;
}

.project-filter-grid > label,
.project-filter-group {
    display: grid;
    gap: 6px;
}

.project-filter-grid span,
.project-filter-group legend {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 850;
}

.project-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-content: end;
    border: 0;
    padding: 0;
    background: transparent;
}

.project-filter-group legend {
    flex-basis: 100%;
    margin-bottom: 4px;
}

.project-filter-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}

.project-filter-group input {
    width: 14px;
    min-height: 14px;
    accent-color: var(--primary);
}

.project-add-row {
    display: flex;
    justify-content: flex-end;
    max-width: 760px;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 388px));
    gap: 36px;
    max-width: 1240px;
}

.project-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    min-height: 248px;
    border-radius: 22px;
    padding: 28px 28px 26px;
    background: #fbfafc;
    color: #334155;
    box-shadow: 0 18px 30px rgba(43, 35, 57, 0.22);
    cursor: pointer;
}

.project-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.project-card h3 {
    margin: 0;
    font-size: 20px;
    color: #5b2f91;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.project-mode-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 9px;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 11px;
    font-weight: 850;
}

.project-mode-badge.owner {
    background: #dcfce7;
    color: #166534;
}

.project-meta-list {
    display: grid;
    align-content: start;
    gap: 9px;
    margin: 0;
    color: #405064;
    font-size: 13px;
}

.project-meta-list div {
    display: flex;
    gap: 4px;
}

.project-meta-list dt,
.project-meta-list dd {
    margin: 0;
}

.project-meta-list dt::after {
    content: ":";
}

.project-open-form {
    display: none;
}

.project-card-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.project-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    align-self: end;
    min-height: 38px;
}

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

.project-card-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    min-height: 36px;
    border: 1px solid #2563ff;
    border-radius: 10px;
    padding: 8px 13px;
    background: #ffffff;
    color: #2563ff;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.project-card-action-button:hover,
.project-card-action-button:focus-visible {
    background: #eef4ff;
    color: #1745d3;
    outline: none;
}

.project-card-action-button.delete {
    border-color: #ef4444;
    color: #ef0000;
}

.project-card-action-button.delete:hover,
.project-card-action-button.delete:focus-visible {
    background: #fff1f2;
    color: #b91c1c;
}

.project-card-link:hover,
.project-card-link:focus-visible {
    color: var(--primary-dark);
    outline: none;
}

.danger-link {
    color: #dc2626;
}

.danger-link:hover,
.danger-link:focus-visible {
    color: #991b1b;
}

.preview-placeholder {
    display: flex;
    min-height: 382px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c8d8df;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--muted);
    font-weight: 900;
}

.project-option-grid,
.template-button-list,
.workspace-only-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
    min-height: 320px;
    align-content: center;
}

.workspace-top-nav,
.workspace-page-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 22px;
}

.workspace-top-nav {
    min-height: 80vh;
    align-items: flex-start;
}

.workspace-only-nav {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.option-button,
.workspace-only-nav .btn,
.workspace-top-nav .btn,
.workspace-page-nav .btn {
    min-height: 58px;
    font-size: 16px;
}

.workspace-map {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: start;
    min-height: 72vh;
}

.workspace-map-tree {
    display: grid;
    gap: 22px;
    align-content: start;
}

.workspace-map-group {
    display: grid;
    gap: 10px;
}

.workspace-map-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 260px;
    min-height: 50px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.workspace-map-title:hover,
.workspace-map-title:focus-visible {
    border-color: transparent;
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.2);
    transform: translateY(-1px);
    outline: none;
}

.workspace-map-branches {
    display: grid;
    gap: 8px;
    margin-left: 32px;
    border-left: 3px solid var(--branch);
    padding-left: 28px;
}

.workspace-map-item {
    position: relative;
    width: 220px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.workspace-map-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -29px;
    width: 22px;
    height: 2px;
    background: var(--branch);
}

.workspace-map-item:hover,
.workspace-map-item:focus-visible,
.workspace-map-item.active,
.workspace-map-link:hover,
.workspace-map-link:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: 0 8px 18px rgba(109, 53, 200, 0.12);
    outline: none;
}

.workspace-map-item.active {
    box-shadow: inset 4px 0 0 var(--primary);
}

.workspace-map-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 220px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    background: #ffffff;
    color: var(--text);
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.workspace-map-link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -29px;
    width: 22px;
    height: 2px;
    background: var(--branch);
}

.workspace-tree-panel {
    gap: 14px;
    align-content: start;
}

.workspace-tree-panel .workspace-map-title,
.workspace-tree-panel .workspace-map-item,
.workspace-tree-panel .workspace-map-link {
    width: 100%;
}

.workspace-tree-panel .workspace-map-title.active {
    background: var(--primary);
    color: #ffffff;
}

.workspace-tree-panel .workspace-map-branches {
    gap: 8px;
    margin-left: 18px;
    padding-left: 22px;
}

.workspace-tree-panel .workspace-map-item::before,
.workspace-tree-panel .workspace-map-link::before {
    left: -23px;
    width: 17px;
}

.workspace-map-preview {
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.workspace-preview-panel[data-preview-panel="default"] {
    display: flex;
    min-height: 280px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd7df;
    border-radius: var(--radius);
    background: var(--panel-soft);
    text-align: center;
}

.workspace-instance-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.workspace-instance-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 48px;
    border: 2px solid #c6a8f3;
    border-radius: var(--radius);
    padding: 10px 14px;
    background: #ffffff;
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.workspace-instance-chip:hover,
.workspace-instance-chip:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    outline: none;
}

.workspace-two-container {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.workspace-left-container,
.workspace-right-container {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.workspace-left-container {
    min-height: 520px;
    padding: 24px;
}

.workspace-left-container h2 {
    margin-bottom: 18px;
}

.workspace-right-container {
    min-height: 520px;
    padding: 24px;
}

.seooc-form.workspace2-edit-form {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.seooc-section {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0 0 16px;
    border: 1px solid #ece7f4;
    border-radius: 8px;
    padding: 16px 18px 18px;
    background: #ffffff;
}

.seooc-section legend {
    padding: 0 6px;
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 900;
}

.seooc-form.workspace2-edit-form label {
    grid-column: 1 / -1;
}

.traceability-instance-panel .seooc-section label,
.seooc-form.workspace2-edit-form .seooc-section label {
    grid-column: 1 / -1;
}

.seooc-section label.wide,
.seooc-section label:has(textarea) {
    grid-column: 1 / -1;
}

.seooc-repeat-entry-fields {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 14px;
}

.seooc-repeat-entry-fields label {
    grid-column: 1 / -1;
}

.cover-sheet-form {
    gap: 0;
    margin-bottom: 18px;
    border: 1px solid #d9e0e8;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(20, 30, 45, 0.06);
}

.cover-sheet-form .seooc-section {
    grid-template-columns: 1fr !important;
    gap: 14px 18px;
    margin: 0;
    border: 0;
    border-top: 1px solid #dfe5ec;
    border-radius: 0;
    padding: 16px 0;
    background: transparent;
}

.cover-sheet-form .seooc-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.cover-sheet-form .seooc-section legend {
    margin-bottom: 8px;
    padding: 0;
    color: #07111f;
    font-size: 15px;
    font-weight: 900;
}

.traceability-instance-panel .cover-sheet-form .seooc-section label,
.seooc-form.workspace2-edit-form.cover-sheet-form .seooc-section label,
.cover-sheet-form .seooc-section label.wide,
.cover-sheet-form .seooc-section label:has(textarea) {
    grid-column: 1 / -1 !important;
    width: 100%;
}

.cover-sheet-form [data-cover-key="confidential_info"] {
    grid-column: 1 / -1 !important;
}

.cover-sheet-form textarea {
    min-height: 82px;
    resize: vertical;
}

.cover-sheet-form .actions {
    margin-top: 0;
}

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

.seooc-form.view-form label {
    grid-column: 1 / -1;
}

.safety-architecture-panel {
    display: grid;
    gap: 18px;
}

.tlsr-tsr-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--panel-soft);
}

.tlsr-attribute-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    border: 1px solid #d9e7ed;
    border-radius: var(--radius);
    padding: 14px;
    background: #ffffff;
}

.tlsr-attribute-grid div {
    display: grid;
    gap: 5px;
}

.tlsr-attribute-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.tlsr-attribute-grid strong {
    overflow-wrap: anywhere;
}

.tsr-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.tsr-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.tsr-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dac8f4;
    border-radius: 6px;
    padding: 10px 12px;
    background: var(--primary-soft);
}

.traceability-board {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hierarchy-scroll {
    overflow-x: auto;
    padding: 12px 4px 4px;
}

.hierarchy-grid {
    display: grid;
    grid-auto-columns: minmax(210px, 1fr);
    grid-auto-flow: column;
    gap: 24px;
    min-width: max-content;
}

.hierarchy-column {
    display: grid;
    justify-items: center;
    align-content: start;
}

.trace-node {
    width: 190px;
    min-height: 74px;
    border: 2px solid #c6a8f3;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

button.trace-node {
    cursor: pointer;
}

button.trace-node:hover,
button.trace-node:focus-visible,
button.trace-node.active {
    border-color: var(--primary);
    outline: none;
    transform: translateY(-1px);
}

.trace-node span {
    display: block;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.trace-node strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.tlsr-node {
    background: var(--primary-soft);
}

.tsr-node {
    border-color: #bfd2dc;
}

.empty-node {
    border-style: dashed;
    color: var(--muted);
}

.node-connector {
    width: 2px;
    height: 34px;
    background: var(--branch);
}

.tsr-node-list {
    display: grid;
    gap: 14px;
    justify-items: center;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 32, 42, 0.42);
}

.tlsr-detail-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.review-initiate-modal {
    width: min(520px, 100%);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
    border-color: var(--primary);
    color: var(--primary-dark);
    outline: none;
}

.traceability-browser {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 0;
    align-items: start;
    justify-content: stretch;
}

.traceability-types {
    min-height: calc(100vh - 112px);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 12px;
    background: #ffffff;
    box-shadow: none;
}

.traceability-instances {
    min-height: calc(100vh - 112px);
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0;
    padding: 18px 20px;
    background: #ffffff;
    box-shadow: none;
}

.traceability-details {
    min-width: 0;
}

.traceability-types {
    display: grid;
    align-content: start;
    gap: 10px;
}

.traceability-type,
.instance-item {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.traceability-type {
    min-height: 52px;
    padding: 13px 14px;
    font-weight: 900;
}

.traceability-type:hover,
.traceability-type:focus-visible,
.traceability-type.active,
.instance-item:hover,
.instance-item:focus-visible,
.instance-item.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    outline: none;
}

.traceability-type.active,
.instance-item.active {
    box-shadow: inset 4px 0 0 var(--primary);
}

.traceability-instances,
.traceability-details {
    min-width: 0;
}

.traceability-instances {
    max-height: calc(100vh - 112px);
    overflow-y: auto;
}

.traceability-instances .traceability-details {
    margin-top: 18px;
}

.compact-head {
    margin-bottom: 16px;
}

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

.horizontal-instance-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.instance-item {
    display: grid;
    gap: 5px;
    min-height: 72px;
    padding: 12px;
}

.instance-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.instance-item strong,
.instance-item small {
    overflow-wrap: anywhere;
}

.instance-item strong {
    color: #05010a;
    font-size: 14px;
    font-weight: 700;
}

.instance-item small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.instance-chip {
    width: auto;
    min-width: 110px;
    min-height: 62px;
}

.inline-workproduct-panel {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.seooc-page-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.seooc-workproduct-actions {
    margin: 0;
}

.seooc-workproduct-action-group {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.seooc-page-tab {
    border: 1px solid #d8c7f5;
    border-radius: 7px;
    padding: 9px 13px;
    background: #ffffff;
    color: var(--primary-dark);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.seooc-page-tab:hover,
.seooc-page-tab:focus-visible,
.seooc-page-tab.active {
    border-color: transparent;
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.18);
    transform: translateY(-1px);
    outline: none;
}

.traceability-instance-panel .seooc-form {
    grid-template-columns: 1fr;
}

.traceability-instance-panel .seooc-form label {
    grid-column: 1 / -1;
}

.traceability-instance-panel .seooc-section label {
    grid-column: 1 / -1;
}

.traceability-instance-panel .seooc-section label.wide,
.traceability-instance-panel .seooc-section label:has(textarea) {
    grid-column: 1 / -1;
}

.detail-placeholder,
.empty-panel {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd7df;
    border-radius: var(--radius);
    background: var(--panel-soft);
    text-align: center;
}

.attribute-panel {
    min-width: 0;
}

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

.attribute-list-panel div {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    background: var(--panel-soft);
}

.attribute-list-panel dt {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.attribute-list-panel dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.inline-attribute-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.inline-attribute-form textarea {
    min-height: 88px;
}

.inline-save-button {
    min-height: 44px;
    white-space: nowrap;
}

.csv-extra-note {
    margin-top: 14px;
}

.template-preview {
    max-width: 980px;
    margin-inline: auto;
}

.inline-template-preview {
    margin: 0;
    min-height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: var(--shadow-soft);
}

.template-preview-head {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.template-preview-head h2 {
    margin-bottom: 0;
}

.finalized-head {
    align-items: flex-start;
}

.workspace-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.finalized-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.project-option-form {
    margin: 0;
}

.review-request-list {
    display: grid;
    gap: 12px;
}

.review-request-card {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
}

.review-request-card span {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.review-request-card strong {
    font-size: 16px;
}

.review-detail-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
}

.review-history-entry {
    margin-bottom: 16px;
}

.review-submission-block {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.review-submission-block h3 {
    margin: 0;
    color: var(--primary-dark);
}

.finalized-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dac8f4;
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

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

.center-note {
    text-align: center;
}

.empty-traceability {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border: 1px dashed #cbd7df;
    border-radius: var(--radius);
    background: var(--panel-soft);
    text-align: center;
}

.message {
    border-radius: 6px;
    padding: 10px 12px;
    background: #ecfdfb;
    color: var(--primary-dark);
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.toast-messages {
    position: fixed;
    top: 88px;
    left: 50%;
    z-index: 80;
    display: grid;
    gap: 8px;
    width: min(360px, calc(100vw - 36px));
    transform: translateX(-50%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-messages.is-hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
    pointer-events: none;
}

.toast-messages .message {
    margin: 0;
}

.message.error {
    background: #fff1f2;
    color: var(--danger);
}

@media (max-width: 1180px) {
    .navbar {
        padding-inline: 22px;
    }

    .brand {
        font-size: 22px;
    }

    .project-dashboard {
        padding-inline: clamp(28px, 5vw, 72px);
    }

    .project-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .traceability-browser {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    }

    .workspace-map,
    .workspace-two-container,
    .workspace-version-layout {
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    }

    .site-footer-content {
        max-width: 980px;
        gap: 32px;
    }
}

@media (max-width: 980px) {
    .navbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .navbar nav {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .project-dashboard-hero h1 {
        font-size: 30px;
    }

    .project-dashboard-hero p {
        max-width: 640px;
        font-size: 15px;
    }

    .project-filter-panel,
    .project-add-row {
        max-width: 100%;
    }

    .project-filter-grid {
        grid-template-columns: minmax(220px, 1fr) minmax(130px, 160px);
    }

    .traceability-browser,
    .workspace-map,
    .workspace-two-container,
    .workspace-version-layout {
        grid-template-columns: 1fr;
    }

    .traceability-types,
    .traceability-instances {
        min-height: auto;
        max-height: none;
        border: 1px solid var(--line);
    }

    .traceability-instances {
        border-top: 0;
        border-left: 1px solid var(--line);
        overflow: visible;
    }

    .workspace-map-tree,
    .workspace-tree-panel {
        position: static;
    }

    .site-footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .navbar,
    .page-head,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .navbar nav,
    .workspace,
    .project-setup-layout,
    .split-page,
    .project-search-row,
    .project-filter-grid,
    .workspace-two-container,
    .workspace-map,
    .traceability-browser,
    .project-option-grid,
    .template-button-list,
    .workspace-only-nav,
    .compact-form,
    .attribute-row,
    .seooc-form,
    .tsr-form,
    .tlsr-attribute-grid,
    .asil-box {
        grid-template-columns: 1fr;
    }

    .navbar {
        position: static;
        padding: 14px 18px;
    }

    .navbar nav {
        justify-content: stretch;
        gap: 6px;
    }

    .navbar nav a {
        flex: 1 1 120px;
        text-align: center;
    }

    .workspace-switcher {
        justify-content: stretch;
    }

    .workspace-switcher .btn {
        width: 100%;
    }

    .workspace-top-nav,
    .workspace-page-nav {
        justify-content: stretch;
        flex-direction: column;
    }

    .workspace-top-nav .btn,
    .workspace-page-nav .btn {
        width: 100%;
    }

    .workspace-map {
        gap: 18px;
    }

    .workspace-map-title,
    .workspace-map-item {
        width: 100%;
    }

    .shell {
        width: min(100% - 22px, 1220px);
        margin-top: 16px;
    }

    .choice-shell {
        min-height: auto;
        padding-block: 18px;
    }

    .choice-shell:has(.project-dashboard),
    .choice-shell:has(.create-project-page) {
        padding-block: 0;
    }

    .split-left,
    .split-right,
    .workspace-left-container,
    .workspace-right-container {
        padding: 16px;
    }

    .split-left,
    .split-right,
    .workspace-left-container,
    .workspace-right-container,
    .traceability-types,
    .traceability-instances,
    .traceability-details {
        min-height: auto;
    }

    .preview-placeholder {
        min-height: 220px;
    }

    .project-list-panel h2 {
        font-size: 24px;
    }

    .project-dashboard {
        margin: 0;
        padding: 20px 18px 44px;
        gap: 12px;
    }

    .project-dashboard-hero,
    .project-list-head {
        display: grid;
    }

    .add-project-button {
        width: 100%;
    }

    .project-add-row {
        max-width: none;
    }

    .project-card-grid {
        grid-template-columns: 1fr;
    }

    .project-filter-panel {
        padding: 16px;
    }

    .compact-icon,
    .compact-search {
        width: 100%;
    }

    .sidebar {
        position: static;
    }

    .card,
    .page-head {
        padding: 16px;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 12px;
    }

    .navbar {
        gap: 12px;
        padding: 12px;
    }

    .brand {
        gap: 8px;
        font-size: 19px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .navbar nav a {
        flex-basis: calc(50% - 4px);
        padding: 9px 10px;
    }

    .profile-menu {
        margin-left: auto;
    }

    .profile-dropdown {
        right: -4px;
        min-width: min(240px, calc(100vw - 24px));
    }

    .shell {
        width: 100%;
        margin: 0;
    }

    .choice-shell {
        padding-block: 0;
    }

    .project-dashboard {
        padding: 18px 14px 36px;
    }

    .project-dashboard-hero h1 {
        font-size: 27px;
    }

    .project-dashboard-hero p {
        font-size: 14px;
    }

    .project-filter-panel {
        padding: 12px;
    }

    .project-card {
        min-height: 220px;
        border-radius: 16px;
        padding: 22px 20px;
    }

    .project-card-actions {
        justify-content: stretch;
    }

    .project-card-action-button,
    .project-card-actions form {
        flex: 1 1 100%;
        width: 100%;
    }

    .create-project-page {
        padding: 18px 12px 34px;
    }

    .create-project-page .project-create-panel {
        padding: 20px;
    }

    .seooc-page-tabs,
    .seooc-workproduct-action-group,
    .workspace-switcher,
    .finalized-product,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .seooc-workproduct-action-group,
    .workspace-switcher,
    .inline-action-form,
    .inline-action-form .btn,
    .seooc-workproduct-actions,
    .seooc-workproduct-actions .btn,
    .finalized-product .btn {
        width: 100%;
    }

    .traceability-instances,
    .workspace-left-container,
    .workspace-right-container,
    .split-left,
    .split-right,
    .card,
    .page-head {
        padding: 14px;
    }

    .table-wrap,
    .traceability-board,
    .guidance-table-wrap {
        margin-inline: -6px;
        padding-bottom: 6px;
    }
}

/* Workspace 2 SEooC sheets: non-cover attributes stay one below another. */
.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .seooc-form,
.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .seooc-section {
    display: grid;
    grid-template-columns: 1fr !important;
}

.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .seooc-section > label,
.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .seooc-section > label.wide {
    grid-column: 1 / -1 !important;
    width: 100%;
}

.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .cover-sheet-form .seooc-section {
    grid-template-columns: 1fr !important;
}

.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .cover-sheet-form .seooc-section > label,
.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .cover-sheet-form .seooc-section > label.wide {
    grid-column: 1 / -1 !important;
}

.traceability-instance-panel[data-instance-panel="seooc"] .seooc-page-panel .cover-sheet-form [data-cover-key="confidential_info"] {
    grid-column: 1 / -1 !important;
}

.workspace-hub-shell {
    width: 100%;
    margin: 0;
}

.workspace-hub-shell .active-project-banner {
    margin: 0;
}

.workspace-hub-shell .traceability-browser {
    grid-template-columns: 345px minmax(0, 1fr);
    width: 100%;
}

.workspace-hub-shell .traceability-instances {
    overflow-x: auto;
}

.sads-workproduct-panel .sads-page-card {
    border: 1px solid #ece7f4;
    border-radius: 0;
    padding: 0;
    background: #ffffff;
    box-shadow: none;
}

.sads-form-title-row,
.sads-workproduct-panel .sads-page-card > h3,
.sads-workproduct-panel .sads-saved-table > h3 {
    margin: 0;
    padding: 12px 12px 8px;
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 900;
}

.sads-form-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sads-form-title-row h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 900;
}

.sads-form-title-row .actions {
    margin: 0;
}

.sads-workproduct-panel .seooc-page-tabs {
    border-bottom: 1px solid #e7d7ff;
    padding: 10px 12px;
}

.sads-workproduct-panel .seooc-page-tab {
    min-height: 32px;
    border-color: #c98fff;
    border-radius: 6px;
    padding: 7px 12px;
    background: #ffffff;
    color: #5b2398;
    font-weight: 700;
}

.sads-workproduct-panel .seooc-page-tab.active {
    background: #7c2ee8;
    color: #ffffff;
}

.sads-workproduct-panel .sads-form {
    gap: 0;
}

.sads-form-table-wrap,
.sads-saved-table {
    border-radius: 0;
    border-color: #e3d7f4;
}

.sads-form-table {
    width: 100%;
    border-collapse: collapse;
}

.sads-form-table th,
.sads-form-table td,
.sads-saved-table th,
.sads-saved-table td,
.sads-nested-table td {
    border: 1px solid #e3d7f4;
    padding: 12px;
    vertical-align: top;
}

.sads-form-table .sads-section-row {
    background: #f0e3ff;
    color: #090313;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.sads-form-table .sads-section-row .sads-section-add {
    float: right;
    min-height: 32px;
    padding: 5px 12px;
    text-transform: none;
}

.sads-attribute-cell {
    width: 35%;
    min-width: 260px;
    background: #ffffff;
    color: #090313;
    font-weight: 800;
}

.sads-workproduct-panel textarea {
    min-height: 76px;
}

.sads-workproduct-panel input,
.sads-workproduct-panel select,
.sads-workproduct-panel textarea {
    border-color: #ccd3dc;
    background: #ffffff;
}

.sads-mini-table,
.sads-repeat-stack {
    display: grid;
    gap: 10px;
}

.sads-mini-add {
    justify-self: start;
}

.sads-mini-table .table-wrap,
.sads-repeat-stack .table-wrap {
    border-radius: 0;
    border-color: #e3d7f4;
}

.sads-mini-table table {
    width: 100%;
    border-collapse: collapse;
}

.sads-mini-table th {
    border: 1px solid #e3d7f4;
    padding: 11px 12px;
    background: #ffffff;
    color: #090313;
    font-weight: 850;
    text-align: left;
}

.sads-mini-table td:last-child {
    min-width: 170px;
}

.sads-mini-table td:last-child .btn {
    min-height: 26px;
    margin: 0 8px 6px 0;
    padding: 6px 10px;
    font-size: 12px;
}

.sads-repeat-stack {
    gap: 14px;
}

.sads-repeat-instance {
    display: grid;
    gap: 0;
}

.sads-repeat-instance + .sads-repeat-instance {
    border-top: 2px solid #efe4fb;
    padding-top: 12px;
}

.sads-repeat-instance-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.sads-repeat-instance-tools .btn {
    min-height: 30px;
    padding: 6px 12px;
    font-size: 12px;
}

.sads-repeat-instance-table {
    border-collapse: collapse;
}

.sads-tsr-set-builder,
.sads-tsr-set-list,
.sads-tsr-set,
.sads-tsr-subsection {
    display: grid;
    gap: 12px;
}

.sads-tsr-set {
    border: 1px solid #e3d7f4;
    background: #ffffff;
}

.sads-tsr-set + .sads-tsr-set {
    margin-top: 14px;
}

.sads-tsr-set-toolbar,
.sads-tsr-subsection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #d7b9f9;
    padding: 10px 12px;
    background: #f0e3ff;
    color: #090313;
    font-weight: 900;
    text-transform: uppercase;
}

.sads-tsr-set-toolbar .row-actions {
    margin: 0;
}

.sads-tsr-subsection {
    padding: 0 12px 12px;
}

.sads-tsr-subsection-head {
    margin: 0 -12px;
    background: #f7f0ff;
    text-transform: none;
}

.sads-tsr-subsection [data-tsr-child-list] {
    display: grid;
    gap: 12px;
}

.sads-tsr-set[data-editable="false"] {
    background: #fbfbfd;
}

.sads-tsr-set[data-editable="false"] input,
.sads-tsr-set[data-editable="false"] select,
.sads-tsr-set[data-editable="false"] textarea {
    background: #f4f4f6;
}

.sads-saved-sets {
    display: grid;
    gap: 12px;
}

.sads-saved-set {
    display: grid;
    gap: 8px;
    border: 1px solid #e3d7f4;
    padding: 10px;
    background: #ffffff;
}

.sads-saved-set > strong,
.sads-saved-set span {
    color: var(--primary-dark);
    font-weight: 900;
}

.sads-workproduct-panel .btn.primary {
    background: #5d2398;
    color: #ffffff;
}

.sads-workproduct-panel .btn.secondary {
    border-color: #d4dbe7;
    background: #ffffff;
    color: #344054;
}

.sads-workproduct-panel button.btn.secondary:not(.sads-section-add):not(.sads-mini-add) {
    background: #dcecff;
    color: #1f5fbf;
}

.sads-workproduct-panel .sads-section-add {
    min-width: 68px;
    background: #5d2398;
    color: #ffffff;
}

.sads-workproduct-panel .btn.danger {
    background: #ffe1e1;
    color: #d00000;
}

.sads-inline-editor-row input,
.sads-inline-editor-row select,
.sads-inline-editor-row textarea {
    min-height: 50px;
    border-color: #cfd6df;
    background: #ffffff;
}

.sads-inline-editor-row input:focus,
.sads-inline-editor-row select:focus,
.sads-inline-editor-row textarea:focus {
    border-color: #5d2398;
    box-shadow: 0 0 0 2px rgba(93, 35, 152, 0.16);
}

.sads-inline-editor-row textarea {
    min-height: 84px;
}

.sads-saved-table table {
    width: 100%;
    border-collapse: collapse;
}

.sads-nested-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.sads-nested-table strong {
    color: var(--primary-dark);
    font-weight: 850;
}

.work-status-panel {
    display: grid;
    gap: 4px;
    margin: 12px 0 16px;
    border: 1px solid #d8c7f5;
    border-left: 6px solid var(--primary);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fbf8ff;
}

.work-status-panel strong {
    color: var(--primary-dark);
    font-size: 16px;
}

.work-status-panel span,
.work-status-panel small {
    color: #4c3575;
    font-weight: 800;
}

.work-status-panel p {
    margin: 0;
    color: var(--muted);
}

.work-status-panel.status-pending {
    border-left-color: #f59e0b;
    background: #fff9eb;
}

.work-status-panel.status-changes_requested {
    border-left-color: #ef4444;
    background: #fff1f2;
}

.work-status-panel.status-approved {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.work-status-panel.status-change_open {
    border-left-color: #0ea5e9;
    background: #eff6ff;
}

.change-management-panel {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
    border: 1px solid #d8c7f5;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.change-management-panel h3,
.change-management-panel p {
    margin: 0;
}

.workspace-version-layout {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 18px;
    min-height: calc(100vh - 190px);
    border: 1px solid #dac8f4;
}

.version-sidebar,
.version-detail-panel {
    background: #ffffff;
    padding: 20px;
}

.version-sidebar {
    border-right: 1px solid #dac8f4;
}

.workspace-version-group {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eadffb;
}

.workspace-version-group:last-child {
    border-bottom: 0;
}

.workspace-version-title {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.05rem;
    font-weight: 800;
}

.version-group {
    display: grid;
    gap: 8px;
    margin-left: 16px;
}

.workspace-review-item {
    margin-left: 0;
}

.review-portal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border: 1px solid #d8c7f5;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 14px;
    color: var(--text);
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.review-portal-item small {
    color: var(--muted);
    font-weight: 700;
}

.review-portal-item:hover,
.review-portal-item:focus-visible,
.review-portal-item.active {
    border-color: var(--primary);
    background: #f6efff;
    color: var(--primary-dark);
    box-shadow: 0 8px 18px rgba(109, 53, 200, 0.1);
    outline: none;
}

.review-portal-item-detail {
    display: grid;
    gap: 10px;
    padding: 4px 0 0;
}

.workspace-map-subbranches {
    display: grid;
    gap: 8px;
    margin: -4px 0 8px 20px;
    padding-left: 12px;
    border-left: 2px solid var(--branch);
}

.workspace-map-subitem {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
}

.workspace-map-empty {
    padding: 6px 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.review-portal-placeholder {
    min-height: 160px;
}

.version-group h3,
.version-group h4 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 0.98rem;
    font-weight: 800;
}

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

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 1px solid #d8c7f5;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.version-item:hover,
.version-item:focus-visible,
.version-item.active {
    border-color: transparent;
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.16);
    transform: translateY(-1px);
    outline: none;
}

.version-snapshot-panel {
    margin-top: 12px;
    border: 1px solid #dac8f4;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}

.static-guidance-panel {
    border: 1px solid #e4d7f8;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
    width: 100%;
}

.static-guidance-content {
    display: grid;
    gap: 14px;
}

.static-guidance-content h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.guidance-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.guidance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.guidance-table th,
.guidance-table td {
    border: 1px solid #ddcff5;
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

.guidance-table th,
.guidance-heading-row td,
.guidance-heading-row th {
    background: #efe2ff;
    color: var(--primary-dark);
    font-weight: 800;
}

.guidance-table .excel-yellow,
.guidance-table .guidance-yellow-row th,
.guidance-table .guidance-yellow-row td {
    background: #fff2cc;
    color: #2d2050;
    font-weight: 800;
}

.guidance-table .blank {
    background: #fbf9ff;
}

.guidance-excel-content {
    gap: 0;
}

.guidance-excel-wrap {
    border: 1px solid #d9c9f4;
    border-radius: 8px;
    max-width: 100%;
}

.guidance-excel-table {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
    background: #ffffff;
}

.guidance-excel-table th,
.guidance-excel-table td {
    border: 0;
    min-width: 72px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
    color: #181020;
    background: #ffffff;
}

.guidance-excel-table .with-border {
    border: 1px solid #b8a7d7;
}

.guidance-excel-table .bold {
    color: #3f1285;
    font-weight: 800;
}

.guidance-excel-table .center {
    text-align: center;
}

.guidance-excel-table .right {
    text-align: right;
}

.guidance-excel-table .middle {
    vertical-align: middle;
}

.fmeda-static-section-stack {
    display: grid;
    gap: 14px;
}

.fmeda-static-section {
    border: 1px solid #d9c9f4;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.fmeda-static-section-title {
    border-bottom: 1px solid #d9c9f4;
    background: #f7f3ff;
    color: var(--primary-dark);
    font-weight: 800;
    padding: 9px 11px;
}

.fmeda-static-section .guidance-excel-wrap {
    border: 0;
    border-radius: 0;
}

.fmeda-fm-sm-table {
    font-size: 0.78rem;
}

.fmeda-fm-sm-table th,
.fmeda-fm-sm-table td {
    min-width: 150px;
    max-width: 420px;
    padding: 8px 9px;
}

.fmeda-fm-sm-table th {
    background: #c8b0e3;
    color: #1f1530;
}

.dfi-static-sheet {
    display: inline-block;
    min-width: min(100%, 860px);
    max-width: 980px;
}

.dfi-sheet-table {
    width: 860px;
    min-width: 860px;
    border: 2px solid #111827;
    background: #ffffff;
    color: #000000;
}

.dfi-sheet-table th,
.dfi-sheet-table td {
    border-color: #111827;
    color: #000000;
    font-size: 14px;
    line-height: 1.25;
    vertical-align: top;
}

.dfi-sheet-table .dfi-sno {
    width: 96px;
    min-width: 96px;
    text-align: right;
}

.dfi-sheet-table .guidance-yellow-row th,
.dfi-sheet-table .guidance-yellow-row td {
    font-weight: 900;
}

.dfi-section-break td {
    height: 36px;
    border-right: 0;
    border-left: 0;
    background: transparent;
}

.dfa-guidance-static-sheet {
    display: inline-block;
    min-width: min(100%, 860px);
    max-width: 980px;
}

.dfa-guidance-sheet-table {
    width: 860px;
    min-width: 860px;
    border: 2px solid #111827;
    background: #ffffff;
    color: #000000;
}

.dfa-guidance-sheet-table th,
.dfa-guidance-sheet-table td {
    border-color: #111827;
    color: #000000;
    font-size: 14px;
    line-height: 1.25;
    vertical-align: top;
}

.dfa-guidance-sheet-table .dfa-guidance-field {
    width: 230px;
    min-width: 230px;
    font-weight: 800;
}

.block-diagram-list {
    display: grid;
    gap: 20px;
    margin-bottom: 22px;
}

.block-diagram-panel {
    display: grid;
    gap: 14px;
    border: 1px solid #e4d7f8;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}

.block-diagram-panel h3 {
    margin: 0;
    color: #3f1285;
    font-size: 16px;
    font-weight: 800;
}

.block-diagram-preview {
    display: grid;
    min-height: 280px;
    border: 1px dashed #cbb8ef;
    border-radius: 10px;
    background: #fbf9ff;
    place-items: center;
    padding: 14px;
}

.block-diagram-preview img {
    max-width: 100%;
    max-height: 620px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(74, 35, 128, 0.12);
}

.block-diagram-form {
    border: 1px solid #e4d7f8;
    border-radius: 10px;
    background: #ffffff;
    padding: 16px;
}

.block-list-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 16px;
}

.block-list-subpanel {
    display: grid;
    gap: 16px;
}

.block-list-subpanel h3 {
    margin: 0;
    color: #05010a;
    font-size: 18px;
}

.compact-upload-panel {
    max-width: 740px;
    gap: 10px;
}

.compact-upload-panel h4 {
    margin: 0;
    color: #05010a;
    font-size: 13px;
}

.compact-upload-panel .block-diagram-preview {
    min-height: 140px;
}

.block-list-entry-form {
    max-width: none;
}

.block-list-entry-form .seooc-section {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.mission-profile-table-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
}

.mission-profile-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    background: #ffffff;
}

.mission-profile-table th,
.mission-profile-table td {
    border: 1px solid #dfd5ec;
    padding: 8px 10px;
    vertical-align: top;
}

.mission-profile-table thead th {
    background: #ead7ff;
    color: #3f1285;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
}

.mission-profile-table tbody th {
    width: 36%;
    color: #221035;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
}

.mission-profile-table td:nth-child(2) {
    width: 34%;
}

.mission-profile-table td:nth-child(3) {
    width: 30%;
}

.mission-profile-table textarea {
    min-height: 64px;
    resize: vertical;
}

.mission-profile-table select,
.mission-profile-table textarea {
    width: 100%;
    border: 1px solid #cfc4db;
    border-radius: 4px;
    background: #fbfaff;
    color: #05010a;
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 10px;
}

.mission-profile-no-type {
    display: block;
    color: #6b5f7b;
    font-size: 12px;
    line-height: 34px;
}

.seooc-development-saved-table {
    grid-column: 1 / -1;
    margin-top: 14px;
}

.seooc-development-saved-table > table {
    min-width: 1200px;
}

.nested-saved-data-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    background: #ffffff;
}

.nested-saved-data-table th,
.nested-saved-data-table td {
    border: 1px solid #e4d7f8;
    padding: 8px 10px;
    color: #1f1430;
    font-size: 12px;
    line-height: 1.35;
    vertical-align: top;
    white-space: normal;
}

.nested-saved-data-table th {
    background: #f2e7ff;
    color: #3f1285;
    font-weight: 800;
}

.saved-mission-profile-scroll {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 420px;
}

.saved-mission-profile-scroll .nested-saved-data-table {
    min-width: 100%;
}

.saved-mission-profile-scroll .nested-saved-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

@media (max-width: 760px) {
    .site-footer-content {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 28px 20px 24px;
    }
}

/* Final responsive overrides: keep late-declared workspace styles adaptive. */
@media (max-width: 1180px) {
    .workspace-version-layout {
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    .workspace-version-layout,
    .traceability-browser,
    .workspace-map,
    .workspace-two-container {
        grid-template-columns: 1fr;
    }

    .version-sidebar,
    .traceability-types,
    .traceability-instances,
    .workspace-left-container,
    .workspace-right-container {
        min-height: auto;
        max-height: none;
    }

    .traceability-instances {
        overflow: visible;
    }
}

@media (max-width: 560px) {
    .workspace-version-layout,
    .traceability-browser,
    .workspace-map,
    .workspace-two-container,
    .block-list-entry-form .seooc-section,
    .seooc-form.workspace2-edit-form,
    .traceability-instance-panel .seooc-form {
        grid-template-columns: 1fr !important;
    }

    .seooc-page-tab,
    .workspace-switcher .btn,
    .workspace-top-nav .btn,
    .workspace-page-nav .btn {
        width: 100%;
    }

    .traceability-instance-panel,
    .template-preview,
    .workspace-map-preview,
    .version-snapshot-panel {
        max-width: 100%;
        min-width: 0;
    }

    .site-footer-content {
        padding-inline: 16px;
    }
}
