/**
 * KnowSmart 登录/注册页面样式
 */

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

.ks-auth-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: #111827;
    background: #f0f2f5;
    min-height: 100vh;
}

/* ===== 双栏布局 ===== */
.ks-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ===== 左侧品牌区 ===== */
.ks-auth__brand {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.ks-auth__brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.ks-auth__brand-content {
    position: relative;
    z-index: 1;
    max-width: 380px;
    color: #fff;
}

.ks-auth__site-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
}

.ks-auth__tagline {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 40px;
    line-height: 1.6;
}

.ks-auth__features {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ks-auth__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.9;
}

.ks-auth__feature svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ===== 右侧表单区 ===== */
.ks-auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #fff;
}

.ks-auth__card {
    width: 100%;
    max-width: 400px;
}

/* ===== 消息提示 ===== */
.ks-auth__msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.ks-auth__msg--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ks-auth__msg--success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ===== Tabs ===== */
.ks-auth__tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid #f3f4f6;
}

.ks-auth__tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.ks-auth__tab:hover {
    color: #6b7280;
}

.ks-auth__tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

/* ===== 表单 ===== */
.ks-auth__form {
    display: flex;
    flex-direction: column;
}

.ks-auth__note {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.ks-auth__field {
    margin-bottom: 18px;
}

.ks-auth__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.ks-auth__required {
    color: #dc2626;
}

.ks-auth__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: all 0.2s;
}

.ks-auth__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.ks-auth__input::placeholder {
    color: #9ca3af;
}

.ks-auth__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ks-auth__checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

.ks-auth__checkbox input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
}

.ks-auth__link {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.ks-auth__link:hover {
    text-decoration: underline;
}

.ks-auth__btn {
    width: 100%;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 2px;
}

.ks-auth__btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    transform: translateY(-1px);
}

.ks-auth__btn:active {
    transform: translateY(0);
}

.ks-auth__hint {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #9ca3af;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .ks-auth {
        grid-template-columns: 1fr;
    }
    
    .ks-auth__brand {
        display: none;
    }
    
    .ks-auth__panel {
        padding: 32px 24px;
    }
}
