:root {
    --ph-blue-900: #012a57;
    --ph-blue-700: #013571;
    --ph-blue-500: #2f5d8f;
    --ph-orange-500: #fe7701;
    --ph-orange-300: #ffab5a;
    --surface-main: #f4f7fb;
    --surface-card: #ffffff;
    --text-main: #11233b;
    --text-soft: #5a6b82;
    --border-soft: #dbe5f1;
    --sidebar-gradient: radial-gradient(circle at 12% 8%, rgba(254, 119, 1, 0.28), transparent 38%), linear-gradient(160deg, #01244d 0%, #013571 48%, #001f47 100%);
    --font-heading: "Montserrat Alternates", "Segoe UI", sans-serif;
    --font-body: "Gotham Rounded", "Nunito", "Segoe UI", sans-serif;
    --bs-primary: var(--ph-blue-700);
    --bs-primary-rgb: 1, 53, 113;
    --bs-secondary: var(--ph-orange-500);
    --bs-secondary-rgb: 254, 119, 1;
    --bs-body-bg: var(--surface-main);
    --bs-body-color: var(--text-main);
    --bs-link-color: var(--ph-blue-700);
    --bs-link-hover-color: #001f47;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    background:
        radial-gradient(circle at 92% 4%, rgba(254, 119, 1, 0.14), transparent 34%),
        radial-gradient(circle at 12% 86%, rgba(1, 53, 113, 0.1), transparent 40%),
        linear-gradient(180deg, #f7f9fd 0%, #f1f6fc 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.sidebar-brand,
.brand-company,
.auth-brand-system {
    font-family: var(--font-heading);
}

.app-shell {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 300px;
    background: var(--sidebar-gradient);
    color: #ffffff;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 45px rgba(1, 32, 73, 0.28);
    height: 100vh;
    overflow: hidden;
    transition: width 0.22s ease, padding 0.22s ease;
}

.sidebar-brand-panel {
    flex-shrink: 0;
    padding: 1.4rem 1.2rem 0.9rem;
}

.sidebar-footer-panel {
    flex-shrink: 0;
    padding: 0.85rem 1.2rem 1.4rem;
}

.sidebar-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1.2rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 171, 90, 0.72) rgba(255, 255, 255, 0.1);
}

.sidebar-scroll-area::-webkit-scrollbar {
    width: 10px;
}

.sidebar-scroll-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 171, 90, 0.82), rgba(254, 119, 1, 0.56));
    border: 2px solid rgba(1, 36, 77, 0.78);
    border-radius: 999px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 190, 124, 0.92), rgba(254, 119, 1, 0.72));
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: justify-content 0.2s ease;
}

.brand-home-link {
    color: inherit;
    text-decoration: none;
    border-radius: 16px;
}

.brand-home-link:hover,
.brand-home-link:focus {
    color: inherit;
    text-decoration: none;
}

.brand-home-link:focus-visible {
    outline: 2px solid rgba(255, 171, 90, 0.95);
    outline-offset: 4px;
}

.brand-logo {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 24, 53, 0.35);
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
}

.brand-copy {
    min-width: 0;
}

.brand-company {
    margin: 0;
    line-height: 1.25;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.86);
}

.sidebar-brand {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.66rem 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

.sidebar .nav-link i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(110deg, rgba(254, 119, 1, 0.26), rgba(255, 255, 255, 0.14));
    transform: translateX(3px);
    box-shadow: inset 0 0 0 1px rgba(255, 173, 98, 0.4);
}

.sidebar-ergonomics {
    display: flex;
    flex-direction: column;
}

.sidebar-ergonomics-toggle {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    width: 100%;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
}

