:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f9;
  --ink: #151824;
  --muted: #7d8493;
  --line: rgba(20, 28, 43, 0.08);
  --blue: #1d76f2;
  --purple: #8e35df;
  --teal: #25b7a5;
  --green: #21ba72;
  --orange: #f39b27;
  --pink: #d94bb6;
  --red: #e14f5a;
  --shadow: 0 18px 45px rgba(28, 41, 66, 0.12);
  --radius: 24px;
  --preview-width: 393px;
  --preview-height: 852px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior-y: none;
  background:
    radial-gradient(circle at 18% 6%, rgba(142, 53, 223, 0.22), transparent 32%),
    linear-gradient(145deg, #eef7ff 0%, #f7f6ff 48%, #f7fbff 100%);
  color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

input,
textarea,
select {
  -webkit-user-select: auto;
  user-select: auto;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.connection-banner {
  position: fixed;
  left: 50%;
  top: max(12px, env(safe-area-inset-top));
  z-index: 20;
  width: min(390px, calc(100% - 28px));
  min-height: 42px;
  display: none;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #151824;
  color: #fff;
  box-shadow: 0 16px 34px rgba(13, 20, 35, 0.24);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  padding: 0 16px;
}

.connection-banner.is-visible {
  display: grid;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.screen.is-active {
  display: block;
}

.screen-login {
  padding: 0 28px 28px;
}

.login-content {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 12px;
}

.brand-logo {
  width: 200px;
  max-height: 90px;
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.login-content h1 {
  text-align: center;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 30px;
}

.login-form,
.booking-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.label-with-ai {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-ai-prompt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-ai-prompt:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-ai-prompt:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ai-prompt i {
  font-size: 11px;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  padding: 0 15px;
  outline: none;
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.04);
}

input:focus,
select:focus {
  border-color: rgba(29, 118, 242, 0.55);
  box-shadow: 0 0 0 4px rgba(29, 118, 242, 0.12);
}

.primary-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 16px 28px rgba(85, 74, 226, 0.26);
}

.primary-button.compact {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
}

.button-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 25px;
  line-height: 1;
}

.form-message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

/* Registro de Veterinaria */
.login-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-footer-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.register-link-btn {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid rgba(29, 118, 242, 0.25);
  background: rgba(29, 118, 242, 0.05);
  color: var(--blue);
  cursor: pointer;
  transition: all 0.2s ease;
}

.register-link-btn:active {
  transform: scale(0.98);
  background: rgba(29, 118, 242, 0.12);
}

.screen-register {
  padding: 0;
  overflow-y: auto;
  background: #f7f8fc;
}

.screen-register.is-active {
  display: block;
}

.register-content {
  max-width: 440px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.register-header {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 8px;
}

.icon-back-button {
  position: absolute;
  left: 0;
  top: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.icon-back-button:active {
  background: rgba(0, 0, 0, 0.06);
}

.brand-logo.compact {
  width: 150px;
  max-height: 68px;
  margin: 0 auto 12px;
}

.register-header-text h2 {
  font-size: 24px;
  font-weight: 850;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.register-header-text .eyebrow {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.register-draft-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 600;
  animation: fadeInStep 0.2s ease-out;
}

.register-draft-badge-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-draft-badge-content i {
  color: #3b82f6;
  font-size: 14px;
}

.register-draft-discard-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.register-draft-discard-btn:active {
  background: rgba(0, 0, 0, 0.08);
  color: #dc2626;
}

.register-draft-step-pill {
  display: inline-block;
  font-size: 11px;
  background: var(--blue);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.register-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transition: all 0.25s ease;
}

.step-pill.is-active {
  background: linear-gradient(135deg, rgba(29, 118, 242, 0.12), rgba(111, 76, 255, 0.12));
  border-color: rgba(29, 118, 242, 0.4);
  color: var(--blue);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.step-pill.is-active .step-num {
  background: var(--blue);
  color: #fff;
}

.step-divider {
  width: 24px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.register-step-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeInStep 0.25s ease-out;
}

.register-step-pane.is-active {
  display: flex;
}

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

.step-card {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(23, 42, 77, 0.05);
}

.step-next-btn {
  width: 100%;
}

.form-actions-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
}

.register-summary-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #065f46;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
}

.register-summary-badge i {
  color: #10b981;
  font-size: 15px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Paso 3: Servicios */
.services-header-box {
  margin-bottom: 2px;
}

.services-header-box h3 {
  font-size: 18px;
  font-weight: 850;
  color: var(--ink);
  margin-bottom: 4px;
}

.services-header-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.services-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.service-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.2s ease;
}

.service-check-item.is-selected {
  border-color: rgba(29, 118, 242, 0.4);
  background: rgba(29, 118, 242, 0.03);
}

.service-check-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.service-check-checkbox {
  width: 20px;
  height: 20px;
  min-height: 20px;
  border-radius: 6px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.service-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(29, 118, 242, 0.1);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.service-check-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.service-check-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-check-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.service-price-wrapper {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f1f3f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 8px;
  flex-shrink: 0;
}

.service-currency {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.service-price-input {
  width: 58px;
  min-height: 28px;
  border: none !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  padding: 0;
  text-align: right;
  box-shadow: none !important;
  outline: none;
}

.add-custom-service-btn {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px dashed rgba(29, 118, 242, 0.45);
  background: rgba(29, 118, 242, 0.04);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.add-custom-service-btn:active {
  background: rgba(29, 118, 242, 0.1);
}

.service-toggles-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  margin-top: 4px;
}

.toggle-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.toggle-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.screen-dashboard {
  display: none;
  padding: 0;
  overflow: hidden;
}

.screen-dashboard.is-active {
  display: flex;
  flex-direction: column;
}

.dashboard-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(14px, env(safe-area-inset-top)) 18px 108px;
  scrollbar-width: none;
}

.dashboard-scroll::-webkit-scrollbar {
  display: none;
}

.topbar,
.panel-header,
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 0 4px 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.08);
  font-size: 24px;
  line-height: 1;
}

.date-jump {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  padding: 0 2px 12px;
}

.date-jump label {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.05);
}

.date-jump span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.date-jump input {
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  font-weight: 850;
}

.date-nav-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.08);
  font-size: 26px;
  line-height: 1;
}

