: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;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    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.home-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #5d4771 0%, #a98bbc 100%);
}

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

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

input,
select,
textarea {
    user-select: text;
}

.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;
}

.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;
}

.idle-timeout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(22, 15, 34, 0.48);
}

.idle-timeout-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 91;
    width: min(440px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
    border: 1px solid #d8c9e8;
    border-radius: 8px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.idle-timeout-dialog h2 {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: 22px;
}

.idle-timeout-dialog p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.idle-timeout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.idle-timeout-actions .btn {
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

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

.idle-timeout-actions .secondary {
    background: var(--primary-soft);
    color: var(--text);
}

.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;
}

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

.shell {
    flex: 1 0 auto;
    width: calc(100% - 20px);
    margin: 10px auto 24px;
}

body > .site-footer {
    margin-top: auto;
}

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

.home-shell {
    width: 100%;
    min-height: calc(100vh - 82px);
    margin: 0;
    padding: 0;
}

.home-page .navbar {
    border-bottom: 0;
    background: #ffffff;
}

.home-page .site-footer {
    background: #5a2986;
}

.home-page .site-footer-content {
    max-width: 960px;
    padding-top: 34px;
    padding-bottom: 30px;
}

.home-page .site-footer-bottom {
    background: #5a2986;
}

@keyframes homeSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-42px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes homeSlideInRight {
    from {
        opacity: 0;
        transform: translateX(42px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes homeSlideInUp {
    from {
        opacity: 0;
        transform: translateY(34px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero {
    display: grid;
    grid-template-columns: 500px 300px;
    align-items: center;
    justify-content: center;
    gap: 84px;
    min-height: 380px;
    padding: 90px 32px 20px;
    color: #ffffff;
}

.home-hero-copy {
    opacity: 0;
    animation: homeSlideInLeft 0.75s ease-out 0.08s forwards;
}

.home-hero-copy h1 {
    margin: 0 0 18px;
    max-width: 430px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    font-weight: 950;
}

.home-hero-copy h1 span {
    display: block;
    color: #d9b7ff;
}

.home-hero-copy p {
    max-width: 470px;
    margin: 0 0 36px;
    color: #f4edf8;
    font-size: 14px;
    line-height: 1.65;
}

.home-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    opacity: 0;
    animation: homeSlideInUp 0.65s ease-out 0.36s forwards;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    min-height: 38px;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.home-btn:hover,
.home-btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.navbar nav > a.active,
.navbar nav > a[aria-current="page"] {
    border-color: var(--primary-dark) !important;
    background-color: #6d35c8 !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(109, 53, 200, 0.26);
}

.home-page .navbar nav > a.active,
.home-page .navbar nav > a[aria-current="page"],
.about-page .navbar nav > a.active,
.about-page .navbar nav > a[aria-current="page"] {
    border-color: var(--primary-dark) !important;
    background-color: #6d35c8 !important;
    background-image: none !important;
    color: #ffffff !important;
}

.home-btn.primary {
    background: #ffffff;
    color: #522785;
    box-shadow: 0 12px 22px rgba(34, 12, 54, 0.18);
}

.home-btn.secondary {
    border: 1px solid #c79dff;
    background: transparent;
    color: #ffffff;
}

.home-btn.secondary:hover,
.home-btn.secondary:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.home-chip-card {
    display: grid;
    align-items: center;
    justify-items: center;
    width: 272px;
    min-height: 288px;
    border-radius: 10px;
    padding: 32px 24px 30px;
    background: #f4f2f4;
    box-shadow: 0 26px 46px rgba(44, 23, 65, 0.24);
    opacity: 0;
    animation: homeSlideInRight 0.78s ease-out 0.18s forwards;
}

.home-chip-card strong {
    color: #c10f0f;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.home-chip-art {
    position: relative;
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
}

.home-chip-art::before,
.home-chip-art::after {
    content: "";
    position: absolute;
    background: #8a52ff;
}

.home-chip-art::before {
    width: 10px;
    height: 142px;
}

.home-chip-art::after {
    width: 142px;
    height: 10px;
}

.home-chip-art span {
    position: relative;
    z-index: 1;
    width: 112px;
    height: 112px;
    border-radius: 18px;
    background: #5f3092;
}

.home-chip-art span::after {
    content: "";
    position: absolute;
    inset: 30px;
    border-radius: 8px;
    background: #d9d0ee;
}

.home-team-cta {
    display: grid;
    justify-items: center;
    gap: 30px;
    min-height: 283px;
    padding: 78px 24px 92px;
    color: #ffffff;
    text-align: center;
    opacity: 0;
    animation: homeSlideInUp 0.72s ease-out 0.55s forwards;
}

.home-team-cta h2 {
    margin: 0;
    color: #ffffff;
    font-size: 31px;
    font-weight: 950;
}

.home-btn.cta {
    min-width: 292px;
    background: #854af1;
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(76, 32, 128, 0.22);
}

.home-chat-button {
    position: fixed;
    right: 28px;
    bottom: 22px;
    z-index: 60;
    display: block;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #c21b21;
    box-shadow: 0 10px 20px rgba(80, 0, 0, 0.22);
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    animation: homeSlideInUp 0.45s ease-out 0.85s forwards;
}

.home-chat-button.is-open {
    transform: scale(0.96);
    box-shadow: 0 8px 18px rgba(80, 0, 0, 0.28);
}

.home-chat-button::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 12px;
    width: 20px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
}

.home-chat-button::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 24px;
    width: 8px;
    height: 8px;
    background: #ffffff;
    transform: rotate(45deg);
}

.ticket-widget[hidden],
.ticket-widget-backdrop[hidden] {
    display: none;
}

.ticket-widget-backdrop {
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(28, 14, 43, 0.28);
    backdrop-filter: blur(1px);
}

.ticket-widget {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 70;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 72px);
    overflow: auto;
    border: 1px solid #dbc8f5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 22px 52px rgba(33, 10, 55, 0.28);
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px));
    animation: ticketPanelIn 0.18s ease-out forwards;
}

.ticket-widget-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #5f2492;
    color: #ffffff;
}

.ticket-widget-head strong,
.ticket-widget-head span {
    display: block;
    color: #ffffff;
}

.ticket-widget-head strong {
    font-size: 18px;
}

.ticket-widget-head span {
    margin-top: 3px;
    font-size: 12px;
}

.ticket-widget-head button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.ticket-widget-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 16px 0;
}

