@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Stalinist+One&display=swap');

:root {
    /* Див. client.css: без color-scheme системні списки й вибір дати/часу
       малюються світлими, і текст у них стає нечитабельним. */
    color-scheme: dark;

    --bg: #0f0f10;
    --surface: rgba(23, 23, 25, 0.88);
    --surface-2: rgba(32, 32, 36, 0.92);
    --line: #303036;
    --text: #f4f4f5;
    --muted: #a6a6ad;
    --accent: #ff6424;
    --accent-2: #ffbf17;
    --danger: #ff8585;
    --radius: 8px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: "Montserrat", Arial, sans-serif;
    background:
        linear-gradient(90deg, rgba(5, 5, 7, 0.94), rgba(5, 5, 7, 0.48) 48%, rgba(5, 5, 7, 0.86)),
        url("../assets/login-bg.png") 59% center / cover fixed,
        var(--bg);
    overflow-x: hidden;
}

.auth-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 2;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(84, 80, 80, 0.86);
    backdrop-filter: blur(10px);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 20px;
}

.auth-brand {
    color: #fff;
    font-family: "Stalinist One", Impact, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
    text-decoration: none;
    text-shadow: 0 0 24px rgb(255 100 36 / 45%);
}

.auth-card {
    width: min(420px, 100%);
    padding: 28px 32px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(255, 100, 36, 0.18), transparent 36%),
        var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.auth-subtitle {
    margin: 10px 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 13px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 34px;
    min-height: 30px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.35);
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: transparent;
    color: rgba(255,255,255,0.65);
    box-shadow: none;
    transform: translateY(-50%);
}

.eye-icon {
    width: 18px;
    height: 18px;
    background: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.eye-visible {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5C6.5 5 2.1 9.3 1 12c1.1 2.7 5.5 7 11 7s9.9-4.3 11-7c-1.1-2.7-5.5-7-11-7Zm0 11.2A4.2 4.2 0 1 1 12 7.8a4.2 4.2 0 0 1 0 8.4Zm0-2A2.2 2.2 0 1 0 12 9.8a2.2 2.2 0 0 0 0 4.4Z'/%3E%3C/svg%3E");
}

.eye-hidden {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.3 2 2 3.3l3 3C3 7.8 1.6 10 1 12c1.1 2.7 5.5 7 11 7 2 0 3.8-.5 5.3-1.3l3.4 3.3 1.3-1.3L3.3 2Zm8.3 14.2A4.2 4.2 0 0 1 7.8 12c0-.9.3-1.7.7-2.4l1.6 1.6a2.2 2.2 0 0 0 2.7 2.7l1.6 1.6c-.8.4-1.5.7-2.8.7ZM12 5c5.5 0 9.9 4.3 11 7-.4 1.1-1.4 2.5-2.8 3.7l-2.4-2.4c.2-.4.4-.9.4-1.3A4.2 4.2 0 0 0 12 7.8c-.5 0-.9.1-1.3.2L8.8 6.1C9.8 5.4 10.9 5 12 5Z'/%3E%3C/svg%3E");
}

input::placeholder {
    color: #6f6f78;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 100, 36, 0.18);
    background: rgba(26, 26, 29, 0.96);
}

button {
    width: 100%;
    min-height: 42px;
    margin-top: 4px;
    padding: 11px 14px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: #111;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover {
    background: #ff7a45;
    box-shadow: 0 14px 32px rgba(255, 100, 36, 0.24);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.auth-toast {
    display: none;
    position: relative;
    margin: 14px 0 0;
    border: 1px solid rgba(255, 133, 133, 0.32);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(255, 100, 36, 0.14), transparent 34%),
        rgba(32, 32, 36, 0.92);
    color: var(--text);
    padding: 12px 12px 12px 40px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.auth-toast::before {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 133, 133, 0.16);
    color: var(--danger);
    content: "!";
    font-size: 12px;
    font-weight: 900;
}

.auth-toast.show {
    display: block;
}

.auth-toast.success {
    border-color: rgba(57, 217, 138, 0.3);
    border-left-color: #39d98a;
}

.auth-toast.success::before {
    background: rgba(57, 217, 138, 0.16);
    color: #39d98a;
    content: "✓";
}

.auth-switch {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

a:hover {
    color: var(--accent-2);
}

@media (max-width: 640px) {
    body {
        background-position: center;
    }

    .auth-shell {
        min-height: 100dvh;
        justify-items: stretch;
        align-content: center;
        padding: 72px 0 24px;
        width: calc(100% - 32px);
    }

    .auth-card {
        width: 100%;
        padding: 22px 20px;
        border-radius: 16px;
    }

    h2 {
        font-size: 22px;
    }

    .auth-kicker {
        font-size: 10px;
    }
}
