/* =========================================================
       ROOT
    ========================================================= */

:root {
    --primary: #a90000;
    --primary-dark: #7e0000;
    --primary-light: #c62828;

    --red-soft: #fff2f2;

    --blue: #08bde8;
    --yellow: #ffc928;
    --green: #35cc32;
    --pink: #cf3195;

    --text: #252525;
    --muted: #707070;

    --bg: #f7f7f7;
    --white: #ffffff;

    --border: #e7e7e7;

    --shadow:
        0 10px 30px rgba(0, 0, 0, .08);

    --radius: 20px;
}


/* =========================================================
       RESET
    ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
       HEADER
    ========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1180px;
    margin: auto;

    min-height: 72px;

    padding: 10px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 46px;
    height: 46px;

    object-fit: contain;
}

.brand-text strong {
    display: block;

    color: var(--primary);

    font-size: 15px;
    font-weight: 800;

    line-height: 1.2;
}

.brand-text span {
    display: block;

    color: var(--muted);

    font-size: 11px;
    margin-top: 2px;
}

.topbar-badge {
    padding: 7px 12px;

    border-radius: 999px;

    background: var(--red-soft);
    color: var(--primary);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
       MAIN
    ========================================================= */

main {
    max-width: 1180px;
    margin: auto;
    padding: 30px 20px 60px;
}


/* =========================================================
       HERO
    ========================================================= */

.hero {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(135deg,
            var(--primary),
            var(--primary-dark));

    border-radius: 28px;

    padding: 42px;

    color: white;

    box-shadow:
        0 20px 45px rgba(169, 0, 0, .18);
}

.hero::after {
    content: "";

    position: absolute;

    width: 230px;
    height: 230px;

    right: -90px;
    top: -90px;

    border: 35px solid rgba(255, 255, 255, .08);

    transform: rotate(45deg);

    border-radius: 35px;
}

.hero-logo {
    width: 62px;
    height: 62px;

    object-fit: contain;

    background: white;

    padding: 7px;

    border-radius: 16px;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(27px, 4vw, 42px);
    font-weight: 800;

    line-height: 1.15;

    margin-bottom: 8px;
}

.hero-opening {
    font-style: italic;
    font-weight: 500;

    margin-bottom: 22px;
}

.hero-description {
    max-width: 900px;

    color: rgba(255, 255, 255, .92);

    font-size: 14px;
}

.hero-guide {
    margin-top: 22px;

    background: rgba(255, 255, 255, .10);

    border: 1px solid rgba(255, 255, 255, .15);

    border-radius: 16px;

    padding: 17px 20px;
}

.hero-guide strong {
    display: block;

    margin-bottom: 8px;
}

.hero-guide ol {
    padding-left: 20px;
}

.hero-guide li {
    margin-bottom: 3px;
    font-size: 13px;
}

.hero-footer {
    margin-top: 20px;

    font-size: 13px;

    color: rgba(255, 255, 255, .9);
}


/* =========================================================
       SECTION TITLE
    ========================================================= */

.section-heading {
    margin: 42px 0 20px;
}

.section-heading h2 {
    font-size: 25px;
    font-weight: 800;

    color: var(--primary);
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}


/* =========================================================
       REPORT CARDS
    ========================================================= */

.report-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.report-card {
    position: relative;

    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 23px;

    min-height: 220px;

    display: flex;
    flex-direction: column;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, .035);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.report-card:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow);

    border-color: rgba(169, 0, 0, .25);
}

.card-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    margin-bottom: 18px;

    font-size: 24px;
}

.icon-health {
    background: #ffe8e8;
    color: #d10000;
}

.icon-permit {
    background: #fff3d4;
    color: #d08a00;
}

.icon-case {
    background: #eee6ff;
    color: #7440c9;
}

.icon-study {
    background: #e4f9ff;
    color: #009dc5;
}

.icon-room {
    background: #e7fbe7;
    color: #1b9c25;
}

.icon-facility {
    background: #ffe6f6;
    color: #b8207d;
}

.report-card h3 {
    font-size: 17px;
    font-weight: 800;

    margin-bottom: 7px;
}

.report-card p {
    color: var(--muted);

    font-size: 12px;

    flex: 1;
}

.card-button {
    margin-top: 20px;

    width: 100%;

    border: none;

    padding: 12px 15px;

    border-radius: 12px;

    background: var(--primary);

    color: white;

    font-weight: 700;

    font-size: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    transition: .2s;
}

.card-button:hover {
    background: var(--primary-dark);
}

.card-button:active {
    transform: scale(.98);
}


/* =========================================================
       MODAL
    ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 999;

    display: none;

    background: rgba(0, 0, 0, .55);

    padding: 20px;

    overflow-y: auto;
}

.modal.show {
    display: flex;

    align-items: flex-start;
    justify-content: center;
}

.modal-box {
    width: min(720px, 100%);

    margin: 30px auto;

    background: white;

    border-radius: 24px;

    overflow: hidden;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, .25);

    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    position: sticky;

    top: 0;

    z-index: 5;

    background: white;

    border-bottom: 1px solid var(--border);

    padding: 18px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-mini-icon {
    width: 42px;
    height: 42px;

    background: var(--red-soft);

    color: var(--primary);

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header h2 {
    color: var(--primary);

    font-size: 18px;

    line-height: 1.2;
}

.modal-close {
    width: 38px;
    height: 38px;

    border: none;

    border-radius: 50%;

    background: #f2f2f2;

    color: #444;

    font-size: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e5e5e5;
}

.modal-body {
    padding: 24px;
}


/* =========================================================
       FORM INTRO
    ========================================================= */

