:root {
  --shell: #080d18;
  --shell2: #0c1424;
  --surface: #111a2b;
  --surface2: #162238;
  --surface3: #1d2d48;
  --surface4: #243654;
  --ink: #eef4ff;
  --muted: #9caec6;
  --muted2: #70849e;
  --primary: #66a7ff;
  --primary2: #2878d8;
  --primary3: #155fb6;
  --success: #35c46b;
  --success2: #1f8f4b;
  --danger: #f05252;
  --danger2: #bf2f38;
  --warning: #f4a62a;
  --warning2: #d98200;
  --info: #6bbcff;
  --card: #111a2b;
  --input: #090f1d;
  --line: rgba(151, 170, 198, .22);
  --line-strong: rgba(151, 170, 198, .38);
  --nav: #050916;
  --shadow: 0 14px 36px rgba(0, 0, 0, .30);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(102, 167, 255, .12), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(53, 196, 107, .06), transparent 28rem),
    linear-gradient(180deg, #080d18 0%, #0a1120 100%);
  font-size: 15px;
  letter-spacing: -.005em;
}

a { text-decoration: none; color: var(--primary); }
a:hover { color: #9cc9ff; }
img, svg { max-width: 100%; }

/* LOGIN */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 15%, rgba(102, 167, 255, .16), transparent 30rem),
    radial-gradient(circle at 80% 80%, rgba(53, 196, 107, .08), transparent 28rem),
    linear-gradient(135deg, #060a14, #0b1220 56%, #080d18);
}
.login-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(17, 26, 43, .98), rgba(10, 17, 32, .98));
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 34px;
  box-shadow: 0 26px 78px rgba(0, 0, 0, .46);
}
.login-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  letter-spacing: -.02em;
}
.login-brand span,
.brand span { color: var(--primary); }
.app-logo {
  height: 34px;
  width: auto;
  max-width: 150px;
  display: block;
}
.login-logo {
  height: 58px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}
.login-card h1 {
  margin: 20px 0 6px;
  font-size: 1.92rem;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -.035em;
}
.login-subtitle {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: .96rem;
}

