/* TempoTrack — sistema de disseny */
:root {
  --bg: #07090e;
  --bg-2: #0c1018;
  --card: #111623;
  --card-2: #161c2c;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --txt: #eaf0fb;
  --mut: #8a94ab;
  --dim: #5b6479;
  --mint: #3cf2c0;
  --mint-d: #12b58c;
  --amber: #ffb84d;
  --coral: #ff6b7a;
  --violet: #8b7bff;
  --glow: 0 0 40px rgba(60,242,192,.18);
  --r: 18px;
  --font-d: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eef1f6; --bg-2: #e6eaf1; --card: #ffffff; --card-2: #f5f7fb;
  --line: rgba(15,23,42,.08); --line-2: rgba(15,23,42,.14);
  --txt: #0e1627; --mut: #5a647a; --dim: #8b94a8;
  --mint: #00a884; --mint-d: #007f64; --amber: #d98400; --coral: #e0364b; --violet: #5b49e0;
  --glow: 0 10px 40px rgba(0,168,132,.12);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.5 var(--font-b); color: var(--txt); background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(60,242,192,.10), transparent 60%),
    radial-gradient(700px 500px at -5% 105%, rgba(139,123,255,.09), transparent 60%);
  background-attachment: fixed; min-height: 100vh;
}
[data-theme="light"] body { background-image: radial-gradient(900px 500px at 85% -10%, rgba(0,168,132,.10), transparent 60%); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-d); letter-spacing: -.02em; line-height: 1.1; }
.ico { flex: none; }
.mono { font-family: var(--font-m); font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 28px;
  background: linear-gradient(180deg, var(--bg-2), transparent); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { color: var(--mint); display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(60,242,192,.5)); }
.brand-arc { transform-origin: 16px 16px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font: 700 21px var(--font-d); letter-spacing: -.03em; }
.brand-name b { color: var(--mint); font-weight: 800; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: var(--mut); font-weight: 500; transition: .18s;
}
.nav a:hover { color: var(--txt); background: var(--card); }
.nav a.on { color: var(--mint); background: linear-gradient(90deg, rgba(60,242,192,.14), rgba(60,242,192,.02)); box-shadow: inset 2px 0 0 var(--mint); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.me-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-txt strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { color: var(--mut); font-size: 11px; }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font: 700 13px var(--font-d); color: #04110d; background: linear-gradient(135deg, var(--mint), #7ae7ff);
}
.out, .theme-btn { color: var(--mut); background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.out:hover, .theme-btn:hover { color: var(--txt); background: var(--card-2); }
.t-light { display: none; } [data-theme="light"] .t-light { display: grid; } [data-theme="light"] .t-dark { display: none; }

.main { padding: 36px clamp(18px, 4vw, 52px) 60px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.page-head p { color: var(--mut); margin-top: 6px; }
.eyebrow { font: 600 11px var(--font-b); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); margin-bottom: 8px; }

/* ---------- Targetes ---------- */
.card {
  background: linear-gradient(160deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px; position: relative; overflow: hidden;
}
.card h3 { font-size: 15px; font-weight: 700; color: var(--mut); letter-spacing: 0; font-family: var(--font-b); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-wide { grid-template-columns: 2fr 1fr; }
.kpi .label { color: var(--mut); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .value { font: 800 clamp(26px, 3vw, 36px) var(--font-d); letter-spacing: -.03em; margin-top: 10px; }
.kpi .sub { color: var(--mut); font-size: 12.5px; margin-top: 4px; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--kc, rgba(60,242,192,.14)), transparent 70%); }
.pos { color: var(--mint); } .neg { color: var(--coral); } .warn { color: var(--amber); }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--line); color: var(--mut); }
.pill.ok { color: var(--mint); background: rgba(60,242,192,.1); border-color: rgba(60,242,192,.25); }
.pill.bad { color: var(--coral); background: rgba(255,107,122,.1); border-color: rgba(255,107,122,.25); }
.pill.am { color: var(--amber); background: rgba(255,184,77,.1); border-color: rgba(255,184,77,.25); }

