/* ============================================
   PROFIL.CSS - Stylesheet Khusus Menu Profil
   SIMZIS Mobile App - BAZNAS Kota Surakarta
   
   REVISI ANIMASI:
   - Auth section entrance animation (authFadeIn)
   - Auth form switch animation (re-trigger on switch)
   - Login/Register button hover/active feedback
   - Profile card entrance animation
   - Profile info items stagger
   - Gender dropdown smooth animation
   - Error message shake animation
   - Password toggle animation
   ============================================ */

/* ==================== PROFILE SECTION ==================== */
.profile-section {
    padding-bottom: 160px;
    display: none;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 24px 20px;
    display: none;
}

/* ==================== AUTH SECTION ==================== */
.auth-section {
    padding: 24px 20px;
    animation: authFadeIn 0.35s ease-out;
}

/* Re-trigger animation class (added via JS) */
.auth-animate-in {
    animation: authFadeIn 0.3s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: scaleIn 0.35s ease-out;
}

.auth-logo i {
    font-size: 36px;
    color: #ffffff;
}

.auth-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.auth-title-sanaz {
    font-size: 28px;
    font-weight: 800;
    color: #259148;
    margin-bottom: 2px;
    letter-spacing: 2px;
    animation: scaleIn 0.3s ease-out 0.1s both;
}

.auth-subtitle-baznas {
    font-size: 10px;
    color: #888;
    letter-spacing: 1.5px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out 0.15s both;
}

.auth-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.auth-header p {
    font-size: 13px;
    color: #888;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-label i {
    font-size: 14px;
    color: #259148;
    transition: transform 0.2s ease;
}

.auth-form-group:focus-within .auth-label i {
    transform: scale(1.15);
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    background-color: #ffffff;
}

.auth-input-wrapper:focus-within {
    border-color: #259148;
    box-shadow: 0 0 0 3px rgba(37, 145, 72, 0.1);
}

.auth-input-prefix {
    padding: 0 12px;
    background-color: #f5f5f5;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    height: 48px;
    display: flex;
    align-items: center;
    border-right: 1px solid #e5e5e5;
    flex-shrink: 0;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-input-wrapper:focus-within .auth-input-prefix {
    color: #259148;
    background-color: #f0f9f4;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    outline: none;
    color: #333;
    background-color: #ffffff;
}

.auth-input:focus {
    border-color: #259148;
    box-shadow: 0 0 0 3px rgba(37, 145, 72, 0.1);
}

.auth-input::placeholder {
    color: #bbb;
}

.auth-input-wrapper .auth-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
}

.auth-input-wrapper .auth-input:focus {
    box-shadow: none;
}

.auth-textarea {
    resize: vertical;
    min-height: 80px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .auth-input {
    padding-right: 48px;
}

.auth-toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.auth-toggle-password:hover {
    color: #259148;
}

.auth-toggle-password:active {
    transform: translateY(-50%) scale(0.88);
}

.auth-error-message {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: authShake 0.4s ease;
}

.auth-error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.auth-login-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #259148 0%, #1a6a35 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37, 145, 72, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.auth-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 145, 72, 0.45);
}

.auth-login-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(37, 145, 72, 0.25);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.auth-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-login-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

.auth-register-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #259148;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37, 145, 72, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.auth-register-btn:hover {
    background-color: #1e7a3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 145, 72, 0.45);
}

.auth-register-btn:active {
    transform: scale(0.96);
    background-color: #1a6a35;
    transition: transform 0.08s ease, background-color 0.08s ease;
}

.auth-register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-logout-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #ffffff;
    color: #d32f2f;
    border: 2px solid #d32f2f;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    -webkit-tap-highlight-color: transparent;
}

.auth-logout-btn:hover {
    background-color: #d32f2f;
    color: #ffffff;
    transform: translateY(-2px);
}

.auth-logout-btn:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e5e5e5;
}

