:root {
  --color-high: #d9534f;
  --color-mid: #f0ad4e;
  --color-low: #5cb85c;
  --color-border: #ddd;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  margin: 0;
  padding: 0;
  color: #222;
  background: #fafafa;
}

header {
  background: #2c3e50;
  color: #fff;
  padding: 16px 24px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 20px;
}

.subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  color: #cbd5e0;
}

nav a {
  color: #cbd5e0;
  text-decoration: none;
  margin-right: 16px;
  padding-bottom: 4px;
}

nav a.active {
  color: #fff;
  border-bottom: 2px solid #fff;
}

main {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

section {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.empty-row {
  color: #888;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
}

.badge.high { background: var(--color-high); }
.badge.mid { background: var(--color-mid); }
.badge.low { background: var(--color-low); }

.status {
  font-size: 13px;
  min-height: 1.2em;
}

.status.error {
  color: var(--color-high);
}

.status.success {
  color: var(--color-low);
}

.breakdown-row td {
  background: #f7f7f7;
}

.breakdown-table {
  width: 100%;
  margin: 8px 0;
  font-size: 13px;
}

.breakdown-table th, .breakdown-table td {
  padding: 4px 8px;
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 16px;
}

fieldset label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  gap: 12px;
}

fieldset input {
  max-width: 160px;
}

button {
  background: #2c3e50;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 8px;
}

button:hover {
  background: #1a242f;
}

tr.customer-row {
  cursor: pointer;
}