.date-strip,
.staff-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar,
.staff-row::-webkit-scrollbar {
  display: none;
}

.date-pill,
.staff-pill {
  flex: 0 0 auto;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.05);
}

.date-pill {
  width: 50px;
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 0;
}

.date-pill strong {
  font-size: 19px;
}

.date-pill small {
  color: var(--muted);
  font-weight: 850;
}

.date-pill.is-active {
  background: #161b2b;
  color: #fff;
}

.date-pill.is-active small {
  color: rgba(255, 255, 255, 0.7);
}

.staff-pill {
  min-width: 88px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 9px 12px;
}

.staff-pill.is-active {
  background: #151824;
  color: #fff;
}

.staff-pill.is-active .staff-avatar {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.staff-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 900;
  overflow: hidden;
}

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

.staff-pill:nth-child(2n) .staff-avatar {
  border-color: var(--purple);
  color: var(--purple);
  background: #f8f0ff;
}

.staff-pill:nth-child(3n) .staff-avatar {
  border-color: var(--green);
  color: var(--green);
  background: #ecfff6;
}

.staff-pill span:last-child {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 850;
}

.staff-empty {
  flex: 0 0 auto;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border: 1px dashed rgba(21, 24, 36, 0.12);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 850;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.summary-grid article {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(23, 42, 77, 0.05);
}

.summary-grid span {
  font-size: 25px;
  font-weight: 920;
}

.summary-grid small {
  color: var(--muted);
  font-weight: 800;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(23, 42, 77, 0.06);
}

.schedule-panel {
  padding: 16px;
}

.panel-header {
  margin-bottom: 12px;
}

.panel-header h3,
.sheet-header h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.text-button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--blue);
  font-weight: 850;
}

.timeline {
  display: grid;
  gap: 0;
}

.day-calendar {
  position: relative;
  min-height: calc((var(--hour-height) * 14) + 8px);
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
  overflow: hidden;
}

.calendar-hour {
  display: grid;
  grid-template-columns: 54px 1fr;
  min-height: var(--hour-height);
}

.calendar-time {
  padding-top: 8px;
  color: #8a92a1;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.calendar-line {
  margin-left: 12px;
  border-top: 1px solid rgba(21, 24, 36, 0.07);
}

.calendar-events {
  position: absolute;
  inset: 0 12px 0 70px;
}

