body.public-list-page,
body.public-form-page,
body.public-success-page {
    background-color: #f4f6f9;
    font-family: 'Poppins', sans-serif;
}

body.public-list-page .wrapper,
body.public-form-page .wrapper,
body.public-success-page .wrapper,
body.public-error-page .wrapper {
    margin-left: 0 !important;
}

body.public-list-page .content-wrapper,
body.public-form-page .content-wrapper,
body.public-success-page .content-wrapper {
    margin-left: 0 !important;
    min-height: 100vh !important;
    background: transparent;
}

body.public-error-page .content-wrapper,
body.public-list-page .main-header,
body.public-form-page .main-header,
body.public-success-page .main-header,
body.public-error-page .main-header {
    margin-left: 0 !important;
}

.public-fixed-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    margin-left: 0 !important;
    z-index: 1035;
    min-height: 76px;
    padding: 0.85rem 1.5rem;
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.public-fixed-header .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #1f2d3d !important;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 1rem;
    padding: 0;
}

.public-fixed-header .brand-image {
    float: none;
    width: 46px;
    height: 46px;
    margin: 0;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 0.15rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 123, 255, 0.14);
}

.public-fixed-header .navbar-brand span {
    color: #24364b;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.public-fixed-header .navbar-nav {
    align-items: center;
    gap: 0.35rem;
}

.public-fixed-header .nav-link {
    color: #5b6575 !important;
    font-size: 0.96rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.6rem 1rem !important;
    transition: all 0.2s ease;
}

.public-fixed-header .nav-link:hover,
.public-fixed-header .nav-link:focus {
    background: rgba(0, 123, 255, 0.08);
    color: #007bff !important;
}

.public-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 96px 20px 40px;
}

.public-theme-harvest {
    --public-accent: #d97706;
    --public-accent-dark: #b45309;
    --public-soft: #fff7ed;
    --public-soft-strong: #fde7c3;
    --public-outline: #f7c98b;
}

.public-theme-identity {
    --public-accent: #2563eb;
    --public-accent-dark: #1d4ed8;
    --public-soft: #eff6ff;
    --public-soft-strong: #dbeafe;
    --public-outline: #9ec0ff;
}

.public-theme-ocean {
    --public-accent: #0891b2;
    --public-accent-dark: #0e7490;
    --public-soft: #ecfeff;
    --public-soft-strong: #cffafe;
    --public-outline: #8ae4f6;
}

.public-theme-rose {
    --public-accent: #e11d48;
    --public-accent-dark: #be123c;
    --public-soft: #fff1f2;
    --public-soft-strong: #ffe4e6;
    --public-outline: #f6a5b7;
}

.public-theme-forest {
    --public-accent: #15803d;
    --public-accent-dark: #166534;
    --public-soft: #f0fdf4;
    --public-soft-strong: #dcfce7;
    --public-outline: #96d9a8;
}

