@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --accent: #e0607a;
  --accent-dark: #c44a63;
  --bg: #fdf7f6;
  --card: #ffffff;
  --text: #2c2630;
  --text-muted: #7a7079;
  --border: #f0e2e5;
  --green-bg: #e6f4ea;
  --green-fg: #1e7a34;
  --yellow-bg: #fff6df;
  --yellow-fg: #a06a00;
  --red-bg: #fdecea;
  --red-fg: #c0392b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: 72px;
}

a {
  color: var(--accent-dark);
}

button {
  font-family: inherit;
}

.app-header {
  padding: 18px 16px 10px;
  background: var(--bg);
}

.app-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 2px;
}

.app-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

main {
  padding: 8px 16px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.day-selector {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.day-selector button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.day-selector button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.card .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.chip.green {
  background: var(--green-bg);
  color: var(--green-fg);
}

.chip.yellow {
  background: var(--yellow-bg);
  color: var(--yellow-fg);
}

.chip.red {
  background: var(--red-bg);
  color: var(--red-fg);
}

.sets-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.set-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.set-row span {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.set-row input {
  width: 100%;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: #fffdfd;
}

.cardio-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cardio-row input {
  width: 90px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  margin-top: 12px;
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.small {
  width: auto;
  padding: 9px 14px;
  font-size: 13px;
  margin-top: 0;
}

nav.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}

nav.tabbar button {
  flex: 1;
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 2px;
  border-radius: 10px;
  font-weight: 500;
}

nav.tabbar button.active {
  color: var(--accent-dark);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.symptom-row {
  margin-bottom: 14px;
}

.symptom-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="range"] {
  width: 100%;
}

.range-value {
  font-size: 13px;
  color: var(--text-muted);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

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

table.simple th,
table.simple td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

table.simple th:first-child,
table.simple td:first-child {
  text-align: left;
}

.check-ok {
  color: var(--green-fg);
  font-weight: 700;
}

.check-pending {
  color: var(--text-muted);
}

.guide-section {
  margin-bottom: 18px;
}

.guide-section h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.guide-section ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.guide-warning {
  background: var(--red-bg);
  color: var(--red-fg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
}

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.show {
  opacity: 1;
}

canvas {
  max-width: 100%;
}

select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  background: white;
}

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

.login-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.login-card img {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
}

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

.login-card input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  margin-bottom: 12px;
  font-family: inherit;
}

.login-error {
  color: var(--red-fg);
  font-size: 13px;
  margin-top: 8px;
  min-height: 16px;
}
