/* ==========================================================================
   SmartFarm Authentication UI 2026 - Modern Glassmorphic Login
   ========================================================================== */

.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 20%, rgba(15, 118, 110, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
                var(--bg-page, #f8fafc);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.auth-top-bar {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
}

.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: #ffffff;
    border: 1px solid var(--border-card, #e2e8f0);
    border-radius: var(--radius-md, 8px);
    color: var(--text-muted, #64748b);
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-back-btn:hover {
    color: var(--primary, #0f766e);
    border-color: var(--primary-border, #a7f3d0);
    background: var(--primary-light, #ecfdf5);
    transform: translateX(-2px);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.1);
}

.auth-back-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.auth-back-btn:hover i {
    transform: translateX(-2px);
}

.auth-lang-switcher {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--border-card, #e2e8f0);
    border-radius: var(--radius-sm, 6px);
    padding: 3px;
    gap: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.auth-lang-btn {
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-lang-btn.active {
    background: var(--primary-light, #ecfdf5);
    color: var(--primary, #0f766e);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid var(--border-card, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.02);
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    cursor: pointer;
}

.auth-brand-link:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.auth-brand-logo-wrapper {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-card, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    overflow: hidden;
    padding: 5px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-brand-link:hover .auth-brand-logo-wrapper {
    border-color: var(--primary-border, #a7f3d0);
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.15);
}

.auth-brand-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-light, #ecfdf5);
    color: var(--primary, #0f766e);
    border: 1px solid var(--primary-border, #a7f3d0);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-brand-link:hover .auth-brand-icon {
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.25);
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.925rem;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    display: flex;
    align-items: center;
}

.auth-password-toggle:hover {
    color: var(--text-main, #0f172a);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-btn-primary {
    background: var(--primary, #0f766e);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn-primary:hover {
    background: var(--primary-hover, #115e59);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
    transform: translateY(-1px);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.775rem;
    color: var(--text-subtle, #94a3b8);
}

@media (max-width: 480px) {
    .auth-top-bar {
        top: 14px;
        left: 14px;
        right: 14px;
    }

    .auth-back-btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.75rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
}
