/* 郭标财务平台 - Private Banking Terminal v220 */
/* 设计原则：高端极简、精致排版、金色点缀、无图标无emoji */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --primary: #8b7355;
  --primary-dark: #6b5842;
  --primary-light: #f8f5f0;
  --primary-border: #d4c5a9;
  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #a0a0a0;
  --bg: #f7f6f3;
  --white: #fff;
  --border: #e8e4dd;
  --border-light: #f0ede8;
  --danger: #c0392b;
  --warning: #d4a017;
  --info: #2c6fbb;
  --success: #27864a;
  --card: #fff;
  --text-primary: #1a1a1a;
  --sidebar-w: 210px;
  --header-h: 52px;
  --gold: #b8965a;
  --gold-light: #f5efe4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
}

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

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--white);
  color: var(--text);
  overflow-y: auto;
  z-index: 100;
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(0,0,0,0.02);
}

.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-logo span { margin-left: 6px; color: var(--gold); font-weight: 400; font-size: 11px; text-transform: none; letter-spacing: 0; }

.sidebar-nav { padding: 12px 0; }

.nav-group-title {
  padding: 16px 20px 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 9px 20px 9px 24px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  margin: 0;
  border-radius: 0;
}

.nav-item:hover {
  background: var(--gold-light);
  color: var(--text);
}

.nav-item.active {
  background: transparent;
  color: var(--primary-dark);
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-item .icon { display: none !important; }

/* 主内容区 */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* 顶部栏 */
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.3px; }
.header-right { display: flex; align-items: center; gap: 20px; }

.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.header-user:hover { color: var(--primary); }

/* 页面容器 */
.page { padding: 16px 20px; display: none; }
.page.active { display: block; }

/* Ensure main content area fills viewport and scrolls */
.main { position: relative; }

.page-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

/* 统计卡片 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 2px;
  background: var(--gold);
}

.stat-card .label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 500; }
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-card .value.green { color: var(--success); }
.stat-card .value.red { color: var(--danger); }
.stat-card .value.blue { color: var(--info); }
.stat-card .value.orange { color: var(--warning); }
.stat-card .sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* 数据表格 */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-toolbar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 8px;
}

.table-toolbar .left { display: flex; gap: 8px; align-items: center; }
.table-toolbar .right { display: flex; gap: 8px; align-items: center; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
}

table.data-table th {
  background: var(--bg);
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

table.data-table td {
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

table.data-table tr:hover td { background: var(--gold-light); }

table.data-table .amount { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table .amount-debit { color: var(--primary-dark); }
table.data-table .amount-credit { color: var(--danger); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--white);
  color: var(--text);
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn:hover { border-color: var(--gold); color: var(--primary-dark); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 2px 8px rgba(139,115,85,0.25); }

.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 2px 6px; font-weight: 500; }
.btn-link:hover { color: var(--primary-dark); }

/* 表单 */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }

.form-input, .form-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 13px;
  outline: none;
}

.form-input:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24,144,255,0.1); }

/* 搜索框 */
.search-input {
  padding: 6px 10px 6px 28px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 13px;
  width: 200px;
  outline: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 8px center;
}

.search-input:focus { border-color: var(--primary); }

