:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f0;
  --line-soft: #edf2f7;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --blue-soft: #eff6ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --yellow: #fbbf24;
  --green: #16a34a;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.05);
  --radius: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, #ffffff 0, #f8fafc 170px, #f1f5f9 100%),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0 1px, transparent 1px 72px);
}

body.login-body {
  overflow: hidden;
  background: #f8fbff;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

i {
  line-height: 1;
}

.login-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 21% 50%, rgba(226, 232, 240, 0.34), transparent 27%),
    radial-gradient(circle at 79% 50%, rgba(219, 234, 254, 0.38), transparent 28%),
    linear-gradient(90deg, #ffffff 0%, #f8fafc 35%, #f6faff 62%, #ffffff 100%);
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: fixed;
  top: -4vh;
  bottom: -4vh;
  width: 180px;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.48;
}

.login-screen::before {
  left: 21%;
  background: linear-gradient(90deg, transparent, rgba(203, 213, 225, 0.28), transparent);
}

.login-screen::after {
  right: 18%;
  background: linear-gradient(90deg, transparent, rgba(191, 219, 254, 0.36), transparent);
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  width: min(520px, calc(100vw - 32px));
  min-height: min(690px, calc(100vh - 48px));
  padding: 36px 44px 50px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.74));
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.login-logo {
  display: block;
  width: min(340px, 88%);
  height: auto;
  margin: 0 auto;
}

.login-form {
  display: grid;
  gap: 26px;
  width: 100%;
  margin-top: 76px;
}

.login-password-field {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  min-height: 56px;
  padding: 0 13px 0 15px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.login-password-field:focus-within {
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.login-password-field > .material-symbols-rounded {
  color: #475569;
  font-size: 1.45rem;
}

.login-password-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #334155;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 500;
}

.login-password-field input::placeholder {
  color: #64748b;
}

.login-password-field button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: transparent;
  cursor: pointer;
}

.login-password-field button:hover,
.login-password-field button:focus-visible {
  color: #0f172a;
  background: #f1f5f9;
  outline: 0;
}

.login-password-field button .material-symbols-rounded {
  font-size: 1.34rem;
}

.login-error {
  min-height: 16px;
  margin: -14px 6px -8px;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, #129cf3 0%, #0492e8 100%);
  box-shadow: 0 10px 24px rgba(4, 146, 232, 0.22);
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 900;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), filter 160ms var(--ease);
}

.login-submit:hover,
.login-submit:focus-visible {
  box-shadow: 0 14px 28px rgba(4, 146, 232, 0.3);
  filter: saturate(1.04);
  outline: 0;
  transform: translateY(-1px);
}

.page-shell {
  width: min(1440px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  margin: 0 auto;
  padding: 16px 0 30px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.brand,
.topbar-meta,
.date-pill {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
}

.brand-mark,
.section-icon,
.trigger-icon,
.panel-lead-icon,
.detail-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #2563eb 56%, #7c3aed);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  font-size: 1.08rem;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.brand-copy span,
.date-pill {
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 500;
}

.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.date-pill {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.profile-pill .material-symbols-rounded {
  font-size: 0.98rem;
}

.profile-pill.is-pai {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.profile-pill.is-mae {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

.logout-form {
  margin: 0;
  flex: 0 0 auto;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition:
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    background 160ms var(--ease),
    box-shadow 160ms var(--ease),
    transform 160ms var(--ease);
}

.logout-button:hover,
.logout-button:focus-visible {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.logout-button .material-symbols-rounded {
  font-size: 1.04rem;
}

.workspace {
  padding-top: 14px;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.section-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: clip;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet), #f59e0b);
}

.section-card:first-child {
  position: sticky;
  top: 86px;
}

.coordination-card {
  align-self: start;
}

.section-trigger {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.76), rgba(255, 255, 255, 0.96));
  text-align: left;
  cursor: pointer;
}

.section-trigger:hover,
.accordion-trigger:hover {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.section-trigger:focus-visible,
.accordion-trigger:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: -3px;
}

.section-icon {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
  font-size: 1.05rem;
}

.section-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.section-title small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
}

.section-chevron,
.trigger-chevron {
  justify-self: end;
  color: var(--muted);
  font-size: 1.16rem;
  transition: transform 180ms var(--ease), color 180ms var(--ease);
}

.section-card.is-open .section-chevron,
.accordion-item.is-open .trigger-chevron {
  color: var(--blue);
  transform: rotate(180deg);
}

.section-panel,
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease);
}

