/* ==============================
   72 Theme: Accounting (Light)
   scope: body.theme-accounting
   ============================== */

body.theme-accounting{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border:#e5e7eb;
  --input:#ffffff;
  --primary:#2563eb;
  --primary-pressed:#1d4ed8;
  --ring:0 0 0 4px rgba(37,99,235,.18);
  --card-shadow:0 8px 22px rgba(15,23,42,.08);
}

/* card/table base */
body.theme-accounting .card{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow:var(--card-shadow);
}
body.theme-accounting .muted{ color:var(--muted); }

body.theme-accounting .table-wrap{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface);
}
body.theme-accounting table.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
body.theme-accounting table.table th,
body.theme-accounting table.table td{
  border-bottom:1px solid var(--border);
  padding:10px 10px;
  vertical-align:middle;
  color:var(--text);
  font-size:14px;
}
body.theme-accounting table.table thead th{
  border-bottom:2px solid var(--border);
  background:#f8fafc;
  color:#334155;
  font-weight:700;
  position:sticky;
  top:0;
  z-index:1;
}
body.theme-accounting table.table tbody tr:nth-child(even){
  background: rgba(15,23,42,.02);
}
/* hover：暖色 */
body.theme-accounting table.table tbody tr:hover{
  background: rgba(251,191,36,.16);
}

body.theme-accounting .num{ text-align:right; font-variant-numeric: tabular-nums; }

/* Buttons (accounting) */
body.theme-accounting .btn,
body.theme-accounting .btn-small{
  background:#fff;
  color: var(--text);
  border:1px solid var(--border);
  box-shadow:none;
  text-decoration:none;
}
body.theme-accounting .btn:hover,
body.theme-accounting .btn-small:hover{ background:#f8fafc; }
body.theme-accounting .btn:active,
body.theme-accounting .btn-small:active{
  background:#eef2f7;
  transform: translateY(1px);
}
body.theme-accounting .btn.primary,
body.theme-accounting .btn-small.primary{
  background: var(--primary);
  color:#fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(37,99,235,.14);
}
body.theme-accounting .btn.primary:active,
body.theme-accounting .btn-small.primary:active{
  background: var(--primary-pressed);
}

/* Controls */
body.theme-accounting .acc-controls{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:flex-end;
}
body.theme-accounting .acc-controls .field{ min-width:220px; }
body.theme-accounting .acc-controls .field--month{ min-width:220px; }
body.theme-accounting .acc-controls .field--q{ min-width:360px; flex:1; }

body.theme-accounting .acc-controls .input{
  height:48px;
  font-size:16px;
  padding:10px 12px;
  background:var(--input);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
}
body.theme-accounting .acc-controls .input:focus{
  outline:none;
  box-shadow:var(--ring);
  border-color:#cbd5e1;
}
body.theme-accounting .acc-controls .btn{
  height:48px;
  font-size:16px;
  padding:0 16px;
}
body.theme-accounting .acc-controls .btn.primary{ font-weight:800; }

/* mini-details (accounting) */
body.theme-accounting .mini-details summary{
  cursor:pointer;
  list-style:none;
  background:#fff;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px 10px;
}
body.theme-accounting .mini-details summary::-webkit-details-marker{ display:none; }
body.theme-accounting .mini-details summary:hover{
  background: rgba(251,146,60,.12);
  border-color: rgba(251,146,60,.4);
}
body.theme-accounting .mini-details__body{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  min-width:220px;
  color:var(--text);
  box-shadow:0 12px 26px rgba(15,23,42,.10);
}
body.theme-accounting .mini-table th,
body.theme-accounting .mini-table td{
  border-bottom:1px solid var(--border);
  padding:6px 8px;
  color:var(--text);
}
body.theme-accounting .mini-table tr:last-child th,
body.theme-accounting .mini-table tr:last-child td{ border-bottom:0; }

/* badges (accounting) */
body.theme-accounting .badge{
  border:1px solid var(--border);
  background:#fff;
  color:#334155;
}
body.theme-accounting .badge.ok{
  border-color:#86efac;
  background:#f0fdf4;
  color:#166534;
}
body.theme-accounting .badge.warn{
  border-color:#fdba74;
  background:#fff7ed;
  color:#9a3412;
}
body.theme-accounting .badge.danger{
  border-color:#fca5a5;
  background:#fef2f2;
  color:#991b1b;
}

/* layout blocks */
body.theme-accounting .grid-2col{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap:16px;
}
@media (max-width: 860px){
  body.theme-accounting .grid-2col{ grid-template-columns: 1fr; }
}

body.theme-accounting .kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
@media (max-width: 860px){
  body.theme-accounting .kpi-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
body.theme-accounting .kpi{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
body.theme-accounting .kpi-label{ font-size:12px; color:var(--muted); }
body.theme-accounting .kpi-value{ font-size:22px; font-weight:800; color:var(--text); margin-top:4px; }
body.theme-accounting .sep{ border:0; border-top:1px solid var(--border); margin:14px 0; }

/* Note emphasis */
body.theme-accounting .acc-note-card{
  border:1px solid rgba(37,99,235,.35);
  box-shadow:0 10px 26px rgba(15,23,42,.10);
}
body.theme-accounting .acc-note-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.35);
  background: rgba(37,99,235,.08);
  font-size:12px;
  color:var(--text);
}
body.theme-accounting .acc-note-card textarea.input{
  min-height:240px;
  font-size:15px;
  line-height:1.6;
  background:#fff;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
}
body.theme-accounting .acc-note-card textarea.input:focus{
  outline:none;
  box-shadow:var(--ring);
  border-color:#cbd5e1;
}

body.theme-accounting .acc-form-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
  margin-top:10px;
}
body.theme-accounting .acc-check{
  display:flex;
  gap:6px;
  align-items:center;
}

