:root {
  --blue: #0b2a6b;
  --blue-2: #123b8a;
  --navy: #0b2a6b;
  --navy-soft: #e8f0ff;
  --cream: #fffae8;
  --ink: #10233f;
  --muted: #697386;
  --line: rgba(11, 42, 107, 0.12);
  --green: #8cc63f;
  --green-soft: #edf8df;
  --aqua: #38bdf8;
  --paper: #ffffff;
  --wash: #f6f9f2;
  --warn: #f59e0b;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 50px rgba(11, 42, 107, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

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 {
  font: inherit;
}

.portal-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1220px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  padding: 18px 0 0;
}

.brand,
.portal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.brand {
  min-width: 0;
}

.brand-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;
}

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

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

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-nav a,
.portal-nav button {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.portal-return-text--mobile {
  display: none;
}

.portal-nav a:hover,
.portal-nav button:hover,
.history-toggle:hover {
  transform: translateY(-1px);
}

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

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

.client-internal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 6px 0 22px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(11, 42, 107, 0.08);
  overflow: visible;
  position: relative;
  z-index: 2;
}

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

.client-internal-nav a,
.client-nav-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: 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;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

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

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

.welcome-band,
.client-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(290px, 0.82fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: stretch;
  min-height: 320px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 15%, rgba(140, 198, 63, 0.24), transparent 28%),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(135deg, #fffdf4 0%, #fef9e7 36%, #eaf3ff 68%, #ffffff 100%);
  box-shadow: 0 28px 70px rgba(11, 42, 107, 0.14);
  padding: clamp(24px, 4vw, 38px);
  color: var(--ink);
  animation: clientHeroEnter 520ms ease both;
}

.client-hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -38% 48%;
  height: 260px;
  border-radius: 999px;
  background: rgba(11, 42, 107, 0.1);
  transform: rotate(-8deg);
}

.client-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(11, 42, 107, 0.08), transparent 38%),
    radial-gradient(circle at 72% 88%, rgba(140, 198, 63, 0.16), transparent 28%);
}

.client-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-hero__eyebrow {
  width: max-content;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--green);
  box-shadow: 0 10px 24px rgba(11, 42, 107, 0.08);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 1.28rem;
}

.client-hero h1 {
  margin-bottom: 0;
  color: var(--blue);
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 0.96;
}

.client-hero h2 {
  margin: 0;
  color: #10233f;
  font-size: clamp(1.38rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.client-hero p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: #4b5d76;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.55;
}

.client-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.client-hero__action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 950;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.client-hero__action--primary {
  background: linear-gradient(135deg, var(--blue), #124a9f);
  color: #fff;
  box-shadow: 0 16px 32px rgba(11, 42, 107, 0.24);
}

.client-hero__action--secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  border-color: rgba(11, 42, 107, 0.12);
  box-shadow: 0 12px 26px rgba(11, 42, 107, 0.09);
}

.client-hero__action:hover {
  transform: translateY(-2px);
}

.client-hero__action--primary:hover {
  box-shadow: 0 20px 38px rgba(11, 42, 107, 0.28);
}

.client-hero__action--secondary:hover {
  border-color: rgba(140, 198, 63, 0.55);
  background: #fff;
}

.quick-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.quick-summary div {
  min-height: 74px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  box-shadow: 0 12px 26px rgba(11, 42, 107, 0.07);
}

.quick-summary strong {
  color: var(--blue);
  font-size: 1.55rem;
  line-height: 1;
}

.quick-summary span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-hero__visual {
  position: relative;
  z-index: 1;
  min-height: 245px;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.6vw, 20px);
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 14%, rgba(140, 198, 63, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.84));
  box-shadow: 0 22px 42px rgba(11, 42, 107, 0.11);
}

.client-hero__badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(11, 42, 107, 0.12);
}

.client-hero__animation {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 4 / 3;
  margin-top: 34px;
  overflow: visible;
  border-radius: var(--radius);
  filter: drop-shadow(0 20px 24px rgba(11, 42, 107, 0.18));
  animation: clientHeroFrameMotion 2.24s ease-in-out infinite;
}

