* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f3f5f7;
    color: #111827;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-main {
    padding: 40px 0 50px;
}

/* HEADER */

.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.header-inner {
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand-logo {
    position: absolute;
    left: 0;
    height: 95px;
    width: auto;
}

.brand-title {
    color: #c89b3c;
    font-size: 56px;
    font-weight: 300;
    letter-spacing: 10px;
    text-transform: uppercase;
}

.header-nav {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.header-nav a,
.logout-btn {
    color: #111827;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.header-nav a:hover,
.logout-btn:hover {
    color: #c89b3c;
}

/* COMMON */

.card {
    background: #ffffff;
    border-radius: 26px;
    padding: 36px;
    margin-bottom: 30px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.card h1,
.card h2 {
    margin-bottom: 28px;
    color: #111827;
    font-size: 42px;
}

.text-center {
    text-align: center;
}

.btn {
    border: none;
    border-radius: 18px;
    background: #0f172a;
    color: #ffffff;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: #1e293b;
}

.btn-light {
    background: #f1f5f9;
    color: #0f172a;
}

/* FORMS */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    font-size: 18px;
}

input,
select {
    height: 58px;
    padding: 0 18px;
}

textarea {
    min-height: 96px;
    padding: 16px 18px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #c89b3c;
    box-shadow: 0 0 0 4px rgba(200, 155, 60, 0.14);
}

.form-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 700;
}

/* ROOM SEARCH */

.room-search-group,
.question-search-group {
    position: relative;
}

.room-search-results,
.question-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
    max-height: 360px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.room-search-results.visible,
.question-search-results.visible {
    display: block;
}

.room-search-item,
.question-search-item {
    width: 100%;
    display: block;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    padding: 14px 18px;
    text-align: left;
    color: #111827;
    cursor: pointer;
}

.room-search-item {
    font-size: 20px;
    font-weight: 700;
}

.question-search-item {
    font-size: 15px;
    font-weight: 600;
}

.room-search-item:hover,
.question-search-item:hover {
    background: #f8fafc;
}

/* SURVEY */

.survey-section {
    margin-top: 34px;
}

.survey-section h3 {
    margin-bottom: 18px;
    font-size: 28px;
}

.question-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
}

.question-title {
    margin-bottom: 14px;
    font-size: 18px;
}

.answer-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0;
}

.rating-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.answer-options label {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.answer-options input[type="radio"] {
    width: auto;
    height: auto;
    margin-right: 8px;
}

/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 24px 0;
}

.five-cols {
    grid-template-columns: repeat(5, 1fr);
}

.stat-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.stat-card span {
    display: block;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 18px;
    font-weight: 800;
}

.stat-card strong {
    font-size: 42px;
    color: #0f172a;
}

.positive strong,
.positive-text {
    color: #15803d !important;
}

.negative strong,
.negative-text {
    color: #b91c1c !important;
}

.neutral strong {
    color: #475569;
}

/* CHARTS */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 28px 0;
}

.chart-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.chart-card h3 {
    margin-bottom: 18px;
    font-size: 20px;
}

.chart-card canvas {
    width: 100%;
    max-height: 280px;
}

/* REPORT FILTERS */

.report-filter-form {
    background: #ffffff;
    padding: 28px;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    margin: 28px 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 18px;
    align-items: end;
}

.filter-actions,
.report-actions {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.report-actions {
    justify-content: flex-end;
    margin: 24px 0;
}

/* TABLES */

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    margin: 20px 0 30px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 800;
}

.answer-row {
    border-top: 1px solid #e5e7eb;
    padding: 14px 0;
}

/* PAGINATION */

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* ALERTS */

.alert-wrapper {
    margin: 24px 0 28px;
}

.alert-dashboard {
    width: 100%;
    background: #fef2f2;
    border: 2px solid #dc2626;
    color: #7f1d1d;
    border-radius: 18px;
    padding: 22px 26px;
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.12);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.alert-dashboard strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

.alert-dashboard span {
    font-weight: 700;
}

.alert-toggle-icon {
    font-size: 22px;
    font-weight: 900;
    color: #7f1d1d;
    transition: transform 0.25s ease;
}

.alert-list {
    display: grid;
    gap: 12px;
}

.alert-wrapper .alert-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
    padding-right: 8px;
    transition: max-height 0.45s ease,
    opacity 0.35s ease,
    margin-top 0.35s ease;
}

.alert-wrapper.is-open .alert-list {
    max-height: 560px;
    opacity: 1;
    overflow-y: auto;
    margin-top: 16px;
}

.alert-wrapper.is-open .alert-toggle-icon {
    transform: rotate(180deg);
}

.alert-wrapper.is-open .alert-list::-webkit-scrollbar {
    width: 8px;
}

