:root {
  --ink: #1d2433;
  --line: #d7deea;
  --card: #ffffff;
  --bg: linear-gradient(140deg, #eef5ff 0%, #f8f3ec 100%);
  --brand: #0f766e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* --- Top bar --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: #1d2433;
  color: #fff;
  font-size: .92rem;
}
.topbar-actions a.logout {
  color: #cdd5e0;
  text-decoration: none;
  font-size: .85rem;
}
.topbar-actions a.logout:hover { color: #fff; }

/* --- Login page --- */
.login-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}
.auth-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 28px 32px;
  width: min(380px, 92vw);
}
.auth-card h2 { margin-top: 0; }
.auth-card .form-grid { grid-template-columns: 100px 1fr; }
.auth-card button { width: 100%; margin-top: 8px; background: var(--brand); color: #fff; font-weight: 600; }
.error { color: #991b1b; font-size: .88rem; margin-bottom: 8px; }
.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.muted { color: #5b6470; line-height: 1.45; }

.shell {
  width: min(1100px, 94vw);
  margin: 20px auto 32px;
  display: grid;
  gap: 12px;
}

.hero {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 10px;
}

input, select, button {
  border: 1px solid #c8d4e8;
  border-radius: 8px;
  padding: 8px;
}

button {
  background: #eff7ff;
  cursor: pointer;
}

table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }

.cart-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  background: #26303e;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 840px) {
  .form-grid { grid-template-columns: 1fr; }
}
