@import url('icons.css');
@import url('buttons.css');

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-header h1 {
    margin-bottom: 0.5rem;
}
.login-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}
.form-group {
    margin-bottom: 1rem;
}

.login-form {
    margin-top: 1rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}
.messages {
    margin-bottom: 1rem;
}
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Error messages - hidden by default */
.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.password-field {
    position: relative;
}

/* Иконка глаза для показа/скрытия пароля */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    border-radius: 3px;
    /* Используем стили из icons.css */
}
.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Hide validation error messages by default */
#username-error,
#password-error,
#password-length-error {
    display: none;
}

/* Forgot password link */
.forgot-password-link {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password-link a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

/* Password reset specific styles */
.code-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: border-color 0.2s;
}

.code-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* Стили спиннера теперь в icons.css */


.hidden {
    display: none !important;
}

.secondary {
    background: #6c757d !important;
    border-color: #6c757d !important;
}

.secondary:hover:not(:disabled) {
    background: #545b62 !important;
    border-color: #545b62 !important;
}

.resend-section {
    text-align: center;
    margin-top: 1rem;
}

.resend-btn {
    margin-bottom: 10px;
}

.password-requirements {
    text-align: left;
    margin-bottom: 20px;
}

.password-errors,
.confirm-password-errors {
    display: none;
}

.confirm-password-errors.show {
    display: block;
}

/* Password checklist styles */
#password-checklist {
    text-align: left;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#password-checklist .requirement {
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

#password-checklist .indicator {
    margin-right: 8px;
    font-weight: bold;
}

#password-checklist .requirement.unmet .indicator {
    color: #dc3545;
}

#password-checklist .requirement.met .indicator {
    color: #28a745;
}

#password-checklist .requirement.pending .indicator {
    color: #ffc107;
}

