:root {
    --app-bg: #eef2f6;
    --surface: #ffffff;
    --surface-muted: #f6f8fb;
    --border-color: #d8e1ea;
    --text-main: #1f2a37;
    --text-muted: #5f6b7a;
    --brand: #1f3a52;
    --brand-soft: #2f5878;
    --accent: #d7e7f4;
    --success-soft: #e3f3ea;
    --shadow-soft: 0 12px 28px rgba(17, 35, 52, 0.08);
}

body {
    background: linear-gradient(180deg, #f4f7fa 0%, #eef2f6 100%);
    color: var(--text-main);
}

.navbar-custom {
    background: rgba(31, 58, 82, 0.96);
    backdrop-filter: blur(12px);
    padding: 0.65rem 1rem;
    box-shadow: 0 10px 24px rgba(14, 29, 44, 0.18);
}

.navbar-brand-custom {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.content-wrapper {
    margin-top: 72px;
    padding: 24px;
}

.app-shell {
    max-width: 1440px;
    margin: 0 auto;
}

#dashboard {
    display: flex;
    min-height: calc(100vh - 104px);
    gap: 20px;
}

#sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1c3246 0%, #243d52 100%);
    color: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.25s ease-in-out;
}

#sidebarToggleFloating {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    border: none;
    background: #204866;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.35rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

#sidebar.collapsed {
    width: 82px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    background: rgba(255, 255, 255, 0.04);
}

#sidebarToggle {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.sidebar-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

#sidebar.collapsed .sidebar-title,
#sidebar.collapsed .sidebar-item span {
    display: none;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 10px 10px 14px;
    gap: 6px;
}

.sidebar-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.sidebar-item.active {
    background: rgba(215, 231, 244, 0.18);
}

#main-content {
    flex: 1;
    min-width: 0;
}

.section-card,
.panel-card,
.summary-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.section-card,
.panel-card {
    padding: 22px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header h2,
.section-card h2 {
    font-size: 1.35rem;
    margin: 0 0 6px;
    font-weight: 700;
}

.page-subtitle,
.form-note,
.muted-copy {
    color: var(--text-muted);
    margin: 0;
}

.employee-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.employee-context .context-item {
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
}

.context-label {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.context-value {
    font-weight: 600;
}

.survey-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.survey-form-flat {
    max-width: 980px;
}

.survey-meta-panel {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 18px;
}

.survey-meta-panel-copy .form-label {
    margin-bottom: 4px;
}

.survey-meta-panel-copy .form-note {
    margin-bottom: 0;
}

.survey-question-list {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
}

.survey-question-row {
    padding: 18px 20px;
}

.survey-question-row + .survey-question-row {
    border-top: 1px solid #e6edf3;
}

.survey-question-row.is-required {
    background: #fcfdff;
}

.survey-row-header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.question-index {
    color: var(--brand-soft);
    font-weight: 700;
    line-height: 1.6;
}

.survey-question-label {
    margin-bottom: 4px;
    font-weight: 600;
}

.question-required {
    color: #b04d3d;
}

.survey-answer-block {
    margin-left: 46px;
    display: grid;
    gap: 10px;
}

.survey-comment-inline {
    max-width: 640px;
}

.survey-form-actions {
    padding-top: 4px;
    display: flex;
    justify-content: flex-end;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.summary-card {
    padding: 18px 20px;
}

.summary-card .summary-label {
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.summary-card .summary-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.filter-card {
    padding: 18px 20px;
    margin-bottom: 18px;
}

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

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

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.table thead th {
    background: #edf3f8;
    color: var(--text-main);
    font-size: 0.92rem;
    border-bottom-width: 1px;
}

.table td,
.table th {
    vertical-align: top;
}

.answer-details {
    min-width: 360px;
}

.answer-details summary {
    cursor: pointer;
    color: var(--brand-soft);
    font-weight: 600;
}

.answer-list {
    margin: 10px 0 0;
    padding-left: 18px;
}

.answer-list li + li {
    margin-top: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 600;
}

.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
}

.pagination-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.export-link {
    white-space: nowrap;
}

.btn-soft {
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-soft:hover {
    background: #ebf1f6;
}

.admin-stat-list {
    margin: 0;
    padding-left: 18px;
}

.admin-stat-list li + li {
    margin-top: 6px;
}

@media (max-width: 992px) {
    .employee-context,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .survey-meta-panel {
        grid-template-columns: 1fr;
    }
}

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

    #sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        bottom: 0;
        height: 100%;
        z-index: 1050;
        border-radius: 0 20px 20px 0;
    }

    #sidebar.show {
        left: 0;
    }

    #sidebarToggleFloating {
        display: inline-flex;
    }

    .page-header,
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .survey-row-header,
    .survey-meta-panel {
        grid-template-columns: 1fr;
    }

    .survey-answer-block {
        margin-left: 0;
    }
}
