/* ============================================================
   FASMER — App de fichaje · Design system
   Marca: naranja #F7941D · rojo #E51A4B · verde #6AB42D
   ============================================================ */

:root {
  --fs-orange: #F7941D;
  --fs-orange-dark: #DD7E0B;
  --fs-orange-soft: #FEF3E2;
  --fs-red: #E51A4B;
  --fs-red-soft: #FDE8EE;
  --fs-green: #6AB42D;
  --fs-green-soft: #EDF7E3;

  --ink: #1C2030;
  --ink-2: #555D73;
  --ink-3: #9AA1B5;
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --line: #ECEEF4;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28, 32, 48, .04), 0 8px 24px rgba(28, 32, 48, .06);
  --shadow-lg: 0 12px 40px rgba(28, 32, 48, .12);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
svg { display: block; }

.app { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
}

.sidebar__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.sidebar__brand-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.sidebar__brand-text span {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.sidebar__nav {
  flex: 1;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}

.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.nav-item:hover { background: var(--bg); color: var(--ink); }

.nav-item.is-active {
  background: linear-gradient(135deg, var(--fs-orange), var(--fs-orange-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(247, 148, 29, .35);
}

.nav-item.is-soon { color: var(--ink-3); cursor: default; }
.nav-item.is-soon:hover { background: none; color: var(--ink-3); }

.nav-item__badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
  padding: 2px 8px;
  border-radius: 99px;
}

.sidebar__footer {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.sidebar__user div strong { display: block; font-size: 13.5px; }
.sidebar__user div span { font-size: 12px; color: var(--ink-3); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 32, 48, .45);
  z-index: 35;
}

/* ============ AVATARES ============ */

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.avatar--orange { background: linear-gradient(135deg, #FBB45C, var(--fs-orange-dark)); }
.avatar--red    { background: linear-gradient(135deg, #F4537D, #C30E3B); }
.avatar--green  { background: linear-gradient(135deg, #8CCB52, #4F9418); }

/* ============ MAIN / TOPBAR ============ */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 32px 0;
}

.topbar__menu { display: none; }
.topbar__menu svg { width: 24px; height: 24px; }

.topbar__greeting h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.topbar__greeting p { font-size: 13.5px; color: var(--ink-3); font-weight: 500; }

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: box-shadow .15s;
}

.icon-btn:hover { box-shadow: var(--shadow); }
.icon-btn svg { width: 19px; height: 19px; }

.icon-btn__dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fs-red);
  border: 2px solid var(--surface);
}

/* ============ LAYOUT ============ */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
  align-items: start;
}

.col-main, .col-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ============ TARJETAS ============ */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card__head h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.card__sub { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

.badge-soft {
  font-size: 12px;
  font-weight: 700;
  color: var(--fs-green);
  background: var(--fs-green-soft);
  padding: 4px 11px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ============ TARJETA DE FICHAJE ============ */

.card--clock {
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(247, 148, 29, .22), transparent 55%),
    radial-gradient(100% 120% at -10% 110%, rgba(229, 26, 75, .14), transparent 50%),
    linear-gradient(160deg, #232838, #161A26);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 28px;
  text-align: center;
}

.clock__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background .25s, border-color .25s;
}

.status-pill__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: background .25s;
}

[data-status="working"] .status-pill__dot { background: var(--fs-green); box-shadow: 0 0 0 4px rgba(106, 180, 45, .25); animation: pulse 1.8s infinite; }
[data-status="paused"]  .status-pill__dot { background: var(--fs-orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .25); }
[data-status="done"]    .status-pill__dot { background: var(--fs-red); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(106, 180, 45, .4); }
  50%      { box-shadow: 0 0 0 6px rgba(106, 180, 45, 0); }
}

.clock__hint { font-size: 13px; color: rgba(255, 255, 255, .55); font-weight: 500; }

.clock__ring {
  position: relative;
  width: 220px;
  height: 220px;
}

.clock__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .09);
  stroke-width: 10;
}

.ring-fill {
  fill: none;
  stroke: url(#) var(--fs-orange);
  stroke: var(--fs-orange);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke .3s;
}

[data-status="working"] .ring-fill { stroke: var(--fs-green); }
[data-status="paused"]  .ring-fill { stroke: var(--fs-orange); }
[data-status="done"]    .ring-fill { stroke: var(--fs-red); }

.clock__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.clock__time {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.clock__worked {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .6);
  font-weight: 500;
}

.clock__worked strong { color: #fff; font-variant-numeric: tabular-nums; }

.clock__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  border-radius: 14px;
  transition: transform .12s, box-shadow .15s, background .2s;
}

.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }

.btn--xl { padding: 15px 30px; font-size: 15.5px; }

.btn--primary {
  background: linear-gradient(135deg, var(--fs-orange), var(--fs-orange-dark));
  color: #fff;
  box-shadow: 0 8px 22px rgba(247, 148, 29, .42);
}

.btn--primary:hover { box-shadow: 0 10px 28px rgba(247, 148, 29, .55); }

[data-status="working"] .btn--primary {
  background: linear-gradient(135deg, var(--fs-red), #C30E3B);
  box-shadow: 0 8px 22px rgba(229, 26, 75, .4);
}

.btn--ghost {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
}

.btn--ghost:hover { background: rgba(255, 255, 255, .14); }

.clock__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .5);
  font-weight: 500;
}