/* Evidence */
body.theme-accounting details.acc-evidence{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:10px 12px;
}
body.theme-accounting details.acc-evidence summary{
  cursor:pointer;
  list-style:none;
  user-select:none;
  font-weight:800;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
body.theme-accounting details.acc-evidence summary::-webkit-details-marker{ display:none; }
body.theme-accounting details.acc-evidence summary:after{
  content:"▾";
  opacity:.7;
  font-size:.9em;
  margin-left:10px;
}
body.theme-accounting details.acc-evidence[open] summary:after{ content:"▴"; }
body.theme-accounting details.acc-evidence .acc-evidence__body{ margin-top:10px; }

/* Accounting: table scroll area */
body.theme-accounting .table-wrap.acc-table-scroll{
  overflow:auto;
  max-height: calc(100vh - 260px);
  -webkit-overflow-scrolling: touch;
}
body.theme-accounting .table-wrap.acc-table-scroll thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background:#f8fafc;
}

/* Column highlight */
body.theme-accounting th.acc-col,
body.theme-accounting td.acc-col{ background: rgba(251,146,60,.08); }
body.theme-accounting th.acc-col-pay,
body.theme-accounting td.acc-col-pay{ background: rgba(244,114,182,.08); }
body.theme-accounting th.acc-col-days,
body.theme-accounting td.acc-col-days{ background: rgba(250,204,21,.10); }

body.theme-accounting thead th.acc-col{ background: rgba(251,146,60,.14); }
body.theme-accounting thead th.acc-col-pay{ background: rgba(244,114,182,.14); }
body.theme-accounting thead th.acc-col-days{ background: rgba(250,204,21,.16); }

body.theme-accounting tbody tr:hover td.acc-col{ background: rgba(251,146,60,.14); }
body.theme-accounting tbody tr:hover td.acc-col-pay{ background: rgba(244,114,182,.14); }
body.theme-accounting tbody tr:hover td.acc-col-days{ background: rgba(250,204,21,.16); }

body.theme-accounting thead th.acc-col::after{
  content:"●";
  margin-left:6px;
  font-size:11px;
  padding:2px 6px;
  border-radius:999px;
  background: rgba(251,146,60,.20);
  border:1px solid rgba(251,146,60,.35);
  color:#9a3412;
}

/* row states */
body.theme-accounting .acc-row.is-returned{ background: rgba(245,158,11,.10); }
body.theme-accounting .acc-row.is-open{ background: rgba(37,99,235,.06); }
body.theme-accounting .acc-row.has-note{ box-shadow: inset 4px 0 0 rgba(37,99,235,.55); }
body.theme-accounting .acc-row.has-auto{ box-shadow: inset 4px 0 0 rgba(168,85,247,.65); }
body.theme-accounting .acc-row.has-paid{ box-shadow: inset 4px 0 0 rgba(34,197,94,.60); }

body.theme-accounting .acc-auto-note{
  border:1px solid rgba(168,85,247,.35);
  background: rgba(168,85,247,.06);
  border-radius:12px;
  padding:10px 12px;
}
body.theme-accounting .acc-auto-note__title{ font-weight:800; margin-bottom:6px; }
body.theme-accounting .acc-auto-note__body{
  white-space:pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size:13px;
  line-height:1.5;
}

/* print */
@media print{
  body.theme-accounting .btn,
  body.theme-accounting .acc-controls{
    display:none !important;
  }
  body.theme-accounting .card{ box-shadow:none !important; }
  body.theme-accounting .grid-2col{ grid-template-columns: 1fr; }
}
