:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c1f26;
  --muted: #6b7280;
  --border: #e2e5ea;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

header.topbar nav a {
  margin-right: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

header.topbar nav a.active,
header.topbar nav a:hover {
  color: var(--primary);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

h1, h2, h3 { margin-top: 0; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

input, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

input:disabled, select:disabled {
  background: #f0f1f3;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-row .field { flex: 1; margin-bottom: 0; }

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

button.primary { background: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-hover); }

button.secondary { background: #eef0f3; color: var(--text); }
button.secondary:hover { background: #e2e5ea; }

button.danger { background: #fdecea; color: var(--danger); }
button.danger:hover { background: #fbd7d3; }

button.icon {
  background: transparent;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
button.icon:hover { color: var(--primary); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 600; }

.result-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px;
}

.result-box .price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.error-msg {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 8px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 320px;
}
