/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 60px;
}

a {
    color: #1989fa;
    text-decoration: none;
}

/* 主题色 */
:root {
    --primary: #1989fa;
    --primary-light: #4ba3fc;
    --success: #07c160;
    --warning: #ff976a;
    --danger: #ee0a24;
    --text: #323233;
    --text-2: #646566;
    --text-3: #969799;
    --border: #ebedf0;
    --bg: #f5f5f5;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    z-index: 100;
}

.navbar-back {
    position: absolute;
    left: 15px;
    color: #fff;
    font-size: 20px;
}

.page-content {
    padding-top: 50px;
}

/* 底部导航 */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #fff;
    display: flex;
    border-top: 1px solid var(--border);
    z-index: 100;
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 11px;
    text-decoration: none;
}

.tabbar-item.active {
    color: var(--primary);
}

.tabbar-item i {
    font-size: 22px;
    margin-bottom: 3px;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 30px 20px 45px;
    color: #fff;
    text-align: center;
    border-radius: 0 0 25px 25px;
}

.banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.banner-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.banner-stats {
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.3);
    margin: 0 15px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    margin: 15px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text);
}

/* 快捷入口 */
.quick-actions {
    display: flex;
    justify-content: space-around;
    margin-top: -25px;
    position: relative;
    z-index: 10;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-2);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
}

.action-icon.apply { background: linear-gradient(135deg, #ff6b6b, #ff8e8e); }
.action-icon.calc { background: linear-gradient(135deg, #36d1dc, #5bf1f7); }
.action-icon.loan { background: linear-gradient(135deg, #667eea, #8b9cf7); }
.action-icon.chat { background: linear-gradient(135deg, #f093fb, #f5b5fc); }

.action-text {
    font-size: 12px;
}

/* 产品卡片 */
.product-card {
    margin-bottom: 12px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
}

.product-tag {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 12px;
}

.product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    flex: 1;
    min-width: 30%;
}

.info-label {
    font-size: 12px;
    color: var(--text-3);
}

.info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.info-value.highlight {
    color: var(--danger);
}

/* 按钮 */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-outline {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    outline: none;
}

/* 列表 */
.list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child {
    border-bottom: none;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 15px;
    color: var(--text);
}

.list-desc {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

.list-extra {
    color: var(--text-3);
    font-size: 14px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-warning { background: #fff7e6; color: #fa8c16; }
.tag-success { background: #f6ffed; color: #52c41a; }
.tag-danger { background: #fff2f0; color: #ff4d4f; }
.tag-primary { background: #e6f7ff; color: #1890ff; }

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
}

.empty i {
    font-size: 60px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.empty p {
    font-size: 14px;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 30px;
    color: var(--text-3);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 85%;
    max-width: 350px;
    padding: 25px;
    text-align: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 15px;
}

.modal-body {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1;
}

/* 通知栏 */
.notice-bar {
    background: #fffbe8;
    padding: 10px 15px;
    font-size: 13px;
    color: #ed6a0c;
    display: flex;
    align-items: center;
}

.notice-bar i {
    margin-right: 8px;
}

/* 头像 */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
}

/* 金额显示 */
.amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.amount-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-2);
}

/* 步骤条 */
.steps {
    display: flex;
    padding: 20px 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 8px;
}

.step.active .step-icon {
    background: var(--primary);
    color: #fff;
}

.step.done .step-icon {
    background: var(--success);
    color: #fff;
}

.step-title {
    font-size: 12px;
    color: var(--text-3);
}

.step.active .step-title,
.step.done .step-title {
    color: var(--text);
}

/* 聊天 */
.chat-container {
    padding: 15px;
    padding-bottom: 70px;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message.system {
    justify-content: center;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message.user .message-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.admin .message-bubble {
    background: #fff;
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.message.system .message-bubble {
    background: rgba(0,0,0,0.05);
    color: var(--text-3);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 15px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input {
    position: fixed;
    bottom: 55px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input button {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
}

/* 工具类 */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-3); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-15 { padding: 15px; }

