/* ============================================================ */
/* SIGN UP - Quasar Node (Proporsi Lebih Baik)                 */
/* ============================================================ */

/* ============================================================ */
/* RESET & BASE                                                 */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f5ff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================================ */
/* WRAPPER - Lebih Proporsional                                */
/* ============================================================ */
.signup-wrapper {
    display: flex;
    max-width: 960px;
    width: 100%;
    background: white;
    border-radius: 28px;
    box-shadow: 0 12px 48px rgba(18, 52, 106, 0.10);
    overflow: hidden;
    min-height: 640px;
}

/* ============================================================ */
/* LEFT PANEL - Lebih Proporsional                             */
/* ============================================================ */
.brand-left {
    flex: 0 0 340px;
    background: linear-gradient(145deg, #0b1f44, #1a3a6b);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.brand-left .brand-icon-lg {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #60a5fa;
    margin-bottom: 24px;
}

.brand-left .brand-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.brand-left .brand-title span {
    color: #60a5fa;
}

.brand-left .brand-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 32px;
    line-height: 1.6;
}

.brand-left .brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-left .feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.brand-left .feature-item i {
    color: #60a5fa;
    font-size: 1rem;
    width: 20px;
}

/* ============================================================ */
/* SIGNUP CARD - Spacing Lebih Baik                            */
/* ============================================================ */
.signup-card {
    flex: 1;
    padding: 40px 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.brand-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.brand-mobile .brand-icon {
    width: 38px;
    height: 38px;
    background: #2563eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.brand-mobile .brand-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0b1f44;
}

.brand-mobile .brand-text span {
    color: #2563eb;
}

/* ============================================================ */
/* WELCOME - Spacing Lebih Baik                               */
/* ============================================================ */
.welcome {
    margin-bottom: 24px;
}

.welcome h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0b1f44;
    letter-spacing: -0.3px;
}

.welcome p {
    color: #5a7aa3;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ============================================================ */
/* ERROR MESSAGE                                                */
/* ============================================================ */
.error-message {
    display: none;
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid #fecaca;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.error-message.show {
    display: flex;
}

.error-message i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================================ */
/* FORM - Spacing Lebih Baik                                  */
/* ============================================================ */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1f3d6b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group label i {
    color: #94a3b8;
    font-size: 0.78rem;
}

.input-group label .optional {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.68rem;
}

/* ============================================================ */
/* INPUT FIELD - Lebih Proporsional                            */
/* ============================================================ */
.input-field {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #e8edf5;
    font-size: 0.88rem;
    font-family: inherit;
    transition: 0.2s;
    background: #fafcff;
    color: #0b1f44;
    outline: none;
    height: 44px;
}

.input-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.06);
    background: white;
}

.input-field::placeholder {
    color: #94a3b8;
}

/* ============================================================ */
/* PASSWORD WRAPPER                                            */
/* ============================================================ */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .input-field {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px 12px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
}

.password-toggle:hover {
    color: #1f3d6b;
}

/* ============================================================ */
/* PHONE & COUNTRY - Lebih Proporsional                       */
/* ============================================================ */
.phone-wrapper {
    display: flex;
    gap: 8px;
}

.phone-wrapper .input-field {
    flex: 1;
}

.country-select-wrapper {
    position: relative;
    flex-shrink: 0;
}

.country-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1.5px solid #e8edf5;
    border-radius: 8px;
    background: #fafcff;
    cursor: pointer;
    transition: 0.2s;
    height: 44px;
    user-select: none;
    min-width: 110px;
}

.country-select-trigger:hover {
    border-color: #2563eb;
}

.country-select-trigger.open {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.06);
}

.country-select-trigger .flag-img {
    width: 28px;
    height: 19px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.country-select-trigger #selectedCode {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0b1f44;
}

.country-select-trigger .arrow {
    color: #94a3b8;
    font-size: 0.65rem;
    transition: 0.2s;
    margin-left: auto;
}

.country-select-trigger.open .arrow {
    transform: rotate(180deg);
}

/* ============================================================ */
/* COUNTRY DROPDOWN - Lebih Proporsional                       */
/* ============================================================ */
.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 250px;
    max-height: 240px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    border: 1px solid #e8edf5;
    box-shadow: 0 12px 40px rgba(18, 52, 106, 0.10);
    z-index: 100;
    padding: 6px 0;
}

.country-dropdown.open {
    display: block;
}

