/* ============================================
   STYLE.CSS - BASE CSS UNTUK SEMUA DEVICE
   ============================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-box {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ===== LOGO & BRANDING ===== */
.logo-container {
    text-align: center;
    margin-bottom: 0px;
}

.site-logo {
    height: 35px;
    width: auto;
    margin-bottom: 30px;
}

.site-logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
}

.brand-title {
    font-size: 33px;
    font-weight: 700;
    color: #040404;
    margin-bottom: 8px;
    line-height: 1.2;
}

.brand-subtitle {
    color: #040404;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #040404;
    margin-bottom: 35px;
}

.user-email {
    font-size: 16px;
    color: #040404;
    background: #ffffff;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0 20px 0;
    word-break: break-all;
}

/* ===== FORM ELEMENTS ===== */
.input-group {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #040404;
    font-size: 15px;
}

.input-field {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #666666;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-field:focus {
    outline: none;
    border-color: #0067a3;
}

.input-field::placeholder {
    color: #999;
}

select.input-field {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A2B1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.password-field {
    letter-spacing: 2px;
    font-family: monospace;
}

/* ===== BUTTONS ===== */
.btn-continue, .btn-signin, .btn-submit {
    background: #003f87;
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 35px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-continue:hover, .btn-signin:hover, .btn-submit:hover {
    background: #0054ad;
    transform: translateY(-1px);
}

.btn-continue:active, .btn-signin:active, .btn-submit:active {
    transform: translateY(0);
}

.btn-continue:disabled, .btn-signin:disabled, .btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== CHECKBOX & SHOW TEXT ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: #666;
    cursor: default;
}

.checkbox-box {
    font-size: 21px;
    color: #666;
}

.checkbox-label {
    font-size: 15px;
}

.show-text {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    cursor: default;
}

/* ===== ERROR MESSAGES ===== */
.error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    color: #856404;
    display: none;
}

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

.error-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.error-content {
    flex: 1;
}

.error-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.care-code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.error-list {
    margin: 10px 0 0 20px;
    font-size: 14px;
}

.error-list li {
    margin-bottom: 5px;
}

.field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* ===== LINKS ===== */
.links {
    margin-top: 25px;
    text-align: center;
}

.link-item {
    text-align: left;
    display: block;
    margin: 10px 0;
    color: #007aa6;
    text-decoration: none;
    font-weight: 500;
}

.link-item:hover {
    text-decoration: none;
}

/* ===== DIVIDER ===== */
.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

/* ===== FOOTER LINKS ===== */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    font-size: 13px;
}

.footer-link {
    color: #666;
    text-decoration: none;
}

.footer-link:hover {
    color: #0067a3;
    text-decoration: underline;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0a7bd7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 16px;
    color: #666;
    animation: pulse 1.5s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== PERSONAL PAGE STYLES ===== */
.personal-container {
    max-width: 700px !important;
}

.page-subtitle {
    font-size: 19px;
    margin-top: 25px;
    color: #040404;
    text-align: left;
    font-weight: 600;
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.form-input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;


}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A2B1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-error {
    color: #e62537;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.submit-section {
    margin-top: 30px;
    text-align: center;
}

/* ===== PRINT STYLES ===== */
@media print {
    .loading-overlay,
    .btn-continue,
    .btn-signin,
    .btn-submit {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .form-box {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .input-field {
        border: 2px solid black;
    }
    
    .btn-continue, .btn-signin, .btn-submit {
        border: 2px solid black;
    }
}

/* ===== IE11 FALLBACKS ===== */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .container {
        display: block;
    }
    
    .loading-overlay {
        display: table;
        text-align: center;
    }
    
    .spinner {
        display: inline-block;
        margin: 20px auto;
    }
    
    .form-box {
        margin: 0 auto;
    }
    
    .footer-links {
        display: block;
        text-align: center;
    }
    
    .footer-link {
        display: inline-block;
        margin: 0 10px;
    }
}