.auth-divider span {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

.auth-register-link {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #259148;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 0;
    -webkit-tap-highlight-color: transparent;
}

.auth-register-link:hover {
    color: #1a6a35;
    text-decoration: underline;
}

.auth-register-link:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

.auth-back-link {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

.auth-back-link:hover {
    color: #259148;
}

.auth-back-link:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

.auth-back-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.auth-back-link:hover i {
    transform: translateX(-4px);
}

/* ==================== GENDER DROPDOWN ==================== */
.gender-dropdown {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gender-dropdown-selected {
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    background-color: #ffffff;
    min-height: 48px;
}

.gender-dropdown.selected {
    border-color: #259148;
}

.gender-dropdown.open .gender-dropdown-selected {
    border-color: #259148;
    box-shadow: 0 0 0 3px rgba(37, 145, 72, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.gender-dropdown-text {
    font-size: 14px;
    color: #bbb;
    font-family: 'Poppins', sans-serif;
}

.gender-dropdown.selected .gender-dropdown-text {
    color: #333;
    font-weight: 500;
}

.gender-dropdown-arrow {
    font-size: 12px;
    color: #888;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.gender-dropdown.open .gender-dropdown-arrow {
    transform: rotate(180deg);
}

.gender-dropdown-options {
    position: absolute;
    top: 100%;
    left: -2px;
    right: -2px;
    background-color: #ffffff;
    border: 2px solid #259148;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.4s cubic-bezier(0.2, 0, 0, 1),
                opacity 0.3s ease,
                transform 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gender-dropdown.open .gender-dropdown-options {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

.gender-dropdown-option {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateX(-12px);
    border-bottom: 1px solid #f0f0f0;
}

.gender-dropdown.open .gender-dropdown-option:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.08s;
}

.gender-dropdown.open .gender-dropdown-option:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.16s;
}

.gender-dropdown-option:last-child {
    border-bottom: none;
}

.gender-dropdown-option:hover {
    background-color: #e8f5e9;
}

.gender-dropdown-option:active {
    background-color: #c8e6c9;
    transform: scale(0.98);
    transition: transform 0.08s ease;
}

.gender-dropdown-option i {
    font-size: 18px;
    color: #259148;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
}

.gender-dropdown-option:hover i {
    transform: scale(1.15);
}

.gender-dropdown-option span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

/* ==================== USER PROFILE CARD ==================== */
.profile-card {
    animation: authFadeIn 0.35s ease-out;
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #259148 0%, #1a6a35 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 24px rgba(37, 145, 72, 0.3);
    animation: scaleIn 0.35s ease-out 0.1s both;
}

.profile-avatar i {
    font-size: 40px;
    color: #ffffff;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
    animation: sectionEnter 0.3s ease-out 0.15s both;
}

.profile-phone {
    font-size: 14px;
    color: #888;
    animation: fadeIn 0.3s ease-out 0.2s both;
}

.profile-info-list {
    background-color: #f9fafb;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    animation: sectionEnter 0.35s ease-out 0.2s both;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-item:hover {
    background-color: #f5f5f5;
}

.profile-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.profile-info-item:hover .profile-info-icon {
    transform: scale(1.08);
}

.profile-info-icon i {
    font-size: 16px;
    color: #259148;
}

.profile-info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-info-label {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.profile-info-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    word-break: break-word;
}

.profile-status-active {
    color: #259148;
    font-weight: 700;
}

/* ==================== REGISTRATION SUCCESS POPUP ==================== */
.auth-success-modal .modal {
    background-color: transparent;
    box-shadow: none;
    border-radius: 24px;
}

.auth-success-modal .modal-overlay.active {
    background-color: rgba(0, 0, 0, 0.7);
}

.auth-success-content {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    animation: slideUp 0.4s ease-out;
    max-width: 340px;
    width: 90%;
    margin: 0 auto;
}

.auth-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #259148 0%, #1a6a35 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(37, 145, 72, 0.3);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(37, 145, 72, 0.3); }
    50% { transform: scale(1.06); box-shadow: 0 12px 32px rgba(37, 145, 72, 0.4); }
}

.auth-success-icon i {
    font-size: 36px;
    color: #ffffff;
}

.auth-success-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.auth-success-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.auth-success-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-bottom: 20px !important;
}

.auth-success-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #259148;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.auth-success-btn:hover {
    background-color: #1e7a3c;
    transform: translateY(-2px);
}

.auth-success-btn:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

/* ==================== LOGIN REQUIRED POPUP ==================== */
.auth-required-modal .modal {
    background-color: transparent;
    box-shadow: none;
}

.auth-required-content {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    animation: slideUp 0.4s ease-out;
    max-width: 340px;
    width: 90%;
    margin: 0 auto;
}

.auth-required-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
    animation: scaleIn 0.35s ease-out 0.1s both;
}

.auth-required-icon i {
    font-size: 32px;
    color: #ffffff;
}

.auth-required-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.auth-required-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.auth-required-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-cancel-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.auth-cancel-btn:hover {
    background-color: #e5e5e5;
    color: #333;
}

.auth-cancel-btn:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

/* ==================== DARK MODE - AUTH ==================== */
body.dark-mode .auth-header h3 { color: #ffffff; }
body.dark-mode .auth-title-sanaz { color: #259148; }
body.dark-mode .auth-subtitle-baznas { color: #888; }
body.dark-mode .auth-header p { color: #888; }
body.dark-mode .auth-label { color: #ffffff; }
body.dark-mode .auth-input, body.dark-mode .auth-textarea { background-color: #333; color: #ffffff; border-color: #444; }
body.dark-mode .auth-input:focus { border-color: #259148; }
body.dark-mode .auth-input::placeholder { color: #777; }
body.dark-mode .auth-input-wrapper { background-color: #333; border-color: #444; }
body.dark-mode .auth-input-wrapper:focus-within { border-color: #259148; }
body.dark-mode .auth-input-wrapper .auth-input { background-color: #333; }
body.dark-mode .auth-input-prefix { background-color: #3a3a3a; color: #aaa; border-right-color: #444; }
body.dark-mode .auth-input-wrapper:focus-within .auth-input-prefix { background-color: #2a4030; }
body.dark-mode .gender-dropdown-selected { background-color: #333; border-color: #444; }
body.dark-mode .gender-dropdown.selected .gender-dropdown-text { color: #ffffff; }
body.dark-mode .gender-dropdown.open .gender-dropdown-selected { border-color: #259148; }
body.dark-mode .gender-dropdown-options { background-color: #333; border-color: #259148; }
body.dark-mode .gender-dropdown-option { border-bottom-color: #444; }
body.dark-mode .gender-dropdown-option:hover { background-color: #3a3a3a; }
body.dark-mode .gender-dropdown-option span { color: #ffffff; }
body.dark-mode .auth-divider::before, body.dark-mode .auth-divider::after { background-color: #444; }
body.dark-mode .profile-card .profile-name { color: #ffffff; }
body.dark-mode .profile-info-list { background-color: #2a2a2a; border-color: #333; }
body.dark-mode .profile-info-item { border-bottom-color: #333; }
body.dark-mode .profile-info-item:hover { background-color: #333; }
body.dark-mode .profile-info-value { color: #ffffff; }
body.dark-mode .auth-success-content, body.dark-mode .auth-required-content { background-color: #2a2a2a; }
body.dark-mode .auth-success-content h3, body.dark-mode .auth-required-content h3 { color: #ffffff; }
body.dark-mode .auth-success-content p, body.dark-mode .auth-required-content p { color: #ccc; }
body.dark-mode .auth-cancel-btn { background-color: #333; color: #aaa; }
body.dark-mode .auth-cancel-btn:hover { background-color: #3a3a3a; color: #ffffff; }
