:root {
    --brand: #71cc98;
    --brand-dark: #52b87f;
    --brand-darker: #3d9d6a;
    --brand-light: #9eddb8;
    --brand-soft: #d8f5e4;
    --brand-muted: #ecf9f1;
    --brand-tint: #f6fcfa;
    --accent-alt: #5eb8a8;
    --accent-alt-dark: #3d9d8f;
    --accent-sky: #7ec8e8;
    --accent-sun: #ffe4a8;
    --accent-lilac: #c4b5fd;

    --bg: #f2faf6;
    --surface: #ffffff;
    --text: #15281f;
    --text-heading: #0d3d28;
    --muted: #5a7268;
    --primary: #71cc98;
    --primary-dark: #52b87f;
    --primary-darker: #3d9d6a;
    --border: rgba(113, 204, 152, 0.35);
    --border-strong: #9eddb8;
    --shadow: rgba(45, 120, 90, 0.1);
    --shadow-strong: rgba(45, 120, 90, 0.18);
    --ok: #2d7a52;
    --warn: #b45309;
    --risk: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background-color: #9ed9c8;
    color: var(--text);
}

.app-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background-color: #9ed9c8;
    background-image: url("images/bg-mindscape.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
}

.app-bg > * {
    display: none;
}

.app-bg__mesh {
    position: absolute;
    inset: -20%;
    background:
        conic-gradient(
            from 210deg at 50% 50%,
            rgba(113, 204, 152, 0.14) 0deg,
            rgba(126, 200, 232, 0.12) 90deg,
            rgba(255, 228, 168, 0.1) 180deg,
            rgba(113, 204, 152, 0.12) 270deg,
            rgba(126, 200, 232, 0.1) 360deg
        );
    opacity: 0.85;
    animation: app-bg-spin 80s linear infinite;
}

@keyframes app-bg-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes app-bg-float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(14px, -20px) scale(1.04);
    }
}

@keyframes app-bg-float-alt {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-18px, 12px) scale(1.05);
    }
}

.app-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
}

.app-bg__orb--1 {
    width: 380px;
    height: 380px;
    top: -100px;
    left: -90px;
    background: radial-gradient(circle, rgba(113, 204, 152, 0.55) 0%, transparent 68%);
    animation: app-bg-float 14s ease-in-out infinite;
}

.app-bg__orb--2 {
    width: 320px;
    height: 320px;
    top: 8%;
    right: -70px;
    background: radial-gradient(circle, rgba(126, 200, 232, 0.5) 0%, transparent 70%);
    animation: app-bg-float-alt 16s ease-in-out infinite;
}

.app-bg__orb--3 {
    width: 280px;
    height: 280px;
    bottom: 5%;
    left: 8%;
    background: radial-gradient(circle, rgba(255, 216, 155, 0.45) 0%, transparent 72%);
    animation: app-bg-float 18s ease-in-out infinite reverse;
}

.app-bg__orb--4 {
    width: 220px;
    height: 220px;
    bottom: 18%;
    right: 12%;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.35) 0%, transparent 70%);
    animation: app-bg-float-alt 20s ease-in-out infinite;
}

.app-bg__dots {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image: radial-gradient(rgba(113, 204, 152, 0.22) 1.2px, transparent 1.2px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 15%, transparent 72%);
}

.app-bg__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    opacity: 0.55;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220' preserveAspectRatio='none'%3E%3Cpath fill='%2371cc98' fill-opacity='0.18' d='M0,96 C240,160 480,32 720,96 C960,160 1200,32 1440,96 L1440,220 L0,220 Z'/%3E%3Cpath fill='%237ec8e8' fill-opacity='0.14' d='M0,128 C200,200 500,80 720,140 C940,200 1240,60 1440,128 L1440,220 L0,220 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

.app-bg__ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(113, 204, 152, 0.22);
}

.app-bg__ring--1 {
    width: 520px;
    height: 520px;
    top: -180px;
    right: -140px;
    border-color: rgba(126, 200, 232, 0.25);
}

.app-bg__ring--2 {
    width: 380px;
    height: 380px;
    bottom: -120px;
    left: -100px;
    border-color: rgba(255, 216, 155, 0.28);
}

.app-bg__spark {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(113, 204, 152, 0.5) 45%, transparent 70%);
    box-shadow: 0 0 20px rgba(113, 204, 152, 0.45);
    animation: app-bg-float 10s ease-in-out infinite;
}

.app-bg__spark--1 {
    top: 22%;
    left: 18%;
    width: 10px;
    height: 10px;
}

