:root {
    /* Light green branding */
    --primary:       #2f7d4d; /* deep green */
    --primary-dark:  #205c3b; /* darker green */
    --primary-light: #eaf8ee; /* light green tint */
    --primary-xlight:#f7fff9; /* very light */
    --accent:        #7ccf8a; /* soft leaf green accent */
    --accent-dark:   #5bb46d; /* darker green accent */
    --gold:          #d7b054;
    --bg:            #f5faf6; /* soft greenish background */
    --danger:        #ef4444;
}
* { 
    box-sizing: border-box; 
}
body { 
    background: var(--bg); 
    font-family: 'Segoe UI', Arial, sans-serif; 
    font-size: 14px; 
}
.top-bar { 
    background: var(--primary-dark); 
    color: rgba(255,255,255,.85); 
    font-size: 11.5px; 
    padding: 5px 0; 
}
.site-header { 
    background: #fff; 
    border-bottom: 3px solid var(--primary);
    padding: 14px 0; 
    box-shadow: 0 1px 4px rgba(0,0,0,.06); 
}
.logo-wrap { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}
.logo-icon { 
    width: 46px; 
    height: 46px; 
    background: var(--primary); 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    font-size: 20px; 
}
.logo-title { 
    font-size: 17px; 
    font-weight: 700; 
    color: var(--primary-dark); 
    line-height: 1.2; 
}
.logo-sub { 
    font-size: 11px; 
    color: #777; 
    text-transform: uppercase; 
    letter-spacing: .5px; 
}
.header-badge { 
    background: var(--primary); 
    color: #fff; 
    font-size: 11px; 
    font-weight: 700; 
    padding: 5px 14px; 
    border-radius: 20px; 
    letter-spacing: .5px; 
}
.page-banner {
    position: relative;
    overflow: hidden;
    /* Banner uses the light green brand palette */
    background: linear-gradient(135deg, #2f7d4d 0%, #2f7d4d 55%, #7ccf8a 100%);
    color: #fff;
    padding: 32px 0 30px;
    box-shadow: 0 10px 30px rgba(47,125,77,0.18);
}
.page-banner::before,
.page-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
}
.page-banner::before {
    width: 260px;
    height: 260px;
    top: -90px;
    right: -60px;
}
.page-banner::after {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: -40px;
}
.page-banner .banner-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.page-banner .banner-content {
    max-width: 680px;
}
.page-banner .banner-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.24);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.page-banner h4 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.page-banner p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.6;
}
.page-banner .banner-sub {
    color: rgba(255,255,255,0.8);
}
.banner-steps {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.banner-step {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
}
.banner-step.active {
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.page-banner .banner-highlight {
    flex-shrink: 0;
}
.page-banner .banner-highlight-card {
    min-width: 250px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 16px 16px 14px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}
.page-banner .banner-highlight-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    color: #ecfeff;
}
.page-banner .banner-highlight-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}
.page-banner .banner-highlight-card li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.95);
}
.page-banner .banner-highlight-card li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .page-banner {
        padding: 28px 0 26px;
    }
    .page-banner .banner-shell {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-banner .banner-highlight-card {
        width: 100%;
        min-width: 0;
    }
    .page-banner h4 {
        font-size: 20px;
    }
}
.form-card { 
    background: #fff; 
    border: 1px solid #f3e6f7; 
    border-radius: 10px; 
    overflow: hidden; 
    margin-bottom: 18px; 
    box-shadow: 0 1px 6px rgba(59,11,79,.07); 
}
.form-card-header { 
    background: var(--primary-xlight); 
    border-bottom: 1px solid #f3e6f7; 
    padding: 10px 18px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 12.5px; 
    font-weight: 700; 
    color: var(--primary-dark); 
    text-transform: uppercase; 
    letter-spacing: .5px; 
}
.form-card-header i { 
    font-size: 15px; 
}
.form-card-body { 
    padding: 20px 18px; 
}
.form-label { 
    font-size: 12.5px; 
    font-weight: 600; 
    color: #374151; 
    margin-bottom: 5px; 
}
.required { 
    color: #ef4444; 
}
.form-control, .form-select { 
    font-size: 13px; 
    border-color: #d1d5db; 
    border-radius: 6px; 
    padding: 8px 12px; 
    transition: border-color .2s, box-shadow .2s; 
}
    .form-control:focus, .form-select:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(255,122,0,.12); 
    outline: none; 
}
.form-control.is-invalid { 
    border-color: #ef4444; 
}
.invalid-feedback { 
    font-size: 11.5px; 
    color: #ef4444; 
}
.form-text { 
    font-size: 11px; 
    color: #6b7280; 
    margin-top: 4px; 
}
.input-group-text { 
    background: var(--primary-xlight); 
    border-color: #d1d5db; color: var(--primary-dark); 
    font-size: 14px; 
}
.file-drop { 
    border: 2px dashed #f4e6f7; 
    border-radius: 8px; 
    padding: 22px 14px; 
    text-align: center; 
    cursor: pointer; 
    position: relative; 
    transition: all .2s; 
    background: #fff; 
}
.file-drop:hover { 
    border-color: var(--primary); 
    background: var(--primary-xlight); 
}
.file-drop input[type="file"] { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    cursor: pointer; 
    width: 100%; 
    height: 100%; 
}
.file-drop .drop-icon { 
    font-size: 26px; 
    color: var(--primary); 
    margin-bottom: 6px; 
}
.file-drop .drop-title { 
    font-size: 12.5px; 
    font-weight: 600; 
    color: #374151; 
}
.file-drop .drop-sub { 
    font-size: 11px; 
    color: #9ca3af; 
    margin-top: 2px; 
}
.file-drop .drop-badge { 
    display: none; 
    background: var(--primary-light); 
    color: var(--primary-dark); 
    font-size: 11px; 
    font-weight: 600; 
    padding: 3px 10px; 
    border-radius: 20px;
    margin-top: 6px; 
}
.file-drop.selected { 
    border-color: var(--primary); 
    background: var(--primary-xlight); 
}
.file-drop.selected .drop-badge { 
    display: inline-block; 
}
.file-drop.error { 
    border-color: #ef4444; 
    background: #fff5f5; 
}
.file-error { 
    font-size: 11.5px; 
    color: #ef4444; 
    margin-top: 5px; 
    display: none; 
}
.file-error.show { 
    display: block; 
}
.notice-teal { 
    background: var(--primary-xlight); 
    border: 1px solid #d7b1f0; 
    border-left: 4px solid var(--primary); 
    border-radius: 6px; 
    padding: 12px 14px; 
    font-size: 12.5px; 
    color: #3a1838; 
}
.notice-yellow { 
    background: #fffbeb; 
    border: 1px solid #fcd34d; 
    border-left: 4px solid var(--gold); 
    border-radius: 6px; 
    padding: 12px 14px; 
    font-size: 12.5px; 
    color: #78350f; 
}
.photo-sample-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.photo-sample-card {
    min-width: 0; /* allow grid items to shrink below the image's intrinsic size */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.photo-sample-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
.photo-sample-label {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    padding: 6px 4px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}
.photo-sample-card.is-good {
    border-color: var(--primary);
}
.photo-sample-card.is-good .photo-sample-label {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.photo-sample-card.is-bad {
    border-color: #fca5a5;
}
.photo-sample-card.is-bad .photo-sample-label {
    background: #fff5f5;
    color: #dc2626;
}
@media (max-width: 576px) {
    .photo-sample-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .photo-sample-label {
        font-size: 10.5px;
        padding: 5px 3px;
    }
}

.btn-primary-custom { 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 14px; 
    padding: 11px 0; 
    width: 100%; 
    transition: background .2s, transform .1s; 
    letter-spacing: .3px; 
}
.btn-primary-custom:hover { 
    background: #27643a; 
    color: #fff; 
}
.btn-primary-custom:active { 
    background: #27643a;
    color: #fff;
    transform: scale(.99);
    box-shadow: inset 0 3px 6px rgba(0,0,0,.22);
}
.btn-primary-custom:focus-visible,
.btn-modal-proceed:focus-visible,
.btn-photo-action:focus-visible {
    outline: 3px solid #174b2a;
    outline-offset: 2px;
}
.btn-primary-custom:disabled { 
    background: #9ca3af; 
    cursor: not-allowed; 
}
.btn-outline-danger-custom {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 0;
    width: 100%;
    transition: background .2s, color .2s, transform .1s;
    letter-spacing: .3px;
}

.btn-outline-danger-custom:hover {
    background: var(--danger);
    color: #fff;
}

.btn-outline-danger-custom:active {
    transform: scale(.99);
}

.btn-outline-danger-custom:disabled {
    border-color: #9ca3af;
    color: #9ca3af;
    background: transparent;
    cursor: not-allowed;
}
.modal-header-teal { 
    background: var(--primary); 
    color: #fff; 
    padding: 14px 20px; 
}
.modal-header-teal .btn-close { 
    filter: brightness(0) invert(1); 
    opacity: .8; 
}
.modal-title { 
    font-size: 15px; 
    font-weight: 700; 
}
.privacy-scroll { 
    max-height: 300px; 
    overflow-y: auto; 
    font-size: 13px; 
    color: #374151; 
    line-height: 1.7; 
    padding-right: 4px; 
}
.privacy-scroll::-webkit-scrollbar { 
    width: 5px; 
}
.privacy-scroll::-webkit-scrollbar-thumb { 
    background: #d7b1f0; 
    border-radius: 4px; 
}
.privacy-scroll h6 { 
    color: var(--primary-dark); 
    font-weight: 700; 
    margin-top: 14px; 
    font-size: 13px; 
}
.modal-agree-check { 
    background: var(--primary-xlight); 
    border: 1px solid #d7b1f0; 
    border-radius: 6px; 
    padding: 12px 14px; 
    margin-top: 14px; 
}
.modal-agree-check .form-check-label { 
    font-size: 12.5px; 
    font-weight: 600; 
    color: #3a1838; 
    cursor: pointer; 
}
.btn-modal-proceed { 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    font-weight: 700; 
    font-size: 13px; 
    padding: 9px 24px; 
    border-radius: 6px; 
    transition: background .2s; 
}
.btn-modal-proceed:hover { 
    background: #27643a; 
    color: #fff; 
}
.btn-modal-proceed:active:not(:disabled) {
    background: #27643a;
    color: #fff;
    box-shadow: inset 0 3px 6px rgba(0,0,0,.22);
}
.btn-modal-proceed:disabled { 
    background: #9ca3af; 
    cursor: not-allowed; 
}
.otp-field { 
    font-size: 30px; 
    font-weight: 700; 
    letter-spacing: 12px; 
    text-align: center; 
    border-radius: 8px; 
    border: 2px solid #d1d5db; 
    padding: 12px; width: 100%; 
    color: var(--primary-dark); 
    transition: border-color .2s, box-shadow .2s; 
}
.otp-field:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(255,122,0,.12); 
    outline: none; 
}
.countdown-text { 
    font-size: 12.5px; 
    color: #6b7280; 
}
.countdown-text.expired { 
    color: #ef4444; 
    font-weight: 600; 
}
.countdown-text span { 
    font-weight: 700; 
    color: var(--primary-dark); 
}
.site-footer { 
    background: var(--primary-dark); 
    color: rgba(255,255,255,.6); 
    font-size: 12px; 
    padding: 18px 0; 
    margin-top: 50px; 
    text-align: center; 
}
#loadingOverlay { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,.5); 
    z-index: 9999; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
    gap: 14px; 
}
#loadingOverlay.show { 
    display: flex; 
}
#loadingOverlay p { 
    color: #fff; 
    font-size: 14px; 
    font-weight: 600; 
    margin: 0; 
}
/* ── Photo Capture ── */
.photo-wrap {
    border: 2px dashed var(--primary-light);
    border-radius: 10px;
    background: var(--primary-xlight);
    padding: 16px;
    text-align: center;
    position: relative;
    width: 100%;
}
.photo-wrap.has-photo { 
    border-color: var(--primary); 
    border-style: solid; 
}
.photo-preview {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #f3e6f7;
    display: none;
    margin: 0 auto 10px;
}
.photo-preview.show { 
    display: block; 
}
.photo-placeholder {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    background: #e5e7eb;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #9ca3af;
    font-size: 12px;
    gap: 6px;
}
.photo-placeholder i { 
    font-size: 36px; 
}
.photo-btn-row { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    flex-wrap: wrap; 
    margin-top: 6px; 
}
.btn-photo-action {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s;
}
.btn-capture  { 
    background: var(--primary); 
    color: #fff; 
}
.btn-photo-action:active {
    filter: brightness(.72);
    transform: translateY(1px);
}
.btn-capture:hover  { 
    background: #27643a; 
}
.btn-upload-photo  { 
    background: #e5e7eb; 
    color: #374151; 
}
.btn-upload-photo:hover  { 
    background: #d1d5db; 
}
.btn-retake   { 
    background: #27643a; 
    color: #fff; 
}
.btn-retake:hover   { 
    background: #205c3b; 
}
#photoFileInput { 
    display: none; 
}

