* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-primary: #10B981;
    --green-hover: #059669;
    --green-light: #D1FAE5;
    --green-dark: #047857;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --success: #10B981;
    --success-light: #D1FAE5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #d9d9d9;
    min-height: 100dvh;
    padding: 0;
    margin: 0;
    color: var(--gray-900);
    overflow-y: auto;
    overflow-x: hidden;
}

.auth-wrapper {
    display: flex;
    min-height: 100dvh;
    align-items: stretch;
    padding-bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.auth-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px 0 40px 40px;
    background: #d9d9d9;
    overflow: visible;
}

.auth-teaser-image {
    width: auto;
    height: auto;
    object-fit: contain;
    max-width: 300px;
    max-height: 400px;
}


.auth-teaser-image--login {
    max-width: min(480px, 42vw);
    max-height: min(640px, 72vh);
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 40px 40px 0;
    max-width: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
}

@media (max-width: 1024px) {
    .auth-image-container {
        display: none;
    }
    
    .auth-container {
        max-width: 100%;
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }
    
    .auth-card {
        margin: 0 auto;
    }
}

.auth-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
}


.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    height: auto;
    display: block;
}

.auth-card h1 {
    text-align: center;
    color: var(--gray-900);
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--gray-200);
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    min-height: 48px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: transform 0.3s ease, color 0.3s ease, font-weight 0.3s ease;
    font-weight: 500;
    position: relative;
    z-index: 1;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--green-primary);
    border-bottom-color: transparent;
    font-weight: 600;
    transform: scale(1);
}

.tab-btn:not(.active) {
    transform: scale(0.78);
}

.tabs::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: var(--green-primary);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.tabs[data-active="login"]::after {
    left: 0;
    width: 50%;
}

.tabs[data-active="signup"]::after {
    left: 50%;
    width: 50%;
}

.auth-form {
    display: none;
    width: 100%;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group label:not(.signup-consent-label) {
    display: none;
}

.form-group input {
    width: 85%;
    max-width: 320px;
    padding: 14px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #e8e8e8;
    color: var(--gray-900);
    margin: 0 auto;
    display: block;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gray-400);
    background: var(--white);
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--green-primary);
    display: block;
    border: none;
    background: transparent;
}

