/* ============================================================
 * supplier_login.css — 供应商门户登录页
 * ============================================================ */

:root {
    --primary-darker: #155e75;
    --primary-dark:   #0e7490;
    --primary:        #0891b2;
    --primary-light:  #06b6d4;
    --primary-lighter:#cffafe;
    --accent:         #14b8a6;
    --text:           #0f172a;
    --text-muted:     #64748b;
    --surface:        #ffffff;
    --border:         #e5e7eb;
    --danger:         #ef4444;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #cffafe 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===== 背景装饰 ===== */
.login-bg {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
    overflow: hidden;
}
.login-bg__shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
}
.login-bg__shape--1 {
    width: 380px; height: 380px;
    background: linear-gradient(135deg, #06b6d4, #14b8a6);
    top: -120px; left: -80px;
    animation: floatA 18s ease-in-out infinite;
}
.login-bg__shape--2 {
    width: 320px; height: 320px;
    background: linear-gradient(135deg, #0891b2, #38bdf8);
    bottom: -100px; right: -60px;
    animation: floatB 22s ease-in-out infinite;
}
.login-bg__shape--3 {
    width: 260px; height: 260px;
    background: linear-gradient(135deg, #a7f3d0, #06b6d4);
    top: 40%; right: 15%;
    opacity: 0.3;
    animation: floatC 26s ease-in-out infinite;
}
@keyframes floatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes floatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-30px, -20px) scale(0.95); }
}
@keyframes floatC {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-20px, 40px) scale(1.05); }
}

/* ===== 容器 ===== */
.login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
}

/* ===== 登录卡片 ===== */
.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 36px 28px 28px;
    box-shadow:
        0 24px 64px rgba(8, 145, 178, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: cardIn 0.6s var(--ease);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 品牌区 ===== */
.login-card__brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-card__logo {
    height: 48px;
    width: auto;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 12px rgba(8, 145, 178, 0.25));
}
.login-card__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-darker), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-card__subtitle {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* ===== 错误提示 ===== */
.login-card__error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid var(--danger);
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease-in-out;
}
.login-card__error-icon { flex-shrink: 0; font-size: 16px; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

/* ===== 表单 ===== */
.login-form { display: flex; flex-direction: column; }
.login-field { margin-bottom: 16px; }
.login-field__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.login-field__pwd-wrap {
    position: relative;
}
.login-field__input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    font-family: inherit;
    transition: all 0.2s var(--ease);
}
.login-field__pwd-wrap .login-field__input { padding-right: 48px; }
.login-field__input::placeholder { color: #cbd5e1; }
.login-field__input:hover { border-color: var(--primary-light); }
.login-field__input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.login-field__toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.login-field__toggle:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

/* ===== 登录按钮 ===== */
.login-btn {
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.35);
    transition: all 0.25s var(--ease);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.login-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.45);
}
.login-btn:hover::before { left: 100%; }
.login-btn:active { transform: translateY(0); }

/* ===== 底部 ===== */
.login-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.login-tip {
    margin-top: 24px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    max-width: 400px;
    line-height: 1.6;
}
.login-tip a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
}
.login-tip a:hover { text-decoration: underline; }

/* ===== 桌面端微调 ===== */
@media (min-width: 768px) {
    .login-card { padding: 44px 36px 32px; }
    .login-card__title { font-size: 24px; }
}