* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5715 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: rgba(0,0,0,.88);
  background: #f0f2f5;
  -webkit-font-smoothing: antialiased;
}
a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(22,119,255,.2); }

/* ===== Flash ===== */
.flash {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  padding: 12px 18px; border-radius: 8px; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.12); animation: slideIn .25s ease;
}
.flash-success { background: #52c41a; }
.flash-error { background: #ff4d4f; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.notice-stack {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.notice-item {
  pointer-events: auto;
  padding: 14px 16px; border-radius: 10px; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  animation: slideIn .25s ease;
}
.notice-item.credit { background: #389e0d; }
.notice-item.debit { background: #d48806; }
.notice-item.hold { background: #1677ff; }
.notice-item.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
.notice-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.notice-text { font-size: 13px; line-height: 1.5; opacity: .95; }

/* ===== Login (Art Design Pro style) ===== */
.login-body { background: #fff; }
.login-wrap { display: flex; min-height: 100vh; }
.login-left {
  position: relative; flex: 1; display: none; overflow: hidden;
  padding: 40px 48px; color: #fff;
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 45%, #003eb3 100%);
}
@media (min-width: 960px) { .login-left { display: flex; flex-direction: column; } }
.login-float {
  position: absolute; border-radius: 12px; background: rgba(255,255,255,.1);
  backdrop-filter: blur(4px); animation: float 6s ease-in-out infinite;
}
.login-float.f1 { left: 8%; top: 18%; width: 64px; height: 64px; }
.login-float.f2 { right: 14%; top: 28%; width: 40px; height: 40px; border-radius: 8px; animation-delay: 1.2s; animation-duration: 8s; }
.login-float.f3 { left: 18%; bottom: 28%; width: 32px; height: 32px; border-radius: 6px; animation-delay: .6s; }
.login-float.f4 { right: 20%; bottom: 18%; width: 56px; height: 56px; border-radius: 16px; animation-delay: 2s; animation-duration: 7s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(6deg); }
}
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand .logo-img,
.brand .logo-img,
.login-logo-top .logo-img,
.mobile-brand .logo-img {
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.logo-img-sm { width: 36px; height: 36px; }
.logo-img-lg { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.15); }
.logo-img-xl { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.login-logo-top { text-align: center; margin-bottom: 8px; }
.login-brand .logo-img-lg { background: rgba(255,255,255,.2); }
.login-brand span { font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.login-illus { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.login-illus svg { width: 100%; max-width: 420px; height: auto; }
.login-copy { position: relative; z-index: 2; }
.login-copy h2 { margin: 0 0 12px; font-size: 26px; font-weight: 600; line-height: 1.35; }
.login-copy p { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.72); }

.login-right {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 32px; width: 100%;
}
.login-panel { width: 100%; max-width: 400px; margin: 0 auto; }
.login-panel h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; color: #141414; }
.login-panel .sub { margin: 0 0 28px; color: #8c8c8c; font-size: 14px; }
.portal-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 24px; padding: 8px 14px; border-radius: 8px;
  background: #f5f5f5; border: 1px solid #f0f0f0; font-size: 13px; color: #595959;
}
.portal-tag b { color: #1677ff; font-weight: 600; }
.login-panel .form label { display: block; margin: 0 0 8px; color: rgba(0,0,0,.65); font-size: 14px; }
.login-panel .form .field { margin-bottom: 20px; }
.login-panel .form input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid #d9d9d9; border-radius: 8px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.login-panel .form input:hover { border-color: #4096ff; }
.login-panel .form input:focus {
  border-color: #1677ff; outline: none;
  box-shadow: 0 0 0 3px rgba(22,119,255,.12);
}
.login-panel .btn-block {
  width: 100%; height: 44px; margin-top: 8px;
  border: none; border-radius: 8px; background: #1677ff; color: #fff;
  font-size: 16px; font-weight: 500; cursor: pointer;
  box-shadow: 0 2px 0 rgba(5,145,255,.1);
  transition: background .2s;
}
.login-panel .btn-block:hover { background: #4096ff; }
.login-panel .hint { margin-top: 20px; color: #8c8c8c; font-size: 13px; text-align: center; }
.mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
@media (min-width: 960px) { .mobile-brand { display: none; } }
.mobile-brand .logo-mark {
  width: 36px; height: 36px; border-radius: 8px; background: #1677ff; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.mobile-brand strong { font-size: 16px; color: #141414; }

.contact-card {
  background: #fff; border: 1px solid #f0f0f0; border-radius: 10px;
  padding: 40px 32px; text-align: center; margin-bottom: 20px;
}
.contact-title { font-size: 18px; font-weight: 600; color: #141414; margin-bottom: 10px; }
.contact-card p { color: #8c8c8c; margin: 0 0 20px; line-height: 1.7; }
.contact-tg { margin-top: 12px; font-size: 13px; color: #595959; }
.install-box h1 { margin: 0 0 8px; font-size: 22px; }
.install-box > p { color: #8c8c8c; margin: 0 0 24px; }

/* ===== App Shell ===== */
.app { display: flex; min-height: 100vh; background: #f0f2f5; }
.sidebar {
  width: 232px; flex-shrink: 0; background: #fff;
  border-right: 1px solid #f0f0f0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand {
  height: 64px; padding: 0 18px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid #f5f5f5; flex-shrink: 0;
}
.brand .logo-img {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(22,119,255,.15);
}
.brand-text strong { display: block; font-size: 14px; color: #141414; line-height: 1.3; }
.brand-text small { display: block; font-size: 12px; color: #8c8c8c; margin-top: 2px; }

.menu { flex: 1; overflow-y: auto; padding: 14px 12px; }
.menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 4px; border-radius: 10px;
  color: #595959; position: relative; transition: all .15s;
}
.menu a:hover { background: #f5f5f5; color: #141414; }
.menu a.active {
  background: #e6f4ff; color: #1677ff; font-weight: 600;
}
.menu a.active::after {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); width: 3px; height: 22px;
  background: #1677ff; border-radius: 2px 0 0 2px;
}
.menu a .ico {
  width: 18px; height: 18px; flex-shrink: 0; opacity: .9;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu a .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid #f5f5f5; flex-shrink: 0; }
.btn-text {
  background: none; border: none; color: #8c8c8c; cursor: pointer;
  width: 100%; text-align: left; padding: 10px 8px; border-radius: 8px;
}
.btn-text:hover { color: #ff4d4f; background: #fff1f0; }
.sidebar-ver { padding: 6px 8px 0; font-size: 12px; color: #bfbfbf; }

.overlay { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 0 24px; background: rgba(255,255,255,.92); border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; width: 36px; height: 36px; border: none; background: #f5f5f5;
  border-radius: 8px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 2px; background: #595959; border-radius: 1px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #8c8c8c; }
.breadcrumb .sep { color: #d9d9d9; }
.breadcrumb .cur { color: #141414; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.link.muted { color: #8c8c8c; }
.link.muted:hover { color: #ff4d4f; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px; border-radius: 999px; background: #fafafa; border: 1px solid #f0f0f0;
}
.user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #4096ff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.user-meta { line-height: 1.25; padding-right: 4px; }
.user-meta .name { font-size: 13px; font-weight: 500; color: #141414; }
.user-meta .email { font-size: 11px; color: #8c8c8c; }
.content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ===== Workplace ===== */
.wp { display: flex; flex-direction: column; gap: 16px; }
.wp-hello {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; background: #fff; border: 1px solid #f0f0f0; border-radius: 10px;
}
.wp-hello.warn { border-color: #ffccc7; background: #fff7f6; }
.wp-hello h2 { margin: 0; font-size: 18px; font-weight: 600; color: #141414; }
.wp-hello p { margin: 6px 0 0; font-size: 13px; color: #8c8c8c; }
.wp-hello-actions { display: flex; gap: 8px; }

.kpi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.kpi-item {
  background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; padding: 18px 20px;
}
.kpi-label { font-size: 13px; color: #8c8c8c; }
.kpi-value {
  margin-top: 8px; font-size: 26px; font-weight: 650; letter-spacing: -.03em;
  color: #141414; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.kpi-value.ok { color: #389e0d; }
.kpi-value.warn { color: #d46b08; }
.kpi-value.bad { color: #cf1322; }
.kpi-extra { margin-top: 8px; font-size: 12px; color: #bfbfbf; }

.wp-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; align-items: start; }

.week-list { padding: 8px 20px 16px; }
.week-row {
  display: grid; grid-template-columns: 48px 1fr 48px 88px;
  gap: 12px; align-items: center; padding: 8px 0;
}
.week-date { font-size: 12px; color: #8c8c8c; }
.week-bar-wrap { height: 8px; background: #f5f5f5; border-radius: 99px; overflow: hidden; }
.week-bar { height: 100%; background: #1677ff; border-radius: 99px; min-width: 0; }
.week-num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: #141414; font-weight: 500; }
.week-money { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: #8c8c8c; }
.week-legend {
  display: flex; justify-content: flex-end; gap: 24px; margin-top: 8px;
  font-size: 12px; color: #bfbfbf; padding-top: 8px; border-top: 1px solid #f5f5f5;
}

.todo-list { padding: 4px 8px 8px; }
.todo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; border-radius: 8px; color: #595959;
}
.todo-item:hover { background: #fafafa; color: #141414; }
.todo-item .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #d9d9d9;
}
.todo-item .dot.blue { background: #1677ff; }
.todo-item .dot.orange { background: #fa8c16; }
.todo-item .dot.red { background: #ff4d4f; }
.todo-name { flex: 1; font-size: 14px; }
.todo-meta { font-size: 12px; color: #8c8c8c; }
.todo-count {
  min-width: 28px; height: 24px; padding: 0 8px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f5f5f5; color: #bfbfbf; font-size: 13px; font-weight: 600;
}
.todo-count.on { background: #e6f4ff; color: #1677ff; }
.todo-count.warn { background: #fff1f0; color: #cf1322; }

.shortcut-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: #f5f5f5; border-top: 1px solid #f0f0f0;
}
.shortcut-row a {
  background: #fff; padding: 14px 16px; color: #595959; font-size: 13px; text-align: center;
}
.shortcut-row a:hover { color: #1677ff; background: #fafafa; }

@media (max-width: 1100px) {
  .kpi { grid-template-columns: 1fr 1fr; }
  .wp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi { grid-template-columns: 1fr; }
  .week-row { grid-template-columns: 40px 1fr 40px; }
  .week-money { display: none; }
}

/* Page header */
.page-hd {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.page-title { margin: 0; font-size: 22px; font-weight: 650; color: #141414; letter-spacing: -.02em; display: block; }
.page-sub { margin: 6px 0 0; color: #8c8c8c; font-size: 13px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ===== Cards / Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: #fff; border-radius: 14px; padding: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 16px rgba(0,0,0,.04);
  border: 1px solid #f0f0f0; display: flex; justify-content: space-between; gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stat-body { min-width: 0; }
.stat-label { color: #8c8c8c; font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 10px; letter-spacing: -.03em; color: #141414; font-variant-numeric: tabular-nums; }
.stat-hint { margin-top: 8px; font-size: 12px; color: #bfbfbf; }
.stat.ok .stat-value { color: #52c41a; }
.stat.warn .stat-value { color: #fa8c16; }
.stat.bad .stat-value { color: #ff4d4f; }
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #e6f4ff; color: #1677ff;
}
.stat.ok .stat-icon { background: #f6ffed; color: #52c41a; }
.stat.warn .stat-icon { background: #fff7e6; color: #fa8c16; }
.stat.bad .stat-icon { background: #fff1f0; color: #ff4d4f; }
.stat-icon svg, .stat-icon .ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.card {
  background: #fff; border-radius: 14px; margin-bottom: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 16px rgba(0,0,0,.04);
  border: 1px solid #f0f0f0;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #f5f5f5;
}
.card-hd h3 { margin: 0; font-size: 15px; font-weight: 600; color: #141414; }
.pad { padding: 20px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1.1fr 1.4fr; }
.grid-2.equal { grid-template-columns: 1fr 1fr; }
@media (max-width: 960px) { .grid-2, .grid-2.equal { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 13px 18px; background: #fafafa;
  color: #8c8c8c; font-weight: 500; font-size: 12px;
  letter-spacing: .02em; white-space: nowrap;
  border-bottom: 1px solid #f0f0f0;
}
td { padding: 15px 18px; border-bottom: 1px solid #f5f5f5; color: #595959; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
td.empty { text-align: center; color: #bfbfbf; padding: 0; }
.empty-box { padding: 56px 20px; color: #bfbfbf; }
.empty-ico { margin: 0 auto 12px; width: 48px; height: 48px; border-radius: 50%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #bfbfbf; }
.empty-ico .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.table-foot { padding: 12px 18px; border-top: 1px solid #f5f5f5; color: #8c8c8c; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; color: #141414; }
.num-ok { color: #389e0d; }
.num-bad { color: #cf1322; }

/* Charts */
.mini-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.bar {
  width: 70%; max-width: 36px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4096ff, #1677ff); min-height: 4px;
  transition: height .3s ease;
}
.bar-val { font-size: 11px; color: #8c8c8c; margin-top: 6px; }
.bar-lab { font-size: 11px; color: #bfbfbf; margin-top: 2px; }
.area-chart { padding: 8px 4px 0; }
.area-chart svg { width: 100%; height: 160px; display: block; }
.area-labs { display: flex; justify-content: space-between; margin-top: 8px; color: #bfbfbf; font-size: 11px; }

/* ===== Buttons / Forms ===== */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border: 1px solid #d9d9d9; border-radius: 8px;
  background: #fff; cursor: pointer; color: rgba(0,0,0,.88); font-size: 13px; font-weight: 500;
  transition: all .15s; box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.btn:hover { border-color: #1677ff; color: #1677ff; }
.btn-primary, button.btn-primary {
  background: #1677ff; border-color: #1677ff; color: #fff;
  box-shadow: 0 2px 0 rgba(5,145,255,.1);
}
.btn-primary:hover, button.btn-primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.link { background: none; border: none; color: #1677ff; cursor: pointer; padding: 0; font-size: 13px; }
.link:hover { color: #4096ff; }
.link.bad { color: #ff4d4f; }
.link.bad:hover { color: #ff7875; }
.ops { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.modal .hint { margin: 0 0 12px; color: #8c8c8c; font-size: 13px; }

.form label { display: block; margin: 12px 0 6px; color: rgba(0,0,0,.65); }
.form input, .form select, .form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d9d9d9; border-radius: 8px;
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.form input:hover, .form select:hover { border-color: #4096ff; }
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: #1677ff; outline: none; box-shadow: 0 0 0 3px rgba(22,119,255,.1);
}
.hint { margin-top: 16px; color: #8c8c8c; font-size: 13px; }

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center;
  padding: 14px 16px; background: #fff; border-radius: 14px; border: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.toolbar input, .toolbar select {
  height: 36px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 8px; background: #fff;
}
.toolbar .spacer { flex: 1; }
.period-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.period-tabs a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 999px; background: #fff; border: 1px solid #f0f0f0; color: #595959; font-size: 13px;
}
.period-tabs a:hover { color: #1677ff; border-color: #91caff; }
.period-tabs a.active {
  background: #e6f4ff; border-color: #91caff; color: #1677ff; font-weight: 600;
}
.finance-kpi { margin-bottom: 16px; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick .btn {
  min-height: 52px; border-radius: 12px; justify-content: flex-start; padding: 0 16px;
  font-weight: 500; background: #fafafa; border-color: #f0f0f0;
}
.quick .btn:hover { background: #e6f4ff; border-color: #91caff; color: #1677ff; }

.todo { list-style: none; padding: 0; margin: 0; }
.todo li {
  padding: 0; border-bottom: 1px solid #f5f5f5;
}
.todo li:last-child { border-bottom: none; }
.todo li a {
  color: #595959; display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 14px 4px; border-radius: 8px; transition: background .15s;
}
.todo li a:hover { color: #1677ff; background: #fafafa; }
.todo b {
  display: inline-flex; min-width: 28px; height: 28px; padding: 0 10px;
  align-items: center; justify-content: center; border-radius: 999px;
  background: #e6f4ff; color: #1677ff; font-size: 13px;
}
.todo b.warn { background: #fff1f0; color: #ff4d4f; }
.todo b.zero { background: #f5f5f5; color: #bfbfbf; }

.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: #f5f5f5; color: #595959;
}
.badge.ok { background: #f6ffed; color: #389e0d; }
.badge.warn { background: #fff7e6; color: #d46b08; }
.badge.bad { background: #fff1f0; color: #cf1322; }

.modal {
  border: none; border-radius: 14px; padding: 0; max-width: 460px; width: 92%;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.modal::backdrop { background: rgba(0,0,0,.45); }
.modal form, .modal > div { padding: 24px; }
.modal h3 { margin: 0 0 20px; font-size: 16px; font-weight: 600; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal textarea { width: 100%; font-family: inherit; margin-bottom: 12px; border-radius: 8px; border: 1px solid #d9d9d9; padding: 10px; }

.cell-main { font-weight: 500; color: #141414; }
.cell-sub { font-size: 12px; color: #8c8c8c; margin-top: 2px; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    transition: transform .2s ease; box-shadow: 8px 0 24px rgba(0,0,0,.12);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .overlay {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30;
  }
  .nav-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px 0 16px; }
  .user-meta { display: none; }
  .logout-inline { display: none; }
  .quick { grid-template-columns: 1fr; }
}