.calendar-event {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 50px 8px 14px;
  border: 0;
  border-left: 5px solid var(--event-color, var(--purple));
  border-radius: 14px;
  background: #eef0f7;
  color: var(--ink);
  box-shadow: 0 10px 18px rgba(23, 42, 77, 0.08);
  text-align: left;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
  animation: eventCardFadeIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes eventCardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.calendar-event,
.calendar-event * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.calendar-event:focus {
  outline: none;
}

.calendar-event:focus-visible {
  box-shadow: 0 0 0 4px rgba(29, 118, 242, 0.14), 0 10px 18px rgba(23, 42, 77, 0.08);
}

.calendar-event.is-dragging {
  z-index: 4;
  transform: scale(1.015);
  box-shadow: 0 18px 34px rgba(23, 42, 77, 0.18);
}

.calendar-event-time,
.calendar-event-meta,
.calendar-event-staff {
  color: #687182;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.calendar-event-title {
  color: #151824;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

.calendar-event-meta,
.calendar-event-staff {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.calendar-event-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.calendar-event-status-pill.status-0 {
  background-color: #fee2e2;
  color: #b91c1c;
}
.calendar-event-status-pill.status-1 {
  background-color: #fef3c7;
  color: #b45309;
}
.calendar-event-status-pill.status-2 {
  background-color: #dbeafe;
  color: #1d4ed8;
}
.calendar-event-status-pill.status-3 {
  background-color: #dcfce7;
  color: #15803d;
}
.calendar-event-status-pill.status-4 {
  background-color: #f1f5f9;
  color: #475569;
}

.status-select-control {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-size: 13px;
  font-weight: 750;
  border-radius: 12px;
  padding: 10px 28px 10px 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  transition: all 0.2s ease;
}

.status-select-control[data-status="0"] {
  background-color: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.status-select-control[data-status="1"] {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

.status-select-control[data-status="2"] {
  background-color: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.status-select-control[data-status="3"] {
  background-color: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.status-select-control[data-status="4"] {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.consultation-button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf7f2;
  color: #0f8a5f;
  box-shadow: 0 8px 18px rgba(15, 138, 95, 0.16);
  font-size: 20px;
  transform: translateY(-50%);
  touch-action: manipulation;
  z-index: 3;
}

.calendar-empty {
  position: absolute;
  left: 70px;
  right: 12px;
  top: 18px;
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(21, 24, 36, 0.12);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.event-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.event-card:focus {
  outline: none;
}

.event-card:focus-visible .event-body {
  box-shadow: 0 0 0 4px rgba(29, 118, 242, 0.14);
}

.event-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  padding-top: 12px;
}

.event-body {
  position: relative;
  min-height: 82px;
  padding: 14px 14px 14px 16px;
  border-radius: 20px;
  background: var(--surface-soft);
  overflow: hidden;
}

.event-body::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--event-color, var(--purple));
}

.event-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.event-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-title span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.event-meta {
  margin-top: 8px;
  color: #4b5362;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.empty-state {
  min-height: 138px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  padding: 20px;
}

.module-view {
  height: 100%;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 112px max(18px, env(safe-area-inset-left));
}

.module-topbar {
  margin-bottom: 14px;
}

.client-search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

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

.client-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
}

.pet-list-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e9f3ff, #f1e7ff);
  color: var(--blue);
  font-weight: 950;
}

.pet-list-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e9f3ff, #f1e7ff);
  color: var(--blue);
  font-weight: 950;
}

.client-card strong,
.client-card span,
.client-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card strong {
  font-size: 15px;
}

.client-card span,
.client-card small {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.toggle-row {
  grid-template-columns: auto 1fr;
  display: grid;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  color: var(--muted);
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
}

.detail-stack {
  display: grid;
  gap: 14px;
}

.detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
}

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

.detail-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 2px 0 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.detail-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-section-header h4 {
  margin: 0;
}

.detail-section-header span {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
}

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

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

.pet-card.is-muted {
  opacity: 0.62;
}

.pet-card strong,
.pet-card span,
.pet-card small {
  display: block;
}

.pet-card span,
.pet-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pet-actions {
  display: inline-flex;
  gap: 6px;
}

.pet-actions .icon-button {
  width: 38px;
  height: 38px;
}

.pet-birth-field small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.pet-detail-sheet .sheet-card {
  max-height: min(810px, calc(100svh - 24px));
}

.pet-profile-hero {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.pet-profile-photo {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f3ff, #f1e7ff);
  color: var(--blue);
  font-size: 28px;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.12);
}

.pet-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.pet-profile-photo.has-image img {
  display: block;
}

.pet-profile-photo.has-image span {
  display: none;
}

.pet-profile-copy {
  min-width: 0;
}

.pet-profile-copy strong,
.pet-profile-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-profile-copy strong {
  font-size: 15px;
}

.pet-profile-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pet-camera-button {
  position: relative;
  overflow: hidden;
  background: #eaf4ff;
  color: var(--blue);
}

.pet-camera-button input,
.attachment-upload-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pet-detail-tabs {
  margin-bottom: 14px;
}

.pet-detail-panel {
  display: none;
  gap: 14px;
}

.pet-detail-panel.is-active {
  display: grid;
}

.pet-detail-grid {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.pet-notes {
  display: grid;
  gap: 6px;
}

.pet-notes p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: pre-wrap;
}

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

.detail-actions button {
  min-width: 0;
  padding: 0 8px;
}

.pet-history-sheet .sheet-card {
  max-height: min(810px, calc(100svh - 24px));
}

.pet-history-sheet .history-card {
  cursor: pointer;
}

.pet-history-sheet .history-card::after {
  content: "\f054";
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-family: "Font Awesome 5 Free";
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.history-detail-sheet .sheet-card {
  max-height: min(810px, calc(100svh - 24px));
}

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

.history-detail-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.history-detail-section strong,
.history-detail-section p {
  display: block;
}

.history-detail-section strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.history-detail-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.attachment-upload-row label {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  text-align: center;
}

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

.pet-attachment {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.pet-attachment img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
}

.pet-attachment .attachment-delete,
.pet-document .attachment-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
  box-shadow: 0 8px 18px rgba(20, 29, 47, 0.14);
}

.pet-attachment .attachment-delete {
  position: absolute;
  top: 8px;
  right: 8px;
}

.pet-document-list {
  display: grid;
  gap: 8px;
}

.pet-document {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.pet-document > i {
  color: var(--blue);
  font-size: 22px;
  text-align: center;
}

.pet-document a {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 8;
  width: min(394px, calc(100% - 36px));
  height: 76px;
  display: grid;
  grid-template-columns: 1fr 1fr 82px 1fr 1fr;
  align-items: center;
  transform: translateX(-50%);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 38px rgba(21, 31, 52, 0.16);
  backdrop-filter: blur(16px);
}

.tab-button,
.tab-add {
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: #b4bbc7;
  background: transparent;
  font-weight: 900;
}

.tab-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 21px;
}

.tab-button.is-active {
  color: #0f1524;
}

.tab-add {
  width: 66px;
  height: 66px;
  transform: translateY(-15px);
  border: 8px solid rgba(142, 53, 223, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 12px 24px rgba(91, 63, 226, 0.28);
  font-size: 30px;
}

.app-menu {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 180ms;
}

.app-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease, backdrop-filter 160ms ease;
}

.app-menu.is-open .menu-backdrop {
  background: rgba(10, 15, 25, 0.22);
  backdrop-filter: blur(2px);
  opacity: 1;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(356px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: max(22px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -22px 0 48px rgba(13, 20, 35, 0.18);
  transform: translateX(104%);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.app-menu.is-open .menu-panel {
  transform: translateX(0);
}

.menu-profile {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.company-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #e9f3ff, #f1e7ff);
  color: var(--blue);
  font-weight: 950;
  border: 1px solid var(--line);
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.company-logo.has-image img {
  display: block;
}

.company-logo.has-image span {
  display: none;
}

.menu-profile h3 {
  margin: 2px 0;
  font-size: 18px;
  line-height: 1.1;
}

.menu-profile span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.menu-list {
  display: grid;
  align-content: start;
  gap: 5px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.menu-item {
  min-height: 48px;
  border-radius: 15px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  text-align: left;
}

.menu-item i {
  color: inherit;
}

.menu-item.is-active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 14px 28px rgba(91, 63, 226, 0.2);
}

.menu-footer {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.logout-button {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #fff0f2;
  color: var(--red);
  font-weight: 950;
}

.sheet {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 10;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 160ms;
}

#clientDetailSheet,
#saleDetailSheet {
  z-index: 18;
}

#paymentSheet,
#saleItemSheet {
  z-index: 20;
}

#clientSheet,
#petSheet,
#productSheet,
#productStockSheet {
  z-index: 24;
}

#productDetailSheet {
  z-index: 18;
}

#petOwnerSheet {
  z-index: 22;
}

#quickClientSheet {
  z-index: 30;
}

#companySheet {
  z-index: 25;
}

