/* Auth Pages - Login & Register */
/* Mobile-first approach */

.auth-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a5fa8 0%, #3b8fd9 40%, #6bb3e8 70%, #a8d4f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 70%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 40%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header với nền xanh gradient chứa logo */
.auth-header {
    text-align: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #1a5fa8 0%, #2d7bc9 50%, #4a9fe0 100%);
}

.auth-logo {
    max-width: 160px;
    height: auto;
}

.auth-title {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Page Title - nằm ngoài card, phía trên */
.auth-page-title {
    color: #fff;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: left;
    opacity: 0.95;
    font-weight: 400;
}

.auth-body {
    padding: 30px 35px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 18px;
    border: 1px solid #e8e8e8;
    border-radius: 22px;
    font-size: 13px;
    color: #333;
    background: #f8f9fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #2989d8;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(41, 137, 216, 0.1);
}

.auth-input::placeholder {
    color: #999;
}

.auth-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Checkbox & Links Row */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2989d8;
    cursor: pointer;
}

.auth-link {
    font-size: 13px;
    color: #2989d8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #1e5799;
    text-decoration: underline;
}

/* Submit Button */
.auth-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #1a5fa8 0%, #2d7bc9 100%);
    border: none;
    border-radius: 22px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(41, 137, 216, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer Links */
.auth-footer {
    text-align: center;
    padding: 20px 35px 25px;
}

.auth-footer-text {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.auth-footer-link {
    color: #2989d8;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.auth-footer-link:hover {
    text-decoration: underline;
}

/* Page Title (outside card) */
.auth-page-title {
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: left;
    opacity: 0.9;
}

/* Register Page Specific */
.auth-container.register-container {
    max-width: 480px;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.auth-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #2989d8;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-terms-text {
    line-height: 1.5;
}

.auth-terms-link {
    color: #2989d8;
    text-decoration: none;
}

.auth-terms-link:hover {
    text-decoration: underline;
}

/* Select Input */
.auth-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.auth-select:focus {
    outline: none;
    border-color: #2989d8;
    box-shadow: 0 0 0 3px rgba(41, 137, 216, 0.1);
}

/* Password Toggle */
.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.auth-password-toggle:hover {
    color: #666;
}

/* Responsive */
@media (min-width: 768px) {
    .auth-header {
        padding: 30px 40px;
    }
    
    .auth-body {
        padding: 35px 45px;
    }
    
    .auth-footer {
        padding: 20px 45px 30px;
    }
    
    .auth-logo {
        max-width: 180px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading State */
.auth-btn.loading {
    pointer-events: none;
    position: relative;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