.public-main-card {
    border-top: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.public-main-card > .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.public-main-card > .card-header .card-title {
    float: none;
    font-weight: 600;
    margin: 0;
}

.public-main-card > .card-header p {
    margin: 0.35rem 0 0;
    opacity: 0.92;
}

.public-main-card[class*="public-theme-"] > .card-header {
    background: linear-gradient(135deg, var(--public-accent), var(--public-accent-dark));
    color: #fff;
}

.public-main-card[class*="public-theme-"] > .card-header .card-title,
.public-main-card[class*="public-theme-"] > .card-header p {
    color: #fff;
}

.public-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.public-header-actions .btn {
    white-space: nowrap;
}

.public-subcard {
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.public-main-card[class*="public-theme-"] .public-subcard {
    border-color: var(--public-outline);
}

.public-meta-card {
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background: #fff;
}

.public-main-card[class*="public-theme-"] .public-meta-card {
    border-color: var(--public-outline);
    border-top: 4px solid var(--public-accent);
    background: linear-gradient(180deg, #fff 0%, var(--public-soft) 100%);
}

.public-meta-card .card-body {
    padding: 1rem 1.1rem;
}

.public-meta-label {
    display: block;
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.public-meta-value {
    color: #212529;
    font-weight: 500;
    line-height: 1.55;
}

.public-main-card[class*="public-theme-"] .public-meta-label {
    color: var(--public-accent-dark);
}

.public-inline-note {
    border-radius: 0.25rem;
    padding: 0.85rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.public-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
    margin: 0 0.45rem 0.45rem 0;
}

.public-main-card[class*="public-theme-"] .public-score-badge {
    background: var(--public-soft-strong);
    color: var(--public-accent-dark);
}

.public-summary-box {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background: #fff;
    height: 100%;
}

.public-summary-box .card-body {
    padding: 1rem 1.1rem;
}

.public-summary-box h3 {
    margin: 0.15rem 0 0.45rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.public-main-card[class*="public-theme-"] .public-summary-box {
    border-color: var(--public-outline);
}

.public-main-card[class*="public-theme-"] .public-summary-box h3 {
    color: var(--public-accent-dark);
}

.wizard-nav-card {
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.public-main-card[class*="public-theme-"] .wizard-nav-card {
    border-color: var(--public-outline);
}

#wizardNav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#wizardNav .nav-item {
    flex: 1 1 180px;
}

#wizardNav .nav-link {
    width: 100%;
    height: 100%;
    border: 1px solid #ced4da;
    background: #fff;
    color: #495057;
    font-weight: 600;
    text-align: left;
    border-radius: 0.25rem;
    padding: 0.85rem 1rem;
    transition: all 0.2s ease;
}

#wizardNav .nav-link.active,
#wizardNav .nav-link:hover {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.public-main-card[class*="public-theme-"] #wizardNav .nav-link.active,
.public-main-card[class*="public-theme-"] #wizardNav .nav-link:hover {
    background: var(--public-accent);
    border-color: var(--public-accent);
}

.wizard-shell {
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.public-main-card[class*="public-theme-"] .wizard-shell {
    border-color: var(--public-outline);
}

.wizard-shell .card-header,
.wizard-shell .card-footer {
    background: #fff;
}

.wizard-shell .card-header {
    border-bottom: 1px solid #dee2e6;
}

.wizard-shell .card-title {
    float: none;
    font-weight: 600;
}

.wizard-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.12);
    color: #007bff;
    font-weight: 600;
}

.public-main-card[class*="public-theme-"] .wizard-step-badge {
    background: var(--public-soft-strong);
    color: var(--public-accent-dark);
}

.participant-field-card,
.question-card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

.question-card:hover {
    border-color: var(--public-outline);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.public-main-card[class*="public-theme-"] .participant-field-card,
.public-main-card[class*="public-theme-"] .question-card {
    border-color: var(--public-outline);
}

.participant-field-card .card-body,
.question-card .card-body {
    padding: 1rem 1.1rem;
}

.participant-field-card label {
    color: #495057;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.wizard-summary {
    color: #6c757d;
    font-size: 0.94rem;
    font-weight: 500;
}

.question-card .card-body > .d-flex {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

.question-text {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    line-height: 1.5;
}

.scale-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .question-card .card-body > .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .question-card .card-body > .d-flex > .mb-3.mb-lg-0 {
        padding-right: 0 !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
    }

    .question-card .card-body > .d-flex > .d-flex.flex-column {
        width: 100%;
    }

    .wizard-question {
        width: 100%;
        justify-content: space-between;
    }
}

.wizard-question {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
}

.wizard-question .custom-control-inline {
    margin: 0;
    padding-left: 0;
}

.wizard-question .custom-control-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wizard-question .custom-control-label {
    position: static;
    width: 3rem;
    height: 3rem;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.wizard-question .custom-control-label::before,
.wizard-question .custom-control-label::after,
.wizard-question .custom-radio .custom-control-label::before,
.wizard-question .custom-radio .custom-control-label::after {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    content: none !important;
}

.wizard-question .custom-control-label:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.wizard-question .custom-control-input:checked + .custom-control-label {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: 0 0.7rem 1.4rem rgba(0, 123, 255, 0.18);
}

.public-main-card[class*="public-theme-"] .wizard-question .custom-control-input:checked + .custom-control-label {
    background: var(--public-accent);
    border-color: var(--public-accent);
    box-shadow: 0 0.7rem 1.4rem rgba(15, 23, 42, 0.16);
}

.wizard-question .custom-control-input:focus + .custom-control-label {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.18);
}

.question-card .badge.badge-light {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.45rem 0.9rem !important;
    border-radius: 999px;
    background: #f8fafc;
    border-color: #d7e3f4 !important;
    color: #3b4f68;
    font-size: 0.82rem;
    font-weight: 700;
}

.public-main-card[class*="public-theme-"] .question-card .badge.badge-light {
    background: var(--public-soft);
    border-color: var(--public-outline) !important;
    color: var(--public-accent-dark);
}

.public-chart-panel {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    overflow: hidden;
}

.public-main-card[class*="public-theme-"] .public-chart-panel {
    border-color: var(--public-outline);
    background: linear-gradient(180deg, #fff 0%, var(--public-soft) 100%);
}

.public-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 320px;
    min-height: 320px;
}

.public-chart-panel canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}

.public-empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #6c757d;
}

.public-list-card {
    border: 1px solid #dee2e6;
    box-shadow: none;
    height: 100%;
}

.public-list-card .card-title {
    float: none;
    font-weight: 600;
}

.public-list-card .card-footer {
    background: #fff;
}

.public-list-card[class*="public-theme-"] {
    border-color: var(--public-outline);
}

.public-list-card[class*="public-theme-"] .card-header {
    background: linear-gradient(135deg, var(--public-soft-strong), #fff);
    border-top: 4px solid var(--public-accent);
}

.public-list-card[class*="public-theme-"] .public-meta-label {
    color: var(--public-accent-dark);
}

.public-list-card[class*="public-theme-"] .btn-primary {
    background-color: var(--public-accent);
    border-color: var(--public-accent);
}

.public-list-card[class*="public-theme-"] .btn-primary:hover,
.public-list-card[class*="public-theme-"] .btn-primary:focus {
    background-color: var(--public-accent-dark);
    border-color: var(--public-accent-dark);
}

.public-action-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: calc(2.25rem + 2px) !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.25rem + 0px) !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 2px) !important;
}