/* FORMS */
.login-form label,
.stack-form label,
.panel label,
label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  margin: 3px 0 3px;
}
.form-control,
.form-select {
  width: 100%;
  min-height: 42px;
  background-color: var(--input);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: .68rem .78rem;
  font-family: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.form-control:focus,
.form-select:focus {
  background-color: #080f1d;
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 167, 255, .16);
}
.form-control::placeholder { color: var(--muted2); }
.form-select option { color: #111827; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-check-input { background-color: var(--input); border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--primary2); border-color: var(--primary2); }

/* BUTTONS */
.btn {
  border-radius: 5px;
  font-weight: 600;
  min-height: 40px;
  padding: .58rem .95rem;
  letter-spacing: -.01em;
  border-width: 1px;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, var(--primary2), var(--primary3));
  border-color: rgba(102, 167, 255, .35);
  color: #fff;
  box-shadow: 0 8px 20px rgba(40, 120, 216, .24);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  border-color: rgba(156, 201, 255, .55);
  color: #06111f;
}
.btn-success {
  background: linear-gradient(180deg, #28a75a, var(--success2));
  border-color: rgba(53, 196, 107, .42);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 143, 75, .22);
}
.btn-success:hover {
  background: linear-gradient(180deg, var(--success), #25a65a);
  border-color: rgba(139, 239, 174, .55);
  color: #05150b;
}
.btn-danger {
  background: linear-gradient(180deg, #df4048, var(--danger2));
  border-color: rgba(240, 82, 82, .42);
  color: #fff;
  box-shadow: 0 8px 20px rgba(191, 47, 56, .20);
}
.btn-danger:hover {
  background: linear-gradient(180deg, var(--danger), #cf3740);
  border-color: rgba(255, 169, 169, .55);
  color: #fff;
}
.btn-warning {
  background: linear-gradient(180deg, #f7b34b, var(--warning2));
  border-color: rgba(244, 166, 42, .5);
  color: #111827;
  box-shadow: 0 8px 20px rgba(216, 130, 0, .18);
}
.btn-warning:hover { background: var(--warning); color: #111827; }
.btn-light,
.btn-outline-secondary,
.btn-secondary {
  background: linear-gradient(180deg, var(--surface3), var(--surface2));
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-light:hover,
.btn-outline-secondary:hover,
.btn-secondary:hover {
  background: var(--surface4);
  border-color: rgba(102, 167, 255, .45);
  color: #fff;
}
.btn-outline-primary {
  background: rgba(102, 167, 255, .06);
  color: #b7d8ff;
  border-color: rgba(102, 167, 255, .46);
}
.btn-outline-primary:hover {
  background: rgba(102, 167, 255, .16);
  color: #fff;
  border-color: var(--primary);
}
.btn-outline-light {
  color: #fff;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.04);
}
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { min-height: 32px; padding: .35rem .65rem; font-size: .82rem; }
.btn-lg { min-height: 48px; padding: .75rem 1rem; }

.alert { border-radius: 5px; border-width: 1px; }
.alert-danger { background: rgba(240,82,82,.12); color: #ffd0d0; border-color: rgba(240,82,82,.35); }
.alert-success { background: rgba(53,196,107,.12); color: #c8f7d8; border-color: rgba(53,196,107,.35); }
.alert-info { background: rgba(102,167,255,.12); color: #d4e9ff; border-color: rgba(102,167,255,.35); }
.text-muted { color: var(--muted) !important; }
.badge { border-radius: 5px; font-weight: 600; }
.text-bg-success { background-color: rgba(53,196,107,.18) !important; color: #c8f7d8 !important; }
.text-bg-secondary { background-color: rgba(151,170,198,.18) !important; color: #d2deec !important; }

/* NAV */
.app-navbar {
  min-height: 60px;
  background: rgba(5, 9, 22, .98);
  color: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 18px rgba(0,0,0,.38);
  backdrop-filter: blur(10px);
}
.navbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}
.app-navbar .brand { color: #fff; white-space: nowrap; min-width: 0; }
.app-navbar .brand span { color: var(--primary); }
.tempo-toggler {
  margin-left: auto;
  border: 1px solid var(--line-strong);
  padding: 8px;
  border-radius: 5px;
  background: var(--surface);
}
.tempo-toggler span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  border-radius: 999px;
}
.tempo-collapse { flex: 1; align-items: center; }
.nav-links { display: flex; gap: 4px; flex: 1; align-items: center; }
.nav-links a {
  color: rgba(238,244,255,.88);
  font-weight: 600;
  padding: 9px 11px;
  border-radius: 5px;
  font-size: .92rem;
}
.nav-links a:hover { background: rgba(102,167,255,.12); color: #fff; }
.nav-user { display: flex; gap: 12px; align-items: center; color: var(--muted); font-weight: 600; }

/* LAYOUT */
.page-shell { padding: 24px; max-width: 1280px; margin: 0 auto; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.panel,
.metric,
.action-card {
  background: linear-gradient(180deg, rgba(17,26,43,.98), rgba(15,23,42,.98));
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow-soft);
}
.hero-card {
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1;
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  background:
    radial-gradient(circle at 92% 18%, rgba(102, 167, 255, .22), transparent 28%),
    linear-gradient(135deg, #121a2b 0%, #08111f 55%, #111a2b 100%);
  border: 1px solid rgba(102,167,255,.18);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0,0,0,.28);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055), transparent 34%),
    radial-gradient(circle at 8% 0%, rgba(53,196,107,.14), transparent 34%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); font-weight: 600; letter-spacing: -.03em; margin: 0; color: #fff; }
.hero-card p { color: #b8c7dc; margin: 8px 0 0; max-width: 720px; line-height: 1.45; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .11em; font-size: .72rem; font-weight: 600; color: #9cc7ff; margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px rgba(53,196,107,.14); }
.clock-box { text-align: right; }
.clock-box div { font-size: 2.35rem; font-weight: 600; color: #fff; letter-spacing: -.05em; }
.clock-box span { color: var(--muted); text-transform: capitalize; }
.panel { padding: 20px; min-width: 0; }
.panel h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; color: #fff; letter-spacing: -.015em; }
.wide { grid-column: 1 / -1; }

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 5px;
  font-size: .86rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.status.on { background: rgba(53,196,107,.14); color: #c8f7d8; border-color: rgba(53,196,107,.35); }
.status.off { background: rgba(240,82,82,.14); color: #ffd0d0; border-color: rgba(240,82,82,.35); }
.status.warning { background: rgba(244,166,42,.14); color: #ffe1ad; border-color: rgba(244,166,42,.35); }
.pause-box { background: rgba(244,166,42,.12); border: 1px solid rgba(244,166,42,.35); border-radius: 5px; padding: 12px; margin-bottom: 12px; color: #ffe1ad; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.metric { padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; margin-bottom: 4px; }
.metric strong { display: block; font-size: 1.9rem; font-weight: 600; color: #fff; letter-spacing: -.04em; }
.admin-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-card { display: block; padding: 18px; color: var(--ink); }
.action-card:hover { border-color: var(--primary); box-shadow: 0 14px 34px rgba(102,167,255,.13); }
.action-card strong { display: block; font-size: 1.05rem; margin-bottom: 5px; color: #fff; }
.action-card span { color: var(--muted); }

/* TABLES */
.table-responsive { overflow-x: auto; border-radius: 5px; }
.table { width: 100%; --bs-table-bg: transparent; --bs-table-color: var(--ink); border-color: var(--line); color: var(--ink); }
.table th { color: #d6e4f5; font-weight: 600; background: rgba(255,255,255,.045); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { vertical-align: middle; border-color: var(--line); }
.table strong { color: #fff; }
.table td, .table th { min-width: 110px; }
.nav-pills .nav-link { color: var(--muted); border-radius: 5px; font-weight: 600; }
.nav-pills .nav-link.active { background: var(--primary2); color: #fff; }
.report-employee { font-size: 1.05rem; font-weight: 600; margin-top: 22px; color: #fff; }

/* EMPLOYEE PORTAL */
.employee-mobile-shell { display: grid; gap: 16px; }
.employee-hero { margin-bottom: 0; }
.employee-status-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.geo-help { color: var(--muted2); font-size: .82rem; margin: 12px 0 0; }
.fichaje-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fichaje-btn { min-height: 54px; font-size: 1.08rem; font-weight: 600; }
.daily-timeline { display: grid; gap: 10px; }
.timeline-empty { padding: 14px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 5px; background: rgba(255,255,255,.03); }
.timeline-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.timeline-row.in .time-card { grid-column: 1; }
.timeline-row.out .time-card { grid-column: 2; }
.timeline-row.pause .time-card { grid-column: 1 / -1; }
.time-card,
.timeline-box {
  padding: 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface2);
  min-width: 0;
}
.time-card span,
.timeline-box span { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.time-card strong,
.timeline-box strong { display: block; margin-top: 2px; color: #fff; font-size: 1.28rem; font-weight: 600; letter-spacing: -.035em; }
.time-card small,
.timeline-box small { display: block; color: var(--muted); margin-top: 4px; }
.time-in,
.timeline-box.entrada { border-color: rgba(53,196,107,.42); background: rgba(53,196,107,.12); }
.time-in strong,
.timeline-box.entrada strong { color: #c8f7d8; }
.time-out,
.timeline-box.salida { border-color: rgba(240,82,82,.42); background: rgba(240,82,82,.12); text-align: right; }
.time-out strong,
.timeline-box.salida strong { color: #ffd0d0; }
.time-pause,
.timeline-box.parada { border-color: rgba(244,166,42,.42); background: rgba(244,166,42,.12); text-align: center; }
.time-pause strong,
.timeline-box.parada strong { color: #ffe1ad; }
.timeline-box.empty { background: rgba(151,170,198,.08); border-color: var(--line); color: var(--muted); opacity: .75; }
.mini-kpi { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 5px 8px; border-radius: 5px; background: rgba(102,167,255,.12); border: 1px solid rgba(102,167,255,.32); color: #d4e9ff; font-weight: 600; }

/* RRHH */
.employee-file .nav-pills { gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
.employee-file .nav-pills .nav-link { white-space: nowrap; color: var(--muted); border: 1px solid var(--line); background: var(--surface2); border-radius: 5px; font-weight: 600; }
.employee-file .nav-pills .nav-link.active { color: #fff; background: var(--primary2); border-color: var(--primary); }
.employee-section-title { font-size: 1rem; font-weight: 600; color: #fff; margin: 6px 0 14px; }
.fichaje-edit-form { min-width: 260px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: rgba(102,167,255,.08); }
.employee-main-link { color: #fff; }
.employee-main-link:hover { color: var(--info); }
.soft-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 5px; font-size: .76rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border: 1px solid transparent; margin: 2px 2px 2px 0; }
.soft-badge.info { background: rgba(102,167,255,.12); border-color: rgba(102,167,255,.32); color: #d4e9ff; }
.soft-badge.warning { background: rgba(244,166,42,.14); border-color: rgba(244,166,42,.4); color: #ffe1ad; }
.soft-badge.danger { background: rgba(240,82,82,.14); border-color: rgba(240,82,82,.4); color: #ffd0d0; }
.alert-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: rgba(244,166,42,.18); border: 1px solid rgba(244,166,42,.55); color: #ffe1ad; font-weight: 900; margin-right: 6px; }
.employee-day-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-day-timeline { max-width: 820px; }

@media (max-width: 991px) {
  .navbar-inner { padding: 12px 16px; flex-wrap: wrap; }
  .tempo-collapse { width: 100%; flex-basis: 100%; }
  .tempo-collapse.show,
  .tempo-collapse.collapsing { display: block; }
  .nav-links { width: 100%; display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }
  .nav-links a { background: rgba(255,255,255,.04); }
  .nav-user { width: 100%; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
}

@media (max-width: 768px) {
  .page-shell { padding: 14px; }
  .dashboard-grid,
  .metric-grid,
  .admin-actions,
  .employee-day-summary { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 18px; }
  .clock-box { text-align: left; }
  .btn { width: 100%; min-height: 46px; padding: 12px; font-size: 1rem; }
  .fichaje-actions { grid-template-columns: 1fr; }
  .fichaje-btn { min-height: 58px; font-size: 1.15rem; }
  .status { width: 100%; min-height: 42px; font-size: .95rem; }
  .form-control,
  .form-select { min-height: 44px; font-size: 1rem; }
  .login-card { padding: 24px; }
  .timeline-row { grid-template-columns: 1fr; }
  .timeline-row.in .time-card,
  .timeline-row.out .time-card,
  .timeline-row.pause .time-card { grid-column: 1; }
  .timeline-row.out .time-card { margin-left: 28px; }
  .timeline-row.in .time-card { margin-right: 28px; }
  .employee-file .tab-content,
  .employee-file .row > [class^="col-"] { min-width: 0; }
  .employee-file .btn { width: 100%; }
  .employee-file .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .employee-file .nav-pills { margin-left: -4px; margin-right: -4px; }
  .employee-list-table { min-width: 920px; }
}

@media (max-width: 480px) {
  .login-body { padding: 14px; }
  .login-card { padding: 20px; }
  .app-logo { height: 30px; }
  .login-logo { height: 50px; }
  .hero-card h1 { font-size: 1.55rem; }
  .clock-box div { font-size: 2rem; }
}

@media print {
  .app-navbar,
  .hero-card,
  form,
  .btn,
  .metric-grid { display: none !important; }
  body { background: #fff; color: #111; }
  .page-shell { max-width: none; padding: 0; }
  .panel { box-shadow: none; border: 0; }
}

/* TempoGo refinements */
.btn {
  border-radius: 6px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary, .btn-success, .btn-danger {
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.cell-hours .mini-kpi {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 6px 10px;
  background: rgba(102,167,255,.14);
  border: 1px solid rgba(102,167,255,.35);
  color: #b6d5ff;
  border-radius: 5px;
  font-weight: 900;
}
.cell-days { color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .employee-list-table,
  .employee-list-table thead,
  .employee-list-table tbody,
  .employee-list-table th,
  .employee-list-table td,
  .employee-list-table tr {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .employee-list-table thead { display: none; }
  .employee-list-table tr {
    background: linear-gradient(180deg, rgba(17,26,43,.98), rgba(15,23,42,.98));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
  }
  .employee-list-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 0;
    padding: 8px 0;
    color: var(--ink);
  }
  .employee-list-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .employee-list-table .cell-hours .mini-kpi { justify-content: flex-start; width: fit-content; }
  .employee-list-table .text-end { text-align: left !important; }
}


/* TempoGo refinamiento visual: menos peso tipografico y botones coherentes */
body {
  font-weight: 400;
}

.app-navbar .brand,
.login-brand,
.brand {
  font-weight: 500;
  letter-spacing: .045em;
}

.nav-links a,
.nav-user {
  font-weight: 500;
  letter-spacing: 0;
}

.panel h2,
.employee-section-title,
.table th,
.metric span,
.action-card strong,
.tabs a,
.tabs button,
.employee-file .nav-pills .nav-link {
  font-weight: 600;
}

.hero-card h1,
.metric strong,
.clock-box div {
  font-weight: 500;
}

.btn {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 6px;
  box-shadow: none;
}

.btn:hover {
  transform: none;
}

.btn-primary,
.btn-success,
.btn-danger {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.16);
}

.btn-outline-secondary,
.btn-secondary,
.btn-light {
  background: rgba(255,255,255,.045);
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline-primary {
  background: transparent;
  border-color: rgba(102,167,255,.45);
  color: #9cc7ff;
}

.employee-tabs {
  gap: 6px;
}

.employee-file .nav-pills .nav-link {
  padding: 8px 11px;
  font-size: .9rem;
}

.employee-data-form .tab-pane {
  padding-top: 2px;
}

.form-check-label {
  margin: 0;
  font-weight: 500;
}

@media (max-width: 900px) {
  .employee-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .employee-tabs .nav-item {
    flex: 0 0 auto;
  }

  .employee-file .nav-pills .nav-link {
    white-space: nowrap;
  }
}

.employee-data-form > .tab-pane {
  display: none;
}

.employee-data-form > .tab-pane.active,
.employee-data-form > .tab-pane.show.active {
  display: block;
}


/* TempoGo final typography and button pass */
body {
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.login-brand,
.brand {
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
}

.nav-links a,
.nav-user {
  font-weight: 400;
  letter-spacing: 0;
}

.login-card h1,
.hero-card h1 {
  font-weight: 500;
  letter-spacing: -.01em;
}

.panel h2,
.employee-section-title,
.action-card strong,
.metric strong,
.clock-box div {
  font-weight: 500;
  letter-spacing: 0;
}

label,
.login-form label,
.stack-form label,
.panel label,
.table th,
.metric span,
.employee-file .nav-pills .nav-link,
.nav-pills .nav-link,
.tabs a,
.tabs button {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.eyebrow {
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.btn {
  font-family: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 7px;
  box-shadow: none;
}

.btn:hover {
  transform: none;
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning {
  box-shadow: 0 5px 14px rgba(0,0,0,.16);
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: rgba(147,197,253,.35);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #60a5fa, #2f80ed);
  color: #071224;
}

.btn-success {
  background: linear-gradient(180deg, #2fb344, #238636);
  border-color: rgba(134,239,172,.34);
}

.btn-success:hover {
  background: linear-gradient(180deg, #45c85b, #2fb344);
  color: #06130a;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444, #c9363c);
  border-color: rgba(252,165,165,.34);
}

.btn-danger:hover {
  background: linear-gradient(180deg, #f87171, #e5484d);
  color: #180607;
}

.btn-light,
.btn-outline-secondary,
.btn-secondary {
  background: rgba(255,255,255,.055);
  border-color: var(--line);
  color: var(--ink);
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-secondary:hover {
  background: rgba(255,255,255,.095);
  border-color: rgba(102,167,255,.38);
  color: #fff;
}

.cell-hours .mini-kpi,
.mini-kpi {
  font-weight: 500;
}

.soft-badge,
.badge,
.status {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.employee-list-table td::before {
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
}

/* TempoGo final refinement: fuente fina, navbar centrado, hero limpio, geolocalizacion y descuadres */
body {
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.login-brand,
.brand,
.nav-links a,
.nav-user,
.btn,
.panel h2,
.metric span,
.metric strong,
.action-card strong,
.table th,
label,
.status,
.soft-badge,
.employee-section-title,
.employee-file .nav-pills .nav-link {
  font-weight: 500;
  letter-spacing: 0;
}

.hero-card h1,
.login-card h1,
.clock-box div {
  font-weight: 500;
  letter-spacing: -.01em;
}

.eyebrow {
  font-weight: 500;
  letter-spacing: .08em;
}

.login-card h1 {
  font-size: 1.58rem;
  margin-top: 18px;
}

.login-logo-png {
  height: 68px;
  width: 68px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

.btn {
  font-size: .94rem;
  font-weight: 500;
  border-radius: 7px;
  box-shadow: none;
  background-image: none;
}

.btn-primary {
  background: #2c7be5;
  border-color: #2c7be5;
  color: #fff;
}

.btn-primary:hover {
  background: #1f63be;
  border-color: #1f63be;
  color: #fff;
}

.btn-success {
  background: #1f9d55;
  border-color: #1f9d55;
  color: #fff;
}

.btn-success:hover {
  background: #188347;
  border-color: #188347;
  color: #fff;
}

.btn-danger {
  background: #d64545;
  border-color: #d64545;
  color: #fff;
}

.btn-danger:hover {
  background: #b83232;
  border-color: #b83232;
  color: #fff;
}

.btn-light,
.btn-secondary,
.btn-outline-secondary {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(151, 170, 198, .28);
  color: #e8eef8;
}

.btn-light:hover,
.btn-secondary:hover,
.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(151, 170, 198, .42);
  color: #fff;
}

.app-navbar {
  background: rgba(4, 8, 18, .98);
}

.navbar-inner {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 230px;
  align-items: center;
  gap: 18px;
}

.tempo-collapse {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.nav-links {
  justify-content: center;
  flex: initial;
}

.nav-links a {
  font-size: .94rem;
  color: rgba(238, 244, 255, .78);
}

.nav-user {
  justify-content: flex-end;
  color: rgba(238, 244, 255, .68);
}

.hero-card,
.hero-card.admin-hero {
  background: #101827;
  border: 1px solid rgba(151, 170, 198, .18);
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.hero-card::before,
.hero-card.admin-hero::before {
  display: none;
}

.hero-card h1 {
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
}

.hero-card p {
  color: #aab8cc;
}

.admin-hero {
  border-left: 3px solid rgba(102, 167, 255, .65);
}

.geo-card {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(151, 170, 198, .24);
  border-radius: 6px;
  background: rgba(0, 0, 0, .14);
  text-align: left;
}

.geo-card small {
  color: rgba(238, 244, 255, .58);
  font-size: .74rem;
}

.geo-card span,
.geo-card a {
  display: block;
  margin-top: 3px;
  font-size: .84rem;
  word-break: break-word;
}

.geo-card a {
  color: #9cc7ff;
}

.descuadre-alert {
  border: 1px solid rgba(240, 82, 82, .42);
  background: rgba(240, 82, 82, .12);
  color: #ffd0d0;
  border-radius: 7px;
  padding: 12px 14px;
}

.metric.metric-danger {
  border-color: rgba(240, 82, 82, .45);
  background: rgba(240, 82, 82, .10);
}

.metric.metric-danger strong {
  color: #ffb3b3;
}

.fichaje-row.row-alert {
  border: 1px solid rgba(240, 82, 82, .42);
  border-radius: 8px;
  padding: 10px;
  background: rgba(240, 82, 82, .055);
}

.fichaje-box.alerta {
  grid-column: 1 / -1;
  background: rgba(240, 82, 82, .14);
  border-color: rgba(240, 82, 82, .45);
  color: #ffd0d0;
  text-align: center;
}

@media (max-width: 991px) {
  .navbar-inner {
    display: flex;
  }

  .tempo-collapse {
    display: none !important;
  }

  .tempo-collapse.show,
  .tempo-collapse.collapsing {
    display: block !important;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-user {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .hero-card,
  .hero-card.admin-hero {
    border-left-width: 0;
  }
}

/* Password recovery / cleaner login */
.login-card-clean {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-brand-image {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo-web {
  width: min(180px, 48vw);
  height: auto;
  display: block;
  border-radius: 0;
}

.login-title-small {
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  margin: 8px 0 0;
}

.login-help {
  margin-top: 18px;
  text-align: center;
}

.login-help a {
  color: #b8d7ff;
  font-size: .95rem;
}

.login-help a:hover {
  color: #ffffff;
}

.password-strength {
  margin-top: 10px;
}

.password-strength-bar {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  margin-bottom: 6px;
}

.password-strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  transition: width .2s ease, background-color .2s ease;
  border-radius: inherit;
}

.password-strength-bar span.score-0,
.password-strength-bar span.score-1 {
  background: #e5484d;
}

.password-strength-bar span.score-2 {
  background: #f59f00;
}

.password-strength-bar span.score-3 {
  background: #ffd166;
}

.password-strength-bar span.score-4,
.password-strength-bar span.score-5 {
  background: #2fb344;
}

.password-strength small {
  color: var(--muted);
}


/* TempoGo UX refinements - Sora + clearer controls + payroll */
body {
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}
.login-brand,
.brand,
.nav-links a,
.nav-user,
.panel h2,
.employee-section-title,
.table th,
.metric strong,
.action-card strong,
.btn,
label {
  font-weight: 400;
}
.hero-card h1,
.login-card h1,
.clock-box div {
  font-weight: 500;
}
.form-control,
.form-select,
textarea.form-control {
  background-color: #111b2d;
  border-color: rgba(178, 198, 230, .42);
  color: #f4f8ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.form-control:hover,
.form-select:hover,
textarea.form-control:hover {
  border-color: rgba(178, 198, 230, .60);
  background-color: #132035;
}
.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  background-color: #15243b;
  border-color: #8bbdff;
  box-shadow: 0 0 0 3px rgba(102,167,255,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
.form-select option {
  background: #111827;
  color: #f4f8ff;
}
.btn {
  border-radius: 7px;
  font-weight: 400;
  letter-spacing: 0;
}
.payroll-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 10px;
}
.payroll-card strong { color: #fff; font-weight: 500; }
.payroll-card span { color: var(--muted); font-size: .88rem; }
.payroll-amount {
  font-size: 1.35rem;
  color: #c8f7d8;
  font-weight: 500;
  white-space: nowrap;
}
.payroll-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(53,196,107,.13);
  color: #c8f7d8;
  border: 1px solid rgba(53,196,107,.32);
  font-size: .78rem;
}
@media (max-width: 760px) {
  .payroll-card {
    grid-template-columns: 1fr;
  }
  .payroll-amount { font-size: 1.2rem; }
}

/* Ajustes / catálogos */
.tempo-settings-dropdown {
  position: relative;
}

.tempo-settings-dropdown > a {
  display: inline-flex;
  align-items: center;
}

.tempo-settings-dropdown .dropdown-menu {
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  padding: 8px;
  min-width: 230px;
}

.tempo-settings-dropdown .dropdown-item {
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 10px;
  font-weight: 400;
}

.tempo-settings-dropdown .dropdown-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

.settings-inline-form {
  display: contents;
}

.settings-table .form-control,
.settings-table .form-select {
  min-width: 140px;
}

.color-input {
  width: 64px;
  min-width: 64px !important;
  padding: 4px;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-weight: 400;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.grid-span-3 {
  grid-column: 1 / -1;
}

.soft-info-box {
  padding: 14px 16px;
  border: 1px solid rgba(102,167,255,.22);
  background: rgba(102,167,255,.08);
  color: #d8e8ff;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .settings-table,
  .settings-table thead,
  .settings-table tbody,
  .settings-table th,
  .settings-table td,
  .settings-table tr {
    display: block;
    width: 100%;
  }

  .settings-table thead {
    display: none;
  }

  .settings-table tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .settings-table td {
    border: 0;
    padding: 8px 0;
  }

  .settings-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: .72rem;
    margin-bottom: 5px;
  }

  .settings-inline-form {
    display: block;
  }

  .settings-table .text-end {
    text-align: left !important;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================
   RRHH ANNOTATIONS
========================= */
.rrhh-only-panel {
  border-color: rgba(77, 171, 247, .24);
}

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

.annotation-help {
  background: rgba(77, 171, 247, .08);
  border: 1px solid rgba(77, 171, 247, .18);
  border-radius: 5px;
  padding: 12px;
  color: var(--muted);
}

.annotation-help span {
  display: block;
  font-size: .76rem;
  margin-bottom: 4px;
}

.annotation-help strong {
  display: block;
  color: #dbeafe;
  font-weight: 400;
  font-size: .86rem;
}

.annotation-list {
  display: grid;
  gap: 10px;
}

.annotation-card {
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px;
}

.annotation-card p {
  margin: 8px 0 10px;
  color: var(--ink);
  line-height: 1.45;
}

.annotation-meta,
.annotation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.annotation-meta span,
.annotation-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  color: #cbd5e1;
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .18);
}

.annotation-tags span:last-child {
  color: #9cc7ff;
  border-color: rgba(77, 171, 247, .22);
  background: rgba(77, 171, 247, .09);
}

/* =========================================================
   FIX 2026-05-11: navbar centrado, grids compactos y formularios
   ========================================================= */
.app-navbar {
  min-height: 62px !important;
  background: #050814 !important;
  border-bottom: 1px solid #1e293b !important;
  color: #fff !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35) !important;
  padding: 0 !important;
}

.navbar-inner {
  width: 100% !important;
  min-height: 62px !important;
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) 260px !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 22px !important;
}

.nav-left {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.nav-center {
  min-width: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.nav-center.collapse {
  display: flex !important;
  visibility: visible !important;
}

.nav-right {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: nowrap !important;
}

.nav-links a,
.tempo-settings-dropdown > a {
  color: #cbd5e1 !important;
  font-weight: 400 !important;
  padding: 10px 9px !important;
  border-radius: 5px !important;
  font-size: .82rem !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.nav-links a:hover,
.tempo-settings-dropdown > a:hover {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

.nav-user {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  color: #cbd5e1 !important;
  font-weight: 400 !important;
  font-size: .84rem !important;
}

.user-avatar {
  flex: 0 0 auto !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(77, 171, 247, .14) !important;
  border: 1px solid rgba(77, 171, 247, .28) !important;
  color: #dbeafe !important;
  font-size: .78rem !important;
  font-weight: 400 !important;
}

.user-name {
  min-width: 0 !important;
  max-width: 132px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  color: #d7deea !important;
}

.logout-form {
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.tempo-toggler {
  display: none !important;
  background: transparent !important;
  color: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 5px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
}

.tempo-toggler span {
  display: block !important;
  width: 20px !important;
  height: 2px !important;
  background: #fff !important;
  margin: 4px 0 !important;
}

.app-grid,
.table {
  font-size: .78rem !important;
}

.app-grid th,
.app-grid td,
.table th,
.table td {
  padding: .46rem .52rem !important;
}

.app-grid th,
.table th {
  font-size: .72rem !important;
  font-weight: 400 !important;
  color: #9fb0c6 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.app-grid td,
.table td {
  font-size: .78rem !important;
}

.employees-table .employee-name-cell strong {
  font-size: .8rem !important;
  font-weight: 400 !important;
}

.employees-table .cell-hours .mini-kpi,
.employees-table .cell-hours strong {
  display: inline-flex !important;
  min-width: 56px !important;
  justify-content: center !important;
  padding: 4px 7px !important;
  background: rgba(47, 128, 237, .14) !important;
  border: 1px solid rgba(47, 128, 237, .35) !important;
  color: #9cc7ff !important;
  border-radius: 4px !important;
  font-size: .76rem !important;
  font-weight: 400 !important;
}

.employees-table .status {
  padding: 4px 7px !important;
  font-size: .7rem !important;
}

.clickable-row {
  cursor: pointer !important;
}

.clickable-row:hover td {
  background: rgba(255,255,255,.035) !important;
}

.metric-link {
  color: inherit !important;
  display: block !important;
  text-decoration: none !important;
}

.metric-link:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 8px 24px rgba(47, 128, 237, .15) !important;
}

.form-control:required,
.form-select:required,
textarea:required {
  border-left: 3px solid rgba(77,171,247,.75) !important;
}

@media (max-width: 1240px) {
  .navbar-inner {
    grid-template-columns: 170px minmax(0, 1fr) 230px !important;
    padding: 0 16px !important;
    gap: 8px !important;
  }
  .nav-links a,
  .tempo-settings-dropdown > a {
    padding: 9px 6px !important;
    font-size: .76rem !important;
  }
  .user-name { max-width: 95px !important; }
  .app-logo { max-width: 150px !important; }
}

@media (max-width: 1040px) {
  .navbar-inner { grid-template-columns: 150px minmax(0, 1fr) 200px !important; }
  .nav-links a,
  .tempo-settings-dropdown > a {
    padding: 8px 5px !important;
    font-size: .72rem !important;
  }
  .user-name { max-width: 75px !important; }
}

@media (max-width: 900px) {
  .app-navbar { min-height: auto !important; }
  .navbar-inner {
    min-height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "logo toggle"
      "menu menu"
      "user user" !important;
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .nav-left { grid-area: logo !important; }
  .tempo-toggler {
    display: inline-block !important;
    grid-area: toggle !important;
    justify-self: end !important;
  }
  .nav-center {
    grid-area: menu !important;
    width: 100% !important;
    justify-content: stretch !important;
  }
  .nav-center.collapse {
    display: none !important;
  }
  .nav-center.collapse.show,
  .nav-center.collapsing {
    display: block !important;
  }
  .nav-links {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
  }
  .nav-links a,
  .tempo-settings-dropdown > a {
    padding: 12px !important;
    font-size: .9rem !important;
    background: rgba(255, 255, 255, .04) !important;
  }
  .nav-right {
    grid-area: user !important;
    width: 100% !important;
    justify-content: stretch !important;
  }
  .nav-user {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  .user-name { max-width: calc(100vw - 180px) !important; }
}

@media (max-width: 760px) {
  .employees-table,
  .employees-table thead,
  .employees-table tbody,
  .employees-table th,
  .employees-table td,
  .employees-table tr {
    display: block !important;
    width: 100% !important;
  }
  .employees-table { min-width: 0 !important; }
  .employees-table thead { display: none !important; }
  .employees-table tr {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22) !important;
  }
  .employees-table td {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    border: 0 !important;
    padding: 7px 0 !important;
    color: var(--ink) !important;
  }
  .employees-table td::before {
    content: attr(data-label) !important;
    color: var(--muted) !important;
    font-size: .68rem !important;
    font-weight: 400 !important;
  }
}

/* =========================
   PORTAL EMPLEADO - MODO MARCAJES MOVIL
========================= */
.mobile-punch-card {
  display: none;
}

.punch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.punch-btn {
  min-height: 58px;
  font-size: .98rem;
}

.finish-day-btn {
  width: 100%;
}

.day-strip {
  background: #159ee4;
  color: #fff;
  padding: 9px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

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

.fichaje-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.fichaje-box {
  min-width: 0;
  min-height: 76px;
  border-radius: 5px;
  padding: 12px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fichaje-box small {
  display: block;
  font-size: .68rem;
  color: inherit;
  opacity: .78;
}

.fichaje-box strong {
  display: block;
  font-size: 1.22rem;
  font-weight: 400;
  color: inherit;
  margin-top: 2px;
}

.fichaje-box span {
  display: block;
  margin-top: 4px;
  font-size: .75rem;
  opacity: .78;
  overflow-wrap: anywhere;
}

.fichaje-box.entrada {
  background: rgba(47, 179, 68, .12);
  border-color: rgba(47, 179, 68, .46);
  color: #98f5aa;
  text-align: left;
}

.fichaje-box.salida {
  background: rgba(229, 72, 77, .12);
  border-color: rgba(229, 72, 77, .46);
  color: #ffacb0;
  text-align: right;
}

.fichaje-box.parada {
  grid-column: 1 / -1;
  background: rgba(245, 159, 0, .12);
  border-color: rgba(245, 159, 0, .44);
  color: #ffd166;
  text-align: center;
}

.fichaje-box.empty {
  background: rgba(148, 163, 184, .1);
  border-color: rgba(148, 163, 184, .18);
  color: #748195;
}

@media (max-width: 900px) {
  .employee-mobile-shell {
    max-width: 560px;
    margin: 0 auto;
  }

  .portal-hero-desktop {
    display: none !important;
  }

  .mobile-punch-card {
    display: block;
    text-align: center;
    padding: 22px 12px 18px;
  }

  .mobile-topline {
    color: #9cc7ff;
    font-size: .82rem;
    margin-bottom: 14px;
  }

  .mobile-clock-time {
    font-size: clamp(4rem, 18vw, 5.8rem);
    line-height: .95;
    font-weight: 300;
    color: #35c8ff;
    letter-spacing: -.06em;
  }

  .mobile-clock-date {
    margin-top: 16px;
    color: #9cc7ff;
    font-size: .94rem;
  }

  .mobile-gps {
    margin-top: 10px;
    color: #8ee99f;
    font-size: .84rem;
  }

  .punch-panel {
    padding-top: 14px;
  }

  .punch-actions {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .punch-actions .btn,
  .punch-btn {
    min-height: 66px;
    font-size: 1.02rem;
  }

  .finish-day-btn {
    min-height: 48px;
  }

  .day-strip {
    margin: -2px -2px 14px;
    border-radius: 3px;
    font-size: 1rem;
  }

  .fichaje-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  .fichaje-box {
    min-height: 82px;
    padding: 12px 10px;
  }

  .fichaje-box strong {
    font-size: 1.28rem;
  }

  .employee-quick-links,
  .employee-incident-panel {
    margin-top: 14px;
  }
}

@media (max-width: 420px) {
  .punch-actions {
    gap: 9px;
  }

  .punch-actions .btn,
  .punch-btn {
    min-height: 62px;
    font-size: .96rem;
  }

  .mobile-clock-time {
    font-size: 4.2rem;
  }

  .fichaje-box {
    min-height: 76px;
  }
}

/* === TempoGo final hotfix: navbar, frozen buttons, mobile punch === */
@media (min-width: 901px) {
  .nav-center.collapse,
  .tempo-collapse.collapse {
    display: flex !important;
    visibility: visible !important;
  }
}

@media (max-width: 900px) {
  .nav-center.collapse,
  .tempo-collapse.collapse {
    display: none !important;
  }

  .nav-center.collapse.show,
  .tempo-collapse.collapse.show,
  .nav-center.collapsing,
  .tempo-collapse.collapsing {
    display: block !important;
  }
}

.fichaje-actions .btn:disabled,
.punch-actions .btn:disabled,
.fichaje-actions .btn.disabled,
.punch-actions .btn.disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  background: #1b2638 !important;
  border-color: #3a465c !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.fichaje-actions .btn.is-busy,
.punch-actions .btn.is-busy,
.btn.is-busy {
  pointer-events: none;
  opacity: .72;
  cursor: wait;
}

.punch-actions .btn-warning,
.fichaje-actions .btn-warning {
  background: #f59f00 !important;
  border-color: #f59f00 !important;
  color: #111827 !important;
}

.punch-actions .punch-resume {
  color: #111827 !important;
  font-weight: 500;
}

.geo-error {
  color: #ff9da1 !important;
}


/* === Geo warnings visible to employee === */
.geo-warning {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(245, 159, 0, .14);
  border: 1px solid rgba(245, 159, 0, .45);
  color: #ffd166;
}

.geo-warning strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #ffe1a3;
}

.geo-warning span {
  display: block;
  font-size: .88rem;
  line-height: 1.35;
}

.geo-warning.employee-visible {
  border-color: rgba(229, 72, 77, .35);
  background: rgba(229, 72, 77, .10);
  color: #ffc2c4;
}

.geo-warning.employee-visible strong {
  color: #ff9da1;
}

.geo-warning.compact {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .84rem;
}

.geo-mini-alert,
.geo-mini-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  line-height: 1;
}

.geo-mini-alert {
  background: rgba(229, 72, 77, .14);
  border: 1px solid rgba(229, 72, 77, .38);
  color: #ff9da1;
}

.geo-mini-ok {
  background: rgba(47, 179, 68, .13);
  border: 1px solid rgba(47, 179, 68, .38);
  color: #8ee99f;
}

/* === TempoGo consolidated fixes: menu, finish button and mobile history === */
@media (min-width: 901px) {
  .app-navbar {
    min-height: 62px !important;
    padding: 0 !important;
  }

  .navbar-inner {
    width: 100% !important;
    min-height: 62px !important;
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr) 280px !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 24px !important;
  }

  .nav-left {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .nav-center,
  .nav-center.collapse,
  .tempo-collapse.collapse {
    display: flex !important;
    visibility: visible !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .nav-right {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .nav-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }

  .tempo-toggler {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .navbar-inner {
    min-height: 58px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
      "logo user toggle"
      "menu menu menu" !important;
    align-items: center !important;
    padding: 8px 12px !important;
    gap: 8px !important;
  }

  .nav-left {
    grid-area: logo !important;
  }

  .nav-right {
    grid-area: user !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .tempo-toggler {
    grid-area: toggle !important;
    display: inline-flex !important;
    width: 42px !important;
    height: 38px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    padding: 0 !important;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid #2f3b4f !important;
    border-radius: 6px !important;
  }

  .tempo-toggler span {
    width: 19px !important;
    height: 2px !important;
    margin: 3px 0 !important;
    background: #dbeafe !important;
  }

  .nav-center {
    grid-area: menu !important;
    width: 100% !important;
  }

  .nav-center.collapse,
  .tempo-collapse.collapse {
    display: none !important;
  }

  .nav-center.collapse.show,
  .tempo-collapse.collapse.show,
  .nav-center.collapsing,
  .tempo-collapse.collapsing {
    display: block !important;
  }

  .nav-links {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #1e293b !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
    width: 100% !important;
  }

  .nav-links a,
  .tempo-settings-dropdown > a {
    padding: 11px 12px !important;
    border-radius: 6px !important;
    background: rgba(255,255,255,.04) !important;
    color: #dbeafe !important;
    font-size: .88rem !important;
  }

  .nav-user {
    justify-content: center !important;
    width: auto !important;
    max-width: 48vw !important;
    gap: 7px !important;
  }

  .user-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: .72rem !important;
  }

  .user-name {
    max-width: 30vw !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: .78rem !important;
  }

  .logout-form {
    display: none !important;
  }
}

.finish-day-btn,
.btn-finish {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  font-weight: 500 !important;
}

.finish-day-btn:hover,
.btn-finish:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

.history-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  width: 100%;
}

.history-card {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  min-width: 0;
}

.history-card.has-warning {
  border-color: rgba(245,159,0,.45);
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.history-date {
  display: block;
  color: #fff;
  font-size: .98rem;
}

.history-card-head small {
  color: var(--muted);
}

.history-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-card-grid div {
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 5px;
  padding: 9px;
  min-width: 0;
}

.history-card-grid span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
}

.history-card-grid strong {
  display: block;
  color: #fff;
  font-size: .9rem;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.history-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  color: #ffd166;
  font-size: .82rem;
}

@media (max-width: 900px) {
  .history-card-list {
    grid-template-columns: 1fr !important;
  }

  .history-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Teletrabajo del día */
.telework-box {
  margin: 12px 0 4px;
  padding: 12px;
  border: 1px solid rgba(77, 171, 247, .28);
  background: rgba(77, 171, 247, .08);
  border-radius: 6px;
}

.telework-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #dbeafe;
}

.telework-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.telework-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

/* RRHH alerts */
.alert-list {
  display: grid;
  gap: 12px;
}

.alert-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 14px;
}

.alert-card.danger {
  border-color: rgba(229, 72, 77, .36);
  background: rgba(229, 72, 77, .08);
}

.alert-card.ok {
  border-color: rgba(47, 179, 68, .30);
  background: rgba(47, 179, 68, .07);
}

.alert-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
}

.alert-card h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
}

.alert-card p {
  margin: 0;
  color: var(--ink);
}

.alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .78rem;
}

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

.soft-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: .75rem;
  border: 1px solid var(--line);
}

.soft-badge.danger {
  color: #ff9da1;
  border-color: rgba(229, 72, 77, .38);
  background: rgba(229, 72, 77, .12);
}

.soft-badge.ok {
  color: #8ee99f;
  border-color: rgba(47, 179, 68, .38);
  background: rgba(47, 179, 68, .12);
}

@media (max-width: 900px) {
  .alert-card-main {
    grid-template-columns: 1fr;
  }

  .alert-actions .btn {
    width: 100%;
  }
}

/* Libro de agravios */
.agravio-message {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.agravio-message details {
  margin-top: 8px;
}

.agravio-message summary {
  cursor: pointer;
  color: #9cc7ff;
  font-size: .8rem;
}

.agravio-message pre {
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border-radius: 5px;
  background: #07101f;
  color: #dbeafe;
  border: 1px solid var(--line);
  font-size: .72rem;
  white-space: pre-wrap;
}

.agravio-resolve-form {
  min-width: 220px;
}

.app-grid {
  font-size: .82rem;
}

.app-grid th,
.app-grid td {
  padding: .5rem .55rem;
}

/* =========================
   EMPLOYEE LOCATION MAP
========================= */
.location-map-panel {
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.location-search-grid {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(110px, .8fr) minmax(150px, 1fr) minmax(90px, .7fr) auto;
  gap: 12px;
  align-items: end;
}

.location-search-main {
  min-width: 0;
}

.location-search-action {
  display: flex;
  align-items: end;
}

.location-search-button {
  min-width: 122px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.location-map-wrapper {
  width: 100%;
  border: 1px solid #2f3b4f;
  border-radius: 6px;
  overflow: hidden;
  background: #0a1222;
}

.location-map {
  width: 100%;
  height: 360px;
  min-height: 360px;
}

.location-map-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
}

.location-map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.location-map-help,
.location-save-hint {
  color: var(--muted);
  font-size: .82rem;
}

#ubicacionLatVista,
#ubicacionLngVista {
  color: #9cc7ff;
}

@media (max-width: 900px) {
  .location-search-grid {
    grid-template-columns: 1fr;
  }

  .location-search-button,
  .location-map-actions .btn {
    width: 100%;
  }

  .location-map {
    height: 300px;
    min-height: 300px;
  }

  .location-map-frame {
    min-height: 300px;
  }
}

/* =========================================================
   PATCH: menu móvil compacto + localizaciones
   ========================================================= */
.employee-tabs .nav-link[data-bs-target="#ubicaciones"] {
  min-width: auto;
}

.location-map,
.location-map-frame {
  cursor: crosshair;
}


@media (max-width: 900px) {
  .navbar-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "logo user toggle"
      "menu menu menu";
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
  }

  .nav-left { grid-area: logo; }
  .nav-right { grid-area: user; min-width: 0; justify-content: center; }
  .tempo-toggler { grid-area: toggle; display: inline-flex; }
  .nav-center { grid-area: menu; }

  .nav-user {
    min-width: 0;
    justify-content: center;
    gap: 7px;
  }

  .user-name {
    max-width: 34vw;
    font-size: .78rem;
  }

  .logout-form .btn {
    min-height: 30px;
    padding: .25rem .5rem;
    font-size: .75rem;
  }

  .nav-center.collapse { display: none !important; }
  .nav-center.collapse.show { display: block !important; }
  .nav-center.collapsing { display: block !important; }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #1e293b;
    overflow: visible;
    max-height: none;
  }

  .nav-links a,
  .tempo-settings-dropdown > a {
    width: 100%;
    padding: 11px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,.045);
    color: #dbeafe;
    white-space: normal;
  }

  .tempo-settings-dropdown,
  .tempo-settings-dropdown .dropdown-menu {
    width: 100%;
  }

  .tempo-settings-dropdown .dropdown-menu {
    position: static !important;
    transform: none !important;
    margin-top: 5px;
    border: 1px solid #2f3b4f;
    background: #0b1220;
  }
}


.tempo-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(4px);
}

.tempo-loader.is-visible {
  display: flex;
}

.tempo-loader-box {
  min-width: 220px;
  max-width: calc(100vw - 40px);
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(148, 163, 184, .28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
  color: #f8fafc;
  text-align: center;
}

.tempo-loader-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 13px;
  border-radius: 999px;
  border: 4px solid rgba(226, 232, 240, .24);
  border-top-color: #f8fafc;
  animation: tempo-loader-spin .8s linear infinite;
}

.tempo-loader-text {
  font-weight: 600;
  font-size: .95rem;
}

body.tempo-busy {
  overflow: hidden;
}

@keyframes tempo-loader-spin {
  to { transform: rotate(360deg); }
}


/* === Restored file inputs and employee photo === */
input[type="file"].form-control {
  padding: .58rem .75rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--ink);
  border-radius: 5px;
}

input[type="file"].form-control::file-selector-button {
  margin: -.58rem .75rem -.58rem -.75rem;
  padding: .58rem .9rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(102,167,255,.16);
  color: #dbeafe;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"].form-control:hover::file-selector-button {
  background: rgba(102,167,255,.25);
}

.employee-photo-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.employee-photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,.32);
  background: rgba(15,23,42,.7);
}

.employee-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  border: 1px dashed rgba(148,163,184,.45);
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 700;
  background: rgba(15,23,42,.7);
}

.employee-photo-actions {
  flex: 1;
  min-width: 0;
}

.btn-icon.photo-upload-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.photo-upload-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.employee-photo-form {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.photo-upload-help {
    color: #94a3b8;
    font-size: .9rem;
}

.photo-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2,6,23,.78);
    backdrop-filter: blur(8px);
}

.photo-crop-modal.show {
    display: flex;
}

.photo-crop-open {
    overflow: hidden;
}

.photo-crop-dialog {
    width: min(100%, 480px);
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 24px 70px rgba(0,0,0,.42);
    padding: 1rem;
}

.photo-crop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.photo-crop-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.photo-crop-header p {
    margin: .25rem 0 0;
    color: #94a3b8;
    font-size: .9rem;
}

.photo-crop-close {
    flex: 0 0 auto;
    font-size: 1.35rem;
    line-height: 1;
}

.photo-crop-body {
    display: grid;
    gap: 1rem;
}

.photo-crop-frame {
    position: relative;
    width: min(72vw, 320px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid rgba(96,165,250,.95);
    border-radius: 18px;
    background: rgba(15,23,42,.9);
    cursor: grab;
    touch-action: none;
}

.photo-crop-frame:active {
    cursor: grabbing;
}

.photo-crop-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 999px rgba(15,23,42,.08);
}

.photo-crop-frame img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center;
}

.photo-crop-zoom {
    display: grid;
    gap: .45rem;
    color: #cbd5e1;
    font-weight: 600;
}

.photo-crop-zoom input {
    width: 100%;
}

.photo-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
