/**
 * Arquivo: public/zaira.css
 * Responsabilidade: Estilos dos módulos e temas anteriores. A identidade oficial é aplicada depois deste arquivo.
 * Manutenção: consulte docs/ARQUIVOS.md e docs/DESENVOLVIMENTO.md.
 */
:root {
  --brand: #5147d6;
  --accent: #36b9c6;
  --muted: #69768d;
  --line: #e2e7f1;
  color: #222d4a;
  background: #f3f5fb;
}
.logo {
  font-size: 26px;
  gap: 9px;
  letter-spacing: -0.8px;
}
.logo small {
  font-size: 10px;
  letter-spacing: 1.4px;
}
.sidebar {
  background: #111a32;
  border-color: #1e2944;
  color: #c7d1e9;
}
.sidebar .logo {
  color: white;
}
.sidebar .logo small {
  color: #8b9bba;
}
.sidebar nav button {
  color: #96a7cb;
}
.sidebar nav button:hover {
  background: #1c2949;
}
.sidebar nav button.active {
  background: #2c2a61;
  color: #e1dcff;
}
.sidebar-foot {
  border-color: #26324e;
}
.sidebar-foot .muted {
  color: #8192b4;
}
.sidebar-foot button {
  background: #1c2949;
  color: #c5d1ef;
  border-color: #2c3854;
}
.sidebar .person strong {
  color: #e0e6f6;
}
.sidebar .person .muted {
  color: #97a8c9;
}
.avatar {
  background: #eeebff;
  color: #6252cf;
}
.welcome {
  background: linear-gradient(110deg, #242857, #4a3b98);
  box-shadow: 0 8px 30px #36297a14;
}
.welcome .eyebrow {
  color: #7de5df;
}
.welcome p {
  color: #c8c9e9;
}
.welcome button {
  color: #4a3b98;
}
.stat-label span {
  color: #7c6ce2;
}
.login-art {
  background: radial-gradient(ellipse at 90% 15%, #3f3a79, transparent 55%), #101b35;
}
.login-art .eyebrow {
  color: #76d9dd;
}
.login-art .logo small {
  color: #9faed4;
}
.login-art p {
  color: #b8c6e2;
}
.login-art footer {
  color: #8e9dc0;
}
.login-art h1 {
  font-size: 52px;
}
.login-box {
  max-width: 420px;
}
.signup-link {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.signup-link button {
  margin-top: 12px;
  width: 100%;
}
.notice {
  border-color: #7769e5;
  background: #f0edff;
}
.public-plans {
  max-width: 1280px;
  padding: 40px;
  margin: auto;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 70px;
}
.public-plans .heading {
  margin-bottom: 35px;
}
.public-plans h1 {
  font-size: 42px;
  max-width: 730px;
}
.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.plan-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 5px 20px #25325b04;
}
.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.plan-name {
  font-size: 25px;
  font-weight: 700;
}
.plan-card .muted {
  min-height: 46px;
}
.plan-price {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 700;
  margin-top: 22px;
}
.plan-price small {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.price-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.plan-card ul {
  padding: 0;
  list-style: none;
  margin: 24px 0 28px;
  flex: 1;
}
.plan-card li {
  padding: 9px 0;
  border-top: 1px solid #edf0f7;
  font-size: 14px;
  line-height: 1.5;
}
.plan-card li:before {
  content: '✓';
  margin-right: 9px;
  color: #6d5ce0;
}
.plan-card.current {
  border-color: #9b8eee;
}
.plan-card.gold {
  background: linear-gradient(145deg, #222647, #151e35);
  color: #fff;
  border-color: #363b60;
}
.plan-card.gold .muted,
.plan-card.gold .price-note,
.plan-card.gold small {
  color: #aebcdb;
}
.plan-card.gold li {
  border-color: #343c5b;
}
.plan-card.gold .badge {
  background: #4a4260;
  color: #efd092;
}
.plan-card.gold .primary {
  background: #dcca8f;
  color: #252640;
  border-color: #dcca8f;
}
.subscription-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  padding: 23px;
  background: white;
  border-radius: 12px;
}
.subscription-summary .eyebrow {
  display: block;
  color: #6a5adc;
}
.checkout-amount {
  font-size: 38px;
  font-weight: 700;
  margin: 24px 0;
}
.checkout-amount small {
  font-size: 14px;
  color: var(--muted);
  margin-left: 6px;
}
.video-intro {
  padding: 28px;
  border: 1px solid #dce0ef;
  border-radius: 14px;
  background: #edf0fc;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
}
.video-intro h2 {
  font-size: 22px;
}
.video-intro p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 9px;
}
.video-symbol {
  background: #dad7fd;
  color: #6757d6;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 28px;
}
.video-intro .badge {
  margin-left: auto;
  background: #dfdef5;
  color: #5d518b;
}
.call-stage {
  background: radial-gradient(ellipse at top, #242e51, #0b1429);
  height: 440px;
  border: 1px solid #2a3557;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  color: #e1e7f5;
}
.call-stage > #remote-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.call-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}
.call-placeholder span {
  font-size: 42px;
  color: #a194ef;
  margin-bottom: 20px;
}
.call-placeholder p {
  color: #98a9cf;
  line-height: 1.6;
  font-size: 14px;
  margin-top: 12px;
}
.call-placeholder.connected {
  display: none;
}
.self-view {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 160px;
  height: 110px;
  border: 1px solid #58658c;
  border-radius: 12px;
  overflow: hidden;
  background: #1e2845;
}
.self-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.self-view span {
  position: absolute;
  bottom: 4px;
  left: 8px;
  font-size: 12px;
  color: white;
}
.call-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.danger {
  background: #b84258;
  color: white;
  border-color: #b84258;
}
.bar {
  background: #7262dd;
}
.bar.expense {
  background: #9aabcb;
}
@media (max-width: 1100px) {
  .plan-cards {
    gap: 12px;
  }
  .plan-card {
    padding: 20px;
  }
  .plan-price {
    font-size: 28px;
  }
  .logo {
    font-size: 24px;
  }
}
@media (max-width: 720px) {
  .sidebar .logo small {
    display: block;
  }
  .sidebar nav button {
    color: #a4b3d4;
  }
  .public-plans {
    padding: 24px 16px;
  }
  .public-header {
    margin-bottom: 38px;
    gap: 12px;
  }
  .public-plans h1 {
    font-size: 32px;
  }
  .plan-cards {
    grid-template-columns: 1fr;
  }
  .plan-card .muted {
    min-height: 0;
  }
  .subscription-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .video-intro {
    padding: 20px;
    flex-wrap: wrap;
  }
  .video-intro .badge {
    margin-left: 0;
  }
  .video-symbol {
    display: none;
  }
  .call-stage {
    height: 380px;
  }
  .self-view {
    width: 110px;
    height: 85px;
  }
  .login-art h1 {
    font-size: 32px;
  }
  .topbar .local {
    display: none;
  }
  .plan-price {
    font-size: 34px;
  }
}

.zaira-robot {
  width: 110px;
  margin: 20px auto;
  text-align: center;
  animation: zaira-float 3s ease-in-out infinite;
}
.robot-antenna {
  display: block;
  width: 4px;
  height: 15px;
  background: #7ce4d4;
  margin: auto;
  border-radius: 5px;
}
.robot-face {
  position: relative;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 65px;
  border: 4px solid #7ce4d4;
  border-radius: 22px;
  background: #19265b;
  box-shadow: 0 8px 20px #19265b22;
}
.robot-face i {
  width: 12px;
  height: 16px;
  background: #7ce4d4;
  border-radius: 9px;
  animation: zaira-blink 5s infinite;
}
.robot-smile {
  position: absolute;
  bottom: 10px;
  width: 22px;
  height: 8px;
  border-bottom: 2px solid #fff;
  border-radius: 50%;
}
.robot-body {
  display: block;
  margin: 4px auto;
  background: #e9f7f5;
  color: #19265b;
  border-radius: 10px;
  padding: 6px;
  width: 70px;
  font-weight: 700;
}
@keyframes zaira-float {
  50% {
    transform: translateY(-6px);
  }
}
@keyframes zaira-blink {
  0%,
  90%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .zaira-robot,
  .robot-face i {
    animation: none;
  }
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.guide-grid p,
.guide-grid li {
  line-height: 1.65;
  margin: 12px 0;
}
.patient-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.patient-calendar strong {
  text-align: center;
}
.patient-calendar button {
  padding: 14px 4px;
  min-width: 0;
}
.patient-calendar small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}
.patient-calendar .selected {
  background: #19265b;
  color: white;
}
.patient-calendar button:disabled {
  opacity: 0.45;
}
.slot-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .patient-calendar {
    gap: 3px;
  }
}
.portal-links,
.help-prompts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.portal-links a {
  color: var(--purple, #6652dd);
  font-weight: 600;
}
.help-history {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.help-message {
  padding: 16px;
  border-radius: 16px;
  background: #f1f0ff;
}
.help-message.user {
  background: #f4f6f9;
  margin-left: 24px;
}
.help-message p {
  white-space: normal;
  line-height: 1.65;
  margin-top: 8px;
}
#help-form textarea {
  min-height: 90px;
  width: 100%;
}
.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.calendar-toolbar input {
  width: auto;
}
.calendar-scroll {
  overflow: auto;
  max-height: 650px;
}
.time-calendar {
  display: grid;
  grid-template-columns: 70px repeat(var(--calendar-columns), minmax(130px, 1fr));
  min-width: 400px;
}
.time-calendar > strong {
  padding: 16px;
  background: #f5f6fb;
  position: sticky;
  top: 0;
  z-index: 1;
}
.time-cell,
.time-label {
  border: 1px solid #e8ebf2;
  min-height: 65px;
  padding: 5px;
}
.time-label {
  font-size: 12px;
  color: #657087;
}
.today {
  background: #f1f0ff;
}
.calendar-session {
  display: block;
  text-align: left;
  width: 100%;
  padding: 8px;
  border: 0;
  background: #e7e4ff;
  margin: 3px 0;
  font-size: 12px;
}
.calendar-session small {
  display: block;
  margin-top: 5px;
}
.clinic-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.clinic-month > strong {
  padding: 10px;
}
.clinic-day {
  min-height: 120px;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  padding: 5px;
}
.clinic-day > button {
  padding: 4px 8px;
}
.record-row {
  border-bottom: 1px solid #e5e8f0;
  padding: 18px 0;
}
.record-row p {
  white-space: pre-wrap;
}
.floating-zaira {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  background: #5142bd;
  color: white;
  border-radius: 30px;
  padding: 15px 22px;
  box-shadow: 0 6px 25px #19265b30;
}
#floating-history {
  max-height: 300px;
  overflow: auto;
}
#agenda-preferences input[type='checkbox'] {
  width: auto;
}
#agenda-preferences {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .clinic-month {
    overflow: auto;
    grid-template-columns: repeat(7, 120px);
  }
  .floating-zaira {
    right: 12px;
    bottom: 12px;
    padding: 12px;
  }
  .calendar-toolbar {
    gap: 6px;
  }
}
.network-slot-list {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 15px;
}
.network-slot-list section {
  padding: 14px;
  background: #f5f6fb;
  border-radius: 12px;
}
.network-slot-list .slot-list {
  margin-top: 10px;
}
.profile-button {
  padding: 0;
  border: 2px solid transparent;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-button:hover {
  border-color: #806fe8;
}
.profile-button img,
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #eeebff;
  display: grid;
  place-items: center;
  color: #5142bd;
  font-weight: 700;
  font-size: 32px;
  margin: 18px 0;
}
.presence {
  display: inline-block;
  font-size: 12px;
  border-radius: 20px;
  padding: 5px 9px;
  background: #eef0f4;
  color: #596476;
  margin-left: 5px;
}
.presence.online {
  background: #dcf6e8;
  color: #126a3b;
}
.calendar-toolbar input[type='checkbox'] {
  width: auto;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --brand: #d7d9ff;
  --muted: #b2bdd0;
  --line: #354056;
  --accent: #a99cff;
  background: #101623;
  color: #e6edf7;
}
html[data-theme='dark'] body,
html[data-theme='dark'] .main {
  background: #101623;
  color: #e6edf7;
}
html[data-theme='dark'] .card,
html[data-theme='dark'] .stat,
html[data-theme='dark'] .plan-card,
html[data-theme='dark'] dialog,
html[data-theme='dark'] .topbar,
html[data-theme='dark'] .patient-card,
html[data-theme='dark'] .subscription-summary {
  background: #1b2536;
  color: #e6edf7;
  border-color: #354056;
}
html[data-theme='dark'] input,
html[data-theme='dark'] select,
html[data-theme='dark'] textarea,
html[data-theme='dark'] button:not(.primary):not(.floating-zaira),
html[data-theme='dark'] a.button {
  background: #253147;
  color: #e6edf7;
  border-color: #46526c;
}
html[data-theme='dark'] .notice,
html[data-theme='dark'] .welcome,
html[data-theme='dark'] .help-message,
html[data-theme='dark'] .help-message.user,
html[data-theme='dark'] .network-slot-list section,
html[data-theme='dark'] .time-calendar > strong,
html[data-theme='dark'] .today,
html[data-theme='dark'] .calendar-session {
  background: #29334d;
  color: #e6edf7;
}
html[data-theme='dark'] h1,
html[data-theme='dark'] h2,
html[data-theme='dark'] h3,
html[data-theme='dark'] .value,
html[data-theme='dark'] .plan-price {
  color: #edf2ff;
}
html[data-theme='dark'] .muted,
html[data-theme='dark'] .heading p,
html[data-theme='dark'] .stat-label {
  color: #b2bdd0;
}
html[data-theme='dark'] .row,
html[data-theme='dark'] th,
html[data-theme='dark'] td,
html[data-theme='dark'] .time-cell,
html[data-theme='dark'] .clinic-day {
  border-color: #354056;
}
html[data-theme='dark'] .presence {
  background: #334057;
  color: #d8e3f5;
}
html[data-theme='dark'] .presence.online {
  background: #163e35;
  color: #9de7c0;
}
html[data-theme='dark'] .login-form {
  background: #101623;
}
html[data-theme='dark'] .test-accounts {
  background: #1b2536;
  color: #e6edf7;
}
html[data-theme='dark'] button.primary {
  background: #6b57df;
  color: #fff;
  border-color: #806cec;
}
@media (min-width: 721px) {
  .shell {
    align-items: start;
  }
  .sidebar {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    gap: 20px;
  }
  .sidebar > .logo,
  .sidebar-foot {
    flex-shrink: 0;
  }
  .sidebar nav {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    align-content: start;
    padding-right: 4px;
  }
  .sidebar nav button {
    flex-shrink: 0;
  }
  .sidebar-foot {
    margin-top: 0;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
  }
}
#clinical-form input[type='checkbox'] {
  width: auto;
}
#clinical-form .notice {
  margin-bottom: 15px;
}
.call-status {
  padding: 14px 16px;
  line-height: 1.6;
  background: #eef0fc;
  border-radius: 10px;
  margin-top: 12px;
}
.call-controls button {
  min-height: 44px;
}
.call-stage video {
  background: #0b1429;
}
.call-controls {
  position: relative;
}
.call-stage ~ details p {
  margin-top: 12px;
  line-height: 1.6;
}
html[data-theme='dark'] .call-status {
  background: #29334d;
  color: #edf2ff;
}
@media (max-width: 720px) {
  .call-stage {
    height: 55dvh;
    min-height: 240px;
    max-height: 440px;
  }
  .call-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .call-controls button {
    width: 100%;
    padding: 12px 8px;
    font-size: 14px;
  }
  .call-status {
    font-size: 14px;
  }
  .call-placeholder {
    padding: 20px 100px 20px 20px;
  }
  .self-view {
    bottom: 12px;
    right: 12px;
    width: 100px;
    height: 80px;
  }
}
.sidebar nav {
  overflow-x: hidden;
  scrollbar-color: #4b527d transparent;
  scrollbar-width: thin;
}
.sidebar nav::-webkit-scrollbar {
  width: 5px;
  height: 4px;
}
.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar nav::-webkit-scrollbar-thumb {
  background: #4b527d;
  border-radius: 20px;
}
.sidebar nav::-webkit-scrollbar-thumb:hover {
  background: #7777b1;
}
.sidebar nav button {
  min-width: 0;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  padding: 11px 12px;
}
.sidebar nav button span {
  flex: 0 0 22px;
}
.sidebar-foot .person {
  min-width: 0;
}
.sidebar-foot .person > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.login-security {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.login-security button {
  font-size: 14px;
}
.login-security p {
  font-size: 12px;
}
@media (max-width: 720px) {
  .sidebar nav {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .sidebar nav button {
    width: auto;
    white-space: nowrap;
    overflow-wrap: normal;
    flex-shrink: 0;
  }
}
.sidebar nav {
  min-width: 0;
  width: 100%;
}
