/* ============================================================
   鹏杰物流 - 登录页样式
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-dark: #0f766e;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --white: #ffffff;
    --danger: #dc2626;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-800);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== 背景 ==================== */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 48%, #0f766e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-bg::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ==================== 容器 ==================== */
.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

/* ==================== Header ==================== */
.login-header {
    text-align: center;
    margin-bottom: 28px;
    color: var(--white);
}

.login-logo {
    font-size: 3.5rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.login-company {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.08em;
}

/* ==================== 卡片 ==================== */
.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255,255,255,0.7);
}

.login-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: #f8fafc;
    transition: all var(--transition);
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--gray-500);
}

/* ==================== 登录按钮 ==================== */
.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: scale(0.98);
}

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

/* ==================== 加载动画 ==================== */
.login-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ==================== 错误提示 ==================== */
.login-error {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ==================== 底部 ==================== */
.login-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
}

/* ==================== 工具类 ==================== */
.hidden { display: none !important; }

/* ==================== 响应式 ==================== */
@media (min-width: 768px) {
    html { font-size: 15px; }
    .login-card { padding: 36px 32px; }
}

@media (max-width: 360px) {
    .login-card { padding: 24px 18px; }
    .login-company { font-size: 1.4rem; }
}
