* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* =========================
   THEME VARIABLES
========================= */
:root {
    --right-bg: #f2f0ed;
    --input-bg: #ffffff;
    --input-border: #bdbdbd;
    --input-text: #1a1a1a;
    --input-placeholder: #999;
    --link-color: #2f2f2f;
    --logo-primary: #1c4aa0;
    --logo-accent: #4da6dc;
    --btn-bg: #1c4aa0;
    --btn-hover: #163b7a;
    --error-color: #c0392b;
    --toggle-bg: rgba(0,0,0,0.06);
    --toggle-border: rgba(0,0,0,0.12);
    --toggle-color: #555;
    --toggle-track-off: rgba(0,0,0,0.18);
    --toggle-track-on: #4a90d9;
    --toggle-thumb: #ffffff;
    --pulse-color: #1c4aa0;
}

body.dark-mode {
    --right-bg: #0f1117;
    --input-bg: #1a1d27;
    --input-border: #2a2f3e;
    --input-text: #e8eaf0;
    --input-placeholder: #6b7a90;
    --link-color: #8892a4;
    --logo-primary: #5b8fe8;
    --logo-accent: #6dc4f0;
    --btn-bg: #1c4aa0;
    --btn-hover: #2255b8;
    --error-color: #ff6b7a;
    --toggle-bg: rgba(255,255,255,0.06);
    --toggle-border: rgba(255,255,255,0.12);
    --toggle-color: #8892a4;
    --toggle-track-off: rgba(255,255,255,0.18);
    --toggle-track-on: #4a90d9;
    --toggle-thumb: #ffffff;
    --pulse-color: #5b8fe8;
}

body {
    height: 100vh;
    transition: background-color 0.3s ease;
}

/* MAIN SPLIT */
.container {
    display: flex;
    height: 100vh;
}

/* LEFT IMAGE */
.left-panel {
    width: 58%;
    background: url("bg.png") center center no-repeat;
    background-size: cover;
}

/* RIGHT PANEL */
.right-panel {
    width: 42%;
    background-color: var(--right-bg);
    position: relative;
    transition: background-color 0.3s ease;
}

/* LOGIN BLOCK */
.login-wrapper {
    width: 320px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* LOGO */
.logo {
    margin-bottom: 35px;
    text-align: center;
}

/* PULSE LINE ANIMATION */
.pulse-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 28px;
    margin-bottom: 10px;
}

.pulse-line {
    width: 3px;
    border-radius: 2px;
    background-color: var(--pulse-color);
    animation: pulseBar 1.2s ease-in-out infinite;
    transition: background-color 0.3s ease;
}

.pulse-line:nth-child(1) { height: 10px; animation-delay: 0s; }
.pulse-line:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.pulse-line:nth-child(3) { height: 14px; animation-delay: 0.3s; }
.pulse-line:nth-child(4) { height: 26px; animation-delay: 0.45s; }
.pulse-line:nth-child(5) { height: 10px; animation-delay: 0.6s; }
.pulse-line:nth-child(6) { height: 18px; animation-delay: 0.75s; }
.pulse-line:nth-child(7) { height: 8px;  animation-delay: 0.9s; }

@keyframes pulseBar {
    0%, 100% { transform: scaleY(1); opacity: 0.7; }
    50%       { transform: scaleY(1.5); opacity: 1; }
}

.logo h1 {
    margin-top: 4px;
    font-size: 48px;
    font-weight: 700;
    color: var(--logo-primary);
    transition: color 0.3s ease;
}

.logo h1 span {
    color: var(--logo-accent);
    transition: color 0.3s ease;
}

.login-form {
    display: flex;
    flex-direction: column;
}

/* INPUTS */
.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    font-size: 14px;
    background-color: var(--input-bg);
    color: var(--input-text);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    outline: none;
}

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

.login-form input:focus {
    border-color: var(--logo-primary);
    box-shadow: 0 0 0 3px rgba(28, 74, 160, 0.12);
}

.login-error {
    margin-top: 10px;
    font-size: 12px;
    color: var(--error-color);
    text-align: center;
    transition: color 0.3s ease;
}

/* LINKS BELOW INPUTS */
.text-links {
    margin-top: 6px;
}

.text-links a {
    display: block;
    font-size: 14px;
    color: var(--link-color);
    text-decoration: none;
    margin-top: 10px;
    text-align: center;
    transition: color 0.3s ease;
}

.text-links a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border-radius: 10px;
    border: none;
    background-color: var(--btn-bg);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

/* =========================
   THEME TOGGLE — BOTTOM RIGHT
========================= */
.theme-toggle-login {
    position: fixed;
    bottom: 24px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--toggle-bg);
    border: 1px solid var(--toggle-border);
    border-radius: 30px;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--toggle-color);
    font-size: 13px;
    font-weight: 600;
    font-family: "Segoe UI", Arial, sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.3s ease;
    z-index: 999;
    user-select: none;
}

.theme-toggle-login:hover {
    background: var(--toggle-border);
}

.toggle-icon-login {
    font-size: 15px;
    line-height: 1;
}

.toggle-label-login {
    white-space: nowrap;
}

/* Toggle track + thumb */
.toggle-track-login {
    width: 36px;
    height: 20px;
    background: var(--toggle-track-off);
    border-radius: 10px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

body.dark-mode .toggle-track-login {
    background: var(--toggle-track-on);
}

.toggle-thumb-login {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--toggle-thumb);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

body.dark-mode .toggle-thumb-login {
    transform: translateX(16px);
}