/*
 * lock_admin.css —— 山东省名中医健康服务云平台 · 后台管理登录页
 * 棕金国风主题，设计令牌取自 docs/brand_h5_colors.html（v2.9 标准色板）
 * 2026-10-04
 */

/* ==========================================================================
   1. 设计变量（标准令牌）
   ========================================================================== */
:root {
    /* 品牌棕：导航 / 主结构 */
    --brown: #8B5A2B;
    --brown-deep: #6E4420;
    --brown-soft: #A06B35;
    /* 鎏金：主操作 / 点缀 */
    --gold: #C4913F;
    --gold-deep: #A87A2E;
    --gold-bright: #F0CF8E;
    --gold-light: #DFB46E;
    --gold-bg: #F8EFDA;
    /* 宣纸 / 卡片 */
    --paper: #FAF4E6;
    --paper-deep: #EDE3CB;
    --card: #FFFFFF;
    --line: #EEE3CA;
    /* 文字 */
    --text: #3D2C22;
    --text-sub: #87704F;
    --text-faint: #B7A684;
    /* 功能色 */
    --moss: #5F7449;
    --red: #B4553C;
    --red-bg: #F9ECE7;
    --red-line: #ECCBBE;
    --req: #C0562E;

    --shadow-card: 0 20px 60px rgba(110, 68, 32, 0.14), 0 2px 8px rgba(150, 110, 50, 0.06);
    --shadow-btn: 0 8px 24px rgba(168, 122, 46, 0.30);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   2. 基础重置
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 粒子画布 */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ==========================================================================
   3. 页面布局
   ========================================================================== */
body.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 56px;
    background: linear-gradient(135deg, #F3E9D3 0%, var(--paper) 38%, #F6ECD7 68%, #F0E4CA 100%);
}

.login-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 960px;
    max-width: 100%;
    min-height: 560px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(238, 227, 202, 0.9);
    overflow: hidden;
}

.fade-in {
    animation: fadeIn 0.5s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   4. 左侧品牌面板
   ========================================================================== */
.brand-panel {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 40px;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brown-soft) 0%, var(--brown) 55%, var(--brown-deep) 100%);
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240, 207, 142, 0.16) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196, 145, 63, 0.28) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-grid {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: linear-gradient(rgba(240, 207, 142, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 207, 142, 0.6) 1px, transparent 1px);
    background-size: 40px 40px;
}

.float-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(240, 207, 142, 0.22);
    animation: floatCircle 8s ease-in-out infinite;
}

.float-circle:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 10%;
}

.float-circle:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
    border-color: rgba(240, 207, 142, 0.45);
}

.float-circle:nth-child(4) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
    opacity: 0.5;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.brand-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.brand-subtitle {
    font-size: 11px;
    margin-top: 12px;
    opacity: 0.72;
    letter-spacing: 0.8px;
    line-height: 1.6;
}

.brand-divider {
    width: 50px;
    height: 3px;
    margin: 24px auto;
    background: linear-gradient(90deg, transparent, rgba(240, 207, 142, 0.85), transparent);
    border-radius: 2px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: 0.92;
}

.feature-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-bright);
    box-shadow: 0 0 8px rgba(240, 207, 142, 0.7);
    flex-shrink: 0;
}

/* ==========================================================================
   5. 右侧表单面板
   ========================================================================== */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 48px;
}

.form-header {
    margin-bottom: 26px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.form-header p {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
}

/* 错误提示 */
.error-tip {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--red-bg);
    border: 1px solid var(--red-line);
    border-radius: 10px;
    color: var(--red);
    font-size: 13px;
    margin-bottom: 16px;
}

.error-tip.show {
    display: flex;
}

/* Tab 切换 */
.login-tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.login-tabs .tab-item {
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-faint);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    user-select: none;
}

.login-tabs .tab-item.active {
    color: var(--brown);
}

.login-tabs .tab-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brown), var(--gold));
    border-radius: 1px;
    transition: width 0.3s ease;
}

.login-tabs .tab-item.active::after {
    width: 100%;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 输入框 */
.form-group {
    margin-bottom: 18px;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--paper);
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: all 0.3s;
    height: 48px;
}

