* {
  box-sizing: border-box;
}

:root {
  --blue: #0b2a6b;
  --blue-2: #123b8a;
  --green: #8cc63f;
  --cream: #fffae8;
  --ink: #10233f;
  --muted: #697386;
  --line: rgba(11, 42, 107, 0.12);
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 50px rgba(11, 42, 107, 0.12);
  --radius: 8px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(140, 198, 63, 0.22), transparent 310px),
    linear-gradient(135deg, #fffae8 0%, #f6fbef 42%, #edf6ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 42, 107, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 42, 107, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.employee-shell {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.employee-internal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(11, 42, 107, 0.08);
  overflow-x: auto;
}

.employee-internal-nav p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.employee-internal-nav a,
.employee-nav-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 950;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.employee-nav-button {
  appearance: none;
}

.employee-nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.employee-bottom-nav {
  display: none;
}

.employee-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.employee-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.employee-logo {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 14px 30px rgba(11, 42, 107, 0.24);
  font-weight: 950;
}

.employee-logo img {
  width: 78%;
  height: 78%;
  display: block;
  object-fit: contain;
}

.employee-brand strong {
  display: block;
  color: var(--blue);
  font-size: 1.08rem;
  line-height: 1.1;
}

.employee-brand small,
.eyebrow,
.profile-card dt,
.metric-card p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.employee-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.site-return-button,
.logout-button,
.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.site-return-button,
.logout-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
}

.site-return-button {
  border-color: rgba(140, 198, 63, 0.34);
}

.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.refresh-button {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0f4fb2);
  box-shadow: 0 14px 26px rgba(11, 42, 107, 0.2);
}

.site-return-button:hover,
.logout-button:hover,
.refresh-button:hover {
  transform: translateY(-1px);
}

.employee-message {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-weight: 850;
}

.admin-preview-panel {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
  padding: 28px 0;
}

.admin-preview-card {
  position: relative;
  overflow: hidden;
  width: min(760px, 100%);
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 232, 0.94)),
    var(--card);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px);
}

.admin-preview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.admin-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(140, 198, 63, 0.18);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-preview-card h1 {
  margin: 14px 0 10px;
  color: var(--blue);
  font-size: clamp(2.2rem, 8vw, 4.3rem);
  line-height: 0.98;
}

.admin-preview-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #40516f;
  font-size: 1.05rem;
  line-height: 1.65;
}

.admin-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.admin-preview-button,
.admin-preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius);
  font-weight: 950;
}

.admin-preview-button {
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0f4fb2);
  box-shadow: 0 14px 28px rgba(11, 42, 107, 0.2);
}

.admin-preview-link {
  padding: 0 14px;
  color: var(--blue);
  background: rgba(11, 42, 107, 0.06);
}

.employee-dashboard {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(11, 42, 107, 0.96), rgba(15, 79, 178, 0.9)),
    var(--blue);
  box-shadow: var(--shadow);
  padding: 28px;
  color: #fff;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(140, 198, 63, 0.28);
}

.hero-copy,
.profile-card {
  position: relative;
  z-index: 1;
}

.birthday-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(140, 198, 63, 0.32);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at 12% 20%, rgba(140, 198, 63, 0.22), transparent 170px),
    radial-gradient(circle at 92% 10%, rgba(11, 42, 107, 0.13), transparent 140px),
    linear-gradient(135deg, #fffae8 0%, #fffdf5 48%, #f4fbec 100%);
  box-shadow: 0 20px 44px rgba(11, 42, 107, 0.13);
  animation: birthdayCardIn 460ms ease both, birthdayCardGlow 5200ms ease-in-out infinite;
}

.birthday-card::before,
.birthday-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.birthday-card::before {
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: calc(var(--radius) - 2px);
}

