* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; font-size: 14px; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== 页面容器 ===== */
.app-wrap { max-width: 750px; margin: 0 auto; min-height: 100vh; background: #f0f2f5; position: relative; padding: 0 5px 80px; }

/* ===== 顶部导航栏 ===== */
.app-topbar {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0 -5px;
}
.app-topbar-title { font-size: 16px; font-weight: 600; }
.app-topbar-back { color: #fff; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.app-topbar-right { color: #fff; font-size: 14px; }

/* ===== 个人中心头部 ===== */
.profile-header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    padding: 14px 16px 12px;
    position: relative;
    overflow: hidden;
    margin: 0 -5px;
}
.profile-info { display: flex; align-items: center; gap: 12px; position: relative; }
.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(255,255,255,0.3);
}
.profile-detail { flex: 1; }
.profile-name { font-size: 16px; font-weight: 600; }
.profile-phone { font-size: 12px; opacity: 0.7; margin-top: 1px; }
.profile-badge {
    display: inline-block;
    font-size: 10px;
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
}
.profile-logout {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
.profile-logout:active { transform: scale(0.9); }
.profile-stats {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
    position: relative;
}
.profile-stats span { font-size: 12px; opacity: 0.8; }
.profile-stats b { font-size: 14px; font-weight: 700; opacity: 1; margin-left: 2px; }

/* ===== 功能网格 ===== */
.func-grid { background: #fff; padding: 18px 14px; margin: 8px 0; border-radius: 12px; }
.func-grid-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 14px; }
.func-grid-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.func-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.func-item:active { transform: scale(0.95); }
.func-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}
.func-icon-blue { background: #e8f0fe; color: #1a73e8; }
.func-icon-green { background: #e6f4ea; color: #34a853; }
.func-icon-orange { background: #fef7e0; color: #f9ab00; }
.func-icon-purple { background: #f3e8fd; color: #9c27b0; }
.func-icon-red { background: #fce8e6; color: #ea4335; }
.func-icon-teal { background: #e0f2f1; color: #00897b; }
.func-name { font-size: 12px; color: #666; }

/* ===== 统计卡片 ===== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; background: #fff; margin: 8px 0; border-radius: 12px; }
.stat-item { text-align: center; padding: 10px 4px; border-radius: 10px; background: #f8f9fb; }
.stat-item-num { font-size: 20px; font-weight: 700; color: #1a73e8; }
.stat-item-label { font-size: 11px; color: #888; margin-top: 3px; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 12px; padding: 18px; margin: 8px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title span { font-size: 12px; color: #999; font-weight: 400; }

/* ===== 列表项 ===== */
.list-item { background: #fff; border-radius: 12px; padding: 16px; margin: 8px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.list-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.list-item-title { font-size: 15px; font-weight: 600; color: #333; flex: 1; }
.list-item-body { font-size: 13px; color: #666; line-height: 1.6; }
.list-item-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }

/* ===== 状态徽章 ===== */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.status-pending { background: #fef7e0; color: #f9ab00; }
.status-assigned { background: #e8f0fe; color: #1a73e8; }
.status-processing { background: #f3e8fd; color: #9c27b0; }
.status-done { background: #e6f4ea; color: #34a853; }
.status-cancel { background: #fce8e6; color: #ea4335; }
.status-rated { background: #e0f2f1; color: #00897b; }
.priority-normal { background: #e8f0fe; color: #1a73e8; }
.priority-urgent { background: #fef7e0; color: #f9ab00; }
.priority-critical { background: #fce8e6; color: #ea4335; }

/* ===== 按钮 ===== */
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #1a73e8, #4285f4); color: #fff; }
.btn-success { background: linear-gradient(135deg, #34a853, #2d8e47); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ea4335, #c5221f); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f9ab00, #ef6c00); color: #fff; }
.btn-default { background: #f5f7fa; color: #555; border: 1px solid #ddd; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; font-size: 15px; font-weight: 600; border-radius: 22px; }
.btn-block-primary { background: linear-gradient(135deg, #1a73e8, #4285f4); color: #fff; box-shadow: 0 4px 12px rgba(26,115,232,0.3); }
.btn-block-default { background: #f0f4ff; color: #1a73e8; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; font-size: 14px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 48px 20px; color: #999; }
.empty-state-icon { font-size: 48px; margin-bottom: 14px; }

/* ===== 提示消息 ===== */
.alert { padding: 12px 16px; border-radius: 10px; margin: 8px 0; font-size: 14px; }
.alert-success { background: #e6f4ea; color: #34a853; }
.alert-error { background: #fce8e6; color: #ea4335; }
.alert-info { background: #e8f0fe; color: #1a73e8; }

/* ===== 登录页 ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    padding: 20px;
}
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.login-logo { text-align: center; font-size: 24px; font-weight: 700; color: #1a73e8; margin-bottom: 10px; }
.login-subtitle { text-align: center; font-size: 14px; color: #888; margin-bottom: 28px; }
.login-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.login-tab { flex: 1; text-align: center; padding: 12px; cursor: pointer; color: #888; font-weight: 500; font-size: 14px; }
.login-tab.active { color: #1a73e8; border-bottom: 2px solid #1a73e8; }

/* ===== 底部Tab栏 ===== */
.app-tabbar {
    display: flex;
    background: #fff;
    position: fixed;
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 10px);
    max-width: 740px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-radius: 18px;
    padding: 8px 0 6px;
}
.app-tabbar-indicator { display: none; }
.app-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0 6px;
    color: #9aa0a6;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.app-tabbar-item:active { transform: scale(0.92); }
.app-tabbar-item.active { color: #1a73e8; }
.app-tabbar-icon { font-size: 18px; line-height: 1; margin-bottom: 4px; }
.app-tabbar-item.active .app-tabbar-icon { transform: translateY(-2px); }
.app-tabbar-label { font-size: 11px; line-height: 1; }
.app-tabbar-item.active .app-tabbar-label { font-weight: 600; }

/* ===== 详情行 ===== */
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.detail-label { width: 100px; color: #888; font-size: 13px; }
.detail-value { flex: 1; color: #333; font-size: 14px; }
.detail-row:last-child { border-bottom: none; }

/* ===== 时间线 ===== */
.timeline { padding-left: 4px; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:before {
    content: '';
    position: absolute;
    left: 7px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}
.timeline-item:last-child:before { display: none; }
.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 3px solid #e0e0e0;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}
.timeline-done .timeline-dot { background: #34a853; border-color: #34a853; }
.timeline-content { flex: 1; }
.timeline-title { font-size: 14px; font-weight: 500; color: #555; }
.timeline-done .timeline-title { color: #333; font-weight: 600; }
.timeline-time { font-size: 12px; color: #999; margin-top: 2px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
}

@media (min-width: 960px) {
    .app-tabbar { display: none; }
    .app-wrap { padding: 0 12px; }
}
