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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f0;
  color: #1a1a1a;
  font-size: 15px;
}

.hidden { display: none !important; }

.screen { min-height: 100vh; }

.login-box {
  max-width: 360px;
  margin: 15vh auto 0;
  background: white;
  border-radius: 12px;
  border: 0.5px solid #ddd;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box h1 { font-size: 22px; font-weight: 500; }
.login-box .subtitle { font-size: 13px; color: #888; margin-top: -6px; }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 9px 12px;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

input[type="text"]:focus, input[type="password"]:focus {
  border-color: #639922;
}

button {
  padding: 9px 16px;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  color: #1a1a1a;
}

button:hover { background: #f0f0ea; }

.error { color: #c0392b; font-size: 13px; }
.result-msg { font-size: 13px; margin-top: 10px; }

header {
  background: white;
  border-bottom: 0.5px solid #ddd;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 { font-size: 18px; font-weight: 500; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #888;
}

nav {
  background: white;
  border-bottom: 0.5px solid #ddd;
  padding: 0 1.5rem;
  display: flex;
  gap: 4px;
}

.nav-btn {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: #888;
}

.nav-btn:hover { background: #f5f5f0; color: #1a1a1a; }
.nav-btn.active { border-bottom-color: #639922; color: #27500A; font-weight: 500; }

main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }

.card {
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 { font-size: 15px; font-weight: 500; margin-bottom: 1rem; color: #444; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}

.metric {
  background: #f5f5f0;
  border-radius: 8px;
  padding: 14px 16px;
}

.metric-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.metric-value { font-size: 22px; font-weight: 500; }
.metric-sub { font-size: 11px; color: #aaa; margin-top: 2px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  padding: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 0.5px solid #ddd;
}

td {
  padding: 8px 0;
  border-bottom: 0.5px solid #f0f0ea;
}

tr:last-child td { border-bottom: none; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 0.5px solid #f0f0ea;
  font-size: 13px;
}

.bar-row:last-child { border-bottom: none; }

.bar-name { width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-wrap { flex: 1; height: 6px; background: #f0f0ea; border-radius: 3px; }
.bar-fill { height: 6px; border-radius: 3px; background: #639922; }
.bar-amount { width: 70px; text-align: right; font-weight: 500; }
.bar-pct { width: 36px; text-align: right; color: #888; font-size: 12px; }

.help-text { font-size: 13px; color: #888; margin-bottom: 1rem; }

.import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="file"] { font-size: 13px; }
