@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Mono:wght@500&display=swap');

:root {
  --bg:      #0f0f14;
  --surface: #1a1a22;
  --border:  #2e2e3c;
  --text:    #f2f2f5;
  --muted:   #8888a0;
  --green:   #198754;
  --blue:    #0d6efd;
  --red:     #dc3545;
  --amber:   #ffc107;
  --violet:  #6c63f5;
  --pink:    #e91e8c;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

.page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px;
  overflow: hidden;
}

.top-bar {
  flex-shrink: 0;
  padding-bottom: 10px;
}

.top-bar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Buttons ───────────────────────── */
button {
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  border: none;
  cursor: pointer;
  transition: filter 0.1s;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  padding: 14px 20px;
  width: 100%;
  text-align: center;
}

button:active  { filter: brightness(0.85); }
button:disabled { opacity: 0.4; cursor: default; }

.btn-primary   { background: var(--blue);   color: #fff; }
.btn-success   { background: var(--green);  color: #fff; }
.btn-danger    { background: var(--red);    color: #fff; }
.btn-warning   { background: var(--amber);  color: #000; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* legacy aliases used in older pages */
.btn-green  { background: var(--green);  color: #fff; border-radius: 10px; padding: 14px 20px; font-size: 1rem; font-weight: 600; width: 100%; }
.btn-pink   { background: #c2185b;       color: #fff; border-radius: 10px; padding: 14px 20px; font-size: 1rem; font-weight: 600; width: 100%; }
.btn-amber  { background: var(--amber);  color: #000; border-radius: 10px; padding: 14px 20px; font-size: 1rem; font-weight: 600; width: 100%; }

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
  width: auto;
}

/* ── Card ──────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

/* ── Typography helpers ────────────── */
.label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.mono {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
}

.muted       { color: var(--muted); }
.text-center { text-align: center; }
.hidden      { display: none !important; }

/* ── Range input ───────────────────── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--blue);
  border-radius: 50%;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--blue);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ── Text inputs ───────────────────── */
input[type=text], input[type=time], textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 14px;
  width: 100%;
  outline: none;
}

input[type=text]:focus, input[type=time]:focus, textarea:focus {
  border-color: var(--blue);
}

textarea {
  resize: none;
}