/* 徽章 */
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.badge-green { background: var(--gold-light); color: var(--primary-dark); }
.badge-red { background: #fdf0ef; color: var(--danger); }
.badge-blue { background: #eef4fb; color: var(--info); }
.badge-orange { background: #fdf6e8; color: var(--warning); }
.badge-yellow { background: #fdf8ec; color: #a67c00; }
.badge-gray { background: var(--bg); color: var(--text-muted); }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal.modal-wide { max-width: 860px; }

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

.modal-header h3 { font-size: 15px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 16px 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== 凭证分录样式 ===== */
.entry-header {
  display: flex;
  gap: 8px;
  padding: 8px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.entry-header .entry-direction { width: 80px; text-align: center; }
.entry-header .entry-account { flex: 1; }
.entry-header .entry-amount { width: 140px; text-align: center; }

.entry-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.entry-row .entry-direction {
  width: 80px;
  flex-shrink: 0;
}

.entry-row .entry-account {
  flex: 1;
  min-width: 0;
}

.entry-row .entry-amount {
  width: 140px;
  flex-shrink: 0;
}

.entry-row .entry-remove {
  flex-shrink: 0;
  padding: 3px 8px;
  line-height: 1.2;
}

.entry-totals {
  display: flex;
  gap: 24px;
  padding: 10px 0 0;
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.entry-totals strong {
  font-variant-numeric: tabular-nums;
}

/* ===== 科目表单样式 ===== */
.account-form .form-group {
  margin-bottom: 10px;
}

.voucher-form .form-group {
  margin-bottom: 10px;
}

/* ===== 弹窗表单增强 ===== */
.modal-body .voucher-form .form-row,
.modal-body .account-form .form-row {
  margin-bottom: 10px;
}

/* ===== 发票管理样式 ===== */

/* 发票统计卡片 */
.invoice-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.invoice-stats .stat-card {
  border-left: 3px solid transparent;
}

.invoice-stats .stat-card:nth-child(1) { border-left-color: var(--primary); }
.invoice-stats .stat-card:nth-child(2) { border-left-color: var(--info); }
.invoice-stats .stat-card:nth-child(3) { border-left-color: var(--warning); }
.invoice-stats .stat-card:nth-child(4) { border-left-color: var(--primary-dark); }

/* 发票Tab切换 */
.invoice-tabs {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px 4px 0 0;
  border-bottom: none;
  padding: 0;
  margin-bottom: 0;
}

.invoice-tab {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--white);
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  transition: color 0.15s, border-color 0.15s;
}

.invoice-tab:hover {
  color: var(--primary);
}

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

/* 发票筛选区 */
.invoice-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.invoice-filters .form-select,
.invoice-filters .form-input {
  width: auto;
  min-width: 0;
}

.invoice-filters .search-input {
  width: 200px;
}

/* 发票表单 */
.invoice-form .form-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-light);
}

.invoice-form .form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.invoice-form .form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

.invoice-form .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.invoice-form .form-group {
  flex: 1;
  margin-bottom: 8px;
}

.invoice-form .amount-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.invoice-form .amount-row .form-group {
  margin-bottom: 0;
}

.invoice-form .tax-calc {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 4px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 24px;
}

.invoice-form .tax-calc strong {
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* Toast通知 */
.toast {
  position: fixed;
  top: 60px;
  right: 20px;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.toast.error { background: #fff1f0; color: var(--danger); border: 1px solid #ffa39e; }
.toast.warning { background: #fff7e6; color: var(--warning); border: 1px solid #ffe58f; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 分页器 */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 0;
  justify-content: flex-end;
}

.page-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  background: var(--white);
  color: var(--text);
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* 登录页 */
.login-page {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.login-left {
  flex: 1;
  background: linear-gradient(160deg, #faf8f7 0%, #f3efe9 55%, #ede7dd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
}
.login-brand {
  position: relative;
  z-index: 1;
  max-width: 500px;
}
.login-logo {
  font-size: 42px;
  font-weight: 700;
  color: #1c1a17;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.login-logo span {
  color: #c9a84c;
}
.login-slogan {
  font-size: 16px;
  color: #54514b;
  margin-bottom: 40px;
  line-height: 1.6;
  border-left: 3px solid #c9a84c;
  padding-left: 14px;
}
.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.login-features .feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(28,26,23,0.10);
  box-shadow: 0 1px 3px rgba(28,26,23,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-features .feature-item:hover {
  border-color: rgba(201,168,76,0.55);
  box-shadow: 0 2px 8px rgba(201,168,76,0.14);
}
.login-features .feature-icon {
  display: flex !important;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.login-features .feature-title {
  font-size: 14px;
  font-weight: 600;
  color: #1c1a17;
  margin-bottom: 4px;
}
.login-features .feature-desc {
  font-size: 12px;
  color: #8b877e;
  line-height: 1.5;
}
.login-footer {
  font-size: 12px;
  color: #8b877e;
  text-align: center;
}

.login-right {
  width: 420px;
  min-width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 40px;
}
.login-box {
  width: 100%;
  max-width: 340px;
}
.login-box h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px 0;
}
.login-box .subtitle {
  font-size: 14px;
  color: #999;
  margin-bottom: 32px;
}
.login-error {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  min-height: 20px;
}
.btn-block {
  width: 100%;
  margin-top: 8px;
}
.login-tips {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #bbb;
}

@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; min-width: unset; }
}
@media (max-width: 480px) {
  .login-right { padding: 24px; }
}

/* ===== 账套选择器 ===== */
.company-selector {
  display: inline-flex;
  align-items: center;
  margin-left: 16px;
  gap: 4px;
}
.company-label {
  font-size: 12px;
  color: var(--text-muted);
}
.company-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-select {
  font-size: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 2px 8px;
  color: #333;
  background: #fff;
  cursor: pointer;
  max-width: 180px;
}
.company-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* ===== 设置页分区 ===== */
.settings-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  max-width: 900px;
}
.settings-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* ===== 表单行 ===== */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .form-row { flex-direction: column; gap: 0; }
  .company-selector { margin-left: 8px; }
  .company-name { max-width: 80px; }
  .invoice-stats { grid-template-columns: repeat(2, 1fr); }
  .invoice-filters { flex-wrap: wrap; }
  .bill-layout { flex-direction: column; }
  .bill-ocr-section { width: 100% !important; }
}

@media (max-width: 480px) {
  .invoice-stats { grid-template-columns: 1fr; }
}

/* ===== 税务管理 v208 ===== */
.tax-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 16px;
}
.tax-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.tax-tab:hover { color: var(--primary); }
.tax-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.tax-panel { animation: fadeIn 0.2s; }

.tax-calc-header {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.tax-result { margin-top: 16px; }

.tax-result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.tax-result-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}
.tax-result-card.highlight {
  border: 2px solid var(--primary);
  background: var(--primary-light);
}
.tax-result-card .label { font-size: 13px; color: #666; margin-bottom: 4px; }
.tax-result-card .value { font-size: 22px; font-weight: 700; }
.tax-result-card .value.green { color: var(--primary); }
.tax-result-card .value.blue { color: var(--info); }
.tax-result-card .value.red { color: var(--danger); }
.tax-result-card .value.orange { color: var(--warning); }

.tax-detail-table {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
}
.tax-detail-table h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
}

.tax-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
}

.tax-calendar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
}
.tax-calendar-date {
  font-weight: 600;
  font-size: 14px;
  min-width: 100px;
}
.tax-calendar-type { min-width: 80px; }
.tax-calendar-desc { flex: 1; font-size: 14px; }
.tax-calendar-status { min-width: 70px; text-align: right; }
.tax-calendar-stats { margin-bottom: 16px; }

.risk-score-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}
.risk-score-card .label { font-size: 13px; color: #666; margin-bottom: 4px; }
.risk-score-card .value { font-size: 36px; font-weight: 700; }
.risk-score-card .sub { font-size: 14px; font-weight: 600; margin-top: 4px; }

.risk-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tax-suggest-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.tax-suggest-header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.tax-suggest-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #333;
}
.tax-suggest-card p {
  font-size: 13px;
  color: #666;
  margin: 0 0 8px 0;
  line-height: 1.6;
}
.tax-suggest-savings {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* ===== 应收应付模块 v209 ===== */
.ar-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 16px;
}
.ar-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.ar-tab:hover { color: var(--primary); }
.ar-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.ar-panel { animation: fadeIn 0.2s; }

.ar-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.aging-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
}

.aging-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* ===== 票据管理+OCR模块 v210 ===== */

/* 票据页面布局：左侧列表+右侧OCR */
.bill-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.bill-list-section {
  flex: 1;
  min-width: 0;
}

.bill-ocr-section {
  width: 340px;
  flex-shrink: 0;
}

/* OCR卡片 */
.ocr-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}

