/* Refinamiento de la jornada móvil; conserva los estados y acciones existentes. */
.mobile-day-summary {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  color: #203248;
  background: #fbfcfa;
  box-shadow: 0 20px 65px rgba(15,35,51,.2);
  font-family: Inter, system-ui, sans-serif;
}
.mobile-day-summary::backdrop { background: rgba(19,35,47,.3); backdrop-filter: blur(5px); }
.mobile-day-summary-figure { width: 64px; height: 64px; margin-bottom: 12px; }
.mobile-day-summary h2 { margin: 0 0 12px; font: 400 25px/1.2 Fraunces, Georgia, serif; }
.mobile-day-summary-copy { margin: 0 0 24px; font-size: 14px; line-height: 1.7; color: #526477; }
.mobile-day-summary-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #526477; font-size: 26px; cursor: pointer; }
.mobile-day-summary-done { width: 100%; min-height: 44px; border: 0; border-radius: 12px; background: #e5eee8; color: #315d49; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.mobile-day-summary button:focus-visible { outline: 2px solid #075abc; outline-offset: 3px; }
@media (max-width: 900px) {
  #portal:not(.admin-wide) .mobile-quick-grid button .mobile-access-figure {
    display: block;
    position: absolute;
    top: 9px;
    left: 12px;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    margin: 0;
    object-fit: contain;
    pointer-events: none;
  }
  #portal:not(.admin-wide) .mobile-portal-home {
    background:
      linear-gradient(180deg, #dbe9eb 0%, #e0e4e8 44%, #edf0f3 75%, #f4f8fb 100%) 0 0 / 100% 260px no-repeat,
      #f4f8fb !important;
  }
  html:has(#portal:not(.admin-wide):not([hidden])[data-view="inicio"]),
  body:has(#portal:not(.admin-wide):not([hidden])[data-view="inicio"]){background:#DBE9EB}
  #portal:not(.admin-wide) .mobile-portal-hero {
    position: relative;
    isolation: isolate;
    grid-template-columns: 52px minmax(0,1fr) repeat(2,44px);
    column-gap: 8px;
    height: auto;
    min-height:88px;
    padding-top:16px;
    padding-bottom:12px;
    background: transparent !important;
  }
  #portal:not(.admin-wide) .mobile-portal-sheet { padding-top:0;background: transparent !important; }
  #portal:not(.admin-wide) .mobile-portal-person > div {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 0;
  }
  #portal:not(.admin-wide) .mobile-portal-person > div > span { display: none; }
  #portal:not(.admin-wide) .mobile-portal-person h1 { font-size: clamp(18px,4.8vw,22px); line-height: 1.2; overflow-wrap: anywhere; }
  #portal:not(.admin-wide) .mobile-portal-person h1::after { content: none; }
  #portal:not(.admin-wide) .mobile-profile-photo {
    grid-column: 1;
    box-sizing: border-box;
    padding: 3px;
    border-radius: 50%;
    overflow: hidden;
  }
  #portal:not(.admin-wide) .mobile-profile-avatar {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
  }
  #portal:not(.admin-wide) .mobile-review-notification-trigger { grid-column: 3; }
  #portal:not(.admin-wide) #mobile-home-logout {
    grid-column: 4;
    display: grid !important;
    visibility: visible;
    opacity: 1;
    z-index: 3;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
    color: #344e63;
    background: rgba(255,255,255,.75);
    box-shadow: 0 3px 10px rgba(35,55,68,.06);
    cursor: pointer;
  }
  #portal:not(.admin-wide) .mobile-profile-photo,
  #portal:not(.admin-wide) .mobile-review-notification-trigger,
  #portal:not(.admin-wide) #mobile-home-logout {
    position: relative;
    inset: auto;
    transform: none;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    aspect-ratio: 1;
  }
  #portal:not(.admin-wide) .mobile-profile-photo {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
  }
  #portal:not(.admin-wide) #mobile-home-logout svg { display: block; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  #portal:not(.admin-wide) #mobile-home-logout:hover { background: #e9eef2; color: #203248; }
  #portal:not(.admin-wide) #mobile-home-logout:focus-visible { outline: 2px solid #075abc; outline-offset: 1px; }
  #portal:not(.admin-wide) .dashboard-month-days {
    scroll-behavior: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 10px;
    position: relative;
    padding: 4px 4px 30px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
    mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
  }
  #portal:not(.admin-wide) .dashboard-month-progress{position:relative;isolation:isolate;margin:0 0 4px}
  #portal:not(.admin-wide) .dashboard-month-progress::before,
  #portal:not(.admin-wide) .dashboard-month-progress::after{
    content:"";position:absolute;z-index:1;top:0;bottom:0;width:30px;pointer-events:none;
    background:radial-gradient(ellipse at center,rgba(247,250,251,.72),rgba(247,250,251,0) 75%);
    -webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);
  }
  #portal:not(.admin-wide) .dashboard-month-progress::before{left:-4px;-webkit-mask-image:linear-gradient(90deg,#000,transparent);mask-image:linear-gradient(90deg,#000,transparent)}
  #portal:not(.admin-wide) .dashboard-month-progress::after{right:-4px;-webkit-mask-image:linear-gradient(270deg,#000,transparent);mask-image:linear-gradient(270deg,#000,transparent)}
  #portal:not(.admin-wide) .dashboard-month-day {
    translate:0 var(--day-arc-y,0px);
    min-width: 44px;
    scroll-snap-stop: normal;
    -webkit-tap-highlight-color: transparent;
    transition: transform 140ms cubic-bezier(.16,1,.3,1), background-color 120ms ease;
  }
  #portal:not(.admin-wide) .dashboard-month-day:active {
    background: #e2ebe8;
    transform: scale(.94);
    transition-duration: 70ms;
  }
  #portal:not(.admin-wide) .dashboard-month-day.today { background: #E11D5F; border: 1px solid #F4E8E0; color: #fff; box-shadow: 0 4px 10px rgba(31,66,91,.08); }
  #portal:not(.admin-wide) .dashboard-month-day.today b,
  #portal:not(.admin-wide) .dashboard-month-day.today small { color: #fff; }
  #portal:not(.admin-wide) .dashboard-month-day:focus-visible { outline: 2px solid #075abc; outline-offset: 2px; }
  #portal:not(.admin-wide) #mobile-close-panel {
    background: #fff;
    border: 1px solid rgba(36,57,70,.045);
    border-radius: 24px;
    box-shadow: 0 8px 28px rgba(29,49,66,.035);
  }
  #portal:not(.admin-wide) #mobile-close-panel .mcv2-head {
    padding-bottom: 18px;
    margin-bottom: 4px;
  }
  #portal:not(.admin-wide) #mobile-close-panel .mcv2-head-left { gap: 10px; }
  #portal:not(.admin-wide) #mobile-close-panel .mcv2-head-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #portal:not(.admin-wide) #mobile-close-panel .mcv2-head-icon svg { width: 44px; height: 44px; }
  #portal:not(.admin-wide) #mobile-close-panel .mcv2-head h2 {
    color: #203248;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -.025em;
    line-height: 1.25;
    text-wrap: balance;
  }
  #portal:not(.admin-wide) #mobile-close-panel #mobile-close-count {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: #365b4c !important;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    font-size: 12px;
    box-shadow: none;
  }
  #mobile-close-count .mcv2-progress-ring {
    position: absolute;
    inset: 0;
    width: 48px;
    height: 48px;
    fill: none;
    stroke-width: 3;
    transform: rotate(-90deg);
  }
  #mobile-close-count .mcv2-progress-track { stroke: #e8efeb; }
  #mobile-close-count .mcv2-progress-fill {
    stroke: #47846b;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--day-progress,0));
    transition: stroke-dashoffset 450ms cubic-bezier(.16,1,.3,1);
  }
  #mobile-close-count .mcv2-progress-value { line-height: 1; }
  #mobile-close-count[data-progress-state='empty'] .mcv2-progress-fill { opacity: 0; }
  #mobile-close-count[data-progress-state='active'] .mcv2-progress-fill {
    animation: jornada-progress-glow 2200ms ease-in-out 3;
  }
  #mobile-close-count[data-progress-state='complete'] .mcv2-progress-track { stroke: #dcebe2; }
  #portal:not(.admin-wide) #mobile-close-list { padding-left: 25px; gap: 10px; }
  #portal:not(.admin-wide) #mobile-close-list::before {
    left: 8px;
    border-left: 1px solid #c7d8d1;
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item {
    gap: 9px;
    padding: 13px 11px;
    border-radius: 14px;
    grid-template-columns: 34px minmax(0,1fr) auto;
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item::before {
    left: -17px;
    width: 8px;
    height: 8px;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #779c90;
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-complete::before {
    background: #47846b;
    box-shadow: 0 0 0 1px #47846b;
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-locked::before {
    background: #fff;
    box-shadow: 0 0 0 1px #c1c8cc;
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-complete { background: #eff6f1; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item:not(.is-complete):not(.is-locked):not(.is-entry) { background: #f2f5f8; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-locked:not(.is-complete):not(.is-entry) { background: #f5f5f4; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item .day-close-check {
    width: 34px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(26,53,45,.035), inset 0 1px 0 rgba(255,255,255,.85);
  }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-complete .day-close-check { color: #36745a; background: #e0eee5; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.type-rpe:not(.is-complete) .day-close-check { color: #986844; background: #f1e6d8; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item .day-close-item-copy b { font-weight: 600; line-height: 1.35; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-complete .day-close-item-copy b,
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-complete .day-close-item-status { color: #35684f; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item.is-locked .day-close-item-status { color: #66727e; }
  #portal:not(.admin-wide) #mobile-close-panel .day-close-item .day-close-item-status { font-weight: 650; letter-spacing: 0; }
  #portal:not(.admin-wide) #mobile-close-panel button:focus-visible { outline: 2px solid #075abc; outline-offset: 3px; }
}
/* Keep the reason readable even when the upload control is disabled. */
#portal:not(.admin-wide) :is(#day-close, #mobile-close-panel) .day-close-item.has-unavailable-reason.is-locked:not(.is-complete) {
  opacity: 1 !important;
  height: auto;
}
#portal:not(.admin-wide) :is(#day-close, #mobile-close-panel) .has-unavailable-reason .day-close-item-copy small {
  display: none !important;
}
#portal:not(.admin-wide) :is(#day-close, #mobile-close-panel) .day-close-unavailable-reason {
  display: block;
  grid-column: 1 / -1;
  color: #52606d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  margin-top: 6px;
}
@keyframes jornada-progress-glow {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  #portal:not(.admin-wide) .dashboard-month-days { scroll-behavior: auto; }
  #portal:not(.admin-wide) .dashboard-month-day { transition: none; }
  #portal:not(.admin-wide) .dashboard-month-day:active { transform: none; }
  #mobile-close-count .mcv2-progress-fill { transition: none; animation: none !important; }
}