.client-hero__animation-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.client-hero__animation-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  user-select: none;
  transform: scale(1.004);
  visibility: hidden;
  will-change: opacity;
}

.client-hero__animation-frame.is-active {
  opacity: 1;
  visibility: visible;
}

.client-hero__animation-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.18) 45%, transparent 56% 100%);
  opacity: 0.56;
  transform: translateX(-70%);
  animation: clientHeroSheen 4.4s ease-in-out infinite;
}

.client-hero__bubble {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  animation: clientHeroFloat 5s ease-in-out infinite;
}

.client-hero__bubble--one {
  width: 44px;
  height: 44px;
  right: 22px;
  top: 38px;
}

.client-hero__bubble--two {
  width: 24px;
  height: 24px;
  right: 74px;
  top: 92px;
  animation-delay: 700ms;
}

.client-hero__bubble--three {
  width: 30px;
  height: 30px;
  left: 30px;
  bottom: 38px;
  animation-delay: 1100ms;
}

.client-hero__paws {
  position: absolute;
  right: 22px;
  bottom: 24px;
  display: flex;
  gap: 8px;
  transform: rotate(-12deg);
}

.client-hero__paws span {
  width: 13px;
  height: 13px;
  border-radius: 50% 50% 45% 45%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 -9px 0 -4px rgba(255, 255, 255, 0.52);
  animation: clientHeroPaw 4.2s ease-in-out infinite;
}

.client-hero__paws span:nth-child(2) {
  animation-delay: 500ms;
}

.client-hero__paws span:nth-child(3) {
  animation-delay: 1000ms;
}

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

.history-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.history-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

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

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

.appointments-panel {
  grid-column: auto;
}

.history-panel.is-hidden {
  display: none;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title .portal-icon {
  color: var(--navy);
}

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

.loyalty-panel-featured {
  margin: 18px 0 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(140, 198, 63, 0.14), rgba(11, 42, 107, 0.06));
}

.loyalty-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    linear-gradient(135deg, rgba(140, 198, 63, 0.12), rgba(11, 42, 107, 0.06));
  box-shadow: 0 12px 26px rgba(11, 42, 107, 0.07);
}

.loyalty-card.is-ready {
  border-color: rgba(140, 198, 63, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, rgba(140, 198, 63, 0.18), rgba(11, 42, 107, 0.07));
}

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

.loyalty-title h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.08rem;
}

.loyalty-title h3 .portal-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.loyalty-title span {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(34px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stamp {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  min-height: 44px;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.stamp .portal-icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.9;
}

.stamp-paw {
  border-color: rgba(11, 42, 107, 0.18);
  color: rgba(11, 42, 107, 0.34);
}

.stamp-auto {
  border-color: rgba(140, 198, 63, 0.32);
  color: rgba(71, 130, 19, 0.36);
}

.stamp.is-filled {
  transform: translateY(-1px);
}

.stamp-paw.is-filled {
  border-color: rgba(11, 42, 107, 0.38);
  background: var(--navy-soft);
  color: var(--navy);
}

.stamp-auto.is-filled {
  border-color: rgba(140, 198, 63, 0.55);
  background: var(--green-soft);
  color: #3f7d10;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--aqua));
}

.loyalty-note,
.empty-state,
.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.loyalty-note {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(11, 42, 107, 0.08);
  padding-top: 12px;
  font-weight: 700;
}

.loyalty-note .portal-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.loyalty-note .portal-icon,
.loyalty-title .portal-icon {
  color: var(--navy);
}

.client-items-panel {
  margin: 18px 0 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(11, 42, 107, 0.08), rgba(140, 198, 63, 0.12));
}

.client-items-heading {
  margin-bottom: 14px;
}

.client-items-copy {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.client-item-launchers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.client-item-launcher {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: var(--radius);
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(140, 198, 63, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #fffae8);
  box-shadow: 0 16px 34px rgba(11, 42, 107, 0.09);
}

.client-item-launcher-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(140, 198, 63, 0.16);
  color: var(--blue);
}

.client-item-launcher-icon .portal-icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
}

.client-item-launcher h3,
.client-item-group-heading h3,
.client-item-form-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.12;
}

