* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  background: #f5f6f8;
  color: #1a1a1a;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  background: #1f2937;
  color: #fff;
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
}

.topbar nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

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

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.date-form {
  display: flex;
  gap: 8px;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stock-table th,
.stock-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}

.stock-table th {
  background: #f0f1f3;
  font-weight: 600;
}

.stock-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rename-form {
  display: flex;
  gap: 6px;
}

.rename-form input {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 160px;
}

.rename-form button {
  padding: 4px 10px;
  font-size: 13px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.stock-table td.stock-critical {
  color: #dc2626;
  font-weight: 700;
}

.topbar nav {
  display: flex;
  gap: 16px;
  flex: 1;
}

.logout-form {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.login-link {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid #6b7280;
  padding: 4px 10px;
  border-radius: 4px;
}

.logout-form button {
  padding: 4px 10px;
  font-size: 13px;
  background: transparent;
  color: #fff;
  border: 1px solid #6b7280;
  border-radius: 4px;
  cursor: pointer;
}

.login-page {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #4b5563;
}

.login-form input {
  padding: 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.login-form button {
  padding: 10px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.alert-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.tx-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: #fff;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tx-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #4b5563;
}

.tx-form input,
.tx-form select {
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.alert-closed,
.alert-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-closed {
  background: #e5e7eb;
  color: #374151;
}

.alert-open {
  background: #fef3c7;
  color: #92400e;
}

.alert-closed button,
.alert-open button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  background: #1f2937;
  color: #fff;
}

.tx-form button {
  padding: 8px 16px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