.ocr-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.ocr-engine-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 4px;
}

.ocr-upload-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ocr-status-text {
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 18px;
}

.ocr-result-area {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
}

.ocr-result-area .empty-state {
  padding: 24px;
  font-size: 13px;
}

.ocr-result-area .tax-result-card {
  text-align: left;
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
}

.ocr-result-area .tax-result-card .label {
  font-size: 12px;
  color: var(--primary-dark);
  margin-bottom: 6px;
  font-weight: 600;
}

.ocr-result-area .tax-result-card .value {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
}

/* 票据统计行（4列） */
#billStats {
  grid-template-columns: repeat(4, 1fr);
}

#billStats .stat-card {
  border-left: 3px solid transparent;
}

#billStats .stat-card:nth-child(1) { border-left-color: var(--primary); }
#billStats .stat-card:nth-child(2) { border-left-color: var(--info); }
#billStats .stat-card:nth-child(3) { border-left-color: var(--warning); }
#billStats .stat-card:nth-child(4) { border-left-color: var(--danger); }

/* 票据筛选区 - 与发票筛选一致 */
.bill-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .bill-layout { flex-direction: column; }
  .bill-ocr-section { width: 100%; }
}


/* ===== 银行对账模块 v212 ===== */
.bank-tabs, .inv-tabs, .fa-tabs, .pay-tabs, .rbac-tabs {
  display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 16px;
}
.bank-tab, .inv-tab, .fa-tab, .pay-tab, .rbac-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.bank-tab:hover, .inv-tab:hover, .fa-tab:hover, .pay-tab:hover, .rbac-tab:hover { color: var(--primary); }
.bank-tab.active, .inv-tab.active, .fa-tab.active, .pay-tab.active, .rbac-tab.active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 600;
}
.bank-panel, .inv-panel, .fa-panel, .pay-panel, .rbac-panel { animation: fadeIn 0.2s; }


