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

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    background-color: #f0f2f5;
    color: #333;
}

/* ============ LOGO HEADER ============ */
.logo-header {
    background: #ffffff;
    padding: 14px 30px;
    border-bottom: 3px solid #F05236;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
}

.logo-header img {
    max-width: 280px;
    height: auto;
}

.form-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-container h1 {
    text-align: center;
    color: #4D4D4D;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 800;
}

.form-container .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 400;
}

.form-container .form-title {
    text-align: center;
    color: #4D4D4D;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

/* ============ TERMS & CONDITIONS ============ */
.terms-box {
    background: #ffffff;
    border: 2px solid #F05236;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.terms-main-title {
    color: #fff;
    background: #F05236;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    padding: 18px 24px;
    margin: 0;
}

.terms-intro {
    text-align: center;
    color: #888;
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
    padding: 14px 24px 0 24px;
}

.terms-scroll {
    padding: 20px 30px;
    max-height: 600px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.terms-scroll::-webkit-scrollbar { width: 6px; }
.terms-scroll::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 3px; }
.terms-scroll::-webkit-scrollbar-thumb { background: #F05236; border-radius: 3px; }

.terms-progress { height: 4px; background: #eee; margin: 0; }
.terms-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #F05236, #ff7b5a); transition: width 0.3s ease; border-radius: 0 2px 2px 0; }
.terms-progress-text { text-align: center; font-size: 12px; color: #888; padding: 6px 0; margin: 0; font-weight: 500; transition: color 0.3s; }

.terms-section { margin-bottom: 4px; border-bottom: 1px solid #eee; }
.terms-section-last { border-bottom: none; }

.terms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.terms-section-header:hover { opacity: 0.8; }
.terms-section-header h3 { color: #4D4D4D; font-size: 16px; font-weight: 700; margin: 0; flex: 1; }
.section-number { color: #F05236; font-weight: 800; margin-right: 4px; }
.toggle-icon { color: #F05236; font-size: 12px; font-weight: 700; min-width: 20px; text-align: center; transition: transform 0.3s; }

.terms-section-body { overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease; }
.terms-section-body.open { max-height: 2000px; opacity: 1; padding-bottom: 16px; }
.terms-section-body.closed { max-height: 0; opacity: 0; padding-bottom: 0; }

.terms-section h4 { color: #F05236; font-size: 14px; font-weight: 700; margin-top: 14px; margin-bottom: 8px; padding-left: 10px; border-left: 3px solid #F05236; }
.terms-sub-section { margin-bottom: 10px; }
.terms-section p { font-size: 14px; color: #4D4D4D; line-height: 1.8; margin-bottom: 10px; font-weight: 400; }
.terms-section ul { margin: 8px 0 12px 28px; padding: 0; }
.terms-section ul li { font-size: 14px; color: #4D4D4D; line-height: 1.8; margin-bottom: 5px; list-style-type: disc; font-weight: 400; }
.terms-section ul ul { margin-top: 6px; margin-bottom: 6px; margin-left: 22px; }
.terms-section ul ul li { list-style-type: circle; font-size: 13px; }
.terms-section strong { color: #333; font-weight: 700; }

.terms-agree { background: #fef9f8; border-top: 2px solid #F05236; padding: 18px 30px; }
.terms-agree label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: #4D4D4D; font-weight: 600; }
.terms-agree input[type="checkbox"] { min-width: 22px; min-height: 22px; accent-color: #F05236; cursor: pointer; -webkit-appearance: checkbox !important; appearance: checkbox !important; }

/* Form Lock */
.form-hidden { display: none; }
.form-visible { display: block; animation: fadeSlideIn 0.6s ease-out; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.form-locked-msg {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
}

.form-locked-msg p {
    color: #999;
    font-size: 15px;
    font-weight: 500;
}

.fixed-field { background: #f0f0f0 !important; color: #F05236 !important; font-weight: 700 !important; cursor: not-allowed; border: 1px solid #ddd !important; }

/* ============ FORM ELEMENTS ============ */
.section-title { font-weight: 700; background: #4D4D4D; color: #fff; padding: 10px 16px; border-radius: 6px; margin: 25px 0 15px 0; font-size: 16px; letter-spacing: 0.3px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; color: #4D4D4D; font-size: 14px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="checkbox"] { width: auto !important; -webkit-appearance: checkbox !important; appearance: checkbox !important; }
.form-group select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234D4D4D' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #F05236; box-shadow: 0 0 0 3px rgba(240, 82, 54, 0.1); }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Validation Error */
.validation-error {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #e74c3c;
    border-radius: 6px;
}

/* ============ DECLARATION BOX ============ */
.declaration-box { background: #fef9f8; border: 2px solid #F05236; border-radius: 8px; padding: 18px 20px; margin: 20px 0; transition: border-color 0.3s; }
.declaration-label { display: flex !important; align-items: center; gap: 12px; cursor: pointer; font-size: 15px !important; font-weight: 700 !important; color: #4D4D4D; margin-bottom: 0 !important; }
.declaration-checkbox { min-width: 24px !important; min-height: 24px !important; width: 24px !important; height: 24px !important; accent-color: #F05236; cursor: pointer; -webkit-appearance: checkbox !important; appearance: checkbox !important; flex-shrink: 0; }

/* ============ CHECKBOX CARDS ============ */
.licence-instruction { font-size: 13px; color: #888; margin-bottom: 12px; font-style: italic; font-weight: 400; }
.checkbox-grid { display: flex; flex-direction: column; gap: 8px; }
.checkbox-card { border: 2px solid #ddd; border-radius: 8px; padding: 0; transition: all 0.2s; background: #fff; overflow: hidden; }
.checkbox-card:hover { border-color: #F05236; background: #fef9f8; }
.checkbox-card.mandatory { border-color: #F05236; background: #fef9f8; }
.checkbox-card-label { display: flex !important; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 400 !important; margin-bottom: 0 !important; }
.checkbox-card-select { width: 100%; }
.checkbox-card-select .checkbox-card-label { padding-bottom: 8px; }
.licence-checkbox { width: 22px !important; min-width: 22px !important; height: 22px !important; min-height: 22px !important; accent-color: #F05236; cursor: pointer; flex-shrink: 0; -webkit-appearance: checkbox !important; appearance: checkbox !important; }
.checkbox-card-text { font-size: 14px; color: #4D4D4D; line-height: 1.4; flex: 1; font-weight: 400; }
.mandatory-star { color: #F05236; font-weight: 800; font-size: 16px; }
.mandatory-badge { display: inline-block; background: #F05236; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 8px; letter-spacing: 0.5px; vertical-align: middle; }

.licence-select-wrap { padding: 0 16px 14px 50px; animation: fadeSlideIn 0.3s ease-out; }
.licence-select { width: 100%; padding: 10px 14px; border: 2px solid #F05236; border-radius: 6px; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: 400; color: #4D4D4D; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23F05236' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.licence-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(240, 82, 54, 0.15); }

.btn-submit { display: block; width: 100%; padding: 16px; background: #F05236; color: #fff; border: none; border-radius: 6px; font-size: 18px; font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: 0.5px; cursor: pointer; margin-top: 30px; transition: background 0.3s, transform 0.2s; -webkit-appearance: none; }
.btn-submit:hover { background: #d9432a; transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

.required::after { content: " *"; color: #F05236; }

/* ============ SUCCESS PAGE ============ */
.success-header {
    text-align: center;
    margin-bottom: 30px;
}

.success-check {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #2ecc71;
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-header h1 {
    font-size: 26px;
    color: #4D4D4D;
    font-weight: 800;
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

.reference-box {
    background: #f8f8f8;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    margin-bottom: 30px;
}

.ref-label {
    font-size: 13px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ref-id {
    font-size: 28px;
    font-weight: 800;
    color: #F05236;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.ref-note {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* Pay Estimate */
.pay-estimate-box {
    background: #fef9f8;
    border: 2px solid #F05236;
    border-radius: 10px;
    padding: 30px;
    margin-top: 10px;
}

.pay-estimate-box h2 {
    font-size: 22px;
    font-weight: 800;
    color: #4D4D4D;
    text-align: center;
    margin-bottom: 10px;
}

.pay-estimate-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: #4D4D4D;
    margin: 24px 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #F05236;
}

.pay-disclaimer {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.pay-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.pay-card {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.pay-card-highlight {
    border: 2px solid #F05236;
    background: #fff;
}

.pay-card-label {
    font-size: 11px;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pay-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #4D4D4D;
}

.pay-rate {
    color: #F05236 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
}

.pay-breakdown {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.pay-row:last-child { border-bottom: none; }
.pay-row-label { color: #4D4D4D; font-weight: 500; }
.pay-row-value { color: #4D4D4D; font-weight: 700; }
.pay-row.deduction .pay-row-value { color: #e74c3c; }
.pay-row.credit .pay-row-value { color: #2ecc71; }

.pay-row-total {
    background: #4D4D4D;
    border-bottom: none;
}

.pay-row-total .pay-row-label { color: #fff; font-weight: 700; }
.pay-row-total .pay-row-value { color: #fff; font-weight: 800; font-size: 16px; }

.pay-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pay-freq-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.freq-label {
    font-size: 11px;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.freq-value {
    font-size: 18px;
    font-weight: 700;
    color: #F05236;
}

.pay-extra {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 14px;
    overflow: hidden;
}

.pay-footnote {
    font-size: 11px;
    color: #999;
    line-height: 1.6;
    margin-top: 18px;
    font-style: italic;
    font-weight: 400;
}

.back-home-btn {
    display: inline-block;
    background: #F05236;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    padding: 14px 40px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.back-home-btn:hover { background: #d9432a; transform: translateY(-2px); }

/* ============ TABLET ============ */
@media (max-width: 768px) {
    .logo-header { padding: 12px 20px; }
    .logo-header img { max-width: 220px; }
    .form-container { margin: 20px 16px; padding: 28px 24px; }
    .form-container h1, .form-container .form-title { font-size: 24px; }
    .terms-main-title { font-size: 18px; padding: 14px 18px; }
    .terms-scroll { padding: 18px 20px; max-height: 500px; }
    .terms-section-header h3 { font-size: 15px; }
    .terms-section h4 { font-size: 13px; }
    .terms-section p, .terms-section ul li { font-size: 13px; line-height: 1.7; }
    .terms-agree { padding: 14px 20px; }
    .form-row { flex-direction: column; gap: 0; }
    .section-title { font-size: 15px; padding: 9px 14px; }
    .checkbox-card-label { padding: 12px 14px; }
    .checkbox-card-text { font-size: 13px; }
    .licence-select-wrap { padding-left: 46px; }
    .declaration-box { padding: 14px 16px; }
    .btn-submit { font-size: 16px; padding: 14px; }
    .pay-summary { flex-direction: column; }
    .pay-grid { grid-template-columns: repeat(2, 1fr); }
    .pay-rate { font-size: 20px !important; }
    .ref-id { font-size: 22px; letter-spacing: 2px; }
}

/* ============ PHONE ============ */
@media (max-width: 480px) {
    .logo-header { padding: 10px 14px; }
    .logo-header img { max-width: 180px; }
    .form-container { margin: 10px 8px; padding: 20px 16px; border-radius: 8px; }
    .form-container h1, .form-container .form-title { font-size: 20px; margin-bottom: 20px; }
    .terms-main-title { font-size: 15px; padding: 12px 14px; }
    .terms-intro { font-size: 12px; padding: 10px 14px 0 14px; }
    .terms-scroll { padding: 16px 14px; max-height: 400px; }
    .terms-section-header { padding: 12px 0; }
    .terms-section-header h3 { font-size: 14px; }
    .terms-section h4 { font-size: 13px; }
    .terms-section p, .terms-section ul li { font-size: 13px; line-height: 1.6; }
    .terms-section ul { margin-left: 20px; }
    .terms-agree { padding: 14px; }
    .terms-agree label { font-size: 13px; }
    .form-group label { font-size: 13px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 12px; }
    .section-title { font-size: 14px; padding: 8px 12px; margin: 20px 0 12px 0; }
    .form-row { flex-direction: column; gap: 0; }
    .checkbox-card-label { padding: 12px; gap: 10px; }
    .checkbox-card-text { font-size: 13px; }
    .mandatory-badge { display: block; margin-left: 0; margin-top: 4px; width: fit-content; }
    .licence-select-wrap { padding: 0 12px 12px 44px; }
    .licence-select { font-size: 16px; }
    .declaration-box { padding: 14px; }
    .declaration-label { font-size: 14px !important; }
    .btn-submit { font-size: 16px; padding: 14px; margin-top: 20px; }
    .form-locked-msg { padding: 24px 14px; }
    .form-locked-msg p { font-size: 13px; }
    .success-check { width: 56px; height: 56px; font-size: 28px; }
    .success-header h1 { font-size: 22px; }
    .ref-id { font-size: 18px; letter-spacing: 1px; }
    .pay-estimate-box { padding: 20px 16px; }
    .pay-estimate-box h2 { font-size: 18px; }
    .pay-estimate-box h3 { font-size: 14px; }
    .pay-summary { flex-direction: column; }
    .pay-grid { grid-template-columns: repeat(2, 1fr); }
    .pay-card { padding: 12px; }
    .pay-card-value { font-size: 16px; }
    .pay-rate { font-size: 20px !important; }
    .pay-row { padding: 10px 14px; font-size: 13px; }
    .freq-value { font-size: 16px; }
    .back-home-btn { padding: 12px 30px; font-size: 14px; }
}