.ticket-widget-links button {
    border-radius: 8px;
    border: 0;
    padding: 10px 12px;
    background: #ead8ff;
    color: #34124f;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.ticket-widget-links button.active {
    background: #5f2492;
    color: #ffffff;
}

.ticket-widget-message {
    margin: 12px 16px 0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.ticket-widget-message.success {
    background: #e9f8ef;
    color: #116732;
}

.ticket-widget-message.warning {
    background: #fff7dc;
    color: #76540b;
}

.ticket-widget-message.error {
    background: #fff1f2;
    color: #a31621;
}

.ticket-widget-form {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.ticket-widget-form label {
    display: grid;
    gap: 6px;
    color: #291440;
    font-size: 13px;
    font-weight: 850;
}

.ticket-widget-form input,
.ticket-widget-form select,
.ticket-widget-form textarea {
    width: 100%;
    border: 1px solid #d8c8eb;
    border-radius: 8px;
    padding: 10px 11px;
    color: #1d1230;
    font: inherit;
}

.ticket-widget-form textarea {
    resize: vertical;
}

.ticket-widget-form .primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: #6a259b;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 12px 22px rgba(95, 36, 146, 0.26);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ticket-widget-form .primary-action:hover {
    background: #55207f;
    box-shadow: 0 14px 26px rgba(95, 36, 146, 0.32);
    transform: translateY(-1px);
}

.ticket-widget-form .primary-action:active {
    transform: translateY(0);
}

.ticket-widget-form .primary-action:disabled {
    background: #b69ace;
    cursor: wait;
    box-shadow: none;
    transform: none;
}

.ticket-widget-raised {
    padding: 16px;
}

.ticket-widget-list {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
}

.ticket-widget-ticket {
    border: 1px solid #e2d4f3;
    border-radius: 10px;
    padding: 12px;
    background: #fbf8ff;
}

.ticket-widget-ticket strong,
.ticket-widget-ticket span {
    display: block;
}

.ticket-widget-ticket strong {
    color: #4b1977;
    font-size: 14px;
}

.ticket-widget-ticket span {
    margin-top: 4px;
    color: #6f5a86;
    font-size: 12px;
    font-weight: 800;
}

.ticket-widget-ticket p,
.ticket-widget-empty {
    margin: 8px 0 0;
    color: #241832;
    font-size: 13px;
    line-height: 1.45;
}

@keyframes ticketPanelIn {
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.ticket-shell {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ticket-page .navbar {
    border-bottom: 0;
    background: #ffffff;
}

.ticket-page .site-footer {
    background: #5a2986;
}

.ticket-hero {
    padding: 54px 24px 18px;
    background: linear-gradient(135deg, #646487 0%, #76506d 50%, #bd91d8 100%);
    color: #ffffff;
    text-align: center;
}

.ticket-hero h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 42px;
    font-weight: 950;
}

.ticket-hero p {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
}

.ticket-panel {
    min-height: 520px;
    padding: 22px 24px 88px;
    background: linear-gradient(135deg, #646487 0%, #76506d 50%, #bd91d8 100%);
}

.ticket-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 24px;
}

.ticket-tabs a {
    border-radius: 8px;
    padding: 12px 18px;
    background: #ead8ff;
    color: #251434;
    font-weight: 800;
    text-decoration: none;
}

.ticket-tabs a.active {
    background: #5f2492;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(54, 19, 87, 0.22);
}

.ticket-form,
.ticket-list,
.ticket-empty {
    width: min(760px, calc(100vw - 48px));
    margin: 0 auto;
}

.ticket-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    border-radius: 14px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 22px 52px rgba(33, 10, 55, 0.28);
}

.ticket-form label {
    display: grid;
    gap: 8px;
    color: #291440;
    font-weight: 800;
}

.ticket-form label.wide,
.ticket-actions {
    grid-column: 1 / -1;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea {
    width: 100%;
    border: 1px solid #d8c8eb;
    border-radius: 8px;
    padding: 11px 12px;
    color: #1d1230;
    font: inherit;
}

.ticket-form textarea {
    resize: vertical;
}

.ticket-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.ticket-actions .primary-action,
.ticket-actions .secondary-action {
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 850;
    text-decoration: none;
}

.ticket-actions .secondary-action {
    border: 1px solid #7c4bb1;
    background: #ffffff;
    color: #5f2492;
}

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

.ticket-card,
.ticket-empty {
    border-radius: 12px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 14px 24px rgba(40, 22, 58, 0.18);
}

.ticket-card h2,
.ticket-empty h2 {
    margin: 6px 0 10px;
    color: #5f2492;
    font-size: 22px;
}

.ticket-card p,
.ticket-empty p {
    margin: 0;
    color: #1f1730;
    line-height: 1.6;
}

.ticket-id {
    color: #725c8f;
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

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

.ticket-meta div {
    border-radius: 8px;
    padding: 12px;
    background: #f6efff;
}

.ticket-meta dt {
    margin: 0 0 5px;
    color: #654780;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.ticket-meta dd {
    margin: 0;
    color: #1f1730;
    font-weight: 750;
}

.ticket-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    background: #e8dcff;
    color: #5f2492;
    font-size: 12px;
    font-weight: 900;
}

.ticket-attachment {
    display: inline-flex;
    margin-top: 16px;
    color: #5f2492;
    font-weight: 850;
    text-decoration: none;
}

.about-shell {
    width: 100%;
    margin: 0;
    padding: 0;
}

.about-page .navbar {
    border-bottom: 0;
    background: #ffffff;
}

.about-page .site-footer {
    background: #5a2986;
}

.about-page .site-footer-content {
    max-width: 1040px;
}

.about-page .site-footer-bottom {
    background: #5a2986;
}

.help-shell {
    width: 100%;
    margin: 0;
    padding: 0;
}

.help-page .navbar {
    border-bottom: 0;
    background: #ffffff;
}

.help-page .site-footer {
    background: #5a2986;
}

.help-page .site-footer-content {
    max-width: 1040px;
}

.help-page .site-footer-bottom {
    background: #5a2986;
}

.help-content {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 34px;
    min-height: 582px;
    padding: 80px 24px 118px;
    background: linear-gradient(135deg, #646487 0%, #76506d 50%, #bd91d8 100%);
}

.help-desk-panel {
    display: grid;
    justify-items: center;
    gap: 28px;
    width: min(792px, calc(100vw - 48px));
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 34px 38px 38px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 44px rgba(39, 17, 58, 0.22);
    text-align: center;
}

.help-desk-panel h1 {
    margin: 0;
    color: #ffffff;
    font-size: 31px;
    font-weight: 950;
}

.help-desk-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.6;
}

.help-doc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.help-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 168px;
    min-height: 47px;
    border: 0;
    border-radius: 8px;
    padding: 12px 22px;
    background: #4d45ee;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: 0 12px 22px rgba(42, 22, 93, 0.24);
}

.help-action:hover,
.help-action:focus-visible {
    background: #3e36cf;
    color: #ffffff;
}

.help-action::before,
.help-back-home::before {
    margin-right: 8px;
    font-size: 12px;
}

.help-action.guide::before {
    content: "📘";
}

.help-action.reference {
    background: #982ee9;
}

.help-action.reference:hover,
.help-action.reference:focus-visible {
    background: #8224cc;
}

.help-action.reference::before {
    content: "📄";
}

.help-action.query {
    margin-top: 12px;
    min-width: 172px;
    background: #e82429;
}

.help-action.query:hover,
.help-action.query:focus-visible {
    background: #c81f24;
}

.help-action.query::before {
    content: "✉";
}

.help-back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    padding: 10px 24px;
    background: #5f2492;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 22px rgba(42, 22, 93, 0.18);
}

.help-back-home:hover,
.help-back-home:focus-visible {
    background: #4f1e79;
    color: #ffffff;
}

.help-back-home::before {
    content: "⬅";
}

.help-query-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    width: min(1040px, 100%);
    margin: 0 auto;
    border-radius: 12px;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(34, 12, 54, 0.2);
}

