/* Elyzea · Asistencia — styles. The calendar's default tokens (calendar/styles.css), trimmed to
   a one-column phone app: the staff mark from their own phone, so every target is thumb-sized. */

@font-face {
  font-family: "Jura";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jura-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jura";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jura-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-ivory: #F5F0EB;
  --color-linen: #EDE8E2;
  --color-gold: #C5A572;
  --color-gold-dark: #7D6230;
  --color-dark: #2D2D2D;
  --color-muted: #6B6459;
  --color-danger: #B3261E;
  --color-ok: #2E7D32;

  --bg: var(--color-ivory);
  --bg-image: radial-gradient(1100px 520px at 100% -8%, rgba(197,165,114,.20), transparent 62%),
              radial-gradient(900px 480px at -8% 108%, rgba(197,165,114,.12), transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F9F6F2;
  --text: var(--color-dark);
  --text-muted: var(--color-muted);
  --border: #ECE5DC;
  --input-border: #D9CFC2;
  --accent: var(--color-gold);
  --accent-hover: #D2B686;
  --accent-contrast: var(--color-dark);
  --accent-soft: rgba(197,165,114,.40);
  --topbar-bg: linear-gradient(100deg, #23201D 0%, #37312B 100%);

  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(35,28,20,.06);
  --shadow-md: 0 1px 2px rgba(35,28,20,.05), 0 8px 24px rgba(35,28,20,.08);
  --shadow-lg: 0 2px 6px rgba(35,28,20,.08), 0 24px 60px rgba(35,28,20,.22);
  --focus-ring: 0 0 0 3px var(--accent-soft);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Jura", var(--font-ui);

  font-family: var(--font-ui);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background-color: var(--bg); background-image: var(--bg-image); background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.error { color: var(--color-danger); min-height: 1.2em; font-size: .92rem; margin: 0; }
h2, h3 { font-family: var(--font-brand); font-weight: 600; letter-spacing: .03em; margin: 0 0 .6rem; }
h3 { font-size: 1rem; }

button {
  font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.2;
  cursor: pointer; border: 1px solid transparent; border-radius: var(--radius-md);
  padding: .7rem 1rem; min-height: 46px;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
@keyframes spin { to { transform: rotate(360deg); } }
button.is-loading { opacity: .75; cursor: progress; pointer-events: none; }
button.is-loading::before {
  content: ""; display: inline-block; width: .85em; height: .85em; margin-right: .45em; vertical-align: -.12em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .6s linear infinite;
}
button.primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-sm); font-weight: 600; }
button.primary:hover { background: var(--accent-hover); }
button.ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
button.ghost:hover { color: var(--text); border-color: var(--text-muted); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus-ring); }

input, select {
  font: inherit; font-size: 1rem; color: var(--text); width: 100%;
  background-color: var(--surface); border: 1px solid var(--input-border); border-radius: var(--radius-md);
  padding: .6rem .7rem; min-height: 46px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238A8178' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; }
input:focus, select:focus { border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--text-muted); }

/* ── Screens before the app (login, password, notice) ─────────────────────── */
.screen { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 1.25rem; margin: 0 0 1rem;
}
.card.narrow { width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: .8rem; padding: 2rem 1.6rem; box-shadow: var(--shadow-lg); }
.card.narrow p { margin: 0; line-height: 1.45; }
.brand { font-family: var(--font-brand); font-size: 1.9rem; font-weight: 600; letter-spacing: .32em; text-align: center; margin: 0; padding-left: .32em; }
.brand-sub { text-align: center; color: var(--text-muted); margin: 0 0 .8rem !important; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }

/* ── App ───────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .8rem;
  padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top));
  background: var(--topbar-bg); color: #fff;
}
.brand-small { font-family: var(--font-brand); white-space: nowrap; letter-spacing: .18em; }
.brand-tag { margin-left: .6rem; color: #D3CCC2; letter-spacing: .08em; font-size: .85rem; }
.who { flex: 1; text-align: right; color: #D3CCC2; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .ghost { color: #D3CCC2; border-color: rgba(255,255,255,.2); min-height: 38px; padding: .4rem .8rem; }

.tabs { display: flex; gap: .4rem; padding: .7rem 1rem 0; max-width: 720px; margin: 0 auto; }
.tab { flex: 1; background: transparent; color: var(--text-muted); border-color: var(--border); }
.tab.active { background: var(--surface); color: var(--text); border-color: var(--accent); box-shadow: var(--shadow-sm); }
main { max-width: 720px; margin: 0 auto; padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.fecha { margin: 0; color: var(--text-muted); }
.reloj { font-family: var(--font-brand); font-size: 3rem; font-weight: 600; margin: .2rem 0 .4rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
#horario { margin: 0 0 1.2rem; }
button.marcar {
  display: block; width: 100%; min-height: 96px; font-size: 1.35rem; font-weight: 700; letter-spacing: .02em;
  background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-md); border-radius: 20px;
}
button.marcar.salida { background: var(--color-dark); color: #fff; }
button.small-btn { margin-top: .8rem; min-height: 40px; font-size: .9rem; }
.msg { min-height: 1.3em; margin: 1rem 0 0; font-weight: 500; }
.msg.error { color: var(--color-danger); }
.msg.ok { color: var(--color-ok); }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: .55rem 0; border-top: 1px solid var(--border); }
.lista li:first-child { border-top: none; }

.row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-bottom: .8rem; }
.row label { flex: 1 1 160px; }
.row button { flex: 1 1 200px; }
.table-wrap { overflow-x: auto; margin: 0 -.25rem 1rem; }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th, .tabla td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabla th { color: var(--text-muted); font-weight: 500; font-size: .8rem; }
.tabla td.warn { color: var(--color-danger); }

.toast {
  position: fixed; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--color-dark); color: #fff; padding: .7rem 1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-width: calc(100% - 2rem); z-index: 50;
}
