/* Personal portal. Preserve the product palette and keep every rule role-scoped. */
body.employee-app {
  --employee-bg: #f6f8f3;
  --employee-surface: #fff;
  --employee-ink: #273328;
  --employee-muted: #626f60;
  --employee-green: #496b37;
  --employee-sage: #eaf1df;
  --employee-line: #dfe5d9;
  --employee-ease: cubic-bezier(.23, 1, .32, 1);
  background: var(--employee-bg);
  color: var(--employee-ink);
  height: auto !important;
  min-height: 100dvh;
  overflow: visible;
  -webkit-text-size-adjust: 100%;
}
body.employee-app::before { display: none; }
body.employee-app .sidebar,
body.employee-app .nav-sidebar,
body.employee-app .mobile-tabbar,
body.employee-app .mobile-nav-toggle,
body.employee-app .mobile-nav-backdrop { display: none !important; }
body.employee-app .app { display: block; height: auto; min-height: 100dvh; overflow: visible; }
body.employee-app .main-content {
  width: 100%; max-width: 720px; min-height: 100dvh; height: auto !important;
  margin: 0 auto !important; padding: 0 24px calc(124px + env(safe-area-inset-bottom)) !important;
  background: transparent !important; overflow: visible !important;
}
body.employee-app .view { padding: 0 !important; background: transparent !important; overflow: visible; }
body.employee-app .employee-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(20px + env(safe-area-inset-top)) 0 32px; }
body.employee-app .employee-brand { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
body.employee-app .employee-brand > span { display: grid; place-items: center; width: 33px; height: 36px; background: #dce7c9; color: #456231; border-radius: 11px; font-size: 23px; }
body.employee-app .employee-label { font-size: 12px; color: var(--employee-muted); }
body.employee-app .view-header { margin: 0 0 24px; padding: 0; }
body.employee-app .view-header h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -.75px; line-height: 1.25; }
body.employee-app .view-header p { margin: 0; font-size: 14px; line-height: 1.55; font-weight: 400; color: var(--employee-muted); }
body.employee-app .me-grid, body.employee-app .me-col { display: flex; flex-direction: column; gap: 30px; align-items: stretch; }
body.employee-app .me-card { min-width: 0; padding: 22px; border: 1px solid var(--employee-line); border-radius: 18px; background: var(--employee-surface); box-shadow: none; }
body.employee-app .me-card-tit { margin: 0 0 16px; font-size: 15px; font-weight: 600; letter-spacing: -.15px; text-transform: none; color: var(--employee-ink); }
body.employee-app .conc-tag { padding: 0; background: transparent; color: var(--employee-muted); font-size: 13px; font-weight: 400; }
/* The shift is the primary action, with status and elapsed time kept together. */
body.employee-app .me-fichar { position: relative; isolation: isolate; overflow: hidden; width: 100%; text-align: left; background: var(--employee-sage) !important; border: 0 !important; border-radius: 22px; padding: 22px; box-shadow: 0 6px 18px #2c452309; transition: background-color 240ms ease; }
body.employee-app .employee-clock-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
body.employee-app .employee-clock-top .me-card-tit { margin: 0; color: #384f2c; }
body.employee-app .me-estado { margin: 0; justify-content: flex-start; gap: 7px; }
body.employee-app .me-estado b { font-size: 12px; font-weight: 500; color: #506345; }
body.employee-app .me-estado-dot { width: 7px; height: 7px; box-shadow: none; background: #879a7c; }
body.employee-app .me-dot-dentro { background: var(--employee-green); }
body.employee-app .me-reloj { text-align: left; margin: 24px 0; }
body.employee-app #me-hoy-horas { display: block; font-size: 44px; font-weight: 500; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; line-height: 1.15; color: #293e22; }
body.employee-app #me-hoy-horas .employee-time-unit { display: inline; font-size: 24px; font-weight: 400; letter-spacing: -.4px; margin-inline: 3px 6px; color: #516a42; }
body.employee-app .me-reloj > small { display: block; margin-top: 6px; color: #57694c; font-size: 12px; font-weight: 400; text-align: left; }
body.employee-app #me-estado-sub { margin-top: 16px; font-size: 12px; line-height: 1.5; }
body.employee-app #me-botones { display: flex; gap: 10px; margin: 0; }
body.employee-app #me-botones button { flex: 1; min-width: 0; min-height: 50px; }
body.employee-app .btn { min-height: 44px; border-radius: 12px !important; font-size: 14px; font-weight: 500; box-shadow: none !important; background-image: none !important; transition: transform 140ms var(--employee-ease), background-color 140ms ease; }
body.employee-app .btn-primary { background: var(--employee-green) !important; color: #fff !important; border: 1px solid var(--employee-green) !important; }
body.employee-app .btn-secondary { background: var(--employee-surface) !important; color: var(--employee-ink) !important; border: 1px solid var(--employee-line) !important; }
body.employee-app .btn:active:not(:disabled):not(:focus-visible) { transform: scale(.98); }
body.employee-app .btn:disabled { cursor: wait; opacity: .65; }
body.employee-app .btn:focus-visible, body.employee-app button:focus-visible, body.employee-app summary:focus-visible { outline: 2px solid var(--employee-green); outline-offset: 3px; }
body.employee-app #me-fichajes-hoy { display: block; margin: 18px 0 0; }
body.employee-app #me-fichajes-hoy[hidden] { display: none !important; }
body.employee-app .employee-history { border-top: 1px solid #cedabb; }
body.employee-app .employee-history summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0 0; color: #506345; font-size: 12px; font-weight: 400; cursor: pointer; list-style: none; }
body.employee-app .employee-history summary::-webkit-details-marker { display: none; }
body.employee-app .employee-history summary svg { width: 18px; height: 18px; margin-left: auto; flex-shrink: 0; transition: transform 180ms var(--employee-ease); }
body.employee-app .employee-history[open] summary svg { transform: rotate(180deg); }
body.employee-app .employee-history-count { font-variant-numeric: tabular-nums; }
body.employee-app .employee-history ol { margin: 10px 0 0; padding: 0; list-style: none; }
body.employee-app .employee-history li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 13px; color: #43513c; }
body.employee-app .employee-history li + li { border-top: 1px solid #d6e1c6; }
body.employee-app .employee-history time { font-variant-numeric: tabular-nums; }
/* A single familiar checklist, including on Hoy; no extra card around the cards. */
body.employee-app #me-tareas-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.employee-app #me-tareas-card > .me-card-tit { margin-bottom: 14px; }
body.employee-app .tar-lista { gap: 20px; }
body.employee-app .tar-item { --task-padding: 18px; display: grid; grid-template-columns: 24px minmax(0, 1fr); min-width: 0; column-gap: 13px; row-gap: 8px; padding: var(--task-padding) var(--task-padding) 0; border: 1px solid #d3dccb; border-radius: 16px; background: var(--employee-surface); box-shadow: none; font-weight: 400; }
body.employee-app .tar-cuerpo { display: contents; }
body.employee-app .tar-cuerpo > b { grid-column: 2; grid-row: 1; font-size: 15px; line-height: 1.45; font-weight: 600; letter-spacing: -.1px; color: var(--employee-ink); overflow-wrap: anywhere; }
body.employee-app .tar-detalle { grid-column: 2; font-size: 13px; line-height: 1.55; font-weight: 400; color: var(--employee-muted); overflow-wrap: anywhere; }
/* The quiet footer makes the boundary of each task visible at a glance. */
body.employee-app .tar-meta { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; column-gap: 12px; row-gap: 6px; margin: 8px calc(-1 * var(--task-padding)) 0; padding: 11px var(--task-padding); border-top: 1px solid #e1e8d9; border-radius: 0 0 15px 15px; background: #eef3e7; font-size: 12px; line-height: 1.5; font-weight: 400; color: #55664c; }
body.employee-app .tar-foto { grid-column: 2; }
body.employee-app .tar-item:has(.tar-urgente) .tar-meta { background: #f7efe4; border-color: #eadcc9; color: #786044; }
body.employee-app .tar-item:has(.tar-urgente) .tar-foto-pide { color: #786044; }
body.employee-app .tar-hecha .tar-meta { background: #e9eee3; border-color: #dbe3d4; }
body.employee-app .tar-item:not(.tar-hecha) + .tar-hecha { margin-top: 8px; }
body.employee-app .tar-foto-pide { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; font-weight: 400; color: var(--employee-green); }
body.employee-app .tar-foto-pide svg { flex: none; }
body.employee-app .tar-urgente { padding: 0; border-radius: 0; background: transparent; color: #97513f; font-size: 12px; font-weight: 500; }
body.employee-app .tar-tarde { font-size: 12px; font-weight: 400; color: #97513f; }
body.employee-app .tar-hecha { opacity: 1; background: #f0f3ec; box-shadow: none; border-color: transparent; }
body.employee-app .tar-hecha .tar-cuerpo > b { color: #62715b; text-decoration-thickness: 1px; }
body.employee-app .tar-item:has(input:focus-visible) { outline: 2px solid var(--employee-green); outline-offset: 3px; }
body.employee-app .tar-item input[type=checkbox] { grid-column: 1; grid-row: 1; appearance: none; -webkit-appearance: none; width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin-top: 1px; border: 1.5px solid #7b8b71 !important; border-radius: 8px; background: var(--employee-surface) !important; transition: background-color 140ms ease, border-color 140ms ease; }
/* Hechas: cruz blanca en el recuadro. !important porque el tema claro fuerza el fondo de todos los campos */
body.employee-app .tar-item input[type=checkbox]:checked { border-color: var(--employee-green) !important; background: var(--employee-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center/18px no-repeat !important; }
body.employee-app .tar-item:has(input:disabled) { cursor: wait; }
body.employee-app .tar-item input:disabled { opacity: .5; }
/* Account totals share a surface. Leave belongs beside its request action. */
body.employee-app .employee-account-content { display: flex; flex-direction: column; gap: 20px; }
body.employee-app .me-kpis { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; margin: 0; border: 1px solid var(--employee-line); border-radius: 18px; overflow: hidden; background: var(--employee-surface); }
body.employee-app .me-kpis .fin-kpi { min-width: 0; gap: 8px; padding: 20px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body.employee-app .me-kpis .fin-kpi:nth-child(2) { border-left: 1px solid var(--employee-line) !important; }
/* Horas del mes a lo ancho; debajo, vacaciones */
body.employee-app .me-kpis .fin-kpi:first-child:nth-last-child(2) { grid-column: 1 / -1; }
body.employee-app .me-kpis .fin-kpi:nth-child(2):last-child { border-left: 0 !important; }
body.employee-app .me-kpi-horas .me-kpi-sub b { font-weight: 600; color: var(--employee-ink); }
body.employee-app .me-kpis .fin-kpi:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; background: var(--employee-sage) !important; }
body.employee-app .fin-kpi-lbl { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--employee-muted); }
body.employee-app .fin-kpi-val { font-size: 28px !important; font-weight: 500; letter-spacing: -.7px; line-height: 1.2; color: var(--employee-ink); }
body.employee-app .me-kpi-sub { font-size: 12px; font-weight: 400; color: var(--employee-muted); overflow-wrap: anywhere; }
body.employee-app .fin-kpi:last-child .fin-kpi-lbl { color: #506345; }
body.employee-app #me-vac-disp { grid-row: 1 / 3; grid-column: 2; font-size: 32px !important; color: #384f2c; }
body.employee-app #me-vac-sub { color: #57694c; }
body.employee-app #btn-me-solicitar { grid-column: 1 / -1; margin-top: 8px; width: 100%; }
body.employee-app .seg-vacio, body.employee-app .seg-item small { font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--employee-muted); }
body.employee-app .seg-item { padding: 14px 0; min-width: 0; overflow-wrap: anywhere; }
body.employee-app .seg-item b { font-size: 14px; font-weight: 500; }
body.employee-app .me-doc { border-radius: 6px; }
body.employee-app .me-doc:focus-visible { outline: 2px solid var(--employee-green); outline-offset: 3px; }
body.employee-app #me-avisos { padding: 20px; background: var(--employee-surface); border: 1px solid var(--employee-line); border-radius: 18px; flex-wrap: wrap; }
body.employee-app .employee-logout { background: transparent; align-self: flex-start; color: var(--employee-muted); padding-inline: 0; }
/* Floating navigation: one moving selection, no animation on keyboard navigation. */
body.employee-app #employee-nav { --employee-nav-index: 0; position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 420px); display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; padding: 8px; background: rgba(255,255,255,.94); border: 1px solid #e0e6d9; border-radius: 24px; box-shadow: 0 8px 28px #25302414, 0 2px 6px #25302405; z-index: 100; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.employee-app .employee-nav-marker { position: absolute; left: 8px; top: 8px; bottom: 8px; width: calc((100% - 24px) / 3); border-radius: 17px; background: var(--employee-sage); transform: translateX(calc(var(--employee-nav-index) * (100% + 4px))); transition: transform 240ms var(--employee-ease); pointer-events: none; }
body.employee-app #employee-nav.is-instant .employee-nav-marker { transition: none; }
body.employee-app #employee-nav button { position: relative; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; color: var(--employee-muted); padding: 6px; font: inherit; font-size: 11px; font-weight: 500; border-radius: 17px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.employee-app #employee-nav button.active { color: var(--employee-green); }
body.employee-app #employee-nav svg { width: 21px; height: 21px; }
body.employee-app.hay-modal #employee-nav, body.employee-app:has(.ui-dialog-overlay) #employee-nav { display: none; }
body.employee-app.hay-modal, body.employee-app:has(.ui-dialog-overlay) { overflow: hidden; }
body:not(.employee-app) .employee-header, body:not(.employee-app) #employee-nav { display: none; }
/* Dialogs and fields retain the existing confirmation and photo flows. */
body.employee-app .ui-dialog-overlay { background: #24321f55; backdrop-filter: blur(3px); }
body.employee-app .ui-dialog { padding: 24px; border: 0; border-radius: 20px; background: var(--employee-surface); box-shadow: 0 20px 60px #24321f26; transition: transform 180ms var(--employee-ease); }
body.employee-app .ui-dialog-title { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
body.employee-app .ui-dialog-msg { font-size: 14px; line-height: 1.6; color: var(--employee-muted); }
body.employee-app .ui-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
body.employee-app .ui-dialog-actions .btn { padding: 10px; }
body.employee-app .ui-dialog-ok { background: var(--employee-green); color: #fff; }
body.employee-app .ui-dialog-cancel { background: #f0f3ec; color: var(--employee-ink); }
body.employee-app .modal-content { border-radius: 20px; }
body.employee-app :is(input, textarea, select) { caret-color: var(--employee-green); }
body.employee-app ::selection { background: #dce7c9; color: #293e22; }
body.employee-app .me-fichar[data-clock-state="dentro"] { background: #e5efda !important; }
body.employee-app .me-fichar[data-clock-state="pausa"] { background: #f4efdf !important; }
body.employee-app .me-fichar[data-clock-state="pausa"] #me-dot { background: #9d752d; }
body.employee-app .me-fichar::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; background: #c8dfb4; }
body.employee-app .me-fichar[data-clock-effect]::before { animation: employee-clock-wave 450ms var(--employee-ease) both; }
/* Entry and resume deliberately linger, so the confirmed change can be seen. */
body.employee-app .me-fichar:is([data-clock-effect="entrada"], [data-clock-effect="reanudar"])::before { animation-duration: 1000ms; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
body.employee-app .me-fichar[data-clock-effect="pausa"]::before { background: #ead7a9; }
body.employee-app .me-fichar[data-clock-effect="salida"]::before { background: #d7e1ce; animation-name: employee-clock-settle; }
body.employee-app .employee-clock-action { position: relative; min-height: 50px; }
body.employee-app .employee-clock-feedback { display: none; }
body.employee-app .employee-clock-action.is-busy #me-botones { opacity: 0; pointer-events: none; }
body.employee-app .employee-clock-action.is-busy .employee-clock-feedback { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; background: var(--employee-green); color: #fff; font-size: 14px; font-weight: 500; pointer-events: none; }
body.employee-app .employee-clock-action[data-result="pausa"] .employee-clock-feedback { background: #7d642d; }
body.employee-app .employee-clock-action[data-result="queued"] .employee-clock-feedback { background: #63705c; }
body.employee-app .employee-clock-feedback svg { width: 22px; height: 22px; }
body.employee-app .employee-clock-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: employee-clock-tick 220ms var(--employee-ease) forwards; }
body.employee-app .employee-clock-action:is([data-result="entrada"], [data-result="reanudar"]) .employee-clock-check { animation-duration: 400ms; animation-delay: 80ms; }
body.employee-app .employee-clock-spinner { width: 18px; height: 18px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: employee-clock-spin .8s linear infinite; }
@keyframes employee-clock-wave { from { clip-path: circle(5% at 50% 80%); opacity: .8; } to { clip-path: circle(130% at 50% 80%); opacity: 0; } }
@keyframes employee-clock-settle { from { opacity: .65; } to { opacity: 0; } }
@keyframes employee-clock-tick { to { stroke-dashoffset: 0; } }
@keyframes employee-clock-spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  body.employee-app .btn-primary:hover { background: #3e5d2e !important; }
  body.employee-app .tar-item:not(.tar-hecha):hover { border-color: #abbc9d; }
  body.employee-app #employee-nav button:hover { color: var(--employee-green); }
}
@media (max-width: 480px) {
  body.employee-app .main-content { padding-inline: 20px !important; }
  body.employee-app .modal-content { max-width: calc(100vw - 24px); padding: 20px; }
  body.employee-app .modal-content :is(input, select, textarea) { font-size: 16px; }
}
@media (max-width: 350px) {
  body.employee-app .main-content { padding-inline: 16px !important; }
  body.employee-app .me-card, body.employee-app .me-fichar { padding: 18px; }
  body.employee-app .tar-item { --task-padding: 14px; column-gap: 10px; }
  body.employee-app .me-kpis .fin-kpi { padding: 16px !important; }
}
@media (prefers-reduced-transparency: reduce) {
  body.employee-app #employee-nav { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.employee-app .me-fichar, body.employee-app .employee-history summary svg,
  body.employee-app .employee-nav-marker, body.employee-app .btn, body.employee-app .ui-dialog,
  body.employee-app .tar-item input[type=checkbox] { transition: none; }
  body.employee-app .btn:active:not(:disabled):not(:focus-visible) { transform: none; }
  body.employee-app .me-fichar[data-clock-effect]::before { animation: none; }
  body.employee-app .employee-clock-check { animation: none; stroke-dashoffset: 0; }
  body.employee-app .employee-clock-spinner { animation: none; }
}
/* Location belongs to each event, with the same quiet treatment as its time. */
.rh-location-notice { margin-top: 14px; font-size: 12px; line-height: 1.5; }
.rh-location-notice summary { cursor: pointer; padding: 5px 0; }
.rh-location-notice p { margin: 6px 0; max-width: 65ch; }
.rh-location-status { display: block; font-size: 12px; line-height: 1.5; margin: 6px 0 0; }
.rh-location-status:empty { display: none; }
.rh-location-link { color: var(--accent, #476334); text-decoration: underline; text-underline-offset: 3px; }
.rh-location-link:focus-visible, .rh-location-notice summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.rh-location-missing { color: inherit; font-size: 12px; }
body.employee-app .rh-location-notice, body.employee-app .rh-location-status { color: #506345; }
body.employee-app .employee-history li { flex-wrap: wrap; }
body.employee-app .employee-history-location { flex-basis: 100%; font-size: 12px; padding-top: 4px; }