.client-item-launcher p,
.client-item-group-heading p,
.client-item-form-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.45;
}

.client-item-form {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 250, 232, 0.58);
}

.client-item-form.hidden {
  display: none;
}

.client-item-fields.hidden,
.client-item-actions .hidden,
.client-item-card-actions .hidden {
  display: none;
}

.client-item-form-heading {
  display: grid;
  gap: 5px;
}

.client-item-form-heading span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.client-item-type {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 360px);
}

.client-item-type label {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.client-item-type input {
  accent-color: var(--green);
}

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

.client-item-fields--shared {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.client-schedule-notice {
  display: grid;
  gap: 4px;
  margin: 2px 0 4px;
  border: 1px solid rgba(72, 148, 18, 0.22);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(244, 255, 235, 0.96), rgba(255, 250, 232, 0.92));
  color: #27415f;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(72, 148, 18, 0.08);
}

.client-schedule-notice strong {
  color: #3f7d10;
  font-weight: 950;
}

.client-schedule-zone-guide {
  border: 1px solid rgba(11, 42, 107, 0.12);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(232, 240, 255, 0.72);
  color: var(--blue);
  font-weight: 850;
  line-height: 1.45;
}

.client-schedule-zone-guide.is-ok {
  border-color: rgba(72, 148, 18, 0.22);
  background: rgba(244, 255, 235, 0.96);
  color: #315f16;
}

.client-schedule-zone-guide.is-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(255, 250, 232, 0.98);
  color: #7a4a00;
}

.client-schedule-zone-guide.is-error {
  border-color: rgba(185, 28, 28, 0.2);
  background: #fff5f5;
  color: #9f1d1d;
}

.client-zones-link {
  width: max-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 42, 107, 0.14);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 950;
}

.client-item-fields label {
  display: grid;
  gap: 6px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 950;
}

.client-item-fields input,
.client-item-fields select,
.client-item-fields textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(11, 42, 107, 0.14);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.client-item-fields textarea {
  min-height: 92px;
  resize: vertical;
}

.client-item-fields label:has(textarea),
.client-item-fields label:has(input[type="file"]) {
  grid-column: span 2;
}

.client-item-fields input[readonly] {
  border-color: rgba(140, 198, 63, 0.34);
  background: linear-gradient(135deg, rgba(255, 250, 232, 0.96), rgba(140, 198, 63, 0.1));
  color: var(--blue);
  cursor: not-allowed;
  font-weight: 900;
}

.optional-field {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-schedule-error {
  margin-top: 10px;
  border: 1px solid rgba(185, 28, 28, 0.18);
  border-radius: var(--radius);
  background: #fff5f5;
  color: #b91c1c;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 900;
}

.client-item-actions,
.client-item-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.client-item-primary,
.client-item-whatsapp,
.client-item-secondary,
.client-item-danger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 950;
}

.client-item-primary,
.client-item-whatsapp {
  background: linear-gradient(135deg, var(--blue), #124a9f);
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 42, 107, 0.18);
}

.client-item-secondary {
  border-color: rgba(11, 42, 107, 0.14);
  background: #fff;
  color: var(--blue);
}

.client-item-danger {
  border-color: rgba(185, 28, 28, 0.18);
  background: #fff5f5;
  color: #b91c1c;
}

.client-item-primary:disabled,
.client-item-whatsapp:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.client-item-sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.client-item-group {
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.client-item-group-heading {
  display: grid;
  gap: 5px;
}

.client-items-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.client-items-list .empty-state {
  grid-column: 1 / -1;
}

.client-item-empty-state,
.client-item-add-row {
  grid-column: 1 / -1;
}

.client-item-empty-state {
  min-height: 118px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px dashed rgba(11, 42, 107, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 232, 0.86)),
    rgba(255, 255, 255, 0.9);
}

.client-item-empty-state p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.client-item-add-row {
  display: flex;
  justify-content: flex-start;
}

.client-item-add-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 15px;
  background: linear-gradient(135deg, var(--green), #b9e96c);
  color: #17380e;
  font: inherit;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(140, 198, 63, 0.22);
  cursor: pointer;
}