.help-query-card h2 {
    margin: 0;
    color: #5f2492;
    font-size: 24px;
    font-weight: 950;
}

.help-query-card p {
    margin: 0;
    color: #20152e;
    line-height: 1.6;
}

.help-query-card .eyebrow {
    margin: 0 0 8px;
    color: #6d4f8a;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.help-query-form label {
    display: grid;
    gap: 7px;
    color: #291440;
    font-weight: 850;
}

.help-query-form label.wide,
.help-form-actions {
    grid-column: 1 / -1;
}

.help-query-form input,
.help-query-form textarea {
    width: 100%;
    border: 1px solid #d8c8eb;
    border-radius: 8px;
    padding: 11px 12px;
    color: #1d1230;
    font: inherit;
}

.help-query-form textarea {
    resize: vertical;
}

.pdf-modal-backdrop[hidden] {
    display: none;
}

.pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(28, 14, 43, 0.5);
}

.pdf-modal {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(980px, 100%);
    height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #5f2492;
    color: #ffffff;
}

.pdf-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
}

.pdf-modal-actions {
    display: flex;
    gap: 8px;
}

.pdf-modal-actions button {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.pdf-viewer-status {
    padding: 10px 18px;
    background: #fbf8ff;
    color: #5f2492;
    font-weight: 850;
}

.pdf-viewer-canvas-wrap {
    display: grid;
    gap: 18px;
    justify-items: center;
    overflow: auto;
    padding: 18px;
    background: #f2edf7;
    text-align: center;
}

.pdf-viewer-canvas-wrap canvas {
    max-width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(34, 12, 54, 0.18);
}

.pdf-viewer-canvas-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 580px;
    border: 0;
    background: #ffffff;
}

.about-hero {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 62px 24px 54px;
    color: #ffffff;
    text-align: center;
}

.about-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: 42px;
    font-weight: 950;
}

.about-hero p {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.about-content {
    display: grid;
    gap: 42px;
    width: min(960px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 110px;
}

.about-card {
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 12px 22px rgba(34, 12, 54, 0.2);
}

.about-intro-card {
    display: grid;
    gap: 18px;
    padding: 38px 34px;
}

.about-intro-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
}

.about-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.about-feature-card {
    padding: 30px 28px;
    background: #fbf6ff;
}

.about-feature-card h2,
.about-capabilities-card h2,
.about-benefits-card h2 {
    margin: 0 0 24px;
    color: #5a2986;
    font-size: 25px;
    font-weight: 950;
}

.about-feature-card h2::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 3px solid #6d35c8;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: -1px;
}

.about-feature-card ul,
.about-check-grid ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-feature-card li,
.about-check-grid li {
    font-size: 14px;
    line-height: 1.45;
}

.about-check-grid li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 4px;
    margin-right: 8px;
    border-bottom: 3px solid #6d35c8;
    border-left: 3px solid #6d35c8;
    transform: rotate(-45deg) translateY(-2px);
}

.about-capabilities-card {
    padding: 34px 52px 36px;
    text-align: center;
}

.about-check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 68px;
    margin: 0 auto 24px;
    text-align: left;
}

.about-products {
    display: grid;
    gap: 4px;
    justify-items: center;
    font-size: 14px;
}

.about-benefits-card {
    padding: 34px 36px;
    background: #f4e8ff;
    text-align: center;
}

.about-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
}

.about-benefit-grid h3 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 17px;
}

.about-benefit-grid p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

.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;
}

