/* 小程序风格移动端样式 */

/* 基础变量 */
:root {
    --primary-color: #07c160;
    --primary-dark: #06ad56;
    --danger-color: #fa5151;
    --warning-color: #ffc300;
    --text-primary: #191919;
    --text-secondary: #888888;
    --text-disabled: #c7c7c7;
    --bg-page: #f7f7f7;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 登录页面 */
.page-login,
.mobile-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header .logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* WeUI 样式组件 */
.weui-noticebar {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.weui-noticebar_warn {
    background: #fff7e6;
    color: #ff9800;
    border: 1px solid #ffe0b2;
}

.weui-noticebar_success {
    background: #e8f5e9;
    color: #4caf50;
    border: 1px solid #c8e6c9;
}

.weui-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.weui-cell {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-page);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.weui-cell:focus-within {
    background: var(--bg-white);
    border-color: var(--primary-color);
}

.weui-cell__hd {
    width: 24px;
    margin-right: 12px;
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weui-cell__bd {
    flex: 1;
}

.weui-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.weui-input::placeholder {
    color: var(--text-disabled);
}

.weui-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 8px;
}

.weui-btn_primary {
    background: var(--primary-color);
    color: white;
}

.weui-btn_primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

/* 主页面 */
.page-container {
    min-height: 100vh;
    padding-bottom: 60px;
    background: var(--bg-page);
    width: 100%;
    box-sizing: border-box;
}

/* 顶部导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 101;
    background: var(--bg-white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-actions {
    display: flex;
    gap: 12px;
}

.navbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.navbar-btn:active {
    background: var(--bg-page);
    transform: scale(0.95);
}

.navbar-left {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    z-index: 1;
}

.navbar-right {
    flex-shrink: 0;
    z-index: 1;
    width: 44px; /* 确保右侧有足够空间，保持标题居中 */
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 客户卡片 - 优化配色设计 */
.customer-list {
    padding: 0 16px 16px;
}

.customer-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.customer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.customer-card.visited {
    border-left: 4px solid #22c55e;
}

.customer-card.visited::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    opacity: 1;
}

.customer-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.customer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 18px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 0;
}

.customer-card.visited .customer-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(22, 163, 74, 0.05));
}