.client-item-add-button span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  font-size: 1rem;
  line-height: 1;
}

.client-item-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(11, 42, 107, 0.09);
}

.client-item-photo {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  border-bottom: 1px solid rgba(11, 42, 107, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 250, 232, 0.96), rgba(140, 198, 63, 0.1)),
    #fef9e7;
  color: #fff;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 950;
}

.client-item-photo-button {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 42, 107, 0.08);
  border-radius: calc(var(--radius) - 2px);
  padding: 8px;
  background: #fff;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62), 0 10px 20px rgba(11, 42, 107, 0.08);
}

.client-item-photo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: calc(var(--radius) - 8px);
  background: #fff;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 10px 16px rgba(11, 42, 107, 0.13));
}

.client-item-photo > span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(11, 42, 107, 0.94), rgba(18, 74, 159, 0.9));
  box-shadow: 0 14px 28px rgba(11, 42, 107, 0.16);
}

.client-item-photo-button:focus-visible {
  outline: 3px solid rgba(140, 198, 63, 0.72);
  outline-offset: -6px;
}

.client-item-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.client-item-tag {
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--green-soft);
  color: #3f7d10;
  font-size: 0.75rem;
  font-weight: 950;
}

.client-item-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.client-item-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 780;
}

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

.client-item-card dl div {
  border: 1px solid rgba(11, 42, 107, 0.07);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 250, 232, 0.66);
}

.client-item-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.client-item-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

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

.client-schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 42, 107, 0.46);
  backdrop-filter: blur(8px);
}

.client-schedule-modal.hidden {
  display: none;
}

.client-schedule-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  border: 1px solid rgba(11, 42, 107, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: #fffdf7;
  box-shadow: 0 30px 80px rgba(11, 42, 107, 0.22);
}

.client-schedule-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(11, 42, 107, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
}

.client-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  background: rgba(11, 42, 107, 0.66);
  backdrop-filter: blur(8px);
}

.client-photo-viewer.hidden {
  display: none;
}

.client-photo-viewer-dialog {
  position: relative;
  width: min(100%, 860px);
  max-height: min(92dvh, 820px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fffdf7;
  box-shadow: 0 34px 90px rgba(11, 42, 107, 0.3);
}

.client-photo-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(11, 42, 107, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(11, 42, 107, 0.16);
}

.client-photo-viewer-frame {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid rgba(11, 42, 107, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 250, 232, 0.96), rgba(140, 198, 63, 0.12)),
    #fef9e7;
}

.client-photo-viewer-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: min(74dvh, 680px);
  display: block;
  object-fit: contain;
  object-position: center center;
}

.client-photo-viewer-title {
  margin: 0;
  color: var(--blue);
  font-size: 0.98rem;
  font-weight: 850;
  text-align: center;
}

.client-zones-dialog {
  width: min(100%, 620px);
}

.client-zones-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.client-zone-day {
  display: grid;
  grid-template-columns: minmax(96px, 0.6fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(11, 42, 107, 0.09);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.client-zone-day strong {
  color: var(--blue);
}

.client-zone-day span {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.client-zone-day.is-rest span {
  color: var(--muted);
}

.history-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(251, 253, 255, 0.96);
  box-shadow: 0 12px 26px rgba(11, 42, 107, 0.07);
}

.appointment-card {
  background: rgba(255, 255, 255, 0.96);
}

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

.appointment-employee-card > span:last-child {
  min-width: 0;
}

.appointment-employee-card.is-unassigned {
  opacity: 0.82;
}

.appointment-employee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.appointment-employee-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

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

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

.appointment-employee-card small,
.appointment-employee-card strong,
.appointment-employee-list {
  display: block;
  min-width: 0;
}

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

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

.history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(140, 198, 63, 0.95);
  color: #17380e;
  font-size: 0.8rem;
  font-weight: 950;
  white-space: nowrap;
}

.status-pill.is-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.details {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.details li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(11, 42, 107, 0.06);
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.details li:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.detail-label .portal-icon {
  color: var(--navy);
}

.details strong {
  color: var(--ink);
  text-align: right;
}

.empty-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
}

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

@keyframes clientHeroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes clientHeroPaw {
  0%,
  100% {
    opacity: 0.58;
    transform: translateY(0);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-4px);
  }
}

