/* ClockIn – estilos compartidos. Creado por Denis. Paleta de Smart Consulting. */
:root {
  --navy: #0B2D4A; --blue: #1E6FB6; --teal: #2EC4B6; --gray: #F4F7FA; --white: #fff;
  --ink: #12243a; --muted: #5d6f82; --line: #dde5ee;
  --ok: #1f9d6b; --warn: #e0912b; --bad: #d4493f; --info: #1E6FB6;
  --radius: 14px; --shadow: 0 1px 2px rgba(11,45,74,.06), 0 6px 18px rgba(11,45,74,.07);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--gray); font-size: 15px; line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; color: var(--navy); }
h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--navy); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; } .row.between { justify-content: space-between; }
.grid { display: grid; gap: 1rem; } .g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.stat { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1.1rem; }
.stat b { display: block; font-size: 1.8rem; color: var(--navy); line-height: 1.1; } .stat span { color: var(--muted); font-size: .82rem; }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 10px; padding: .6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; background: var(--blue); color: #fff; text-decoration: none; }
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn.alt { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); } .btn.teal { background: var(--teal); color: var(--navy); } .btn.sm { padding: .3rem .7rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .85rem; margin: .7rem 0 .25rem; color: var(--navy); }
input, select, textarea { width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
input[type=checkbox] { width: auto; margin-right: .4rem; }
.check { display: flex; align-items: center; font-weight: 500; margin: .35rem 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.alert { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; background: #e7f6ef; color: #146346; border: 1px solid #bfe6d4; }
.alert.err { background: #fdeceb; color: #8d2a23; border-color: #f4c4c0; } .alert.warn { background: #fff4e2; color: #7a4c0c; border-color: #f2d6a4; }

/* Tablas e insignias */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #eaf0f6; color: var(--navy); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; } tr:hover td { background: #fafcfe; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 700; background: #e6edf4; color: var(--navy); }
.badge.ok { background: #dff3ea; color: #146346; } .badge.warn { background: #fdeccd; color: #7a4c0c; } .badge.bad { background: #fbdcd9; color: #8d2a23; } .badge.info { background: #dcebf8; color: #14558f; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); margin-right: .35rem; } .dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

/* Gestión / Clientes: barra lateral */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #cfe0f0; padding: 1.2rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; font-weight: 800; font-size: 1.15rem; padding: .2rem .6rem 1rem; } .side .brand small { display: block; font-weight: 500; color: var(--teal); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.side a { display: block; color: #cfe0f0; padding: .55rem .7rem; border-radius: 9px; font-weight: 500; } .side a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.side a.on { background: var(--blue); color: #fff; } .side .sep { margin: 1rem .7rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7f9bb6; }
.side .user { margin-top: 1.5rem; padding: .7rem; font-size: .82rem; border-top: 1px solid rgba(255,255,255,.12); }
.main { padding: 1.6rem 2rem 3rem; max-width: 1280px; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 1.2rem; }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .main { padding: 1rem; } }

/* ClockIn Equipo: app del celular */
body.app { background: #e9eef4; }
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--gray); position: relative; padding-bottom: 84px; }
.app-head { background: linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; padding: 1.2rem 1.2rem 3.2rem; border-radius: 0 0 26px 26px; }
.app-head small { opacity: .8; } .app-head h1 { color: #fff; font-size: 1.35rem; margin: .1rem 0; }
.pull { margin: -2.4rem 1rem 1rem; }
.app-body { padding: 1rem; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); padding: .35rem .2rem calc(.35rem + env(safe-area-inset-bottom)); z-index: 5; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--muted); font-size: .7rem; font-weight: 600; padding: .35rem 0; border-radius: 10px; } .tabbar a:hover { text-decoration: none; }
.tabbar a.on { color: var(--blue); background: #eaf2fb; } .tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.big-clock { font-size: 3.2rem; font-weight: 800; color: var(--navy); text-align: center; letter-spacing: -.02em; line-height: 1; }
.mark-btn { width: 100%; padding: 1.15rem; font-size: 1.15rem; border-radius: 16px; }
.zone { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 12px; background: #eef2f6; }
.zone.in { background: #dff3ea; color: #146346; } .zone.out { background: #fdeccd; color: #7a4c0c; } .zone.err { background: #fbdcd9; color: #8d2a23; }
.tile { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .4rem; background: #fff; border-radius: 14px; box-shadow: var(--shadow); color: var(--navy); font-weight: 600; font-size: .82rem; text-align: center; } .tile:hover { text-decoration: none; background: #f3f8fd; }
.tile svg { width: 26px; height: 26px; stroke: var(--blue); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.list > * { background: #fff; padding: .8rem 1rem; border-bottom: 1px solid var(--line); } .list > *:first-child { border-radius: 14px 14px 0 0; } .list > *:last-child { border-radius: 0 0 14px 14px; border-bottom: 0; } .list > *:only-child { border-radius: 14px; }
.bars { display: flex; gap: .4rem; align-items: flex-end; height: 90px; } .bars div { flex: 1; text-align: center; font-size: .72rem; color: var(--muted); } .bars i { display: block; background: var(--blue); border-radius: 6px 6px 3px 3px; min-height: 3px; margin-bottom: .25rem; } .bars .today i { background: var(--teal); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; } .cal div { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: .78rem; font-weight: 700; background: #e6edf4; color: var(--muted); }
.cal .w { background: var(--blue); color: #fff; } .cal .miss { background: var(--bad); color: #fff; } .cal .late { background: var(--warn); color: #fff; } .cal .hd { background: none; aspect-ratio: auto; color: var(--muted); font-size: .7rem; } .cal .today { outline: 2px solid var(--navy); }
.modal { position: fixed; inset: 0; background: rgba(11,45,74,.55); display: none; align-items: flex-end; justify-content: center; z-index: 20; } .modal.show { display: flex; }
.modal .sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 1.2rem; }
.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; z-index: 30; box-shadow: var(--shadow); max-width: 92%; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }

/* Tablet en modo kiosco */
body.kiosk { background: linear-gradient(160deg, var(--navy), #0f3f69); min-height: 100vh; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; }
.kiosk .panel { background: #fff; color: var(--ink); border-radius: 26px; padding: 2rem; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.kiosk .clock { font-size: 4.5rem; font-weight: 800; line-height: 1; } .kiosk h1 { color: #fff; }
.kiosk input.doc { font-size: 2rem; text-align: center; letter-spacing: .12em; padding: 1rem; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; } .keypad button { font: inherit; font-size: 1.6rem; font-weight: 700; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--gray); color: var(--navy); cursor: pointer; } .keypad button:active { background: #dbe7f3; }
.kiosk .btn { font-size: 1.2rem; padding: 1rem 1.4rem; border-radius: 16px; }
.kiosk video { width: 100%; max-width: 320px; border-radius: 16px; background: #000; margin: .5rem auto; display: block; }
.dev { position: fixed; right: 12px; bottom: 12px; z-index: 40; font-size: .75rem; background: #1a1a1a; color: #fff; border-radius: 10px; padding: .4rem .7rem; opacity: .85; }
.dev a { color: #9fd3ff; }

/* ---- Iconos y retoques de diseño ---- */
.ico { width: 20px; height: 20px; flex: none; }
.side a { display: flex; align-items: center; gap: .7rem; }
.side a .ico { opacity: .85; } .side a.on .ico { opacity: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #dcebf8; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }
.person { display: flex; align-items: center; gap: .65rem; }
.person b { display: block; line-height: 1.15; } .person span.muted { font-size: .78rem; }

/* Portada */
.hero { text-align: center; padding: 2.2rem 1rem 1.4rem; }
.hero img { height: 54px; }
.hero h1 { font-size: 2rem; margin: .8rem 0 .2rem; }
.choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; max-width: 980px; margin: 1.5rem auto; padding: 0 1.2rem; }
.choice { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 1.6rem 1.4rem; text-align: center; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: .5rem; border: 2px solid transparent; transition: .15s; }
.choice:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--teal); }
.choice .bubble { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(145deg, var(--navy), var(--blue)); color: #fff; display: flex; align-items: center; justify-content: center; }
.choice .bubble .ico { width: 30px; height: 30px; }
.choice h2 { margin: .3rem 0 0; font-size: 1.25rem; } .choice p { margin: 0; color: var(--muted); }
.choice .go { margin-top: .6rem; }
.testbar { max-width: 980px; margin: 0 auto 1rem; padding: .9rem 1.2rem; background: #fff7e6; border: 1px solid #f2d6a4; border-radius: 14px; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps li:last-child { border-bottom: 0; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .6rem; }
.role-btn { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; color: var(--ink); } .role-btn:hover { background: #f3f8fd; text-decoration: none; border-color: var(--blue); }
.role-btn small { display: block; color: var(--muted); font-size: .74rem; }
.simbox { background: #fff7e6; border: 1px dashed #e0b45a; border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; }
.simbox label { margin-top: 0; }

/* Control del descanso */
.bar { height: 10px; border-radius: 99px; background: #e6edf4; overflow: hidden; margin: .6rem 0 .4rem; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--teal); transition: width .6s linear, background .3s; }
.bar i.warn { background: var(--warn); } .bar i.over { background: var(--bad); }
.breakcard.over { border: 2px solid var(--bad); background: #fff5f4; }

/* ClockIn – logos */
.side .brand { display: flex; flex-wrap: wrap; align-items: center; column-gap: .55rem; }
.side .brand .brandmark { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.side .brand small { flex-basis: 100%; margin-top: .25rem; }
.hero .brandrow { display: flex; gap: .7rem; justify-content: center; margin-bottom: .3rem; }
.hero .brandrow img { height: 58px; }
.choice .bubble.logo { background: none; padding: 0; overflow: hidden; }
.choice .bubble.logo img { width: 100%; height: 100%; display: block; }