.section-card.is-open > .section-panel,
.accordion-item.is-open > .accordion-panel {
  grid-template-rows: 1fr;
}

.section-panel-inner,
.panel-inner {
  min-height: 0;
  overflow: hidden;
}

.section-panel-inner {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line-soft);
}

.stats-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.stat-item {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid var(--stat-line, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, var(--stat-soft, #f8fafc));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.stat-item.is-conversas {
  --stat-color: var(--blue);
  --stat-soft: #eff6ff;
  --stat-line: #bfdbfe;
}

.stat-item.is-agenda {
  --stat-color: var(--violet);
  --stat-soft: #f5f3ff;
  --stat-line: #ddd6fe;
}

.stat-item.is-despesas {
  --stat-color: var(--amber);
  --stat-soft: #fffbeb;
  --stat-line: #fde68a;
}

.stat-item.is-lembretes {
  --stat-color: var(--green);
  --stat-soft: #f0fdf4;
  --stat-line: #bbf7d0;
}

.stat-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--stat-color, var(--blue));
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.stat-head > span,
.stat-detail {
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 600;
}

.stat-head > span {
  min-width: 0;
}

.stat-value {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.1;
  font-weight: 900;
  max-width: 100%;
  justify-self: start;
}

.stat-detail {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.stat-badge.is-pai {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.stat-badge.is-mae {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

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

.stat-part {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
}

.stat-part small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stat-part strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.stat-part.is-pai {
  border-color: #bfdbfe;
}

.stat-part.is-pai strong {
  color: #1d4ed8;
}

.stat-part.is-mae {
  border-color: #bbf7d0;
}

.stat-part.is-mae strong {
  color: #15803d;
}

.accordion {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.accordion-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
  overflow: clip;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.accordion-item.is-open {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.10);
}

.accordion-trigger {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 0;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.trigger-icon {
  width: 38px;
  height: 38px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #dbeafe;
  font-size: 1rem;
}

.accordion-item:nth-child(2) .trigger-icon {
  color: var(--violet);
  background: var(--violet-soft);
  border-color: #ddd6fe;
}

.accordion-item:nth-child(3) .trigger-icon {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #fde68a;
}

.accordion-item:nth-child(4) .trigger-icon {
  color: var(--green);
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.trigger-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trigger-copy strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.trigger-copy small {
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
}

.trigger-metric {
  min-width: max-content;
  padding: 6px 8px;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #92400e;
  background: var(--amber-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.panel-lead,
.panel-layout {
  margin: 0 10px 10px;
}

.panel-lead {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 12px 0 3px;
  border-top: 1px solid var(--line-soft);
}

.panel-lead-icon {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 1rem;
}

.panel-lead h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.14rem;
  line-height: 1.18;
  font-weight: 800;
}

.panel-lead p {
  max-width: 860px;
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.55;
}

.panel-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.primary-brief,
.detail-item,
.timeline-item,
.expense-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.primary-brief {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.primary-brief > span {
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-brief h4 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.18;
  font-weight: 800;
}

.primary-brief p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.58;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag-row small {
  padding: 4px 6px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  background: var(--amber-soft);
  font-size: 0.64rem;
  font-weight: 800;
}

.detail-list,
.timeline-list,
.expense-list {
  display: grid;
  gap: 7px;
}

.detail-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  min-height: 66px;
  padding: 10px;
}

.detail-item > span {
  width: 34px;
  height: 34px;
  color: var(--violet);
  background: var(--violet-soft);
  border: 1px solid #ddd6fe;
  font-size: 0.96rem;
}

.detail-item strong,
.timeline-item strong,
.expense-row strong {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.detail-item p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 0.78rem;
  line-height: 1.42;
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
}

.timeline-item time {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.95rem;
  font-weight: 800;
}

.timeline-item span {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 500;
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto minmax(110px, auto);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 10px;
}

.expense-row span,
.expense-row small {
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.expense-row small {
  color: var(--muted);
}

.expense-row em {
  justify-self: end;
  padding: 4px 6px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  background: var(--amber-soft);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
}

.agenda-board {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 10px;
  margin: 10px;
  align-items: start;
}

.calendar-card,
.agenda-side {
  min-width: 0;
}

.calendar-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
}

.calendar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: flex-start;
  gap: 10px;
}

.calendar-head span,
.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.calendar-head h4 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius);
  color: var(--violet);
  background: var(--violet-soft);
  text-decoration: none;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.calendar-nav a:hover {
  transform: translateY(-1px);
  border-color: #c4b5fd;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

.calendar-nav .material-symbols-rounded {
  font-size: 1.05rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  background: #ffffff;
  font-size: 0.68rem;
  font-weight: 850;
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.legend-item.is-pai {
  border-color: #bfdbfe;
  color: var(--blue);
  background: #eff6ff;
}

.legend-item.is-mae {
  border-color: #bbf7d0;
  color: var(--green);
  background: #f0fdf4;
}

.agenda-filter {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(170px, 1fr);
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
}

.agenda-filter label {
  display: grid;
  gap: 6px;
}

.agenda-filter label > span,
.presence-result > span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.agenda-filter input {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
}

.agenda-filter input:focus {
  border-color: #fdba74;
  outline: 3px solid #ffedd5;
}

.presence-result {
  display: grid;
  gap: 4px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.presence-result strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
}

.presence-result.is-pai {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.presence-result.is-pai strong {
  color: #1d4ed8;
}

.presence-result.is-mae {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.presence-result.is-mae strong {
  color: #15803d;
}

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

.calendar-weekdays {
  gap: 5px;
  padding-inline: 2px;
}

.calendar-weekdays span {
  text-align: center;
}

.calendar-grid {
  gap: 5px;
}

.calendar-day {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-height: 94px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.calendar-day::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
}

.calendar-day.is-empty {
  border-style: dashed;
  background: #f8fafc;
}

.calendar-day.has-events {
  cursor: pointer;
}

.calendar-day.is-pai {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.calendar-day.is-mae {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.calendar-day.is-pai::before {
  background: var(--blue);
}

.calendar-day.is-mae::before {
  background: var(--green);
}

.calendar-day.is-today {
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.24), 0 10px 22px rgba(15, 23, 42, 0.08);
}

.calendar-day.is-selected {
  outline: 2px solid #f97316;
  outline-offset: 1px;
}

.calendar-day.is-today .calendar-day-top strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.26);
}

.calendar-day-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.calendar-day-top strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.calendar-day-top span {
  padding: 3px 5px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 900;
}

.calendar-day.is-pai .calendar-day-top span {
  color: #1d4ed8;
  background: #dbeafe;
}

.calendar-day.is-mae .calendar-day-top span {
  color: #15803d;
  background: #dcfce7;
}

.calendar-events {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.calendar-event {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 36px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.64rem;
  font-weight: 850;
}

.calendar-event strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.64rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: 0.6rem;
  font-weight: 800;
}

.calendar-event.is-pai {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.calendar-event.is-mae {
  border-color: #bbf7d0;
  color: #15803d;
}

.calendar-day.has-reminders {
  box-shadow: inset 0 -3px 0 rgba(124, 58, 237, 0.18);
}

.calendar-day.is-today.has-reminders {
  box-shadow:
    0 0 0 2px rgba(249, 115, 22, 0.24),
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 -3px 0 rgba(124, 58, 237, 0.18);
}

.calendar-reminders {
  display: flex;
  justify-content: flex-end;
}

.calendar-reminder-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid #fbbf24;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.64rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.18);
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.calendar-reminder-chip:hover {
  background: #fde68a;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.24);
  transform: translateY(-1px);
}

.calendar-reminder-chip:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.calendar-reminder-chip .material-symbols-rounded {
  font-size: 0.9rem;
}

.calendar-reminder-chip.is-sent {
  border-color: #fbbf24;
  color: #92400e;
  background: #fef3c7;
}

.calendar-reminder-chip.is-today {
  border-color: #fbbf24;
  color: #92400e;
  background: #fef3c7;
}

.calendar-reminder-chip.is-overdue {
  border-color: #fbbf24;
  color: #92400e;
  background: #fef3c7;
}

.agenda-side {
  display: grid;
  gap: 8px;
}

.agenda-brief {
  min-height: 0;
}

.reminders-board {
  display: grid;
  gap: 14px;
  margin: 12px;
}

.reminder-topline {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(280px, 0.82fr);
  gap: 12px;
  align-items: stretch;
}

.reminder-brief {
  min-height: 100%;
}

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

.reminder-summary-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reminder-summary-card > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  font-size: 1.08rem;
}

.reminder-summary-card strong {
  display: block;
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1;
}

.reminder-summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 800;
}

.reminder-summary-card.is-pending > span {
  color: var(--violet);
  background: var(--violet-soft);
}

.reminder-summary-card.is-sent > span {
  color: #15803d;
  background: #dcfce7;
}

.reminder-summary-card.is-overdue > span {
  color: #b91c1c;
  background: #fee2e2;
}

.reminder-controls {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reminder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reminder-tabs button,
.reminder-type-filter select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 850;
}

.reminder-tabs button {
  cursor: pointer;
  padding: 0 9px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.reminder-tabs button[aria-pressed="true"] {
  border-color: #c4b5fd;
  color: var(--violet);
  background: var(--violet-soft);
}

.reminder-type-filter {
  display: grid;
  min-width: 190px;
  gap: 4px;
}

.reminder-type-filter span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reminder-type-filter select {
  width: 100%;
  padding: 0 9px;
}

.reminder-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.reminder-column {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.reminder-column > header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reminder-column > header > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 1rem;
}

.reminder-column[data-reminder-section="sent"] > header > span {
  color: #15803d;
  background: #dcfce7;
}

.reminder-column header strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.reminder-column header small {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 700;
}

.reminder-list {
  display: grid;
  gap: 7px;
}

.reminder-card {
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reminder-card[hidden],
.reminder-column[hidden],
.reminder-empty[hidden],
.reminder-section-empty[hidden] {
  display: none;
}

.reminder-card.is-overdue {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff, #fff1f2);
}

.reminder-card.is-today {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff, #fff7ed);
}

.reminder-card.is-sent {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.reminder-card-head,
.reminder-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.reminder-status,
.reminder-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.reminder-status {
  color: var(--violet);
  background: var(--violet-soft);
}

.reminder-status.is-sent {
  color: #15803d;
  background: #dcfce7;
}

.reminder-status.is-overdue {
  color: #b91c1c;
  background: #fee2e2;
}

.reminder-status.is-today {
  color: #c2410c;
  background: #ffedd5;
}

.reminder-type {
  color: #92400e;
  background: var(--amber-soft);
}

.reminder-card > strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.26;
}

.reminder-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.86rem;
  line-height: 1.46;
}

.reminder-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.reminder-empty,
.reminder-section-empty {
  margin: 0;
}

.despesas-wrap {
  margin: 10px;
}

.expense-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.receipt-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #ffffff;
}

.receipt-filter button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.receipt-filter button:hover {
  color: var(--text);
  background: #f8fafc;
  border-color: #e5e7eb;
}

.receipt-filter button[aria-pressed="true"] {
  color: var(--text);
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
}

.period-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.period-tabs button:hover {
  color: var(--text);
  background: #f8fafc;
  border-color: #e5e7eb;
}

.period-tabs button[aria-pressed="true"] {
  color: var(--violet);
  background: #ffffff;
  border-color: #ddd6fe;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.period-tabs button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 4px;
  left: 9px;
  height: 2px;
  border-radius: 999px;
  background: var(--violet);
  opacity: 0.76;
}

.period-tabs button[data-period-option="custom"] {
  color: #334155;
}

.period-tabs button[data-period-option="custom"][aria-pressed="true"] {
  color: var(--text);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.period-tabs button[data-period-option="custom"][aria-pressed="true"]::after {
  background: #64748b;
}

.custom-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 8px;
}

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

.custom-period label {
  display: grid;
  gap: 5px;
}

.custom-period span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.custom-period input {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
}

.custom-period input:focus {
  border-color: #c4b5fd;
  outline: 3px solid #f5f3ff;
}

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

.expense-total-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  overflow: hidden;
}

.expense-total-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--violet);
}

.expense-total-card:nth-child(2)::before {
  background: #f59e0b;
}

.expense-total-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius);
  color: var(--violet);
  background: #faf5ff;
  font-size: 0.96rem;
}

.expense-total-card:nth-child(2) .expense-total-icon {
  border-color: #fde68a;
  color: #b45309;
  background: #fffbeb;
}

.expense-total-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.expense-total-card div > span,
.expense-total-card small {
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 800;
}

.expense-total-card strong {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.1;
  font-weight: 900;
}

.expense-total-card small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 650;
}

.despesas-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.88);
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: #bfdbfe transparent;
  -webkit-overflow-scrolling: touch;
}

