* { box-sizing: border-box; }
body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1a1a1a;
}
header.topbar {
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header.topbar .brand { font-weight: bold; }
header.topbar nav a {
  color: #cbd5e1;
  text-decoration: none;
  margin-right: 16px;
}
header.topbar nav a:hover { color: #fff; }
header.topbar form { display: inline; }
header.topbar button {
  background: none;
  border: 1px solid #64748b;
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
main { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; }
h2 { font-size: 18px; margin-top: 28px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-bottom: 16px;
}
th, td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
}
th { background: #f1f5f9; }
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}
form.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
label { display: block; font-size: 12px; color: #475569; margin-bottom: 4px; }
input, select, textarea {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
}
button, .btn {
  padding: 7px 14px;
  border-radius: 4px;
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary { background: #64748b; }
button.danger, .btn.danger { background: #dc2626; }
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: #e2e8f0;
}
.status.approved, .status.received, .status.payment_approved, .status.converted { background: #dcfce7; color: #166534; }
.status.pending_approval, .status.submitted, .status.pending { background: #fef9c3; color: #854d0e; }
.status.rejected { background: #fee2e2; color: #991b1b; }
.badge {
  display: inline-block;
  min-width: 16px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  background: #dc2626;
  color: #fff;
  text-align: center;
}
.error { color: #dc2626; margin-bottom: 12px; }
.notice { color: #166534; margin-bottom: 12px; }
.diff-warn { color: #dc2626; font-weight: bold; }