.birthday-card::after {
  right: 28px;
  top: 18px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34px 26px, rgba(140, 198, 63, 0.58) 0 5px, transparent 6px),
    radial-gradient(circle at 60px 42px, rgba(11, 42, 107, 0.22) 0 4px, transparent 5px),
    radial-gradient(circle at 28px 66px, rgba(11, 42, 107, 0.18) 0 3px, transparent 4px),
    radial-gradient(circle at 72px 72px, rgba(140, 198, 63, 0.38) 0 4px, transparent 5px);
  opacity: 0.75;
  animation: birthdayConfettiDrift 4200ms ease-in-out infinite;
}

.birthday-card-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.birthday-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--blue);
  background: rgba(140, 198, 63, 0.2);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.birthday-card h2 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.birthday-card p {
  margin: 0;
  color: #40516f;
  font-size: 1rem;
  line-height: 1.65;
}

.birthday-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  white-space: nowrap;
  border-radius: var(--radius);
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0f4fb2);
  box-shadow: 0 14px 26px rgba(11, 42, 107, 0.2);
  font-weight: 950;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.birthday-card:hover .birthday-button {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(11, 42, 107, 0.24);
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 10px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.03rem;
  font-weight: 750;
  line-height: 1.5;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-badge,
.status-pill,
.profile-chip,
.summary-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 950;
}

.hero-badge {
  background: rgba(140, 198, 63, 0.22);
  color: #efffdf;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-badge-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.profile-card {
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.profile-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.employee-profile-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
}

.employee-photo-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.employee-profile-identity small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}

.employee-profile-identity small.is-error {
  color: #ffe2d8;
}

.employee-photo-button {
  min-height: 36px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
}

.employee-photo-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.employee-photo-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.employee-photo-input {
  display: none;
}

.employee-profile-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: #0b2a6b;
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.employee-profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.status-pill {
  background: rgba(140, 198, 63, 0.95);
  color: #17380e;
}