.form-intro {
    background: var(--red-soft);

    border-left: 4px solid var(--primary);

    border-radius: 12px;

    padding: 15px 17px;

    margin-bottom: 22px;

    font-size: 12px;

    color: #555;
}

.form-intro strong {
    color: var(--primary);

    display: block;

    margin-bottom: 5px;
}

.form-intro ul {
    padding-left: 18px;

    margin-top: 8px;
}


/* =========================================================
       FORM
    ========================================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    display: block;

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 7px;

    color: #333;
}

label .required {
    color: var(--primary);
}

input,
select,
textarea {
    width: 100%;

    border: 1px solid #dcdcdc;

    border-radius: 11px;

    padding: 12px 13px;

    background: white;

    color: #333;

    font-size: 13px;

    outline: none;

    transition: .2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(169, 0, 0, .08);
}

textarea {
    min-height: 110px;

    resize: vertical;
}

.hint {
    display: block;

    color: #888;

    font-size: 10px;

    margin-top: 5px;
}


/* =========================================================
       CHECKBOX
    ========================================================= */

.checkbox-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;
}

.check-option {
    position: relative;
}

.check-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.check-option label {
    cursor: pointer;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 11px;

    border: 1px solid #e1e1e1;

    border-radius: 10px;

    background: #fff;

    font-weight: 500;

    margin: 0;

    transition: .2s;
}

.check-option label::before {
    content: "";

    width: 16px;
    height: 16px;

    border: 1px solid #ccc;

    border-radius: 4px;

    flex: 0 0 auto;
}

.check-option input:checked+label {
    border-color: var(--primary);

    background: var(--red-soft);

    color: var(--primary);
}

.check-option input:checked+label::before {
    content: "✓";

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary);

    border-color: var(--primary);

    color: white;

    font-size: 10px;

    font-weight: 800;
}


/* =========================================================
       RADIO
    ========================================================= */

.radio-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;
}

.radio-option {
    position: relative;
}

.radio-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.radio-option label {
    cursor: pointer;

    padding: 11px;

    border: 1px solid #ddd;

    border-radius: 10px;

    margin: 0;

    font-weight: 500;
}

.radio-option input:checked+label {
    border-color: var(--primary);

    background: var(--red-soft);

    color: var(--primary);
}


/* =========================================================
       SUBMIT
    ========================================================= */

.form-actions {
    display: flex;

    gap: 10px;

    margin-top: 22px;
}

.btn {
    border: none;

    border-radius: 12px;

    padding: 13px 18px;

    font-size: 12px;

    font-weight: 800;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;
}

.btn-primary {
    flex: 1;

    background: var(--primary);

    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #eee;

    color: #444;
}

.btn:disabled {
    opacity: .6;

    cursor: not-allowed;
}


/* =========================================================
       LOADING
    ========================================================= */

.loading {
    display: none;

    position: fixed;

    inset: 0;

    z-index: 2000;

    background: rgba(0, 0, 0, .45);

    align-items: center;

    justify-content: center;
}

.loading.show {
    display: flex;
}

.loading-box {
    background: white;

    border-radius: 18px;

    padding: 25px 30px;

    text-align: center;

    box-shadow: var(--shadow);
}

.spinner {
    width: 35px;
    height: 35px;

    border: 4px solid #eee;

    border-top-color: var(--primary);

    border-radius: 50%;

    animation: spin .8s linear infinite;

    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-box p {
    font-size: 12px;

    color: #555;
}


/* =========================================================
       SUCCESS
    ========================================================= */

.success-message {
    display: none;

    text-align: center;

    padding: 35px 20px;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 65px;
    height: 65px;

    margin: auto auto 15px;

    border-radius: 50%;

    background: #e7f8e8;

    color: #1c9c31;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
}

.success-message h3 {
    margin-bottom: 5px;

    color: var(--primary);
}

.success-message p {
    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
       FOOTER
    ========================================================= */

footer {
    text-align: center;

    padding: 25px 20px 35px;

    color: #888;

    font-size: 11px;
}

footer strong {
    color: var(--primary);
}


/* =========================================================
       MOBILE
    ========================================================= */

@media (max-width: 800px) {

    .report-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .hero {
        padding: 30px;
    }

}


@media (max-width: 600px) {

    .topbar-inner {
        min-height: 62px;

        padding: 8px 15px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text span {
        font-size: 9px;
    }

    .topbar-badge {
        display: none;
    }

    main {
        padding:
            15px 15px 45px;
    }

    .hero {
        border-radius: 20px;

        padding: 25px 20px;
    }

    .hero-logo {
        width: 52px;
        height: 52px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero-description {
        font-size: 12px;
    }

    .hero-guide li {
        font-size: 11px;
    }

    .section-heading {
        margin-top: 30px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .report-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .report-card {
        min-height: auto;

        padding: 18px;
    }

    .card-icon {
        width: 50px;
        height: 50px;

        font-size: 20px;
    }

    .modal {
        padding: 8px;
    }

    .modal-box {
        margin: 8px auto;

        border-radius: 18px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .form-group.full {
        grid-column: auto;
    }

    .checkbox-grid,
    .radio-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

}