/* ===== 自定义报表 v213 ===== */
.cr-tabs, .aux-tabs, .ord-tabs, .ai-tabs {
  display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 16px;
}
.cr-tab, .aux-tab, .ord-tab, .ai-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.cr-tab:hover, .aux-tab:hover, .ord-tab:hover, .ai-tab:hover { color: var(--primary); }
.cr-tab.active, .aux-tab.active, .ord-tab.active, .ai-tab.active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 600;
}
.cr-panel, .aux-panel, .ord-panel, .ai-panel { animation: fadeIn 0.2s; }

/* ===== AI财务顾问 v213 ===== */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 400px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
  animation: fadeIn 0.3s;
}

.ai-msg-bot {
  align-self: flex-start;
}

.ai-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--primary-light);
}

.ai-msg-user .ai-msg-avatar {
  background: #e6f7ff;
}

.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-msg-bot .ai-msg-bubble {
  background: #f5f5f5;
  color: var(--text);
  border-top-left-radius: 2px;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 2px;
}

.ai-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.ai-chat-input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  outline: none;
}

.ai-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}

.ai-send-btn {
  border-radius: 20px;
  padding: 6px 20px;
}

/* AI洞察卡片 */
.ai-insight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.ai-insight-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-insight-summary {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  padding: 12px 16px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 4px 4px 0;
  margin-bottom: 16px;
}

.ai-highlight-item, .ai-risk-item, .ai-advice-item {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.ai-highlight-item {
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
}

.ai-risk-item {
  border-left: 3px solid var(--warning);
  background: #fff7e6;
}

.ai-advice-item {
  border-left: 3px solid var(--info);
  background: #e6f7ff;
}

.ai-health-score-display {
  text-align: center;
  padding: 20px;
}

.ai-health-score-number {
  font-size: 48px;
  font-weight: 700;
  display: inline-block;
}

.ai-health-score-number.green { color: var(--primary); }
.ai-health-score-number.orange { color: var(--warning); }
.ai-health-score-number.red { color: var(--danger); }

/* AI预警卡片 */
.ai-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.ai-alert-card.alert-red {
  background: #fff1f0;
  border-color: #ffa39e;
  border-left: 4px solid var(--danger);
}

.ai-alert-card.alert-yellow {
  background: #fffbe6;
  border-color: #ffe58f;
  border-left: 4px solid var(--warning);
}

.ai-alert-card.alert-green {
  background: var(--primary-light);
  border-color: var(--primary-border);
  border-left: 4px solid var(--primary);
}

.ai-alert-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.ai-alert-content {
  flex: 1;
}

.ai-alert-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.ai-alert-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-alert-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* AI解读内容 */
.ai-interpret-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  line-height: 1.8;
  font-size: 14px;
  white-space: pre-wrap;
}

.ai-interpret-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

/* AI打字动画 */
.ai-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  background: #bbb;
  border-radius: 50%;
  animation: aiTypingBounce 1.2s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTypingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* 订单状态标签增强 */
.ord-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}


/* ===== 老板看账 v215 ===== */
.bv-tabs {
  display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 20px;
}
.bv-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.bv-tab:hover { color: var(--primary); }
.bv-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.bv-panel { animation: fadeIn 0.2s; }

/* 大白话总结 */
.bv-verdict {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.5;
}
.bv-verdict-cash {
  background: #e6f7ff;
  border-left-color: var(--info);
  color: var(--info);
}
.bv-verdict.warning {
  background: #fff7e6;
  border-left-color: var(--warning);
  color: #d48806;
}
.bv-verdict.danger {
  background: #fff1f0;
  border-left-color: var(--danger);
  color: var(--danger);
}

/* KPI卡片行 */
.bv-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.bv-kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.bv-kpi-card .bv-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.bv-kpi-card .bv-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.bv-kpi-card .bv-kpi-change {
  font-size: 12px;
  font-weight: 600;
}
.bv-kpi-card .bv-kpi-change.up {
  color: var(--primary-dark);
}
.bv-kpi-card .bv-kpi-change.down {
  color: var(--danger);
}
.bv-kpi-card .bv-kpi-change.flat {
  color: var(--text-muted);
}

