:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.topbarcontainer {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.topbar {
    display: inline-block;
    padding: 1.5rem;
}

.topbar-image {
    max-width: 220px;
    height: auto;
}

.login-link {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-link a:hover {
    color: var(--primary-hover);
}

.formcontainer {
    background: var(--card-bg);
    padding: 3.5rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
}

.formrow {
    margin-bottom: 2rem;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
}

input,
select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M4.646 6.146a.5.5 0 0 1 .708 0L8 8.793l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 2.5rem;
}

select:invalid {
    color: var(--text-muted);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.passwordforget,
.terms-text {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-text a:hover {
    color: var(--primary-hover);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.95rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.mb-3 {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .formcontainer {
        padding: 2.5rem;
    }

    .topbar-image {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .formcontainer {
        padding: 2rem;
    }

    .topbar-image {
        max-width: 160px;
    }

    input,
    select {
        padding: 0.875rem 1rem;
    }

    select {
        background-position: right 1rem center;
        padding-right: 2.25rem;
    }

    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .col-md-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-option {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.language-option:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.language-option.active {
    opacity: 1;
}

.language-option img {
    width: 30px;
    height: auto;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }

    .language-option img {
        width: 24px;
    }
}