#whatsappConnectSheet {
  z-index: 35;
}

#planUpgradeSheet {
  z-index: 50;
}

.owner-picker-search {
  margin-bottom: 12px;
}

.owner-picker-list {
  display: grid;
  gap: 9px;
}

.owner-picker-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
}

.owner-picker-item strong,
.owner-picker-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-picker-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.owner-picker-item .owner-picker-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f3ff, #f1e7ff);
  color: var(--blue);
  font-size: 20px;
  text-align: center;
  overflow: hidden;
}

.owner-picker-item .owner-picker-avatar i {
  display: block;
  line-height: 1;
}

.sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease, backdrop-filter 160ms ease;
}

.sheet.is-open .sheet-backdrop {
  background: rgba(9, 13, 22, 0.18);
  backdrop-filter: blur(2px);
  opacity: 1;
}

.sheet-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(430px, calc(100% - 28px));
  max-height: min(760px, calc(100svh - 42px));
  overflow-y: auto;
  overflow-x: hidden;
  transform: translate3d(-50%, calc(100% + 18px), 0);
  padding: 10px 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 32px 32px 0 0;
  background: rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 
    0 -18px 44px rgba(13, 20, 35, 0.14),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.sheet.is-open .sheet-card {
  transform: translate3d(-50%, 0, 0);
}

.sheet-handle {
  width: 48px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #d7dce6;
}

.sheet-header {
  margin-bottom: 16px;
}

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