@media (max-width: 767.98px) {
    .public-fixed-header {
        padding: 0.75rem 0.9rem;
        min-height: 72px;
    }

    .public-shell {
        padding: 88px 12px 32px;
    }

    .public-main-card > .card-header {
        align-items: flex-start;
    }

    .public-fixed-header .navbar-brand {
        gap: 0.65rem;
        margin-right: 0.5rem;
    }

    .public-fixed-header .brand-image {
        width: 40px;
        height: 40px;
    }

    .public-fixed-header .navbar-brand span {
        font-size: 0.95rem;
    }

    .public-fixed-header .navbar-nav {
        gap: 0;
    }

    .public-fixed-header .nav-link {
        padding: 0.5rem 0.7rem !important;
        font-size: 0.9rem;
    }

    .public-header-actions,
    .public-action-row {
        width: 100%;
    }

    .public-header-actions .btn,
    .public-action-row .btn {
        width: 100%;
    }

    .wizard-shell .card-footer {
        gap: 0.75rem;
    }

    .wizard-shell .card-footer .btn {
        width: 100%;
    }

    .wizard-question .custom-control-label {
        width: 2.7rem;
        height: 2.7rem;
        font-size: 1rem;
    }

    .public-chart-canvas-wrap {
        height: 240px;
        min-height: 240px;
    }
}
