:root {
  --bg: #e8ecf1;
  --card: #fff;
  --border: #c5cdd8;
  --border-light: #dde3ea;
  --text: #111;
  --text-muted: #111;
  --blue: #4a7cbf;
  --blue-dark: #3a6aaf;
  --blue-light: #e8f0fa;
  --green: #5cb85c;
  --green-dark: #4cae4c;
  --red: #d9534f;
  --orange: #f0ad4e;
  --header-h: 52px;
  /* 한 단계씩만 차이나는 단일 타이포 스케일 (패널별 하드코딩 금지) */
  --fs-xs: 0.8125rem;
  --fs-label: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-ui: 0.9375rem;
  --fs-title: 1rem;
  --fs-btn: 0.875rem;
  --fs-kpi: 1.0625rem;
  --control-h: 2.05rem;
  --input-py: 0.4rem;
  --input-px: 0.55rem;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, sans-serif;
  font-size: 16px;
}


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

body { background: var(--bg); color: var(--text); min-height: 100vh; }

input, select, textarea {
  color: var(--text);
}
input::placeholder,
textarea::placeholder {
  color: #444;
}

.hidden { display: none !important; }

/* ── Login ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dce6f5, #e8ecf1);
}
.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  width: 360px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.login-box h1 { font-size: 1.25rem; color: var(--blue); margin-bottom: .25rem; }
.login-box > p { color: var(--text); font-size: .85rem; margin-bottom: 1.5rem; }
.login-box label { display: block; font-size: .8rem; color: var(--text); font-weight: 600; margin: .6rem 0 .2rem; }
.login-box input {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .9rem;
}
.error-text { color: var(--red); font-size: .8rem; margin-top: .5rem; }

/* ── Header ── */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.alerts-bar {
  flex-shrink: 0;
  background: #fffaf0;
  border-bottom: 1px solid #f0d9a8;
  padding: .4rem .75rem .5rem;
}
.alerts-bar-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.alerts-bar-head strong { font-size: .82rem; color: #5d4037; }
.alerts-summary { display: inline-flex; gap: .35rem; }
.alert-pill {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .12rem .4rem;
  border-radius: 999px;
}
.alert-pill.danger { background: #ffebee; color: #c62828; }
.alert-pill.warn { background: #fff3e0; color: #ef6c00; }
.alerts-list {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: grid;
  gap: .25rem;
  max-height: 9rem;
  overflow: auto;
}
.alerts-list.collapsed {
  max-height: 0;
  overflow: hidden;
  margin: 0;
}
.alert-item {
  display: grid;
  grid-template-columns: 2.6rem 4.5rem 1fr;
  gap: .4rem;
  align-items: start;
  padding: .28rem .4rem;
  background: #fff;
  border: 1px solid #f0e0c0;
  border-radius: 5px;
  cursor: pointer;
  font-size: .72rem;
}
.alert-item:hover { background: #fff8e8; border-color: #e0c080; }
.alert-item.level-danger { border-left: 3px solid #c62828; }
.alert-item.level-warn { border-left: 3px solid #ef6c00; }
.alert-level { font-weight: 800; }
.alert-item.level-danger .alert-level { color: #c62828; }
.alert-item.level-warn .alert-level { color: #ef6c00; }
.alert-type { color: #6b7785; font-weight: 600; }
.alert-msg { color: #333; }
.budget-alerts {
  margin-top: .2rem;
  padding: .35rem .45rem;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 5px;
  font-size: var(--fs-xs);
  color: #b71c1c;
}
.budget-alert-item + .budget-alert-item { margin-top: .2rem; }
.warn-text { color: #ef6c00 !important; }
.payee-summary {
  margin-top: .4rem;
  padding: .4rem .5rem;
  background: #f7f9fc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: .72rem;
}
.payee-summary-title { font-weight: 700; margin-bottom: .25rem; color: #445266; }
.payee-summary ul { list-style: none; margin: 0; padding: 0; }
.payee-summary li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .12rem 0;
  border-bottom: 1px dashed #e6ebf2;
}
.payee-summary li:last-child { border-bottom: none; }
.budget-exec-row { background: #f0f4f8; }

@media (max-width: 1100px) {
  .budget-metrics-row.cols-3,
  .budget-metrics-row.cols-4,
  .budget-metrics-row.cols-5,
  .budget-metrics-row.cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-header {
  height: var(--header-h);
  background: linear-gradient(180deg, #5a8fd4, var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.header-left { display: flex; align-items: center; gap: .5rem; }
.header-left h1 { font-size: 1rem; font-weight: 600; }
.header-logo { font-size: 1.1rem; }
.header-stats { display: flex; gap: .5rem; flex: 1; justify-content: center; flex-wrap: wrap; }
.stat-tab {
  background: rgba(255,255,255,.15);
  padding: .2rem .65rem;
  border-radius: 4px;
  font-size: .78rem;
  white-space: nowrap;
}
.stat-tab strong { margin-left: .2rem; }
.header-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.user-name { font-size: .85rem; opacity: .9; }

.settings-wrap { position: relative; }
.settings-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: .35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .75rem;
  width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 100;
  color: var(--text);
}
.settings-panel h4 { font-size: .8rem; margin-bottom: .5rem; color: var(--blue); }
.settings-panel input {
  width: 100%;
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  margin-bottom: .4rem;
}

/* ── Workspace: 좌측 패널 + 우측 ── */
.workspace {
  flex: 1;
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  min-height: 0;
}

.panel-left {
  width: 540px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.panel-left .project-list-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-left .card-grow { flex: 0 0 auto; max-height: 38%; min-height: 160px; }

.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

.right-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}
.right-main {
  display: flex;
  gap: 8px;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.right-main-left {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.schedule-card-hidden {
  display: none !important;
}
.timeline-card {
  flex: 1.1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.issue-card {
  flex: 0.95;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.issue-body-split {
  display: flex;
  flex-direction: row;
  gap: .55rem;
  min-height: 0;
  flex: 1;
}
.issue-form-pane {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.issue-list-pane {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--border-light);
  padding-left: .55rem;
}
.issue-list-pane .table-scroll {
  flex: 1;
  min-height: 0;
}
.timeline-card .card-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}
.timeline-toolbar {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.timeline-filter {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.timeline-zoom {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.timeline-zoom-btn {
  border: none;
  background: transparent;
  padding: .22rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.timeline-zoom-btn + .timeline-zoom-btn { border-left: 1px solid var(--border); }
.timeline-zoom-btn.active {
  background: var(--blue, #3b78c2);
  color: #fff;
}
.timeline-filter-btn {
  border: none;
  background: transparent;
  padding: .22rem .55rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}
.timeline-filter-btn + .timeline-filter-btn {
  border-left: 1px solid var(--border);
}
.timeline-filter-btn:hover { background: #f0f5fb; }
.timeline-filter-btn.active {
  background: var(--blue, #4a7cbf);
  color: #fff;
}
.timeline-range-label {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted, #6b7785);
  white-space: nowrap;
}
.timeline-body {
  padding: .45rem .55rem !important;
  flex: 1;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.schedule-timeline {
  flex: 1;
  min-height: 160px;
  overflow: auto;
  position: relative;
  width: 100%;
}
.timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--muted, #6b7785);
  font-size: .85rem;
}
.timeline-chart {
  min-width: 520px;
  min-height: 160px;
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0;
}
.timeline-head-label {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f5f7fa;
  border-bottom: 1px solid var(--border-light);
  padding: .35rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text);
}
.timeline-axis {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f7fa;
  border-bottom: 1px solid var(--border-light);
  min-height: 2rem;
  overflow: hidden;
}
.timeline-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: .25rem .2rem .35rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--blue-dark, #2f5f98);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}
.timeline-tick.align-start { transform: translateX(0); text-align: left; }
.timeline-tick.align-end { transform: translateX(-100%); text-align: right; }
.timeline-tick.year-start { color: #1e4e86; }
.timeline-month-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(74, 124, 191, .12);
  pointer-events: none;
  z-index: 0;
}
.timeline-month-guide.year-start {
  background: rgba(74, 124, 191, .32);
  width: 1.5px;
}
.timeline-row-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .1rem;
  padding: .35rem .45rem;
  border-bottom: 1px solid var(--border-light);
  min-height: 2.4rem;
  background: #fff;
  cursor: pointer;
}
.timeline-row-label:hover { background: #f5f8fc; }
.timeline-row-label.selected { background: #e8f0fa; }
.timeline-row-label .tl-title {
  font-size: .84rem;
  font-weight: 700;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-row-label .tl-meta {
  font-size: .68rem;
  font-weight: 500;
  color: #8a95a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-track {
  position: relative;
  border-bottom: 1px solid var(--border-light);
  min-height: 2.75rem;
  background: #fff;
}
.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e53935;
  z-index: 1;
  pointer-events: none;
}
.timeline-bar-target {
  position: absolute;
  top: calc(50% + 0.62rem);
  transform: translateY(-50%);
  height: 0.45rem;
  border-radius: 3px;
  background: #0f766e;
  opacity: 0.95;
  z-index: 2;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.35);
}
.timeline-bar {
  position: absolute;
  top: calc(50% - 0.28rem);
  transform: translateY(-50%);
  height: 1.15rem;
  border-radius: 4px;
  padding: 0 .35rem;
  display: flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  border: 1px solid transparent;
  z-index: 3;
}
.timeline-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255,255,255,.28);
  pointer-events: none;
}
.timeline-bar-text { position: relative; z-index: 1; }
.timeline-bar.late {
  background: #c62828 !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.timeline-bar:hover,
.timeline-bar.active {
  filter: brightness(1.05);
  border-color: rgba(0,0,0,.2);
  z-index: 2;
}
.timeline-bar.status-pending { background: #90a4ae; }
.timeline-bar.status-in_progress { background: #4a7cbf; }
.timeline-bar.status-completed { background: #43a047; }
.timeline-bar.status-delayed { background: #e53935; }
.timeline-bar.project-active { background: #4a7cbf; }
.timeline-bar.project-hold { background: #f0a202; }
.timeline-bar.project-done { background: #78909c; }
.card-bottom-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.left-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}
.card-grow-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.budget-card {
  flex: 0 0 clamp(420px, 44%, 640px);
  width: auto;
  min-width: 420px;
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.budget-body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 0;
}
.budget-top {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex-shrink: 0;
}
.budget-metrics {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .4rem;
  background: #f5f7fa;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}
.budget-metrics-row {
  display: grid;
  gap: .35rem;
}
.budget-metrics-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.budget-metrics-row.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.budget-metrics-row.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.budget-metrics-row.cols-6 {
  /* 6개 지표를 3열×2행으로 배치해 금액이 잘리지 않게 함 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.budget-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
  min-width: 0;
  padding: .35rem .4rem;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 5px;
}
.budget-metric span {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--muted, #6b7a90);
  line-height: 1.2;
}
.budget-metric b {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.budget-metric.balance b { color: var(--blue-dark); }
.budget-metric.balance.negative b { color: var(--red); }
.budget-metric.budget-sum-planned b { color: #e65100; }
.budget-metric.budget-sum-deposit b { color: #1565c0; }
.budget-metric.budget-sum-deposit-planned b { color: #0277bd; }
.budget-metric b.warn-text { color: var(--red); }
.budget-spent-row {
  display: flex;
  gap: .75rem;
  padding: .45rem .55rem;
  background: #f5f7fa;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}
.budget-spent-row + .budget-spent-row {
  margin-top: .35rem;
}
.budget-sum-project {
  background: #eef3f9;
}
.budget-spent-row .budget-sum-item {
  flex: 1;
  min-width: 0;
}
.budget-summary {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  padding: .45rem .55rem;
  background: #f5f7fa;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}
.budget-sum-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text);
  flex: 1;
  min-width: 5.5rem;
}
.budget-sum-item span { font-weight: 500; }
.budget-sum-item b { font-weight: 700; }
.budget-sum-item.balance b { color: var(--blue-dark); }
.budget-sum-item.balance.negative b { color: var(--red); }
.budget-sum-item.budget-sum-planned b { color: #e65100; }
.budget-sum-item.budget-sum-deposit b { color: #1565c0; }
.budget-form {
  width: 100%;
  padding: .45rem .5rem;
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.budget-form-row {
  display: flex;
  align-items: center;
  gap: .3rem;
  min-width: 0;
}
.budget-field-date {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
}
.budget-field-date span { white-space: nowrap; }
.budget-field-kind {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
}
.budget-field-kind span { white-space: nowrap; }
.budget-field-date input[type="date"] {
  width: 8.75rem;
  padding: .28rem .35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-family: inherit;
}
.budget-form input[type="text"],
.budget-form input.input-money {
  width: 100%;
  padding: .32rem .45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-family: inherit;
}
.budget-form-row #be-memo {
  flex: 1;
  min-width: 0;
}
.budget-amount-row {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: nowrap;
}
.budget-amount-row #be-amount {
  flex: 1;
  min-width: 0;
}
.budget-amount-row .file-mini-btn {
  display: inline-flex;
  align-items: center;
  height: 1.65rem;
  padding: 0 .45rem;
  flex-shrink: 0;
}
.budget-amount-row .reg-form-actions {
  flex-shrink: 0;
  display: flex;
  gap: .2rem;
}
.budget-amount-row .btn-sm {
  height: 1.65rem;
  padding: 0 .55rem;
  line-height: 1.65rem;
  box-sizing: border-box;
}
.budget-file-preview {
  padding-left: 0;
  min-height: 1.2rem;
}
.expense-list-table {
  table-layout: fixed;
}
.expense-list-table .col-exp-date { width: 11%; }
.expense-list-table .col-exp-kind { width: 8%; }
.expense-list-table .col-exp-memo { width: 20%; }
.expense-list-table .col-exp-payee { width: 13%; }
.expense-list-table .col-exp-amount { width: 16%; }
.expense-list-table .col-exp-attach { width: 14%; }
.expense-list-table .col-exp-voucher { width: 12%; }
.expense-list-table td:nth-child(1) { white-space: nowrap; }
.expense-kind-cell {
  padding: .2rem .22rem !important;
  text-align: center;
  white-space: nowrap;
}
.expense-kind-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  padding: .12rem .32rem;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.2;
}
.expense-kind-spent {
  background: #e8f5e9;
  color: #2e7d32;
}
.expense-kind-deposit {
  background: #e3f2fd;
  color: #1565c0;
}
.expense-kind-deposit_planned {
  background: #e1f5fe;
  color: #0277bd;
}
.expense-kind-planned {
  background: #fff3e0;
  color: #e65100;
}
.expense-kind-select-form {
  font-size: .72rem;
  padding: .16rem .24rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  min-width: 3.4rem;
}
.expense-kind-select-form:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(74, 124, 191, 0.2);
}
.expense-kind-row-planned { background: #fffef8; }
.expense-kind-row-planned:hover { background: #fff8e6; }
.expense-kind-row-planned.list-row-clickable.active { background: #ffe8b3; }
.expense-kind-row-deposit { background: #f7fbff; }
.expense-kind-row-deposit:hover { background: #eaf4ff; }
.expense-kind-row-deposit.list-row-clickable.active { background: #d6e9ff; }
.expense-kind-row-deposit_planned { background: #f3fbff; }
.expense-kind-row-deposit_planned:hover { background: #e6f6ff; }
.expense-kind-row-deposit_planned.list-row-clickable.active { background: #ccecff; }
.expense-list-table td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expense-list-table td:nth-child(7) {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.btn-expense-voucher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .18rem .42rem;
  border: 1px solid #0f4c8a;
  border-radius: 4px;
  background: #0f5da8;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-expense-voucher:hover { background: #0b477f; }
.btn-expense-voucher:disabled { opacity: .45; cursor: not-allowed; }

.expense-voucher-overlay { z-index: 5600; }
.expense-voucher-popup {
  max-width: 560px;
  width: min(96vw, 560px);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
}
.expense-voucher-body {
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
}
.expense-voucher-hint {
  margin: 0 0 .75rem;
  font-size: .78rem;
  color: #64748b;
  line-height: 1.45;
}
.expense-voucher-meta {
  margin-bottom: .75rem;
  padding: .55rem .65rem;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  font-size: .76rem;
  color: #334155;
  line-height: 1.45;
}
.expense-voucher-file-guide {
  margin: 0 0 .4rem;
  font-size: .74rem;
  color: #475569;
  line-height: 1.4;
}
.expense-voucher-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.2rem;
  margin: 0;
  padding: .7rem;
  border: 1.5px dashed #9db8d9;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
}
.expense-voucher-files {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
}
.expense-voucher-files:empty { display: none; }
.expense-voucher-file-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  max-width: 100%;
  padding: .22rem .4rem;
  border-radius: 4px;
  background: #eef4fb;
  border: 1px solid #c5d6ea;
  font-size: .7rem;
  color: #1e3a5f;
}
.expense-voucher-file-chip button {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: .75rem;
  padding: 0 .1rem;
  line-height: 1;
}
.expense-voucher-footer {
  display: flex;
  justify-content: flex-end;
  gap: .45rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}
.input-money { text-align: right; }
.num-col { text-align: right; }
.data-table th.num-col,
.data-table td.num-col { text-align: right; font-weight: 600; }
.expense-list-table th:nth-child(5),
.expense-list-table td:nth-child(5),
.expense-list-table th.num-col,
.expense-list-table td.num-col {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
  padding-right: .55rem !important;
}
.card-grow { display: flex; flex-direction: column; min-height: 0; }
.table-scroll { flex: 1; overflow: auto; min-height: 0; }
.issue-body { display: flex; flex-direction: column; min-height: 0; }

@media (max-width: 1100px) {
  .workspace { flex-direction: column; overflow: auto; }
  .panel-left { width: 100%; max-height: none; }
  .panel-left .list-body { max-height: 140px; }
  .right-main { flex-direction: column; }
  .right-main-left { flex: none; min-height: 420px; }
  .timeline-card { min-height: 220px; }
  .issue-card { min-height: 320px; }
  .issue-body-split { flex-direction: column; }
  .issue-form-pane {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
  }
  .issue-list-pane {
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding-left: 0;
    padding-top: .45rem;
    min-height: 160px;
  }
  .issue-reg-simple textarea { min-height: 6rem; }
  .budget-card { flex: none; width: 100%; min-width: 0; min-height: 360px; }
  .budget-top { flex-direction: column; }
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .65rem;
  background: #f5f7fa;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.card-titlebar.blue { background: var(--blue-light); border-bottom-color: #b8d4f0; }
.card-titlebar.green { background: #e8f5e9; border-bottom-color: #c8e6c9; }
.card-title { font-weight: 600; font-size: .85rem; color: var(--text); }
.card-titlebar.blue .card-title { color: var(--blue-dark); }
.card-titlebar.green .card-title { color: #2e7d32; }
.card-actions { display: flex; gap: .25rem; }
.card-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; padding: .5rem; min-height: 0; }
.card-body.issue-body-split {
  flex-direction: row;
  align-items: stretch;
  gap: .55rem;
}

/* ── Tables ── */
.search-input {
  width: 100%;
  padding: .3rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  margin-bottom: .4rem;
}
.list-table-wrap { flex: 1; overflow: auto; min-height: 0; }
.list-table-wrap.tall { max-height: none; }
.list-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.list-table th, .data-table th {
  background: #f0f3f7;
  padding: .35rem .4rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1;
}
.list-table td, .data-table td {
  padding: .35rem .4rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text);
}
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover { background: #f0f7ff; }
.list-table tbody tr.active { background: #d6e8ff; font-weight: 600; }
.data-table tbody tr.active { background: #e8f4ff; }
.desc-cell { max-width: 120px; color: var(--text); font-size: .75rem; }

/* Issue list — title / date / attach */
.issue-list-table {
  table-layout: fixed;
}
.issue-list-table .col-issue-title { width: 52%; }
.issue-list-table .col-issue-date { width: 22%; }
.issue-list-table .col-issue-attach { width: 26%; }
.issue-list-table td:nth-child(2),
.issue-list-table th:nth-child(2) {
  white-space: nowrap;
  font-size: .74rem;
}
.issue-list-table td:nth-child(3),
.issue-list-table th:nth-child(3) {
  font-size: .7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issue-list-table td:nth-child(3) .attach-link {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.data-table.compact td, .data-table.compact th { padding: .25rem .35rem; }

.row-actions { display: flex; gap: .2rem; white-space: nowrap; }
.btn-row {
  padding: .15rem .35rem;
  font-size: .7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
}
.btn-row:hover { background: #f0f3f7; }
.btn-row.del:hover { background: #fde8e8; color: var(--red); border-color: #f5c6c6; }
.sched-status-select {
  font-size: inherit;
  padding: .1rem;
}
.reg-select-sm {
  padding: .28rem .35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-family: inherit;
  min-width: 4.5rem;
  color: var(--text);
}
.reg-form-actions {
  display: flex;
  gap: .25rem;
  flex-shrink: 0;
}
.list-row-clickable { cursor: pointer; }
.list-row-clickable:hover { background: #f0f7ff; }
.data-table tbody tr.list-row-clickable.active { background: #d6e8ff; font-weight: 600; }

/* ── Forms ── */
.detail-form { display: flex; flex-direction: column; height: 100%; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .5rem;
  flex: 1;
  overflow-y: auto;
  align-content: start;
}
.form-grid.tight { gap: .3rem; }
.field label { display: block; font-size: .72rem; color: var(--text); font-weight: 600; margin-bottom: .1rem; }
.field input[readonly],
.field input:read-only {
  background: #eef2f7;
  color: #445266;
  cursor: default;
  font-weight: 700;
}
.field label .opt { color: #8a95a5; font-weight: 500; font-size: .65rem; margin-left: .15rem; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: #c62828; }
.field.has-warn input,
.field.has-warn textarea { border-color: #ef6c00; }
.field-error {
  margin-top: .15rem;
  font-size: .68rem;
  color: #c62828;
  font-weight: 600;
  line-height: 1.3;
}
.field-warn {
  margin-top: .15rem;
  font-size: .68rem;
  color: #ef6c00;
  font-weight: 600;
  line-height: 1.3;
}
.form-warnings {
  margin: .4rem 0;
  padding: .45rem .55rem;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: 5px;
  font-size: .72rem;
  color: #9a5b00;
  line-height: 1.4;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .3rem .45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(74,124,191,.15);
}
.field.span-2 { grid-column: span 2; }
.compact-form .field { margin-bottom: .35rem; }
.compact-form .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
@media (max-width: 520px) {
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}
.project-form-actions {
  display: flex;
  gap: .35rem;
  margin-top: .25rem;
  flex-shrink: 0;
}
.project-form-actions .btn {
  flex: 1;
  min-width: 0;
}

/* Project edit — compact 2-col grid to fit fixed panel height */
#project-edit-section .card-titlebar {
  padding: .28rem .5rem;
}
#project-edit-section .card-title {
  font-size: .82rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#project-edit-section .card-body {
  padding: .35rem .45rem;
  overflow-y: auto;
}
.project-form-compact {
  height: auto;
  min-height: 0;
}
.project-form-compact .project-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .18rem .35rem;
  align-content: start;
}
.project-form-compact .field {
  margin-bottom: 0;
}
.project-form-compact .field.span-2 {
  grid-column: span 2;
}
.project-form-compact .field-row-3 {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: .18rem .35rem;
  align-items: end;
}
.project-form-compact .field-row-name-budget {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: .18rem .35rem;
  align-items: end;
}
.project-form-compact .field-row-3 .field label .opt {
  font-size: .62rem;
}
@media (max-width: 520px) {
  .project-form-compact .field-row-3,
  .project-form-compact .field-row-name-budget {
    grid-template-columns: 1fr;
  }
}
.project-form-compact .field label {
  font-size: .68rem;
  margin-bottom: .04rem;
  line-height: 1.15;
}
.project-form-compact .project-form-actions {
  margin-top: .28rem;
  gap: .25rem;
}
.progress-mini {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .25rem 0 .35rem;
}
.progress-mini-bar {
  flex: 1;
  height: 6px;
  background: #e8ecf1;
  border-radius: 3px;
  overflow: hidden;
}
.progress-mini-bar > div {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  width: 0%;
  transition: width .2s;
}
.progress-mini span { font-size: .72rem; color: var(--text); min-width: 2rem; }

/* Project list tabs */
.proj-tabs {
  display: flex;
  gap: 2px;
  padding: 0 .4rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.proj-sort {
  display: flex;
  gap: .3rem;
  padding: .35rem .4rem .3rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: #f7f9fc;
}
.proj-sort-btn {
  flex: 1;
  min-height: 2rem;
  padding: .35rem .28rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}
.proj-sort-btn:hover { background: #eef4fb; border-color: #9eb6d4; }
.proj-sort-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.proj-tab {
  flex: 1;
  padding: .35rem .25rem;
  border: none;
  background: transparent;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.proj-tab:hover { background: #f5f7fa; }
.proj-tab.active { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: 700; }
.proj-tab span { font-weight: 600; }
.proj-list {
  list-style: none;
  margin: 0;
  padding: .25rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.proj-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  padding: .28rem .4rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  margin-bottom: 3px;
  background: #fff;
  font-size: .78rem;
}
.proj-item:hover { background: #fafbfc; }
.proj-item.active { border-color: var(--blue); background: #f0f7ff; }
.proj-item-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
}
.proj-item-line {
  display: flex;
  align-items: center;
  gap: .28rem;
  min-width: 0;
  width: 100%;
}
.proj-pm-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 3.25rem;
  height: 1.15rem;
  max-width: 4.5rem;
  padding: 0 .34rem;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}
.proj-item-code {
  flex-shrink: 0;
  display: inline-block;
  box-sizing: content-box;
  min-width: 11ch;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  font-size: .65rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: #e8f0fe;
  border-radius: 3px;
  padding: .04rem .28rem;
  letter-spacing: 0;
}
.proj-item-name {
  width: 100%;
  min-width: 0;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: keep-all;
}
.proj-item-sub {
  font-size: .68rem;
  color: var(--text);
  opacity: .8;
  min-width: 0;
  flex: 1;
  padding-left: .05rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-item-actions {
  display: flex;
  flex-direction: row;
  gap: 2px;
  flex-shrink: 0;
  align-self: center;
  flex-wrap: wrap;
  align-items: center;
}
.proj-item-actions .proj-pm-badge {
  align-self: center;
}
.btn-proj-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .12rem .32rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #9db8d9;
  border-radius: 3px;
  background: #e8f1fb;
  color: var(--blue-dark, #2f5f98);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.btn-proj-link:hover {
  background: #d6e8ff;
  border-color: var(--blue, #4a7cbf);
}
.btn-move {
  padding: .12rem .32rem;
  font-size: .65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #f5f7fa;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.btn-move:hover { background: #e8f0fa; border-color: var(--blue); color: var(--blue-dark); }
.btn-proj-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-width: 3.25rem;
  height: 1.4rem;
  padding: 0 .38rem;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #0f4c8a;
  border-radius: 3px;
  background: #0f5da8;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(15, 76, 138, .2);
}
.btn-proj-report:hover {
  background: #0b477f;
  border-color: #0b477f;
}
.btn-proj-report:disabled {
  opacity: .55;
  cursor: wait;
}
.proj-empty {
  padding: .75rem;
  text-align: center;
  color: var(--text);
  font-size: .75rem;
}
.hint-text { font-size: .8rem; color: var(--text); text-align: center; padding: 1rem .5rem; }

/* 보고서 생성 진행 레이어 */
.report-progress-overlay { z-index: 6000; }
.report-progress-popup {
  width: 100%;
  max-width: 26rem;
  padding: 1.4rem 1.5rem 1.25rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 25, 45, .28);
}
.report-progress-popup h2 {
  margin: 0 0 .3rem;
  font-size: 1rem;
  color: #1a365d;
}
.report-progress-sub {
  margin: 0 0 .9rem;
  font-size: .78rem;
  color: #64748b;
  line-height: 1.45;
}
.report-progress-bar {
  height: .4rem;
  border-radius: 999px;
  background: #e6ecf5;
  overflow: hidden;
}
.report-progress-bar > span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b6cb0, #0f5da8);
  transition: width .45s ease;
}
.report-progress-steps {
  margin: .95rem 0 .8rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .45rem;
}
.report-progress-steps li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .78rem;
  line-height: 1.4;
  color: #94a3b8;
}
.report-progress-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18rem;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  box-sizing: border-box;
}
.report-progress-steps li.active {
  color: #1a365d;
  font-weight: 600;
}
.report-progress-steps li.active::before {
  border-color: #2b6cb0;
  border-top-color: transparent;
  animation: report-progress-spin .8s linear infinite;
}
.report-progress-steps li.done { color: #475569; }
.report-progress-steps li.done::before {
  content: "\2713";
  border-color: #2f855a;
  background: #2f855a;
  color: #fff;
  font-size: .6rem;
  line-height: .8rem;
  text-align: center;
  font-weight: 700;
}
.report-progress-steps li.failed { color: #c53030; }
.report-progress-steps li.failed::before {
  content: "!";
  border-color: #c53030;
  background: #c53030;
  color: #fff;
  font-size: .62rem;
  line-height: .8rem;
  text-align: center;
  font-weight: 700;
}
.report-progress-note {
  margin: 0;
  font-size: .72rem;
  color: #94a3b8;
}
@keyframes report-progress-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .report-progress-steps li.active::before { animation: none; }
  .report-progress-bar > span { transition: none; }
}

/* Layer popup */
.layer-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 25, 45, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000;
  backdrop-filter: blur(2px);
}
.layer-popup {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  overflow: hidden;
}
.layer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, #5a8fd4, var(--blue));
  color: #fff;
}
.layer-header h2 { font-size: 1rem; font-weight: 600; }
.layer-close {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.layer-body { padding: 1rem; }
.layer-footer { display: flex; gap: .5rem; justify-content: flex-end; padding-top: .75rem; margin-top: .5rem; border-top: 1px solid var(--border-light); }
.btn-ghost { background: #f0f3f7; color: var(--text); border: 1px solid var(--border); }

.btn-report {
  background: #1a365d;
  color: #fff;
  border: 1px solid #0f2744;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(26, 54, 93, .3);
}
.btn-report:hover {
  background: #0f2744;
  color: #fff;
}
.btn-report:disabled {
  opacity: .65;
  cursor: wait;
}
.card-titlebar.blue .btn-report {
  background: #153e75;
  border-color: #0f2744;
}

.finance-overlay { z-index: 5200; align-items: stretch; padding: .75rem; }
.finance-popup {
  max-width: min(1440px, 100%);
  width: 100%;
  height: min(96vh, 980px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}
.finance-header {
  background: linear-gradient(135deg, #3d6aa8, #2f5f98);
  flex-shrink: 0;
  gap: .75rem;
}
.finance-header-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.finance-filter {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}
.finance-filter-btn {
  border: none;
  background: transparent;
  padding: .22rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.88);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
}
.finance-filter-btn + .finance-filter-btn {
  border-left: 1px solid rgba(255,255,255,.35);
}
.finance-filter-btn:hover { background: rgba(255,255,255,.16); }
.finance-filter-btn.active {
  background: #fff;
  color: #2f5f98;
}
.finance-header .btn-print-finance {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  font-weight: 700;
}
.finance-header .btn-print-finance:hover {
  background: rgba(255,255,255,.3);
}
.finance-header h2 { margin: 0; font-size: 1.1rem; }
.finance-sub {
  margin: .2rem 0 0;
  font-size: .78rem;
  opacity: .88;
  font-weight: 500;
}
.finance-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: .9rem 1rem 1.1rem;
  background: #f4f6f9;
}
.finance-loading,
.finance-error {
  padding: 2rem;
  text-align: center;
  color: var(--muted, #6b7785);
}
.finance-error { color: var(--red, #c62828); }
.finance-summary-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .85rem;
}
.finance-summary-groups-single {
  grid-template-columns: 1fr;
}
.finance-group {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: .55rem .65rem .65rem;
}
.finance-group-title {
  font-size: .8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: .45rem;
}
.finance-group-title span {
  font-weight: 500;
  color: #6b7785;
  font-size: .72rem;
  margin-left: .25rem;
}
.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .55rem;
  margin-bottom: .85rem;
}
.finance-summary-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}
.finance-summary-4 {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 0;
}
.finance-summary-6 {
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 0;
}
.finance-summary-7 {
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .finance-summary-4 { grid-template-columns: repeat(2, 1fr); }
  .finance-summary-6,
  .finance-summary-7 { grid-template-columns: repeat(2, 1fr); }
}
.finance-summary-1 {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}
.finance-kpi {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: .55rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.finance-group .finance-kpi { background: #f8fafc; }
.finance-kpi .kpi-label {
  font-size: .72rem;
  font-weight: 600;
  color: #627084;
}
.finance-kpi .kpi-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}
.finance-kpi.kpi-income .kpi-value { color: #2e7d32; }
.finance-kpi.kpi-out .kpi-value { color: #c62828; }
.finance-kpi.kpi-plan .kpi-value { color: #e65100; }
.finance-kpi.kpi-blue .kpi-value { color: #2f5f98; }
.finance-kpi.kpi-deposit .kpi-value { color: #1565c0; }
.finance-table .deposit { color: #1565c0; font-weight: 600; }
.finance-table thead th { text-align: center; }
.finance-table thead th:first-child { text-align: left; }
@media (max-width: 960px) {
  .finance-summary-groups { grid-template-columns: 1fr; }
}
.finance-section {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}
.finance-section-title {
  padding: .55rem .7rem;
  font-size: .82rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}
.finance-table-wrap { overflow: auto; max-height: min(68vh, 640px); }
.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.finance-table th,
.finance-table td {
  padding: .4rem .45rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  white-space: nowrap;
}
.finance-table th {
  position: sticky;
  top: 0;
  background: #eef2f7;
  z-index: 1;
  font-weight: 700;
  color: #445266;
}
.finance-table td.num,
.finance-table th.num { text-align: right; }
.finance-table .neg { color: #c62828; font-weight: 700; }
.finance-table .pos { color: #2e7d32; font-weight: 700; }
.finance-table .plan { color: #e65100; font-weight: 600; }
.finance-proj-code {
  display: inline-block;
  box-sizing: content-box;
  min-width: 11ch;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  font-size: .68rem;
  font-weight: 700;
  color: #2f5f98;
  background: #e8f0fa;
  border-radius: 3px;
  padding: .05rem .28rem;
  margin-right: .28rem;
  letter-spacing: 0;
}
.finance-proj-name {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finance-status {
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .3rem;
  border-radius: 3px;
  background: #eef2f7;
}
.finance-status.g-active { background: #e3effc; color: #2f5f98; }
.finance-status.g-hold { background: #fff3e0; color: #ef6c00; }
.finance-status.g-done { background: #eceff1; color: #546e7a; }
.finance-hint {
  margin-top: .55rem;
  font-size: .72rem;
  color: #6b7785;
}

/* Registration forms inside schedule / issue panels */
.panel-reg-block {
  flex-shrink: 0;
  padding: .4rem .45rem;
  margin-bottom: .35rem;
  background: #f8f9fb;
  border: 1px solid var(--border-light);
  border-radius: 5px;
}
.panel-reg-block-issue {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
  height: 100%;
}
.panel-reg-block-issue .file-chips-inline {
  padding-left: 0;
}
.issue-form-pane .panel-reg-block {
  flex: 1;
  margin-bottom: 0;
  min-height: 0;
}
.card-grow-half .card-body .table-scroll,
.card-bottom-half .card-body .table-scroll {
  flex: 1;
  min-height: 0;
}
.reg-inline {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.reg-inline .reg-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text);
  min-width: 2rem;
  flex-shrink: 0;
}
.reg-inline input[type="text"],
.reg-inline input[type="date"],
.reg-inline textarea {
  flex: 1;
  min-width: 70px;
  padding: .28rem .4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-family: inherit;
}
.reg-inline textarea {
  resize: none;
  min-height: calc(2.2em + .56rem);
  line-height: 1.1;
}

/* Issue register: stacked form for left pane */
.issue-reg-simple {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
  flex: 1;
  min-height: 0;
}
.issue-reg-simple #qi-title {
  width: 100%;
  box-sizing: border-box;
  padding: .32rem .4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .82rem;
  font-family: inherit;
}
.issue-form-meta {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.issue-form-meta #qi-occurred {
  flex: 1 1 auto;
  min-width: 7.5rem;
  padding: .28rem .35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-family: inherit;
}
.issue-reg-simple textarea {
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-height: 8rem;
  padding: .35rem .45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  font-family: inherit;
  color: var(--text);
  resize: none;
  line-height: 1.4;
}
.reg-inline input[type="text"]:first-of-type { min-width: 100px; }
#qs-assignee { min-width: 4.5rem; max-width: 6rem; flex: 0 1 6rem; }
.file-mini {
  font-size: .72rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  padding: .2rem .35rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
}
.file-mini input { display: none; }
.file-chips-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding-left: 2.5rem;
}

/* Registration cards */
.reg-card { border: none; overflow: visible; }
.reg-card .card-body { padding: 0; }
.reg-card-head {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border-light);
}
.reg-icon { font-size: 1.4rem; line-height: 1; }
.reg-card-head h3 { font-size: .9rem; font-weight: 700; color: var(--text); }
.reg-sub { font-size: .72rem; color: var(--text-muted); margin-top: .1rem; }
.reg-form { padding: .65rem .75rem .75rem; }
.reg-input-lg {
  width: 100%; padding: .55rem .65rem;
  border: 2px solid var(--border-light);
  border-radius: 8px; font-size: .9rem;
  margin-bottom: .5rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.reg-input-lg:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(74,124,191,.15); }
.reg-input {
  width: 100%; padding: .4rem .55rem;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: .85rem; margin-bottom: .45rem; font-family: inherit;
}
.reg-textarea {
  width: 100%; padding: .45rem .55rem;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: .85rem; margin-bottom: .45rem; resize: vertical;
  min-height: 72px; font-family: inherit;
}
.reg-date-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-bottom: .45rem;
}
.reg-date-row label { display: flex; flex-direction: column; gap: .2rem; }
.reg-date-row label span { font-size: .7rem; color: var(--text-muted); font-weight: 600; }
.reg-date-row input {
  padding: .4rem; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; font-family: inherit;
}
.reg-schedule { border-top: 3px solid #4263eb; }
.reg-issue { border-top: 3px solid #37b24d; }
.btn-reg {
  width: 100%; padding: .55rem; border: none; border-radius: 8px;
  font-size: .88rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: transform .1s, box-shadow .15s;
}
.btn-reg:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.btn-reg:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-reg-blue { background: linear-gradient(135deg, #4dabf7, #339af0); color: #fff; }
.btn-reg-green { background: linear-gradient(135deg, #51cf66, #37b24d); color: #fff; }
.file-drop {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; border: 2px dashed #c5cdd8; border-radius: 8px;
  background: #fafbfc; cursor: pointer; margin-bottom: .45rem;
  transition: border-color .15s, background .15s;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--blue); background: #f0f7ff; }
.file-drop input { display: none; }
.file-drop-text { font-size: .78rem; color: var(--text-muted); pointer-events: none; }
.issue-file-drop {
  flex: 0 0 auto;
  min-height: 2.6rem;
  margin: 0;
  padding: .35rem .5rem;
  border-radius: 6px;
}
.issue-existing-files {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .35rem .4rem;
  background: #f4f7fb;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  max-height: 9rem;
  overflow: auto;
}
.issue-existing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  flex-wrap: wrap;
  font-size: .72rem;
  font-weight: 700;
  color: #445266;
}
.issue-existing-actions {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
}
.issue-existing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.issue-existing-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding: .15rem 0;
  border-bottom: 1px dashed #e3e9f1;
}
.issue-existing-list li:last-child { border-bottom: none; }
.issue-att-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  flex: 1;
  font-size: .75rem;
  cursor: pointer;
}
.issue-att-item .attach-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-cell { position: relative; }
.attach-multi { position: relative; display: inline-block; max-width: 100%; }
.attach-multi-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  padding: .12rem .35rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--blue-dark);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.attach-multi-btn:hover { background: #f0f5fb; }
.attach-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 220px;
  max-width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  padding: .4rem;
}
.attach-popover-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-height: 10rem;
  overflow: auto;
  margin-bottom: .4rem;
}
.attach-popover-item {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .72rem;
  cursor: pointer;
}
.attach-popover-item .attach-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.attach-popover-actions {
  display: flex;
  gap: .3rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
  padding-top: .35rem;
}
.issue-form-pane.dragover .issue-file-drop,
.issue-file-drop.dragover {
  border-color: var(--blue);
  background: #e8f0fa;
  box-shadow: inset 0 0 0 1px rgba(74, 124, 191, .25);
}
.issue-form-pane.dragover {
  outline: 2px dashed var(--blue);
  outline-offset: -2px;
  border-radius: 6px;
}
.file-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.file-chip {
  font-size: .7rem; background: #e8f0fa; color: var(--blue-dark);
  padding: .2rem .45rem; border-radius: 12px;
  display: inline-flex; align-items: center; gap: .25rem;
}
.file-chip-remove {
  border: none;
  background: transparent;
  color: #6b7785;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  padding: 0 .1rem;
}
.file-chip-remove:hover { color: var(--red); }

.form-actions {
  display: flex;
  gap: .4rem;
  justify-content: flex-end;
  padding-top: .5rem;
  border-top: 1px solid var(--border-light);
  margin-top: .4rem;
  flex-shrink: 0;
}

/* Quick register */
.register-body { overflow-y: auto; }
.register-block h4 {
  font-size: .8rem;
  color: var(--blue-dark);
  margin-bottom: .4rem;
  font-weight: 600;
}
.quick-form input, .quick-form select, .quick-form textarea {
  width: 100%;
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  margin-bottom: .35rem;
  font-family: inherit;
}
.quick-form textarea { resize: vertical; min-height: 60px; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.quick-row .field label { font-size: .69rem; }
.quick-row input { margin-bottom: 0; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: .6rem 0; }
.file-btn {
  display: block;
  text-align: center;
  padding: .35rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  font-size: .78rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: .35rem;
}
.file-btn input { display: none; }
.file-preview { font-size: .72rem; color: var(--text-muted); margin-bottom: .35rem; }

.inline-edit-panel {
  border-top: 2px solid var(--blue-light);
  margin-top: .5rem;
  padding: .5rem;
  background: #fafbfc;
  flex-shrink: 0;
}
.inline-edit-panel input,
.inline-edit-panel textarea,
.inline-edit-panel select {
  width: 100%;
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  margin-bottom: .35rem;
  font-family: inherit;
}
.inline-edit-title { font-size: .79rem; font-weight: 600; color: var(--blue); margin-bottom: .35rem; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .1rem .35rem;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 600;
}
.badge-planning, .badge-pending, .badge-open { background: #e3f2fd; color: #1565c0; }
.badge-in_progress { background: #fff3e0; color: #e65100; }
.badge-completed, .badge-resolved, .badge-closed { background: #e8f5e9; color: #2e7d32; }
.badge-on_hold, .badge-delayed { background: #fce4ec; color: #c62828; }
.badge-cancelled { background: #eee; color: #666; }
.badge-high, .badge-critical { background: #ffebee; color: #c62828; }
.badge-medium { background: #fff8e1; color: #f57f17; }
.badge-low { background: #f5f5f5; color: #757575; }

.attach-link {
  font-size: .7rem;
  color: var(--blue);
  text-decoration: none;
  display: block;
}
.attach-link:hover { text-decoration: underline; }

.empty-msg { color: var(--text); font-size: .78rem; padding: .5rem; text-align: center; }

/* ── Buttons ── */
.btn {
  padding: .4rem .85rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: .25rem .55rem; font-size: .75rem; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--blue-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: var(--green-dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover:not(:disabled) { background: #c9302c; }
.btn-outline {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}
.btn-outline:hover { background: rgba(255,255,255,.3); }

.btn-icon {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.btn-icon.btn-green { background: var(--green); color: #fff; }
.btn-icon.btn-red { background: var(--red); color: #fff; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #333;
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ── Readable typography (workspace) ── */
.app-header .header-left h1 { font-size: 1.125rem; }
.app-header .stat-tab { font-size: var(--fs-sm); padding: .3rem .75rem; }
.app-header .user-name { font-size: var(--fs-ui); }

.app .card-title { font-size: var(--fs-title); }
.app .card-titlebar { padding: .5rem .7rem; }

.app .data-table,
.app .list-table { font-size: var(--fs-sm); }
.app .data-table th,
.app .data-table td,
.app .list-table th,
.app .list-table td {
  font-size: var(--fs-sm);
  padding: .38rem .48rem;
  line-height: 1.32;
}
.app .expense-list-table td:nth-child(1),
.app .expense-list-table td:nth-child(5),
.app .issue-list-table td:nth-child(2),
.app .issue-list-table td:nth-child(3) {
  font-size: var(--fs-xs);
}

.app .issue-card .attach-link {
  font-size: var(--fs-xs);
}

.app .field label,
.app .budget-field-date > span {
  font-size: var(--fs-label);
}

.app .reg-inline input,
.app .reg-inline select,
.app .budget-form input,
.app .budget-form select,
.app .issue-reg-simple input,
.app .issue-reg-simple textarea,
.app .field input,
.app .field textarea,
.app .field select,
.app .detail-form input,
.app .detail-form textarea,
.app .detail-form select,
.app .reg-select-sm {
  font-size: var(--fs-ui);
  padding: var(--input-py) var(--input-px);
}

.app .btn { font-size: var(--fs-ui); }
.app .btn-sm {
  font-size: var(--fs-btn);
  padding: .35rem .7rem;
  min-height: var(--control-h);
  line-height: 1.2;
}

.app .proj-item { font-size: var(--fs-sm); padding: .3rem .42rem; }
.app .proj-tab { font-size: var(--fs-sm); padding: .35rem .5rem; }
.app .proj-pm-badge { font-size: .72rem; min-width: 3.25rem; height: 1.15rem; padding: 0 .34rem; }
.app .proj-item-code { font-size: var(--fs-xs); padding: .04rem .28rem; }
.app .proj-item-sub { font-size: var(--fs-xs); max-width: none; line-height: 1.15; }
.app .proj-item-name { -webkit-line-clamp: 2; line-height: 1.25; font-size: var(--fs-sm); }
.app .btn-move { font-size: var(--fs-xs); padding: .14rem .32rem; white-space: nowrap; }
.app .budget-sum-item { font-size: var(--fs-sm); }
.app .empty-msg { font-size: var(--fs-sm); padding: .65rem; }
.app .attach-link { font-size: var(--fs-xs); }
.app .file-mini { font-size: var(--fs-xs); padding: .28rem .45rem; }
.app .hint-text { font-size: var(--fs-sm); }
.app .file-chip { font-size: var(--fs-xs); }

.app .budget-amount-row .file-mini-btn,
.app .budget-amount-row .btn-sm,
.app .issue-reg-simple .file-mini-btn {
  min-height: var(--control-h);
  height: var(--control-h);
  font-size: var(--fs-btn);
}

/* Project form — override global readable sizing for fit */
.app #project-edit-section .detail-form input,
.app #project-edit-section .detail-form textarea,
.app #project-edit-section .detail-form select {
  font-size: var(--fs-xs);
  padding: .2rem .35rem;
  min-height: 1.7rem;
  line-height: 1.25;
}
.app #project-edit-section .detail-form textarea {
  resize: none;
  min-height: 1.7rem;
  height: 1.7rem;
}
.app #project-edit-section .detail-form input[type="date"] {
  padding: .16rem .28rem;
}
.app #project-edit-section .project-form-actions .btn-sm {
  font-size: var(--fs-xs);
  padding: .22rem .35rem;
  min-height: 1.75rem;
  height: auto;
  line-height: 1.2;
}

/* Issue list & budget — denser typography for table visibility */
.app .card-grow-half .issue-list-table,
.app .card-grow-half .issue-list-table th,
.app .card-grow-half .issue-list-table td,
.app .card-bottom-half .issue-list-table,
.app .card-bottom-half .issue-list-table th,
.app .card-bottom-half .issue-list-table td {
  font-size: var(--fs-sm);
  padding: .32rem .42rem;
  line-height: 1.3;
}
.app .card-grow-half .issue-list-table td:nth-child(2),
.app .card-grow-half .issue-list-table td:nth-child(3),
.app .card-bottom-half .issue-list-table td:nth-child(2),
.app .card-bottom-half .issue-list-table td:nth-child(3) {
  font-size: var(--fs-xs);
}
.app .issue-card .panel-reg-block-issue .issue-reg-simple input,
.app .issue-card .panel-reg-block-issue .issue-reg-simple textarea,
.app .card-grow-half .panel-reg-block-issue .issue-reg-simple input,
.app .card-grow-half .panel-reg-block-issue .issue-reg-simple textarea,
.app .card-bottom-half .panel-reg-block-issue .issue-reg-simple input,
.app .card-bottom-half .panel-reg-block-issue .issue-reg-simple textarea {
  font-size: var(--fs-sm);
  padding: .3rem .42rem;
}
.app .issue-card .panel-reg-block-issue .issue-reg-simple .btn-sm,
.app .card-grow-half .panel-reg-block-issue .issue-reg-simple .btn-sm,
.app .card-bottom-half .panel-reg-block-issue .issue-reg-simple .btn-sm {
  font-size: var(--fs-xs);
  min-height: 1.8rem;
  height: 1.8rem;
}
.app .card-grow-half .attach-link,
.app .card-bottom-half .attach-link { font-size: var(--fs-xs); }

.app .budget-card .budget-field-date > span,
.app .budget-card .budget-field-kind > span {
  font-size: var(--fs-xs);
}
.app .budget-card .budget-field-date input,
.app .budget-card .budget-form input,
.app .budget-card .expense-kind-select-form {
  font-size: var(--fs-sm);
  padding: .28rem .4rem;
  min-height: 1.85rem;
}
.app .budget-card .budget-metric {
  padding: .32rem .4rem;
}
.app .budget-card .budget-metric span {
  font-size: var(--fs-xs);
}
.app .budget-card .budget-metric b {
  font-size: var(--fs-sm);
}
.app .budget-card .budget-sum-item {
  font-size: var(--fs-sm);
  gap: .4rem;
}
.app .budget-card .budget-spent-row {
  gap: .5rem;
  padding: .45rem .55rem;
}
.app .budget-card .expense-list-table,
.app .budget-card .expense-list-table th,
.app .budget-card .expense-list-table td {
  font-size: var(--fs-xs);
  padding: .3rem .38rem;
  line-height: 1.3;
}
.app .budget-card .expense-list-table td:nth-child(5),
.app .budget-card .expense-list-table th:nth-child(5) {
  white-space: nowrap;
  text-align: right !important;
}
.app .budget-card .expense-list-table .expense-kind-label {
  font-size: var(--fs-xs);
  padding: .1rem .3rem;
}
.app .budget-card .expense-list-table td:nth-child(1),
.app .budget-card .expense-list-table td:nth-child(6),
.app .budget-card .expense-list-table td:nth-child(7) {
  font-size: var(--fs-xs);
}
.app .budget-card .budget-amount-row .btn-sm,
.app .budget-card .budget-amount-row .file-mini-btn {
  font-size: var(--fs-xs);
  min-height: 1.85rem;
  height: 1.85rem;
  padding: 0 .5rem;
}
.app .budget-card .attach-link { font-size: var(--fs-xs); }
.app .budget-card .file-chip { font-size: var(--fs-xs); }
.app .budget-card .card-title { font-size: var(--fs-title); }
