/* Authentication Modal Content Styles */
.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.auth-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.auth-form-container {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #dba000;
    box-shadow: 0 0 0 3px rgba(219, 160, 0, 0.1);
}

.code-input {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.auth-submit-btn {
    width: 100%;
    background-color: #dba000;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-submit-btn:hover {
    background-color: #b8941f;
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.auth-back-btn {
    width: 100%;
    background: none;
    color: #666;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-back-btn:hover {
    background-color: #f8f9fa;
    border-color: #dba000;
    color: #dba000;
}

/* Auth Actions Container */
.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-resend-btn {
    width: 100%;
    background: none;
    color: #dba000;
    border: 1px solid #dba000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-resend-btn:hover {
    background-color: #dba000;
    color: white;
    transform: translateY(-1px);
}

.auth-resend-btn:disabled {
    background-color: #f8f9fa;
    color: #666;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
}

.auth-resend-btn:disabled:hover {
    background-color: #f8f9fa;
    color: #666;
    border-color: #e9ecef;
    transform: none;
}

.success-actions {
    padding: 2rem;
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

/* Login Button */
.login-btn {
    background-color: #dba000;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background-color: #b8941f;
    transform: translateY(-1px);
}

/* User Menu */
.user-menu {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #dba000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.user-phone {
    color: #666;
    font-size: 0.8rem;
}

.user-actions {
    padding: 0.5rem;
}

.user-action-btn {
    width: 100%;
    background: none;
    color: #dc3545;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.user-action-btn:hover {
    background-color: #f8f9fa;
}

/* Dropdown Arrow */
.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

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

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

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

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #dba000;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.25rem 0;
}

/* Logout Item */
.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Profile Modal */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.profile-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

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

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.profile-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.profile-close-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.profile-body {
    padding: 1.5rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-form label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.profile-form .form-input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.profile-form .form-input:focus {
    outline: none;
    border-color: #dba000;
    box-shadow: 0 0 0 3px rgba(219, 160, 0, 0.1);
}

.profile-form .form-help {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.profile-cancel-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-cancel-btn:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

.profile-save-btn {
    padding: 0.75rem 1.5rem;
    background: #dba000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-save-btn:hover {
    background: #c49100;
    transform: translateY(-1px);
}

.profile-save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.profile-save-btn .btn-loader {
    display: none;
}

.profile-save-btn:disabled .btn-text {
    display: none;
}

.profile-save-btn:disabled .btn-loader {
    display: inline-block;
}

/* Responsive */
@media (max-width: 640px) {
    .profile-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .profile-header {
        padding: 1rem;
    }
    
    .profile-body {
        padding: 1rem;
    }
    
    .profile-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-cancel-btn,
    .profile-save-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Global Message System */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 2px 0 0 2px;
}

.message-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-success::before {
    background: #28a745;
}

.message-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-error::before {
    background: #dc3545;
}

.message-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-info::before {
    background: #17a2b8;
}

.message-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-warning::before {
    background: #ffc107;
}

.message-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.message-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Auto-hide animation */
.message.auto-hide {
    animation: slideOutRight 0.3s ease-in forwards;
    animation-delay: 3s;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .message {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}

/* Error and Success Messages */
.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.success-message {
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Form Messages - Below Fields */
.form-message {
    margin: 0.5rem 0;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    border: 1px solid;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

.form-message.success-message {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.form-message.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    font-weight: 600;
}

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

/* Message area inside white popup */
.message-area {
    background: transparent !important;
    padding: 1rem !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1000 !important;
}

.message-area .form-message {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    padding: 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.message-area .form-message.success-message {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-color: #c3e6cb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Error message close button styling */
.message-area .form-message.error-message {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.message-area .message-close-btn {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 0.5rem !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s !important;
    flex-shrink: 0 !important;
}

.message-area .message-close-btn:hover {
    opacity: 1 !important;
}

/* Success message close button styling */
.message-area .form-message.success-message .message-close-btn {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 0.5rem !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s !important;
    flex-shrink: 0 !important;
}

.message-area .form-message.success-message .message-close-btn:hover {
    opacity: 1 !important;
}

/* Simple, clean form messages below fields */

/* Responsive Design */
@media (max-width: 480px) {
    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-form-container {
        padding: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}