.clock__meta svg { width: 15px; height: 15px; }

/* ============ TIMELINE ============ */

.timeline { display: flex; flex-direction: column; }

.timeline__empty {
  font-size: 13.5px;
  color: var(--ink-3);
  background: var(--bg);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  text-align: center;
}

.timeline__item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 2px;
  width: 2px;
  background: var(--line);
}

.timeline__item:last-child::before { display: none; }

.timeline__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline__icon svg { width: 17px; height: 17px; }

.timeline__icon--in     { background: var(--fs-green-soft); color: var(--fs-green); }
.timeline__icon--pause  { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }
.timeline__icon--resume { background: var(--fs-green-soft); color: var(--fs-green); }
.timeline__icon--out    { background: var(--fs-red-soft); color: var(--fs-red); }

.timeline__body strong { display: block; font-size: 14px; font-weight: 700; }
.timeline__body span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

.timeline__time {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

/* ============ STATS ============ */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.stat__icon svg { width: 17px; height: 17px; }

.stat__icon--orange { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }
.stat__icon--green  { background: var(--fs-green-soft); color: var(--fs-green); }
.stat__icon--red    { background: var(--fs-red-soft); color: var(--fs-red); }

.stat strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat > span:last-child { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ============ GRÁFICO SEMANAL ============ */

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 150px;
  padding-top: 24px;
}

.week-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.week-chart__bar {
  width: 100%;
  max-width: 44px;
  height: calc(var(--h, 50%) * .78);
  min-height: 6px;
  background: linear-gradient(180deg, #FBC98A, var(--fs-orange));
  border-radius: 9px;
  position: relative;
  transition: height .6s cubic-bezier(.2, .8, .2, 1);
}

.week-chart__bar span {
  position: absolute;
  top: -21px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}

.week-chart__bar--today { background: linear-gradient(180deg, #8CCB52, var(--fs-green)); }
.week-chart__bar--today span { color: var(--fs-green); }

.week-chart__col label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.week-chart__col.is-today label { color: var(--fs-green); }

/* ============ EQUIPO ============ */

.team { display: flex; flex-direction: column; }

.team__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.team__row:last-child { border-bottom: none; padding-bottom: 0; }
.team__row:first-child { padding-top: 0; }

.team__info { min-width: 0; flex: 1; }
.team__info strong { display: block; font-size: 13.5px; font-weight: 700; }

.team__info span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.team__state {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.team__state.is-working  { background: var(--fs-green-soft); color: var(--fs-green); }
.team__state.is-paused   { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }
.team__state.is-out      { background: var(--bg); color: var(--ink-3); }
.team__state.is-vacation { background: var(--fs-red-soft); color: var(--fs-red); }

/* ============ PÁGINA GENÉRICA (Empleados) ============ */

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 32px 40px;
}

.stats--row { grid-template-columns: repeat(4, 1fr); }

/* ---- Toolbar de filtros ---- */

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--ink-3);
}

.search:focus-within { border-color: var(--fs-orange); background: var(--surface); }
.search svg { width: 17px; height: 17px; flex-shrink: 0; }

.search input {
  border: none;
  background: none;
  outline: none;
  font: inherit;
  color: var(--ink);
  width: 100%;
  padding: 11px 0;
}

.select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  outline: none;
  cursor: pointer;
}

.select:focus { border-color: var(--fs-orange); background: var(--surface); }

/* ---- Listado de empleados ---- */

.emp-head {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 24px;
  gap: 12px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3);
}

