/* Revisão integrada: organização, estados e uso com toque. */
.mobile-nav-backdrop,
.online-mobile-back {
  display: none;
}
.event-folders {
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  align-items: start;
}
.event-folders > *,
.event-detail,
.online-chat-main {
  min-width: 0;
}
.folder-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.folder-list .list-item {
  width: 100%;
  text-align: left;
  align-items: flex-start;
}
.folder-list small {
  display: block;
  margin-top: 5px;
}
.event-counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.event-counts > span {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 13px;
}
.event-counts .icon {
  width: 18px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.reminder-intro {
  margin-bottom: 20px;
}
.reminder-intro h2 {
  margin-bottom: 8px;
}
.reminder-intro p {
  color: var(--muted);
}
.reminder-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.reminder-tabs button {
  display: flex;
  gap: 8px;
}
.reminder-tabs span {
  border-radius: 9px;
  padding: 1px 6px;
  background: #ffffff80;
  color: #34354d;
}
.reminder-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.reminder-card p {
  margin: 5px 0;
}
.reminder-card small {
  color: var(--muted);
}
.grow {
  flex: 1;
  min-width: 0;
}
.notes-workspace {
  gap: 22px;
}
.notes-sheet {
  background: var(--surface);
  border-top: 5px solid #d6ccf4;
}
.notes-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.notes-sheet textarea {
  line-height: 1.9;
  min-height: 360px;
}
.chat-connect {
  max-width: 650px;
  margin: 25px auto;
  padding: 32px;
}
.chat-connect p {
  line-height: 1.7;
}
.online-chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  height: min(720px, calc(100dvh - 180px));
  min-height: 400px;
}
.online-conversations {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
}
.online-conversations #online-rooms {
  overflow-y: auto;
  flex: 1;
}
.online-conversations .list-item {
  width: 100%;
  text-align: left;
}
.online-conversations .foot {
  display: grid;
  gap: 10px;
}
.online-chat-main {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.online-chat-main .chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-header > button[data-action="chat-details"] {
  flex: 1;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.online-chat-main .messages {
  flex: 1;
  overflow: auto;
  min-height: 100px;
  padding: 20px;
}
.online-chat-main .composer {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.composer input {
  flex: 1;
  min-width: 0;
}
.online-group-details {
  padding: 16px;
  background: var(--soft);
  max-height: 180px;
  overflow: auto;
}
.message .text {
  overflow-wrap: anywhere;
}
.message .meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}
.lumi-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.3fr);
  gap: 22px;
}
.lumi-intro {
  text-align: center;
  padding: 38px 25px;
}
.lumi-intro p {
  line-height: 1.8;
  color: var(--muted);
}
.lumi-intro .actions {
  justify-content: center;
  margin-top: 24px;
}
.lumi-big-face {
  display: flex;
  justify-content: center;
  padding: 32px;
}
.lumi-big-face .lumi-face {
  width: 100px;
  height: 100px;
  gap: 18px;
  border-radius: 40px;
}
.lumi-big-face .lumi-face i {
  width: 10px;
  height: 20px;
}
.lumi-follow-card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.lumi-follow-card small {
  display: block;
  margin: 5px 0;
  color: var(--muted);
}
.lumi-follow-card p {
  line-height: 1.6;
}
.lumi-face {
  animation: lumi-breathe 5s ease-in-out infinite;
}
.lumi-face i {
  translate: var(--eye-x, 0) var(--eye-y, 0);
}
.lumi-blush {
  position: absolute;
  width: 30px;
  height: 6px;
  top: 28px;
  background:
    radial-gradient(ellipse at 10% 50%, #e9c8df88 0 18%, transparent 25%),
    radial-gradient(ellipse at 90% 50%, #e9c8df88 0 18%, transparent 25%);
  pointer-events: none;
}
.lumi-big-face .lumi-blush {
  top: 65px;
  width: 65px;
  height: 12px;
}
.lumi-launch:focus-visible {
  outline: 3px solid #8971c8;
  outline-offset: 4px;
}
@keyframes lumi-breathe {
  0%,
  100% {
    scale: 1;
    rotate: -2deg;
  }
  50% {
    scale: 1.04;
    rotate: 2deg;
  }
}
@media (max-width: 1000px) {
  .event-folders {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .lumi-workspace {
    grid-template-columns: 1fr;
  }
  .online-chat-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .reminder-card {
    flex-wrap: wrap;
  }
  .reminder-card > .actions {
    width: 100%;
    padding-left: 58px;
  }
}
@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }
  .workspace,
  main,
  #main,
  .card {
    min-width: 0;
  }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: #24253d66;
    border: 0;
    z-index: 69;
  }
  .sidebar.open ~ .mobile-nav-backdrop {
    display: block;
  }
  .sidebar {
    z-index: 70 !important;
    max-width: 86vw;
    overflow-y: auto;
    max-height: 100dvh;
  }
  body.mobile-nav-open {
    overflow: hidden;
  }
  .topbar {
    gap: 8px;
  }
  .topbar .profile span,
  .topbar .profile small {
    display: none;
  }
  .lumi-widget {
    left: 65px;
    top: 10px;
    z-index: 50;
  }
  .lumi-widget:has(.lumi-panel:not([hidden])) {
    left: 10px;
    right: 10px;
  }
  .lumi-panel {
    width: calc(100vw - 90px);
    max-height: calc(100dvh - 95px);
    overflow-y: auto;
  }
  .lumi-launch,
  .lumi-send,
  .lumi-close {
    min-height: 44px;
    min-width: 44px;
  }
  .lumi-shortcuts button {
    min-height: 44px;
  }
  .event-folders {
    grid-template-columns: 1fr;
  }
  .folder-list {
    max-height: 240px;
    overflow: auto;
  }
  .card-title {
    flex-wrap: wrap;
    gap: 12px;
  }
  .event-counts {
    gap: 7px;
  }
  .event-counts > span {
    font-size: 12px;
  }
  .reminder-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .reminder-tabs button {
    justify-content: space-between;
    font-size: 12px;
    min-height: 48px;
    padding: 10px;
  }
  .reminder-card {
    align-items: flex-start;
  }
  .reminder-card > .actions {
    padding-left: 0;
  }
  .reminder-card > .actions button {
    flex: 1;
  }
  .modal {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: auto !important;
    padding: 22px !important;
    border-radius: 22px !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .modal-footer {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .modal-footer .btn {
    flex: 1;
    min-height: 46px;
  }
  .field,
  input,
  textarea,
  select {
    max-width: 100%;
    min-width: 0;
  }
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .toolbar > * {
    max-width: 100%;
  }
  .toolbar .search {
    flex: 1 1 100%;
  }
  .tabs {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tabs button {
    flex-shrink: 0;
    min-height: 44px;
  }
  .online-chat-layout {
    display: block;
    height: calc(100dvh - 165px);
    min-height: 370px;
  }
  .online-conversations {
    display: none;
    height: 100%;
  }
  .online-chat-main {
    height: 100%;
  }
  .online-chat-layout.show-conversations .online-conversations {
    display: flex;
  }
  .online-chat-layout.show-conversations .online-chat-main {
    display: none;
  }
  .online-mobile-back {
    display: inline-flex;
  }
  .online-chat-main .chat-header {
    padding: 10px;
    flex-wrap: wrap;
  }
  .online-chat-main .messages {
    padding: 12px;
  }
  .online-chat-main .composer {
    padding: 10px;
  }
  .chat-connect {
    padding: 22px;
    margin: 0;
  }
  .lumi-big-face {
    padding: 15px;
  }
  .lumi-intro {
    padding: 25px 18px;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table {
    min-width: 600px;
  }
  .btn,
  .icon-btn {
    min-height: 44px;
  }
  .notes-sheet textarea {
    min-height: 300px;
  }
  .lumi-follow-card .actions button {
    flex: 1;
  }
  .hero {
    overflow: hidden;
  }
  .foot {
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lumi-face,
  .lumi-face i {
    animation: none !important;
    transition: none !important;
  }
}
body.reduce .lumi-face,
body.reduce .lumi-face i {
  animation: none !important;
}
/* Controles próprios: os menus do sistema não são usados nas listas do aplicativo. */
select[hidden] {
  display: none !important;
}
.unified-select {
  position: relative;
  min-width: 0;
  width: 100%;
  margin-top: 4px;
}
.toolbar > .unified-select {
  width: auto;
  min-width: 180px;
}
.select-trigger {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px 40px 16px 17px;
  width: 100%;
  text-align: left;
  position: relative;
  cursor: pointer;
  min-height: 52px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.select-trigger:after {
  content: "";
  position: absolute;
  right: 19px;
  top: 22px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.select-trigger[aria-expanded="true"] {
  border-color: #a795e1;
  box-shadow: 0 0 0 4px #a795e119;
}
.select-trigger[aria-expanded="true"]:after {
  transform: rotate(225deg);
}
.unified-options {
  position: absolute;
  z-index: 120;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  min-width: 180px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 15px 40px #31314d22;
  max-height: 240px;
  overflow: auto;
}
.unified-options[hidden] {
  display: none;
}
.unified-options > button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 12px;
  border-radius: 11px;
  text-align: left;
  min-height: 44px;
  cursor: pointer;
  white-space: normal;
}
.unified-options > button:hover,
.unified-options > button:focus-visible {
  background: var(--soft);
  outline: 2px solid #b6a4e8;
  outline-offset: -2px;
}
.unified-options > button[aria-selected="true"] {
  background: #e9e2fc;
  color: #594288;
}
.mask-error {
  display: block;
  color: #a73b51;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}
.reason-suggestions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.reason-suggestions button {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  min-height: 36px;
}
.reason-suggestions button:hover {
  border-color: #a795e1;
}
.lumi-face {
  background: radial-gradient(
    circle at 35% 20%,
    #fff 5%,
    var(--lumi-color, #f4f5fc) 67%,
    #bfc9e2
  );
  overflow: visible;
}
.lumi-launch[aria-expanded="true"] .lumi-face {
  width: 65px;
  height: 65px;
  border-radius: 25px;
  gap: 12px;
  transition:
    width 0.35s,
    height 0.35s,
    transform 0.35s;
}
.lumi-launch[aria-expanded="true"] .lumi-face i {
  width: 7px;
  height: 13px;
}
.lumi-launch[aria-expanded="true"] .lumi-blush {
  top: 42px;
  width: 42px;
}
.lumi-widget:has(.lumi-panel:not([hidden])) {
  left: 50%;
  transform: translateX(-50%);
  width: min(570px, calc(100vw - 35px));
  max-width: none;
  gap: 12px;
  padding: 10px;
  border: 1px solid #ffffffa6;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: 0 16px 50px #38345d29;
  animation: lumi-open 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lumi-panel {
  width: auto;
  flex: 1;
  min-width: 0;
}
.lumi-answer {
  max-height: 55dvh;
  overflow: auto;
}
.lumi-decoration,
.lumi-outfit {
  position: absolute;
  pointer-events: none;
}
.accessory-bow .lumi-decoration {
  top: -5px;
  right: 1px;
  width: 20px;
  height: 11px;
  background: #cd80ae;
  clip-path: polygon(0 0, 50% 35%, 100% 0, 100% 100%, 50% 65%, 0 100%);
}
.accessory-glasses .lumi-decoration {
  top: 37%;
  left: 15%;
  width: 70%;
  height: 27%;
  border: 2px solid #635383;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    transparent 45%,
    #635383 46% 54%,
    transparent 55%
  );
}
.accessory-star .lumi-decoration {
  right: -3px;
  top: -6px;
  width: 18px;
  height: 18px;
  background: #f1c85a;
  clip-path: polygon(
    50% 0,
    61% 35%,
    100% 38%,
    71% 60%,
    80% 100%,
    50% 76%,
    20% 100%,
    29% 60%,
    0 38%,
    39% 35%
  );
}
.accessory-hat .lumi-decoration {
  top: -12px;
  left: 20%;
  width: 60%;
  height: 16px;
  background: #8174ae;
  border-bottom: 4px solid #605281;
  border-radius: 7px 7px 2px 2px;
}
.accessory-flower .lumi-decoration {
  top: -7px;
  right: -2px;
  width: 17px;
  height: 17px;
  border: 5px dotted #d983ad;
  border-radius: 50%;
  background: #f8d87a;
}
.accessory-headphones .lumi-decoration {
  inset: -2px -3px 8px;
  border: 4px solid #8174b0;
  border-bottom: 0;
  border-radius: 45% 45% 20% 20%;
}
.outfit-scarf .lumi-outfit {
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 9px;
  background: #9b8cce;
  border-radius: 6px;
  rotate: -5deg;
}
.outfit-coat .lumi-outfit {
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 15px;
  background: linear-gradient(
    90deg,
    #d1dfec 0 46%,
    #849fb9 47% 52%,
    #edf4fb 53%
  );
  border-radius: 5px 5px 13px 13px;
}
.outfit-shirt .lumi-outfit {
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 14px;
  background: #8fb6db;
  border-radius: 4px 4px 13px 13px;
}
.outfit-cape .lumi-outfit {
  inset: 5% -8px -6px;
  z-index: -1;
  background: #b3a1d9;
  border-radius: 25% 25% 8px 8px;
}
.lumi-big-face .lumi-decoration {
  scale: 1.8;
  transform-origin: center;
}
.lumi-big-face .lumi-outfit {
  height: 22px;
}
.motion-playful .lumi-face {
  animation: lumi-playful 7s ease-in-out infinite;
}
.motion-gentle .lumi-face {
  animation: lumi-breathe 6s ease-in-out infinite;
}
.motion-quiet .lumi-face,
.motion-quiet .lumi-face i {
  animation: none;
}
.lumi-launch:hover .lumi-face {
  filter: brightness(1.04);
}
.lumi-launch:active .lumi-face {
  scale: 0.95;
}
.lumi-preview {
  min-height: 150px;
}
@keyframes lumi-open {
  from {
    opacity: 0;
    scale: 0.9;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes lumi-playful {
  0%,
  30%,
  100% {
    rotate: 0deg;
    scale: 1;
  }
  35% {
    rotate: -8deg;
    scale: 1.06;
  }
  40% {
    rotate: 7deg;
    scale: 1.06;
  }
  45% {
    rotate: 0deg;
    scale: 1;
  }
  70% {
    rotate: 3deg;
    scale: 1.03;
  }
}
@media (max-width: 700px) {
  .lumi-widget {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    max-width: none;
    top: 9px;
  }
  .lumi-widget:has(.lumi-panel:not([hidden])) {
    left: 50% !important;
    right: auto !important;
    width: calc(100vw - 20px);
    gap: 8px;
    padding: 9px;
    align-items: flex-start;
  }
  .lumi-widget:has(.lumi-panel:not([hidden])) .lumi-face {
    width: 54px;
    height: 54px;
  }
  .lumi-widget .lumi-panel {
    width: auto;
    max-width: none;
    max-height: 80dvh;
  }
  .lumi-bar {
    padding: 6px 4px 6px 10px;
    gap: 2px;
    flex-wrap: wrap;
  }
  .lumi-bar input {
    flex: 1 1 100%;
    padding: 8px;
    min-height: 40px;
  }
  .lumi-send,
  .lumi-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .lumi-answer {
    padding: 12px;
  }
  .unified-options {
    max-height: 200px;
  }
  .reason-suggestions button {
    min-height: 44px;
  }
  .toolbar > .unified-select {
    width: 100%;
  }
  .lumi-widget .lumi-shortcuts {
    display: grid;
  }
  .lumi-widget .lumi-shortcuts button {
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lumi-widget,
  .lumi-face,
  .lumi-face i {
    animation: none !important;
    transition: none !important;
  }
}
body.reduce .lumi-widget,
body.reduce .lumi-face,
body.reduce .lumi-face i {
  animation: none !important;
  transition: none !important;
}
.unified-select.open-up .unified-options {
  top: auto;
  bottom: calc(100% + 7px);
}
.lumi-face.motion-playful {
  animation: lumi-playful 7s ease-in-out infinite;
}
.lumi-face.motion-quiet,
.lumi-face.motion-quiet i {
  animation: none !important;
}
.lumi-face.motion-gentle {
  animation: lumi-breathe 6s ease-in-out infinite;
}
.form-inline-error {
  display: block;
  color: #a73b51;
  font-size: 12px;
  margin-top: 7px;
}
[aria-invalid="true"] {
  border-color: #c77a8a !important;
}
@media (max-width: 700px) {
  .lumi-widget .lumi-shortcuts {
    display: flex;
    flex-wrap: wrap;
  }
  .lumi-widget .lumi-shortcuts button {
    flex: 1 1 45%;
    font-size: 11px;
  }
  .lumi-answer {
    max-height: 50dvh;
  }
}
