:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef8f6;
  --text: #12201f;
  --muted: #657776;
  --line: #dfe8e7;
  --primary: #0f766e;
  --primary-dark: #095c55;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --violet: #7c3aed;
  --rose: #e11d48;
  --shadow: 0 16px 40px rgba(20, 38, 37, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* LIA: onboarding, conversa e tour */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lia-help-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 50%;
  color: #0f766e;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 8px 22px rgba(15, 118, 110, .1);
  font-weight: 900;
  font-size: 18px;
  transition: .2s ease;
}

.lia-help-button:hover {
  color: #fff;
  background: #0f766e;
  transform: translateY(-2px);
}

.lia-launcher {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 7px;
  border: 1px solid rgba(46, 230, 218, .38);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #032b38, #0f766e);
  box-shadow: 0 16px 40px rgba(2, 44, 55, .3), 0 0 0 5px rgba(45, 212, 191, .08);
}

.lia-launcher img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid #42ddd2;
}

.lia-launcher strong {
  font-size: 13px;
  letter-spacing: -.01em;
}

.lia-launcher__status {
  position: absolute;
  left: 44px;
  top: 8px;
  width: 10px;
  height: 10px;
  border: 2px solid #063a43;
  border-radius: 50%;
  background: #5df0a7;
  box-shadow: 0 0 12px #5df0a7;
}

.lia-experience[hidden],
.lia-tour[hidden],
.lia-start-prompt[hidden] {
  display: none !important;
}

.lia-experience {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 22px;
}

.lia-experience__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 17, 24, .82);
  backdrop-filter: blur(14px);
}

