/* Estilo Worldogs: mismos colores y tipografías que worldogs.com.ar */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F1EFE9;
  --text: #141414;
  --muted: #6B6B66;
  --line: #E7E5DF;
  --brand: #141414;
  --brand-text: #FFFFFF;
  --hero: #D8322A;
  --yellow: #FFC21A;
  --accent: #F5B700;
  --ok: #1E8A4C;
  --ok-soft: #E2F3E8;
  --warn: #D8322A;
  --warn-soft: #FBE3E1;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1C1B1A;
    --surface-2: #272523;
    --text: #F3F1EC;
    --muted: #A4A19A;
    --line: #34312E;
    --brand: #FFC21A;
    --brand-text: #141414;
    --hero: #B92A23;
    --ok: #56C489;
    --ok-soft: #1B3326;
    --warn: #FF7A6E;
    --warn-soft: #3A1E1B;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
#app { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }
h1, h2, h3 { font-family: "Inter Tight", "Inter", sans-serif; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-weight: 800; font-size: clamp(1.9rem, 6vw, 2.6rem); }
h2 { font-weight: 700; font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* Banda roja con el logo, como el header de la landing */
.band {
  background: var(--hero); color: #fff;
  margin: 0 -16px 20px; padding: calc(14px + env(safe-area-inset-top)) 16px 22px;
}
.band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.logo {
  display: inline-block; transform: rotate(-4deg);
  font-family: "Lilita One", "Inter Tight", sans-serif; font-size: 28px; letter-spacing: 0; color: #141414;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 2px 2px #fff, -2px -2px #fff, 2px -2px #fff, -2px 2px #fff;
}
.band h1 { margin-top: 18px; color: #fff; }
.band h1 em { font-style: normal; background: var(--yellow); color: #141414; padding: 0 .14em; border-radius: .12em; }
.band .sub { color: rgb(255 255 255 / .85); margin-top: 6px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.band .out { background: transparent; color: #fff; border: 2px solid #fff; min-height: 38px; padding: 0 16px; }
.band .out:hover { background: #fff; color: var(--hero); }

button, .btn {
  font: 600 15px/1 "Inter", sans-serif; cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); border-radius: 999px; padding: 0 18px; min-height: 44px; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  transition: transform .15s, background .15s;
}
button:active, .btn:active { transform: scale(.97); }
button:hover { border-color: var(--muted); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.primary { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.primary:hover { border-color: var(--brand); filter: brightness(1.15); }
.accent { background: var(--yellow); color: #141414; border-color: var(--yellow); }
.ghost { background: transparent; border-color: transparent; }
.danger { color: var(--warn); }
.wa { background: #1F8F4E; color: #fff; border-color: #1F8F4E; }
.icon-btn { min-width: 44px; padding: 0; font-size: 1.3rem; }
button:disabled { opacity: .55; cursor: default; }

label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 10px 14px; border-radius: 12px; min-height: 46px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
textarea { min-height: 76px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--hero); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.pop { border: 2px solid var(--text); box-shadow: 6px 6px 0 var(--text); }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }

/* Login */
.center { display: grid; place-items: center; padding-top: 8px; }
.login { width: 100%; max-width: 440px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.person { flex-direction: column; min-height: 104px; border-radius: var(--radius); white-space: normal; gap: 8px; }
.person:hover { border-color: var(--text); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--yellow); color: #141414; font: 400 18px/1 "Lilita One", sans-serif;
}
.pin-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; }

/* Progreso */
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--hero); border-radius: 99px; transition: width .3s; }
.big-num { font: 800 2.2rem/1 "Inter Tight", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Lista de tareas */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.tick {
  flex: none; width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--text); padding: 0;
  background: var(--surface); font-size: 1.4rem; color: transparent;
}
.task.done .tick { background: var(--yellow); border-color: #141414; color: #141414; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.title { font-weight: 600; }
.meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; align-items: center; }
.pill { display: inline-block; font: 500 11px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 2px solid var(--text); cursor: zoom-in; flex: none; padding: 0; }

.emp-tasks .task { padding: 10px 0; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--line); }
.done .status-dot { background: var(--ok); }

.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { margin: 0; }
.days input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.days span { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.days input:checked + span { background: var(--yellow); color: #141414; border-color: #141414; }
.days input:focus-visible + span { outline: 3px solid var(--accent); }

/* Historial */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font: 500 11px/1.2 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; }

/* Modal */
dialog { border: 2px solid var(--text); border-radius: 22px; padding: 0; width: min(560px, calc(100% - 24px)); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgb(20 20 20 / .55); }
.modal-body { padding: 22px; max-height: 85vh; overflow-y: auto; }
.photo-full { width: 100%; border-radius: 14px; display: block; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: #141414; color: #fff; padding: 12px 20px; border-radius: 999px;
  transition: .25s; pointer-events: none; max-width: calc(100% - 32px); font-weight: 600; z-index: 10;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.error { background: var(--hero); }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.celebrate { text-align: center; padding: 14px; border-radius: 14px; background: var(--yellow); color: #141414; font-weight: 700; }