.booking-date-chip {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(29, 118, 242, 0.12);
  border-radius: 18px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.booking-date-chip input {
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  box-shadow: none;
  -webkit-text-fill-color: var(--ink);
}

.booking-date-chip input.is-readonly {
  opacity: 1;
}

.field-row-money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row input[type="time"] {
  padding: 0 10px;
  font-size: 16px;
  font-weight: 850;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field input,
.search-field select {
  flex: 1;
  min-width: 0;
  height: 50px;
}

.search-field .icon-button {
  width: 48px;
  height: 50px;
  border-radius: 18px;
  flex-shrink: 0;
}

.btn-quick-add {
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, background-color 0.2s ease;
  cursor: pointer;
}

.btn-quick-add:hover {
  background: #059669 !important;
}

.btn-quick-add:active {
  transform: scale(0.92);
  background: #047857 !important;
}

#bookingPet[readonly] {
  background-color: var(--color-surface-variant, #f8fafc);
  cursor: pointer;
  user-select: none;
}

#bookingPet[readonly]:focus {
  outline: none;
  border-color: var(--color-primary, #1d76f2);
}

.client-results {
  display: grid;
  gap: 8px;
  max-height: 156px;
  overflow-y: auto;
}

.service-picker {
  position: relative;
}

.service-picker::after {
  content: "▾";
  position: absolute;
  top: 15px;
  right: 16px;
  color: #1f2937;
  font-size: 15px;
  pointer-events: none;
}

.service-picker input {
  padding-right: 42px;
}

.service-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(20, 32, 54, 0.18);
  -webkit-overflow-scrolling: touch;
}

.service-picker.is-open .service-results {
  display: grid;
}

.service-result,
.service-result-empty {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 12px;
  font: inherit;
  text-align: left;
}

.service-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.service-result span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.service-result:hover,
.service-result:focus {
  background: #eef5ff;
}

.service-result small,
.service-result-empty {
  color: #7b8495;
  font-size: 12px;
  font-weight: 750;
}

.client-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.client-result strong,
.client-result span {
  display: block;
}

.client-result strong {
  font-size: 14px;
}

.client-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-result-empty {
  min-height: 44px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 20px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 42px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.segmented button.is-active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 10px 20px rgba(91, 63, 226, 0.2);
}

.sheet-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.sheet-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.sheet-message.is-error {
  color: var(--red);
}

.sheet-message.is-success {
  color: var(--green);
}

.consultation-sheet .sheet-card {
  max-height: min(760px, calc(100vh - 54px));
}

.consultation-form textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(20, 29, 47, 0.02);
}

.consultation-pet-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.consultation-pet-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #1d4ed8;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.consultation-pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consultation-pet-info {
  flex-grow: 1;
  min-width: 0;
}

.consultation-pet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.consultation-pet-title-row h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  color: #1e3a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.consultation-pet-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.consultation-owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1d76f2;
}

.consultation-quick-wp {
  background: #25d366;
  color: white;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.consultation-vitals-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

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

.vital-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.vital-label {
  font-size: 11px;
  font-weight: 750;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.vital-card input {
  font-size: 17px !important;
  font-weight: 850 !important;
  text-align: center !important;
  border: 1px solid #cbd5e1 !important;
  background: white !important;
  border-radius: 10px !important;
  height: 36px !important;
  color: #1e293b !important;
}

.vital-card input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.consultation-next-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
}

.consultation-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  margin-bottom: 8px;
}

.consultation-tabs button {
  min-height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1;
}

.consultation-tabs i {
  font-size: 13px;
}

.consultation-tab-panel {
  display: none;
  gap: 10px;
}

.consultation-tab-panel.is-active {
  display: grid;
}

.whatsapp-button {
  min-height: 48px;
  border-radius: 16px;
  background: #eaf7f2;
  color: #0f8a5f;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 138, 95, 0.12);
}

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

.history-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
}

.history-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-card-header strong,
.history-card-header span,
.history-card-header small {
  display: block;
}

.history-card-header span,
.history-card-header small,
.history-empty,
.history-vitals,
.history-next {
  color: var(--muted);
}

.history-card-header small i {
  margin-right: 3px;
}

.study-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.study-upload label {
  margin: 0;
}