/* 现金流汇总 */
.bv-cashflow-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.bv-cashflow-big {
  text-align: center;
}
.bv-cashflow-big .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bv-cashflow-big .value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
}
.bv-cashflow-big .value.green { color: var(--primary); }
.bv-cashflow-big .value.red { color: var(--danger); }
.bv-cashflow-big .value.orange { color: var(--warning); }

.bv-status-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.bv-status-badge.healthy { background: var(--primary-light); color: var(--primary-dark); }
.bv-status-badge.warning { background: #fff7e6; color: #d48806; }
.bv-status-badge.danger { background: #fff1f0; color: var(--danger); }

/* 风险指示 */
.bv-risk-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.bv-risk-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.bv-risk-indicator.low { background: var(--primary); }
.bv-risk-indicator.medium { background: var(--warning); }
.bv-risk-indicator.high { background: var(--danger); }

.bv-risk-big .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bv-risk-big .value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.bv-risk-msg {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}


/* ===== 电子合同 v216 ===== */
.ec-tabs {
  display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 16px;
}
.ec-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.ec-tab:hover { color: var(--primary); }
.ec-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ec-panel { animation: fadeIn 0.2s; }

.ec-status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500;
}
.ec-status-draft { background: #f5f5f5; color: var(--text-muted); }
.ec-status-sent { background: #e6f7ff; color: var(--info); }
.ec-status-signing { background: #fff7e6; color: var(--warning); }
.ec-status-signed, .ec-status-completed { background: var(--primary-light); color: var(--primary-dark); }
.ec-status-cancelled { background: #fff1f0; color: var(--danger); }

.ec-template-grid, .ec-contract-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px;
}
.ec-template-card, .ec-contract-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 16px;
}
.ec-template-header, .ec-contract-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.ec-template-name { font-size: 15px; font-weight: 600; color: var(--text); }
.ec-template-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.ec-template-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.ec-template-actions { display: flex; gap: 6px; }
.ec-contract-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ec-contract-info { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.ec-contract-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== 在线表单 v216 ===== */
.fb-tabs {
  display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 16px;
}
.fb-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.fb-tab:hover { color: var(--primary); }
.fb-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.fb-panel { animation: fadeIn 0.2s; }

.fb-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px;
}
.fb-form-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 16px;
}
.fb-form-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.fb-form-name { font-size: 15px; font-weight: 600; color: var(--text); }
.fb-form-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.fb-form-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.fb-form-actions { display: flex; gap: 6px; }

.fb-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px;
}
.fb-summary-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 14px;
}
.fb-summary-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.fb-summary-item {
  display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.fb-summary-item:last-child { border-bottom: none; }

/* ===== 企业定制 v216 ===== */
.br-preview-box {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  --br-primary: #1890ff; --br-bg: #fff;
}
.br-preview-sidebar {
  background: var(--br-bg); padding: 12px; min-height: 200px; border-right: 1px solid var(--border);
}
.br-preview-logo {
  font-size: 16px; font-weight: 700; color: var(--br-primary); margin-bottom: 12px; cursor: pointer;
}
.br-preview-logo span { color: var(--text-secondary); font-weight: 400; font-size: 13px; margin-left: 8px; }
.br-preview-nav-item {
  padding: 6px 8px; font-size: 13px; color: var(--text-secondary); border-left: 3px solid transparent;
}
.br-preview-nav-item.active {
  background: var(--primary-light); color: var(--br-primary); border-left-color: var(--br-primary);
}
.br-preview-main {
  padding: 20px; background: #fff; min-height: 120px; text-align: center;
}
.br-preview-login-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.br-preview-login-sub { font-size: 13px; color: var(--text-muted); }
.br-preview-copyright { font-size: 12px; color: var(--text-muted); margin-top: 16px; }

.br-color-picker { display: flex; align-items: center; gap: 8px; }
.br-color-picker input[type="color"] {
  width: 40px; height: 32px; border: 1px solid var(--border); border-radius: 3px; cursor: pointer; padding: 2px;
}

.br-logo-upload { display: flex; align-items: center; gap: 12px; }
.br-logo-preview {
  width: 120px; height: 80px; border: 1px dashed var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fafafa;
}

.br-form-group { margin-bottom: 14px; }
.br-form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.row-error{background:#fff1f0}

/* ===== v232 特色功能栏 ===== */
.feature-bar {
  display: flex;
  gap: 6px;
  padding: 0 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.feature-bar .feature-item {
  flex-shrink: 0;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 4px;
  transition: all 0.2s ease;
  background: var(--white);
  border: 1px solid var(--border);
  position: relative;
}
.feature-bar .feature-item:hover {
  background: var(--white);
  border-color: var(--gold);
  transform: none;
  box-shadow: var(--shadow-sm);
}
.feature-bar .feature-item:hover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20px; right: 20px;
  height: 2px;
  background: var(--gold);
}
.feature-bar .feature-icon { display: none !important; }
.feature-bar .feature-label {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ===== 待办事项 ===== */
.todo-section {
  background: var(--white);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.todo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.todo-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.todo-badge {
  background: #ff4d4f;
  color: white;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.todo-list {
  max-height: 320px;
  overflow-y: auto;
}
.todo-empty {
  text-align: center;
  color: #bfbfbf;
  padding: 24px;
  font-size: 13px;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.15s;
}
.todo-item:hover {
  background: #fafafa;
}
.todo-item:last-child {
  border-bottom: none;
}
.todo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.todo-dot.red { background: #ff4d4f; }
.todo-dot.orange { background: #fa8c16; }
.todo-dot.blue { background: #1890ff; }
.todo-dot.green { background: #52c41a; }
.todo-content {
  flex: 1;
  min-width: 0;
}
.todo-title {
  font-size: 13px;
  color: #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.todo-desc {
  font-size: 11px;
  color: #8c8c8c;
  margin-top: 2px;
}
.todo-action {
  font-size: 11px;
  color: #1890ff;
  white-space: nowrap;
  flex-shrink: 0;
}
.todo-action:hover {
  color: #40a9ff;
}
.todo-done {
  text-decoration: line-through;
  color: #bfbfbf;
}

/* ===== v232 新页面通用 ===== */
.v232-page { padding: 16px; }
.v232-page h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.v232-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.v232-card { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #f0f0f0; }
.v232-card .label { font-size: 12px; color: #8c8c8c; margin-bottom: 4px; }
.v232-card .value { font-size: 20px; font-weight: 600; }
.v232-card .sub { font-size: 11px; color: #bfbfbf; margin-top: 4px; }
.v232-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.v232-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #f0f0f0; color: #8c8c8c; font-weight: 500; }
.v232-table td { padding: 8px 10px; border-bottom: 1px solid #f5f5f5; }
.v232-risk-high { color: #ff4d4f; font-weight: 600; }
.v232-risk-medium { color: #fa8c16; font-weight: 600; }
.v232-risk-low { color: #52c41a; }
.nav-group-title { font-size: 10px; color: #8c8c8c; padding: 8px 15px 2px; text-transform: uppercase; letter-spacing: 1px; }

.todo-icon { font-size: 18px; margin-right: 10px; }
.todo-type { color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-right: 10px; font-weight: 500; }
.todo-text { flex: 1; font-size: 14px; color: var(--text); }
.todo-arrow { color: var(--text-muted); font-size: 14px; }

.v232-card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.v232-card p { margin: 4px 0; font-size: 14px; color: var(--text); }
.v232-card .btn { margin-top: 8px; }

/* v3.0: CRM/ERP/HR 通用样式 */
.tab-bar { display:flex; gap:4px; border-bottom:1px solid var(--border); padding-bottom:0; }
.tab-bar span, .crm-tab, .erp-tab, .hr-tab {
  padding:8px 16px; cursor:pointer; font-size:14px; border-bottom:2px solid transparent;
  color:var(--text-secondary); transition:all .2s;
}
.crm-tab:hover, .erp-tab:hover, .hr-tab:hover { color:var(--primary); }
.crm-tab.active, .erp-tab.active, .hr-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

.stat-card { background:var(--white); border:1px solid var(--border); border-radius:6px; padding:16px; text-align:center; }
.stat-card.green { border-left:3px solid var(--primary); }
.stat-card.blue { border-left:3px solid var(--info); }
.stat-card.orange { border-left:3px solid var(--warning); }
.stat-card.red { border-left:3px solid var(--danger); }
.stat-value { font-size:22px; font-weight:700; color:var(--text); }
.stat-label { font-size:12px; color:var(--text-muted); margin-top:4px; }

.tag { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:500; }
.tag-green { background:#f6ffed; color:#52c41a; }
.tag-blue { background:#e6f7ff; color:#1890ff; }
.tag-orange { background:#fff7e6; color:#fa8c16; }
.tag-red { background:#fff2f0; color:#f5222d; }
/* ===== 老板头条 v17.0 ===== */
.bh-wrapper{max-width:1200px;margin:0 auto;padding:16px 20px}
.bh-ticker{background:#fff;border-radius:10px;border:1px solid #e8e8e8;padding:10px 16px;margin-bottom:16px;display:flex;align-items:center;gap:12px;overflow:hidden}
.bh-ticker-label{font-size:15px;font-weight:700;color:#1a1a1a;white-space:nowrap;padding-right:12px;border-right:2px solid #e8e8e8}
.bh-ticker-content{flex:1;overflow:hidden;position:relative;height:24px}
.bh-ticker-scroll{display:flex;gap:8px;align-items:center;white-space:nowrap;animation:bh-scroll 40s linear infinite}
.bh-ticker-scroll:hover{animation-play-state:paused}
@keyframes bh-scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.bh-ticker-item{font-size:13px;color:#333;cursor:pointer;transition:color .2s}
.bh-ticker-item:hover{color:#1890ff}
.bh-ticker-sep{color:#d0d0d0;font-size:10px;margin:0 4px}
.bh-tabs{display:flex;gap:6px;margin-bottom:14px;align-items:center;flex-wrap:wrap}
.bh-tab{padding:6px 14px;border-radius:20px;border:1px solid #e0e0e0;background:#fff;font-size:13px;color:#666;cursor:pointer;transition:all .2s}
.bh-tab:hover{border-color:#1890ff;color:#1890ff}
.bh-tab.active{background:#1890ff;color:#fff;border-color:#1890ff}
.bh-count{font-size:11px;opacity:.7;margin-left:2px}
.bh-spacer{flex:1}
.bh-action-btn{padding:6px 14px;border-radius:20px;border:1px solid #e0e0e0;background:#fff;font-size:13px;color:#666;cursor:pointer;transition:all .2s}
.bh-action-btn:hover{border-color:#1890ff;color:#1890ff}
.bh-action-btn:disabled{opacity:.5;cursor:not-allowed}
.bh-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.bh-stat-card{background:#fff;border-radius:8px;border:1px solid #f0f0f0;padding:12px;text-align:center}
.bh-stat-num{font-size:22px;font-weight:700;color:#1890ff}
.bh-stat-label{font-size:12px;color:#999;margin-top:2px}
.bh-list{display:flex;flex-direction:column;gap:8px}
.bh-item{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:#fff;border-radius:8px;border:1px solid #f0f0f0;transition:all .2s}
.bh-item:hover{border-color:#d0d0d0;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.bh-item.bh-important{border-left:3px solid #e67e22}
.bh-item.bh-urgent{border-left:3px solid #e74c3c;background:#fef8f8}
.bh-item.bh-read .bh-item-title{color:#999}
.bh-item-left{display:flex;align-items:center;gap:6px;min-width:80px;flex-shrink:0}
.bh-item-main{flex:1;min-width:0}
.bh-item-actions{display:flex;gap:4px;flex-shrink:0;align-self:center}
.bh-cat-tag{font-size:11px;padding:2px 8px;border-radius:10px;background:#f5f5f5;color:#666}
.bh-cat-tax{background:#e6f7ff;color:#1890ff}
.bh-cat-finance{background:#e6f7ff;color:#1890ff}
.bh-cat-hr{background:#fff7e6;color:#fa8c16}
.bh-cat-legal{background:#f9f0ff;color:#722ed1}
.bh-badge{font-size:10px;padding:1px 6px;border-radius:8px;font-weight:600}
.bh-badge-urgent{background:#e74c3c;color:#fff}
.bh-badge-imp{background:#e67e22;color:#fff}
.bh-item-title{font-size:14px;color:#1a1a1a;line-height:1.5;cursor:pointer;transition:color .2s;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.bh-item-title:hover{color:#1890ff}
.bh-item-summary{font-size:12px;color:#888;margin-top:4px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bh-item-meta{display:flex;gap:12px;margin-top:6px;font-size:11px;color:#bbb}
.bh-btn-sm{width:28px;height:28px;border-radius:50%;border:1px solid #e8e8e8;background:#fff;cursor:pointer;font-size:12px;transition:all .2s;display:flex;align-items:center;justify-content:center}
.bh-btn-sm:hover{border-color:#1890ff;background:#f0f8ff}
.bh-empty{text-align:center;padding:40px;color:#999;font-size:14px}
.bh-toast{position:fixed;top:20px;right:20px;padding:10px 20px;border-radius:8px;color:#fff;font-size:13px;z-index:9999;animation:bh-fadein .3s}
.bh-toast-success{background:#52c41a}
.bh-toast-error{background:#e74c3c}
@keyframes bh-fadein{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:768px){.bh-stats{grid-template-columns:repeat(2,1fr)}.bh-item-left{min-width:60px}.bh-item{flex-wrap:wrap}}

/* === v19.0 CFO犀利点评样式 === */
.bh-cfo-toggle{margin-top:8px;padding:4px 10px;font-size:12px;color:#e63946;background:#fff5f5;border:1px solid rgba(230,57,70,0.2);border-radius:16px;cursor:pointer;display:inline-block;-webkit-tap-highlight-color:transparent;user-select:none;transition:all .2s}
.bh-cfo-toggle:hover{background:#ffebee}
.bh-cfo-arrow{font-size:10px;margin-left:2px}
.bh-cfo-box{display:none;margin-top:8px;padding:10px 14px;background:#fff8f8;border-left:3px solid #e63946;border-radius:0 8px 8px 0;font-size:13px;line-height:1.7}
.bh-cfo-box.bh-cfo-expanded{display:block}
.bh-cfo-label{display:inline-block;font-size:11px;color:#fff;background:#e63946;padding:1px 8px;border-radius:10px;margin-bottom:6px;font-weight:600}
.bh-cfo-line{margin:3px 0}
.bh-cfo-what{color:#555}
.bh-cfo-mean{color:#c62828;font-weight:500}
.bh-cfo-do{color:#2e7d32;font-weight:500}
.bh-letter-section{margin:20px 0;padding:20px;background:#fff;border-radius:12px;box-shadow:0 1px 4px rgba(0,0,0,0.04)}
.bh-letter-title{text-align:center;font-size:16px;font-weight:700;color:#e63946;margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid #e63946}
.bh-letter-body{font-size:14px;line-height:2;color:#333}
.bh-letter-body b{color:#e63946}

/* === 折叠式侧边栏导航 v2.0 === */
.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
  transition: color 0.2s;
}
.nav-group-header:hover {
  color: var(--text);
}
.nav-group-name {
  flex: 1;
}
.nav-group-arrow {
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.25s ease;
  transform: rotate(0deg);
}
.nav-group-arrow.expanded {
  transform: rotate(90deg);
}
.nav-group-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.nav-group-children.expanded {
  max-height: 600px;
}
/* 子菜单项样式 */
.nav-group-children .nav-item {
  padding-left: 36px;
  font-size: 13px;
  border-left: 2px solid transparent;
}
.nav-group-children .nav-item:hover {
  border-left-color: var(--primary);
  background: #f5f7fa;
}
.nav-group-children .nav-item.active {
  border-left-color: var(--primary);
  background: var(--primary-light);
}
.nav-icon {
  font-size: 14px;
  margin-right: 6px;
}

/* 登录页输入框增强 */
.login-box .form-input {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-box .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}
.login-box .btn-primary {
  height: 42px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}
.login-box .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(24,144,255,0.3);
  transform: translateY(-1px);
}
.login-box .btn-primary:active {
  transform: translateY(0);
}
.login-box .btn-primary:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* ===== Embed模式(民间浙政钉iframe嵌入) ===== */
html.embed-mode .sidebar,
html.embed-mode .top-bar,
html.embed-mode .login-container .left-panel {
    display: none !important;
}
html.embed-mode .main {
    margin-left: 0 !important;
}
html.embed-mode .login-container {
    width: 100% !important;
}
html.embed-mode .login-container .right-panel {
    width: 100% !important;
    max-width: 100% !important;
}

/* OAuth2 登录按钮 */
.oauth-divider { text-align: center; margin: 14px 0; position: relative; }
.oauth-divider::before, .oauth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: #e0e0e0; }
.oauth-divider::before { left: 0; }
.oauth-divider::after { right: 0; }
.oauth-divider span { background: #fff; padding: 0 12px; color: #999; font-size: 13px; }
.btn-oauth { display: inline-block; text-align: center; border: 1px solid #1890ff; color: #1890ff; background: #e6f7ff; border-radius: 8px; font-size: 15px; padding: 10px 0; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-oauth:hover { background: #1890ff; color: #fff; border-color: #1890ff; }