/* Camera stream */
.camera-wrap { 
    display: none; 
    margin-bottom: 10px; 
}
.camera-wrap.show { 
    display: block; 
}
.camera-preview-wrap {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid var(--primary);
    margin: 0 auto 8px;
    background: #111827;
}
#cameraStream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}
.camera-head-guide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .55;
}
.camera-guide-label {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 600;
    margin: 0 auto 8px;
}
.btn-snap { 
    background: var(--primary); 
    color: #fff; 
}
.btn-snap:hover { 
    background: #27643a; 
}
.btn-cancel-cam { 
    background: #e5e7eb; 
    color: #374151; 
}
.btn-cancel-cam:hover { 
    background: #d1d5db; 
}

/* Photo notice */
.photo-notice {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: #78350f;
    margin-top: 10px;
    text-align: left;
}
.photo-error { 
    font-size: 11.5px; 
    color: #ef4444; 
    margin-top: 6px; 
    display: none; 
}
.photo-error.show { 
    display: block; 
}
.notice-red {
    background-color: #fee2e2;
    border: 2px solid #dc2626;
    border-left: 6px solid #dc2626;
    color: #991b1b;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 13px;
    animation: pulse-border 1.5s ease-in-out 3;
}

@keyframes pulse-border {
    0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50%  { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

@media (max-width: 576px) {
    .page-banner {
        padding: 18px 0 16px;
    }
    .page-banner::before,
    .page-banner::after {
        display: none; /* decorative circles */
    }
    .page-banner .banner-pill {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }
    .page-banner h4 {
        font-size: 17px;
        line-height: 1.25;
        margin-bottom: 6px;
    }
    .page-banner p {
        font-size: 12px;
        line-height: 1.45;
    }
    .page-banner .banner-sub {
        margin-top: 2px;
    }
}

em.en { font-style: italic; font-weight: 400; }
.btn em.en, .btn-modal-proceed em.en { font-size: 11.5px; opacity: .9; }