@keyframes clientHeroFrameMotion {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  28% {
    transform: translateY(-1px) scale(1.006);
  }
  58% {
    transform: translateY(1px) scale(1.002);
  }
}

@keyframes clientHeroSheen {
  0% {
    opacity: 0;
    transform: translateX(-70%);
  }
  34%,
  54% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateX(70%);
  }
}

@media (max-width: 1040px) {
  .client-internal-nav p {
    display: none;
  }

  .client-internal-nav a,
  .client-nav-button {
    gap: 6px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
}

@media (max-width: 860px) {
  .welcome-band,
  .history-actions,
  .portal-grid,
  .loyalty-cards,
  .client-item-launchers,
  .client-items-list,
  .client-item-fields,
  .client-item-fields--shared,
  .client-schedule-fields {
    grid-template-columns: 1fr;
  }

  .welcome-band {
    grid-template-columns: 1fr;
  }

  .client-hero {
    min-height: 0;
  }

  .client-hero__visual {
    min-height: 220px;
  }

  .client-hero__animation {
    width: min(100%, 380px);
  }

  .portal-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .portal-nav {
    flex: 1 1 auto;
    min-width: 280px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

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

  .appointments-panel {
    grid-column: auto;
  }
}

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

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

  .portal-header {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: hidden;
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand-logo {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .brand > span:not(.brand-logo) {
    display: none;
  }

  .portal-nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    gap: 4px;
    overflow: hidden;
  }

  .portal-nav a,
  .portal-nav button {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    min-height: 38px;
    gap: 3px;
    padding: 0 5px;
    font-size: 0.7rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .portal-return-text--desktop {
    display: none;
  }

  .portal-return-text--mobile {
    display: inline;
  }

  .portal-nav .portal-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .quick-summary {
    grid-template-columns: 1fr;
  }

  .client-hero {
    padding: 20px;
  }

  .client-hero h1 {
    font-size: 2.1rem;
  }

  .client-hero h2 {
    font-size: 1.35rem;
  }

  .client-hero__actions,
  .client-hero__action {
    width: 100%;
  }

  .client-hero__visual {
    min-height: 190px;
  }

  .client-hero__animation {
    width: min(100%, 310px);
  }

  .client-hero__animation-frame {
    transform: scale(1.002);
  }

  .stamp-grid {
    grid-template-columns: repeat(4, minmax(46px, 1fr));
  }

  .history-toggle {
    justify-content: flex-start;
  }

  .client-item-form,
  .client-item-launcher,
  .client-item-group,
  .client-schedule-dialog,
  .client-item-card-body {
    padding: 14px;
  }

  .client-photo-viewer {
    padding: 12px;
  }

  .client-photo-viewer-dialog {
    max-height: calc(100vh - 24px);
    padding: 12px;
  }

  .client-photo-viewer-close {
    top: 8px;
    right: 8px;
  }

  .client-photo-viewer-frame img {
    max-height: calc(100vh - 128px);
  }

  .client-item-fields label:has(textarea),
  .client-item-fields label:has(input[type="file"]) {
    grid-column: auto;
  }

  .client-item-actions,
  .client-item-card-actions,
  .client-item-primary,
  .client-item-add-button,
  .client-item-whatsapp,
  .client-item-secondary,
  .client-item-danger,
  .client-zones-link {
    width: 100%;
  }

  .client-item-card dl {
    grid-template-columns: 1fr;
  }

  .client-zone-day {
    grid-template-columns: 1fr;
  }

  .client-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, 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);
  }

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

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

  .client-bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .history-top,
  .details li {
    display: grid;
  }

  .details strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-hero,
  .client-hero__bubble,
  .client-hero__paws span,
  .client-hero__animation,
  .client-hero__animation-frame,
  .client-hero__animation-sheen,
  .client-hero__action {
    animation: none;
    transition: none;
  }

  .client-hero__animation-sheen {
    display: none;
  }
}