.emp-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 24px;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}

.emp-row:hover, .emp-row:focus-visible { background: var(--bg); outline: none; }
.emp-row:last-of-type { border-bottom: none; }

.emp-row__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.emp-row__who div { min-width: 0; }

.emp-row__who div strong { display: block; font-size: 14px; font-weight: 700; }
.emp-row__who div span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-row__cell { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.emp-row__chevron { width: 18px; height: 18px; color: var(--ink-3); }

.emp-row .team__state { justify-self: start; }

.emp-empty {
  padding: 26px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-3);
}

.doc-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  justify-self: start;
  font-style: normal;
}

.doc-badge.is-ok      { background: var(--fs-green-soft); color: var(--fs-green); }
.doc-badge.is-pending { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }
.doc-badge.is-expired { background: var(--fs-red-soft); color: var(--fs-red); }

/* ---- Drawer (ficha del empleado) ---- */

.drawer-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 32, 48, .45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.drawer-overlay.is-visible, .modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  background: var(--surface);
  z-index: 70;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drawer__avatar { width: 52px; height: 52px; font-size: 17px; border-radius: 16px; }

.drawer__title { flex: 1; min-width: 0; }
.drawer__title strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.drawer__title span { font-size: 13px; color: var(--ink-3); font-weight: 600; }

.drawer__estado { align-self: flex-start; }

.drawer__section h3 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.datos { display: flex; flex-direction: column; gap: 10px; }

.datos > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
}

.datos dt { color: var(--ink-3); font-weight: 600; }
.datos dd { font-weight: 700; text-align: right; word-break: break-word; }

.doc-list { display: flex; flex-direction: column; gap: 4px; }

.doc-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
}

.doc-list svg { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }
.doc-list span { flex: 1; }

/* ---- Barra de vacaciones ---- */

.vac-bar {
  height: 10px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}

.vac-bar--lg { height: 14px; }

.vac-bar__fill {
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--fs-orange), var(--fs-red));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

.vac-resumen { font-size: 13px; color: var(--ink-2); font-weight: 500; margin-top: 10px; }
.vac-resumen strong { color: var(--ink); }

/* ============ PERMISOS Y VACACIONES ============ */

.card--balance {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(247, 148, 29, .12), transparent 55%),
    var(--surface);
}

.balance__info { flex: 1; min-width: 240px; }

.balance__year {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3);
}

.balance__big {
  display: block;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--fs-orange-dark);
}

.balance__sub {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 16px;
}

.leyenda {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: baseline;
}

.leyenda--usado { background: var(--fs-orange); }
.leyenda--pend  { background: var(--fs-red); }

/* ---- Solicitudes ---- */

.sol-list { display: flex; flex-direction: column; }

.sol-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.sol-row:last-child { border-bottom: none; padding-bottom: 0; }
.sol-row:first-child { padding-top: 0; }

.sol-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sol-row__icon svg { width: 18px; height: 18px; }
.sol-row__icon--aprobada  { background: var(--fs-green-soft); color: var(--fs-green); }
.sol-row__icon--pendiente { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }

