/* Login Page Styles */
:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --background-light: #f9fafb;
}

/* Body and Main Layout */
.auth-body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    margin: 0;
    padding: 0;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Site Login Container */
.site-login {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Logo and Header */
.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: var(--primary-color);
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.logo-container i {
    font-size: 2rem;
    color: white;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Form Container */
.login-form-container {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    animation: fadeInUp 0.6s ease-out;
}

/* Form Elements */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Input Groups - правильная Bootstrap структура */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem 0 0 0.75rem;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.custom-input {
    height: 48px;
    border: 1px solid var(--border-color);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #fff;
    background-clip: padding-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-group > .custom-input {
    border-radius: 0;
    border-left: 0;
}

.input-group > .custom-input:focus {
    z-index: 5;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Password toggle button */
.password-toggle {
    border: 1px solid var(--border-color);
    border-left: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    background-color: #f8f9fa;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    background-color: var(--background-light);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.password-toggle:focus {
    z-index: 5;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Checkbox */
.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.custom-checkbox {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    color-adjust: exact;
    border-radius: 0.25em;
    transition: background-color 0.15s ease-in-out, background-position 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.custom-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.custom-checkbox:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Links */
.forgot-password-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary-hover);
}

/* Buttons */
.custom-btn {
    height: 48px;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.custom-btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.custom-btn:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
    overflow: hidden;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.divider span {
    position: relative;
    display: inline-block;
    background-color: white;
    padding: 0 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    z-index: 2;
}

/* Social Buttons */
.social-login .auth-clients {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-login .auth-link,
.social-btn {
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    background-color: white;
    text-decoration: none;
    color: var(--text-primary);
}

.social-login .auth-link:hover,
.social-btn:hover {
    border-color: var(--primary-hover);
    background: var(--background-light);
    color: var(--text-primary);
    text-decoration: none;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Footer */
.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Error Messages */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #dc3545;
}

.input-group > .is-invalid {
    z-index: 4;
}

/* Responsive */
@media (max-width: 576px) {
    .login-form-container {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .auth-main {
        padding: 0.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