.despesas-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.despesas-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
}

.despesas-table th,
.despesas-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.despesas-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.despesas-table td {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.despesas-table tbody tr {
  transition: background 160ms var(--ease);
}

.despesas-table tbody tr:hover {
  background: #f8fafc;
}

.despesas-table tbody tr[hidden] {
  display: none;
}

.despesas-table tbody tr.is-overdue td {
  background: #fff1f2;
}

.despesas-table tbody tr.is-overdue:hover td {
  background: #ffe4e6;
}

.despesas-table tbody tr.is-awaiting-authorization td {
  background: #fffbeb;
}

.despesas-table tbody tr.is-awaiting-authorization:hover td {
  background: #fef3c7;
}

.despesas-table tbody tr:last-child td {
  border-bottom: 0;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 1.08rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.receipt-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 72px;
}

.receipt-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.receipt-action.has-receipt {
  --receipt-color: #2563eb;
  --receipt-bg: #eff6ff;
  --receipt-border: #bfdbfe;
  border: 1px solid var(--receipt-border);
  color: var(--receipt-color);
  background: var(--receipt-bg);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
}

.receipt-action.has-receipt.is-mae {
  --receipt-color: #059669;
  --receipt-bg: #ecfdf5;
  --receipt-border: #bbf7d0;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.1);
}

.receipt-action.has-receipt.is-pai {
  --receipt-color: #2563eb;
  --receipt-bg: #eff6ff;
  --receipt-border: #bfdbfe;
}

.receipt-action.no-receipt {
  --receipt-color: #2563eb;
  --receipt-bg: #f8fafc;
  --receipt-border: #dbeafe;
  border: 1px solid var(--receipt-border);
  color: var(--receipt-color);
  background: var(--receipt-bg);
  cursor: default;
  opacity: 0.62;
}

.receipt-action.no-receipt.is-mae {
  --receipt-color: #059669;
  --receipt-bg: #f8fafc;
  --receipt-border: #bbf7d0;
}

.receipt-action.no-receipt.is-pai {
  --receipt-color: #2563eb;
  --receipt-bg: #f8fafc;
  --receipt-border: #bfdbfe;
}

.receipt-action.has-receipt:hover {
  transform: translateY(-1px);
  border-color: var(--receipt-color);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.receipt-action .receipt-image {
  font-size: 1rem;
}

.receipt-action .receipt-check {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border: 2px solid var(--receipt-bg);
  border-radius: 999px;
  color: #16a34a;
  background: #ffffff;
  font-size: 0.62rem;
  font-variation-settings: "FILL" 1;
}

.due-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.74rem;
  font-weight: 850;
}

.despesas-table tbody tr.is-overdue .due-pill {
  border-color: #fecdd3;
  color: #be123c;
  background: #ffe4e6;
}

.expense-description {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.expense-description strong {
  color: var(--text);
  font-weight: 850;
}

.authorization-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  color: #334155;
  background: #f8fafc;
}

.authorization-pill > .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 1.1rem;
  color: #64748b;
}