.password-rules li.is-met {
    color: #047857;
    font-weight: 900;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.field-hint.is-valid {
    color: #047857;
    font-weight: 900;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #86efac;
    border-radius: 7px;
    padding: 0 12px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 900;
}

.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;
}

.saved-workspace2-table h3 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.saved-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.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;
}

.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(100vh - 112px);
    margin: -10px -10px -24px;
    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: 10px;
    min-height: calc(100vh - 112px);
    margin: -10px -10px -24px;
    padding: 22px min(7vw, 120px) 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: 0;
}

.project-dashboard-hero h1 {
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 30px;
}

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

.dashboard-welcome-hero {
    margin-top: 18px;
    margin-bottom: 34px;
}

.dashboard-welcome-hero h1 {
    font-size: 32px;
    line-height: 1.25;
}

.dashboard-welcome-hero p {
    max-width: 720px;
    text-transform: capitalize;
}

.project-list-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    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: 1100px;
    margin-top: 0;
}

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

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

.dashboard-owned-projects {
    gap: 32px;
}

.dashboard-project-list-head {
    max-width: 1100px;
    align-items: center;
}

.dashboard-project-list-head .add-project-button {
    margin-left: auto;
}

.dashboard-project-grid {
    grid-template-columns: repeat(3, minmax(260px, 345px));
    gap: 34px 32px;
}

.dashboard-empty-projects {
    display: grid;
    gap: 8px;
    max-width: 520px;
    padding: 4px 0;
    color: #ffffff;
}

.dashboard-empty-projects h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
}

.dashboard-empty-projects p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

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

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

.project-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 94px;
    gap: 10px;
}

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

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

.compact-search {
    min-width: 94px;
    padding-inline: 14px;
}

.project-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 190px) minmax(170px, 200px);
    gap: 18px;
    align-items: end;
}

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

.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: 6px;
}

.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-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    max-width: 1240px;
}

.project-card {
    display: grid;
    gap: 16px;
    min-height: 230px;
    border-radius: 8px;
    padding: 24px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.browse-project-card {
    min-height: 202px;
    gap: 12px;
    border-radius: 8px;
    padding: 20px;
}

.browse-project-card .project-card-head {
    align-items: flex-start;
}

.browse-project-card h3 {
    font-size: 18px;
}

.browse-project-card .project-meta-list {
    gap: 6px;
    font-size: 13px;
}

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

.project-card h3 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
    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-mode-badge.approved {
    background: #dcfce7;
    color: #166534;
}

.project-mode-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.project-mode-badge.rejected,
.project-mode-badge:not(.owner):not(.approved):not(.pending) {
    background: #fee2e2;
    color: #dc2626;
}

.project-meta-list {
    display: grid;
    gap: 7px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.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-card-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

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

.project-card-link.view-work-products {
    display: inline-flex;
    width: fit-content;
    border-radius: 7px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
}

.project-card-link.owner-work-products {
    background: var(--primary-dark);
}

.project-card-link.owner-work-products:hover,
.project-card-link.owner-work-products:focus-visible {
    background: var(--primary);
    color: #ffffff;
}

.project-card-link.approved-work-products {
    background: #2563eb;
}

.project-card-link.approved-work-products:hover,
.project-card-link.approved-work-products:focus-visible {
    background: #1d4ed8;
    color: #ffffff;
}

.project-card-link.request-access {
    display: inline-flex;
    width: auto;
    border-radius: 7px;
    padding: 10px 14px;
    background: #16a34a;
    color: #ffffff;
    font-size: 13px;
}

.project-card-link.request-access:hover,
.project-card-link.request-access:focus-visible {
    background: #15803d;
    color: #ffffff;
}

.project-card-link.muted-action {
    display: inline-flex;
    width: auto;
    border-radius: 7px;
    padding: 10px 14px;
    background: #9ca3af;
    color: #ffffff;
    cursor: not-allowed;
}

.dashboard-project-card {
    min-height: 184px;
    align-content: start;
    gap: 14px;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 16px 30px rgba(48, 31, 65, 0.22);
}

.dashboard-card-open-form {
    margin: 0;
}

.dashboard-card-title-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary-dark);
    font: inherit;
    font-size: 18px;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.dashboard-card-title-button:hover,
.dashboard-card-title-button:focus-visible {
    color: var(--primary);
    outline: none;
}

.dashboard-project-card .project-meta-list {
    gap: 8px;
    font-size: 13px;
}

.dashboard-project-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

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

.dashboard-project-actions .btn {
    min-height: 38px;
    border-radius: 10px;
    padding: 9px 15px;
    font-size: 13px;
    text-decoration: none;
}

.project-edit-button {
    border: 1px solid #2563eb;
    background: #ffffff;
    color: #2563eb;
}

.project-edit-button:hover,
.project-edit-button:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
}

.project-delete-button {
    border: 1px solid #ef4444;
    background: #ffffff;
    color: #dc2626;
}

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

.dashboard-quick-actions {
    display: flex;
    max-width: 1100px;
    margin-top: 20px;
}

.browse-access-button {
    min-width: 310px;
    border-radius: 10px;
    padding: 16px 30px;
    box-shadow: 0 14px 28px rgba(79, 40, 150, 0.24);
}

.access-request-panel {
    margin-top: 28px;
}

.access-request-list {
    display: grid;
    gap: 14px;
    max-width: 980px;
}

.access-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 8px;
    padding: 18px 20px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.access-request-card h3 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 18px;
}

.access-request-card p,
.access-request-card span {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.access-request-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 600px));
    gap: 36px;
    max-width: 1240px;
    margin-top: 22px;
}

.dashboard-action-card {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 18px 24px;
    background: #4b5563;
    color: #ffffff;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.dashboard-action-card:hover,
.dashboard-action-card:focus-visible {
    background: #374151;
    color: #ffffff;
    outline: none;
}

.assign-project-link {
    background: #2563eb;
}

.assign-project-link:hover,
.assign-project-link:focus-visible {
    background: #1d4ed8;
}

.manage-requests-page {
    gap: 42px;
    min-height: calc(100vh - 112px);
    padding-top: 48px;
}

.manage-requests-hero {
    display: grid;
    gap: 8px;
    max-width: 1100px;
}

.manage-requests-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
}

