* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f5f5; }

/* 登录页 */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #ff2d4a 0%, #ff6b6b 100%); }
.login-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 360px; }
.login-box h1 { text-align: center; color: #333; margin-bottom: 30px; font-size: 24px; }
.login-box input { width: 100%; padding: 12px 16px; margin-bottom: 16px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.login-box button { width: 100%; padding: 12px; background: #ff2d4a; color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.login-box button:hover { background: #e0253f; }

/* 主界面 */
.main-app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 220px; background: #2c3e50; color: white; display: flex; flex-direction: column; }
.logo { padding: 20px; font-size: 20px; font-weight: bold; text-align: center; border-bottom: 1px solid #34495e; }
.menu { flex: 1; overflow-y: auto; }
.menu-item { padding: 14px 20px; cursor: pointer; border-left: 3px solid transparent; transition: all 0.2s; }
.menu-item:hover { background: #34495e; }
.menu-item.active { background: #34495e; border-left-color: #ff2d4a; }
.logout { padding: 16px 20px; background: #c0392b; text-align: center; cursor: pointer; }
.logout:hover { background: #a93226; }

/* 内容区 */
.content { flex: 1; padding: 24px; overflow-y: auto; }
.page { display: none; }
.page.active { display: block; }
.page h2 { margin-bottom: 20px; color: #333; }

/* 工具栏 */
.toolbar { margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; }
.toolbar button { padding: 8px 16px; background: #ff2d4a; color: white; border: none; border-radius: 4px; cursor: pointer; }
.toolbar button:hover { background: #e0253f; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-align: center; }
.stat-num { font-size: 28px; font-weight: bold; color: #ff2d4a; }
.stat-label { color: #666; margin-top: 8px; }
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.stats-row .stat-card { flex: 1; }

/* 表格 */
.table-container { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f8f8; font-weight: 600; color: #333; }
tr:hover { background: #fafafa; }
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.status-pending { background: #fff3cd; color: #856404; }
.status-active, .status-approved, .status-completed { background: #d4edda; color: #155724; }
.status-inactive, .status-rejected, .status-cancelled { background: #f8d7da; color: #721c24; }
.status-shipped { background: #cce5ff; color: #004085; }
.action-btn { padding: 4px 8px; margin-right: 4px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-edit { background: #17a2b8; color: white; }
.btn-del { background: #dc3545; color: white; }
.btn-view { background: #6c757d; color: white; }
.btn-approve { background: #28a745; color: white; }

/* 分页 */
.pager { margin-top: 16px; display: flex; justify-content: center; gap: 8px; }
.pager button { padding: 6px 12px; border: 1px solid #ddd; background: white; border-radius: 4px; cursor: pointer; }
.pager button.active { background: #ff2d4a; color: white; border-color: #ff2d4a; }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; border-radius: 8px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; }
.close { font-size: 24px; cursor: pointer; color: #999; }
.close:hover { color: #333; }
.modal-body { padding: 20px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; }
.form-group textarea { min-height: 80px; resize: vertical; }

/* 设置 */
.settings-form { background: white; padding: 24px; border-radius: 8px; max-width: 500px; }
.setting-item { margin-bottom: 20px; }
.setting-item label { display: block; margin-bottom: 8px; font-weight: 500; }
.setting-item input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }

/* 图表区 */
.chart-section { background: white; padding: 20px; border-radius: 8px; margin-top: 24px; }
.chart-section h3 { margin-bottom: 16px; }

/* 图片预览 */
.img-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .logo, .logout { font-size: 12px; padding: 10px 5px; }
  .menu-item { padding: 10px 8px; font-size: 12px; }
  .content { padding: 16px; }
}

/* 税务管理 */
.tax-red { color: #e0253f; font-weight: bold; }
.tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 16px; gap: 4px; }
.tab-btn { padding: 10px 20px; border: none; background: none; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-btn:hover { color: #ff2d4a; }
.tab-btn.active { color: #ff2d4a; border-bottom-color: #ff2d4a; font-weight: bold; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.calc-result { background: #f8f8f8; border-radius: 8px; padding: 16px; margin-top: 12px; }
.calc-result .calc-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 15px; }
.calc-result .calc-row:last-child { border-bottom: none; }
.calc-result .calc-row span:last-child { font-weight: bold; }
.tax-rule { background: #fff3e0; border-left: 4px solid #ff9800; padding: 12px 16px; margin-top: 16px; border-radius: 4px; font-size: 13px; }
.tax-rule h4 { margin-bottom: 8px; }
.tax-rule ul { padding-left: 20px; }
.tax-rule li { margin-bottom: 4px; color: #555; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; color: #666; font-size: 13px; }
.summary-row td { background: #fff3e0; font-weight: bold; }
.tips { color: #888; font-size: 13px; margin-left: 8px; }