.authorization-pill span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.authorization-pill strong,
.authorization-pill small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorization-pill strong {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 850;
}

.authorization-pill small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
}

.authorization-pill.is-ok {
  border-color: #bbf7d0;
  color: #047857;
  background: #ecfdf5;
}

.authorization-pill.is-ok > .material-symbols-rounded {
  color: #059669;
  font-variation-settings: "FILL" 1;
}

.authorization-pill.is-pai {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.authorization-pill.is-pai > .material-symbols-rounded {
  color: #2563eb;
}

.authorization-pill.is-mae {
  border-color: #bbf7d0;
  color: #047857;
  background: #ecfdf5;
}

.authorization-pill.is-mae > .material-symbols-rounded {
  color: #059669;
}

.authorization-pill.is-ambos {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.authorization-pill.is-ambos > .material-symbols-rounded {
  color: #d97706;
}

.image-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius);
  color: var(--violet);
  background: var(--violet-soft);
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.image-action:hover {
  transform: translateY(-1px);
  border-color: #c4b5fd;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.14);
}

.observation-text {
  display: inline-block;
  width: 300px;
  max-width: 300px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  color: var(--text-2);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 32px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), color 160ms var(--ease);
}

.observation-text:hover {
  border-color: #c4b5fd;
  color: var(--violet);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.1);
}