.input-wrap:focus-within {
    background: #fff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(196, 145, 63, 0.14);
}

.input-icon {
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 18px;
    flex-shrink: 0;
}

.input-wrap input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    height: 100%;
    font-family: inherit;
}

.input-wrap input::placeholder {
    color: var(--text-faint);
}

.toggle-pwd {
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-faint);
    transition: color 0.2s;
    font-size: 18px;
    flex-shrink: 0;
}

.toggle-pwd:hover {
    color: var(--brown);
}

/* 图形验证码 */
.captcha-img {
    height: 36px;
    width: 110px;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 4px;
    display: block;
}

.input-wrap:has(.captcha-img) {
    padding-right: 4px;
}

.input-wrap:has(.captcha-img) .toggle-pwd {
    width: auto;
    padding: 0;
}

/* 短信验证码按钮（浅金次操作） */
.sms-btn {
    margin-right: 8px;
    padding: 0 16px;
    height: 36px;
    background: linear-gradient(135deg, #FBF3DF, #F2E4C0);
    color: var(--gold-deep);
    border: 1px solid var(--gold);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-family: inherit;
}

.sms-btn:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(168, 122, 46, 0.25);
    transform: translateY(-1px);
}

.sms-btn:disabled {
    background: #EFE9DC;
    border-color: #E0D8C6;
    color: #B3A98F;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 登录主按钮（鎏金渐变 + 深棕字） */
.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 52%, var(--gold-deep) 100%);
    background-size: 200% 100%;
    color: #5A3618;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: var(--shadow-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
}

.btn-login:hover:not(:disabled) {
    background-position: 100% 0;
    box-shadow: 0 10px 28px rgba(168, 122, 46, 0.40);
    transform: translateY(-2px);
}

.btn-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* 注册入口按钮 */
.btn-register-link {
    width: 100%;
    height: 44px;
    margin-top: 12px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
}

.btn-register-link:hover {
    border-color: var(--gold);
    color: var(--brown);
    background: var(--gold-bg);
}

/* 加载动画（深棕，配金底按钮） */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(90, 54, 24, 0.25);
    border-top-color: #5A3618;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   6. 底部版权
   ========================================================================== */
.page-footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.8;
    padding: 10px 0;
    background: linear-gradient(to top, rgba(250, 244, 230, 0.95), rgba(250, 244, 230, 0));
    pointer-events: none;
}

/* ==========================================================================
   7. 响应式
   ========================================================================== */
@media (max-width: 860px) {
    .login-card {
        flex-direction: column;
        min-height: auto;
        width: 100%;
        max-width: 440px;
    }

    .brand-panel {
        padding: 32px 24px;
        min-height: 180px;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 14px;
    }

    .brand-title {
        font-size: 19px;
        letter-spacing: 1px;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .brand-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 18px;
    }

    .feature-item {
        font-size: 12px;
    }

    .float-circle {
        display: none;
    }

    .form-panel {
        padding: 28px 24px;
    }

    .form-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    body.auth-page {
        padding: 12px 12px 64px;
    }

    .brand-panel {
        padding: 24px 20px;
        min-height: 150px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }

    .brand-title {
        font-size: 16px;
        letter-spacing: 0.5px;
    }

    .brand-divider {
        margin: 14px auto;
    }

    .brand-features {
        display: none;
    }

    .form-panel {
        padding: 22px 18px;
    }

    .form-header {
        margin-bottom: 18px;
    }

    .form-header h2 {
        font-size: 18px;
    }

    .login-tabs {
        gap: 24px;
        margin-bottom: 18px;
    }

    .input-wrap {
        height: 44px;
        border-radius: 10px;
    }

    .btn-login {
        height: 44px;
        font-size: 15px;
        border-radius: 10px;
        letter-spacing: 2px;
    }

    .btn-register-link {
        height: 42px;
        font-size: 13px;
        letter-spacing: 2px;
        border-radius: 10px;
    }

    .captcha-img {
        width: 96px;
        height: 34px;
    }

    .spinner {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .page-footer {
        font-size: 10px;
    }
}
