/* assets/css/login.css */
.login-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航 */
/* 修改 .login-header */
.login-header {
    position: relative; /* 关键：为绝对定位的标题提供参考基准 */
    display: flex;
    justify-content: space-between; /* 让Logo在左，按钮在右 */
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 72px; /* 建议给个固定高度，保证垂直对齐稳定 */
}

/* 新增 .logo-img 样式 */
.logo-img1 {
    height: 40px; /* 根据实际图标大小调整，通常32-40px */
    width: auto; /* 保持比例 */
    border-radius: 4px; /* 如果图标是方形的，加一点圆角更好看 */
    /* z-index: 2; 可选，防止被遮挡 */
}

/* 修改 .brand 样式 */
.brand {
    position: absolute; /* 关键：脱离文档流，实现绝对居中 */
    left: 50%;
    transform: translateX(-50%); /* 向左偏移自身宽度的50%，实现完美居中 */

    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    white-space: nowrap; /* 防止标题换行 */
}
}

.visit-btn {
    font-size: 0.9rem;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

    .visit-btn:hover {
        background: #eff6ff;
    }

/* 中间内容区 */
.login-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    /* 既然模仿 Win11 LogonUI，其实甚至可以去掉卡片背景，直接悬浮在背景上 */
    /* 但为了网页可读性，我们保留一个极淡的阴影 */
    /* background: var(--card-bg); */
    /* box-shadow: var(--shadow); */
    /* border-radius: 16px; */
    /* padding: 3rem 2rem; */
}

/* 头像区域 */
.avatar-container {
    margin-bottom: 1.5rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 4px solid white;
}

.welcome-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    font-weight: 500;
}

/* TOTP 6位输入框样式 */
.totp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.totp-input {
    width: 48px;
    height: 56px;
    font-size: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    transition: all 0.2s;
    /* 隐藏数字输入框的上下箭头 */
    -moz-appearance: textfield;
}

    .totp-input::-webkit-outer-spin-button,
    .totp-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .totp-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        transform: translateY(-2px);
    }

/* 账号密码表单 */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.2s;
}

    .form-input:focus {
        border-color: var(--primary);
    }

.btn-submit {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

    .btn-submit:hover {
        background: var(--primary-hover);
    }

    .btn-submit:disabled {
        background: #9ca3af;
        cursor: not-allowed;
    }

/* 切换链接 */
.switch-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px dashed transparent;
}

    .switch-link:hover {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

/* 底部版权 */
.login-footer {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* 错误提示 */
.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.5rem; /* 占位防止抖动 */
}

/* 隐藏 */
.hidden {
    display: none !important;
}