.app-bg__spark--2 {
    top: 38%;
    right: 22%;
    animation-delay: -3s;
}

.app-bg__spark--3 {
    bottom: 28%;
    left: 42%;
    width: 8px;
    height: 8px;
    animation-delay: -6s;
}

@media (prefers-reduced-motion: reduce) {
    .app-bg__mesh,
    .app-bg__orb,
    .app-bg__spark {
        animation: none;
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 28px;
}

.card {
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.94) 55%,
        rgba(246, 252, 249, 0.9) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    padding: 24px;
    box-shadow:
        0 24px 60px rgba(45, 100, 80, 0.12),
        0 8px 24px rgba(126, 200, 232, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 0 0 1px rgba(113, 204, 152, 0.12);
    backdrop-filter: blur(12px);
}

h1 {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: clamp(1.7rem, 2.3vw, 2.3rem);
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

h2 {
    color: var(--text-heading);
}

a {
    color: var(--primary-darker);
}

a:hover {
    color: var(--brand-darker);
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.stack {
    display: grid;
    gap: 14px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 16px var(--shadow-strong);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-darker));
    transform: translateY(-1px);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-darker), #2d7a52);
    box-shadow: 0 8px 16px var(--shadow-strong);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2d7a52, #246341);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--primary-darker);
    background: var(--brand-soft);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    background: var(--brand-muted);
}

.btn-outline-secondary {
    color: var(--primary-darker);
    background: transparent;
    border: 2px solid var(--brand);
    box-shadow: none;
}

.btn-outline-secondary:hover {
    background: var(--brand-muted);
    transform: translateY(-1px);
}

.btn-tertiary {
    color: var(--primary-darker);
    background: var(--brand-soft);
    border: 1px solid var(--border);
}

.btn-tertiary:hover {
    background: var(--brand-muted);
    transform: translateY(-1px);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    box-shadow: 0 8px 16px rgba(244, 67, 54, 0.28);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, #ffa726, #e69119);
    box-shadow: 0 8px 16px rgba(255, 167, 38, 0.28);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e69119, #d38e17);
    transform: translateY(-1px);
}

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    padding: 28px 32px 24px;
}

.hero::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    left: -50px;
    bottom: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 200, 232, 0.25) 0%, transparent 68%);
    pointer-events: none;
}

.hero.stack {
    gap: 14px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -60px;
    top: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 216, 155, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    width: fit-content;
    border: 1px solid rgba(113, 204, 152, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(236, 249, 241, 0.95));
    color: var(--primary-darker);
    box-shadow: 0 4px 14px rgba(113, 204, 152, 0.15);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.hero-text {
    max-width: none;
}

.home-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    align-content: start;
}

.home-options.home-options--single {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 0;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    background: #ffffff;
    overflow: hidden;
    box-shadow:
        0 10px 28px var(--shadow),
        0 2px 8px rgba(15, 36, 25, 0.04);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.option-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.option-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand);
    box-shadow:
        0 20px 40px var(--shadow-strong),
        0 4px 14px rgba(113, 204, 152, 0.2);
}

.option-card__tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-darker);
    background: var(--brand-muted);
    border: 1px solid var(--border);
}

.option-combo .option-card__tag {
    background: rgba(212, 245, 234, 0.9);
    border-color: rgba(94, 184, 168, 0.35);
}

.option-card__content {
    flex: 0 1 auto;
    padding: 18px 20px 6px;
}

.option-card__title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.option-card__desc {
    margin: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.55;
    color: var(--muted);
    max-width: 52ch;
}

.option-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 12px 18px 14px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, var(--brand-tint) 0%, var(--brand-muted) 100%);
}

.option-card:hover .option-card__footer {
    background: linear-gradient(180deg, var(--brand-muted) 0%, var(--brand-soft) 100%);
}

.option-card__cta-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-darker);
}

.option-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    transition: transform 0.2s ease;
}

.option-card:hover .option-card__arrow {
    transform: translateX(4px);
}

.option-combo::before {
    background: linear-gradient(90deg, var(--accent-alt), var(--accent-alt-dark));
}

.option-combo:hover .option-card__arrow {
    background: linear-gradient(135deg, var(--accent-alt), var(--accent-alt-dark));
}

.home-note {
    margin: 4px 0 0;
    font-size: 13px;
    width: 100%;
}