.form-group input::placeholder {
    color: var(--gray-500);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--gray-500);
    font-size: 13px;
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.btn-primary {
    width: 85%;
    max-width: 320px;
    padding: 10px 16px;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.btn-primary:hover {
    background: var(--green-hover);
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary .btn-text {
    transition: opacity 0.2s;
}

.btn-primary.loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.btn-primary.loading {
    pointer-events: none;
}

.spinner {
    position: absolute;
    font-size: 24px;
    width: 1em;
    height: 1em;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn-primary.loading .spinner {
    display: inline-block;
}

.spinner .spinner-blade {
    position: absolute;
    left: 0.4629em;
    bottom: 0;
    width: 0.074em;
    height: 0.2777em;
    border-radius: 0.0555em;
    background-color: transparent;
    transform-origin: center -0.2222em;
    animation: spinner-fade 1s infinite linear;
}

.spinner .spinner-blade:nth-child(1) {
    animation-delay: 0s;
    transform: rotate(0deg);
}

.spinner .spinner-blade:nth-child(2) {
    animation-delay: 0.083s;
    transform: rotate(30deg);
}

.spinner .spinner-blade:nth-child(3) {
    animation-delay: 0.166s;
    transform: rotate(60deg);
}

.spinner .spinner-blade:nth-child(4) {
    animation-delay: 0.249s;
    transform: rotate(90deg);
}

.spinner .spinner-blade:nth-child(5) {
    animation-delay: 0.332s;
    transform: rotate(120deg);
}

.spinner .spinner-blade:nth-child(6) {
    animation-delay: 0.415s;
    transform: rotate(150deg);
}

.spinner .spinner-blade:nth-child(7) {
    animation-delay: 0.498s;
    transform: rotate(180deg);
}

.spinner .spinner-blade:nth-child(8) {
    animation-delay: 0.581s;
    transform: rotate(210deg);
}

.spinner .spinner-blade:nth-child(9) {
    animation-delay: 0.664s;
    transform: rotate(240deg);
}

.spinner .spinner-blade:nth-child(10) {
    animation-delay: 0.747s;
    transform: rotate(270deg);
}

.spinner .spinner-blade:nth-child(11) {
    animation-delay: 0.83s;
    transform: rotate(300deg);
}

.spinner .spinner-blade:nth-child(12) {
    animation-delay: 0.913s;
    transform: rotate(330deg);
}

@keyframes spinner-fade {
    0% {
        background-color: #ffffff;
    }
    100% {
        background-color: transparent;
    }
}

.forgot-password-container {
    text-align: center;
    margin-top: 16px;
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.forgot-password-link {
    color: var(--green-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.forgot-password-link:hover {
    color: var(--green-hover);
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 32px auto;
    position: relative;
    width: 85%;
    max-width: 320px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    background: #d9d9d9;
    padding: 0 16px;
    color: var(--gray-500);
    position: relative;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-google {
    width: 85%;
    max-width: 320px;
    padding: 14px 16px;
    background: #e8e8e8;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    color: var(--gray-700);
    margin: 0 auto;
}

.btn-google:focus {
    outline: none;
    border-color: var(--gray-400);
    background: var(--white);
}

.btn-google:hover {
    opacity: 0.7;
}

.terms-text {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.terms-link {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

.signup-consent-group {
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}

.signup-consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.45;
    text-align: left;
}

.signup-consent-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--green-primary);
}

.btn-google:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.message {
    padding: 0;
    border-radius: 0;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    width: 85%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    border: none;
}

.message.error {
    color: var(--error);
}

.message.success {
    color: var(--success);
}


.dashboard-container {
    background: var(--gray-50);
    min-height: 100vh;
}

.dashboard-header {
    background: var(--white);
    padding: 20px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.dashboard-header h1 {
    color: var(--gray-900);
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-header .logo {
    height: 32px;
    width: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 15px;
}

.user-email {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.btn-logout {
    padding: 10px 20px;
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.dashboard-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.welcome-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.profile-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.profile-picture-container {
    flex-shrink: 0;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-200);
}

.profile-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gray-200);
}

.profile-placeholder svg path {
    fill: var(--gray-400);
}

.profile-info h2 {
    color: var(--gray-900);
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 600;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 14px;
    min-width: 120px;
}

.meta-value {
    color: var(--gray-900);
    font-size: 14px;
}

.sign-in-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--green-light);
    color: var(--green-dark);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.sign-in-badge.google-badge {
    background: #E8F0FE;
    color: #1A73E8;
}

.welcome-message {
    color: var(--gray-600);
    line-height: 1.7;
    margin-top: 24px;
    font-size: 15px;
}


.auth-footer {
    position: relative;
    background: transparent;
    padding: 20px 0;
    z-index: 10;
    width: 100%;
}

.desktop-footer {
    display: none;
}

.mobile-footer {
    max-width: 100%;
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
    display: block;
    width: 100%;
}

@media (min-width: 1025px) {
    .auth-container {
        position: relative;
        padding-bottom: 140px;
    }
    
    .desktop-footer {
        display: block;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        padding: 20px 40px;
        width: 100%;
        max-width: 600px;
    }
    
    .mobile-footer {
        display: none;
    }
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--gray-700);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.language-selector {
    display: flex;
    align-items: center;
}

.language-select {
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-select:hover {
    border-color: var(--gray-400);
}

.language-select:focus {
    outline: none;
    border-color: var(--green-primary);
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 12px;
}

@media (max-width: 640px) {
    body {
        overflow-x: hidden;
        min-height: 100dvh;
        overflow-y: auto;
        height: auto;
    }
    
    .auth-wrapper {
        padding-bottom: 0;
        min-height: 100dvh;
        height: auto;
        display: flex;
        flex-direction: column;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    .auth-container {
        padding: 8px 16px;
        justify-content: space-between;
        padding-top: 8px;
        padding-bottom: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: visible;
        min-height: 0;
        position: relative;
    }
    
    .auth-card {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .auth-card {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .logo-container {
        margin-bottom: 8px;
    }
    
    .logo {
        max-width: 120px;
    }
    
    .tabs {
        margin-bottom: 8px;
    }
    
    .tab-btn {
        padding: 6px 8px;
        font-size: 13px;
        height: 40px;
    }
    
    .form-group {
        margin-bottom: 6px;
    }
    
    .form-group input {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .form-group small {
        font-size: 13px;
        margin-top: 6px;
    }
    
    .btn-primary {
        padding: 10px 16px;
        font-size: 14px;
        margin-top: 12px;
    }
    
    .forgot-password-container {
        margin-top: 6px;
    }
    
    .forgot-password-link {
        font-size: 12px;
    }
    
    .divider {
        margin: 8px 0;
    }
    
    .divider span {
        font-size: 11px;
        padding: 0 10px;
    }
    
    .btn-google {
        padding: 14px 16px;
        font-size: 14px;
        margin-bottom: 0;
    }
    
    .terms-text {
        margin-top: 6px;
        font-size: 9px;
        padding: 0 4px;
        line-height: 1.3;
    }
    
    .auth-footer {
        padding: 16px 0;
        position: relative;
        flex-shrink: 0;
        width: 100%;
        z-index: 10;
    }
    
    .mobile-footer {
        margin-top: auto;
        padding-top: 12px;
        padding-bottom: 8px;
        max-width: 100%;
        display: block !important;
        position: relative;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        flex-shrink: 0;
    }
    
    .auth-footer {
        padding: 12px 0;
        width: 100%;
    }
    
    .auth-footer .footer-links {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .auth-footer .footer-bottom {
        width: 100%;
        max-width: 100%;
    }
    
    .auth-card {
        margin-bottom: 0;
    }
    
    .footer-links {
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .footer-links a {
        font-size: 8px;
    }
    
    .footer-bottom {
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .language-select {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .footer-copyright {
        font-size: 9px;
    }


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-close {
    color: var(--gray-500);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    position: absolute;
    right: 15px;
    top: 15px;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--gray-900);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--gray-900);
    font-size: 24px;
    font-weight: 600;
}


#resetPasswordPage {
    display: none;
}

#resetPasswordPage h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--gray-900);
    font-size: 24px;
    font-weight: 600;
}
}


@media (max-width: 1024px) {
    .auth-wrapper {
        flex-direction: column;
    }
    
    .auth-image-container {
        display: none;
    }
    
    .auth-container {
        max-width: 100%;
        padding: 20px;
    }
}

    .dashboard-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .welcome-card {
        padding: 24px;
    }
    
    .profile-section {
        flex-direction: column;
        gap: 20px;
    }

