/* ============================================================
   ActivaBooth - Shared design tokens & base styles
   ============================================================ */

:root {
  --bg:          #0d0d0d;
  --surface:     #161616;
  --surface2:    #1f1f1f;
  --border:      #2a2a2a;
  --accent:      #ff0000;
  --accent-dim:  rgba(255,0,0,.15);
  --text:        #f0f0f0;
  --text-muted:  #888;
  --green:       #22c55e;
  --yellow:      #facc15;
  --red:         #ef4444;
  --radius:      12px;
  --radius-sm:   8px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --transition:  .2s ease;
  --bp-sm:       480px;
  --bp-md:       768px;
  --bp-lg:       1024px;
  --bp-xl:       1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 44px;
  max-width: 100%;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: .85; }

.btn-outline  { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn-ghost    { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

.btn-full { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-done       { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-processing { background: rgba(250,204,21,.15); color: var(--yellow); }
.badge-queued     { background: rgba(255,255,255,.07); color: var(--text-muted); }
.badge-error      { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-canceled   { background: rgba(148,163,184,.16); color: var(--text-muted); }
.badge-active     { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-paused     { background: rgba(250,204,21,.15); color: var(--yellow); }
.badge-inactive   { background: rgba(255,255,255,.07); color: var(--text-muted); }

/* ---------- Input ---------- */
.input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem 1rem;
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition);
}
.input:focus   { border-color: var(--accent); }
.input::placeholder { color: var(--text-muted); }

/* ---------- Spinner ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

/* ---------- Progress bar ---------- */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .5s ease;
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1.25rem;
  font-size: .9rem;
  white-space: nowrap;
  transition: transform .3s ease;
  z-index: 999;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--red); color: var(--red); }

/* ---------- Utility ---------- */
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-center  { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.gap-1 { gap: .5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
