/* VitaKoç HSL Green-Centric Style Declarations */

:root {
    --primary: #00694c;
    --primary-container: #008560;
    --secondary-container: #fc7127;
    --surface-container-low: #edf4ff;
    --surface-container-high: #d9eaff;
    --surface-container-lowest: #ffffff;
    --outline-variant: #bccac1;
    --error: #ba1a1a;
    --tertiary: #735c00;
}

/* Smooth Navigation Transitions */
.page-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

/* Glassmorphism Modals */
.glass-modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 108, 78, 0.08);
}

/* High-End Minimalist Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #bccac1;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

/* Active navigation state matching the original first dashboard */
.nav-link {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active-nav {
    background-color: var(--primary-container) !important;
    color: #ffffff !important;
    font-weight: 600;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 105, 76, 0.15);
}

/* Critical Biomarkers Glow Animations */
.glow-critical {
    box-shadow: 0 0 15px rgba(186, 26, 26, 0.1);
    animation: criticalAlert 2.5s infinite alternate;
}

@keyframes criticalAlert {
    0% {
        border-color: rgba(186, 26, 26, 0.3);
    }
    100% {
        border-color: rgba(186, 26, 26, 0.8);
        box-shadow: 0 0 20px rgba(186, 26, 26, 0.2);
    }
}

/* Warning (Near-Critical) Glow Animations */
.glow-warning {
    box-shadow: 0 0 12px rgba(180, 130, 0, 0.1);
    animation: warningAlert 3s infinite alternate;
}

@keyframes warningAlert {
    0% {
        border-color: rgba(180, 130, 0, 0.3);
    }
    100% {
        border-color: rgba(180, 130, 0, 0.7);
        box-shadow: 0 0 16px rgba(180, 130, 0, 0.15);
    }
}

/* Good (Normal) Subtle Glow */
.glow-good {
    box-shadow: 0 0 10px rgba(0, 105, 76, 0.06);
}

/* Entry Animation for Chat Bubbles */
.chat-bubble-appear {
    animation: slideUpAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ========================================
   AUTH PAGE — Premium Modern Design
   ======================================== */

/* Animated Gradient Background */
.auth-bg-gradient {
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 25%, #f3e5f5 50%, #e8f5e9 75%, #e3f2fd 100%);
    background-size: 400% 400%;
    animation: authBgShift 12s ease infinite;
}

@keyframes authBgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Particles/Orbs */
.auth-bg-gradient::before,
.auth-bg-gradient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}
.auth-bg-gradient::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,133,96,0.25), transparent);
    top: -100px;
    right: -100px;
    animation: orbFloat1 8s ease-in-out infinite alternate;
}
.auth-bg-gradient::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(252,113,39,0.2), transparent);
    bottom: -80px;
    left: -80px;
    animation: orbFloat2 10s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 60px) scale(1.15); }
}
@keyframes orbFloat2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -40px) scale(1.1); }
}

/* Glassmorphism Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 108, 78, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: authCardAppear 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Auth Tab System with Slider */
.auth-tabs {
    position: relative;
    display: flex;
    background: rgba(0, 105, 76, 0.06);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 0;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    color: #6d7a73;
    transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 1;
    text-align: center;
    border: none;
    background: transparent;
}

.auth-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #00694c, #008560);
    box-shadow: 0 2px 10px rgba(0, 105, 76, 0.3);
}

/* Floating Label Input Group */
.auth-input-group {
    position: relative;
    margin-bottom: 4px;
}

.auth-input-group input,
.auth-input-group select {
    width: 100%;
    padding: 16px 16px 8px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #091d2e;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(188, 202, 193, 0.5);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

.auth-input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M480-360 280-560h400L480-360Z' fill='%236d7a73'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.auth-input-group input:focus,
.auth-input-group select:focus {
    border-color: #00694c;
    box-shadow: 0 0 0 3px rgba(0, 105, 76, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.auth-input-group input.input-error,
.auth-input-group select.input-error {
    border-color: #ba1a1a;
    box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.08);
}

.auth-input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #6d7a73;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 4px;
}

.auth-input-group input:focus ~ label,
.auth-input-group input:not(:placeholder-shown) ~ label,
.auth-input-group select:focus ~ label,
.auth-input-group select:valid ~ label,
.auth-input-group select ~ label {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: #00694c;
    letter-spacing: 0.03em;
}

.auth-input-group input.input-error:focus ~ label,
.auth-input-group input.input-error:not(:placeholder-shown) ~ label,
.auth-input-group select.input-error:focus ~ label,
.auth-input-group select.input-error ~ label {
    color: #ba1a1a;
}

/* Password Toggle Button */
.auth-pass-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6d7a73;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.auth-pass-toggle:hover {
    color: #00694c;
}

/* Password Strength Bar */
.password-strength-container {
    padding: 0 4px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}
.password-strength-container.visible {
    max-height: 40px;
    opacity: 1;
}

.password-strength-track {
    width: 100%;
    height: 4px;
    background: rgba(188, 202, 193, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.password-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}

.password-strength-fill.strength-weak {
    width: 33%;
    background: linear-gradient(90deg, #ba1a1a, #d32f2f);
}
.password-strength-fill.strength-medium {
    width: 66%;
    background: linear-gradient(90deg, #f9a825, #fbc02d);
}
.password-strength-fill.strength-strong {
    width: 100%;
    background: linear-gradient(90deg, #00694c, #2e7d32);
}

.password-strength-text {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    transition: color 0.3s;
}
.password-strength-text.strength-weak   { color: #ba1a1a; }
.password-strength-text.strength-medium { color: #f9a825; }
.password-strength-text.strength-strong { color: #00694c; }

/* Auth Error Message */
.auth-error-box {
    background: rgba(186, 26, 26, 0.06);
    border: 1px solid rgba(186, 26, 26, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: authErrorAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-error-box .material-symbols-outlined {
    color: #ba1a1a;
    font-size: 18px;
}

.auth-error-box span:last-child {
    font-size: 13px;
    color: #93000a;
    font-weight: 500;
}

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

/* Shake animation for errors */
@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    15%  { transform: translateX(-6px); }
    30%  { transform: translateX(5px); }
    45%  { transform: translateX(-4px); }
    60%  { transform: translateX(3px); }
    75%  { transform: translateX(-2px); }
}
.auth-shake {
    animation: authShake 0.5s ease;
}

/* Submit Button — Gradient + Glow */
.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #00694c, #008560);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 105, 76, 0.25);
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 105, 76, 0.35);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 105, 76, 0.2);
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.auth-submit-btn:hover::after {
    transform: rotate(45deg) translateX(100%);
}

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

/* Loading Spinner inside button */
.auth-btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* Auth Success Checkmark */
.auth-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00694c, #008560);
    border-radius: 50%;
    color: #fff;
    animation: authSuccessPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authSuccessPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Auth divider line */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(188, 202, 193, 0.4);
}
.auth-divider span {
    font-size: 12px;
    color: #6d7a73;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        margin: 12px;
        padding: 24px 20px !important;
    }
    .auth-bg-gradient::before,
    .auth-bg-gradient::after {
        width: 200px;
        height: 200px;
    }
}