.secondary-button {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  background: #edf6ff;
  color: var(--blue);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.secondary-button:disabled {
  opacity: 0.55;
}

.file-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.history-vitals,
.history-next {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
}

.history-notes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.history-notes p,
.history-empty {
  margin: 0;
}

.history-empty.compact {
  margin-top: 10px;
}

.danger-button {
  min-height: 48px;
  border-radius: 16px;
  background: #fff0f2;
  color: var(--red);
  font-weight: 850;
}

.sales-search-panel {
  grid-template-columns: minmax(0, 1fr) 132px;
}

.sales-search-panel label {
  min-width: 0;
}

.sales-search-panel input[type="date"] {
  width: 100%;
  min-width: 0;
  padding-inline: 12px 8px;
  font-size: 14px;
}

.sales-search-panel .primary-button {
  grid-column: 1 / -1;
}

.sales-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.sales-summary article {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.sales-summary span,
.sales-summary small {
  display: block;
}

.sales-summary span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.sales-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.sale-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
  cursor: pointer;
}

.sale-card-header,
.sale-card-footer,
.sale-customer-card,
.sale-item,
.sale-totals div,
.payment-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sale-card-header div,
.sale-card-header span,
.sale-card-header strong,
.sale-card small,
.sale-card p {
  display: block;
}

.sale-card-header div > span,
.sale-card-footer span,
.sale-card small,
.sale-card p,
.sale-customer-card span,
.sale-item span,
.sale-totals span,
.sale-payment span,
.sale-payment small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sale-card p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-status {
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
}

.sale-status.is-open { background: #e8f8f0; color: #128055; }
.sale-status.is-closed { background: #edf1f7; color: #596579; }
.sale-status.is-pending { background: #fff4dc; color: #a66800; }

.sale-detail-sheet .sheet-card,
.payment-sheet .sheet-card,
.sale-item-sheet .sheet-card,
.product-detail-sheet .sheet-card,
.product-form-sheet .sheet-card,
.product-stock-sheet .sheet-card {
  max-height: min(760px, calc(100vh - 54px));
}

.product-search-panel {
  grid-template-columns: minmax(0, 1fr) 132px;
}

.product-search-panel .primary-button {
  grid-column: 1 / -1;
}

.product-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
  cursor: pointer;
}

.product-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 19px;
}

.product-card strong,
.product-card span,
.product-card small {
  display: block;
}

.product-card > div:nth-child(2) {
  min-width: 0;
}

.product-card > div:nth-child(2) strong,
.product-card > div:nth-child(2) span,
.product-card > div:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card > div:nth-child(2) strong {
  font-size: 14px;
}

.product-card > div:nth-child(2) span,
.product-card > div:nth-child(2) small,
.product-card-stock small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-card-stock {
  min-width: 78px;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.product-card-stock > strong {
  font-size: 18px;
}

.product-stock-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-soft);
}

.product-stock-hero div {
  min-width: 0;
}

.product-stock-hero small,
.product-stock-hero strong {
  display: block;
}

.product-stock-hero small,
.product-detail-grid small,
.product-movement span,
.product-movement small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-stock-hero strong {
  margin-top: 3px;
  font-size: 24px;
}

.product-stock-hero .sale-status {
  position: absolute;
  right: 12px;
  top: 12px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.product-detail-grid small,
.product-detail-grid strong {
  display: block;
}

.product-detail-grid strong {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.product-description {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.product-movements {
  display: grid;
  gap: 8px;
}

.product-movement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.product-movement div:last-child {
  text-align: right;
}

.product-movement strong,
.product-movement span,
.product-movement small {
  display: block;
}

.product-detail-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0 2px;
  background: rgba(255, 255, 255, 0.96);
}

#cashActionSheet,
#cashListSheet {
  z-index: 24;
}

.cash-date-jump {
  margin-bottom: 12px;
}

.cash-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(29, 118, 242, 0.12);
  border-radius: 20px;
  background: #eef6ff;
}

.cash-status-card.is-open {
  background: #eaf9f2;
  border-color: rgba(33, 186, 114, 0.16);
}

.cash-status-card.is-closed {
  background: #f0f3f8;
  border-color: var(--line);
}

.cash-status-card small,
.cash-status-card strong,
.cash-status-card span {
  display: block;
}

.cash-status-card small,
.cash-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cash-status-card strong {
  margin: 3px 0;
  font-size: 19px;
}

.cash-status-card .primary-button {
  width: auto;
  min-width: 100px;
  padding-inline: 14px;
}

.cash-summary {
  margin-block: 12px;
}

.cash-methods {
  display: grid;
  gap: 8px;
}

.cash-methods article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.cash-methods i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eaf4ff;
  color: var(--blue);
}

.cash-methods strong,
.cash-methods span,
.cash-methods small {
  display: block;
}

.cash-methods span {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 900;
}