.observation-empty {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed #bfdbfe;
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--blue-soft);
  font-size: 0.92rem;
  font-weight: 650;
}

.period-empty {
  margin-top: 12px;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-modal.is-open {
  display: flex;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 100%);
  height: min(88vh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.34);
  overflow: hidden;
}

.image-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.image-modal-toolbar > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.image-modal-toolbar > div:first-child > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.image-modal-toolbar > div:first-child > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-modal-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.image-modal-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: var(--radius);
  color: var(--text);
  background: #f8fafc;
  cursor: pointer;
}

.image-modal-tools button:hover {
  background: #eef2ff;
  border-color: #ddd6fe;
}

.image-modal-close {
  color: #ffffff !important;
  background: #111827 !important;
}

.image-zoom-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-color: #eef2f7;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  touch-action: none;
  cursor: grab;
}

.image-zoom-stage:active {
  cursor: grabbing;
}

.image-modal-dialog img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 80ms linear;
  user-select: none;
  -webkit-user-drag: none;
}

.appointment-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.observation-modal {
  position: fixed;
  inset: 0;
  z-index: 112;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.day-reminder-modal {
  position: fixed;
  inset: 0;
  z-index: 111;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.day-reminder-modal.is-open {
  display: flex;
}

.day-reminder-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.day-reminder-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  max-height: min(78vh, 680px);
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  overflow: auto;
}

.day-reminder-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, var(--violet));
}