.lia-experience__panel {
  position: relative;
  isolation: isolate;
  width: min(920px, 100%);
  min-height: 570px;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  overflow: hidden;
  border: 1px solid rgba(75, 236, 224, .32);
  border-radius: 32px;
  color: #eefdfc;
  background:
    radial-gradient(circle at 17% 35%, rgba(26, 214, 202, .2), transparent 34%),
    linear-gradient(145deg, #042b38 0%, #073f49 48%, #082f38 100%);
  box-shadow: 0 35px 100px rgba(0, 10, 16, .58), inset 0 1px rgba(255, 255, 255, .08);
  animation: lia-panel-in .5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes lia-panel-in {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.lia-tech-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background-image:
    linear-gradient(rgba(79, 226, 215, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 226, 215, .45) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.lia-experience__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: #d9f7f4;
  background: rgba(255,255,255,.07);
  font-size: 25px;
  line-height: 1;
}

.lia-portrait {
  position: relative;
  min-height: 570px;
  display: grid;
  place-items: end center;
  overflow: hidden;
}

.lia-portrait::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 3%;
  height: 80px;
  border-radius: 50%;
  background: #2be1d3;
  filter: blur(42px);
  opacity: .22;
}

.lia-portrait img {
  position: relative;
  z-index: 1;
  width: 96%;
  height: 88%;
  object-fit: cover;
  object-position: 50% 48%;
  border-radius: 0 60% 0 0;
  filter: drop-shadow(0 25px 32px rgba(0,0,0,.35));
}

.lia-orbit {
  position: absolute;
  border: 1px solid rgba(56, 224, 211, .42);
  border-radius: 50%;
  animation: lia-orbit 10s linear infinite;
}

.lia-orbit--one { width: 340px; height: 340px; top: 100px; left: 18px; }
.lia-orbit--two { width: 430px; height: 430px; top: 55px; left: -28px; animation-direction: reverse; animation-duration: 16s; }

@keyframes lia-orbit {
  to { transform: rotate(360deg); }
}

.lia-online-dot {
  position: absolute;
  z-index: 2;
  top: 116px;
  right: 42px;
  width: 13px;
  height: 13px;
  border: 2px solid #073742;
  border-radius: 50%;
  background: #55f0a0;
  box-shadow: 0 0 18px #55f0a0;
}

.lia-experience__content {
  align-self: center;
  padding: 58px 54px 46px 32px;
}

.lia-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #71f1e7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lia-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #59ee9f;
  box-shadow: 0 0 12px #59ee9f;
}

.lia-experience h2 {
  max-width: 500px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.lia-experience h2 em {
  color: #43e0d5;
  font-style: normal;
}

.lia-experience__content > p {
  margin: 0 0 24px;
  color: #c2dedd;
  font-size: 15px;
  line-height: 1.65;
}

.lia-voice-stage {
  min-height: 82px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: 45px 20px;
  column-gap: 15px;
  align-items: center;
  margin: 10px 0 24px;
  padding: 10px 15px;
  border: 1px solid rgba(86, 227, 216, .2);
  border-radius: 18px;
  background: rgba(1, 25, 32, .42);
}

.lia-mic-core {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(91, 242, 231, .5);
  border-radius: 50%;
  color: #062c36;
  background: linear-gradient(135deg, #75f4eb, #24bcb1);
  box-shadow: 0 0 0 0 rgba(66, 224, 213, .4);
}

.lia-mic-core svg,
.lia-primary-action svg,
.lia-secondary-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lia-mic-core svg rect { fill: none; }
.lia-primary-action svg path:first-child { fill: currentColor; stroke: none; }

.lia-sound-wave {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lia-sound-wave i {
  width: 4px;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(#75f4eb, #24bcb1);
  transition: height .2s;
}

.lia-voice-stage.is-speaking .lia-sound-wave i,
.lia-voice-stage.is-listening .lia-sound-wave i {
  animation: lia-wave .72s ease-in-out infinite alternate;
}

.lia-voice-stage.is-listening .lia-sound-wave i {
  background: linear-gradient(#ffde82, #ff9e45);
}

.lia-sound-wave i:nth-child(2n) { animation-delay: -.28s !important; }
.lia-sound-wave i:nth-child(3n) { animation-delay: -.5s !important; }
.lia-sound-wave i:nth-child(5n) { animation-delay: -.16s !important; }

@keyframes lia-wave {
  from { height: 7px; }
  to { height: 34px; }
}

.lia-voice-stage.is-speaking .lia-mic-core {
  animation: lia-mic-pulse 1.35s infinite;
}

@keyframes lia-mic-pulse {
  70% { box-shadow: 0 0 0 15px rgba(66, 224, 213, 0); }
  100% { box-shadow: 0 0 0 0 rgba(66, 224, 213, 0); }
}

.lia-voice-stage > span {
  color: #91b9b7;
  font-size: 11px;
}

.lia-experience__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lia-start-prompt {
  position: fixed;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: min(410px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(104, 242, 231, .48);
  border-radius: 24px;
  color: #eafffd;
  background:
    radial-gradient(circle at 8% 0%, rgba(79, 231, 219, .2), transparent 32%),
    linear-gradient(145deg, #073d48, #042c36);
  box-shadow: 0 28px 90px rgba(0, 9, 14, .6), 0 0 0 1px rgba(255,255,255,.04);
  transform: translate(-50%, -50%);
  animation: lia-start-prompt-in .36s cubic-bezier(.2,.8,.2,1);
}

.lia-start-prompt::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(0, 18, 24, .58);
  backdrop-filter: blur(5px);
}

@keyframes lia-start-prompt-in {
  from { opacity: 0; transform: translate(-50%, -44%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.lia-start-prompt__avatar {
  position: relative;
  width: 72px;
  height: 72px;
}

.lia-start-prompt__avatar img {
  width: 100%;
  height: 100%;
  border: 2px solid #54e7dc;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(77, 230, 218, .28);
}

.lia-start-prompt__avatar i {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  border: 2px solid #073b45;
  border-radius: 50%;
  background: #52f09a;
  box-shadow: 0 0 10px #52f09a;
}

.lia-start-prompt span {
  color: #64e9df;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lia-start-prompt h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  letter-spacing: -.03em;
}

.lia-start-prompt p {
  margin: 0;
  color: #b8d8d5;
  font-size: 12px;
  line-height: 1.5;
}

.lia-start-prompt__button {
  grid-column: 1 / -1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  color: #043039;
  background: linear-gradient(135deg, #73f4e9, #1fd0c2);
  box-shadow: 0 12px 28px rgba(31, 208, 194, .2);
  font-weight: 900;
}

.lia-start-prompt__button:disabled {
  opacity: .62;
  cursor: wait;
}

.lia-start-prompt__button svg {
  width: 20px;
  height: 20px;
}

.lia-start-prompt__button span {
  color: inherit;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.lia-primary-action,
.lia-secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
}

.lia-primary-action {
  border: 0;
  color: #052d35;
  background: linear-gradient(135deg, #70f1e7, #35cbbf);
  box-shadow: 0 12px 28px rgba(40, 207, 194, .2);
}

.lia-primary-action--start {
  min-width: 170px;
}

.lia-secondary-action {
  border: 1px solid rgba(105, 235, 225, .35);
  color: #dffbf9;
  background: rgba(255,255,255,.06);
}

.lia-chat-preview {
  margin: 0 0 20px;
}

.lia-chat-log {
  max-height: min(32vh, 280px);
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 227, 216, .45) transparent;
}

.lia-chat-bubble {
  width: fit-content;
  max-width: 90%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 13px 13px 13px 3px;
  color: #dff8f6;
  background: rgba(76, 218, 207, .14);
  font-size: 13px;
  line-height: 1.45;
}

.lia-chat-bubble--user {
  justify-self: end;
  border-radius: 13px 13px 3px;
  color: #07343c;
  background: #75e9df;
}

.lia-chat-bubble--live {
  min-width: 72px;
  box-shadow: 0 0 0 3px rgba(117, 233, 223, .12);
}

.lia-chat-bubble--live::after {
  content: " • ouvindo";
  opacity: .62;
  font-size: 10px;
}

.lia-chat-preview > p {
  margin: 7px 0 0;
  color: #8db3b1;
  font-size: 11px;
}

.lia-tour {
  position: fixed;
  inset: 0;
  z-index: 3500;
  pointer-events: none;
}

.lia-tour__shade {
  position: absolute;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 18, 25, .78), 0 0 0 4px #4ce0d5, 0 18px 55px rgba(0,0,0,.35);
  transition: .32s cubic-bezier(.2,.8,.2,1);
}

.lia-tour__card {
  position: absolute;
  width: min(360px, calc(100vw - 28px));
  padding: 20px;
  border: 1px solid rgba(76, 224, 213, .32);
  border-radius: 20px;
  color: #ecfffd;
  background: linear-gradient(145deg, #073844, #062a34);
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
  pointer-events: auto;
  transition: .25s ease;
}

.lia-tour__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.lia-tour__identity img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4ce0d5;
}

.lia-tour__identity span { display: grid; line-height: 1.1; }
.lia-tour__identity strong { color: #66ede3; }
.lia-tour__identity small { color: #8fb4b2; font-size: 10px; margin-top: 4px; }
.lia-tour__identity button { margin-left: auto; border: 0; color: #cce4e2; background: transparent; font-size: 24px; }
.lia-tour__count { color: #54dcd2; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lia-tour h2 { margin: 5px 0 8px; color: #fff; font-size: 21px; }
.lia-tour p { margin: 0; color: #bfd8d6; font-size: 13px; line-height: 1.55; }
.lia-tour__actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.lia-tour__actions button { padding: 9px 15px; border: 1px solid rgba(89, 224, 214, .25); border-radius: 10px; color: #d9f7f4; background: rgba(255,255,255,.06); font-weight: 700; }
.lia-tour__actions button:last-child { color: #07323a; background: #5ce3d9; }

body.lia-layer-open {
  overflow: hidden;
}

@media (max-width: 740px) {
  .lia-experience { padding: 0; }
  .lia-experience__panel {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow-y: auto;
    border-radius: 0;
  }
  .lia-portrait {
    min-height: 245px;
    place-items: end center;
  }
  .lia-portrait img {
    width: 78%;
    height: 240px;
    object-position: 50% 42%;
    border-radius: 50% 50% 0 0;
  }
  .lia-orbit--one { width: 250px; height: 250px; top: 12px; left: calc(50% - 125px); }
  .lia-orbit--two { width: 310px; height: 310px; top: -20px; left: calc(50% - 155px); }
  .lia-online-dot { top: 54px; right: 26%; }
  .lia-experience__content { padding: 24px 22px 34px; }
  .lia-experience h2 { font-size: 32px; }
  .lia-experience.is-conversation .lia-portrait {
    min-height: 165px;
  }
  .lia-experience.is-conversation .lia-portrait img {
    height: 165px;
    width: 62%;
  }
  .lia-experience.is-conversation .lia-experience__content {
    padding-top: 18px;
  }
  .lia-experience.is-conversation .lia-experience__content > p {
    display: none;
  }
  .lia-experience.is-conversation .lia-chat-log {
    max-height: min(34dvh, 300px);
  }
  .lia-launcher {
    display: none;
  }
  .lia-tour__card { position: fixed; left: 14px !important; right: 14px; bottom: 18px; top: auto !important; width: auto; }
}

@media (max-width: 719px) {
  .topbar {
    grid-template-columns: 46px minmax(0, 1fr) 92px;
    gap: 8px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .lia-help-button {
    width: 38px;
    height: 38px;
  }

  .profile-button {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 370px) {
  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 86px;
    gap: 5px;
  }

  .brand img {
    width: 132px;
  }

  .lia-help-button {
    width: 36px;
    height: 36px;
  }

  .profile-button {
    width: 40px;
    height: 40px;
  }
}

/* Dashboard */
.dashboard-shell {
  max-width: 1320px;
  padding-bottom: 120px;
}

.dashboard-topbar {
  max-width: 1320px;
}

.dashboard-page {
  display: grid;
  gap: 22px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-eyebrow,
.dashboard-chart header span {
  color: #0f8b80;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.dashboard-heading h1 {
  margin: 4px 0;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -.045em;
}

.dashboard-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-filter-wrap {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.dashboard-filter-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(20,38,37,.07);
}

.dashboard-filter-tabs a,
.dashboard-filter-tabs button {
  min-height: 38px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-filter-tabs .is-active {
  color: #fff;
  background: #0f766e;
  box-shadow: 0 8px 18px rgba(15,118,110,.2);
}

.dashboard-custom-filter {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-custom-filter[hidden] {
  display: none;
}

.dashboard-custom-filter label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-custom-filter input {
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-custom-filter button {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #0f766e;
  font-weight: 800;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-kpi {
  position: relative;
  min-height: 148px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 14px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(210,223,222,.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20,38,37,.08);
}

.dashboard-kpi::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: rgba(45,212,191,.11);
}

.dashboard-kpi__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2dd4bf);
  font-size: 20px;
  font-weight: 900;
}

.dashboard-kpi--receipt .dashboard-kpi__icon { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.dashboard-kpi--hospital .dashboard-kpi__icon { background: linear-gradient(135deg, #7c3aed, #c084fc); }

.dashboard-kpi div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-kpi strong {
  overflow: hidden;
  color: #102827;
  font-size: clamp(20px, 2.6vw, 29px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-kpi p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-growth {
  width: fit-content;
  align-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-growth.is-negative {
  color: #9f1239;
  background: #ffe4e6;
}

.dashboard-receipts {
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(20, 184, 166, .2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 8%, rgba(45, 212, 191, .16), transparent 26%),
    linear-gradient(145deg, #ffffff, #f5fffd);
  box-shadow: 0 16px 40px rgba(20, 38, 37, .08);
}

.dashboard-receipts > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-receipts > header span:first-child {
  color: #0f8b80;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.dashboard-receipts h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.dashboard-receipts__count {
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-receipts__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 10px;
}

.dashboard-receipt {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 11px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 8px 22px rgba(15, 118, 110, .07);
}

.dashboard-receipt__date {
  width: 56px;
  min-height: 52px;
  display: grid;
  place-content: center;
  grid-row: 1 / 3;
  border-radius: 11px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
}

.dashboard-receipt__date small {
  font-size: 8px;
  font-weight: 800;
}

.dashboard-receipt__date strong {
  font-size: 17px;
}

.dashboard-receipt > div {
  min-width: 0;
  display: grid;
  align-content: center;
}

.dashboard-receipt > div strong {
  overflow: hidden;
  color: #102827;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-receipt > div small {
  color: var(--muted);
  font-size: 10px;
}

.dashboard-receipt > b {
  grid-column: 2;
  color: #0f766e;
  font-size: 14px;
}

.dashboard-receipts__empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px dashed rgba(15, 118, 110, .25);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .65);
}

.dashboard-receipts__empty strong {
  color: #234341;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .75fr);
  gap: 16px;
}

.dashboard-chart {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(210,223,222,.9);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 40px rgba(20,38,37,.08);
}

.dashboard-chart--full {
  grid-column: 1 / -1;
}

.dashboard-chart header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-chart h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.dashboard-chart header > strong {
  color: #0f766e;
  font-size: 18px;
}

.dashboard-canvas {
  position: relative;
  height: 300px;
}

.dashboard-canvas--pie {
  height: 300px;
}

.dashboard-health {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.5fr) auto minmax(190px,.7fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(15,118,110,.15);
  border-radius: 20px;
  color: #f4fffd;
  background: radial-gradient(circle at 82% 0,rgba(67,255,222,.18),transparent 32%),linear-gradient(135deg,#053f42,#08776e 55%,#0a887b);
  box-shadow: 0 22px 55px rgba(5,75,72,.2);
}
.dashboard-health--attention { background:radial-gradient(circle at 82% 0,rgba(255,214,102,.2),transparent 32%),linear-gradient(135deg,#153f42,#0b6b67 55%,#aa6c09); }
.dashboard-health--warning { background:linear-gradient(135deg,#3f3430,#79501e 55%,#a6630b); }
.dashboard-health::after { content:""; position:absolute; right:-60px; bottom:-115px; width:250px; height:250px; border:1px solid rgba(255,255,255,.08); border-radius:50%; box-shadow:0 0 0 34px rgba(255,255,255,.025),0 0 0 70px rgba(255,255,255,.02); }
.dashboard-health__message,.dashboard-health__ring,.dashboard-health__result { position:relative; z-index:1; }
.dashboard-health__eyebrow { display:flex; align-items:center; gap:7px; color:#80ffe9; font-size:10px; font-weight:950; letter-spacing:.1em; text-transform:uppercase; }
.dashboard-health__eyebrow i { width:8px; height:8px; border-radius:50%; background:#42f5c9; box-shadow:0 0 0 5px rgba(66,245,201,.13); }
.dashboard-health__message h2 { margin:8px 0 5px; font-size:clamp(23px,3vw,34px); font-weight:950; line-height:1.05; }
.dashboard-health__message > p { max-width:560px; margin:0; color:rgba(255,255,255,.72); font-size:12px; }
.dashboard-health__balance { display:flex; align-items:baseline; gap:10px; margin-top:18px; }
.dashboard-health__balance span { color:rgba(255,255,255,.65); font-size:10px; font-weight:800; }
.dashboard-health__balance strong { font-size:20px; }
.dashboard-health__ring { display:grid; place-items:center; width:132px; height:132px; border-radius:50%; background:conic-gradient(#58f4ce var(--health-progress),rgba(255,255,255,.14) 0); box-shadow:0 12px 32px rgba(0,0,0,.14); }
.dashboard-health__ring::before { content:""; position:absolute; width:101px; height:101px; border-radius:50%; background:#075d59; box-shadow:inset 0 0 22px rgba(0,0,0,.16); }
.dashboard-health__ring > div { position:relative; z-index:1; display:grid; justify-items:center; }
.dashboard-health__ring strong { font-size:27px; line-height:1; }
.dashboard-health__ring span { margin-top:5px; color:rgba(255,255,255,.66); font-size:8px; font-weight:850; line-height:1.2; text-align:center; text-transform:uppercase; }
.dashboard-health__result { display:grid; gap:3px; padding:17px; border:1px solid rgba(255,255,255,.12); border-radius:15px; background:rgba(2,35,36,.18); backdrop-filter:blur(8px); }
.dashboard-health__result > span { color:rgba(255,255,255,.65); font-size:9px; font-weight:900; text-transform:uppercase; }
.dashboard-health__result strong { color:#65ffd9; font-size:24px; }
.dashboard-health__result strong.is-negative { color:#ffd18a; }
.dashboard-health__result small { color:rgba(255,255,255,.68); font-size:9px; }
.dashboard-kpis--financial { grid-template-columns:repeat(3,minmax(0,1fr)); }
.dashboard-kpis--financial .dashboard-kpi { min-height:148px; }
.dashboard-kpi--production .dashboard-kpi__icon { background:linear-gradient(135deg,#0f766e,#2dd4bf); }
.dashboard-kpi--billing .dashboard-kpi__icon { background:linear-gradient(135deg,#4f46e5,#8b5cf6); font-size:11px; }
.dashboard-kpi--open .dashboard-kpi__icon { background:linear-gradient(135deg,#0369a1,#38bdf8); }
.dashboard-kpi--overdue { border-color:#fecaca; background:radial-gradient(circle at 100% 0,rgba(244,63,94,.12),transparent 42%),#fff; }
.dashboard-kpi--overdue .dashboard-kpi__icon { background:linear-gradient(135deg,#be123c,#fb7185); }
.dashboard-kpi--overdue strong { color:#be123c; }
.dashboard-kpi--unbilled { border-color:#fde68a; background:radial-gradient(circle at 100% 0,rgba(245,158,11,.14),transparent 42%),#fff; }
.dashboard-kpi--unbilled .dashboard-kpi__icon { background:linear-gradient(135deg,#b45309,#fbbf24); }
.dashboard-kpi--unbilled strong { color:#a85b08; }
.dashboard-attention { display:grid; gap:13px; }
.dashboard-attention > header { display:flex; align-items:end; justify-content:space-between; gap:15px; padding:0 3px; }
.dashboard-attention > header span { color:#e27b11; font-size:10px; font-weight:950; letter-spacing:.1em; text-transform:uppercase; }
.dashboard-attention > header h2 { margin:3px 0 0; font-size:23px; font-weight:950; }
.dashboard-attention > header > b { padding:6px 10px; border-radius:15px; color:#9f1239; background:#ffe4e6; font-size:10px; }
.dashboard-attention__grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.dashboard-action-card { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 15px; overflow:hidden; padding:18px; border:1px solid #e1ebe9; border-radius:17px; background:#fff; box-shadow:0 12px 32px rgba(20,55,52,.07); }
.dashboard-action-card::after { content:""; position:absolute; width:100px; height:100px; right:-45px; top:-48px; border-radius:50%; background:rgba(245,158,11,.1); }
.dashboard-action-card--overdue::after { background:rgba(244,63,94,.1); }
.dashboard-action-card > div { display:grid; }
.dashboard-action-card > div span { color:#6d8582; font-size:9px; font-weight:900; text-transform:uppercase; }
.dashboard-action-card > div strong { font-size:24px; }
.dashboard-action-card > div small { color:#78908c; font-size:10px; }
.dashboard-action-card > a { position:relative; z-index:1; align-self:center; color:#008d7d; font-size:11px; font-weight:900; }
.dashboard-action-card > p { grid-column:1/-1; display:flex; justify-content:space-between; gap:10px; margin:0; padding-top:9px; border-top:1px solid #edf2f1; color:#607975; font-size:10px; }
.dashboard-action-card > p b { color:#223f3c; }
.dashboard-action-card > p.is-clear { justify-content:flex-start; color:#06856f; border:0; }
.dashboard-work-summary { display:grid; grid-template-columns:1.25fr repeat(3,1fr); gap:10px; padding:10px; border:1px solid #dce9e7; border-radius:17px; background:#eef7f5; }
.dashboard-work-summary article { display:grid; gap:2px; padding:14px; border-radius:12px; background:#fff; }
.dashboard-work-summary span { color:#708885; font-size:9px; font-weight:900; text-transform:uppercase; }
.dashboard-work-summary strong { overflow:hidden; color:#173d39; font-size:18px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-work-summary small { color:#718885; font-size:9px; }

@media (max-width: 900px) {
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-filter-wrap { justify-items: stretch; }
  .dashboard-filter-tabs { overflow-x: auto; }
  .dashboard-filter-tabs > * { flex: 1 0 auto; }
  .dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi--hospital { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-chart--full { grid-column: auto; }
  .dashboard-health { grid-template-columns:minmax(0,1fr) auto; }
  .dashboard-health__result { grid-column:1/-1; }
  .dashboard-kpis--financial { grid-template-columns:1fr 1fr; }
  .dashboard-work-summary { grid-template-columns:1fr 1fr; }
}

@media (max-width: 560px) {
  .dashboard-page { gap: 15px; }
  .dashboard-kpis { grid-template-columns: 1fr; }
  .dashboard-kpi--hospital { grid-column: auto; }
  .dashboard-kpi { min-height: 128px; padding: 16px; border-radius: 14px; }
  .dashboard-custom-filter { align-items: stretch; flex-direction: column; }
  .dashboard-custom-filter input { width: 100%; }
  .dashboard-chart { padding: 15px; border-radius: 14px; }
  .dashboard-canvas, .dashboard-canvas--pie { height: 260px; }
  .dashboard-receipts { padding: 15px; border-radius: 14px; }
  .dashboard-receipts__list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .dashboard-receipts__list::-webkit-scrollbar { display: none; }
  .dashboard-receipt { min-width: 245px; scroll-snap-align: start; }
  .dashboard-health { grid-template-columns:1fr auto; gap:14px; padding:18px; border-radius:16px; }
  .dashboard-health__message h2 { font-size:22px; }
  .dashboard-health__message > p { font-size:10px; }
  .dashboard-health__balance { align-items:flex-start; flex-direction:column; gap:2px; margin-top:12px; }
  .dashboard-health__ring { width:98px; height:98px; }
  .dashboard-health__ring::before { width:75px; height:75px; }
  .dashboard-health__ring strong { font-size:21px; }
  .dashboard-health__result { grid-column:1/-1; padding:13px; }
  .dashboard-kpis--financial { display:flex; overflow-x:auto; padding:2px 1px 12px; scroll-snap-type:x mandatory; scrollbar-width:none; }
  .dashboard-kpis--financial::-webkit-scrollbar { display:none; }
  .dashboard-kpis--financial .dashboard-kpi { flex:0 0 245px; min-height:135px; scroll-snap-align:start; }
  .dashboard-attention__grid { grid-template-columns:1fr; }
  .dashboard-action-card { padding:15px; }
  .dashboard-work-summary { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
  .dashboard-work-summary article { flex:0 0 210px; scroll-snap-align:start; }
}

/* Financeiro */
.finance-shell { max-width: 1320px; }
.finance-page { display: grid; gap: 18px; }
.finance-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.finance-heading > div > span,
.finance-panel > header span { color: #0f8b80; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.finance-heading h1 { margin: 3px 0; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.045em; }
.finance-heading p { margin: 0; color: var(--muted); font-weight: 700; }
.finance-primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #0f766e, #14b8a6); box-shadow: 0 10px 24px rgba(15,118,110,.22); font-weight: 850; }
.finance-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: #fff; scrollbar-width: none; box-shadow: 0 10px 30px rgba(20,38,37,.06); }
.finance-tabs::-webkit-scrollbar { display: none; }
.finance-tabs a { flex: 1 0 auto; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 850; }
.finance-tabs a.is-active { color: #fff; background: #073f45; box-shadow: 0 8px 20px rgba(7,63,69,.2); }
.finance-tab-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.finance-tab-label--short { display: none; }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.finance-summary-card,
.finance-summary > article { min-width: 0; min-height: 128px; display: grid; align-content: center; gap: 5px; padding: 18px; overflow: hidden; border: 1px solid rgba(210,223,222,.9); border-radius: 17px; background: #fff; box-shadow: 0 13px 34px rgba(20,38,37,.07); }
.finance-summary > article.finance-summary-card--balance {
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(45,212,191,.3), transparent 30%),
    linear-gradient(145deg,#063e45,#08736f);
  box-shadow: 0 16px 38px rgba(6,62,69,.22);
}
.finance-summary small { color: var(--muted); font-size: 11px; font-weight: 850; }
.finance-summary > article.finance-summary-card--balance small,
.finance-summary > article.finance-summary-card--balance span { color: #a7e8e0; }
.finance-summary > article.finance-summary-card--balance strong { color: #fff; }
.finance-summary strong { overflow: hidden; font-size: clamp(20px,2.5vw,28px); text-overflow: ellipsis; white-space: nowrap; }
.finance-summary span { color: var(--muted); font-size: 10px; font-weight: 750; }
.is-positive { color: #079669 !important; }
.is-negative { color: #e11d48 !important; }
.finance-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.finance-overview > a { min-height: 155px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,#fff,#f5fffd); box-shadow: 0 15px 36px rgba(20,38,37,.07); transition: transform .2s, box-shadow .2s; }
.finance-overview > a:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(15,118,110,.13); }
.finance-module-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg,#0f766e,#2dd4bf); font-size: 22px; }
.finance-overview div { display: grid; align-content: center; gap: 4px; }
.finance-overview div strong { font-size: 17px; }.finance-overview div small { color: var(--muted); }
.finance-overview b { grid-column: 1/-1; color: #0f766e; font-size: 12px; }
.finance-account-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 14px; }
.finance-account-grid > article { min-height: 190px; position: relative; overflow: hidden; padding: 22px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 10%,rgba(103,232,249,.32),transparent 30%), linear-gradient(145deg,#082f49,#0f766e); box-shadow: 0 18px 42px rgba(8,47,73,.2); }
.finance-account-grid > article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 20px; font-weight: 900; }
.finance-account-grid h2 { margin: 22px 0 3px; font-size: 17px; }.finance-account-grid article > small,.finance-account-grid article > p { color: #bce8e4; }.finance-account-grid article > strong { font-size: 27px; }
.finance-panel { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 15px 38px rgba(20,38,37,.07); }
.finance-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.finance-panel h2 { margin: 3px 0 0; font-size: 22px; }
.finance-panel > header button { padding: 9px 13px; border: 1px solid #99e8df; border-radius: 10px; color: #0f766e; background: #ecfdf9; font-weight: 800; }
.finance-list,.finance-statement { display: grid; gap: 9px; }
.finance-row,.finance-statement article { display: grid; grid-template-columns: auto minmax(150px,1fr) auto auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e5eeed; border-radius: 14px; background: #fbfdfd; }
.finance-row.is-overdue { border-color: #fecdd3; background: #fff7f8; }.finance-row.is-paid { opacity: .72; }
.finance-row--clickable { cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.finance-row--clickable:hover,.finance-row--clickable:focus-visible { transform: translateY(-2px); border-color: #7dd3c7; outline: none; box-shadow: 0 10px 25px rgba(15,118,110,.1); }
.finance-row__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #be123c; background: #ffe4e6; font-size: 19px; font-weight: 900; }
.finance-row__icon--in { color: #047857; background: #d1fae5; }
.finance-row > div,.finance-statement article > div { display: grid; min-width: 0; }.finance-row div strong,.finance-statement div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.finance-row div small,.finance-statement div small { color: var(--muted); font-size: 11px; }
.finance-row > b { font-size: 15px; }.finance-status { padding: 5px 8px; border-radius: 999px; color: #92400e; background: #fef3c7; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.finance-row.is-paid .finance-status { color: #047857; background: #d1fae5; }
.finance-row form { grid-column: 2/-1; display: flex; justify-content: end; gap: 7px; }.finance-row select,.finance-row form button,.finance-filters input,.finance-filters select,.finance-filters button { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.finance-row form button,.finance-filters button { padding: 0 12px; color: #fff; border: 0; background: #0f766e; font-weight: 800; }
.finance-attachment { color: #0f766e; font-size: 11px; font-weight: 850; }
.finance-row__open-hint { grid-column: 2/-1; color: #0f766e; font-size: 9px; font-weight: 800; }
.finance-origin { display: inline-flex; margin-right: 5px; padding: 3px 6px; border-radius: 999px; color: #075985; background: #e0f2fe; font-size: 8px; font-weight: 900; line-height: 1; text-transform: uppercase; }
.finance-origin.is-shift { color: #047857; background: #d1fae5; }
.finance-delete-form { justify-content: end; }
.finance-row .finance-delete-form button { color: #be123c; border: 1px solid #fecdd3; background: #fff1f2; }
.finance-empty { grid-column: 1/-1; padding: 35px 20px; border: 1px dashed #b8d8d4; border-radius: 15px; text-align: center; background: #f8fffd; }.finance-empty p { margin: 5px auto 14px; color: var(--muted); }.finance-empty button { padding: 9px 14px; border: 0; border-radius: 9px; color: #fff; background: #0f766e; font-weight: 800; }
.finance-filters { display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)) auto; align-items: end; gap: 8px; margin-bottom: 16px; padding: 12px; border-radius: 13px; background: #f3f8f7; }.finance-filters label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 800; }.finance-filters input,.finance-filters select { width: 100%; padding: 0 8px; }
.finance-statement article > b { text-align: right; }
.finance-modal .modal-content { overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 28px 70px rgba(7,40,42,.25); }.finance-modal .modal-header { padding: 20px; background: #f3fbf9; }.finance-modal .modal-header small { color: #0f8b80; font-weight: 850; }.finance-modal .modal-header h2 { margin: 2px 0 0; font-size: 23px; }
.finance-modal .modal-footer { gap: 8px; padding: 14px 20px 18px; border-top: 1px solid #e7efee; background: #fff; }
.finance-modal .modal-footer > button[type="button"] { min-height: 44px; padding: 0 17px; border: 1px solid #cbdad8; border-radius: 12px; color: #496563; background: #f7faf9; font-weight: 800; transition: color .2s, border-color .2s, background .2s; }
.finance-modal .modal-footer > button[type="button"]:hover { color: #0f766e; border-color: #7dd3c7; background: #ecfdf9; }
.finance-modal .modal-footer .finance-primary { min-height: 44px; margin: 0; padding: 0 18px; border-radius: 12px; }
.finance-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.finance-form label { display: grid; gap: 5px; color: #496563; font-size: 11px; font-weight: 800; }.finance-form input,.finance-form select { width: 100%; min-height: 45px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; }.finance-upload,.finance-check { grid-column: 1/-1; }.finance-upload { padding: 12px; border: 1px dashed #7dd3c7; border-radius: 11px; background: #f3fffc; }.finance-upload input { padding: 9px; }.finance-check { display: flex !important; align-items: center; }.finance-check input { width: 18px; min-height: 18px; }
.finance-payee-picker { grid-column: 1/-1; display: grid; gap: 9px; }
.finance-payee-picker > label { position: relative; }
.finance-payee-picker [data-payee-feedback] { color: var(--muted); font-size: 10px; font-weight: 700; }
.finance-payee-picker [data-payee-feedback].is-found { color: #047857; }
.finance-payee-picker [data-payee-feedback].is-new { color: #b45309; }
.finance-payee-new { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; padding: 12px; border: 1px dashed #f59e0b; border-radius: 12px; background: #fffbeb; animation: lia-panel-in .25s ease-out; }
.finance-payee-new[hidden] { display: none; }
.finance-payee-new > div { grid-column: 1/-1; display: flex; align-items: center; gap: 7px; }
.finance-payee-new > div span { padding: 4px 7px; border-radius: 999px; color: #92400e; background: #fde68a; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.finance-payee-new > div strong { font-size: 12px; }
.finance-recurrence { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(150px,.7fr); align-items: stretch; gap: 9px; }
.finance-check--recurrence { min-height: 68px; padding: 11px 13px; border: 1px solid #bae6e1; border-radius: 12px; background: #f0fdfa; cursor: pointer; }
.finance-check--recurrence > span { display: grid; gap: 2px; }
.finance-check--recurrence strong { color: #155e58; font-size: 12px; }
.finance-check--recurrence small { color: #5f7b78; font-size: 10px; font-weight: 650; }
.finance-recurrence > label[data-recurrence-months] { padding: 9px 11px; border: 1px solid #99e8df; border-radius: 12px; background: #fff; }
.finance-recurrence > label[hidden] { display: none; }
.finance-recurrence input[type="number"] { min-height: 36px; }
.finance-installment-note { grid-column: 1/-1; display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; color: #155e58; background: #ecfdf9; font-size: 12px; font-weight: 850; }
.finance-installment-note small { color: #5f7b78; font-size: 10px; font-weight: 650; }
.finance-payment-box { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.7fr) auto; align-items: end; gap: 10px; margin: 0 20px 20px; padding: 14px; border: 1px solid #99e8df; border-radius: 14px; background: linear-gradient(145deg,#f0fdfa,#ecfeff); }
.finance-payment-box > div { align-self: center; display: grid; gap: 2px; }
.finance-payment-box > div strong { color: #134e4a; font-size: 13px; }
.finance-payment-box > div small,.finance-payment-box label { color: #5f7b78; font-size: 10px; font-weight: 750; }
.finance-payment-box label { display: grid; gap: 4px; }
.finance-payment-box select { min-height: 40px; padding: 0 9px; border: 1px solid #99d8d0; border-radius: 9px; background: #fff; }
.finance-payment-box button { min-height: 40px; padding: 0 13px; border: 0; border-radius: 9px; color: #fff; background: #0f766e; font-size: 11px; font-weight: 850; }
.finance-paid-detail { display: grid; justify-items: center; gap: 5px; padding: 32px !important; text-align: center; }.finance-paid-detail span,.finance-paid-detail p { color: var(--muted); }.finance-paid-detail strong { color: #047857; font-size: 24px; }.finance-paid-detail a { padding: 8px 12px; border-radius: 9px; color: #0f766e; background: #ecfdf9; font-weight: 800; }
@media (max-width: 900px) { .finance-summary { grid-template-columns: 1fr 1fr; }.finance-overview { grid-template-columns: 1fr; }.finance-filters { grid-template-columns: 1fr 1fr; }.finance-filters button { min-height: 40px; } }
@media (max-width: 600px) {
  .finance-heading { align-items: stretch; flex-direction: column; }
  .finance-heading .finance-primary { align-self: start; }
  .finance-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    overflow: visible;
    padding: 4px;
    border-radius: 15px;
  }
  .finance-tabs a {
    min-width: 0;
    min-height: 57px;
    display: grid;
    grid-template-rows: 21px auto;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 5px 2px;
    border-radius: 11px;
    text-align: center;
    line-height: 1;
  }
  .finance-tabs a.is-active { box-shadow: 0 7px 16px rgba(7,63,69,.2); }
  .finance-tab-icon { width: 20px; height: 20px; }
  .finance-tab-label { display: none; }
  .finance-tab-label--short { display: block; font-size: 9px; white-space: nowrap; }
  .finance-summary { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .finance-summary > article { min-width: 215px; scroll-snap-align: start; }
  .finance-panel { padding: 14px; }
  .finance-row,.finance-statement article { grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; }
  .finance-status { grid-column: 2; width: fit-content; }
  .finance-row form { grid-column: 1/-1; flex-direction: column; }
  .finance-attachment { grid-column: 3; }
  .finance-filters { grid-template-columns: 1fr 1fr; padding: 9px; }
  .finance-form { grid-template-columns: 1fr; }
  .finance-upload,.finance-check,.finance-payee-picker,.finance-recurrence,.finance-installment-note { grid-column: auto; }
  .finance-payee-new,.finance-recurrence { grid-template-columns: 1fr; }
  .finance-payee-new > div { grid-column: auto; }
  .finance-payment-box { grid-template-columns: 1fr; margin: 0 14px 14px; }
  .finance-payment-box button { min-height: 44px; }
}

.schedule-page {
  display: grid;
  gap: 18px;
}

.schedule-heading h1 {
  max-width: 740px;
}

.schedule-tabs {
  display: grid;
  gap: 14px;
}

.schedule-tab-nav {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  width: min(100%, 430px);
  padding: 6px;
  border: 1px solid rgba(210, 223, 222, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(20, 38, 37, 0.07);
}

.schedule-tab-nav .nav-link {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.schedule-tab-nav .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7 58%, #4f46e5);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.18);
}

.shift-carousel-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
  padding: 0 3px;
}

.shift-carousel-toolbar h2 {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 950;
}

.shift-status-filter {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.shift-status-filter span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.shift-status-filter select {
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  border: 1px solid #d4e3e1;
  border-radius: 10px;
  color: var(--text);
  background-color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.shift-carousel {
  position: relative;
}

.timeline-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 5px 54px 20px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
}

.timeline-carousel-track::-webkit-scrollbar {
  display: none;
}

.timeline-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.timeline-carousel-track .timeline-card {
  flex: 0 0 min(620px, calc(100% - 30px));
  scroll-snap-align: center;
}

.shift-carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #087b70, #0284c7);
  box-shadow: 0 10px 25px rgba(2, 96, 105, 0.25);
  transform: translateY(-65%);
}

.shift-carousel-arrow--prev { left: 3px; }
.shift-carousel-arrow--next { right: 3px; }
.shift-carousel-arrow:disabled { opacity: .28; cursor: default; }
.shift-carousel-arrow svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.shift-carousel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 24px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.shift-carousel-footer > div {
  display: flex;
  gap: 5px;
}

.shift-carousel-footer button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c8d9d7;
  transition: .2s;
}

.shift-carousel-footer button.is-active {
  width: 19px;
  border-radius: 6px;
  background: #00a895;
}

.schedule-filter-empty {
  padding: 30px 15px;
  border: 1px dashed #b9d9d5;
  border-radius: 14px;
  color: var(--muted);
  background: #f8fcfb;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 8px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 42px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6, #38bdf8, #6366f1);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.timeline-date {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  width: 72px;
  min-height: 76px;
  border: 3px solid #ffffff;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.2);
}

.timeline-card--realizado .timeline-date {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.timeline-card--pendente .timeline-date {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.timeline-card--faturado .timeline-date {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}

.timeline-card--recebido .timeline-date {
  background: linear-gradient(135deg, #0e7490, #06b6d4);
}

.timeline-card--cancelado .timeline-date {
  background: linear-gradient(135deg, #be123c, #fb7185);
}

.timeline-date strong,
.timeline-date span {
  display: block;
  line-height: 1;
}

.timeline-date strong {
  font-size: 24px;
  font-weight: 950;
}

.timeline-date span {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-body {
  min-width: 0;
  display: block;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(210, 223, 222, 0.92);
  border-radius: 12px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 16%, rgba(45, 212, 191, 0.18), transparent 28%),
    linear-gradient(145deg, #ffffff, #f3faf9);
  box-shadow: 0 16px 34px rgba(20, 38, 37, 0.08);
  text-align: left;
}

.timeline-body h2 {
  margin: 9px 0 5px;
  font-size: 18px;
  line-height: 1.18;
}

.timeline-body p,
.timeline-body small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.timeline-body small {
  margin-top: 8px;
  color: var(--primary-dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.status-pill--realizado {
  color: #14532d;
  background: #dcfce7;
}

.status-pill--pendente {
  color: #713f12;
  background: #fef3c7;
}

.status-pill--faturado {
  color: #6d28d9;
  background: #ede9fe;
}

.status-pill--recebido {
  color: #0e7490;
  background: #cffafe;
}

.status-pill--cancelado {
  color: #9f1239;
  background: #ffe4e6;
}

@media (max-width: 600px) {
  .shift-carousel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .shift-status-filter { width: 100%; }
  .timeline-carousel-track { padding-right: 42px; padding-left: 42px; }
  .timeline-carousel-track .timeline-card { flex-basis: calc(100% - 2px); grid-template-columns: 62px minmax(0,1fr); gap: 8px; }
  .timeline-carousel-track .timeline-date { width: 62px; }
  .timeline-carousel-track .timeline-body { padding: 13px; }
  .timeline-carousel-track .timeline-body h2 { font-size: 16px; }
  .timeline-carousel-track .timeline-body p,.timeline-carousel-track .timeline-body small { font-size: 11px; }
  .shift-carousel-arrow { width: 36px; height: 36px; }
}

.calendar-panel {
  padding: 16px;
  border: 1px solid rgba(210, 223, 222, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(20, 38, 37, 0.09);
}

.calendar-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-tools {
  display: grid;
  justify-items: end;
  gap: 9px;
}

.calendar-nav {
  display: inline-flex;
  gap: 7px;
}

.calendar-nav button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  color: var(--primary-dark);
  background: #eef8f6;
}

.calendar-nav svg {
  width: 19px;
  height: 19px;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status-dot--realizado {
  background: #22c55e;
}

.status-dot--pendente {
  background: #f59e0b;
}

.status-dot--faturado {
  background: #8b5cf6;
}

.status-dot--recebido {
  background: #06b6d4;
}

.status-dot--cancelado {
  background: #f43f5e;
}

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

.calendar-weekday {
  padding: 8px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dfe8e7;
  border-radius: 10px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.calendar-day.is-muted {
  opacity: 0.42;
}

.calendar-day.has-shifts {
  border-color: rgba(20, 184, 166, 0.3);
  background: linear-gradient(145deg, #ffffff, #f0fdfa);
}

.calendar-day__number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text);
  background: #eef4f4;
  font-size: 13px;
  font-weight: 950;
}

.calendar-day__items {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.calendar-chip,
.calendar-more {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chip--realizado {
  color: #14532d;
  background: #dcfce7;
}

.calendar-chip--pendente {
  color: #713f12;
  background: #fef3c7;
}

.calendar-chip--faturado {
  color: #6d28d9;
  background: #ede9fe;
}

.calendar-chip--recebido {
  color: #0e7490;
  background: #cffafe;
}

.calendar-chip--cancelado {
  color: #9f1239;
  background: #ffe4e6;
}

.calendar-more {
  color: var(--primary-dark);
  background: #e0f2fe;
}

.shift-payment-preview,
.shift-receivable-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 18%, rgba(56, 189, 248, 0.22), transparent 30%),
    linear-gradient(135deg, #ecfeff, #f0fdfa);
}

.shift-receivable-card {
  color: #ffffff;
  border-color: transparent;
  background:
    radial-gradient(circle at 92% 0, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #0f766e, #0284c7 56%, #4f46e5);
}

.shift-payment-preview strong,
.shift-payment-preview small,
.shift-receivable-card strong,
.shift-receivable-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.shift-payment-preview strong,
.shift-receivable-card strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
}

.shift-payment-preview small,
.shift-receivable-card small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.shift-receivable-card span,
.shift-receivable-card strong,
.shift-receivable-card small {
  color: #ffffff;
}

.shift-field--duration.is-hidden,
.shift-field--hours.is-hidden {
  display: none;
}

.agenda-detail-modal .modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 36, 34, 0.28);
}

.agenda-detail-modal .modal-dialog-scrollable .modal-content > form {
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agenda-detail-modal .modal-dialog-scrollable .modal-content > form > .modal-header,
.agenda-detail-modal .modal-dialog-scrollable .modal-content > form > .modal-footer {
  flex: 0 0 auto;
}

.agenda-detail-modal .modal-dialog-scrollable .modal-content > form > .modal-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.shift-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e4eeee;
}

.shift-status-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shift-status-option {
  cursor: pointer;
}

.shift-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shift-status-option > span {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid #dbe7e5;
  border-radius: 12px;
  color: #607a78;
  text-align: center;
  background: #f8fbfb;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

.shift-status-option svg { width: 25px; height: 25px; }
.shift-status-option strong { font-size: 12px; }
.shift-status-option small { color: inherit; font-size: 9px; font-weight: 650; }
.shift-status-option:hover > span { transform: translateY(-2px); }
.shift-status-option--pendente input:checked + span { color: #92400e; border-color: #f59e0b; background: #fffbeb; box-shadow: 0 8px 20px rgba(245,158,11,.14); }
.shift-status-option--realizado input:checked + span { color: #047857; border-color: #10b981; background: #ecfdf5; box-shadow: 0 8px 20px rgba(16,185,129,.14); }
.shift-status-option--faturado input:checked + span { color: #6d28d9; border-color: #8b5cf6; background: #f5f3ff; box-shadow: 0 8px 20px rgba(139,92,246,.14); }
.shift-status-option--recebido input:checked + span { color: #0e7490; border-color: #06b6d4; background: #ecfeff; box-shadow: 0 8px 20px rgba(6,182,212,.14); }
.shift-status-option--cancelado input:checked + span { color: #be123c; border-color: #f43f5e; background: #fff1f2; box-shadow: 0 8px 20px rgba(244,63,94,.14); }
.shift-cancellation-reason { padding: 11px; border: 1px solid #fecdd3; border-radius: 11px; background: #fff7f8; }
.shift-cancellation-reason[hidden] { display: none; }

@media (max-width: 600px) {
  .agenda-detail-modal .modal-dialog {
    min-height: calc(100% - 16px);
    margin: 8px;
  }
  .agenda-detail-modal .modal-dialog-scrollable .modal-content > form {
    max-height: calc(100dvh - 16px);
  }
  .shift-edit-grid { grid-template-columns: 1fr; }
  .shift-edit-grid .field--wide { grid-column: auto; }
  .shift-status-picker { gap: 5px; }
  .shift-status-option > span { min-height: 82px; padding: 8px 3px; }
  .shift-status-option small { display: none; }
}

.shift-detail-hero {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #0f766e, #0284c7 58%, #4f46e5);
}

.shift-detail-hero span,
.shift-detail-hero small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.shift-detail-hero strong {
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

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

.shift-detail-hero + .detail-list {
  margin-top: 14px;
}

.detail-list p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px;
  border: 1px solid #e4eeee;
  border-radius: 10px;
  background: #f8fbfb;
}

.detail-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-list strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.detail-description {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.day-shift-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid #dfe8e7;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
}

.day-shift-card span {
  font-size: 12px;
  font-weight: 950;
}

.day-shift-card strong {
  color: var(--text);
  font-size: 17px;
}

.day-shift-card small {
  color: var(--muted);
  font-weight: 800;
}

.day-shift-card--realizado {
  border-color: rgba(34, 197, 94, 0.28);
  background: #f0fdf4;
}

.day-shift-card--pendente {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
}

.day-shift-card--faturado {
  border-color: rgba(139, 92, 246, 0.28);
  background: #f5f3ff;
}

.day-shift-card--recebido {
  border-color: rgba(6, 182, 212, 0.28);
  background: #ecfeff;
}

.day-shift-card--cancelado {
  border-color: rgba(244, 63, 94, 0.28);
  background: #fff1f2;
}

.day-shift-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

@media (min-width: 900px) {
  .timeline-list {
    max-width: 820px;
  }

  .calendar-day {
    min-height: 126px;
  }
}

@media (max-width: 520px) {
  .schedule-tab-nav {
    width: 100%;
  }

  .timeline-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-list::before {
    left: 38px;
  }

  .timeline-date {
    width: 62px;
    min-height: 70px;
  }

  .calendar-panel {
    padding: 11px;
  }

  .calendar-header {
    align-items: start;
    flex-direction: column;
  }

  .calendar-tools {
    width: 100%;
    justify-items: start;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 72px;
    padding: 5px;
  }

  .calendar-chip,
  .calendar-more {
    max-width: 100%;
    padding: 3px 4px;
    font-size: 9px;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #ecf7f5 0, #f5f7f8 340px),
    var(--bg);
}

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

button {
  font: inherit;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 86px 18px 110px;
  position: relative;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: rgba(245, 247, 248, 0.88);
  border-bottom: 1px solid rgba(223, 232, 231, 0.8);
  backdrop-filter: blur(18px);
}

.icon-button,
.profile-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  height: 46px;
}

.brand img {
  display: block;
  width: 184px;
  max-height: 62px;
  object-fit: contain;
}

.profile-wrap {
  position: relative;
}

.profile-button {
  padding: 3px;
}

.profile-button img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.profile-menu {
  position: absolute;
  top: 54px;
  right: 0;
  width: min(280px, calc(100vw - 28px));
  padding: 8px;
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-menu__identity {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf9, #eff6ff);
}

.profile-menu__identity img {
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 14px rgba(15,118,110,.16);
}

.profile-menu__identity span {
  min-width: 0;
  display: grid;
}

.profile-menu__identity strong,
.profile-menu__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu__identity strong { color: #173c39; font-size: 13px; }
.profile-menu__identity small { color: var(--muted); font-size: 10px; }

.profile-photo-modal .modal-content {
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 75px rgba(7,40,42,.28);
}

.profile-photo-modal .modal-header {
  padding: 19px 20px;
  background: linear-gradient(135deg, #effcf9, #eff6ff);
}

.profile-photo-modal .modal-header small {
  color: #0f8b80;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile-photo-modal .modal-header h2 { margin: 2px 0 0; font-size: 23px; }
.profile-photo-modal .modal-body { display: grid; gap: 14px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.profile-photo-picker { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #5bd6c9; border-radius: 12px; color: #0f766e; background: #f0fdfa; font-weight: 850; cursor: pointer; }
.profile-photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-photo-picker svg { width: 20px; height: 20px; }
.profile-cropper { display: grid; justify-items: center; gap: 13px; }
.profile-cropper[hidden] { display: none; }
.profile-cropper__viewport { position: relative; width: min(280px, 75vw); aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #061b24; box-shadow: 0 14px 35px rgba(6,27,36,.22); }
.profile-cropper__viewport canvas { display: block; width: 100%; height: 100%; }
.profile-cropper__viewport i { position: absolute; inset: 20px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 999px rgba(3,16,24,.52); }
.profile-cropper__controls { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.profile-cropper__controls label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; }
.profile-cropper__controls input { width: 100%; accent-color: #0f766e; }
.profile-cropper > small,.profile-photo-status { margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.profile-photo-modal .modal-footer { gap: 8px; padding: 14px 20px 18px; }

@media (max-width: 480px) {
  .profile-cropper__controls { grid-template-columns: 1fr; }
  .profile-cropper__viewport i { inset: 16px; }
}

.profile-menu.is-open {
  display: block;
}

.profile-menu a,
.profile-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  text-align: left;
}

.profile-menu svg {
  width: 18px;
  height: 18px;
}

.profile-menu a:hover,
.profile-menu button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.profile-logout {
  margin: 4px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.profile-menu .profile-logout__button {
  color: #be123c;
  font-weight: 800;
}

.profile-menu .profile-logout__button:hover {
  color: #9f1239;
  background: #fff1f2;
}

.app-menu {
  width: min(86vw, 340px);
  border: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #f2fffc 0, #ffffff 220px),
    #ffffff;
}

.app-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 12px;
}

.app-menu__header img {
  width: 156px;
  height: 58px;
  object-fit: contain;
}

.app-menu__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
}

.app-menu__close svg {
  width: 20px;
  height: 20px;
}

.app-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(20, 38, 37, 0.08);
}

.app-menu__user img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.app-menu__user strong,
.app-menu__user span {
  display: block;
}

.app-menu__user strong {
  font-size: 15px;
}

.app-menu__user span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.app-menu__nav {
  display: grid;
  gap: 7px;
  padding: 0 14px 18px;
}

.app-menu__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #31403f;
  font-size: 14px;
  font-weight: 800;
}

.app-menu__nav a:hover,
.app-menu__nav a.is-active {
  color: var(--primary-dark);
  border-color: rgba(15, 118, 110, 0.16);
  background: linear-gradient(135deg, #e6fffb, #eef8f6);
}

.app-menu__nav svg {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.home {
  display: grid;
  gap: 18px;
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.welcome > div:first-child {
  min-width: 0;
}

.eyebrow,
.today-chip__text span,
.metric-panel span,
.metric-panel small,
.action-card span,
.shift-date,
.shift-card p {
  color: var(--muted);
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

.today-chip {
  flex: 0 0 auto;
  min-width: 128px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.2);
  text-align: left;
}

button.today-chip:not(:disabled) {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

button.today-chip:not(:disabled):active {
  transform: scale(0.985);
}

button.today-chip:disabled {
  opacity: 1;
}

.today-chip__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.today-chip__icon svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.today-chip__text span,
.today-chip__text strong {
  display: block;
}

.today-chip__text span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.today-chip__text strong {
  margin-top: 2px;
  color: #ffffff;
  font-size: 14px;
}

.shift-carousel {
  display: grid;
  gap: 12px;
}

.carousel-stage {
  position: relative;
}

.carousel-track {
  display: grid;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.carousel-track.is-dragging {
  cursor: grabbing;
}

.shift-card {
  grid-area: 1 / 1;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  padding-inline: 52px;
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 14%, rgba(125, 211, 252, 0.48), transparent 30%),
    radial-gradient(circle at 18% 95%, rgba(45, 212, 191, 0.42), transparent 32%),
    linear-gradient(135deg, #0f766e 0%, #0284c7 54%, #4f46e5 100%);
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.22);
  cursor: pointer;
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.shift-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.shift-card--realizado {
  background:
    linear-gradient(105deg, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(15deg, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(circle at 88% 18%, rgba(110, 231, 183, .42), transparent 30%),
    linear-gradient(135deg, #065f46, #059669 55%, #10b981);
  background-size: 30px 30px, 30px 30px, auto, auto;
  box-shadow: 0 18px 42px rgba(5, 150, 105, .26);
}

.shift-card--pendente {
  background:
    linear-gradient(105deg, rgba(255,255,255,.1) 1px, transparent 1px),
    radial-gradient(circle at 88% 12%, rgba(254, 240, 138, .55), transparent 31%),
    linear-gradient(135deg, #92400e, #d97706 55%, #f59e0b);
  background-size: 32px 32px, auto, auto;
  box-shadow: 0 18px 42px rgba(217, 119, 6, .26);
}

.shift-card--cancelado {
  background:
    linear-gradient(105deg, rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(circle at 88% 15%, rgba(253, 164, 175, .42), transparent 30%),
    linear-gradient(135deg, #881337, #e11d48 55%, #f43f5e);
  background-size: 31px 31px, auto, auto;
  box-shadow: 0 18px 42px rgba(225, 29, 72, .25);
}

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

.shift-period {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  color: rgba(255,255,255,.9);
  background: rgba(3, 29, 35, .18);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.shift-date,
.shift-card p {
  color: rgba(255, 255, 255, 0.78);
}

.shift-card h2 {
  margin: 8px 0 6px;
  font-size: 23px;
  letter-spacing: 0;
}

.shift-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.shift-status {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  color: #064e3b;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.shift-status--pending {
  color: #713f12;
  background: #fef3c7;
}

.shift-status--pendente {
  color: #713f12;
  background: #fef3c7;
}

.shift-status--realizado {
  color: #14532d;
  background: #dcfce7;
}

.shift-status--faturado {
  color: #6d28d9;
  background: #ede9fe;
}

.shift-status--recebido {
  color: #0e7490;
  background: #cffafe;
}

.shift-status--cancelado {
  color: #9f1239;
  background: #ffe4e6;
}

.shift-card--empty {
  background:
    radial-gradient(circle at 88% 14%, rgba(94, 234, 212, .34), transparent 30%),
    linear-gradient(135deg, #0f766e, #0d9488);
}

.carousel-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(7, 64, 60, 0.42);
  box-shadow: 0 10px 26px rgba(4, 35, 33, 0.16);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
}

.carousel-arrow:hover {
  background: rgba(7, 64, 60, 0.58);
}

.carousel-arrow svg {
  width: 22px;
  height: 22px;
}

.carousel-arrow--prev {
  left: 10px;
}

.carousel-arrow--next {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 4px 5px;
  scrollbar-width: none;
}

.carousel-dots button {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd8d7;
  cursor: pointer;
}

.carousel-dots button.is-active {
  width: 22px;
  background: var(--primary);
}

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

.action-card {
  min-width: 0;
  min-height: 116px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #eef8f6);
  box-shadow: 0 12px 28px rgba(20, 38, 37, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.action-card::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -34px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(20, 38, 37, 0.13);
}

.action-card:nth-child(1) {
  background: linear-gradient(145deg, #e8fffb, #d3f7ef);
}

.action-card:nth-child(2) {
  background: linear-gradient(145deg, #eef6ff, #dbeafe);
}

.action-card:nth-child(3) {
  background: linear-gradient(145deg, #ecfdf5, #d9f99d);
}

.action-card:nth-child(4) {
  background: linear-gradient(145deg, #fff7ed, #fef3c7);
}

.action-card:nth-child(5) {
  background: linear-gradient(145deg, #f5f3ff, #e0e7ff);
}

.action-card:nth-child(6) {
  background: linear-gradient(145deg, #fff1f2, #ffe4e6);
}

.action-card strong {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.action-card span:last-child {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}

.action-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 10px 20px rgba(20, 38, 37, 0.18);
}

.action-icon svg {
  width: 21px;
  height: 21px;
  color: #ffffff;
}

.action-icon--teal {
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #0f766e);
}

.action-icon--blue {
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.action-icon--green {
  color: #ffffff;
  background: linear-gradient(135deg, #14532d, #16a34a);
}

.action-icon--amber {
  color: #ffffff;
  background: linear-gradient(135deg, #7c2d12, #d97706);
}

.action-icon--violet {
  color: #ffffff;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
}

.action-icon--rose {
  color: #ffffff;
  background: linear-gradient(135deg, #881337, #e11d48);
}

.insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-panel {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 38, 37, 0.1);
}

.metric-panel::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.metric-panel--revenue {
  color: #ecfdf5;
  background: linear-gradient(135deg, #0f766e, #22c55e);
}

.metric-panel--return {
  color: #eff6ff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.metric-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric-label,
.metric-panel small {
  display: block;
  font-size: 12px;
}

.metric-label {
  color: #ffffff;
  font-weight: 800;
  line-height: 1.2;
}

.metric-panel strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 16px 0 12px;
  color: #ffffff !important;
  font-size: 22px;
  line-height: 1.12;
}

.metric-panel .metric-label,
.metric-panel small {
  color: #ffffff !important;
}

.metric-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
}

.metric-panel small {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: #ffffff;
  font-weight: 700;
}

.metric-panel .metric-icon {
  color: #ffffff;
}

.metric-panel .metric-icon svg {
  color: #ffffff;
}

.bottom-nav {
  position: fixed;
  z-index: 18;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: calc(76px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid rgba(210, 223, 222, 0.9);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #ffffff;
  box-shadow: 0 -10px 32px rgba(15, 36, 34, 0.14);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-width: 0;
  height: 56px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item.is-active {
  color: var(--primary);
}

.nav-item--ai {
  color: var(--primary-dark);
  transform: translateY(-14px);
}

.ai-orb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 5px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #22c55e);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.34);
}

.ai-orb svg {
  width: 25px;
  height: 25px;
}

.ai-orb {
  position: relative;
  overflow: visible;
  padding: 0;
  background: #0f766e;
}

.ai-orb img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.ai-orb i {
  position: absolute;
  top: 2px;
  right: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, .8);
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 1180px;
    padding: 102px 32px 118px;
  }

  .topbar {
    max-width: 1180px;
    grid-template-columns: 48px 1fr 48px;
    padding-inline: 32px;
    border-inline: 1px solid rgba(223, 232, 231, 0.62);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    box-shadow: 0 14px 36px rgba(20, 38, 37, 0.08);
  }

  .home {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    align-items: start;
    gap: 22px;
  }

  .welcome {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 42px;
  }

  .today-chip {
    min-width: 168px;
    padding: 14px;
  }

  .shift-carousel {
    grid-column: 1 / 2;
  }

  .shift-card {
    min-height: 238px;
    padding: 30px 72px;
  }

  .shift-card h2 {
    font-size: 34px;
  }

  .shift-card p {
    font-size: 16px;
  }

  .quick-actions {
    grid-column: 1 / 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .action-card {
    min-height: 144px;
    padding: 18px;
  }

  .action-card strong {
    font-size: 16px;
  }

  .action-icon {
    width: 46px;
    height: 46px;
  }

  .insights {
    grid-column: 2 / 3;
    grid-row: 2 / span 2;
    position: sticky;
    top: 104px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .metric-panel {
    min-height: 182px;
    padding: 22px;
  }

  .metric-panel strong {
    font-size: 31px;
  }

  .metric-label,
  .metric-panel small {
    font-size: 13px;
  }

  .bottom-nav {
    width: min(calc(100% - 64px), 760px);
    height: 76px;
    padding-bottom: 8px;
    border-radius: 14px 14px 0 0;
  }
}

@media (min-width: 1180px) {
  body {
    background:
      radial-gradient(circle at 10% 12%, rgba(20, 184, 166, 0.13), transparent 24%),
      radial-gradient(circle at 90% 8%, rgba(79, 70, 229, 0.12), transparent 24%),
      linear-gradient(180deg, #eef8f6 0, #f6f8fb 360px),
      var(--bg);
  }

  .app-shell {
    max-width: 1320px;
  }

  .topbar {
    max-width: 1320px;
  }

  .home {
    grid-template-columns: minmax(0, 1.45fr) 360px;
  }

  .quick-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 370px) {
  .app-shell {
    padding-inline: 12px;
  }

  .topbar {
    padding-inline: 12px;
  }

  .brand img {
    width: 154px;
  }

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

  .insights {
    grid-template-columns: 1fr;
  }

  .welcome {
    align-items: start;
    flex-direction: column;
  }

  .today-chip {
    width: 100%;
    text-align: left;
  }

  .shift-card {
    padding: 18px 46px;
  }

  .carousel-arrow {
    width: 32px;
    height: 42px;
  }
}

.auth-body {
  min-height: 100vh;
  background-color: #101827;
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.32), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(79, 70, 229, 0.28), transparent 26%),
    linear-gradient(145deg, #071716 0%, #0b2d2a 46%, #101827 100%);
  background-attachment: fixed;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.auth-visual,
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.auth-visual {
  min-height: 300px;
  overflow: hidden;
  color: #ffffff;
}

.auth-logo {
  position: absolute;
  top: 22px;
  left: 28px;
  z-index: 2;
  display: block;
  width: 136px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.auth-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-orbit span {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.auth-orbit span:nth-child(1) {
  width: 240px;
  height: 240px;
  right: -70px;
  top: 80px;
}

.auth-orbit span:nth-child(2) {
  width: 140px;
  height: 140px;
  left: 24px;
  bottom: 40px;
}

.auth-orbit span:nth-child(3) {
  width: 84px;
  height: 84px;
  right: 38%;
  bottom: 18%;
  background: rgba(45, 212, 191, 0.18);
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-top: 82px;
}

.auth-copy span,
.auth-card__heading span {
  display: block;
  color: #5eead4;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 10px 0 12px;
  color: #ffffff;
  font-size: clamp(31px, 5.4vw, 54px);
  line-height: 1.02;
}

.auth-copy p {
  max-width: 470px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.55;
}

.auth-panel {
  padding-top: 0;
}

.auth-card {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.auth-card__heading {
  margin-bottom: 18px;
}

.auth-card__heading h2 {
  margin: 4px 0 0;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label,
.auth-form label span {
  display: block;
}

.auth-form label span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #d8e5e4;
  border-radius: 8px;
  color: var(--text);
  background: #f8fbfb;
  outline: none;
}

.auth-form input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-submit {
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7 58%, #4f46e5);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.24);
  font-weight: 900;
}

.auth-links,
.install-actions {
  display: flex;
  gap: 10px;
}

.auth-links {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 15px;
  font-size: 13px;
  font-weight: 900;
}

.auth-links a,
.auth-links span {
  color: var(--primary-dark);
}

.install-actions {
  margin-top: 18px;
}

.install-button {
  min-width: 0;
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #d8e5e4;
  border-radius: 8px;
  color: #233433;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.install-button svg {
  width: 19px;
  height: 19px;
}

.install-button--android {
  border-color: rgba(22, 163, 74, 0.22);
  background: #ecfdf5;
}

.install-button--ios {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.ios-install-modal .modal-content { overflow:hidden; border:0; border-radius:20px; box-shadow:0 28px 80px rgba(14,35,50,.3); }
.ios-install-modal .modal-header { align-items:flex-start; padding:19px 20px 15px; color:#fff; border:0; background:radial-gradient(circle at 90% 0,rgba(45,212,191,.4),transparent 32%),linear-gradient(135deg,#073f3d,#155e75 65%,#3730a3); }
.ios-install-modal .modal-header span { color:#5eead4; font-size:9px; font-weight:950; letter-spacing:.12em; text-transform:uppercase; }
.ios-install-modal .modal-header h2 { max-width:270px; margin:3px 0 0; font-size:23px; font-weight:950; line-height:1.08; }
.ios-install-modal .modal-header .btn-close { filter:invert(1); opacity:.8; }
.ios-install-modal .modal-body { display:grid; gap:14px; max-height:min(68vh,600px); padding:17px 20px; overflow-y:auto; background:#f8fbfb; }
.ios-install-intro { display:flex; align-items:center; gap:11px; }
.ios-install-intro img { width:54px; height:54px; border-radius:13px; box-shadow:0 7px 18px rgba(12,74,70,.18); }
.ios-install-intro strong { color:#173d39; font-size:13px; }
.ios-install-intro p { margin:2px 0 0; color:#718885; font-size:10px; line-height:1.4; }
.ios-install-context { margin:0; padding:10px 12px; border:1px solid #bae6fd; border-radius:10px; color:#155e75; background:#ecfeff; font-size:10px; line-height:1.45; }
.ios-install-steps { display:grid; gap:9px; margin:0; padding:0; list-style:none; counter-reset:none; }
.ios-install-steps li { position:relative; display:grid; grid-template-columns:22px 39px minmax(0,1fr); align-items:center; gap:9px; padding:10px; border:1px solid #dbe8e7; border-radius:12px; background:#fff; }
.ios-install-step-number { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; color:#fff; background:#0f766e; font-size:9px; font-weight:950; }
.ios-install-step-icon { display:grid; place-items:center; width:39px; height:39px; border-radius:10px; color:#2563eb; background:#eff6ff; }
.ios-install-step-icon--done { color:#047857; background:#dcfce7; }
.ios-install-step-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ios-install-steps strong { color:#183d39; font-size:11px; }
.ios-install-steps p { margin:2px 0 0; color:#718885; font-size:9px; line-height:1.4; }
.ios-install-tip { display:flex; align-items:flex-start; gap:9px; padding:11px; border:1px solid #fde68a; border-radius:10px; color:#854d0e; background:#fffbeb; }
.ios-install-tip svg { flex:0 0 18px; width:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.ios-install-tip p { margin:0; font-size:9px; line-height:1.45; }
.ios-install-modal .modal-footer { padding:12px 20px 18px; border:0; background:#f8fbfb; }
.ios-install-modal .modal-footer button { width:100%; justify-content:center; }

.modern-toast {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 36, 34, 0.24);
}

.modern-toast .toast-header {
  border-bottom: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.92);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.app-shell--wide {
  max-width: 1180px;
}

.hospitals-page {
  display: grid;
  gap: 18px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.page-heading h1 {
  margin: 0;
  font-size: 32px;
}

.page-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-action,
.secondary-action,
.danger-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 0;
  font-weight: 900;
}

.primary-action {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7 58%, #4f46e5);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.2);
}

.secondary-action {
  color: var(--text);
  background: #eef4f4;
}

.danger-action {
  color: #be123c;
  background: #fff1f2;
}

.primary-action svg {
  width: 20px;
  height: 20px;
}

.hospital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.hospital-card {
  position: relative;
  overflow: hidden;
  min-height: 255px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(210, 223, 222, 0.92);
  border-radius: 10px;
  background:
    radial-gradient(circle at 92% 0, rgba(45, 212, 191, 0.18), transparent 30%),
    linear-gradient(145deg, #ffffff, #f3faf9);
  box-shadow: 0 16px 34px rgba(20, 38, 37, 0.08);
}

.hospital-card__top,
.hospital-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hospital-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
}

.hospital-edit {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.8);
}

.hospital-edit svg {
  width: 18px;
  height: 18px;
}

.hospital-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.hospital-card__details {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
}

.hospital-card__details p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hospital-card__details svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.hospital-card__footer {
  margin-top: auto;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid rgba(210, 223, 222, 0.72);
}

.hospital-card__footer span {
  color: var(--text);
  font-weight: 900;
}

.hospital-card__footer small {
  max-width: 52%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 26px;
  border: 1px dashed rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7);
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

.hospital-modal .modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 36, 34, 0.28);
}

.hospital-modal .modal-header,
.hospital-modal .modal-footer {
  border-color: #e4eeee;
  background: #f8fbfb;
}

.hospital-modal .modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.modal-eyebrow {
  color: #14b8a6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hospital-form-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid #dbe9e7;
  border-radius: 14px;
  background: #eef7f5;
}

.hospital-form-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  color: #557370;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  transition: 160ms ease;
}

.hospital-form-tabs button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #008c7c, #00bda5);
  box-shadow: 0 8px 20px rgba(0, 140, 124, 0.22);
}

.hospital-form-tabs svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hospital-form-panel[hidden] {
  display: none;
}

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

.hospital-form-grid--nested {
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field small {
  color: #718b88;
  font-size: 11px;
  line-height: 1.35;
}

/* O resumo de recebimento usa fundo escuro; estas cores precisam prevalecer
   sobre os estilos genéricos de campos declarados abaixo dos modais. */
.shift-modal .shift-receivable-card > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.shift-modal .shift-receivable-card > strong {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(4, 47, 71, 0.28);
}

.shift-modal .shift-receivable-card > small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.hospital-payment-agreement {
  padding: 14px;
  border: 1px solid #d9ebe8;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4fbfa, #ffffff);
}

.hospital-payment-agreement > span {
  color: #007f72;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hospital-invoice-box {
  gap: 14px;
  padding: 15px;
  border: 1px solid #bfe9e3;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 214, 188, 0.13), transparent 35%),
    #f4fcfa;
}

.hospital-invoice-box__title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hospital-invoice-box__title > div {
  display: grid;
  gap: 2px;
}

.hospital-invoice-box__title strong {
  color: #073f3a;
  font-size: 14px;
}

.hospital-invoice-box__title small {
  color: #688480;
}

.hospital-invoice-box__icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, #008c7c, #00cdb4);
  box-shadow: 0 7px 18px rgba(0, 140, 124, 0.2);
}

.hospital-invoice-box__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.invoice-page { display: grid; gap: 25px; }
.invoice-hero { position: relative; overflow: hidden; padding: 25px 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg,#003f45,#007f75 60%,#00b69f); box-shadow: 0 18px 45px rgba(0,91,86,.2); }
.invoice-hero::after { content:""; position:absolute; width:180px; height:180px; right:-55px; top:-80px; border:1px solid rgba(255,255,255,.19); border-radius:50%; box-shadow:0 0 0 30px rgba(255,255,255,.04),0 0 0 65px rgba(255,255,255,.03); }
.invoice-hero span,.invoice-section__header small { display:block; color:#56f2da; font-size:11px; font-weight:900; letter-spacing:.11em; text-transform:uppercase; }
.invoice-hero h1 { position:relative; z-index:1; max-width:560px; margin:7px 0 8px; font-size:clamp(27px,5vw,42px); font-weight:900; line-height:1.05; }
.invoice-hero p { position:relative; z-index:1; max-width:650px; margin:0; color:rgba(255,255,255,.78); }
.invoice-section { display:grid; gap:14px; }
.invoice-section__header { display:flex; align-items:end; justify-content:space-between; gap:15px; padding:0 3px; }
.invoice-section__header small { color:#00a28e; }
.invoice-section__header h2 { margin:3px 0 0; font-size:23px; font-weight:900; }
.invoice-section__header > span { padding:6px 10px; border-radius:20px; color:#087b70; background:#dcfaf4; font-size:11px; font-weight:850; }
.invoice-closing-list,.invoice-history-list { display:grid; gap:14px; }
.invoice-closing-card { overflow:hidden; border:1px solid #dbe9e7; border-radius:18px; background:#fff; box-shadow:0 12px 32px rgba(20,60,56,.08); }
.invoice-closing-card > header { display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:12px; padding:17px; border-bottom:1px solid #e7f0ef; }
.invoice-hospital-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:13px; color:#fff; background:linear-gradient(135deg,#0f766e,#10bda7); }
.invoice-hospital-mark svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; }
.invoice-closing-card h3 { margin:0; font-size:17px; font-weight:900; }
.invoice-closing-card header p { margin:2px 0 0; color:#718985; font-size:11px; }
.invoice-closing-status { padding:6px 8px; border-radius:8px; color:#966100; background:#fff3c4; font-size:9px; font-weight:900; text-transform:uppercase; }
.invoice-closing-status.is-today { color:#006d60; background:#c9fff4; }
.invoice-period { display:flex; justify-content:space-between; gap:12px; padding:11px 17px; color:#66807c; background:#f5faf9; font-size:11px; }
.invoice-period strong { color:#244743; }
.invoice-shift-picker { display:grid; padding:8px 17px 2px; }
.invoice-select-all,.invoice-shift-option { display:flex; align-items:center; gap:10px; cursor:pointer; }
.invoice-select-all { padding:8px 2px 11px; color:#54716d; font-size:11px; font-weight:800; }
.invoice-select-all b { margin-left:auto; color:#0a8478; }
.invoice-shift-option { padding:12px 2px; border-top:1px solid #edf3f2; }
.invoice-shift-option input { position:absolute; opacity:0; pointer-events:none; }
.invoice-shift-option i { flex:0 0 22px; width:22px; height:22px; border:2px solid #b9cfcc; border-radius:7px; transition:.15s; }
.invoice-shift-option input:checked + i { border-color:#00a996; background:#00a996; box-shadow:inset 0 0 0 4px #fff; }
.invoice-shift-option span { display:grid; }
.invoice-shift-option strong { font-size:13px; }
.invoice-shift-option small { color:#78908d; font-size:10px; }
.invoice-shift-option b { margin-left:auto; font-size:13px; }
.invoice-closing-card > footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 17px; background:#f4fbfa; }
.invoice-closing-card footer div { display:grid; }
.invoice-closing-card footer small { color:#78908d; font-size:9px; font-weight:800; text-transform:uppercase; }
.invoice-closing-card footer strong { font-size:17px; }
.invoice-closing-card footer button,.invoice-receive-form button { min-height:42px; padding:9px 15px; border:0; border-radius:11px; color:#fff; background:linear-gradient(135deg,#008f80,#00c5ae); font-weight:900; }
.invoice-closing-card footer button:disabled,.invoice-receive-form button:disabled { opacity:.42; }
.invoice-cycle-empty,.invoice-empty { display:flex; align-items:center; justify-content:center; gap:11px; padding:25px 17px; color:#6b8581; text-align:left; }
.invoice-cycle-empty svg { width:30px; height:30px; color:#0caf99; fill:none; stroke:currentColor; stroke-width:1.7; }
.invoice-cycle-empty span { display:grid; }
.invoice-cycle-empty strong { color:#244743; }
.invoice-cycle-empty small { max-width:390px; font-size:10px; }
.invoice-empty { display:grid; min-height:140px; border:1px dashed #aedbd5; border-radius:17px; background:#f8fdfc; text-align:center; }
.invoice-empty p { margin:0; font-size:12px; }
.invoice-history-card { display:grid; grid-template-columns:43px minmax(0,1fr) auto; align-items:center; gap:11px; width:100%; padding:14px; border:1px solid #dce9e7; border-radius:15px; color:#173b37; background:#fff; text-align:left; box-shadow:0 8px 23px rgba(20,60,56,.06); }
.invoice-history-card__icon { display:grid; place-items:center; width:43px; height:43px; border-radius:12px; color:#fff; background:linear-gradient(135deg,#4f46e5,#8b5cf6); }
.invoice-history-card__icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.invoice-history-card > span:nth-child(2),.invoice-history-card > span:last-child { display:grid; gap:2px; }
.invoice-history-card > span:last-child { justify-items:end; }
.invoice-history-card small,.invoice-history-card em { color:#78908d; font-size:9px; font-style:normal; }
.invoice-history-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.invoice-history-card b { font-size:14px; }
.invoice-status { padding:4px 7px; border-radius:10px; color:#7445d4; background:#eee9ff; font-size:8px; font-style:normal; font-weight:900; text-transform:uppercase; }
.invoice-status--recebida { color:#05735f; background:#d7faef; }
.invoice-preview-modal .modal-content,.invoice-detail-modal .modal-content { max-height:calc(100dvh - 24px); overflow:hidden; border:0; border-radius:18px; }
.invoice-preview-modal .modal-header,.invoice-detail-modal .modal-header { background:linear-gradient(135deg,#edfcf8,#eef5ff); }
.invoice-preview-modal .modal-header small,.invoice-detail-modal .modal-header small { color:#008f80; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.1em; }
.invoice-preview-modal .modal-header h2,.invoice-detail-modal .modal-header h2 { margin:2px 0 0; font-size:22px; font-weight:900; }
.invoice-preview-modal .modal-body,.invoice-detail-modal .modal-body { display:grid; gap:12px; overflow-y:auto; padding:17px; }
.invoice-preview-heading { display:grid; padding:2px 3px 7px; }
.invoice-preview-heading span,.invoice-copy-field label { color:#78908d; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.invoice-preview-heading strong { font-size:17px; }
.invoice-preview-heading small { color:#718985; }
.invoice-copy-field { display:grid; gap:5px; }
.invoice-copy-field > div { display:grid; grid-template-columns:minmax(0,1fr) 42px; align-items:center; min-height:54px; overflow:hidden; border:1px solid #d8e9e6; border-radius:12px; background:#f8fcfb; }
.invoice-copy-field strong,.invoice-copy-field pre { margin:0; padding:12px 14px; white-space:pre-wrap; font-family:inherit; font-size:14px; }
.invoice-copy-field > div button { align-self:stretch; border:0; border-left:1px solid #d8e9e6; color:#008f80; background:#e9faf6; }
.invoice-copy-field > div button.is-copied { color:#fff; background:#00a690; }
.invoice-copy-field svg { width:19px; fill:none; stroke:currentColor; stroke-width:1.8; }
.invoice-copy-field > input,.invoice-copy-field > textarea { position:absolute; left:-9999px; opacity:0; }
.invoice-copy-field--description pre { max-height:170px; overflow:auto; font-size:11px; line-height:1.55; }
.invoice-detail-total { display:grid; padding:17px; border-radius:14px; color:#fff; background:linear-gradient(135deg,#075e59,#00aa95); }
.invoice-detail-total span { font-size:9px; font-weight:900; text-transform:uppercase; }
.invoice-detail-total strong { font-size:27px; }
.invoice-detail-total small { color:rgba(255,255,255,.75); }
.invoice-detail-items { display:grid; border:1px solid #e0ecea; border-radius:13px; }
.invoice-detail-items article { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; border-bottom:1px solid #eaf1f0; }
.invoice-detail-items article:last-child { border:0; }
.invoice-detail-items span { display:grid; }
.invoice-detail-items strong,.invoice-detail-items b { font-size:12px; }
.invoice-detail-items small { color:#78908d; font-size:9px; }
.invoice-receive-form { display:grid; gap:9px; padding:14px; border-radius:13px; background:#f0faf8; }
.invoice-receive-form label { display:grid; gap:5px; color:#54716d; font-size:10px; font-weight:850; }
.invoice-receive-form select { min-height:43px; padding:8px 10px; border:1px solid #cfe1de; border-radius:9px; background:#fff; }
.invoice-receive-form > small { color:#9a6c00; text-align:center; }
.invoice-received-note { display:grid; padding:14px; border:1px solid #bdebdc; border-radius:12px; color:#08715f; background:#e9fbf5; }

.report-shell { max-width:1320px; }

.profile-shell { max-width:1120px; }
.profile-page { display:grid; gap:16px; padding-bottom:105px; }
.profile-hero { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:17px; padding:21px; border-radius:20px; color:#fff; background:radial-gradient(circle at 85% 15%,rgba(45,212,191,.35),transparent 29%),linear-gradient(135deg,#073f3d,#075d59 58%,#3730a3); box-shadow:0 18px 42px rgba(7,63,61,.18); }
.profile-hero__photo { position:relative; width:82px; height:82px; }
.profile-hero__photo img { width:100%; height:100%; border:4px solid rgba(255,255,255,.8); border-radius:50%; object-fit:cover; box-shadow:0 8px 25px rgba(0,0,0,.22); }
.profile-hero__photo button { position:absolute; right:-2px; bottom:0; display:grid; place-items:center; width:29px; height:29px; padding:0; border:2px solid #fff; border-radius:50%; color:#fff; background:#00a995; }
.profile-hero__photo svg { width:14px; fill:none; stroke:currentColor; stroke-width:1.8; }
.profile-hero > div:nth-child(2) span { color:#5eead4; font-size:9px; font-weight:950; letter-spacing:.13em; text-transform:uppercase; }
.profile-hero h1 { margin:2px 0; font-size:31px; font-weight:950; letter-spacing:-.04em; }
.profile-hero p { margin:0; color:#c8e6e3; font-size:11px; }
.profile-photo-action { min-height:41px; padding:0 15px; border:1px solid rgba(255,255,255,.35); border-radius:11px; color:#fff; background:rgba(255,255,255,.12); font-size:10px; font-weight:900; }
.profile-form { display:grid; gap:14px; }
.profile-section { padding:19px; border:1px solid #dce9e7; border-radius:18px; background:#fff; box-shadow:0 12px 34px rgba(20,50,47,.06); }
.profile-section > header { display:flex; align-items:center; gap:11px; margin-bottom:17px; }
.profile-section__icon { display:grid; place-items:center; flex:0 0 38px; height:38px; border-radius:11px; color:#fff; background:linear-gradient(135deg,#008d7d,#4f46e5); font-size:10px; font-weight:950; }
.profile-section h2 { margin:0; color:#183b38; font-size:18px; font-weight:950; }
.profile-section header p { margin:2px 0 0; color:#718985; font-size:9px; }
.profile-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.profile-fields label,.profile-password form label { display:grid; align-content:start; gap:5px; color:#56716e; font-size:9px; font-weight:900; }
.profile-fields label.is-wide { grid-column:span 2; }
.profile-fields input,.profile-fields select,.profile-password input { width:100%; min-height:45px; padding:9px 11px; border:1px solid #cfe0de; border-radius:10px; color:#173c39; background:#fbfdfd; font-size:11px; font-weight:700; outline:none; transition:border-color .2s,box-shadow .2s; }
.profile-fields input:focus,.profile-fields select:focus,.profile-password input:focus { border-color:#00a995; box-shadow:0 0 0 3px rgba(0,169,149,.1); }
.profile-fields .is-locked input,.profile-fields .is-locked select { color:#667b78; border-color:#e0e8e7; background:#f1f5f4; cursor:not-allowed; }
.profile-fields small,.profile-password small { color:#849894; font-size:8px; font-weight:650; }
.profile-lock-notice { display:flex; align-items:center; gap:9px; margin:-3px 0 14px; padding:10px 12px; border:1px solid #fde68a; border-radius:10px; color:#8a5b08; background:#fffbeb; font-size:9px; font-weight:750; }
.profile-lock-notice svg { flex:0 0 18px; width:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.profile-save-bar { position:sticky; z-index:4; bottom:86px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid #cfe4e1; border-radius:14px; background:rgba(255,255,255,.94); box-shadow:0 12px 34px rgba(18,62,58,.14); backdrop-filter:blur(12px); }
.profile-save-bar span { color:#6f8582; font-size:9px; }
.profile-save-bar button,.profile-password form > button { min-height:43px; padding:0 18px; border:0; border-radius:11px; color:#fff; background:linear-gradient(135deg,#008d7d,#00c7ae); box-shadow:0 9px 20px rgba(0,169,149,.2); font-size:11px; font-weight:950; }
.profile-password form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:11px; }

@media (max-width:720px) {
  .profile-hero { grid-template-columns:auto minmax(0,1fr); padding:16px; }
  .profile-photo-action { grid-column:1/-1; }
  .profile-fields { grid-template-columns:1fr 1fr; }
  .profile-password form { grid-template-columns:1fr 1fr; }
  .profile-password form label:first-child { grid-column:1/-1; }
  .profile-password form > button { grid-column:1/-1; }
}

@media (max-width:480px) {
  .profile-hero__photo { width:68px; height:68px; }
  .profile-hero h1 { font-size:27px; }
  .profile-fields { grid-template-columns:1fr; }
  .profile-fields label.is-wide { grid-column:auto; }
  .profile-password form { grid-template-columns:1fr; }
  .profile-password form label:first-child { grid-column:auto; }
  .profile-save-bar { bottom:80px; }
  .profile-save-bar span { display:none; }
  .profile-save-bar button { width:100%; }
}
.report-page { display:grid; gap:18px; }
.report-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; padding:3px; }
.report-heading > div > span,.report-result > header span { color:#6d28d9; font-size:10px; font-weight:950; letter-spacing:.11em; text-transform:uppercase; }
.report-heading h1 { margin:3px 0; font-size:clamp(34px,5vw,48px); font-weight:950; letter-spacing:-.045em; }
.report-heading p { margin:0; color:var(--muted); }
.report-export { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px; border-radius:12px; color:#fff; background:linear-gradient(135deg,#4f46e5,#8b5cf6); box-shadow:0 10px 25px rgba(79,70,229,.22); font-size:12px; font-weight:900; }
.report-export svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; }
.report-types { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; padding:6px; border:1px solid #dce8e7; border-radius:16px; background:#fff; box-shadow:0 10px 30px rgba(20,38,37,.06); }
.report-types a { display:flex; align-items:center; justify-content:center; gap:8px; min-height:46px; border-radius:11px; color:#627b78; font-size:12px; font-weight:900; }
.report-types a > span { display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:#6d5bca; background:#f0edff; font-size:10px; }
.report-types a.is-active { color:#fff; background:linear-gradient(135deg,#0f766e,#4f46e5); box-shadow:0 9px 22px rgba(79,70,229,.18); }
.report-types a.is-active > span { color:#fff; background:rgba(255,255,255,.17); }
.report-filter-panel { display:grid; gap:11px; padding:15px; border:1px solid #dce9e7; border-radius:17px; background:linear-gradient(145deg,#f5fbfa,#fff); }
.report-period-shortcuts { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.report-period-shortcuts button { flex:0 0 auto; padding:7px 11px; border:1px solid #d4e6e3; border-radius:20px; color:#54716d; background:#fff; font-size:10px; font-weight:850; }
.report-period-shortcuts button:hover { color:#fff; border-color:#0f8d80; background:#0f8d80; }
.report-filter-panel form { display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)) auto; align-items:end; gap:9px; }
.report-filter-panel label { display:grid; gap:5px; color:#607a77; font-size:9px; font-weight:900; text-transform:uppercase; }
.report-filter-panel input,.report-filter-panel select { width:100%; min-height:43px; padding:8px 10px; border:1px solid #d2e2e0; border-radius:10px; color:#183c39; background:#fff; font-size:11px; font-weight:750; }
.report-filter-panel form > button { min-height:43px; padding:0 17px; border:0; border-radius:10px; color:#fff; background:linear-gradient(135deg,#008d7d,#00bfa8); font-size:11px; font-weight:900; }
.report-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.report-summary article { position:relative; display:grid; gap:3px; overflow:hidden; min-height:118px; padding:16px; border:1px solid #dde9e7; border-radius:15px; background:#fff; box-shadow:0 10px 26px rgba(20,50,47,.06); }
.report-summary article::after { content:""; position:absolute; right:-25px; top:-30px; width:85px; height:85px; border-radius:50%; background:rgba(109,40,217,.07); }
.report-summary span { color:#718885; font-size:9px; font-weight:900; text-transform:uppercase; }
.report-summary strong { color:#173d39; font-size:22px; }
.report-summary small { color:#7b908d; font-size:9px; }
.report-summary article.is-positive strong { color:#07866f; }
.report-summary article.is-negative strong { color:#be123c; }
.report-result { overflow:hidden; border:1px solid #dce9e7; border-radius:18px; background:#fff; box-shadow:0 15px 40px rgba(20,50,47,.07); }
.report-result > header { display:flex; align-items:end; justify-content:space-between; gap:15px; padding:18px; border-bottom:1px solid #e6efee; background:#f8fbfb; }
.report-result > header h2 { margin:3px 0 0; font-size:21px; font-weight:950; }
.report-result > header > b { color:#637d79; font-size:10px; }
.report-grid { display:grid; }
.report-row { display:grid; grid-template-columns:52px minmax(0,1fr) auto minmax(100px,auto); align-items:center; gap:12px; padding:13px 17px; border-bottom:1px solid #edf2f1; }
.report-row:last-child { border:0; }
.report-row:hover { background:#f8fcfb; }
.report-row__date { display:grid; place-items:center; align-content:center; width:48px; height:48px; border-radius:12px; color:#fff; background:linear-gradient(135deg,#0f766e,#14b8a6); }
.report-row__date strong { font-size:17px; line-height:1; }
.report-row__date span { margin-top:3px; font-size:7px; font-weight:850; }
.report-row__date--receita { background:linear-gradient(135deg,#07866f,#34d399); }
.report-row__date--despesa { background:linear-gradient(135deg,#be123c,#fb7185); }
.report-row > div:nth-child(2) { min-width:0; display:grid; }
.report-row > div:nth-child(2) strong { overflow:hidden; color:#173d39; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.report-row > div:nth-child(2) small { overflow:hidden; color:#78908d; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.report-row > b { color:#173d39; font-size:13px; text-align:right; }
.report-row > b.is-positive { color:#07866f; }
.report-row > b.is-negative { color:#be123c; }
.report-status { padding:5px 8px; border-radius:12px; color:#6d28d9; background:#ede9fe; font-size:8px; font-weight:950; text-transform:uppercase; }
.report-status--pendente { color:#92400e; background:#fef3c7; }
.report-status--realizado { color:#047857; background:#dcfce7; }
.report-status--recebido,.report-status--recebida { color:#0e7490; background:#cffafe; }
.report-status--cancelado,.report-status--cancelada { color:#9f1239; background:#ffe4e6; }
.report-hospital-flow { color:#657e7b; font-size:9px; font-weight:800; }
.report-empty { display:grid; place-items:center; min-height:210px; padding:30px; color:#718885; text-align:center; }
.report-empty strong { color:#244541; font-size:16px; }
.report-empty p { margin:4px 0 0; font-size:11px; }

@media (max-width:900px) {
  .report-filter-panel form { grid-template-columns:1fr 1fr; }
  .report-filter-panel form > button { grid-column:1/-1; }
  .report-summary { grid-template-columns:1fr 1fr; }
}

@media (max-width:560px) {
  .report-heading { align-items:stretch; flex-direction:column; }
  .report-export { align-self:flex-start; }
  .report-types { display:flex; overflow-x:auto; scrollbar-width:none; }
  .report-types a { flex:0 0 145px; }
  .report-filter-panel form { grid-template-columns:1fr 1fr; }
  .report-filter-panel label:nth-of-type(3),.report-filter-panel label:nth-of-type(4) { grid-column:1/-1; }
  .report-summary { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
  .report-summary article { flex:0 0 210px; scroll-snap-align:start; }
  .report-result > header { align-items:flex-start; flex-direction:column; }
  .report-row { grid-template-columns:44px minmax(0,1fr) auto; gap:9px; padding:12px; }
  .report-row__date { width:42px; height:42px; }
  .report-row > .report-status,.report-row > .report-hospital-flow { grid-column:2; justify-self:start; }
  .report-row > b { grid-column:3; grid-row:1/3; }
}

@media (min-width: 760px) {
  .invoice-closing-list { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
  .invoice-history-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 480px) {
  .invoice-closing-card > header { grid-template-columns:42px minmax(0,1fr); }
  .invoice-closing-status { grid-column:1/-1; justify-self:start; }
  .invoice-closing-card > footer { align-items:stretch; flex-direction:column; }
  .invoice-closing-card footer button { width:100%; }
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d8e5e4;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border: 1px solid #d8e5e4;
  border-radius: 10px;
  background: #f8fbfb;
}

.segmented-control--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-control label {
  margin: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.segmented-control input:checked + span {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0284c7);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.18);
}

.payment-field.is-hidden {
  display: none;
}

@media (min-width: 900px) {
  .auth-page {
    width: min(100%, 1280px);
    min-height: 100vh;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) 500px;
    gap: 42px;
    padding: 42px;
  }

  .auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background:
      radial-gradient(circle at 18% 16%, rgba(45, 212, 191, 0.26), transparent 27%),
      radial-gradient(circle at 82% 18%, rgba(79, 70, 229, 0.22), transparent 28%),
      linear-gradient(145deg, #061615 0%, #092b28 42%, #101827 100%);
  }

  .auth-visual {
    min-height: 650px;
    padding: 58px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background:
      radial-gradient(circle at 72% 38%, rgba(45, 212, 191, 0.22), transparent 26%),
      radial-gradient(circle at 88% 68%, rgba(79, 70, 229, 0.2), transparent 28%),
      rgba(255, 255, 255, 0.05);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.24);
  }

  .auth-logo {
    top: 42px;
    left: 42px;
    width: 184px;
    padding: 8px 12px;
  }

  .auth-copy {
    max-width: 620px;
    margin-top: 118px;
  }

  .auth-copy h1 {
    max-width: 640px;
    font-size: 64px;
  }

  .auth-copy p {
    max-width: 520px;
    font-size: 18px;
  }

  .auth-panel {
    padding: 0;
    background: transparent;
  }

  .auth-card {
    width: 100%;
    padding: 32px;
    border-radius: 16px;
  }

  .auth-card__heading h2 {
    font-size: 38px;
  }

  .auth-form {
    gap: 14px;
  }

  .auth-form input {
    height: 54px;
  }

  .auth-submit {
    height: 56px;
  }
}

@media (max-width: 520px) {
  .auth-page {
    min-height: 100vh;
    display: block;
    padding: 10px;
    background:
      radial-gradient(circle at 72% 24%, rgba(45, 212, 191, 0.26), transparent 20%),
      radial-gradient(circle at 88% 38%, rgba(79, 70, 229, 0.28), transparent 28%),
      linear-gradient(145deg, #071716 0%, #0b2d2a 45%, #101827 100%);
  }

  .auth-visual,
  .auth-panel {
    padding: 0;
  }

  .auth-visual {
    min-height: 0;
    justify-content: flex-start;
    overflow: visible;
  }

  .auth-logo {
    position: relative;
    top: auto;
    left: auto;
    width: 128px;
    margin: 14px 0 16px 14px;
  }

  .auth-orbit {
    display: none;
  }

  .auth-panel {
    display: block;
  }

  .auth-logo {
    width: 128px;
    padding: 4px 6px;
  }

  .auth-copy {
    margin: 0 14px 14px;
  }

  .auth-copy span {
    font-size: 11px;
  }

  .auth-copy h1 {
    max-width: 300px;
    margin-bottom: 7px;
    font-size: 29px;
    line-height: 1.03;
  }

  .auth-copy p {
    max-width: 300px;
    font-size: 14px;
    line-height: 1.35;
  }

  .auth-page--trial .auth-copy {
    margin-bottom: 10px;
  }

  .auth-page--trial .auth-copy h1 {
    max-width: 280px;
    font-size: 27px;
  }

  .auth-page--trial .auth-copy p {
    display: none;
  }

  .auth-card {
    width: calc(100% - 18px);
    margin: 0 auto;
    padding: 18px;
    border-radius: 10px;
  }

  .auth-grid,
  .install-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .auth-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .hospital-grid {
    grid-template-columns: 1fr;
  }

  .hospital-card {
    min-height: 220px;
  }

  .hospital-form-grid {
    grid-template-columns: 1fr;
  }

  .hospital-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hospital-card__footer small {
    max-width: 100%;
    text-align: left;
  }
}

/* Correcoes de encaixe da LIA sobre o layout original */
.topbar-actions {
  position: absolute;
  right: 18px;
  top: calc(12px + env(safe-area-inset-top));
}

@media (max-width: 719px) {
  .topbar .brand img {
    width: 142px;
  }
}

@media (min-width: 720px) {
  .topbar-actions {
    right: 32px;
  }
}

@media (max-width: 370px) {
  .topbar-actions {
    right: 12px;
  }

  .topbar .brand img {
    width: 126px;
  }
}