.profile-chip {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.profile-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-card dt {
  color: rgba(255, 255, 255, 0.68);
}

.profile-card dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.control-panel,
.progress-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.control-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.control-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.control-panel input {
  min-height: 44px;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.loading-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.loading-panel div {
  min-height: 88px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(140, 198, 63, 0.14), rgba(255, 255, 255, 0.7));
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(11, 42, 107, 0.08);
  padding: 15px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 1.22rem;
}

.metric-card p {
  margin: 0;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: clamp(1.24rem, 2.5vw, 1.7rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 780;
  line-height: 1.35;
}

.metric-good {
  border-color: rgba(140, 198, 63, 0.46);
  background: linear-gradient(180deg, #fff, rgba(140, 198, 63, 0.12));
}

.metric-good .metric-icon {
  background: rgba(140, 198, 63, 0.22);
}

.metric-alert {
  border-color: rgba(232, 135, 45, 0.3);
  background: linear-gradient(180deg, #fff, rgba(255, 250, 232, 0.92));
}

.metric-alert .metric-icon {
  background: rgba(255, 186, 73, 0.22);
}

.progress-panel,
.panel {
  padding: 18px;
}

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

.section-title h2 {
  margin: 3px 0 0;
  color: var(--blue);
  font-size: 1.34rem;
}

.summary-pill {
  background: rgba(11, 42, 107, 0.08);
  color: var(--blue);
}

.progress-list {
  display: grid;
  gap: 14px;
}

.progress-item {
  display: grid;
  gap: 9px;
}

.progress-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font-weight: 900;
}

.progress-item span {
  color: var(--muted);
  font-weight: 850;
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(11, 42, 107, 0.08);
}

.progress-track span {
  display: block;
  width: 0%;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #35a852);
  transition: width 360ms ease;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 16px;
}

.insight-panel {
  align-self: start;
}

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

.detail-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(11, 42, 107, 0.09);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(255, 250, 232, 0.7));
  padding: 13px;
}

.detail-item-featured {
  border-color: rgba(140, 198, 63, 0.38);
  background:
    linear-gradient(135deg, rgba(140, 198, 63, 0.16), rgba(255, 255, 255, 0.96));
}

.detail-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-item strong {
  color: var(--blue);
  font-size: 1.05rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.detail-item small {
  color: var(--muted);
  font-weight: 780;
  line-height: 1.35;
}

.reason-list {
  margin-top: 12px;
}

.reason-card {
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  padding: 13px;
}

.reason-card strong {
  display: block;
  color: var(--blue);
  margin-bottom: 7px;
}

.reason-card p,
.reason-card ul {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.reason-card ul {
  padding-left: 18px;
}

.reason-card.is-good {
  background: rgba(140, 198, 63, 0.13);
  border-color: rgba(140, 198, 63, 0.32);
}

.reason-card.is-warning {
  background: rgba(255, 250, 232, 0.88);
  border-color: rgba(232, 135, 45, 0.24);
}

.history-panel {
  overflow: hidden;
}

.history-title {
  align-items: flex-start;
}

.history-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.history-controls label {
  display: grid;
  gap: 6px;
  min-width: 170px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.history-controls select,
.history-controls input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.history-toggle-button {
  align-self: end;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0f4fb2);
  box-shadow: 0 12px 24px rgba(11, 42, 107, 0.18);
  cursor: pointer;
  font-weight: 950;
}

.history-limit-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 780;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.history-week {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-week strong {
  color: var(--blue);
}

.history-week span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 950;
}

.history-week span.is-good {
  color: #245b15;
  background: rgba(140, 198, 63, 0.2);
}

.history-week span.is-muted {
  color: var(--blue);
  background: rgba(11, 42, 107, 0.08);
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: 16px;
}

.appointment-date-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.appointment-date-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.appointment-date-controls input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.date-nav-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue);
  cursor: pointer;
  font-weight: 950;
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.appointment-card {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 15px 15px 15px 18px;
}

.appointment-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: var(--green);
}

.appointment-card.is-confirmada::before {
  background: #2563eb;
}

.appointment-card.is-confirmada .appointment-head span {
  background: #dbeafe;
  color: #1d4ed8;
}

.appointment-card.is-completada::before {
  background: #5c9424;
}

.appointment-card.is-completada .appointment-head span {
  background: #dcfce7;
  color: #166534;
}

.appointment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.appointment-head strong {
  color: var(--blue);
}

.appointment-head span,
.appointment-total {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(11, 42, 107, 0.08);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
}

.appointment-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.appointment-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.appointment-phone {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 36px;
  margin: 2px 0;
  color: var(--blue);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(11, 42, 107, 0.28);
  text-underline-offset: 3px;
}

.appointment-phone.is-unavailable {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.appointment-employee-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 22px rgba(11, 42, 107, 0.08);
}

.appointment-employee-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid rgba(140, 198, 63, 0.55);
  background: #0b2a6b;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 950;
}

.appointment-employee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appointment-employee-card small,
.appointment-employee-card strong {
  display: block;
}

.appointment-employee-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.appointment-employee-card strong {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

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

.appointment-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.appointment-card li {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--cream);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 850;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(11, 42, 107, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.9), rgba(140, 198, 63, 0.12));
  color: var(--blue);
  padding: 24px;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 900;
}

.training-panel {
  align-self: start;
}

.training-grid {
  display: grid;
  gap: 12px;
}

.manual-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.manual-card.is-available {
  border-color: rgba(140, 198, 63, 0.45);
  background: linear-gradient(135deg, #fff, rgba(140, 198, 63, 0.12));
  box-shadow: 0 12px 28px rgba(11, 42, 107, 0.08);
}

.manual-card.is-locked {
  opacity: 0.76;
  background: rgba(255, 255, 255, 0.72);
}

.manual-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.manual-card.is-locked .manual-icon {
  background: rgba(11, 42, 107, 0.16);
  color: var(--blue);
}

.manual-copy {
  min-width: 0;
}

.manual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.manual-head strong {
  color: var(--blue);
  line-height: 1.2;
}

.manual-head span,
.manual-copy small {
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(140, 198, 63, 0.18);
  color: #2d6b1d;
  font-size: 0.76rem;
  font-weight: 950;
}

.manual-card.is-locked .manual-head span {
  background: rgba(11, 42, 107, 0.08);
  color: var(--muted);
}

.manual-copy p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 740;
  line-height: 1.42;
}