.day-reminder-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  background: #ffffff;
  cursor: pointer;
}

.day-reminder-modal-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 44px;
}

.day-reminder-modal-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #92400e;
  background: #fef3c7;
  font-size: 1.38rem;
}

.day-reminder-modal-head small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.day-reminder-modal-head h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.2;
}

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

.day-reminder-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.day-reminder-item.is-overdue {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff, #fff1f2);
}

.day-reminder-item.is-today {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff, #fff7ed);
}

.day-reminder-item.is-sent {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.day-reminder-item-head,
.day-reminder-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.day-reminder-status,
.day-reminder-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.day-reminder-status {
  color: var(--violet);
  background: var(--violet-soft);
}

.day-reminder-status.is-sent {
  color: #15803d;
  background: #dcfce7;
}

.day-reminder-status.is-overdue {
  color: #b91c1c;
  background: #fee2e2;
}

.day-reminder-status.is-today {
  color: #c2410c;
  background: #ffedd5;
}

.day-reminder-type {
  color: #92400e;
  background: var(--amber-soft);
}

.day-reminder-item > strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.26;
}

.day-reminder-item p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.86rem;
  line-height: 1.46;
}

.day-reminder-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.observation-modal.is-open {
  display: flex;
}

.observation-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.observation-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  max-height: min(78vh, 680px);
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  overflow: auto;
}

.observation-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--violet), var(--yellow), var(--blue));
}

.observation-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  background: #ffffff;
  cursor: pointer;
}

.observation-modal-head {
  display: grid;
  gap: 4px;
  padding-right: 44px;
}

.observation-modal-head span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.observation-modal-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
}

.observation-modal-dialog p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.55;
  white-space: pre-wrap;
}

.appointment-modal.is-open {
  display: flex;
}

.appointment-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.appointment-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
}

.appointment-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--blue), var(--green), #f97316);
}

.appointment-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  background: #ffffff;
  cursor: pointer;
}

.appointment-modal-head {
  display: grid;
  gap: 4px;
  padding-right: 44px;
}

.appointment-modal-head span,
.appointment-detail-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.appointment-modal-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.18;
}

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

.appointment-detail-grid > div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.appointment-detail-grid strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
}

