/* Modern LarvaSystems Design - Mobile First */

:root {
    --primary-color: #22c55e;
    --primary-hover: #16a34a;
    --primary-light: #dcfce7;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-page: #f0f4f3;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-lg: 24px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-input: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.2s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
}

/* ==================== Layout ==================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mobile: Card only, centered */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Hero section - hidden on mobile */
.auth-hero {
    display: none;
}

/* Desktop/Tablet: Two column layout */
@media (min-width: 992px) {
    .auth-container {
        flex-direction: row;
        position: relative;
        overflow: hidden;
    }

    .auth-hero {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 50%;
        padding: 60px 80px;
        position: relative;
        z-index: 1;
    }

    .auth-main {
        width: 50%;
        padding: 40px 60px;
        position: relative;
        z-index: 2;
    }

    /* Green diagonal decoration */
    .auth-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 45%;
        width: 200px;
        height: 100%;
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.1) 100%);
        transform: skewX(-10deg);
        z-index: 0;
    }
}

/* ==================== Hero Section ==================== */

.hero-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-logo-dots {
    display: flex;
    gap: 4px;
}

.hero-logo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.hero-logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    display: none; /* Logo image already contains text */
}

.hero-logo-img {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Mobile header logo for auth pages */
.mobile-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 0;
}

.mobile-header-logo-img {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@media (min-width: 992px) {
    .mobile-header-logo {
        display: none;
    }
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 400px;
}

.hero-features {
    list-style: none;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--text-dark);
}

.hero-feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-feature-icon svg {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

/* Hero Banner */
.hero-banner-label {
    margin-top: 32px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-banner:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}

.hero-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.hero-banner-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.hero-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-banner-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.hero-banner-text {
    font-size: 12px;
    color: var(--text-muted);
}

.hero-banner-arrow {
    flex-shrink: 0;
}

.hero-banner-arrow svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ==================== Auth Card ==================== */

.auth-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

@media (min-width: 992px) {
    .auth-card {
        padding: 40px;
    }
}

.auth-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.auth-card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==================== Auth Tabs ==================== */

.auth-tabs {
    display: flex;
    background-color: var(--bg-page);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-tab.active {
    background-color: var(--primary-color);
    color: white;
}

/* ==================== Form Elements ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--text-dark);
    background-color: var(--bg-card);
    transition: var(--transition);
    box-shadow: var(--shadow-input);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input-wrapper {
    position: relative;
}

.form-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.form-input-icon:hover {
    color: var(--text-muted);
}

/* ==================== Checkbox ==================== */

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-checkbox-label {
    font-size: 14px;
    color: var(--text-dark);
}

.form-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* ==================== Buttons ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: var(--bg-page);
    border-color: var(--text-muted);
}

.btn-social {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 12px 24px;
}

.btn-social:hover {
    background-color: var(--bg-page);
}

.btn-social-icon {
    width: 20px;
    height: 20px;
}

/* ==================== Divider ==================== */

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider-text {
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== Footer Links ==================== */

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a:not(.btn) {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:not(.btn):hover {
    text-decoration: underline;
}

/* ==================== Language Switcher ==================== */

.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    box-shadow: var(--shadow-card);
}

.lang-switcher-btn:hover {
    background-color: var(--bg-page);
}

.lang-switcher-flag {
    font-size: 16px;
}

.lang-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: none;
    min-width: 150px;
}

.lang-switcher.open .lang-switcher-dropdown {
    display: block;
}

.lang-switcher-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-switcher-option:hover {
    background-color: var(--bg-page);
}

.lang-switcher-option-name {
    flex: 1;
    font-size: 14px;
}

.lang-switcher-option-code {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== Alerts ==================== */

.alert {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    border: 1px solid var(--primary-color);
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ==================== Code Input ==================== */

.code-input-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Single large code input alternative */
.code-input-single {
    width: 100%;
    max-width: 200px;
    padding: 16px;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* ==================== Status Pages ==================== */

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.status-icon-success {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.status-icon-error {
    background-color: #fef2f2;
    color: #dc2626;
}

.status-icon svg {
    width: 40px;
    height: 40px;
}

.status-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.status-message {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

.status-email {
    font-weight: 600;
    color: var(--text-dark);
}

/* ==================== Info Page / Account Settings ==================== */

.account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.account-name {
    font-size: 24px;
    font-weight: 700;
}

.account-email {
    font-size: 14px;
    color: var(--text-muted);
}

.account-section {
    margin-bottom: 32px;
}

.account-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.account-item:last-child {
    border-bottom: none;
}

.account-item-label {
    font-size: 15px;
    color: var(--text-muted);
}

.account-item-value {
    font-size: 15px;
    font-weight: 500;
}

/* ==================== Passkeys List ==================== */

.passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--bg-page);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
}

.passkey-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.passkey-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.passkey-name {
    font-weight: 500;
}

.passkey-date {
    font-size: 13px;
    color: var(--text-muted);
}

.passkey-delete {
    padding: 8px 16px;
    background-color: #fef2f2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.passkey-delete:hover {
    background-color: #fecaca;
}

/* ==================== Validation Summary ==================== */

.validation-summary {
    margin-bottom: 20px;
}

.validation-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-summary li {
    padding: 12px 16px;
    background-color: #fef2f2;
    color: #dc2626;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    font-size: 14px;
}

/* ==================== Utilities ==================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.hidden {
    display: none !important;
}

/* ==================== Mobile Adjustments ==================== */

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
        border-radius: var(--border-radius);
    }

    .auth-tabs {
        flex-wrap: nowrap;
    }

    .auth-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hero-title {
        font-size: 32px;
    }
}

/* ==================== Tablet Adjustments ==================== */

@media (min-width: 768px) and (max-width: 991px) {
    .auth-main {
        padding: 40px;
    }

    .auth-card {
        max-width: 480px;
    }
}

/* ==================== Password Strength Indicator ==================== */

.password-strength-container {
    margin-top: -8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.password-strength-bar-container {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar.strength-weak {
    background-color: #ef4444;
}

.password-strength-bar.strength-medium {
    background-color: #f59e0b;
}

.password-strength-bar.strength-strong {
    background-color: #22c55e;
}

.password-strength-bar.strength-veryStrong {
    background-color: #16a34a;
}

.password-strength-label {
    font-size: 12px;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.password-strength-label.strength-weak {
    color: #ef4444;
}

.password-strength-label.strength-medium {
    color: #f59e0b;
}

.password-strength-label.strength-strong {
    color: #22c55e;
}

.password-strength-label.strength-veryStrong {
    color: #16a34a;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}

.password-requirements li {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-requirements li .req-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.password-requirements li .req-icon::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9ca3af;
}

.password-requirements li.passed {
    color: #22c55e;
}

.password-requirements li.passed .req-icon {
    background-color: #dcfce7;
}

.password-requirements li.passed .req-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: transparent;
    border-radius: 0;
    border-left: 2px solid #22c55e;
    border-bottom: 2px solid #22c55e;
    transform: rotate(-45deg);
    margin-bottom: 2px;
}