.question {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.question-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.question-unanswered {
    opacity: 0.78;
    border-color: rgba(245, 158, 11, 0.85) !important;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.error-text {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 8px 10px;
    width: fit-content;
}

input:disabled {
    border-color: var(--primary) !important;
}

.question h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
}

.progress-text {
    display: inline-block;
    width: fit-content;
    margin: -2px 0 2px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--primary-darker);
    background: var(--brand-soft);
    border: 1px solid var(--border-strong);
}

.input-text {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.page-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.page-filters .input-text {
    width: auto;
}

.page-filters #companySelect {
    min-width: 280px;
}

.page-filters #yearSelect {
    min-width: 110px;
    max-width: 130px;
    cursor: pointer;
    background: #fff;
}

.air-datepicker {
    z-index: 2000;
}

.company-name-link {
    color: var(--text-heading);
    font-weight: 700;
    text-decoration: none;
}

.company-name-link:hover {
    color: var(--brand-darker);
    text-decoration: underline;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
}

.share-url-card {
    margin-top: 24px;
    border: 2px solid var(--brand);
    background: linear-gradient(160deg, #ffffff 0%, var(--brand-muted) 100%);
    box-shadow: 0 12px 32px var(--shadow-strong);
}

.share-url-card h2 {
    margin: 0;
    font-weight: 700;
    color: #0d3d28;
}

.share-url-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.share-url-value {
    flex: 1;
    min-width: 260px;
    word-break: break-all;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.45;
}

.access-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #c5d4cc;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.switch .slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.switch input:checked + .slider {
    background: var(--brand-dark);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

.access-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.access-toggle-label.is-on {
    color: var(--ok);
}



.input-text:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(113, 204, 152, 0.28);
}

.options {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.option-item:hover {
    background: var(--brand-muted);
    border-color: var(--border);
}

.option-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.option-item--selected {
    border-color: var(--primary);
    background: var(--brand-soft);
    font-weight: 600;
}

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

.split-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-overview-block-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.dashboard-overview hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 4px 0 8px;
}

.dashboard-overview-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-section-chart {
    margin-top: 14px;
}

.dashboard-card--inline {
    padding: 14px 16px;
    box-shadow: none;
}

.dashboard-card--inline:hover {
    transform: none;
    box-shadow: none;
}

.admin-stat-total {
    max-width: 280px;
    border-color: #cbd5e1;
    border-left: 4px solid var(--brand);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-sections-group {
    border-radius: 16px;
    padding: 18px 18px 16px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dashboard-sections-group--burnout {
    border-color: #e2e8f0;
    border-left: 4px solid var(--accent-alt);
    background: linear-gradient(165deg, #f8fafc 0%, #ffffff 52%);
}

.dashboard-sections-group--screening {
    border-color: #e2e8f0;
    border-left: 4px solid var(--brand);
    background: linear-gradient(165deg, #fafbfc 0%, #ffffff 52%);
}

.dashboard-sections-group-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.dashboard-sections-group-intro {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
}

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

.dashboard-sections-empty {
    margin: 0;
    padding: 8px 0;
}

.dashboard-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 4px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-card--burnout {
    border-color: #e2e8f0;
    background: #ffffff;
}

.dashboard-card--burnout:hover {
    border-color: #94a3b8;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08),
        0 1px 6px rgba(15, 23, 42, 0.05);
}

.dashboard-card--screening {
    border-color: #e2e8f0;
    background: #ffffff;
}

.dashboard-card--screening:hover {
    border-color: #94a3b8;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08),
        0 1px 6px rgba(15, 23, 42, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card--burnout .level-bar {
    background: linear-gradient(90deg, #5eb8a8, #3d9d8f);
}

.dashboard-card--screening .level-bar {
    background: linear-gradient(90deg, #7ec8e8, #52b87f);
}

.dashboard-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

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

.level-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.level-meta {
    font-size: 13px;
    color: var(--text);
    font-weight: 800;
}

.level-count {
    font-size: 13px;
    color: var(--muted);
    min-width: 44px;
    text-align: right;
    font-weight: 800;
}

.level-bar-wrap {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 6px;
    grid-column: 1 / -1;
}

.level-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7ec8e8, #52b87f);
    border-radius: 999px;
}

.login-wrapper {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 520px;
}

.admin-stat {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.05),
        0 1px 3px rgba(15, 23, 42, 0.04);
}

.admin-stat.stress-none {
    border-color: rgba(100, 116, 139, 0.28);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.admin-stat.stress-low {
    border-color: rgba(22, 101, 52, 0.22);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.65) 0%, #ffffff 100%);
}

.admin-stat.stress-mid {
    border-color: rgba(180, 83, 9, 0.22);
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.7) 0%, #ffffff 100%);
}

.admin-stat.stress-high {
    border-color: rgba(185, 28, 28, 0.22);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.75) 0%, #ffffff 100%);
}

.admin-stat.burnout-low {
    border-color: rgba(94, 184, 168, 0.28);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.55) 0%, #ffffff 100%);
}

.admin-stat.burnout-mid {
    border-color: rgba(180, 83, 9, 0.22);
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.65) 0%, #ffffff 100%);
}

.admin-stat.burnout-high {
    border-color: rgba(185, 28, 28, 0.24);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.75) 0%, #ffffff 100%);
}

.admin-stat h2 {
    margin: 6px 0 0;
    color: var(--text-heading);
}

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

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

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f1f5f9;
    color: var(--text-heading);
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.detail-box {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.answer-box p {
    margin: 0;
}

.answer-box .muted {
    margin-top: 6px;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.level-low {
    color: var(--ok);
    background: #dcfce7;
}

.level-mid {
    color: var(--warn);
    background: #ffedd5;
}

.level-high {
    color: var(--risk);
    background: #fee2e2;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .card {
        padding: 18px;
        border-radius: 14px;
    }

    .home-options,
    .home-options.home-options--single {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .option-card {
        min-height: 0;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-stat-total {
        max-width: none;
    }

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

    .split-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .action-group {
        width: 100%;
    }
}

/* ผลรายส่วน — หน้า result + ตัวอย่าง PDF */
#pdfPreviewContent {
    min-width: 0;
    overflow-x: auto;
}

#pdfPreviewContent .mh-results-mount {
    width: 100%;
    min-width: 0;
}

.mh-results-mount .mh-result-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 8px 0 4px;
    width: 100%;
    min-width: 0;
}

/* กล่องผลแบบประเมิน — พื้นขาวเฉพาะหน้า result */
#resultBox.mh-results-mount .mh-result-card,
.mh-results-mount .mh-result-card {
    --mh-accent: #64748b;
    --mh-accent-soft: #f1f5f9;
    display: block;
    border: 1px solid var(--border);
    border-left: 5px solid var(--mh-accent);
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow);
    overflow: hidden;
    min-width: 0;
}