.manage-requests-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
}

.manage-requests-panel {
    display: grid;
    gap: 16px;
    max-width: 1036px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
}

.manage-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 8px;
    padding: 18px 20px;
    background: #ffffff;
    color: #1f2937;
}

.manage-request-card h2 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 20px;
}

.manage-request-card p,
.manage-request-card span {
    margin: 0;
    color: #64748b;
}

.manage-empty-panel {
    display: grid;
    min-height: 104px;
    place-items: center;
    gap: 8px;
    text-align: center;
}

.manage-empty-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.manage-empty-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.back-dashboard-button {
    width: fit-content;
    min-width: 198px;
}

.assign-project-card {
    display: grid;
    gap: 18px;
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    color: #1f2937;
}

.assign-project-page {
    place-items: start center;
    padding-top: 44px;
}

.assign-project-shell {
    width: min(960px, 100%);
}

.assign-project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.assign-project-title-row h1 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.assign-project-selector {
    display: grid;
    gap: 10px;
}

.assign-project-selector label {
    color: #ffffff;
    font-weight: 800;
}

.assign-project-selector select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
}

.assign-project-selector option {
    color: #111827;
}

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

.assign-user-columns h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

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

.assign-project-head h2 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 20px;
}

.assign-project-head p,
.assign-project-head span {
    margin: 0;
    color: #64748b;
}

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

.assigned-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
}

.assigned-user-row strong,
.assigned-user-row span {
    display: block;
}

.assigned-user-row strong {
    color: #ffffff;
}

.assigned-user-row span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.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-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: 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,
    .help-query-card,
    .help-query-form,
    .workspace-two-container,
    .workspace-map,
    .traceability-browser,
    .project-option-grid,
    .template-button-list,
    .workspace-only-nav,
    .compact-form,
    .attribute-row,
    .seooc-form,
    .tsr-form,
    .ticket-form,
    .ticket-meta,
    .tlsr-attribute-grid,
    .dashboard-action-row,
    .assign-user-columns,
    .asil-box {
        grid-template-columns: 1fr;
    }

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

    .navbar nav {
        gap: 6px;
    }

    .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%;
    }

    .home-hero {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 54px 22px 32px;
        text-align: center;
    }

    .home-hero-copy {
        justify-self: center;
    }

    .home-hero-copy h1 {
        font-size: 34px;
    }

    .home-actions {
        justify-content: center;
    }

    .home-chip-card {
        width: min(300px, 100%);
        justify-self: center;
    }

    .home-team-cta {
        min-height: 250px;
        padding: 56px 22px 80px;
    }

    .home-team-cta h2 {
        font-size: 26px;
    }

    .home-btn.cta {
        min-width: 0;
        width: min(305px, 100%);
    }

    .about-hero {
        padding: 48px 22px 38px;
    }

    .about-hero h1 {
        font-size: 32px;
    }

    .about-hero p {
        font-size: 15px;
    }

    .about-content {
        width: min(100% - 32px, 960px);
        gap: 28px;
        padding-bottom: 72px;
    }

    .about-feature-grid,
    .about-check-grid,
    .about-benefit-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .about-intro-card,
    .about-feature-card,
    .about-capabilities-card,
    .about-benefits-card {
        padding: 26px 22px;
    }

    .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;
    }

    .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: -16px -11px -24px;
        padding: 20px 18px 44px;
        gap: 12px;
    }

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

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

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

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

    .dashboard-project-actions,
    .dashboard-quick-actions {
        justify-content: stretch;
    }

    .dashboard-project-actions .btn,
    .browse-access-button {
        width: 100%;
    }

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

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

    .sidebar {
        position: static;
    }

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

@media (prefers-reduced-motion: reduce) {
    .home-hero-copy,
    .home-actions,
    .home-chip-card,
    .home-team-cta,
    .home-chat-button {
        opacity: 1;
        animation: none;
        transform: none;
    }
}