.customer-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.customer-name {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.level-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.level-tag.important {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    box-shadow: 0 2px 4px rgba(255, 77, 79, 0.2);
}

.level-tag.normal {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.level-tag.regular {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.visit-status-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

.status-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.status-text.visited {
    color: #22c55e;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.customer-body {
    padding: 16px 18px;
}

.customer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding-right: 160px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.info-item i {
    width: 18px;
    font-size: 14px;
    color: #3b82f6;
    flex-shrink: 0;
    text-align: center;
}

.visit-record-box {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fafbfc;
    font-size: 12px;
    line-height: 1.5;
    overflow-y: auto;
    color: var(--text-primary);
    transition: all 0.2s;
}

.visit-record-box:active {
    background: #f1f5f9;
    transform: scale(0.98);
    border-color: #3b82f6;
}

.customer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.tag {
    font-size: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    border-radius: 16px;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* 月份图标容器 */
.month-icons-container {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

/* 月份图标（类似PC端样式） */
.month-icon {
    flex: 1;
    min-width: 0;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    user-select: none;
    position: relative;
}

.month-icon:active {
    transform: scale(0.95);
}

.month-icon.active {
    background: #22c55e;
    color: white;
    border-color: #16a34a;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.month-icon.current {
    border-width: 2px;
    border-color: #3b82f6;
}

.month-icon.current.active {
    border-color: #16a34a;
}

/* 底部导航栏 */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    transition: all 0.2s;
}

.tabbar-item.active {
    color: var(--primary-color);
}

.tabbar-item i {
    font-size: 20px;
}

/* 浮动按钮 */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
    cursor: pointer;
    z-index: 99;
    display: none; /* 默认隐藏，只在需要时显示 */
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.fab:active {
    transform: scale(0.9);
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: var(--bg-white);
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 12px;
    font-size: 14px;
}

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

/* 搜索栏 */
.search-bar {
    padding: 12px 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: none;
}

.search-bar .weui-cell {
    margin-bottom: 0;
}

/* 侧边菜单 */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    pointer-events: none;
}

.sidebar-menu.active {
    display: block;
    pointer-events: auto;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-menu.active .sidebar-overlay {
    opacity: 1;
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-white);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-menu.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    font-size: 24px;
}

.sidebar-logo h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-close:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-item i {
    width: 20px;
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
}

.sidebar-item:active {
    background: var(--bg-page);
    border-left-color: var(--primary-color);
}

.sidebar-item:active i {
    color: var(--primary-color);
}

.sidebar-item-danger {
    color: var(--danger-color);
}

.sidebar-item-danger:active {
    background: #fff5f5;
    border-left-color: var(--danger-color);
}

.sidebar-item-danger i {
    color: var(--danger-color);
}

.sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* 修复客户卡片布局 */
.customer-card {
    position: relative;
}

.customer-info {
    position: relative;
    padding-right: 160px;
    min-height: 72px;
}

.visit-record-box {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-page);
    font-size: 12px;
    line-height: 1.5;
    overflow-y: auto;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.visit-record-box:active {
    background: var(--border-color);
    transform: scale(0.98);
}

/* 修复表单样式 */
.weui-cell {
    margin-bottom: 0;
}

.weui-form .weui-cell {
    margin-bottom: 16px;
}

.weui-form textarea.weui-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.weui-form select.weui-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888888' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

/* 导入页面样式 */
.import-page-mobile {
    padding: 16px;
}

.import-card-mobile {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header-mobile {
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-mobile i {
    font-size: 20px;
    color: var(--primary-color);
}

.card-header-mobile h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body-mobile {
    padding: 16px;
}

.import-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.upload-area-mobile {
    margin-bottom: 16px;
}

.upload-placeholder-mobile {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-page);
}

.upload-placeholder-mobile:active {
    border-color: var(--primary-color);
    background: rgba(7, 193, 96, 0.05);
}

.upload-placeholder-mobile i {
    font-size: 32px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.upload-placeholder-mobile p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 8px 0;
}

.upload-placeholder-mobile span {
    font-size: 12px;
    color: var(--text-secondary);
}

.file-info-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.file-info-mobile i {
    font-size: 24px;
    color: var(--primary-color);
}

.file-details-mobile {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name-mobile {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.file-size-mobile {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-remove-mobile {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-mobile:active {
    background: #fecaca;
    transform: scale(0.95);
}

.import-result-mobile {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}

.result-header-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.result-header-mobile i {
    font-size: 20px;
    color: var(--primary-color);
}

.result-header-mobile h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-summary-mobile {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.summary-item-mobile {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.summary-item-mobile.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.summary-item-mobile.error {
    background: #ffebee;
    color: #c62828;
}

.summary-item-mobile i {
    font-size: 18px;
}

.result-errors-mobile {
    margin-top: 16px;
}

.result-errors-mobile h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-errors-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-errors-mobile li {
    padding: 8px 12px;
    background: var(--bg-page);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.result-error-mobile {
    padding: 12px;
    background: #ffebee;
    border-radius: 8px;
    color: #c62828;
    font-size: 14px;
}

/* 设置页面样式 */
.settings-page-mobile {
    padding: 16px;
}

.settings-card-mobile {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.settings-card-mobile h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.settings-field-mobile {
    margin-bottom: 16px;
}

.settings-field-mobile label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-toggle-mobile:last-child {
    border-bottom: none;
}

.toggle-text-mobile p {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    font-weight: 500;
}

.toggle-text-mobile span {
    font-size: 12px;
    color: var(--text-secondary);
}

.danger-zone-mobile {
    border: 1px solid #fee2e2;
    background: #fef2f2;
}

.danger-zone-mobile h3 {
    color: #dc2626;
}

/* 个人中心页面样式 */
.profile-page-mobile {
    padding: 16px;
}

.profile-header-mobile {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar-mobile {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    flex-shrink: 0;
}

.profile-info-mobile h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.profile-info-mobile p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.profile-badges-mobile {
    display: flex;
    gap: 8px;
}

.badge-mobile {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.badge-mobile.admin {
    background: #fef3c7;
    color: #92400e;
}

.badge-mobile.staff {
    background: #dbeafe;
    color: #1e40af;
}

.badge-mobile.active {
    background: #d1fae5;
    color: #065f46;
}

.profile-card-mobile {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.profile-card-mobile h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.info-row-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row-mobile:last-child {
    border-bottom: none;
}

.info-label-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-label-mobile i {
    width: 20px;
    font-size: 16px;
    color: var(--text-secondary);
}

.info-value-mobile {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 管理页面分类筛选容器（固定在顶部） */
.management-filter-container {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 0;
}

.management-filter-mobile {
    padding: 12px 16px;
    background: var(--bg-white);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border: none;
    background: var(--bg-page);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-width: 60px;
    justify-content: center;
}

.filter-tab:active {
    transform: scale(0.95);
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.filter-tab:not(.active) .filter-count {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

/* 管理列表样式 */
.management-list-mobile {
    padding: 0;
    width: 100%;
}

.management-item-mobile {
    background: var(--bg-white);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.management-item-mobile:first-child {
    border-top: 1px solid var(--border-color);
}

.management-item-mobile:active {
    background: var(--bg-page);
}

.management-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.management-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.customer-name-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.management-item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.edit-btn {
    background: var(--bg-page);
    color: var(--primary-color);
}

.edit-btn:active {
    background: rgba(7, 193, 96, 0.1);
    transform: scale(0.95);
}

.delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.delete-btn:active {
    background: #fecaca;
    transform: scale(0.95);
}

.management-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.management-item-body .info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.management-item-body .info-row i {
    width: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.management-item-body .status-text {
    font-weight: 500;
}

.management-item-body .status-text.visited {
    color: #22c55e;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .login-wrapper {
        padding: 30px 20px;
    }
    
    .stats-grid {
        gap: 6px;
        padding: 10px 12px;
    }
    
    .stat-card {
        padding: 8px 6px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .filter-tab {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 50px;
    }
    
    .filter-count {
        font-size: 11px;
        padding: 1px 5px;
    }
    
    .management-item-mobile {
        padding: 12px;
    }
}

@media (max-width: 320px) {
    .filter-tab {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 45px;
    }
    
    .filter-count {
        font-size: 10px;
        padding: 1px 4px;
    }
}

@media (min-width: 414px) {
    .management-item-mobile {
        padding: 18px 16px;
    }
}