.sol-row__info { flex: 1; min-width: 0; }
.sol-row__info strong { display: block; font-size: 14px; font-weight: 700; }
.sol-row__info span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

.sol-row__dias {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.estado-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.estado-badge.is-aprobada  { background: var(--fs-green-soft); color: var(--fs-green); }
.estado-badge.is-pendiente { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }
.estado-badge.is-rechazada { background: var(--fs-red-soft); color: var(--fs-red); }

/* ---- Tarjeta de ayuda ---- */

.card--hint h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

.hint-list { display: flex; flex-direction: column; gap: 10px; }

.hint-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}

.hint-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fs-orange);
}

/* ---- Modal ---- */

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(480px, 100%);
  padding: 26px;
  transform: translateY(14px);
  transition: transform .22s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.is-visible .modal { transform: translateY(0); }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal__head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }

.form { display: flex; flex-direction: column; gap: 16px; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form__field { display: flex; flex-direction: column; gap: 7px; }

.form__field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.form__field em { font-style: normal; font-weight: 500; color: var(--ink-3); }

.form__field .select { width: 100%; cursor: auto; }
.form__field textarea { resize: vertical; font-family: inherit; }

.form__resumen {
  font-size: 13px;
  font-weight: 600;
  color: var(--fs-orange-dark);
  background: var(--fs-orange-soft);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}

.form__submit { justify-content: center; }

.modal__ok {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 0 4px;
}

.modal__ok-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--fs-green-soft);
  color: var(--fs-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.modal__ok-icon svg { width: 26px; height: 26px; }
.modal__ok h3 { font-size: 17px; font-weight: 800; }
.modal__ok p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }

/* ============ PANEL DEL ADMINISTRADOR ============ */

.layout--page { padding: 0; }

.sidebar__section--gap { margin-top: 18px; }

.badge-soft--warn { color: var(--fs-orange-dark); background: var(--fs-orange-soft); }

.card__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--fs-orange-dark);
}

.card__link:hover { text-decoration: underline; }

.card__sub strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Registro de fichajes de hoy ---- */

.reg-head {
  display: grid;
  grid-template-columns: 1.9fr .8fr 1.1fr .7fr .8fr 1.1fr;
  gap: 10px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3);
}