.cash-methods small {
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

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

.cash-balance-card div {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.cash-balance-card small,
.cash-balance-card strong {
  display: block;
}

.cash-balance-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.cash-balance-card strong {
  margin-top: 3px;
  font-size: 17px;
}

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

.cash-close-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.cash-close-preview div,
.cash-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cash-close-preview span,
.cash-list-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cash-list {
  display: grid;
  gap: 8px;
}

.cash-list-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.cash-list-item.is-expense {
  background: #fff7f8;
}

.cash-list-item div:last-child {
  text-align: right;
}

.cash-list-item strong,
.cash-list-item span {
  display: block;
}

.cash-action-sheet .sheet-card,
.cash-list-sheet .sheet-card {
  max-height: min(760px, calc(100vh - 54px));
}

.sale-customer-card,
.sale-totals,
.payment-balance {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.sale-customer-card strong,
.sale-customer-card span {
  display: block;
}

.sale-items,
.sale-payments {
  display: grid;
  gap: 8px;
}

.sale-item,
.sale-payment {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.sale-item {
  position: relative;
  padding-right: 42px;
}

.sale-item .attachment-delete {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.sale-item div,
.sale-item strong,
.sale-item span,
.sale-payment span,
.sale-payment strong,
.sale-payment small {
  display: block;
}

.sale-totals {
  display: grid;
  gap: 7px;
}

.sale-totals .sale-balance {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.payment-balance {
  background: #edf6ff;
  color: var(--blue);
}

.payment-balance strong {
  font-size: 22px;
}

.sale-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sale-item-results {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.sale-item-results .service-result:disabled,
.sale-item-results .service-result.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  background: #f3f5f8;
}

.sale-service-fields {
  display: grid;
  gap: 10px;
}

.sale-service-fields[hidden] {
  display: none;
}

.sale-service-fields .booking-date-chip,
.sale-service-fields .field-row {
  display: none;
}

.sale-service-fields.is-agenda .booking-date-chip,
.sale-service-fields.is-agenda .field-row {
  display: grid;
}

@media (max-width: 420px) {
  .app-shell {
    padding: 0;
  }

  .screen {
    width: 100%;
    min-height: 100svh;
    max-height: 100svh;
    border-radius: 0;
    border: 0;
  }

  .screen-login {
    padding-inline: 24px;
  }

  .sheet-card {
    bottom: 0;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    width: 100%;
    border-radius: 30px 30px 0 0;
  }
}

.expense-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(20, 29, 47, 0.06);
  margin-bottom: 12px;
  gap: 16px;
  transition: transform 120ms, background-color 120ms;
}

.expense-card:active {
  transform: scale(0.98);
}

.expense-card-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.expense-card-left strong {
  font-size: 15px;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
  white-space: normal;
  word-break: break-word;
}

.expense-card-left span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.expense-card-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.expense-card-right strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
}

.expense-card-right small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
}

@supports (animation-timeline: view()) {
  .calendar-event {
    animation: scrollScale linear both;
    animation-timeline: view();
    animation-range: entry 5% exit 95%;
  }
}

@keyframes scrollScale {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  40%, 60% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.85;
  }
}

.product-card,
.client-card,
.sale-card,
.expense-card,
.clinical-card,
.service-catalog-card {
  animation: eventCardFadeIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.clinical-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4.5px solid var(--blue, #1d76f2);
  border-radius: 16px;
  padding: 16px;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(28, 41, 66, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 14px;
  width: 100%;
}

.clinical-card:active {
  transform: scale(0.99);
}

.clinical-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clinical-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.15);
}

.clinical-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clinical-card-title-box {
  flex-grow: 1;
  min-width: 0;
}

.clinical-card-title-box h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clinical-card-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clinical-card-owner {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue, #1d76f2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clinical-card-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-soft, #f8fafc);
  border-radius: 14px;
}

.clinical-service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
}

.clinical-vet-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.clinical-card-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 10px;
}