.country-dropdown::-webkit-scrollbar {
    width: 4px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #e8edf5;
    border-radius: 4px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    transition: 0.15s;
    font-size: 0.85rem;
    color: #1f3d6b;
}

.country-item:hover {
    background: #f0f5ff;
}

.country-item.selected {
    background: #dbeafe;
    color: #2563eb;
}

.country-item .flag-img {
    width: 28px;
    height: 19px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.country-item .country-name {
    flex: 1;
}

.country-item .country-code {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.78rem;
}

/* ============================================================ */
/* CHECKBOX - Lebih Proporsional                               */
/* ============================================================ */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: #2563eb;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.83rem;
    color: #1f3d6b;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-group label a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

/* ============================================================ */
/* SUBMIT BUTTON - Lebih Proporsional                          */
/* ============================================================ */
.btn-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    margin-top: 6px;
    height: 48px;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #1d4ed8, #1a4cff);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.25);
}

.btn-signup:active {
    transform: translateY(0);
}

.btn-signup i {
    font-size: 0.95rem;
    transition: 0.2s;
}

.btn-signup:hover i {
    transform: translateX(4px);
}

.btn-signup .spinner-btn {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.7s linear infinite;
}

.btn-signup.loading .spinner-btn {
    display: inline-block;
}

.btn-signup.loading .btn-text {
    opacity: 0.8;
}

.btn-signup.loading i {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================ */
/* LOGIN ROW                                                    */
/* ============================================================ */
.login-row {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: #5a7aa3;
}

.login-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.login-row a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 14px;
    font-size: 0.72rem;
    color: #94a3b8;
}

/* ============================================================ */
/* RESPONSIVE - Lebih Baik                                     */
/* ============================================================ */

@media (max-width: 820px) {
    .signup-wrapper {
        max-width: 540px;
        min-height: auto;
        border-radius: 20px;
    }
    
    .brand-left {
        display: none;
    }
    
    .signup-card {
        padding: 32px 32px 28px;
    }
    
    .brand-mobile {
        display: flex;
    }
    
    .welcome h2 {
        font-size: 1.4rem;
    }
    
    .input-field {
        height: 40px;
        padding: 8px 12px;
    }
    
    .country-select-trigger {
        height: 40px;
        min-width: 100px;
    }
    
    .btn-signup {
        height: 44px;
        font-size: 0.9rem;
    }
}

@media (max-width: 540px) {
    body {
        padding: 10px;
    }
    
    .signup-wrapper {
        border-radius: 16px;
    }
    
    .signup-card {
        padding: 20px 16px 18px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .welcome h2 {
        font-size: 1.2rem;
    }
    
    .welcome p {
        font-size: 0.82rem;
    }
    
    .phone-wrapper {
        flex-direction: column;
    }
    
    .country-select-wrapper {
        width: 100%;
    }
    
    .country-select-trigger {
        width: 100%;
        justify-content: space-between;
        height: 38px;
        min-width: unset;
        padding: 0 10px;
    }
    
    .country-select-trigger .flag-img {
        width: 24px;
        height: 16px;
    }
    
    .country-dropdown {
        min-width: 100%;
        max-height: 200px;
    }
    
    .country-item .flag-img {
        width: 24px;
        height: 16px;
    }
    
    .input-field {
        font-size: 0.82rem;
        padding: 6px 10px;
        height: 38px;
    }
    
    .btn-signup {
        padding: 8px 16px;
        font-size: 0.85rem;
        height: 40px;
    }
    
    .checkbox-group label {
        font-size: 0.78rem;
    }
    
    .brand-mobile .brand-text {
        font-size: 1.1rem;
    }
    
    .brand-mobile .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .country-item {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .signup-card {
        padding: 16px 12px 14px;
    }
    
    .welcome h2 {
        font-size: 1rem;
    }
    
    .input-group label {
        font-size: 0.7rem;
    }
    
    .input-field {
        font-size: 0.78rem;
        height: 34px;
        padding: 4px 8px;
    }
    
    .btn-signup {
        font-size: 0.8rem;
        height: 36px;
        padding: 6px 12px;
    }
    
    .country-select-trigger {
        height: 34px;
        padding: 0 8px;
    }
    
    .country-select-trigger .flag-img {
        width: 20px;
        height: 14px;
    }
    
    .country-item .flag-img {
        width: 20px;
        height: 14px;
    }
}