.manual-action {
  grid-column: 2;
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--blue);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 950;
  text-decoration: none;
}

.manual-action-disabled {
  background: rgba(11, 42, 107, 0.08);
  color: var(--muted);
}

@keyframes birthdayCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes birthdayCardGlow {
  0%,
  100% {
    box-shadow: 0 20px 44px rgba(11, 42, 107, 0.13);
  }
  50% {
    box-shadow: 0 24px 52px rgba(140, 198, 63, 0.2);
  }
}

@keyframes birthdayConfettiDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-6px, 5px, 0);
  }
}

@media (max-width: 980px) {
  body {
    overflow-x: hidden;
  }

  .employee-shell {
    max-width: 100%;
  }

  .hero-panel,
  .birthday-card,
  .content-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 84px;
  }

  .employee-shell {
    width: min(100% - 20px, 1220px);
    padding-top: 10px;
  }

  .employee-internal-nav {
    display: none;
  }

  .control-panel,
  .section-title,
  .appointment-head,
  .history-week,
  .progress-item > div:first-child {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-topbar {
    align-items: center;
    gap: 10px;
  }

  .employee-brand {
    flex: 1 1 auto;
  }

  .employee-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .site-return-button,
  .logout-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .action-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .hero-panel {
    padding: 20px;
  }

  .birthday-card {
    align-items: stretch;
  }

  .birthday-button {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 14vw, 3.4rem);
  }

  .profile-card dl,
  .metric-grid,
  .detail-grid,
  .history-metrics,
  .content-grid,
  .insight-grid,
  .appointment-date-controls,
  .loading-panel {
    grid-template-columns: 1fr;
  }

  .admin-preview-panel {
    min-height: calc(100vh - 120px);
    place-items: start stretch;
  }

  .admin-preview-actions {
    flex-direction: column;
  }

  .admin-preview-button,
  .admin-preview-link {
    width: 100%;
  }

  .refresh-button,
  .control-panel input,
  .date-nav-button,
  .history-toggle-button {
    width: 100%;
  }

  .history-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .history-controls label {
    min-width: 0;
  }

  .profile-card,
  .progress-panel,
  .panel,
  .history-card,
  .appointment-card,
  .manual-card {
    min-width: 0;
  }

  .metric-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .manual-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .manual-action {
    grid-column: 2;
    width: fit-content;
  }

  body.employee-dashboard-ready .employee-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid rgba(11, 42, 107, 0.12);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(255, 253, 247, 0.96);
    box-shadow: 0 18px 50px rgba(11, 42, 107, 0.22);
    backdrop-filter: blur(12px);
  }

  .employee-bottom-nav a {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    gap: 3px;
    border-radius: var(--radius);
    color: var(--blue);
    font-weight: 950;
  }

  .employee-bottom-nav .employee-nav-icon {
    width: 19px;
    height: 19px;
  }

  .employee-bottom-nav small {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .employee-shell {
    width: min(100% - 16px, 1220px);
  }

  .hero-panel,
  .progress-panel,
  .panel,
  .history-card {
    border-radius: 18px;
    padding: 14px;
  }

  .metric-card,
  .detail-item,
  .manual-card {
    grid-template-columns: 1fr;
  }

  .metric-icon,
  .manual-icon {
    width: 38px;
    height: 38px;
  }

  .manual-action {
    grid-column: 1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.employee-pets-toggle{border:1px solid #d7dfed;border-radius:999px;background:#fff;color:#0b2a6b;font-weight:700;padding:8px 14px;cursor:pointer}.employee-pets-detail{display:grid;gap:10px;margin-top:10px}.employee-pets-detail.hidden{display:none}.employee-pets-detail article{display:flex;align-items:center;gap:10px;border:1px solid #e4e9f2;border-radius:14px;padding:10px}.employee-pet-photo{width:64px;height:64px;flex:0 0 64px;border-radius:14px;overflow:hidden;background:#edf2fa;color:#0b2a6b;display:grid;place-items:center;font-weight:800}.employee-pet-photo img{width:100%;height:100%;object-fit:cover}.employee-pets-detail p{margin:2px 0;color:#5d6675}
.employee-pets-toggle{min-height:44px}.employee-pets-detail article,.employee-pets-detail article>div{min-width:0}.employee-pets-detail p,.employee-pets-detail strong,.appointment-location{overflow-wrap:anywhere}@media(max-width:430px){.employee-pets-detail article{align-items:flex-start}.employee-pet-photo{width:56px;height:56px;flex-basis:56px}.employee-pets-toggle{width:100%}}
.appointment-location{display:inline-flex;align-items:center;min-height:44px;max-width:100%}.employee-pets-detail{min-width:0;overflow:hidden}@media(max-width:430px){.appointment-location{width:100%;justify-content:center}}

/* Jerarquia visual de citas sin alterar marcado ni comportamiento. */
.appointment-card{min-width:0;gap:11px;padding:16px 16px 16px 20px;border-color:rgba(11,42,107,.12);border-radius:17px;box-shadow:0 7px 20px rgba(11,42,107,.065);overflow:hidden;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.appointment-card:hover{border-color:rgba(11,42,107,.2);box-shadow:0 11px 26px rgba(11,42,107,.095);transform:translateY(-1px)}.appointment-card::before{top:0;bottom:0;border-radius:0}.appointment-head{min-width:0;padding-bottom:10px;border-bottom:1px solid rgba(11,42,107,.08)}.appointment-head strong{min-width:0;font-size:1.05rem;overflow-wrap:anywhere}.appointment-head span{flex:0 0 auto}.appointment-card h3{font-size:1.12rem;line-height:1.3;overflow-wrap:anywhere}.appointment-meta{min-width:0;padding:9px 10px;border:1px solid rgba(11,42,107,.07);border-radius:12px;background:rgba(255,250,232,.62)}.appointment-card ul{padding-top:2px}.appointment-card li{border:1px solid rgba(140,198,63,.18)}.appointment-phone:focus-visible,.appointment-location:focus-visible,.employee-pets-toggle:focus-visible{outline:3px solid rgba(37,99,235,.3);outline-offset:2px}.employee-pets-toggle{width:fit-content;max-width:100%;border-color:rgba(11,42,107,.16);transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.employee-pets-toggle:hover{border-color:rgba(11,42,107,.3);background:#fffae8}.employee-pets-detail{padding-top:2px}.employee-pets-detail article{border-color:rgba(11,42,107,.1);background:rgba(255,250,232,.45);box-shadow:0 4px 12px rgba(11,42,107,.035)}.employee-pet-photo{border:1px solid rgba(11,42,107,.12);box-shadow:0 4px 10px rgba(11,42,107,.08)}.employee-pet-photo img{transition:transform .16s ease,filter .16s ease}.employee-pet-photo img:hover{filter:brightness(.96);transform:scale(1.025)}
@media(max-width:560px){.appointment-card{padding:14px 13px 14px 17px;border-radius:15px}.appointment-head{align-items:flex-start}.appointment-head span,.employee-pets-toggle,.appointment-location{min-height:44px}.employee-pets-toggle{width:100%}.appointment-meta{align-items:stretch}.appointment-meta>*{max-width:100%}}
@media(prefers-reduced-motion:reduce){.appointment-card,.employee-pets-toggle,.employee-pet-photo img{transition:none}.appointment-card:hover,.employee-pet-photo img:hover{transform:none}}

/* Rediseño visible y consistente de citas para empleados. */
.appointment-card {
  gap: 12px;
  border: 1px solid rgba(11, 42, 107, 0.16);
  border-radius: 20px;
  box-shadow: 0 13px 32px rgba(11, 42, 107, 0.1);
}

.appointment-head {
  margin: -16px -16px 2px -20px;
  padding: 15px 16px 14px 20px;
  border-bottom: 3px solid rgba(11, 42, 107, 0.1);
  background: #edf4ff;
}

.appointment-head strong {
  color: #071f50;
  font-size: 1.12rem;
}

.appointment-head span {
  min-height: 34px;
  border: 1px solid rgba(11, 42, 107, 0.12);
}

.appointment-card h3 {
  padding-top: 2px;
  color: #071f50;
  font-size: 1.23rem;
}

.appointment-meta {
  border-left: 4px solid rgba(140, 198, 63, 0.58);
  background: #fffdf4;
}

.appointment-card ul {
  padding: 10px;
  border-radius: 13px;
  background: rgba(237, 244, 255, 0.65);
}

.employee-pets-detail article {
  padding: 13px;
  border-left: 4px solid #8cc63f;
  border-radius: 15px;
  background: #fffdf4;
}

@media (max-width: 560px) {
  .appointment-head {
    margin: -14px -13px 2px -17px;
    padding: 14px 13px 13px 17px;
  }
}

/* Mantiene completa la foto de la cita sin alterar el tamano de la miniatura. */
.employee-pet-photo img {
  box-sizing: border-box;
  padding: 3px;
  background: #fff;
  object-fit: contain;
  object-position: center;
}

.employee-pet-photo img:hover {
  transform: none;
}

.employee-pet-behavior { margin-top: 6px; color: #334155; overflow-wrap: anywhere; }

/* El mismo lenguaje visual de estados usado en Agenda y calendario. */
.appointment-card.is-pendiente,
.appointment-card.is-Pendiente { border-color: rgba(217,119,6,.3); background: linear-gradient(90deg,rgba(255,247,237,.84),#fff 24%); box-shadow:0 9px 24px rgba(217,119,6,.1); }
.appointment-card:is(.is-pendiente,.is-Pendiente)::before { background:#d97706; }
.appointment-card:is(.is-pendiente,.is-Pendiente) .appointment-head span { border-color:#f59e0b; background:#fef3c7; color:#92400e; }

.appointment-card:is(.is-confirmada,.is-confirmado) { border-color:rgba(37,99,235,.28); background:linear-gradient(90deg,rgba(239,246,255,.84),#fff 24%); box-shadow:0 9px 24px rgba(37,99,235,.1); }
.appointment-card:is(.is-confirmada,.is-confirmado)::before { background:#2563eb; }
.appointment-card:is(.is-confirmada,.is-confirmado) .appointment-head span { border-color:#60a5fa; background:#dbeafe; color:#1e40af; }

.appointment-card:is(.is-completada,.is-completado) { border-color:rgba(92,148,36,.3); background:linear-gradient(90deg,rgba(247,254,231,.84),#fff 24%); box-shadow:0 9px 24px rgba(92,148,36,.1); }
.appointment-card:is(.is-completada,.is-completado)::before { background:#5c9424; }
.appointment-card:is(.is-completada,.is-completado) .appointment-head span { border-color:#86c35a; background:#dcfce7; color:#166534; }

.appointment-card:is(.is-cancelada,.is-cancelado) { border-color:rgba(220,38,38,.28); background:linear-gradient(90deg,rgba(254,242,242,.84),#fff 24%); box-shadow:0 9px 24px rgba(220,38,38,.09); }
.appointment-card:is(.is-cancelada,.is-cancelado)::before { background:#dc2626; }
.appointment-card:is(.is-cancelada,.is-cancelado) .appointment-head span { border-color:#f87171; background:#fef2f2; color:#991b1b; }

.appointment-card.is-pendiente:hover { box-shadow:0 12px 29px rgba(217,119,6,.17); }
.appointment-card:is(.is-confirmada,.is-confirmado):hover { box-shadow:0 12px 29px rgba(37,99,235,.16); }
.appointment-card:is(.is-completada,.is-completado):hover { box-shadow:0 12px 29px rgba(92,148,36,.16); }
.appointment-card:is(.is-cancelada,.is-cancelado):hover { box-shadow:0 12px 29px rgba(220,38,38,.15); }
.appointment-card:focus-within { outline:3px solid rgba(37,99,235,.34); outline-offset:3px; }

@media(prefers-reduced-motion:reduce){.appointment-card{transition:none}.appointment-card:hover{transform:none}}
