* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #eff8b8;
    color: #1f3323;
}

.public-header {
    height: 64px;
    background: #2f683d;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 9%;
}

.public-header strong {
    font-size: 22px;
}

.public-header nav {
    display: flex;
    gap: 20px;
}

.public-header a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}

.patient-page {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 18px;
}

.patient-hero {
    margin-bottom: 20px;
}

.patient-hero h1 {
    color: #2f683d;
    margin-bottom: 8px;
}

.patient-form {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 14px 30px rgba(47, 104, 61, 0.14);
}

.patient-form h3 {
    color: #2f683d;
    margin: 18px 0 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #dfe8dc;
    border-radius: 12px;
    padding: 0 14px;
    height: 44px;
    outline: none;
}

textarea {
    min-height: 80px;
    padding: 12px 14px;
    resize: vertical;
}

small {
    display: block;
    color: #6d7f6f;
    margin-top: 6px;
}

button {
    margin-top: 22px;
    border: none;
    background: #2f683d;
    color: #ffffff;
    height: 48px;
    border-radius: 12px;
    padding: 0 24px;
    font-weight: 800;
    cursor: pointer;
}

.public-footer {
    text-align: center;
    padding: 22px;
    background: #2f683d;
    color: #d9ead6;
    margin-top: 40px;
}

.notice-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.notice-modal.show {
    display: flex;
}

.notice-card {
    width: 360px;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    text-align: center;
}

.notice-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2f683d;
    color: #ffffff;
    margin: 0 auto 16px;
    font-size: 28px;
}

.notice-icon.error {
    background: #b42323;
}

.success-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.success-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    max-width: 480px;
    box-shadow: 0 14px 30px rgba(47, 104, 61, 0.14);
}

.appointment-code {
    background: #eff8b8;
    color: #2f683d;
    font-size: 26px;
    font-weight: 900;
    padding: 16px;
    border-radius: 14px;
    margin: 20px 0;
}

.success-card a {
    display: inline-block;
    background: #2f683d;
    color: #ffffff;
    padding: 13px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
}

.flatpickr-day.selected {
    background: #2f683d !important;
    border-color: #2f683d !important;
}

@media (max-width: 800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .public-header {
        padding: 0 18px;
    }

    .public-header nav {
        gap: 10px;
    }
}
.status-form {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 22px;
}

.status-form input {
    flex: 1;
}

.status-form button {
    margin-top: 0;
}

.status-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 14px 30px rgba(47, 104, 61, 0.14);
}

.error-card {
    text-align: center;
}

.status-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.status-header h2 {
    margin: 0 0 6px;
    color: #2f683d;
}

.status-header p {
    margin: 0;
    color: #6d7f6f;
}

.status-badge {
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    background: #eef3ed;
    color: #446145;
}

.status-badge.pending {
    background: #fff4d9;
    color: #a36a00;
}

.status-badge.waiting,
.status-badge.approved {
    background: #e2f3ff;
    color: #12669c;
}

.status-badge.serving {
    background: #f1e7ff;
    color: #673ab7;
}

.status-badge.completed {
    background: #dff7e5;
    color: #1b7a37;
}

.status-badge.cancelled,
.status-badge.no_show {
    background: #ffe4e4;
    color: #b42323;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.status-grid div {
    background: #f8fbf4;
    border: 1px solid #e2ebdf;
    border-radius: 16px;
    padding: 16px;
}

.status-grid i {
    color: #2f683d;
    margin-bottom: 10px;
}

.status-grid span {
    display: block;
    color: #6d7f6f;
    font-size: 12px;
    margin-bottom: 5px;
}

.status-grid strong {
    color: #1f3323;
    font-size: 14px;
}

@media (max-width: 800px) {
    .status-form {
        flex-direction: column;
        align-items: stretch;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .status-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
.file-upload-box {
    width: 100%;
    min-height: 92px;
    border: 2px dashed #cfdcc8;
    border-radius: 16px;
    background: #f8fbf4;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.file-upload-box:hover {
    border-color: #2f683d;
    background: #f1f8ed;
}

.file-upload-box input[type="file"] {
    display: none;
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #dff7e5;
    color: #2f683d;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.file-upload-text strong {
    display: block;
    color: #263f28;
    font-size: 14px;
}

.file-upload-text small {
    color: #6d7f6f;
    font-size: 12px;
}
.file-upload-box input[type="file"] {
    display: none !important;
}
/* =========================================================
   Patient public homepage
========================================================= */

.patient-home-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #eff8b8;
}

.public-header nav .active {
    font-weight: 700;
}

.public-header .login-link {
    padding: 8px 14px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
}

.home-page {
    width: min(1000px, calc(100% - 36px));
    margin: 0 auto;
    flex: 1;
    padding: 56px 0 46px;
}

.home-hero {
    max-width: 700px;
    margin: 0 auto 38px;
    text-align: center;
}

.home-hero h1 {
    margin: 0 0 16px;
    color: #2f683d;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
}

.home-hero p {
    max-width: 660px;
    margin: 0 auto;
    color: #416849;
    font-size: 15px;
    line-height: 1.6;
}

.home-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 38px;
    margin-bottom: 46px;
}

.home-action-card {
    min-height: 190px;
    padding: 26px 20px;
    border-radius: 12px;
    background: #ffffff;
    color: inherit;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(47, 104, 61, 0.2);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.home-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(47, 104, 61, 0.25);
}

.home-action-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #a8d6a5;
    color: #2f683d;
    font-size: 25px;
}

.home-action-card h2 {
    margin: 0 0 14px;
    color: #5b985f;
    font-size: 17px;
}

.home-action-card p {
    margin: 0;
    color: #7aa47b;
    font-size: 13px;
    line-height: 1.5;
}

.how-it-works-card {
    padding: 25px 30px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(47, 104, 61, 0.2);
}

.how-it-works-card h2 {
    margin: 0 0 20px;
    color: #2f683d;
    font-size: 18px;
}

.how-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

.how-step:last-child {
    margin-bottom: 0;
}

.how-step span {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2f683d;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.how-step p {
    margin: 0;
    color: #6c946d;
    font-size: 13px;
    line-height: 1.5;
}

.home-footer {
    margin-top: 0;
}

@media (max-width: 800px) {
    .home-page {
        padding-top: 38px;
    }

    .home-action-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-action-card {
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .public-header {
        height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
        flex-direction: column;
        gap: 12px;
    }

    .public-header nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .home-hero h1 {
        font-size: 29px;
    }

    .how-it-works-card {
        padding: 22px 20px;
    }

    .how-step {
        align-items: flex-start;
    }
}