<!DOCTYPE html>
<html lang="ru" data-theme="dark">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <title>LogBoard+ - Вход</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/css/login.css">
</head>
<body>
    <div class="theme-toggle">
        <span>Theme</span>
        <input id="themeSwitch" type="checkbox" />
    </div>

    <div class="login-container">
        <div class="login-card">
            <div class="login-header">
                <div class="login-logo">
                    <i class="fas fa-terminal"></i>
                </div>
                <h1 class="login-title">LogBoard+</h1>
                <p class="login-subtitle">Веб-панель для просмотра логов микросервисов</p>
            </div>

            <form class="login-form" id="loginForm">
                <div class="error-message" id="errorMessage"></div>
                
                <div class="form-group">
                    <label for="username" class="form-label">Имя пользователя</label>
                    <input 
                        type="text" 
                        id="username" 
                        name="username" 
                        class="form-input" 
                        placeholder="Введите имя пользователя"
                        required
                        autocomplete="username"
                    >
                </div>

                <div class="form-group">
                    <label for="password" class="form-label">Пароль</label>
                    <div class="password-input-wrapper">
                        <input 
                            type="password" 
                            id="password" 
                            name="password" 
                            class="form-input" 
                            placeholder="Введите пароль"
                            required
                            autocomplete="current-password"
                        >
                        <button type="button" class="password-toggle" id="passwordToggle">
                            <i class="fas fa-eye"></i>
                        </button>
                    </div>
                </div>

                <button type="submit" class="login-button" id="loginButton">
                    <span class="loading-spinner" id="loadingSpinner"></span>
                    <span id="buttonText">Войти</span>
                </button>
            </form>

            <div class="footer">
                <p>Автор: <a href="https://devops.org.ru" target="_blank">Сергей Антропов</a></p>
            </div>
        </div>
    </div>
    <script src="/static/js/login.js"></script>
</body>
</html>