.sidebar-ergonomics-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar-ergonomics-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.sidebar-ergonomics-title i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-ergonomics-chevron {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.sidebar-ergonomics.open .sidebar-ergonomics-chevron {
    transform: rotate(180deg);
}

.sidebar-subitem {
    display: none;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 10px;
    margin-top: 0.15rem;
    padding: 0.5rem 0.85rem 0.5rem 1.95rem;
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-subitem i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-subitem p {
    margin-left: 0.15rem;
    white-space: nowrap;
}

.sidebar-parent-icon {
    display: none !important;
}

.sidebar-collapse-toggle {
    position: absolute;
    top: 1.6rem;
    left: calc(300px - 13px);
    width: 26px;
    height: 42px;
    border: 1px solid #c9d9eb;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ph-blue-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(1, 53, 113, 0.16);
    z-index: 10;
    transition: left 0.22s ease, background 0.2s ease, color 0.2s ease;
}

.sidebar-collapse-toggle:hover {
    background: #f4f9ff;
    color: #001f47;
}

.sidebar-ergonomics.open .sidebar-subitem {
    display: flex;
}

.sidebar-subitem:hover,
.sidebar-subitem.active {
    background: linear-gradient(110deg, rgba(254, 119, 1, 0.26), rgba(255, 255, 255, 0.14));
    box-shadow: inset 0 0 0 1px rgba(255, 173, 98, 0.4);
    color: #ffffff;
}

.main-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    background: transparent;
}

.app-shell.sidebar-collapsed .sidebar {
    width: 92px;
}

.app-shell.sidebar-collapsed .sidebar-collapse-toggle {
    left: calc(92px - 13px);
}

.app-shell.sidebar-collapsed .sidebar-brand-panel {
    padding: 1.2rem 0.5rem 0.9rem;
}

.app-shell.sidebar-collapsed .sidebar-footer-panel {
    padding: 0.85rem 0.5rem 1.2rem;
}

.app-shell.sidebar-collapsed .sidebar-scroll-area {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.app-shell.sidebar-collapsed .brand-block {
    justify-content: center;
}

.app-shell.sidebar-collapsed .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .sidebar-profile,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .sidebar-subitem p,
.app-shell.sidebar-collapsed .sidebar-logout-label {
    display: none !important;
}

.app-shell.sidebar-collapsed .sidebar .nav-link,
.app-shell.sidebar-collapsed .sidebar-ergonomics-toggle,
.app-shell.sidebar-collapsed .sidebar-subitem,
.app-shell.sidebar-collapsed .btn.btn-outline-light {
    justify-content: center;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.app-shell.sidebar-collapsed .sidebar .nav-link i,
.app-shell.sidebar-collapsed .sidebar-subitem i,
.app-shell.sidebar-collapsed .sidebar-ergonomics-title i {
    width: auto;
    font-size: 1.08rem;
}

.app-shell.sidebar-collapsed .sidebar-ergonomics-title {
    justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-ergonomics-toggle {
    justify-content: space-between;
    padding-left: 0.34rem;
    padding-right: 0.42rem;
}

.app-shell.sidebar-collapsed .sidebar-ergonomics-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.92;
}

.app-shell.sidebar-collapsed .sidebar-subitem {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    padding-left: 0.72rem;
    padding-right: 0.5rem;
    gap: 0;
    background: transparent;
    border-color: transparent;
}

.app-shell.sidebar-collapsed .sidebar-subitem i {
    margin-left: 0.28rem;
}

.app-shell.sidebar-collapsed .btn.btn-outline-light i {
    margin-right: 0 !important;
}

.topbar {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(1, 53, 113, 0.12);
    backdrop-filter: blur(10px);
    padding: 0.9rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-with-tool {
    padding: 0;
    padding-left: 26px;
}

.topbar-brand {
    display: grid;
    gap: 0.1rem;
}

.topbar-brand-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid #dbe5f1;
}

.topbar-company {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.topbar h6 {
    color: var(--ph-blue-900);
}

.tool-topbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    min-height: 82px;
}

.tool-topbar-panel {
    min-width: 0;
    padding: 0.42rem 0.95rem;
    display: grid;
    align-content: center;
    gap: 0.08rem;
    position: relative;
}

.tool-topbar-panel::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0.65rem;
    bottom: 0.65rem;
    width: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

.tool-topbar-panel.is-pending::before {
    background: var(--ph-orange-500);
}

.tool-topbar-panel.is-ok::before,
.tool-topbar-panel.is-risk-low::before {
    background: #2f9e44;
}

.tool-topbar-panel.is-risk-medium::before {
    background: #d9a406;
}

.tool-topbar-panel.is-risk-high::before,
.tool-topbar-panel.is-error::before {
    background: #cc2323;
}

.tool-topbar-panel-tool {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    align-content: center;
    column-gap: 0.62rem;
    padding-left: 0.95rem;
}

.tool-topbar-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.tool-topbar-symbol {
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #eef6ff;
    color: var(--ph-blue-700);
    border: 1px solid rgba(1, 53, 113, 0.14);
    font-size: 1.12rem;
}

.tool-topbar-copy {
    min-width: 0;
}

.tool-topbar-kicker {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.tool-topbar-title,
.tool-topbar-value {
    color: var(--ph-blue-900);
    font-weight: 800;
    line-height: 1.1;
}

.tool-topbar-value {
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-topbar-subtitle,
.tool-topbar-status {
    color: var(--text-soft);
    font-size: 0.76rem;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-topbar-status {
    font-weight: 700;
}

.tool-topbar-help {
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(1, 53, 113, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ph-blue-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tool-topbar-help:hover,
.tool-topbar-help:focus {
    color: #001f47;
    border-color: rgba(254, 119, 1, 0.45);
    box-shadow: 0 0 0 3px rgba(254, 119, 1, 0.12);
}

.tool-topbar-panel.is-empty .tool-topbar-value,
.tool-topbar-panel.is-empty .tool-topbar-subtitle,
.tool-topbar-panel.is-empty .tool-topbar-status {
    color: #6b7280;
}

.tool-topbar-panel.is-pending .tool-topbar-value,
.tool-topbar-panel.is-pending .tool-topbar-status {
    color: #9a4d00;
}

.tool-topbar-panel.is-ok .tool-topbar-value,
.tool-topbar-panel.is-ok .tool-topbar-status,
.tool-topbar-panel.is-risk-low .tool-topbar-value {
    color: #1c6e37;
}

.tool-topbar-panel.is-risk-medium .tool-topbar-value {
    color: #8a6a00;
}

.tool-topbar-panel.is-risk-high .tool-topbar-value,
.tool-topbar-panel.is-error .tool-topbar-value,
.tool-topbar-panel.is-error .tool-topbar-status {
    color: #b02a37;
}

.card {
    border-radius: 18px;
    border: 1px solid #e4ecf5;
    box-shadow: 0 14px 26px rgba(3, 41, 84, 0.08);
}

.card-kpi {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 1.1rem 2rem rgba(1, 44, 94, 0.14) !important;
}

.dashboard-general {
    --dashboard-card-radius: 22px;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(1, 53, 113, 0.1);
    border-radius: 26px;
    background:
        radial-gradient(circle at 88% 18%, rgba(254, 119, 1, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 255, 0.94));
    box-shadow: 0 20px 45px rgba(1, 32, 73, 0.08);
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(1, 53, 113, 0.08);
    color: var(--ph-blue-700);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.9rem;
}

.dashboard-kpi-card,
.dashboard-category-card,
.dashboard-panel {
    border-radius: var(--dashboard-card-radius);
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 112px;
    padding: 1rem;
    border: 1px solid rgba(1, 53, 113, 0.08);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 35px rgba(1, 32, 73, 0.07);
}

.dashboard-kpi-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--ph-blue-700), #0f8fa8);
    box-shadow: 0 10px 20px rgba(1, 53, 113, 0.2);
}

.dashboard-kpi-card h4,
.dashboard-category-card h3 {
    font-weight: 800;
}

.dashboard-category-card {
    min-height: 132px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    color: #ffffff;
    background:
        radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.26), transparent 32%),
        linear-gradient(145deg, var(--dashboard-color), #012a57);
    box-shadow: 0 18px 38px rgba(1, 32, 73, 0.12);
}

.dashboard-category-card p {
    opacity: 0.88;
    font-weight: 700;
}

.dashboard-category-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.dashboard-panel {
    overflow: hidden;
}

.dashboard-panel .card-body {
    background: rgba(255, 255, 255, 0.94);
}

.dashboard-production-chart {
    height: 275px;
    display: grid;
    grid-template-columns: repeat(14, minmax(34px, 1fr));
    gap: 0.55rem;
    align-items: end;
}

.dashboard-production-day {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 0.35rem;
    align-items: end;
    text-align: center;
}

.dashboard-production-track {
    height: 190px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(180deg, #eef6ff, #e4edf8);
    overflow: hidden;
}

.dashboard-production-track span {
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #fe7701, #0f8fa8);
    box-shadow: 0 -10px 24px rgba(15, 143, 168, 0.18);
}

.dashboard-production-day strong {
    font-size: 0.86rem;
}

.dashboard-production-day small {
    color: var(--text-soft);
    font-size: 0.72rem;
}

.dashboard-category-summary {
    display: grid;
    gap: 0.7rem;
}

.dashboard-summary-row,
.dashboard-legend-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.dashboard-summary-row {
    padding: 0.78rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fbff;
}

.dashboard-summary-row span,
.dashboard-legend-row span {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: var(--dashboard-color);
}

.dashboard-donut-card .card-body {
    display: flex;
    flex-direction: column;
}

.dashboard-donut-wrap {
    display: grid;
    place-items: center;
}

.dashboard-donut {
    width: 174px;
    height: 174px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(1, 53, 113, 0.06), 0 18px 30px rgba(1, 32, 73, 0.08);
    transition: filter 0.18s ease, transform 0.18s ease;
}

.dashboard-donut-card.is-highlighted .dashboard-donut {
    filter: saturate(1.18) contrast(1.05);
    transform: scale(1.025);
}

.dashboard-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(1, 53, 113, 0.08);
}

.dashboard-donut > div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.dashboard-donut strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.dashboard-donut small {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-donut-legend {
    display: grid;
    gap: 0.45rem;
    max-height: 172px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.dashboard-legend-row {
    font-size: 0.84rem;
    border-radius: 12px;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.dashboard-legend-row:hover,
.dashboard-legend-row:focus,
.dashboard-legend-row.is-active {
    background: #f1f7ff;
    color: var(--ph-blue-900);
    outline: 0;
    transform: translateX(2px);
}

.dashboard-empty-note,
.dashboard-empty-state {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.dashboard-empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    background: #f8fbff;
}

@media (max-width: 1400px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-production-chart {
        grid-template-columns: repeat(7, minmax(34px, 1fr));
        height: auto;
    }

    .dashboard-production-track {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-production-chart {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-production-day {
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto;
        align-items: center;
        text-align: left;
    }

    .dashboard-production-track {
        height: 18px;
        align-items: stretch;
        justify-content: flex-start;
    }

    .dashboard-production-track span {
        height: 100% !important;
        width: var(--dashboard-bar-size, 0%);
        border-radius: 999px;
    }
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(1, 53, 113, 0.12), transparent 36%),
        radial-gradient(circle at 88% 80%, rgba(254, 119, 1, 0.16), transparent 38%);
}

.login-card {
    border-radius: 22px;
    overflow: hidden;
}

.auth-brand-logo {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid #dce8f5;
    box-shadow: 0 12px 24px rgba(1, 42, 87, 0.2);
}

.auth-brand-company {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
}

.auth-brand-system {
    color: var(--ph-blue-900);
    font-weight: 700;
}

.thumb-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d7e1ee;
}

.preview-img {
    max-width: 220px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e1e8f2;
}

.table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #526985;
}

.btn {
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(1, 37, 79, 0.76);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.report-context-block {
    border-left: 5px solid var(--ph-orange-500);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.report-context-block h5 {
    font-weight: 700;
    color: var(--ph-blue-900);
}

.report-context-block .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334a67;
    margin-bottom: 0.35rem;
}

.report-context-block .form-control.report-field-locked {
    background-color: transparent !important;
    border-color: transparent;
    box-shadow: none;
    color: #1f3858;
    cursor: default;
}

.report-context-block .form-control.report-field-locked::placeholder {
    color: #6f7f94;
}

.report-context-block .form-control.report-field-locked:focus {
    background-color: transparent !important;
    border-color: transparent;
    box-shadow: none;
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        gap: 1rem;
        height: auto;
        overflow: visible;
    }

    .brand-logo {
        width: 58px;
        height: 58px;
    }

    .main-content {
        height: auto;
        overflow: visible;
    }

    .topbar {
        position: static;
    }

    .topbar-with-tool {
        padding-left: 0;
    }

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

    .sidebar-collapse-toggle {
        display: none;
    }
}

@media (max-width: 576px) {
    .tool-topbar {
        grid-template-columns: 1fr;
    }

    .tool-topbar-panel {
        border-bottom: 1px solid rgba(1, 53, 113, 0.12);
    }

    .tool-topbar-panel:last-child {
        border-bottom: 0;
    }
}

.reba-app {
    --reba-border: #e5eaf2;
    --reba-bg: #f8fafc;
}

.reba-group-card {
    border-radius: 14px;
}

.reba-group-card .card-body {
    padding: 0.9rem;
}

.reba-option-btn {
    border: 1px solid var(--reba-border);
    background: var(--reba-bg);
    color: #1e293b;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.reba-option-btn:hover {
    border-color: #8cb2d8;
    background: #eef5fc;
}

.reba-option-btn.active {
    border-color: #0d6efd;
    background: #d9e9ff;
    color: #0b3f88;
}

.reba-option-value {
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    background: #d6e1ee;
    color: #0f172a;
    margin-top: 0.05rem;
}

.reba-option-btn.active .reba-option-value {
    background: #0d6efd;
    color: #fff;
}

.reba-option-label {
    font-size: 0.84rem;
    line-height: 1.25;
}

.reba-result-card {
    position: sticky;
    top: 1rem;
    border-radius: 14px;
}

.reba-code {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    letter-spacing: 0.03em;
    word-break: break-all;
}

.reba-score-badge {
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d0d8e4;
    font-weight: 700;
}

.reba-score-badge.neutral {
    background: #eef2f7;
    color: #1f2937;
}

.reba-score-badge.green_dark {
    background: #0b7031;
    color: #fff;
}

.reba-score-badge.green_light {
    background: #94d36a;
    color: #152617;
}

.reba-score-badge.yellow {
    background: #f2da48;
    color: #312c0d;
}

.reba-score-badge.orange {
    background: #dd7d22;
    color: #fff;
}

.reba-score-badge.red {
    background: #cc2323;
    color: #fff;
}

.reba-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    max-height: 330px;
    overflow: auto;
}

.reba-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed #dbe3ee;
    font-size: 0.83rem;
}

@media (max-width: 1200px) {
    .reba-result-card {
        position: static;
    }
}

/* REBA layout v2: 3 colunas + subcolunas */
.reba-app {
    --reba-shell: #1f2a3d;
    --reba-shell-border: #33475f;
    --reba-tile: #1c2738;
    --reba-tile-border: #344a63;
    --reba-action: #0d1c34;
    --reba-action-border: #3f5777;
    --reba-action-hover: #1e3554;
    --reba-text-main: #f7fafc;
    --reba-text-soft: #c8d7ea;
}

.reba-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.reba-section-card {
    background: var(--reba-shell);
    border: 1px solid var(--reba-shell-border);
    border-radius: 14px;
    padding: 0.8rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.reba-section-title {
    color: var(--reba-text-main);
    font-size: 1.04rem;
    margin: 0 0 0.7rem;
    font-weight: 700;
}

.reba-section-groups {
    display: grid;
    grid-template-columns: repeat(var(--subcols, 1), minmax(0, 1fr));
    gap: 0.7rem;
}

.reba-group-card {
    background: var(--reba-tile);
    border: 1px solid var(--reba-tile-border);
    border-radius: 12px;
    padding: 0.6rem;
}

.reba-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reba-group-header h6 {
    color: var(--reba-text-main);
    font-size: 0.98rem;
}

.reba-group-badge {
    min-width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #334963;
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.85rem;
}

.reba-image-wrap {
    border: 1px dashed #4d6480;
    border-radius: 10px;
    background: #0f1e35;
    min-height: 132px;
    display: grid;
    place-items: center;
    padding: 0.35rem;
    margin-bottom: 0.55rem;
}

.reba-image {
    max-width: 100%;
    max-height: 124px;
    object-fit: contain;
}

.reba-options-wrap {
    display: grid;
    gap: 0.42rem;
}

.reba-option-btn {
    border: 1px solid var(--reba-action-border);
    background: var(--reba-action);
    color: #f8fafc;
    border-radius: 9px;
    text-align: left;
    padding: 0.52rem 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.reba-option-btn:hover {
    background: var(--reba-action-hover);
    border-color: #6d8cb4;
}

.reba-option-btn.active {
    background: #1f4d8b;
    border-color: #78a9df;
}

.reba-option-value {
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    background: #3a4f6e;
    color: #eff6ff;
    margin-top: 0.04rem;
}

.reba-option-btn.active .reba-option-value {
    background: #f8fafc;
    color: #16447c;
}

.reba-option-label {
    font-size: 0.95rem;
    line-height: 1.22;
}

.reba-hint-text {
    margin: 0.55rem 0 0;
    color: var(--reba-text-soft);
    font-size: 0.78rem;
}

.reba-result-card {
    border-radius: 14px;
}

.reba-result-card .card-body {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
}

@media (max-width: 1600px) {
    .reba-sections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .reba-sections-grid {
        grid-template-columns: 1fr;
    }

    .reba-section-groups {
        grid-template-columns: 1fr;
    }
}

/* REBA a11y and interactions */
.reba-option-btn.active {
    background: #173f78;
    border-color: #9cc6ff;
    color: #ffffff;
    font-weight: 700;
}

.reba-option-btn.active .reba-option-label {
    color: #ffffff;
}

.reba-hash-card {
    background: #1f2a3d;
    border: 1px solid #4f6785;
    border-radius: 16px;
    padding: 0.9rem;
}

.reba-hash-card h6 {
    color: #f8fafc;
    font-size: 1.12rem;
    font-weight: 700;
}

.reba-hash-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(100%, 420px);
    aspect-ratio: 1 / 1;
}

.reba-hash-cell {
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    border: 2px solid #6d819a;
    background: #e9edf2;
    color: #0b1d3a;
    font-size: 2rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.reba-hash-cell.is-empty {
    color: transparent;
}

.reba-top-tools {
    align-self: flex-start;
}

.reba-top-preview {
    border: 1px solid #d5e1f0;
    border-radius: 10px;
    background: #f5f9ff;
    padding: 0.25rem 0.3rem;
    min-width: 118px;
}

.reba-top-preview-label {
    display: block;
    font-size: 0.62rem;
    color: #4b607c;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
    text-align: center;
}

.reba-hash-grid-top {
    grid-template-columns: repeat(3, 30px);
    grid-template-rows: repeat(3, 30px);
    width: fit-content;
    gap: 0.12rem;
    margin: 0 auto;
}

.reba-hash-cell-top {
    width: 30px;
    height: 30px;
    aspect-ratio: auto;
    border-width: 1px;
    border-radius: 6px;
    border-color: #6f86a3;
    background: #eef3fa;
    color: #0b1d3a;
    font-size: 0.62rem !important;
    font-weight: 700;
    line-height: 1;
}

.reba-hash-cell-top.is-empty {
    color: transparent;
    background: #eef3fa;
}

.reba-hide-figures .reba-image-wrap {
    display: none;
}

.reba-permission-list {
    max-height: 320px;
    overflow: auto;
}

.reba-permission-item {
    cursor: pointer;
}

@media (max-width: 1200px) {
    .reba-hash-cell {
        font-size: 1.75rem;
    }
}

@media (max-width: 700px) {
    .reba-hash-grid {
        gap: 0.45rem;
        width: 100%;
    }

    .reba-hash-cell {
        font-size: 1.5rem;
    }

    .reba-hash-grid-top {
        grid-template-columns: repeat(3, 30px);
        grid-template-rows: repeat(3, 30px);
        width: fit-content;
        gap: 0.12rem;
    }

    .reba-hash-cell-top {
        width: 30px;
        height: 30px;
        font-size: 0.62rem !important;
    }
}

.rosa-app {
    --rosa-shell: #1e2a3a;
    --rosa-shell-border: #3d526d;
    --rosa-tile: #1a2433;
    --rosa-tile-border: #3c516d;
    --rosa-text: #f8fafc;
    --rosa-soft: #c5d4e8;
}

.rosa-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.rosa-group-card {
    background: var(--rosa-shell);
    border: 1px solid var(--rosa-shell-border);
    border-radius: 14px;
    padding: 0.68rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.rosa-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.rosa-group-header h5 {
    color: var(--rosa-text);
    font-size: 1rem;
}

.rosa-subtotal-badge {
    min-width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    background: #3b516c;
    color: #f8fafc;
    font-size: 0.9rem;
}

.rosa-block-title {
    color: var(--rosa-soft);
    font-size: 0.76rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rosa-options-grid {
    display: grid;
    gap: 0.42rem;
}

.rosa-options-grid-base {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rosa-options-grid-optional {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rosa-option-item {
    min-width: 0;
}

.rosa-image-option {
    width: 100%;
    border: 1px solid #496181;
    border-radius: 10px;
    background: #122033;
    color: #f8fafc;
    padding: 0.36rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-height: 100%;
}

.rosa-image-option:hover {
    border-color: #89add8;
    background: #19314d;
}

.rosa-image-option.active {
    border-color: #9bccff;
    background: #224f88;
    box-shadow: inset 0 0 0 1px #d6e9ff;
}

.rosa-image-wrap {
    border-radius: 8px;
    border: 1px dashed #4c6280;
    background: #0f1b2d;
    min-height: 72px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.rosa-option-image {
    width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.rosa-option-topline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rosa-option-label {
    font-size: 0.75rem;
    line-height: 1.1;
    color: #f0f6ff;
}

.rosa-option-value {
    align-self: center;
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #193a63;
    background: #ebf4ff;
    flex-shrink: 0;
}

.rosa-duration-row {
    margin-top: 0.62rem;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

.rosa-duration-row .form-label {
    color: #d6e4f5;
    font-size: 0.82rem;
    font-weight: 700;
}

.rosa-duration-row .form-select {
    background: #f8fbff;
}

.rosa-result-card .card-body {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
}

.rosa-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.rosa-action-buttons .btn {
    flex: 1 1 170px;
}

.rosa-action-buttons .rosa-toggle-figures-action {
    flex-basis: 100%;
}

.rosa-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.rosa-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.rosa-score-badge {
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d0d8e4;
    font-weight: 700;
}

.rosa-score-badge.neutral {
    background: #eef2f7;
    color: #1f2937;
}

.rosa-score-badge.low {
    background: #94d36a;
    color: #1b2e1e;
}

.rosa-score-badge.medium {
    background: #f2da48;
    color: #312c0d;
}

.rosa-score-badge.high {
    background: #cc2323;
    color: #ffffff;
}

.rosa-tables-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.rosa-table-box {
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    padding: 0.7rem;
    background: #f8fbff;
}

.rosa-table-box h6 {
    font-size: 0.8rem;
    color: #4a5f7c;
    letter-spacing: 0.03em;
}

.rosa-table-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f2b52;
}

.rosa-hide-figures .rosa-image-wrap {
    display: none;
}

.rosa-app.rosa-compact .rosa-groups-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.rosa-app.rosa-compact .rosa-group-card {
    border-radius: 10px;
    padding: 0.5rem;
}

.rosa-app.rosa-compact .rosa-group-header {
    gap: 0.4rem;
    margin-bottom: 0.32rem;
}

.rosa-app.rosa-compact .rosa-group-header h5 {
    font-size: 0.82rem;
    line-height: 1.12;
}

.rosa-app.rosa-compact .rosa-subtotal-badge {
    min-width: 1.65rem;
    height: 1.65rem;
    font-size: 0.78rem;
}

.rosa-app.rosa-compact .rosa-block-title {
    font-size: 0.66rem;
    margin-bottom: 0.22rem;
}

.rosa-app.rosa-compact .rosa-options-grid {
    gap: 0.28rem;
}

.rosa-app.rosa-compact .rosa-options-grid-base,
.rosa-app.rosa-compact .rosa-options-grid-optional {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rosa-app.rosa-compact .rosa-image-wrap {
    display: none;
}

.rosa-app.rosa-compact .rosa-image-option {
    border-radius: 8px;
    padding: 0.28rem;
    gap: 0.18rem;
}

.rosa-app.rosa-compact .rosa-option-topline {
    align-items: flex-start;
    gap: 0.25rem;
}

.rosa-app.rosa-compact .rosa-option-label {
    font-size: 0.66rem;
    line-height: 1.05;
}

.rosa-app.rosa-compact .rosa-option-value {
    min-width: 1.08rem;
    height: 1.08rem;
    font-size: 0.62rem;
}

.rosa-app.rosa-compact .rosa-duration-row {
    grid-template-columns: 1fr;
    gap: 0.28rem;
    margin-top: 0.42rem;
}

.rosa-app.rosa-compact .rosa-duration-row .form-label {
    font-size: 0.7rem;
}

.rosa-app.rosa-compact .rosa-duration-row .form-select {
    font-size: 0.72rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

@media (max-width: 1450px) {
    .rosa-options-grid-base,
    .rosa-options-grid-optional {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .rosa-app.rosa-compact .rosa-groups-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .rosa-groups-grid {
        grid-template-columns: 1fr;
    }

    .rosa-app.rosa-compact .rosa-groups-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rosa-options-grid-base,
    .rosa-options-grid-optional {
        grid-template-columns: 1fr;
    }

    .rosa-duration-row {
        grid-template-columns: 1fr;
    }

    .rosa-tables-grid {
        grid-template-columns: 1fr;
    }
}

/* PH brand tune for assessment modules */
.reba-app {
    --reba-shell: #012f61;
    --reba-shell-border: #385f8f;
    --reba-tile: #01274f;
    --reba-tile-border: #36557d;
    --reba-action: #01396f;
    --reba-action-border: #4f79a7;
    --reba-action-hover: #0f4a86;
    --reba-text-main: #f7fafc;
    --reba-text-soft: #d4e1ef;
}

.reba-option-btn:hover {
    border-color: #ffbe84;
    background: #0f4f8f;
}

.reba-option-btn.active {
    background: #df6f00;
    border-color: #ffc993;
    color: #ffffff;
    font-weight: 700;
}

.reba-option-btn.active .reba-option-value {
    background: #ffffff;
    color: #8a4200;
}

.reba-hash-card {
    background: #012f61;
    border-color: #567ba7;
}

.reba-hash-cell {
    border-color: #7e9dc0;
    background: #f4f8ff;
    color: #08366d;
}

.reba-top-preview {
    border-color: #c8d9ec;
    background: #f7fbff;
}

.rosa-app {
    --rosa-shell: #012f61;
    --rosa-shell-border: #385f8f;
    --rosa-tile: #01274f;
    --rosa-tile-border: #36557d;
    --rosa-text: #f7fafc;
    --rosa-soft: #d4e1ef;
}

.rosa-image-option {
    border-color: #4f79a7;
    background: #01396f;
}

.rosa-image-option:hover {
    border-color: #ffbe84;
    background: #0f4f8f;
}

.rosa-image-option.active {
    border-color: #ffc993;
    background: #df6f00;
    box-shadow: inset 0 0 0 1px #ffe2c1;
}

.rosa-image-wrap {
    border-color: #4f79a7;
    background: #01274f;
}

.rosa-option-value {
    color: #8a4200;
    background: #ffe8d1;
}

/* KIM Puxa/Empurra */
.kim-pe-app {
    --kim-shell: #012f61;
    --kim-shell-border: #385f8f;
    --kim-tile: #01274f;
    --kim-tile-border: #36557d;
    --kim-text: #f7fafc;
    --kim-soft: #d4e1ef;
}

.kim-pe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.kim-pe-card {
    background: var(--kim-shell);
    border: 1px solid var(--kim-shell-border);
    border-radius: 14px;
    padding: 0.8rem;
}

.kim-pe-card-title {
    color: var(--kim-text);
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.kim-pe-option-row,
.kim-pe-option-col {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.kim-pe-option {
    border: 1px solid #4f79a7;
    border-radius: 8px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.35rem 0.55rem;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.kim-pe-option input {
    margin: 0;
}

.kim-pe-card .form-label {
    color: var(--kim-soft);
    font-size: 0.83rem;
    font-weight: 600;
}

.kim-pe-card .form-select {
    background: #f8fbff;
}

.kim-pe-image-grid {
    display: grid;
    gap: 0.45rem;
}

.kim-pe-image-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kim-pe-image-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kim-pe-image-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kim-pe-image-option {
    border: 1px solid #4f79a7;
    border-radius: 10px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.4rem;
    text-align: left;
    transition: border-color .2s ease, background-color .2s ease;
}

.kim-pe-image-option:hover {
    border-color: #ffbe84;
    background: #0f4f8f;
}

.kim-pe-image-option.active {
    border-color: #ffc993;
    background: #df6f00;
}

.kim-pe-image-wrap {
    border-radius: 8px;
    border: 1px dashed #4f79a7;
    background: #01274f;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kim-pe-image {
    width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.kim-pe-image-label {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.2;
}

.kim-pe-figure {
    margin: 0;
}

.kim-pe-subtotal {
    margin-top: 0.6rem;
    color: #ffecd8;
    font-size: 0.84rem;
}

.kim-pe-result-card .card-body {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
}

.kim-pe-score-badge {
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-weight: 800;
}

.kim-pe-score-badge.neutral {
    background: #eef2f7;
    color: #1f2937;
}

.kim-pe-score-badge.low {
    background: #94d36a;
    color: #1b2e1e;
}

.kim-pe-score-badge.medium {
    background: #f2da48;
    color: #312c0d;
}

.kim-pe-score-badge.high {
    background: #cc2323;
    color: #ffffff;
}

.kim-pe-score-badge.critical {
    background: #7f2ca8;
    color: #ffffff;
}

.kim-pe-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kim-pe-action-buttons .btn {
    flex: 1 1 180px;
}

.kim-pe-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.kim-pe-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.kim-mc-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.kim-mc-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.kim-pe-warnings {
    border: 1px solid #e8a4a4;
    border-left: 4px solid #b02a37;
    background: #fff1f1;
    color: #8a1b1b;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 700;
}

.kim-pe-status-warning {
    color: #8a1b1b;
    font-weight: 700;
}

.kim-pe-hide-figures .kim-pe-image-wrap {
    display: none;
}

@media (max-width: 1400px) {
    .kim-pe-image-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .kim-pe-image-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .kim-pe-grid {
        grid-template-columns: 1fr;
    }
    .kim-pe-image-grid-5,
    .kim-pe-image-grid-4,
    .kim-pe-image-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .kim-pe-image-grid-5,
    .kim-pe-image-grid-4,
    .kim-pe-image-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* RULA */
.rula-app {
    --rula-shell: #012f61;
    --rula-shell-border: #385f8f;
    --rula-text: #f7fafc;
    --rula-soft: #d4e1ef;
}

.rula-side-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.rula-card {
    background: var(--rula-shell);
    border: 1px solid var(--rula-shell-border);
    border-radius: 14px;
    padding: 0.8rem;
}

.rula-card-title {
    color: var(--rula-text);
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.rula-option-row,
.rula-check-row,
.rula-load-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.rula-option {
    border: 1px solid #4f79a7;
    border-radius: 8px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.35rem 0.55rem;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.rula-option input {
    margin: 0;
}

.rula-section-title {
    margin: 0.65rem 0 0.45rem;
    color: var(--rula-soft);
    font-size: 0.87rem;
}

.rula-image-grid {
    display: grid;
    gap: 0.45rem;
}

.rula-image-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rula-image-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rula-image-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rula-image-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rula-image-option {
    border: 1px solid #4f79a7;
    border-radius: 10px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.4rem;
    text-align: left;
    transition: border-color .2s ease, background-color .2s ease;
}

.rula-image-option:hover {
    border-color: #ffbe84;
    background: #0f4f8f;
}

.rula-image-option.active {
    border-color: #ffc993;
    background: #df6f00;
}

.rula-image-option.is-disabled,
.rula-image-option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rula-image-wrap {
    border-radius: 8px;
    border: 1px dashed #4f79a7;
    background: #01274f;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rula-image {
    width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.rula-image-label {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.2;
}

.rula-subtotal {
    margin-top: 0.5rem;
    color: #ffecd8;
    font-size: 0.84rem;
}

.rula-result-card .card-body {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
}

.rula-result-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    background: #f8fbff;
}

.rula-action-level-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
}

.rula-action-level-badge.level-1 {
    background: #94d36a;
    color: #1b2e1e;
}

.rula-action-level-badge.level-2 {
    background: #f2da48;
    color: #312c0d;
}

.rula-action-level-badge.level-3 {
    background: #cc2323;
    color: #fff;
}

.rula-action-level-badge.level-4 {
    background: #c22f87;
    color: #fff;
}

.rula-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rula-action-buttons .btn {
    flex: 1 1 180px;
}

.rula-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.rula-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.reba-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.reba-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.reba2-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.reba2-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.rula-warnings {
    border: 1px solid #e8a4a4;
    border-left: 4px solid #b02a37;
    background: #fff1f1;
    color: #8a1b1b;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 700;
}

.rula-status-warning {
    color: #8a1b1b;
    font-weight: 700;
}

.rula-hide-figures .rula-image-wrap {
    display: none;
}

@media (max-width: 1400px) {
    .rula-image-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .rula-image-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .rula-side-grid {
        grid-template-columns: 1fr;
    }
    .rula-image-grid-5,
    .rula-image-grid-4,
    .rula-image-grid-3,
    .rula-image-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .rula-image-grid-5,
    .rula-image-grid-4,
    .rula-image-grid-3,
.rula-image-grid-2 {
    grid-template-columns: 1fr;
}
}

.reba2-app {
    --reba2-shell: #012f61;
    --reba2-shell-border: #385f8f;
    --reba2-text: #f7fafc;
    --reba2-soft: #d4e1ef;
}

.reba2-card {
    background: var(--reba2-shell);
    border: 1px solid var(--reba2-shell-border);
    border-radius: 14px;
    padding: 0.8rem;
}

.reba2-card-title {
    color: var(--reba2-text);
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.reba2-option,
.reba2-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.reba2-option {
    border: 1px solid #4f79a7;
    border-radius: 8px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.4rem 0.55rem;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
}

.reba2-option input {
    margin: 0;
}

.reba2-section-title {
    margin: 0.65rem 0 0.45rem;
    color: var(--reba2-soft);
    font-size: 0.87rem;
}

.reba2-image-grid {
    display: grid;
    gap: 0.45rem;
}

.reba2-image-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.reba2-image-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reba2-image-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reba2-image-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reba2-image-option {
    border: 1px solid #4f79a7;
    border-radius: 10px;
    background: #01396f;
    color: #f7fafc;
    padding: 0.45rem;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.reba2-image-option:hover {
    border-color: #ffbe84;
    background: #0f4f8f;
}

.reba2-image-option.active {
    border-color: #ffc993;
    background: #df6f00;
}

.reba2-image-wrap {
    border-radius: 8px;
    border: 1px dashed #4f79a7;
    background: #01274f;
    min-height: 74px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.reba2-image {
    width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.reba2-image-label {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.2;
}

.reba2-subtotal {
    margin-top: 0.5rem;
    color: #ffecd8;
    font-size: 0.84rem;
}

.reba2-result-card .card-body {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
}

.reba2-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 0.85rem;
}

.reba2-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reba2-action-buttons .btn {
    flex: 1 1 180px;
}

.reba2-warnings {
    border: 1px solid #e8a4a4;
    border-left: 4px solid #b02a37;
    background: #fff1f1;
    color: #8a1b1b;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.reba2-hide-figures .reba2-image-wrap {
    display: none;
}

@media (max-width: 1400px) {
    .reba2-image-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .reba2-image-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .reba2-image-grid-5,
    .reba2-image-grid-4,
    .reba2-image-grid-3,
    .reba2-image-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reba2-result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .reba2-image-grid-5,
    .reba2-image-grid-4,
    .reba2-image-grid-3,
    .reba2-image-grid-2 {
        grid-template-columns: 1fr;
    }
}

.image-annotation-app {
    --annotation-shell: #012f61;
    --annotation-shell-border: #3d638f;
    --annotation-soft: #d8e5f3;
}

.image-annotation-toolbar {
    display: grid;
    gap: 0.75rem;
}

.image-annotation-link-card .card-body {
    background: linear-gradient(180deg, #ffffff, #f5f9ff);
    border-radius: 14px;
}

.image-annotation-link-card .form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3c5574;
}

.image-annotation-link-card .report-field-locked {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: #2b4a6d;
    cursor: default;
    padding-left: 0;
    padding-right: 0;
}

.image-annotation-link-card .report-field-locked::placeholder {
    color: #6f7f94;
}

.image-annotation-link-card .report-field-locked:focus {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.image-annotation-save-toast-host {
    position: fixed;
    top: 1rem;
    right: 1.1rem;
    z-index: 1085;
    pointer-events: none;
}

.image-annotation-save-toast {
    min-width: 230px;
    max-width: min(430px, 86vw);
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #72c389;
    background: linear-gradient(180deg, #effcf2, #ddf5e3);
    color: #1f6b36;
    box-shadow: 0 10px 22px rgba(25, 99, 49, 0.2);
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.image-annotation-save-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#imageAnnotationDbLookupFeedback {
    min-height: 1.2rem;
}

.image-annotation-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.image-annotation-toolbar-row--viewport {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.1rem;
}

.image-annotation-toolbar-row--viewport > * {
    flex: 0 0 auto;
}

.image-annotation-toolbar-row--blur {
    gap: 0.55rem;
    align-items: center;
}

.image-annotation-blur-strength {
    width: min(220px, 38vw);
    min-width: 120px;
}

.image-annotation-blur-mode {
    width: 7rem;
    min-width: 7rem;
}

.image-annotation-blur-border-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.2rem;
}

.image-annotation-tools .btn.active {
    color: #ffffff;
    background: #df6f00;
    border-color: #ffce9f;
}

.image-annotation-toolbar-row--viewport .btn.active {
    color: #ffffff;
    background: #0f4f8f;
    border-color: #8eb9e6;
}

.image-annotation-inline-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #405775;
}

#imageAnnotationColorInput {
    width: 3.2rem;
    min-width: 3.2rem;
    padding: 0.2rem;
}

#imageAnnotationWidthInput {
    width: 4.8rem;
    min-width: 4.8rem;
}

.image-annotation-zoom-label {
    min-width: 64px;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1c3f67;
}

.image-annotation-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 0.85rem;
    align-items: start;
}

.image-annotation-canvas-card .card-body {
    background: #0f233d;
    border-radius: 14px;
}

.image-annotation-canvas-wrap {
    position: relative;
    min-height: 560px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #3f628f;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
        #0f233d;
}

#imageAnnotationCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}

.image-annotation-sidebar .card-body {
    background: linear-gradient(180deg, #ffffff, #f3f8ff);
    border-radius: 14px;
}

.image-annotation-object-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    max-height: 380px;
    overflow: auto;
}

.image-annotation-object-item {
    margin: 0;
}

.image-annotation-object-button {
    width: 100%;
    border: 1px solid #d3deec;
    border-radius: 10px;
    background: #f7fbff;
    color: #1c3f67;
    text-align: left;
    padding: 0.5rem 0.62rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.image-annotation-object-button:hover {
    border-color: #8ab1db;
    background: #e9f3ff;
}

.image-annotation-object-button.active {
    border-color: #4a84bf;
    background: #d5e9ff;
    color: #073668;
}

.image-annotation-video-print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.55rem;
    max-height: 360px;
    overflow: auto;
    padding: 0.2rem;
    border: 1px dashed #cad9eb;
    border-radius: 10px;
    background: #f8fbff;
}

.image-annotation-video-print-item {
    width: 100%;
    border: 1px solid #d1deed;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.42rem;
    text-align: left;
    display: grid;
    gap: 0.35rem;
}

.image-annotation-video-print-item:hover {
    border-color: #8fb0d6;
    background: #f2f8ff;
}

.image-annotation-video-print-item.active {
    border-color: #2f6cad;
    background: #e9f3ff;
}

.image-annotation-video-print-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #d6e2f0;
    background: #0f233d;
}

.image-annotation-video-print-caption {
    font-size: 0.76rem;
    color: #3d5573;
    line-height: 1.2;
}

@media (max-width: 1200px) {
    .image-annotation-workspace {
        grid-template-columns: 1fr;
    }

    .image-annotation-canvas-wrap {
        min-height: 460px;
    }
}

@media (max-width: 768px) {
    .image-annotation-canvas-wrap {
        min-height: 340px;
    }

    .image-annotation-toolbar-row .btn {
        flex: 1 1 140px;
    }

    .image-annotation-toolbar-row--viewport .btn {
        flex: 0 0 auto;
    }

    .image-annotation-toolbar-row--blur {
        flex-wrap: wrap;
    }
}

.videos-workspace {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
    gap: 0.9rem;
    align-items: start;
}

.videos-player-shell .card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    border-radius: 14px;
}

.videos-player-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d4e1f0;
    background: #0f233d;
}

.videos-player {
    width: 100%;
    max-height: 560px;
    display: block;
    background: #0f233d;
}

.videos-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.videos-sidebar .card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    border-radius: 14px;
}

.videos-preview {
    min-height: 140px;
    border: 1px dashed #c7d8ec;
    border-radius: 12px;
    background: #f8fbff;
    display: grid;
    place-items: center;
    padding: 0.5rem;
}

.videos-preview-image {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    border: 1px solid #d5e2f1;
}

.videos-print-list {
    display: grid;
    gap: 0.45rem;
    max-height: 520px;
    overflow: auto;
    padding-right: 0.2rem;
}

.videos-print-item {
    width: 100%;
    border: 1px solid #d6e3f1;
    border-radius: 11px;
    background: #ffffff;
    padding: 0.45rem;
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 0.55rem;
    align-items: center;
    text-align: left;
}

.videos-print-item:hover {
    border-color: #9cbbe0;
    background: #f4f9ff;
}

.videos-print-item.active {
    border-color: #3f78b6;
    background: #eaf3ff;
}

.videos-print-thumb {
    width: 68px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cfddee;
    background: #0f233d;
}

.videos-print-meta {
    display: grid;
    font-size: 0.82rem;
    color: #334e71;
    line-height: 1.2;
}

.videos-print-delete {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #9f1c1c;
}

.videos-print-delete:hover {
    background: #ffe8e8;
}

.videos-empty-state {
    min-height: 260px;
    border: 1px dashed #c8d9ec;
    border-radius: 14px;
    background: #f7fbff;
    display: grid;
    gap: 0.4rem;
    place-items: center;
    color: #4c6788;
    text-align: center;
    padding: 1.2rem;
}

.videos-empty-state i {
    font-size: 2rem;
}

.videos-print-cap {
    font-size: 0.85rem;
}

@media (max-width: 1200px) {
    .videos-workspace {
        grid-template-columns: 1fr;
    }

    .videos-player {
        max-height: 460px;
    }
}

@media (max-width: 768px) {
    .videos-print-item {
        grid-template-columns: 60px 1fr auto;
    }

    .videos-print-thumb {
        width: 58px;
        height: 40px;
    }
}

.data-kpi-card .card-body p {
    font-size: 0.85rem;
}

.data-home-link-card {
    border: 1px solid #d8e5f4;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.data-home-link-card:hover {
    border-color: #8fb2da;
    box-shadow: 0 10px 24px rgba(15, 46, 84, 0.08);
    transform: translateY(-2px);
}

.data-company-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.data-company-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.data-company-card:hover {
    border-color: #8fb2da;
    box-shadow: 0 14px 30px rgba(15, 46, 84, 0.1);
    transform: translateY(-2px);
}

.data-company-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.data-company-kpi-item {
    border: 1px solid #d7e3f1;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.5rem 0.55rem;
    display: grid;
    gap: 0.1rem;
}

.data-company-kpi-item small {
    color: #4d6484;
    font-size: 0.75rem;
    line-height: 1.15;
}

.data-company-kpi-item strong {
    color: #08386f;
    font-size: 1rem;
}

.data-annotated-thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    border: 1px solid #d4e2f1;
    object-fit: cover;
    background: #f1f6fc;
}

@media (max-width: 576px) {
    .data-company-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ergos-factors-wrap {
    display: grid;
    gap: 1rem;
}

.ergos-factor-card {
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 46, 84, 0.06);
}

.ergos-factor-title {
    font-size: 1.02rem;
    color: #0b3a70;
    margin-bottom: 0.75rem;
}

.ergos-question-row {
    border-top: 1px solid #eef3f9;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.ergos-question-row:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.ergos-question-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.ergos-result-card {
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #ffffff;
}

.ergos-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.9rem;
}

.ergos-action-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ergos-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.ergos-class-sat {
    color: #0e7a3f;
}

.ergos-class-acc {
    color: #005fa3;
}

.ergos-class-imp {
    color: #a95f00;
}

.ergos-class-na {
    color: #5d6b7c;
}

@media (max-width: 768px) {
    .ergos-result-grid {
        grid-template-columns: 1fr;
    }

    .ergos-question-controls {
        grid-template-columns: 1fr;
    }
}

.checklist-aet-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checklist-aet-items {
    display: grid;
    gap: 0.9rem;
}

.checklist-aet-item-card {
    border: 1px solid #d9e2ef;
    border-radius: 12px;
    padding: 0.9rem;
}

.checklist-aet-item-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.checklist-aet-item-id {
    margin: 0 0 0.2rem 0;
    font-size: 0.82rem;
    color: #334155;
    font-weight: 700;
}

.checklist-aet-item-text {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.checklist-aet-item-content {
    margin-top: 0.7rem;
}

.checklist-aet-option-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 0.8rem;
}

.checklist-aet-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.checklist-aet-item-image {
    max-width: 340px;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    display: block;
}

.checklist-aet-result-card {
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #ffffff;
}

.checklist-aet-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.checklist-aet-badge-5 {
    background: #6d28d9;
    color: #ffffff;
}

.checklist-aet-table thead th {
    white-space: nowrap;
}

.checklist-aet-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.checklist-aet-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

@media (max-width: 992px) {
    .checklist-aet-option-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .checklist-aet-option-row {
        grid-template-columns: 1fr;
    }

    .checklist-aet-item-header {
        flex-direction: column;
    }
}

.nasa-summary-card,
.nasa-result-card {
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #ffffff;
}

.nasa-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.9rem;
}

.nasa-action-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.nasa-pairs-wrap {
    display: grid;
    gap: 0.75rem;
}

.nasa-pair-card {
    border: 1px solid #d7e3f1;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.75rem;
}

.nasa-pair-title {
    font-weight: 600;
    color: #0b3a70;
}

.nasa-pair-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.nasa-pair-option {
    font-weight: 600;
}

.nasa-pair-option.active {
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.15);
}

.nasa-magnitude-wrap {
    display: grid;
    gap: 0.75rem;
}

.nasa-magnitude-card {
    border: 1px solid #d7e3f1;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.75rem;
}

.nasa-magnitude-anchors {
    display: flex;
    justify-content: space-between;
    color: #4d6484;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.nasa-magnitude-footer {
    color: #355074;
    font-size: 0.9rem;
}

.nasa-criteria-summary {
    cursor: pointer;
    font-weight: 700;
    color: #0b3a70;
}

.nasa-criteria-list {
    display: grid;
    gap: 0.7rem;
}

.nasa-criteria-item {
    border-top: 1px solid #e6edf6;
    padding-top: 0.7rem;
}

.nasa-criteria-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.nasa-result-table th {
    color: #0b3a70;
    font-weight: 700;
}

.nasa-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.nasa-class-low {
    color: #005fa3;
}

.nasa-class-some {
    color: #8f6f00;
}

.nasa-class-moderate {
    color: #0e7a3f;
}

.nasa-class-high {
    color: #a95f00;
}

.nasa-class-intolerable {
    color: #b42318;
}

.nasa-class-na {
    color: #5d6b7c;
}

@media (max-width: 768px) {
    .nasa-summary-grid {
        grid-template-columns: 1fr;
    }

    .nasa-pair-options {
        grid-template-columns: 1fr;
    }
}

.niosh-visual-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
}

.niosh-visual-item {
    border: 1px solid #d7e3f1;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.55rem;
    text-align: center;
}

.niosh-visual-item figcaption {
    margin-top: 0.4rem;
    font-weight: 600;
    color: #355074;
    font-size: 0.85rem;
}

.niosh-grip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.niosh-grip-option {
    border: 1px solid #ced9e8;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.5rem;
    display: grid;
    gap: 0.45rem;
    color: #1f3556;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.niosh-grip-option:hover {
    border-color: #9bb8dc;
    box-shadow: 0 8px 18px rgba(15, 46, 84, 0.08);
    transform: translateY(-1px);
}

.niosh-grip-option.active {
    border-color: #2e8a2c;
    box-shadow: 0 0 0 2px rgba(46, 138, 44, 0.15);
    background: #f5fcf4;
}

.niosh-result-card {
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #ffffff;
}

.niosh-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 0.9rem;
}

.niosh-action-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.niosh-pdf-feedback-success {
    color: #1c6e37 !important;
    font-weight: 700;
}

.niosh-pdf-feedback-error {
    color: #b02a37 !important;
    font-weight: 700;
}

.niosh-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.niosh-risk-none {
    color: #0f7a40;
}

.niosh-risk-very-low {
    color: #1a8f45;
}

.niosh-risk-low {
    color: #8f6f00;
}

.niosh-risk-significant {
    color: #c35100;
}

.niosh-risk-high {
    color: #b42318;
}

.niosh-risk-na {
    color: #5d6b7c;
}

@media (max-width: 1200px) {
    .niosh-visual-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .niosh-visual-grid,
    .niosh-grip-grid,
    .niosh-result-grid {
        grid-template-columns: 1fr;
    }
}

.mgarg-side-mode-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.mgarg-side-mode-btn {
    border: 1px solid #cdd9e8;
    border-radius: 10px;
    background: #ffffff;
    color: #1f3556;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
}

.mgarg-side-mode-btn.active {
    background: #1e6ebf;
    border-color: #1e6ebf;
    color: #ffffff;
}

.mgarg-factor-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.mgarg-factor-panel .card-body {
    background: linear-gradient(180deg, #ffffff, #f5f9ff);
    border-radius: 12px;
}

.mgarg-factor-wrap {
    display: grid;
    gap: 0.7rem;
}

.mgarg-factor-card {
    border: 1px solid #d4e0ef;
    border-radius: 11px;
    background: #ffffff;
    padding: 0.65rem;
}

.mgarg-factor-title {
    color: #1d3558;
    font-weight: 700;
    font-size: 0.92rem;
}

.mgarg-factor-subtitle {
    color: #5c6f86;
    font-size: 0.82rem;
}

.mgarg-option-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.mgarg-option-btn {
    border: 1px solid #cfdceb;
    border-radius: 9px;
    background: #f8fbff;
    color: #1d3558;
    text-align: left;
    padding: 0.45rem 0.55rem;
    display: grid;
    gap: 0.2rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.mgarg-option-btn:hover {
    border-color: #93b4da;
    background: #edf5ff;
}

.mgarg-option-btn.active {
    border-color: #2e8a2c;
    background: #f2fbf2;
    box-shadow: 0 0 0 2px rgba(46, 138, 44, 0.14);
}

.mgarg-option-main {
    font-weight: 700;
    font-size: 0.84rem;
}

.mgarg-option-multiplier {
    font-size: 0.78rem;
    color: #315476;
}

.mgarg-option-note {
    font-size: 0.74rem;
    color: #5e728b;
    line-height: 1.2;
}

.mgarg-result-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.mgarg-result-card {
    border: 1px solid #d6e2f0;
    border-left-width: 4px;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.75rem;
}

.mgarg-result-side {
    font-size: 0.82rem;
    color: #3a5678;
    font-weight: 700;
}

.mgarg-risk-safe {
    border-left-color: #1f8d47;
    background: #f2fcf5;
}

.mgarg-risk-moderate {
    border-left-color: #d8a106;
    background: #fffced;
}

.mgarg-risk-dangerous {
    border-left-color: #c42a1f;
    background: #fff4f3;
}

.mgarg-risk-na {
    border-left-color: #7f8da0;
    background: #f5f8fb;
}

.mgarg-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.mgarg-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

@media (max-width: 1200px) {
    .mgarg-factor-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mgarg-option-row,
    .mgarg-result-panels {
        grid-template-columns: 1fr;
    }
}

.tlv-hal-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.tlv-hal-input-card {
    border: 1px solid #d6e2f0;
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.75rem;
}

.tlv-hal-input-title {
    color: #1d3558;
    font-weight: 700;
}

.tlv-hal-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.tlv-hal-result-card {
    border: 1px solid #d6e2f0;
    border-left-width: 4px;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.75rem;
}

.tlv-hal-overall-card {
    border: 1px solid #d6e2f0;
    border-left-width: 4px;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.75rem;
}

.tlv-hal-result-title {
    color: #355073;
    font-size: 0.85rem;
    font-weight: 700;
}

.tlv-hal-zone-below {
    border-left-color: #1f8d47;
    background: #f2fcf5;
}

.tlv-hal-zone-between {
    border-left-color: #d8a106;
    background: #fffced;
}

.tlv-hal-zone-above {
    border-left-color: #c42a1f;
    background: #fff4f3;
}

.tlv-hal-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tlv-hal-warnings {
    border: 1px solid #ffd7d7;
    background: #fff4f4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

@media (max-width: 992px) {
    .tlv-hal-input-grid,
    .tlv-hal-result-grid {
        grid-template-columns: 1fr;
    }
}