.reg-row {
  display: grid;
  grid-template-columns: 1.9fr .8fr 1.1fr .7fr .8fr 1.1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.reg-row:last-child { border-bottom: none; }
.reg-row.is-off { opacity: .65; }

.reg-row__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reg-row__who div { min-width: 0; }
.reg-row__who div strong { display: block; font-size: 14px; font-weight: 700; }
.reg-row__who div span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-row__cell {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.reg-row__cell--horas { font-weight: 800; color: var(--ink); }
.reg-row__cell--vacio { color: var(--ink-3); font-weight: 500; font-style: italic; }

.reg-row .team__state { justify-self: start; }

/* ---- Avisos ---- */

.avisos { display: flex; flex-direction: column; gap: 4px; }

.aviso {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.aviso:hover { background: var(--bg); }

.aviso__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aviso__icon svg { width: 18px; height: 18px; }
.aviso__icon--red    { background: var(--fs-red-soft); color: var(--fs-red); }
.aviso__icon--orange { background: var(--fs-orange-soft); color: var(--fs-orange-dark); }

.aviso > div { flex: 1; min-width: 0; }
.aviso strong { display: block; font-size: 13.5px; font-weight: 700; }
.aviso span { font-size: 12px; color: var(--ink-3); font-weight: 500; }

.aviso__chevron { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }

/* ---- Accesos rápidos ---- */

.quick { display: flex; flex-direction: column; gap: 8px; }

.btn--soft {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 11px 14px;
  font-size: 13.5px;
}

.btn--soft:hover { border-color: var(--fs-orange); color: var(--ink); }
.btn--soft svg { width: 17px; height: 17px; color: var(--fs-orange-dark); }

/* ---- Solicitudes pendientes (aprobar/rechazar) ---- */

.req-list { display: flex; flex-direction: column; }

.req {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .25s, transform .25s;
}

.req:last-of-type { border-bottom: none; }
.req.is-resolved { opacity: 0; transform: translateX(16px); }

.req__info { flex: 1; min-width: 0; }
.req__info strong { display: block; font-size: 14.5px; font-weight: 700; }
.req__info span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.req__info span b { color: var(--ink); }
.req__info em { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; font-style: normal; margin-top: 2px; }

.req__actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn--approve, .btn--reject {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 11px;
}

.btn--approve svg, .btn--reject svg { width: 15px; height: 15px; }

.btn--approve {
  background: var(--fs-green);
  color: #fff;
  box-shadow: 0 5px 14px rgba(106, 180, 45, .35);
}

.btn--approve:hover { background: #5CA424; }

.btn--reject {
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}

.btn--reject:hover { border-color: var(--fs-red); color: var(--fs-red); }

.req-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ---- Balance por empleado ---- */

.balances { display: flex; flex-direction: column; gap: 14px; }

.balance-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.balance-row .avatar { width: 34px; height: 34px; font-size: 12px; }

.balance-row__info { flex: 1; min-width: 0; }

.balance-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.balance-row__top strong { font-size: 13.5px; font-weight: 700; }
.balance-row__top span { font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.balance-row__top span b { color: var(--fs-orange-dark); font-size: 13.5px; }

.balance-row .vac-bar { height: 7px; }

.balance-row__detalle {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 5px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .stats--row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .reg-head { display: none; }

  .reg-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "who   estado"
      "datos datos";
    row-gap: 8px;
  }

  .reg-row__who { grid-area: who; }
  .reg-row .team__state { grid-area: estado; justify-self: end; }

  .reg-row__cell { display: none; }

  .reg-row__cell--horas, .reg-row__cell--vacio {
    display: block;
    grid-area: datos;
  }

  .reg-row__cell--horas::before {
    content: "Hoy: ";
    font-weight: 600;
    color: var(--ink-3);
  }

  .req { flex-wrap: wrap; }
  .req__actions { width: 100%; }
  .req__actions .btn { flex: 1; justify-content: center; }

  .emp-head { display: none; }

  .emp-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "who    estado"
      "extras chevron";
    row-gap: 10px;
  }

  .emp-row__who { grid-area: who; }
  .emp-row .team__state { grid-area: estado; justify-self: end; }
  .emp-row__chevron { display: none; }

  .emp-row__cell { display: none; }
  .emp-row .doc-badge { grid-area: extras; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay.is-visible { display: block; }

  .topbar__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
    flex-shrink: 0;
  }

  .topbar { padding: 18px 18px 0; }
  .layout { padding: 18px 18px 32px; gap: 18px; }
  .page { padding: 18px 18px 32px; gap: 18px; }
  .topbar__avatar { display: none; }

  .card--balance { gap: 18px; }
  .card--balance .btn { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }

  .card { padding: 18px; }
  .card--clock { padding: 24px 18px; }

  .clock__ring { width: 190px; height: 190px; }
  .clock__time { font-size: 32px; }

  .clock__actions { width: 100%; flex-direction: column; }
  .clock__actions .btn { justify-content: center; width: 100%; }

  .topbar__greeting h1 { font-size: 18px; }

  .stats--row { grid-template-columns: 1fr 1fr; }
  .stats--row .stat:last-child { grid-column: auto; }

  .form__row { grid-template-columns: 1fr; }

  .sol-row { flex-wrap: wrap; }
  .sol-row__info { flex-basis: calc(100% - 52px); }
  .sol-row__dias, .sol-row .estado-badge { margin-left: 52px; }
  .sol-row .estado-badge { margin-left: 0; }

  .balance__big { font-size: 44px; }
}
