/* Reservas de barberías — estilo de la landing de Kime AI (kimeai.top) */
:root {
  --bg: #08090b;
  --surface: #0e1211;
  --surface-2: #131918;
  --border: #1d2625;
  --text: #eef2f1;
  --muted: #9aa5a2;
  --mint: #2dd4a0;
  --mint-ink: #08090b;
  --mint-soft: rgba(45, 212, 160, 0.12);
  --warn: #f0b44c;
  --bad: #ef6b5b;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --radius: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(45, 212, 160, 0.10), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--mint); }
.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px; }
.accent { color: var(--mint); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mono { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; }

/* Barra superior */
.topbar { border-bottom: 1px solid var(--border); background: rgba(8, 9, 11, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.account { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* Encabezado de la barbería */
.eyebrow { font-family: var(--font-mono); font-size: .78rem; color: var(--mint); display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; margin: 0 0 6px; letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: 1rem; margin: 0 0 12px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
h2 .num { font-family: var(--font-mono); font-size: .75rem; color: var(--mint); background: var(--mint-soft); border-radius: 6px; padding: 2px 7px; }
.foot { color: var(--muted); font-size: .85rem; text-align: center; padding-bottom: 40px; }
.foot a { color: var(--text); text-decoration: none; font-weight: 700; }

.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 14px; }

/* Opciones (servicios y barberos) */
.options { display: grid; gap: 8px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); font: inherit; color: inherit; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option:hover { border-color: #2e3b39; }
.option[aria-pressed="true"] { border-color: var(--mint); background: var(--mint-soft); }
.option .price { font-weight: 700; white-space: nowrap; color: var(--mint); }

/* Días y horas */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: .92rem; cursor: pointer; text-align: center; min-width: 66px;
}
.chip small { display: block; color: var(--muted); font-size: .74rem; }
.chip:hover { border-color: #2e3b39; }
.chip[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); font-weight: 700; }
.chip[aria-pressed="true"] small { color: #0b3b2c; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.times .chip { min-width: 0; white-space: nowrap; font-size: .86rem; padding: 10px 6px; }

/* Formularios */
label { display: block; font-size: .86rem; color: var(--muted); margin: 12px 0 5px; }
input[type=text], input[type=tel], input[type=password], input[type=date] {
  width: 100%; padding: 12px 13px; font: inherit; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); outline: none;
}
input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
input.pin { font-family: var(--font-mono); letter-spacing: .5em; font-size: 1.1rem; }
.radio { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.radio label { margin: 0; color: var(--text); font-size: .95rem; }
input[type=radio] { accent-color: var(--mint); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; }
.tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 9px; border-radius: 9px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }

.btn {
  display: inline-block; width: 100%; margin-top: 16px; padding: 14px 18px; border-radius: 999px; border: 0;
  background: var(--mint); color: var(--mint-ink); font: inherit; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
  box-shadow: 0 8px 24px rgba(45, 212, 160, .18);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.small { width: auto; margin: 0; padding: 7px 13px; font-size: .84rem; font-weight: 600; box-shadow: none; }
.btn.link { background: none; border: 0; color: var(--muted); width: auto; margin: 0; padding: 4px 0; box-shadow: none; font-weight: 500; text-decoration: underline; }

.error { color: var(--bad); margin: 10px 0 0; font-size: .92rem; }
.notice { background: var(--mint-soft); border: 1px solid rgba(45, 212, 160, .3); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }
.summary dt { color: var(--muted); font-size: .82rem; }
.summary dd { margin: 0 0 10px; font-weight: 600; }
.recap { margin-top: 14px; font-size: .92rem; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.confirmada, .badge.completada, .badge.pagado { background: var(--mint-soft); color: var(--mint); border-color: transparent; }
.badge.pendiente_pago, .badge.pendiente, .badge.conflicto { background: rgba(240, 180, 76, .12); color: var(--warn); border-color: transparent; }
.badge.cancelada, .badge.expirada, .badge.no_asistio, .badge.fallido { background: rgba(239, 107, 91, .12); color: var(--bad); border-color: transparent; }

/* Mis citas (cliente) */
.mini-appt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.mini-appt:first-of-type { border-top: 0; }

/* Calendario del panel */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head strong { font-size: 1.1rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dow { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.day {
  position: relative; height: 54px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.day:hover { background: var(--surface-2); }
.day.out { color: #3b4644; }
.day.today { border-color: var(--border); font-weight: 700; }
.day.selected { background: var(--mint-soft); border-color: var(--mint); }
.day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.day .count { font-family: var(--font-mono); font-size: .62rem; color: var(--mint); line-height: 1; }

/* Lista de citas del panel */
.day-group { margin-top: 18px; scroll-margin-top: 80px; }
.day-group h3 { font-size: .8rem; font-family: var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; font-weight: 500; }
.day-group.selected h3 { color: var(--mint); }
.appt { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 8px; }
.appt .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.appt .time { font-weight: 700; }
.appt .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; }
.stats b { color: var(--mint); }

/* Panel en vivo: indicador, citas recién llegadas y avisos */
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .76rem; color: var(--mint); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45, 212, 160, .6); } 50% { opacity: .6; box-shadow: 0 0 0 6px rgba(45, 212, 160, 0); } }
.appt.fresh { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 20;
  background: var(--surface-2); border: 1px solid var(--mint); color: var(--text); border-radius: 14px;
  padding: 12px 16px; max-width: min(92vw, 520px); font-size: .92rem; box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.cal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-actions .btn { flex: 1; min-width: 150px; }