/* ---------- Botons i formularis ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--txt);
  font: 600 14px var(--font-b); cursor: pointer; transition: .18s;
}
.btn:hover { border-color: var(--mint); transform: translateY(-1px); }
.btn.primary { background: var(--mint); color: #03130e; border-color: var(--mint); box-shadow: 0 6px 24px rgba(60,242,192,.25); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 30px rgba(60,242,192,.4); }
.btn.danger { color: var(--coral); }
.btn.danger:hover { border-color: var(--coral); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mut); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=time], input[type=number], select {
  width: 100%; padding: 11px 13px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--txt); font: 500 14px var(--font-b); outline: none; transition: .15s;
}
input:focus, select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(60,242,192,.15); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { cursor: pointer; }
.days input { display: none; }
.days span { display: grid; place-items: center; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); font-weight: 600; color: var(--mut); }
.days input:checked + span { background: rgba(60,242,192,.14); border-color: var(--mint); color: var(--mint); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters label.f { min-width: 150px; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); gap: 2px; }
.seg a { padding: 8px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--mut); }
.seg a.on { background: var(--mint); color: #03130e; }
.seg a:not(.on):hover { color: var(--txt); }

/* ---------- Taules ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 0 14px 12px; }
.tbl td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; margin: 0 -22px -10px; padding: 0 8px; }
.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 34px; height: 34px; font-size: 12px; }
.person small { display: block; color: var(--mut); font-size: 12px; }
.empty { text-align: center; padding: 50px 20px; color: var(--mut); }

/* ---------- Pàgina Fitxar ---------- */
.clock-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.hero { display: grid; place-items: center; text-align: center; padding: 38px 20px 30px; }
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .9;
  background: radial-gradient(420px 320px at 50% 38%, var(--halo, rgba(60,242,192,.13)), transparent 70%);
}
.hero > * { position: relative; }
.ring { position: relative; width: min(340px, 78vw); aspect-ratio: 1; margin: 6px auto 22px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .trk { stroke: var(--line-2); }
.ring .bar { stroke: url(#grad); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 10px rgba(60,242,192,.55)); }
.ring.is-break .bar { stroke: var(--amber); filter: drop-shadow(0 0 10px rgba(255,184,77,.5)); }
.ring .dot { fill: var(--mint); }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time { font: 700 clamp(38px, 8vw, 54px) var(--font-m); letter-spacing: -.04em; }
.ring-time i { font-style: normal; color: var(--dim); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ring-sub { color: var(--mut); font-size: 13px; margin-top: 4px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-weight: 600; font-size: 13px; background: var(--card); border: 1px solid var(--line-2); }
.status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.status.working { color: var(--mint); } .status.working .led { background: var(--mint); box-shadow: 0 0 12px var(--mint); animation: pulse 1.6s infinite; }
.status.break { color: var(--amber); } .status.break .led { background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.actions form { display: contents; }
.big {
  min-width: 190px; padding: 17px 28px; border-radius: 16px; font: 700 17px var(--font-d);
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--txt); cursor: pointer; display: inline-flex; gap: 10px; align-items: center; justify-content: center; transition: .2s;
}
.big:hover { transform: translateY(-2px); }
.big.go { background: linear-gradient(135deg, var(--mint), #6ff7de); color: #03130e; border: 0; box-shadow: 0 10px 40px rgba(60,242,192,.35); }
.big.go:hover { box-shadow: 0 14px 54px rgba(60,242,192,.55); }
.big.brk { color: var(--amber); border-color: rgba(255,184,77,.4); }
.big.stop { color: var(--coral); border-color: rgba(255,107,122,.4); }
.timeline { position: relative; height: 38px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 8px; }
.timeline .seg-w, .timeline .seg-b { position: absolute; top: 0; bottom: 0; }
.timeline .seg-w { background: linear-gradient(180deg, var(--mint), var(--mint-d)); opacity: .9; }
.timeline .seg-b { background: repeating-linear-gradient(45deg, var(--amber), var(--amber) 4px, #c98a2c 4px, #c98a2c 8px); z-index: 2; }
.timeline .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--txt); z-index: 3; }
.axis { display: flex; justify-content: space-between; font: 500 11px var(--font-m); color: var(--dim); }
.mini-list { display: flex; flex-direction: column; }
.mini-list > div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); color: var(--mut); }
.mini-list > div:first-child { border-top: 0; }
.mini-list b { color: var(--txt); font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint-d), var(--mint)); }

/* ---------- Estadístiques ---------- */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; font-size: 10.5px; color: var(--dim); }
.heat .hl { display: flex; align-items: center; font-weight: 600; }
.heat .hx { text-align: center; font-family: var(--font-m); }
.heat .c { aspect-ratio: 1; border-radius: 4px; background: rgba(60,242,192, var(--a, .04)); transition: .15s; min-height: 14px; }
.heat .c:hover { outline: 1px solid var(--mint); transform: scale(1.25); z-index: 2; }
.rank { display: flex; flex-direction: column; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; }
.rank-row .bar { height: 8px; border-radius: 99px; background: var(--bg-2); margin-top: 6px; overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--mint)); }
.rank-row strong { font-size: 14px; }
.donut-wrap { display: grid; place-items: center; position: relative; }
.donut-c { position: absolute; text-align: center; }
.donut-c b { font: 800 30px var(--font-d); display: block; }
.donut-c span { font-size: 12px; color: var(--mut); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 13px 18px; border-radius: 13px; font-weight: 500; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: slide .4s cubic-bezier(.2,.8,.2,1), fade .5s 4.5s forwards; max-width: 340px; }
.toast.ok { border-left: 3px solid var(--mint); } .toast.bad { border-left: 3px solid var(--coral); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes fade { to { opacity: 0; transform: translateY(-8px); pointer-events: none; } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-right: 1px solid var(--line); }
.login-art h1 { font-size: clamp(38px, 5vw, 64px); font-weight: 800; max-width: 11ch; line-height: 1; }
.login-art h1 em { font-style: normal; color: var(--mint); }
.login-art p { color: var(--mut); max-width: 38ch; margin-top: 20px; font-size: 16px; }
.orbit { position: absolute; right: -140px; bottom: -140px; width: 520px; height: 520px; pointer-events: none; }
.orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); }
.orbit i:nth-child(2) { inset: 60px; } .orbit i:nth-child(3) { inset: 120px; border-color: rgba(60,242,192,.35); }
.orbit b { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 22px var(--mint); top: 50%; left: 50%; margin: -6px; animation: orb 14s linear infinite; }
@keyframes orb { from { transform: rotate(0) translateX(260px); } to { transform: rotate(360deg) translateX(260px); } }
.login-form { display: grid; place-items: center; padding: 30px; }
.login-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-form h2 { font-size: 30px; font-weight: 800; }