.clinical-card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.clinical-attended-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.clinical-attended-badge.attended {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.clinical-attended-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.clinical-status-select {
  appearance: none;
  -webkit-appearance: none;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  padding: 7px 28px 7px 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  transition: all 0.2s ease;
}

.clinical-status-select[data-status="0"] { background-color: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.clinical-status-select[data-status="1"] { background-color: #fef3c7; color: #b45309; border-color: #fcd34d; }
.clinical-status-select[data-status="2"] { background-color: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.clinical-status-select[data-status="3"] { background-color: #dcfce7; color: #15803d; border-color: #86efac; }
.clinical-status-select[data-status="4"] { background-color: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.clinical-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.clinical-btn-attend {
  background: linear-gradient(135deg, #1d76f2, #2563eb);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(29, 118, 242, 0.2);
}

.clinical-btn-obs {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.clinical-btn-obs.has-obs {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}

.clinical-btn-next {
  background: #f8fafc;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.clinical-btn-wp {
  background-color: #25d366;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

/* Evitar desbordamiento de inputs de fecha en móvil */
.client-search-panel input[type="date"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
  padding: 0 12px !important;
  font-size: 14px !important;
}

.client-search-panel label.clinical-date-field {
  width: 70% !important;
  justify-self: center !important;
  text-align: center !important;
}
.client-search-panel label.clinical-date-field input {
  text-align: center !important;
}

.sales-search-panel label.sales-date-field {
  grid-column: 1 / -1 !important;
  width: 60% !important;
  justify-self: center !important;
  text-align: center !important;
}
.sales-search-panel label.sales-date-field input {
  text-align: center !important;
}

/* Acciones en la barra superior (topbar) */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Caja distintiva de filtros desplegables */
.collapsible-filter-panel {
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f1fd 100%) !important;
  border: 1.5px solid #bdd7ff !important;
  border-radius: 20px !important;
  padding: 14px 14px 16px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 8px 24px rgba(29, 118, 242, 0.08) !important;
}

.filter-panel-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(29, 118, 242, 0.15);
}

.filter-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #1754b5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-panel-badge i {
  font-size: 12px;
  color: #1d76f2;
}

.filter-panel-close-btn {
  background: rgba(29, 118, 242, 0.12);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #1754b5;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-panel-close-btn:active {
  background: rgba(29, 118, 242, 0.28);
  transform: scale(0.92);
}

/* Estado activo del botón de lupa cuando el filtro está abierto o activo */
.icon-button.is-filter-active {
  background: var(--primary, #1d76f2) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(29, 118, 242, 0.35) !important;
}

/* ========================================================
   ESTILOS DE ATENCIÓN GROOMING (ESTÉTICA Y PELUQUERÍA)
   ======================================================== */
.grooming-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grooming-card {
  animation: eventCardFadeIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--grooming-status-color, #d9534f);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(28, 41, 66, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.grooming-card:active {
  transform: scale(0.99);
}

.grooming-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grooming-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.grooming-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grooming-card-title-box {
  flex-grow: 1;
  min-width: 0;
}

.grooming-card-title-box h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grooming-card-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grooming-card-owner {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #1d76f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grooming-card-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-soft, #f8fafc);
  border-radius: 14px;
}

.grooming-service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
}

.grooming-stylist-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.grooming-card-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 10px;
}

.grooming-card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.grooming-status-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grooming-status-select {
  appearance: none;
  -webkit-appearance: none;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  padding: 8px 30px 8px 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  transition: all 0.2s ease;
}

.grooming-status-select[data-status="0"] { background-color: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.grooming-status-select[data-status="1"] { background-color: #fef3c7; color: #b45309; border-color: #fcd34d; }
.grooming-status-select[data-status="2"] { background-color: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.grooming-status-select[data-status="3"] { background-color: #dcfce7; color: #15803d; border-color: #86efac; }
.grooming-status-select[data-status="4"] { background-color: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.grooming-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.grooming-btn-wp {
  background-color: #25d366;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.grooming-btn-ficha {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
}

.grooming-btn-obs {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.grooming-btn-obs.has-obs {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}

.grooming-btn-next {
  background: #f8fafc;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Ficha de Peluquería Sheet */
.ficha-pet-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.ficha-pet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.ficha-pet-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  color: #0369a1;
}

.ficha-pet-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
}

.ficha-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--line);
}

.ficha-section-title i {
  color: #0891b2;
}

.ficha-processes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ficha-process-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ficha-process-item:has(input:checked) {
  background: #ecfeff;
  border-color: #06b6d4;
  color: #0e7490;
}

.ficha-process-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0891b2;
}

/* Resultado de hoy & Caja colored cards */
.today-results-panel {
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface, #ffffff);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.today-results-cards,
.cash-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.cash-stat-card {
  padding: 12px 10px;
  border-radius: 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  min-height: 96px;
  box-sizing: border-box;
}

.cash-stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cash-stat-card .stat-value,
.cash-stat-card .stat-amount {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cash-stat-card .stat-badge,
.cash-stat-card .stat-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 8px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Card 1: Ingresos */
.cash-stat-card.card-income {
  background: #ffffff;
  border-top: 3px solid #10b981;
}
.cash-stat-card.card-income .stat-badge,
.cash-stat-card.card-income .stat-pill,
.badge-green {
  background: #dcfce7 !important;
  color: #15803d !important;
}

/* Card 2: Gastos */
.cash-stat-card.card-expense {
  background: #ffffff;
  border-top: 3px solid #f43f5e;
}
.cash-stat-card.card-expense .stat-badge,
.cash-stat-card.card-expense .stat-pill,
.badge-red {
  background: #ffe4e6 !important;
  color: #be123c !important;
}

/* Card 3: Resultado / Neto (Mint/Turquoise inspired by design) */
.cash-stat-card.card-net {
  background: linear-gradient(135deg, #e6fffa 0%, #cffafe 100%) !important;
  border: 1px solid #99f6e4 !important;
  border-top: 3px solid #0d9488 !important;
}
.cash-stat-card.card-net .stat-value,
.cash-stat-card.card-net .stat-amount {
  color: #0f766e !important;
}
.cash-stat-card.card-net .stat-badge,
.cash-stat-card.card-net .stat-pill,
.badge-cyan {
  background: rgba(13, 148, 136, 0.18) !important;
  color: #0f766e !important;
}

/* Top services list */
.top-services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 12px;
}

.top-service-name {
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-service-bar-wrapper {
  flex: 1;
  background: #e2e8f0;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.top-service-bar-fill {
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.top-service-count {
  font-size: 13px;
  font-weight: 750;
  color: #1e293b;
  min-width: 24px;
  text-align: right;
}

/* SweetAlert container and popup high z-index to always stay above sheets and modals */
.swal2-container {
  z-index: 999999 !important;
}