/* Workspace 2 SEooC sheets: every attribute must 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%;
}

.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-section {
    margin: 20px 0 28px;
}

.static-guidance-section:first-child {
    margin-top: 0;
}

.static-guidance-section h3 {
    margin: 0 0 14px;
    text-align: center;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.safety-tailoring-form {
    display: grid;
    gap: 14px;
}

.safety-tailoring-toolbar,
.safety-summary-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    justify-self: end;
    width: fit-content;
}

.safety-tailoring-toolbar label,
.safety-summary-toolbar label {
    margin: 0;
    color: #b91c1c;
    font-weight: 800;
}

.safety-tailoring-toolbar select,
.safety-summary-toolbar select {
    min-width: 150px;
    border: 1px solid #d7cbe7;
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
}

.safety-tailoring-table-wrap {
    max-height: 72vh;
    overflow: auto;
}

.safety-tailoring-table {
    min-width: 1850px;
    table-layout: fixed;
}

.safety-tailoring-table th,
.safety-tailoring-table td {
    padding: 12px 14px;
    vertical-align: top;
}

.safety-tailoring-table thead th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #f2d7f8;
}

.safety-tailoring-table .sticky-col {
    position: sticky;
    z-index: 10;
    background: #ffffff;
}

.safety-tailoring-table thead .sticky-col {
    z-index: 20;
    background: #c79be8;
}

.safety-tailoring-table .sticky-col-id {
    left: 0;
    width: 140px;
    min-width: 140px;
    text-align: center;
}

.safety-tailoring-table .sticky-col-activity {
    left: 140px;
    width: 460px;
    min-width: 460px;
}

.safety-tailoring-table th:nth-child(3),
.safety-tailoring-table td:nth-child(3) {
    width: 180px;
}

.safety-tailoring-table th:nth-child(4),
.safety-tailoring-table td:nth-child(4) {
    width: 300px;
}

.safety-tailoring-table th:nth-child(5),
.safety-tailoring-table td:nth-child(5) {
    width: 360px;
}

.safety-tailoring-table th:nth-child(6),
.safety-tailoring-table td:nth-child(6) {
    width: 410px;
}

.safety-tailoring-part-row td {
    padding: 0;
    background: #d9b8ef;
}

.safety-tailoring-part-toggle {
    width: 100%;
    border: 0;
    background: #d9b8ef;
    color: #1f1530;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.safety-tailoring-table select,
.safety-tailoring-table textarea {
    width: 100%;
    border: 1px solid #d7cbe7;
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
}

.safety-tailoring-table textarea {
    min-height: 76px;
    resize: vertical;
}

.safety-tailoring-table .is-disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.safety-confirmation-form {
    display: grid;
    gap: 14px;
}

.safety-confirmation-table {
    min-width: 980px;
}

.safety-confirmation-table th {
    background: #f2d7f8;
    text-align: center;
}

.safety-confirmation-table th,
.safety-confirmation-table td {
    vertical-align: middle;
}

.safety-confirmation-workproduct {
    font-weight: 700;
}

.safety-confirmation-table select,
.safety-confirmation-table input {
    width: 100%;
    border: 1px solid #d7cbe7;
    border-radius: 6px;
    padding: 7px 8px;
    font: inherit;
}

.safety-confirmation-table .is-disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.required-marker {
    color: #dc2626 !important;
    font-weight: 800;
}

label > span b,
th b,
label .required-marker,
th .required-marker,
.seooc-section .required-marker,
.safety-project-plan-grid .required-marker,
.safety-confirmation-table .required-marker {
    color: #dc2626 !important;
}

.safety-plan-tab-title {
    margin: 0 0 18px;
    color: #111827;
    font-size: 1.28rem;
    font-weight: 900;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section legend {
    display: none;
}

.safety-summary-form {
    display: grid;
    gap: 14px;
}

.safety-summary-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    border: 1px solid #eadff7;
    border-radius: 8px;
    background: #ffffff;
}

.safety-summary-scroll-top [data-summary-scroll-spacer] {
    height: 1px;
}

.safety-summary-scroll-top::-webkit-scrollbar,
.safety-summary-table-wrap::-webkit-scrollbar,
.safety-summary-scroll-text::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.safety-summary-scroll-top::-webkit-scrollbar-track,
.safety-summary-table-wrap::-webkit-scrollbar-track,
.safety-summary-scroll-text::-webkit-scrollbar-track {
    background: #f3eef8;
    border-radius: 999px;
}

.safety-summary-scroll-top::-webkit-scrollbar-thumb,
.safety-summary-table-wrap::-webkit-scrollbar-thumb,
.safety-summary-scroll-text::-webkit-scrollbar-thumb {
    background: #a973cf;
    border-radius: 999px;
}

.safety-summary-scroll-top::-webkit-scrollbar-thumb:hover,
.safety-summary-table-wrap::-webkit-scrollbar-thumb:hover,
.safety-summary-scroll-text::-webkit-scrollbar-thumb:hover {
    background: #8e57b8;
}

.safety-summary-table-wrap {
    max-height: 76vh;
    overflow: auto;
    scrollbar-color: #a973cf #f3eef8;
    scrollbar-width: thin;
}

.safety-summary-table {
    min-width: 3200px;
    table-layout: fixed;
}

.safety-summary-table th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #f2d7f8;
    text-align: center;
}

.safety-summary-table th,
.safety-summary-table td {
    padding: 12px 14px;
    vertical-align: top;
}

.safety-summary-table .sticky-col {
    position: sticky;
    z-index: 10;
    background: #ffffff;
}

.safety-summary-table thead .sticky-col {
    z-index: 20;
    background: #c79be8;
}

.safety-summary-table .sticky-col-wp-id {
    left: 0;
    width: 150px;
    min-width: 150px;
    font-family: Consolas, monospace;
}

.safety-summary-table .sticky-col-wp-name {
    left: 150px;
    width: 320px;
    min-width: 320px;
    font-weight: 700;
}

.safety-summary-table th:nth-child(3),
.safety-summary-table td:nth-child(3) {
    width: 420px;
}

.safety-summary-table th:nth-child(4),
.safety-summary-table td:nth-child(4) {
    width: 180px;
}

.safety-summary-table th:nth-child(5),
.safety-summary-table td:nth-child(5),
.safety-summary-table th:nth-child(6),
.safety-summary-table td:nth-child(6) {
    width: 220px;
}

.safety-summary-table th:nth-child(7),
.safety-summary-table td:nth-child(7),
.safety-summary-table th:nth-child(8),
.safety-summary-table td:nth-child(8),
.safety-summary-table th:nth-child(9),
.safety-summary-table td:nth-child(9) {
    width: 260px;
}

.safety-summary-table th:nth-child(n+10):nth-child(-n+15),
.safety-summary-table td:nth-child(n+10):nth-child(-n+15) {
    width: 170px;
}

.safety-summary-table th:nth-child(n+16),
.safety-summary-table td:nth-child(n+16) {
    width: 230px;
}

.safety-summary-table input,
.safety-summary-table select,
.safety-summary-table textarea {
    width: 100%;
    border: 1px solid #d7cbe7;
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
}

.safety-summary-table textarea {
    min-height: 92px;
    resize: vertical;
}

.safety-summary-table input[readonly],
.safety-summary-table select:disabled,
.safety-summary-table input:disabled,
.safety-summary-table textarea:disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.safety-summary-scroll-text {
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-line;
}

.safety-project-plan-form {
    display: grid;
    gap: 14px;
}

.safety-project-plan-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.safety-project-plan-table-wrap::-webkit-scrollbar-track {
    background: #f3eef8;
    border-radius: 999px;
}

.safety-project-plan-table-wrap::-webkit-scrollbar-thumb {
    background: #a973cf;
    border-radius: 999px;
}

.safety-project-plan-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #8e57b8;
}

.safety-project-plan-card {
    border: 1px solid #eadff7;
    border-radius: 8px;
    padding: 24px 24px 10px;
    background: #ffffff;
}

.safety-project-plan-card h3 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 1.22rem;
    font-weight: 800;
}

.safety-project-plan-card h4 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.safety-project-plan-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.safety-project-plan-grid label {
    display: grid;
    gap: 8px;
    color: #111827;
    font-weight: 700;
}

.safety-project-plan-grid input,
.safety-project-plan-grid select {
    width: 100%;
    min-height: 54px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 18px;
    color: #111827;
    font: inherit;
    font-weight: 600;
}

.safety-project-plan-grid input::placeholder {
    color: #9ca3af;
}

.safety-project-plan-grid select:invalid {
    color: #9ca3af;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section {
    gap: 20px;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section legend {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section label {
    display: grid;
    gap: 8px;
    color: #111827;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section label > span {
    color: #111827;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section input,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section select,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section textarea {
    width: 100%;
    min-height: 54px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 18px;
    color: #111827;
    font: inherit;
    font-weight: 600;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section textarea {
    min-height: 110px;
    padding-top: 14px;
    resize: vertical;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section input::placeholder,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section textarea::placeholder {
    color: #9ca3af;
}

.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section input:disabled,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section select:disabled,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section textarea:disabled,
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section input[readonly],
.traceability-instance-panel[data-instance-panel="safety-plan"] .seooc-section textarea[readonly] {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.safety-project-plan-add-actions {
    justify-content: flex-start;
    margin-top: 24px;
}

.safety-project-plan-add-actions .btn {
    min-width: 94px;
}

.safety-project-plan-divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0 26px;
}

.safety-project-plan-table-wrap {
    max-height: 70vh;
    overflow: auto;
    scrollbar-color: #a973cf #f3eef8;
    scrollbar-width: thin;
}

.safety-project-plan-table {
    min-width: 1180px;
    table-layout: fixed;
}

.safety-project-plan-table th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #c7b1df;
    text-align: left;
    color: #111827;
    font-weight: 800;
}

.safety-project-plan-table th,
.safety-project-plan-table td {
    padding: 14px 14px;
    vertical-align: middle;
    border: 1px solid #e5e7eb;
}

.safety-project-plan-table th:nth-child(1),
.safety-project-plan-table td:nth-child(1) {
    width: 150px;
}

.safety-project-plan-table th:nth-child(2),
.safety-project-plan-table td:nth-child(2) {
    width: 300px;
}

.safety-project-plan-table th:nth-child(3),
.safety-project-plan-table td:nth-child(3),
.safety-project-plan-table th:nth-child(4),
.safety-project-plan-table td:nth-child(4) {
    width: 210px;
}

.safety-project-plan-table th:nth-child(5),
.safety-project-plan-table td:nth-child(5),
.safety-project-plan-table th:nth-child(6),
.safety-project-plan-table td:nth-child(6) {
    width: 170px;
}

.safety-project-plan-table th:nth-child(7),
.safety-project-plan-table td:nth-child(7) {
    width: 240px;
}

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

.safety-project-plan-table input,
.safety-project-plan-table select {
    width: 100%;
    border: 1px solid #d7cbe7;
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
}

.safety-project-plan-table input:disabled,
.safety-project-plan-table select:disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.safety-project-plan-new-row td {
    background: #f8fafc;
}

.safety-project-plan-save-cell {
    display: grid;
    gap: 10px;
}

.safety-project-plan-save-button {
    width: 100%;
}

.project-plan-key-error {
    min-height: 18px;
    margin-top: 4px;
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 700;
}

.border-red-500 {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}


.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;
}

.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));
}

/* Source-aligned Work Products UI */
.traceability-browser {
    min-height: calc(100vh - 112px);
    background:
        radial-gradient(1000px 500px at 20% 10%, rgba(92, 190, 246, 0.22), transparent 60%),
        linear-gradient(180deg, #644572 0%, #716777 50%, #c89ce2 100%);
}

.traceability-types,
.traceability-instances {
    background: #ffffff;
}

.workspace-tree-panel {
    padding: 14px;
}

.workspace-tree-panel::before {
    content: "Workspaces";
    display: block;
    margin: 0 0 14px;
    color: #5B2D8B;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.workspace-tree-panel .workspace-map-title,
.workspace-tree-panel .workspace-map-item,
.workspace-tree-panel .workspace-map-link {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #5B2D8B;
    font-size: 14px;
    font-weight: 800;
    box-shadow: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workspace-tree-panel .workspace-map-title:hover,
.workspace-tree-panel .workspace-map-title:focus-visible,
.workspace-tree-panel .workspace-map-item:hover,
.workspace-tree-panel .workspace-map-item:focus-visible,
.workspace-tree-panel .workspace-map-link:hover,
.workspace-tree-panel .workspace-map-link:focus-visible {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.22);
    transform: translateY(-2px);
    outline: none;
}

.workspace-tree-panel .workspace-map-title.active,
.workspace-tree-panel .workspace-map-item.active,
.workspace-tree-panel .workspace-map-link.active {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    color: #5B2D8B;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.25);
}

.traceability-instances {
    padding: 14px 22px 24px;
}

.traceability-instance-panel {
    color: #111827;
}

.traceability-instance-panel .section-head h2,
.traceability-instance-panel h1,
.traceability-instance-panel h2,
.traceability-instance-panel h3,
.traceability-instance-panel h4 {
    color: #111827;
    font-weight: 800;
}

.seooc-page-tabs,
.block-list-subtabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.seooc-page-tab {
    border: 1px solid #d8b4fe;
    border-radius: 6px;
    padding: 7px 13px;
    background: #faf5ff;
    color: #5B2D8B;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}

.seooc-page-tab:hover,
.seooc-page-tab:focus-visible {
    border-color: #d8b4fe;
    background: #f3e8ff;
    color: #5B2D8B;
    box-shadow: none;
    transform: none;
    outline: none;
}

.seooc-page-tab.active {
    border-color: #6d28d9;
    background: #7c3aed;
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.traceability-instance-panel .seooc-page-panel,
.traceability-instance-panel .static-guidance-panel,
.traceability-instance-panel .safety-project-plan-card,
.traceability-instance-panel .block-diagram-panel,
.traceability-instance-panel .attribute-panel {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(163, 89, 89, 0.08);
}

.traceability-instance-panel .seooc-page-panel {
    padding: 20px;
}

.traceability-instance-panel .static-guidance-panel {
    padding: 20px;
}

.traceability-instance-panel .form,
.traceability-instance-panel .seooc-form,
.traceability-instance-panel .safety-tailoring-form,
.traceability-instance-panel .safety-confirmation-form,
.traceability-instance-panel .safety-summary-form,
.traceability-instance-panel .safety-project-plan-form {
    color: #111827;
}

.traceability-instance-panel .seooc-section {
    border: 0;
    padding: 0;
    background: transparent;
}

.traceability-instance-panel label,
.traceability-instance-panel .seooc-section label,
.traceability-instance-panel .safety-project-plan-grid label {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.traceability-instance-panel label > span,
.traceability-instance-panel .seooc-section label > span,
.traceability-instance-panel .safety-project-plan-grid label > span {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.traceability-instance-panel input,
.traceability-instance-panel textarea,
.traceability-instance-panel select,
.traceability-instance-panel .table-input,
.traceability-instance-panel .table-textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 14px 18px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    box-sizing: border-box;
}

.traceability-instance-panel textarea,
.traceability-instance-panel .table-textarea {
    min-height: 90px;
    resize: vertical;
}

.traceability-instance-panel select {
    cursor: pointer;
}

.traceability-instance-panel input::placeholder,
.traceability-instance-panel textarea::placeholder {
    color: #c9c7c7;
}

.traceability-instance-panel input:read-only,
.traceability-instance-panel textarea:read-only,
.traceability-instance-panel select:disabled,
.traceability-instance-panel input:disabled,
.traceability-instance-panel textarea:disabled,
.traceability-instance-panel .is-disabled {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
}

.traceability-instance-panel .table-wrap {
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 8px 24px rgba(163, 89, 89, 0.08);
}

.traceability-instance-panel table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.traceability-instance-panel thead,
.traceability-instance-panel table thead,
.traceability-instance-panel table thead tr {
    background: linear-gradient(90deg, #c2a8dd, #c9c2db);
}

.traceability-instance-panel table thead th,
.traceability-instance-panel table th {
    border: 1px solid #e5e7eb;
    padding: 12px;
    background: transparent;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    vertical-align: middle;
}

.traceability-instance-panel table tbody tr {
    background: #ffffff;
    transition: background 0.2s ease;
}

.traceability-instance-panel table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.traceability-instance-panel table tbody tr:hover {
    background: #ede9fe;
}

.traceability-instance-panel table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    vertical-align: top;
}

.traceability-instance-panel .btn,
.traceability-instance-panel button.btn {
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 800;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.traceability-instance-panel .btn.primary {
    background: #5B2D8B;
    color: #ffffff;
}

.traceability-instance-panel .btn.primary:hover,
.traceability-instance-panel .btn.primary:focus-visible {
    background: #8B5CF6;
    color: #ffffff;
    outline: none;
}

.traceability-instance-panel .btn.hara-export-button {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.traceability-instance-panel .btn.hara-export-button:hover,
.traceability-instance-panel .btn.hara-export-button:focus-visible {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    outline: none;
}

.hara-export-tab-form {
    margin: 0;
}

.seooc-page-tab.hara-export-tab-button {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.seooc-page-tab.hara-export-tab-button:hover,
.seooc-page-tab.hara-export-tab-button:focus-visible {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    outline: none;
}

.traceability-instance-panel .btn.secondary {
    border: 1px solid #d1d5db;
    background: #e5e7eb;
    color: #111827;
}

.traceability-instance-panel .btn.secondary:hover,
.traceability-instance-panel .btn.secondary:focus-visible {
    background: #d1d5db;
    color: #111827;
}

.traceability-instance-panel .btn.danger,
.traceability-instance-panel .danger.light {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

.traceability-instance-panel button:disabled,
.traceability-instance-panel .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Professional workspace dropdown list */
.workspace-tree-panel .workspace-map-group {
    gap: 6px;
}

.workspace-tree-panel .workspace-map-branches {
    gap: 6px;
    margin: 4px 0 6px;
    border-left: 0;
    border-radius: 0;
    padding: 2px 0 2px 10px;
    background: transparent;
    box-shadow: none;
}

.workspace-tree-panel .workspace-map-item,
.workspace-tree-panel .workspace-map-link {
    position: relative;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 12px 9px 16px;
    background: #fbf9ff;
    color: #4b217e;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
}

.workspace-tree-panel .workspace-map-item::before,
.workspace-tree-panel .workspace-map-link::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 6px;
    display: block;
    width: 3px;
    height: auto;
    border-radius: 999px;
    background: #d8b4fe;
}

.workspace-tree-panel .workspace-map-item:hover,
.workspace-tree-panel .workspace-map-item:focus-visible,
.workspace-tree-panel .workspace-map-link:hover,
.workspace-tree-panel .workspace-map-link:focus-visible {
    border-color: #eadcff;
    background: #f3e8ff;
    color: #4b217e;
    box-shadow: 0 6px 16px rgba(76, 29, 149, 0.08);
    transform: translateX(2px);
}

.workspace-tree-panel .workspace-map-item.active,
.workspace-tree-panel .workspace-map-link.active {
    border-color: #d8b4fe;
    background: #ede9fe;
    color: #4b217e;
    box-shadow: 0 7px 18px rgba(76, 29, 149, 0.1);
}

.workspace-tree-panel .workspace-map-item.active::before,
.workspace-tree-panel .workspace-map-link.active::before {
    background: #7c3aed;
}

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