.container { padding: 12px } .tabs { display: flex; gap: 8px; margin-bottom: 8px } .tab { padding: 6px 10px; border-radius: 6px; cursor: pointer } .tab.active { } .status { margin: 8px 0; padding: 8px; border: 1px solid #ffd666; background: #fffbe6; color: #a87000; border-radius: 6px } .panel { border: 1px solid #ddd; border-radius: 8px; padding: 8px; margin-bottom: 8px } .btn { padding: 6px 10px; border: none; background: #222; color: #fff; border-radius: 6px; cursor: pointer } .grid { width: 100%; border-collapse: collapse } .grid th, .grid td { padding: 8px; border-bottom: 1px solid #e6e9ef; text-align: left; vertical-align: top } .grid thead th { position: sticky; top: 0; background: var(--table-header-bg); z-index: 1 } .grid tbody tr:nth-child(odd) { background: #f7f8fb } .grid tbody tr:nth-child(even) { background: #f2f4f8 } .grid tbody tr:hover { background: #e9eef6 } .grid tbody tr { transition: background 120ms ease-in-out } .list-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; padding: 6px } .action-buttons { display: flex; gap: 8px; margin-bottom: 16px; padding: 0 4px } .action-btn { padding: 10px 20px; border: 2px solid transparent; border-radius: 10px; background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%); color: white; cursor: pointer; font-weight: 600; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(37,99,235,0.3); position: relative; overflow: hidden; } .action-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.6s ease; } .action-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.4); background: linear-gradient(135deg, var(--color-primary-2) 0%, var(--color-primary) 100%); } .action-btn:hover::before { left: 100%; } .action-btn.view { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 12px rgba(16,185,129,0.3); } .action-btn.view:hover { background: linear-gradient(135deg, #059669 0%, #10b981 100%); box-shadow: 0 8px 20px rgba(16,185,129,0.4); } .action-btn.delete { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 4px 12px rgba(239,68,68,0.3); } .action-btn.delete:hover { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); box-shadow: 0 8px 20px rgba(239,68,68,0.4); } .col-actions { white-space: nowrap } .grid .col-actions { display:flex; flex-direction:column; align-items:center; gap:10px } .grid .col-actions .action-btn { width: 36px; height: 36px; border-radius: 50%; display:flex; align-items:center; justify-content:center; padding:0; font-size:16px } .grid .col-actions .action-btn:hover { filter: brightness(1.06) } .grid .col-actions .action-btn:disabled { opacity: .6; cursor: not-allowed } /* 主题适配:暗黑风格(深色圆形按钮) */ body.theme-expense[data-theme="dark"] .icon-toggle, body.theme-expense[data-theme="dark"] .icon-theme, body.theme-expense[data-theme="dark"] .font-size-toggle, body.theme-expense[data-theme="dark"] .action-buttons #records-export, body.theme-expense[data-theme="dark"] .action-buttons #stats-export, body.theme-expense[data-theme="dark"] .grid .col-actions .action-btn { border: 1px solid rgba(51,65,85,0.6); background: radial-gradient(ellipse at 30% 30%, #1f2937 0%, #0f172a 70%); box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1); color: #fbbf24; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); } body.theme-expense[data-theme="dark"] .icon-toggle:hover, body.theme-expense[data-theme="dark"] .icon-theme:hover, body.theme-expense[data-theme="dark"] .font-size-toggle:hover, body.theme-expense[data-theme="dark"] .action-buttons #records-export:hover, body.theme-expense[data-theme="dark"] .action-buttons #stats-export:hover, body.theme-expense[data-theme="dark"] .grid .col-actions .action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15); filter: brightness(1.1); } /* 主题适配:明亮风格(浅色圆形按钮) */ body.theme-expense[data-theme="light"] .icon-toggle, body.theme-expense[data-theme="light"] .icon-theme, body.theme-expense[data-theme="light"] .font-size-toggle, body.theme-expense[data-theme="light"] .action-buttons #records-export, body.theme-expense[data-theme="light"] .action-buttons #stats-export, body.theme-expense[data-theme="light"] .grid .col-actions .action-btn { border: 1px solid rgba(229,231,235,0.8); background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); box-shadow: 0 4px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9); color: var(--color-primary); transition: all 0.3s cubic-bezier(0.4,0,0.2,1); } body.theme-expense[data-theme="light"] .icon-toggle:hover, body.theme-expense[data-theme="light"] .icon-theme:hover, body.theme-expense[data-theme="light"] .font-size-toggle:hover, body.theme-expense[data-theme="light"] .action-buttons #records-export:hover, body.theme-expense[data-theme="light"] .action-buttons #stats-export:hover, body.theme-expense[data-theme="light"] .grid .col-actions .action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.95); background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); } /* 模态框样式 - Windows风格适配 */ .expense-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; justify-content: center; align-items: center; z-index: 1000; opacity: 0; transition: opacity 0.2s ease } .expense-modal-overlay.active { display: flex; opacity: 1 } .expense-modal { background: var(--color-card); border-radius: 8px; /* Windows 11 style */ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.05); /* Deep shadow + subtle border ring */ width: 90%; max-width: 600px; max-height: 85vh; display: flex; flex-direction: column; animation: modalSlideIn 0.2s cubic-bezier(0.1, 0.9, 0.2, 1); border: 1px solid var(--color-border); overflow: hidden; font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; color: var(--color-text); position: relative; /* Override common.css .modal fixed position */ inset: auto; /* Override common.css .modal inset: 0 */ display: flex; /* Override common.css .modal display: grid */ place-items: unset; /* Override common.css .modal place-items: center */ } @keyframes modalSlideIn { from { opacity: 0; transform: scale(0.96) } to { opacity: 1; transform: scale(1) } } .expense-modal-header { padding: 0; height: 44px; /* Windows title bar height */ flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; background: var(--color-card); /* Match body background (not blue) */ user-select: none; border-bottom: 1px solid var(--color-border); /* Subtle separator */ } .expense-modal-title { font-size: 14px; font-weight: 600; color: var(--color-text); padding-left: 16px; flex: 1; } .expense-modal-close { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--color-text); width: 46px; height: 100%; display: flex; align-items: center; justify-content: center; transition: all 0.1s; border-radius: 0 8px 0 0; } .expense-modal-close:hover { background: #c42b1c; color: white } .expense-modal-close:active { background: #b3261a; color: white } .expense-modal-body { padding: 20px 24px; flex: 1; overflow-y: auto; background: var(--color-card); width: auto; /* Override common.css .modal-body width: 520px */ } .expense-modal-footer { padding: 20px 24px; /* border-top: 1px solid var(--color-border); */ /* Seamless footer */ display: flex; gap: 8px; justify-content: flex-end; background: var(--color-card); padding-top: 0; /* Move closer to body if seamless */ padding-bottom: 24px; } .loading-modal { max-width: 360px; padding: 0 } /* No padding on modal itself, handled by children */ .loading-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 20px } .loading-spinner { width: 40px; height: 40px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite } @keyframes spin { to { transform: rotate(360deg) } } .expense-modal-btn { height: 32px; padding: 0 20px; border: 1px solid transparent; border-radius: 4px; /* Windows 11 standard button radius */ cursor: pointer; font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; font-weight: 400; transition: all 0.1s; display: inline-flex; align-items: center; justify-content: center; box-shadow: none; /* Windows buttons are flat by default */ } .expense-modal-btn:focus { outline: 2px solid var(--color-text); outline-offset: 1px; } .expense-modal-btn.primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; } .expense-modal-btn.primary:hover { filter: brightness(1.1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .expense-modal-btn.primary:active { filter: brightness(0.9); transform: scale(0.98); } .expense-modal-btn.secondary { background: var(--table-bg); border: 1px solid var(--color-border); color: var(--color-text); } .expense-modal-btn.secondary:hover { background: var(--table-row-hover); border-color: var(--color-muted); } .expense-modal-btn.secondary:active { background: var(--table-row-odd); transform: scale(0.98); } .expense-modal-form { display: grid; gap: 16px } .expense-modal-form-row { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 12px; align-items: center } .expense-modal-form-row.full-width { grid-template-columns: minmax(0,1fr); display: flex; flex-direction: column; align-items: flex-start; gap: 8px } .expense-modal-label { font-weight: 400; color: var(--color-text); text-align: right; font-size: 14px } .expense-modal-input, .expense-modal-select, .expense-modal-textarea { border: 1px solid var(--color-border); border-radius: 4px; /* Windows 11 input radius */ padding: 0 10px; height: 32px; /* Standard height */ font-size: 14px; font-family: "Segoe UI", system-ui, sans-serif; transition: border-color 0.1s, background 0.1s; width: 100%; box-sizing: border-box; background: var(--table-bg); color: var(--color-text); } .expense-modal-input:hover, .expense-modal-select:hover, .expense-modal-textarea:hover { background: var(--table-row-hover); } .expense-modal-input:focus, .expense-modal-select:focus, .expense-modal-textarea:focus { outline: none; border-color: var(--color-primary); border-bottom-width: 2px; /* Windows input focus indicator */ background: var(--table-bg); } .expense-modal-textarea { padding: 8px 10px; height: auto; min-height: 80px; resize: vertical; } .expense-modal-textarea.large { min-height: 120px } @media (max-width: 768px) { .expense-modal { width: 95%; height: auto; max-height: 90vh; border-radius: 8px; margin: 0 10px } .expense-modal-body { padding: 16px } .expense-modal-footer { padding: 16px; flex-direction: column-reverse } .expense-modal-btn { width: 100% } .expense-modal-form-row { grid-template-columns: 1fr; gap: 4px; align-items: flex-start } .expense-modal-label { text-align: left; font-size: 13px; color: var(--color-muted) } } @media (min-width: 769px) { .expense-modal { width: 800px; height: auto; max-width: 90vw; max-height: 90vh; overflow: hidden; margin: 0 } } /* 字体大小切换按钮与面板定位 */ body.theme-expense .panel.card { position: relative } .font-size-toggle { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; z-index: 2; font-size: 18px; cursor: pointer } .font-size-toggle:hover { filter: brightness(1.06) } .panel .action-buttons { padding-right: 56px } .grid.small { font-size: 10px; line-height: 1.2 } .grid.large { font-size: 14px; line-height: 1.5 } @media (min-width: 769px) { /* .modal styles removed as they are replaced by .expense-modal */ } /* 头部与标签 */ .expense-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px } .expense-header h2 { margin: 0; font-size: 18px; line-height: 1.1 } .expense-tabs { flex: 1; margin: 0 12px } .expense-tabs .tabs.horizontal { display:flex; gap:8px; justify-content:center; align-items:center } .expense-tabs .tabs.horizontal .tab { display:flex; align-items:center } .expense-tabs .tabs.horizontal .tab svg { margin-right:8px } .header-actions { display:flex; gap:12px; align-items:center } .icon-toggle, .icon-theme { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display:flex; align-items:center; justify-content:center } .action-buttons #records-export, .action-buttons #stats-export { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display:inline-flex; align-items:center; justify-content:center; padding:0 } .action-buttons #records-export:hover, .action-buttons #stats-export:hover { filter: brightness(1.06) } .logo-ico { display:inline-block; width:20px; height:20px; margin-right:8px; background: linear-gradient(135deg,#93c5fd,#60a5fa); border-radius:6px; position:relative } .logo-ico::after { content:''; position:absolute; left:4px; top:3px; width:12px; height:12px; border-radius:50%; background:#fff; opacity:0.2 } /* 主题变量桥接(供组件文件使用) */ /* :root { --exp-card-bg:#ffffff; --exp-border:#e6e9ef } Removed, use --color-card and --color-border directly */ /* 移动端适配 */ @media (max-width: 768px) { /* .modal styles removed */ .action-buttons { flex-wrap: wrap } .action-btn { flex: 1; min-width: 120px; justify-content: center } .font-size-toggle { top: 8px; right: 8px; padding: 4px 8px; font-size: 11px } }