#resultBox.mh-results-mount .mh-result-card {
    background: #ffffff;
}

.mh-results-mount .mh-result-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--brand-tint) 100%);
}

.mh-results-mount .mh-result-card--level-low,
#resultBox.mh-results-mount .mh-result-card--level-low {
    --mh-accent: #16a34a;
    --mh-accent-soft: #dcfce7;
}

.mh-results-mount .mh-result-card--level-mid,
#resultBox.mh-results-mount .mh-result-card--level-mid {
    --mh-accent: #d97706;
    --mh-accent-soft: #fef3c7;
}

.mh-results-mount .mh-result-card--level-high,
#resultBox.mh-results-mount .mh-result-card--level-high {
    --mh-accent: #dc2626;
    --mh-accent-soft: #fee2e2;
}

#resultBox.mh-results-mount .mh-result-card__head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
    min-width: 0;
}

.mh-results-mount .mh-result-card__head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
    min-width: 0;
}

.mh-results-mount .mh-result-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-heading);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.mh-results-mount .mh-result-card__badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 6px 12px;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    background: var(--mh-accent-soft);
    color: var(--text-heading);
    font-size: 0.92rem;
    line-height: 1.4;
}

.mh-results-mount .mh-result-card__badge-label {
    font-weight: 600;
    color: #334155;
}

.mh-results-mount .mh-result-card__badge-value {
    font-weight: 700;
    color: var(--mh-accent);
}

.mh-results-mount .mh-result-card__body {
    min-width: 0;
}

.mh-results-mount .mh-result-card__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.mh-results-mount .mh-result-card__col-score {
    width: 90px;
}

.mh-results-mount .mh-result-card__score {
    width: 96px;
    vertical-align: top;
    padding: 14px 12px 16px 18px;
    border-right: 1px dashed var(--border);
}

.mh-results-mount .mh-result-card__reco {
    vertical-align: top;
    padding: 14px 18px 16px 16px;
}

.mh-results-mount .mh-result-card__score .mh-result-card__field-label,
.mh-results-mount .mh-result-card__score .mh-result-card__score-value {
    display: block;
}

.mh-results-mount .mh-result-card__reco .mh-result-card__field-label {
    display: block;
    margin-bottom: 6px;
}

.mh-results-mount .mh-result-card__field-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569;
}

.mh-results-mount .mh-result-card__score-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-heading);
}