/* ---------- Responsiu ---------- */
@media (max-width: 1060px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-wide, .clock-wrap, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 40; flex-direction: row; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); gap: 0; }
  .brand, .side-foot .me-txt, .theme-btn { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; padding: 7px 10px; font-size: 10.5px; border-radius: 10px; box-shadow: none !important; }
  .side-foot { margin: 0; border: 0; background: none; padding: 0; gap: 2px; }
  .main { padding: 22px 16px 110px; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .toasts { left: 16px; right: 16px; top: 12px; } .toast { max-width: none; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } .card { padding: 16px; } .heat { gap: 2px; } .heat .hx:nth-child(even) { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Vacances i calendari ---------- */
.badge { margin-left: auto; font: 700 11px var(--font-b); font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--coral); color: #fff; }
.pill.vac { color: var(--mint); background: rgba(60,242,192,.1); border-color: rgba(60,242,192,.25); }
.pill.sick { color: var(--coral); background: rgba(255,107,122,.1); border-color: rgba(255,107,122,.25); }
.pill.pers { color: var(--violet); background: rgba(139,123,255,.12); border-color: rgba(139,123,255,.3); }
.pill.oth { color: var(--amber); background: rgba(255,184,77,.1); border-color: rgba(255,184,77,.25); }
.bal { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.bal-ring { position: relative; width: 120px; height: 120px; flex: none; }
.bal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bal-ring .in { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.bal-ring b { font: 800 30px var(--font-d); display: block; }
.bal-ring span { font-size: 11px; color: var(--mut); }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mut); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 98px; border-radius: 12px; padding: 8px; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal .day.off { opacity: .35; background: transparent; }
.cal .day.we { background: transparent; }
.cal .day.hol { background: rgba(255,184,77,.08); border-color: rgba(255,184,77,.3); }
.cal .day.today { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.cal .n { font: 700 13px var(--font-m); color: var(--mut); }
.cal .today .n { color: var(--mint); }
.cal .ev { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.vacation { background: rgba(60,242,192,.16); color: var(--mint); }
.cal .ev.sick { background: rgba(255,107,122,.16); color: var(--coral); }
.cal .ev.personal { background: rgba(139,123,255,.18); color: var(--violet); }
.cal .ev.other { background: rgba(255,184,77,.16); color: var(--amber); }
.cal .ev.pending { background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255,255,255,.07) 4px, rgba(255,255,255,.07) 8px); border: 1px dashed var(--line-2); color: var(--mut); }
.cal .ev.hl { background: rgba(255,184,77,.2); color: var(--amber); }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h2 { font-size: 20px; min-width: 170px; text-align: center; text-transform: capitalize; }
@media (max-width: 820px) {
  .nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .nav a { flex: none; min-width: 62px; }
  .badge { position: absolute; margin: 0; transform: translate(18px, -14px); min-width: 16px; height: 16px; font-size: 10px; }
  .nav a { position: relative; }
  .cal { gap: 3px; } .cal .day { min-height: 64px; padding: 4px; } .cal .ev { font-size: 9.5px; padding: 1px 4px; }
}

/* ---------- Editor d'horari ---------- */
.sched { display: flex; flex-direction: column; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); transition: .15s; }
.sched-row.off { opacity: .45; }
.sched-day { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.sched-day input { width: 18px; height: 18px; accent-color: var(--mint); }
.sched-times { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sched-times input[type=time] { width: 128px; padding: 8px 10px; }
.sched-times i, .sched-times em { color: var(--dim); font-style: normal; }
@media (max-width: 560px) { .sched-row { grid-template-columns: 1fr; } }

/* ---------- Accés ràpid (PIN) ---------- */
.login-box { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-box form { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.login-brand-m { display: none; justify-content: center; margin-bottom: 6px; }
.alt { text-align: center; color: var(--mut); font-size: 14px; padding: 6px; }
.alt:hover { color: var(--mint); }
.pin-dots { display: flex; gap: 16px; justify-content: center; padding: 6px 0 2px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); transition: .15s; }
.pin-dots i.on { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 16px rgba(60,242,192,.6); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keypad button {
  aspect-ratio: 1.25; border-radius: 20px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--txt);
  font: 700 30px var(--font-d); cursor: pointer; transition: .12s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.keypad button:active { transform: scale(.94); background: rgba(60,242,192,.18); border-color: var(--mint); }
.keypad button.sec { color: var(--mut); font-size: 22px; }
.done { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: rgba(60,242,192,.12); border: 1px solid rgba(60,242,192,.35); color: var(--txt); font-size: 16px; line-height: 1.35; }
.done-ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #03130e; }
@media (max-width: 820px) { .login-brand-m { display: flex; } .login-form { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); align-items: start; } }

/* ---------- Pantalla ràpida de fitxatge ---------- */
.quick { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; gap: 18px; }
.quick-top { display: flex; align-items: center; justify-content: space-between; }
.quick-hi h1 { font-size: clamp(32px, 9vw, 44px); font-weight: 800; }
.quick-hi p { color: var(--mut); margin-top: 6px; font-size: 16px; }
.quick-state { align-self: flex-start; }
.q-actions { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.q-actions form { display: contents; }
.q-btn { width: 100%; min-height: 150px; border-radius: 28px; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: 800 clamp(24px, 7vw, 32px) var(--font-d); letter-spacing: -.02em; transition: .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.q-btn:active { transform: scale(.97); }
.q-btn.go { background: linear-gradient(135deg, var(--mint), #6ff7de); color: #03130e; box-shadow: 0 16px 60px rgba(60,242,192,.4); min-height: 230px; }
.q-btn.brk { background: rgba(255,184,77,.14); color: var(--amber); border: 2px solid rgba(255,184,77,.5); min-height: 120px; }
.q-btn.stop { background: rgba(255,107,122,.14); color: var(--coral); border: 2px solid rgba(255,107,122,.5); min-height: 120px; }
.q-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.q-foot a { color: var(--mut); padding: 8px 4px; }
.q-foot a:hover { color: var(--txt); }

/* ---------- Multiempresa ---------- */
.company-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); color: var(--txt); font-weight: 600; }
.company-chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-chip em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--mut); }
.company-chip:hover em { color: var(--mint); }
.side-company { padding: 0 10px; margin-top: -14px; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Avisos de suport i subscripció ---------- */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; margin-bottom: 20px; font-size: 14px; border: 1px solid var(--line-2); background: var(--card); }
.banner form { margin: 0; }
.banner.support { background: rgba(139,123,255,.14); border-color: rgba(139,123,255,.45); }
.banner.warn { background: rgba(255,184,77,.12); border-color: rgba(255,184,77,.4); }
.banner.bad { background: rgba(255,107,122,.12); border-color: rgba(255,107,122,.4); }