.alert-wrapper.is-open .alert-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.alert-wrapper.is-open .alert-list::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 999px;
}

.alert-item {
    background: #ffffff;
    border-left: 6px solid #dc2626;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.alert-item strong {
    display: block;
    font-size: 18px;
}

.alert-item span {
    display: block;
    margin-top: 4px;
    color: #334155;
}

.alert-item small {
    display: block;
    margin-top: 8px;
    color: #64748b;
}

.alert-status {
    background: #dc2626;
    color: #ffffff !important;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    height: fit-content;
}

/* HEATMAP */

.room-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin: 24px 0 32px;
}

.room-heatmap a {
    text-decoration: none;
}

.heatmap-room {
    display: block;
    border-radius: 16px;
    padding: 16px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    border: 2px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.heatmap-room:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.heatmap-room strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

.heatmap-room span {
    display: block;
    font-weight: 800;
    margin-bottom: 4px;
}

.heatmap-room small {
    color: #475569;
}

.heatmap-success {
    border-color: #16a34a;
    background: #f0fdf4;
}

.heatmap-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.heatmap-danger {
    border-color: #dc2626;
    background: #fef2f2;
}

/* DEPARTMENT ANALYTICS */

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin: 24px 0 34px;
}

.department-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.department-header h4 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.department-badge {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.department-badge.success {
    background: #dcfce7;
    color: #166534;
}

.department-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.department-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.department-main div {
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px;
}

.department-main span {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.department-main strong {
    font-size: 26px;
    color: #0f172a;
}

.department-progress {
    height: 12px;
    background: #fee2e2;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.department-progress-positive {
    height: 100%;
    background: #16a34a;
    border-radius: 999px;
}

.department-footer {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 16px;
}

.department-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.department-mini span {
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ALREADY SUBMITTED */

.already-page {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.already-card {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 28px;
    padding: 50px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
}

.already-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fef3c7;
    color: #c89b3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
}

.already-card h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1.2;
    color: #0f172a;
}

.already-text {
    margin: 0;
    font-size: 22px;
    line-height: 1.5;
    color: #1e293b;
}

.already-subtext {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #64748b;
}

.already-btn {
    margin-top: 10px;
    min-width: 220px;
}

/* MOBILE */

@media (max-width: 1100px) {
    .brand-title {
        font-size: 42px;
        letter-spacing: 6px;
    }

    .stats-grid,
    .charts-grid,
    .five-cols {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

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

    .header-inner {
        min-height: auto;
        padding: 18px 0;
        flex-direction: column;
        gap: 14px;
    }

    .brand-logo {
        position: static;
        height: 72px;
    }

    .brand {
        flex-direction: column;
        gap: 10px;
    }

    .brand-title {
        font-size: 32px;
        letter-spacing: 4px;
        text-align: center;
    }

    .header-nav {
        position: static;
        gap: 18px;
    }

    .card {
        padding: 24px;
    }

    .card h1,
    .card h2 {
        font-size: 32px;
    }

    .filter-grid,
    .department-main {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .report-actions {
        flex-direction: column;
    }

    .alert-item {
        flex-direction: column;
    }

    .already-card {
        padding: 36px 24px;
    }

    .already-card h2 {
        font-size: 30px;
    }

    .already-text {
        font-size: 18px;
    }

    .already-subtext {
        font-size: 15px;
    }

    .already-btn {
        width: 100%;
    }
}

.floor-accordion {
    display: grid;
    gap: 16px;
    margin: 24px 0 34px;
}

.floor-group {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: visible;
}

.floor-toggle {
    width: 100%;
    border: none;
    background: #ffffff;
    color: #0f172a;
    padding: 22px 24px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    text-align: left;
    font-size: 22px;
    font-weight: 800;
}

.floor-toggle strong {
    color: #b91c1c;
    font-size: 16px;
}

.floor-rooms {
    max-height: 0;
    opacity: 0;
    overflow: hidden;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;

    padding: 0 24px;

    transition: max-height 0.45s ease,
    opacity 0.35s ease,
    padding 0.35s ease;
}

.floor-group.is-open .floor-rooms {
    max-height: 1000px;
    opacity: 1;
    padding: 8px 24px 24px;
}

.floor-rooms .heatmap-room {
    min-height: 140px;
}

.issue-detail-header {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.back-link:hover {
    color: #c89b3c;
}

.issue-question {
    margin-top: 12px;
    color: #334155;
    font-size: 18px;
    line-height: 1.5;
}

.issue-status {
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.issue-status-open {
    background: #fee2e2;
    color: #991b1b;
}

.issue-status-clear {
    background: #dcfce7;
    color: #166534;
}