.mh-results-mount .mh-result-card__reco-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #405375;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.mh-results-mount .mh-result-card--level-high .mh-result-card__reco-text,
.mh-results-mount .mh-result-card--level-high .mh-result-card__reco-text.muted {
    color: var(--mh-accent);
    font-weight: 600;
}

#resultBox.mh-results-mount .mh-result-total {
    --mh-accent: var(--brand);
    margin-top: 4px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--mh-accent);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px var(--shadow);
    overflow: hidden;
}

.mh-results-mount .mh-result-total {
    --mh-accent: var(--brand);
    margin-top: 4px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--mh-accent);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--brand-muted) 100%);
    box-shadow: 0 6px 18px var(--shadow);
    overflow: hidden;
}

.mh-results-mount .mh-result-total__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    min-width: 0;
}

.mh-results-mount .mh-result-total__score {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin: 0;
}

.mh-results-mount .mh-result-total__value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-heading);
}

.mh-results-mount .mh-result-total__unit {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.mh-results-mount .mh-result-notes {
    margin-top: 1rem;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--brand-muted);
    font-size: 0.95rem;
}

.mh-results-mount .mh-result-notes__lead {
    margin: 0 0 0.7em;
}

.mh-results-mount .mh-result-notes__list {
    margin: 0 0 0.7em;
    padding-left: 1.2em;
}

@media (max-width: 640px) {
    .mh-results-mount .mh-result-card__table,
    .mh-results-mount .mh-result-card__table tbody,
    .mh-results-mount .mh-result-card__table tr,
    .mh-results-mount .mh-result-card__table td {
        display: block;
        width: 100%;
    }

    .mh-results-mount .mh-result-card__score {
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px dashed var(--border);
    }

    .mh-results-mount .mh-result-card__score .mh-result-card__field-label,
    .mh-results-mount .mh-result-card__score .mh-result-card__score-value {
        display: inline;
    }

    .mh-results-mount .mh-result-card__score .mh-result-card__field-label::after {
        content: ": ";
    }

    .mh-results-mount .mh-result-card__score .mh-result-card__score-value {
        font-size: 1.25rem;
    }

    .mh-results-mount .mh-result-card__reco {
        padding: 12px 16px 16px;
    }
}

/* Select2 / DataTables */
.select2-container--default .select2-selection--single {
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    min-height: 42px;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    color: var(--text);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.select2-dropdown {
    border-color: #cbd5e1 !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--brand) !important;
    color: #fff !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 2px rgba(113, 204, 152, 0.2) !important;
}

table.dataTable thead th {
    background: #f1f5f9 !important;
    color: var(--text-heading) !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

table.dataTable tbody tr:hover {
    background: #f8fafc !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* หน้า Dashboard — ปุ่มรองไม่ใช้พื้นเขียวเต็มการ์ด */
section.card:has(.dashboard-overview) .btn-secondary {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

section.card:has(.dashboard-overview) .btn-secondary:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.import-wizard {
    max-width: 980px;
    width: calc(100% - 32px);
    margin: 2vh auto;
    max-height: 96vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.import-wizard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.import-wizard__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0d3d28;
}

.import-wizard__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.import-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.import-step {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 700;
}

.import-step__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #cbd5e1;
    color: #fff;
    font-size: 13px;
}

.import-step.is-done {
    background: #e8f8ee;
    color: #166534;
}

.import-step.is-done .import-step__num,
.import-step.is-active .import-step__num {
    background: var(--brand);
}

.import-step.is-active {
    background: #e0f2fe;
    color: #1d4ed8;
}

.import-help {
    margin: 0 0 14px;
    color: #64748b;
    line-height: 1.6;
}

.import-file-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.import-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.import-summary__card {
    border-radius: 14px;
    padding: 16px 18px;
    font-weight: 700;
}

.import-summary__card--ok {
    background: #dcfce7;
    color: #166534;
}

.import-summary__card--skip {
    background: #fee2e2;
    color: #991b1b;
}

.import-summary__num {
    font-size: 28px;
    display: block;
}

.import-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.import-badge--ready {
    background: #dcfce7;
    color: #166534;
}

.import-badge--update {
    background: #fef3c7;
    color: #92400e;
}

.employee-access-error {
    margin: 0;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 600;
}

.import-preview-table input.input-text {
    width: 100%;
    min-width: 110px;
    padding: 8px 10px;
    border-radius: 8px;
}

.import-preview-scroll {
    max-height: min(42vh, 420px);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.import-preview-scroll .import-preview-table {
    margin: 0;
}

.import-preview-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}