.appointment-notes {
  margin: 0;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  color: #9a3412;
  background: #fff7ed;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.appointment-notes[hidden] {
  display: none;
}

@media (max-width: 1080px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .section-card:first-child {
    position: static;
  }

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

  .agenda-board {
    grid-template-columns: 1fr;
  }

  .reminder-topline,
  .reminder-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 13px;
  }

  .page-shell {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding-top: 8px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }

  .date-pill {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-pill,
  .logout-form {
    flex: 0 0 auto;
  }

  .stats-list,
  .panel-layout {
    grid-template-columns: 1fr;
  }

  .stat-item {
    grid-template-columns: 1fr;
  }

  .stat-value {
    justify-self: start;
    white-space: normal;
  }

  .accordion-trigger {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
  }

  .trigger-icon {
    width: 36px;
    height: 36px;
  }

  .trigger-metric {
    grid-column: 2 / 3;
    grid-row: 2;
    justify-self: start;
  }

  .trigger-chevron {
    grid-column: 3;
    grid-row: 1;
  }

  .panel-lead {
    grid-template-columns: 1fr;
  }

  .expense-row {
    grid-template-columns: 1fr auto;
  }

  .expense-row em {
    justify-self: start;
  }

  .agenda-board {
    margin: 8px;
  }

  .calendar-card {
    padding: 8px;
  }

  .calendar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calendar-legend {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .agenda-filter {
    grid-template-columns: 1fr;
  }

  .reminder-controls {
    display: grid;
  }

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

  .reminder-type-filter {
    min-width: 0;
  }

  .calendar-grid,
  .calendar-weekdays {
    gap: 3px;
  }

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

  .calendar-day-top {
    display: grid;
    gap: 4px;
  }

  .calendar-day-top span,
  .calendar-event {
    width: max-content;
    max-width: 100%;
  }

  .calendar-event {
    width: 100%;
  }

  .calendar-reminders {
    justify-content: flex-start;
  }

  .despesas-wrap {
    margin: 8px;
  }

  .period-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .period-tabs button {
    width: 100%;
    padding-inline: 6px;
  }

  .expense-totals {
    grid-template-columns: 1fr;
  }

  .despesas-table {
    min-width: 900px;
  }
}

@media (max-width: 460px) {
  .topbar-meta {
    gap: 4px;
  }

  .date-pill,
  .profile-pill {
    min-height: 32px;
    padding-inline: 7px;
    font-size: 0.68rem;
  }

  .logout-button {
    width: 32px;
    height: 32px;
  }

  .section-panel-inner {
    padding: 0 10px 10px;
  }

  .section-trigger,
  .accordion-trigger {
    padding: 9px;
  }

  .panel-lead,
  .panel-layout {
    margin-inline: 10px;
  }

  .custom-period {
    grid-template-columns: 1fr;
  }

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

  .calendar-day-top strong {
    font-size: 0.78rem;
  }

  .calendar-day-top span {
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .calendar-event {
    min-height: 30px;
    padding-inline: 5px;
    font-size: 0.6rem;
  }

  .calendar-event strong {
    font-size: 0.6rem;
  }

  .calendar-event small {
    font-size: 0.62rem;
  }

  .calendar-reminder-chip {
    min-width: 26px;
    height: 20px;
    padding-inline: 5px;
    font-size: 0.64rem;
  }

  .calendar-reminder-chip .material-symbols-rounded {
    font-size: 0.78rem;
  }

  .reminders-board {
    margin: 8px;
  }

  .reminder-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reminder-tabs button {
    width: 100%;
    padding-inline: 6px;
  }

  .appointment-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body.login-body {
    overflow: auto;
  }

  .login-screen {
    min-height: 100svh;
    padding: 14px;
  }

  .login-card {
    min-height: min(620px, calc(100svh - 28px));
    padding: 28px 22px 34px;
    border-radius: 20px;
  }

  .login-logo {
    width: min(285px, 92%);
  }

  .login-form {
    gap: 20px;
    margin-top: 52px;
  }

  .login-password-field {
    min-height: 50px;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    padding-inline: 12px;
  }

  .login-password-field input {
    font-size: 0.98rem;
  }

  .login-submit {
    min-height: 50px;
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .login-card {
    padding-inline: 22px;
  }

  .login-form {
    margin-top: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
