:root {
    --primary-blue: #1848a0;
    --light-bg: #e1ecf7;
    --text-dark: #001f65;
    --border-color: #1848a0;
    --white: #ffffff;
    --error-red: #d32f2f;
    --success-green: #2e7d32;
    --gradient-btn: linear-gradient(180deg, #001f65 0%, #6895fd 100%);
    
    /* Font sizes default */
    --fs-h1: 2.2rem;
    --fs-h2: 1.6rem;
    --fs-body: 1rem;
    --fs-small: 0.85rem;
}

/* 1. Base Setup & Responsive Font Root */
html {
    font-size: 16px; /* Saiz asas default */
    box-sizing: border-box;
}

*, *:before, *:after { box-sizing: inherit; }

/* Kecilkan fon sikit untuk skrin kecil (Phone) */
@media (max-width: 480px) {
    html { font-size: 14px; }
    :root {
        --fs-h1: 1.8rem;
        --fs-h2: 1.4rem;
    }
}

body { 
    margin: 0; 
    padding: 0;
    font-family: 'Outfit', sans-serif; 
    background-color: var(--light-bg); 
    min-height: 100vh;
    color: var(--text-dark);
}

/* --- HEADER SECTION --- */
.header {
    background-color: var(--primary-blue); 
    min-height: 30vh; height: auto; display: flex; 
    justify-content: center; align-items: center; color: white;
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
    padding: 40px 20px;
}
.header-content { display: flex; align-items: center; gap: 10px; flex-direction: column; text-align: center; }
.logo-img { width: clamp(120px, 40vw, 180px); height: auto; }
.header-text h1 { margin: 0; font-size: var(--fs-h1); font-weight: 800; }
.text-tukang { color: white; }
.text-now { color: #bfe5ef; }
.header-text p { opacity: 0.9; font-size: var(--fs-small); margin: 5px 0 0; }

@media (min-width: 768px) {
    .header-content { flex-direction: row; text-align: left; }
    .header { height: 35vh; }
}

/* --- SIGNUP CARD --- */
.signup-container { display: flex; justify-content: center; margin-top: -60px; padding-bottom: 50px; }
.signup-card {
    background: var(--white); padding: 2.5rem 2rem; border-radius: 30px;
    width: 90%; max-width: 480px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); text-align: center;
    box-sizing: border-box;
}

.signup-card h2 { color: var(--text-dark); font-size: var(--fs-h2); margin-bottom: 5px; }
.subtitle { color: #666; font-size: var(--fs-small); margin-bottom: 25px; }

/* --- INPUT FIELDS --- */
.input-row, .phone-input-container {
    display: flex; align-items: center; border: 2px solid var(--border-color);
    border-radius: 15px; padding: 12px 15px; margin-bottom: 15px; gap: 12px;
}
.input-row input { border: none; outline: none; width: 100%; font-size: var(--fs-body); font-family: 'Outfit', sans-serif; }
.input-icon { width: 22px; color: var(--primary-blue); flex-shrink: 0; }

/* Password Checklist */
.password-requirements { text-align: left; margin: -5px 0 20px 15px; font-size: 0.8rem; }
.requirement { transition: 0.3s; margin-bottom: 2px; }
.requirement.invalid { color: var(--error-red); }
.requirement.valid { color: var(--success-green); font-weight: bold; }

/* Phone Styling & Warning */
.country-code-box { display: flex; align-items: center; gap: 8px; border-right: 1.5px solid #ccc; padding-right: 12px; }
.flag-icon { width: 24px; }
.phone-number-box { border: none; outline: none; width: 100%; font-size: var(--fs-body); font-family: 'Outfit', sans-serif; }

.phone-error-text {
    color: var(--error-red); font-size: 0.75rem; text-align: left;
    margin-top: -10px; margin-bottom: 10px; display: none; padding-left: 15px; font-weight: bold;
}

/* --- MULTIPLE FILE UPLOAD SECTION --- */
.upload-box { cursor: pointer; border-style: dashed; background: #f8fbff; transition: 0.3s; padding: 20px; border-radius: 15px; border: 2px dashed var(--border-color); margin-bottom: 15px; font-size: var(--fs-body); }
.upload-box:hover { background: #eef6ff; }
.blue-text { color: var(--primary-blue); font-weight: bold; text-decoration: underline; }

/* --- Profile Picture Section --- */
.profile-upload-section { margin-bottom: 20px; }
.profile-preview { margin-top: 10px; display: flex; justify-content: center; }
.profile-preview img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-blue); }

.file-list-container { margin: -5px 0 20px 0; display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: var(--fs-small); }
.file-item { background: #f1f4f9; padding: 10px 15px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #d0dbe9; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* --- TERMS MODAL --- */
.modal {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px); justify-content: center; align-items: center;
    padding: 20px; box-sizing: border-box;
}

#termsModal .modal-content {
    background: white; width: 100%; max-width: 500px; border-radius: 25px;
    padding: 35px; max-height: 80vh; overflow-y: auto; 
    text-align: left; box-sizing: border-box;
}

#termsModal h3 { text-align: center; color: var(--text-dark); margin-bottom: 20px; font-size: var(--fs-h2); }
#termsModal p { font-size: var(--fs-small); line-height: 1.6; color: #333; margin-bottom: 15px; }

#closeModal {
    display: block; margin: 30px auto 10px auto; 
    background: var(--gradient-btn); color: white; border: none;
    width: 200px; padding: 14px; border-radius: 30px; cursor: pointer;
    font-weight: bold; font-family: inherit; font-size: var(--fs-body);
    box-shadow: 0 4px 15px rgba(24, 72, 160, 0.3); text-align: center;
}

/* --- STATUS MODAL --- */
.status-card {
    background: white; padding: 40px; border-radius: 25px; text-align: center;
    width: 100%; max-width: 400px; box-shadow: 0 15px 35px rgba(0,0,0,0.3); box-sizing: border-box;
}
.status-icon-circle {
    width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: white;
}
.status-card.success .status-icon-circle { background-color: var(--success-green); }
.status-card.error .status-icon-circle { background-color: var(--error-red); }
.status-card h2 { font-size: var(--fs-h2); }
.status-card p { font-size: var(--fs-body); }

#statusOkBtn {
    margin-top: 25px; width: 100%; padding: 15px; border-radius: 30px;
    border: none; background: var(--gradient-btn);
    color: white; font-weight: bold; cursor: pointer; font-size: var(--fs-body);
    box-shadow: 0 4px 15px rgba(24, 72, 160, 0.3);
}

/* --- OTHERS --- */
.terms-container { text-align: left; margin: 15px 0; font-size: var(--fs-small); display: flex; align-items: center; gap: 8px; }
.terms-link { color: var(--primary-blue); cursor: pointer; font-weight: bold; text-decoration: none; }
.btn-signup {
    width: 100%; padding: 15px; border: none; border-radius: 30px;
    background: var(--gradient-btn); color: white; font-size: var(--fs-body);
    font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px rgba(24, 72, 160, 0.3);
}

.login-link { margin-top: 20px; font-size: var(--fs-small); }
.login-link a { color: var(--primary-blue); text-decoration: none; font-weight: bold; }

/* --- RESPONSIVE FIX (480px) --- */
@media screen and (max-width: 480px) {
    .header { padding: 40px 20px 80px; }
    .signup-card { padding: 2rem 1.5rem; }
    .status-card, #termsModal .modal-content { padding: 30px 20px; }
    .status-icon-circle { width: 70px; height: 70px; font-size: 35px; }
    #closeModal { width: 100%; }
}