* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card2: #22262f;
  --line: #2c313b;
  --text: #f2f4f8;
  --muted: #8b93a3;
  --primary: #ff6a3d;
  --primary-dark: #e0552b;
  --accent: #4dabf7;
  --ok: #38d39f;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

.screen { min-height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

.content {
  padding: 16px;
  padding-bottom: 120px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar h1 { font-size: 20px; font-weight: 700; }
.back {
  background: none; border: none; color: var(--accent);
  font-size: 17px; cursor: pointer; padding: 4px 0;
}

/* Buttons */
.btn {
  border: none; border-radius: 14px; font-size: 17px; font-weight: 600;
  cursor: pointer; padding: 14px 18px; width: 100%; transition: transform .05s, background .15s;
  color: var(--text);
}
.btn:active { transform: scale(0.985); }
.btn-big { font-size: 19px; padding: 18px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-ghost { background: var(--card2); color: var(--text); }
#newDayBtn { margin-bottom: 12px; }
#progressBtn { margin-bottom: 8px; }

/* Login */
.login-box {
  margin: auto; text-align: center; padding: 24px; max-width: 360px; width: 100%;
}
.login-box h1 { font-size: 30px; margin-bottom: 6px; }
.pass-input {
  width: 100%; margin: 20px 0 16px; padding: 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 30px; text-align: center; letter-spacing: 10px;
}
.pass-input:focus { outline: 2px solid var(--primary); }
.error { color: #ff5b5b; margin-top: 12px; }

/* Section title */
.section-title {
  font-size: 15px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin: 24px 0 12px;
}

/* Days list */
.days-list { display: flex; flex-direction: column; gap: 10px; }
.day-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.day-card:active { background: var(--card2); }
.day-card .date { font-weight: 700; font-size: 18px; }
.day-card .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.day-card .chev { color: var(--muted); font-size: 22px; }

/* Exercise list */
.exercise-list { display: flex; flex-direction: column; gap: 14px; }
.exercise {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.exercise .name { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.exercise .prev { color: var(--accent); font-size: 13px; margin-bottom: 12px; min-height: 16px; }
.exercise .prev.none { color: var(--muted); }
.sets { display: flex; gap: 12px; }
.set-field { flex: 1; }
.set-field label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.set-field input {
  width: 100%; padding: 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 22px; text-align: center; font-weight: 700;
}
.set-field input:focus { outline: 2px solid var(--primary); background: #2a2f3a; }

.sticky-save {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px;
  max-width: 528px; width: calc(100% - 32px); z-index: 20;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.sticky-save:active { transform: translateX(-50%) scale(0.985); }

/* Select */
.select {
  width: 100%; padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 18px; font-weight: 600; margin-bottom: 20px;
  -webkit-appearance: none; appearance: none;
}

/* Gelişim - her hareket bir kart */
.progress-list { display: flex; flex-direction: column; gap: 16px; }
.progress-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 12px 8px;
}
.pc-title { font-weight: 700; font-size: 17px; margin: 0 4px 8px; }
.pc-empty { padding: 24px 0; font-size: 15px; }
.chart-svg { display: block; width: 100%; height: auto; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 24px;
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; max-width: 360px; width: 100%; text-align: center;
}
.modal p { font-size: 18px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ok); color: #04261c; padding: 12px 20px; border-radius: 999px;
  font-weight: 700; z-index: 200; box-shadow: 0 6px 18px rgba(0,0,0,.4);
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
