/*
 * Qisutu - Open Source Ticket System
 * Copyright (C) 2026 Franziska Steps
 * Qisutu - Kim-KI, https://qisutu.de
 *
 * This file is part of Qisutu.
 *
 * Qisutu is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Qisutu is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Qisutu. If not, see <https://www.gnu.org/licenses/>.
 *
 * SPDX-FileCopyrightText: 2026 Franziska Steps
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

.qisutu-login-page {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32rem),
        var(--qisutu-bg);
}

.qisutu-login {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.qisutu-login-panel {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    background: var(--qisutu-surface);
    border: 1px solid var(--qisutu-border);
    border-radius: var(--qisutu-radius);
    box-shadow: var(--qisutu-shadow);
}

.qisutu-login-panel-two-factor-setup {
    max-width: 720px;
}

.qisutu-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.qisutu-login-logo {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--qisutu-primary);
    overflow: hidden;
}

.qisutu-login-logo img {
    width: 100%;
    height: 100%;
    display: block;
}

.qisutu-login h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.qisutu-login-section-header {
    margin-bottom: 20px;
}

.qisutu-login-section-header h2 {
    margin: 0;
    color: var(--qisutu-text);
    font-size: 22px;
    line-height: 1.25;
}

.qisutu-login-section-header p {
    margin-top: 7px;
}

.qisutu-login p {
    margin: 4px 0 0;
    color: var(--qisutu-muted);
}

.qisutu-login-message {
    margin-bottom: 14px;
    color: var(--qisutu-danger);
    font-size: 14px;
}

.qisutu-login-language {
    margin-bottom: 8px;
}

.qisutu-login-language-control {
    display: flex;
    gap: 8px;
}

.qisutu-login-language select {
    min-width: 0;
    height: 42px;
    flex: 1 1 auto;
    padding: 8px 34px 8px 11px;
    border: 1px solid var(--qisutu-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--qisutu-text);
    font: inherit;
}

.qisutu-login-language-icon {
    width: 42px;
    height: 42px;
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: var(--qisutu-primary);
}

.qisutu-login-language-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.qisutu-login-language select:focus {
    outline: 3px solid rgba(15, 118, 110, 0.16);
    border-color: var(--qisutu-primary);
}

.qisutu-login-form {
    display: grid;
    gap: 16px;
}

.qisutu-login-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.qisutu-login-type legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-weight: 700;
}

.qisutu-login-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--qisutu-border);
    border-radius: 7px;
    background: #ffffff;
    cursor: pointer;
}

.qisutu-login-type input {
    margin: 0;
}

.qisutu-login-field {
    display: grid;
    gap: 6px;
}

.qisutu-login-field label {
    font-weight: 700;
    color: var(--qisutu-text);
}

.qisutu-login-field input {
    width: 100%;
    height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--qisutu-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--qisutu-text);
    font: inherit;
}

.qisutu-login-field input:focus {
    outline: 3px solid rgba(15, 118, 110, 0.16);
    border-color: var(--qisutu-primary);
}

.qisutu-login-button {
    height: 42px;
    border: 0;
    border-radius: 7px;
    background: var(--qisutu-primary);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.qisutu-login-button:hover {
    background: var(--qisutu-primary-hover);
}

.qisutu-login-external {
    display: grid;
    gap: 10px;
}

.qisutu-login-external-separator {
    color: var(--qisutu-muted);
    text-align: center;
    font-size: 13px;
}

.qisutu-login-button-external {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--qisutu-primary);
    background: #ffffff;
    color: var(--qisutu-primary);
    text-decoration: none;
}

.qisutu-login-button-external:hover {
    background: rgba(0, 84, 104, 0.08);
}

@media (max-width: 520px) {
    .qisutu-header {
        padding: 0 16px;
    }

    .qisutu-login {
        align-items: flex-start;
        padding-top: 24px;
    }

    .qisutu-login-panel {
        padding: 24px;
    }
}

.qisutu-login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
    text-align: center;
}

.qisutu-login-links-separated {
    margin-top: 22px;
}

.qisutu-login-link {
    color: var(--qisutu-primary);
    font-weight: 700;
    text-decoration: none;
}

.qisutu-login-link:hover,
.qisutu-login-link:focus {
    text-decoration: underline;
}

.qisutu-login-hint {
    margin: -4px 0 0;
    color: var(--qisutu-muted);
    font-size: 13px;
    line-height: 1.45;
}

.qisutu-login-notice {
    padding: 14px 16px;
    border: 1px solid var(--qisutu-border);
    border-radius: 7px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.qisutu-login-notice p {
    margin: 0;
    color: inherit;
}

.qisutu-login-notice p + p {
    margin-top: 10px;
}

.qisutu-login-notice-success {
    border-color: #9fcfbc;
    background: #eef9f4;
    color: #17603f;
}

.qisutu-login-notice-error {
    border-color: #e5b3b3;
    background: #fff3f3;
    color: var(--qisutu-danger);
}

.qisutu-login-button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.qisutu-login-actions {
    display: grid;
    gap: 16px;
    margin-top: 22px;
    text-align: center;
}


.qisutu-login-links-stack {
    flex-direction: column;
    gap: 8px;
}

.qisutu-login-registration-summary {
    margin-bottom: 14px;
}

.qisutu-login-two-factor-info {
    margin-bottom: 20px;
}

.qisutu-login-two-factor-info > strong {
    display: block;
    margin-bottom: 12px;
}

.qisutu-login-two-factor-info .qisutu-two-factor-setup-grid {
    margin-bottom: 0;
}

.qisutu-login-recovery-code-list {
    margin: 0 0 18px;
}

.qisutu-login-two-factor-continue {
    margin-top: 18px;
}

@media (max-width: 720px) {
    .qisutu-login-panel-two-factor-setup {
        max-width: 420px;
    }

    .qisutu-login-panel-two-factor-setup .qisutu-two-factor-setup-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
