/* Portal App Measure — home com agenda do dia */

.brand-text {
  display: inline-flex;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 18px;
}

.brand-text em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

/* —— Home shell —— */
/* --portal-max / --portal-inline vêm de :root (measure.css) */

.portal-home {
  position: relative;
  margin: 0;
  padding: 0 0 9.6px;
  overflow-x: clip;
  overflow: clip;
  max-width: 100%;
  isolation: isolate;
  min-height: calc(100dvh - 88px);
  --portal-block-gap: clamp(20px, 3vw, 32px);
  --portal-section-gap: clamp(28px, 4vw, 48px);
}

.portal-home {
  background: var(--portal-wash);
}

.account-page-wash {
  background:
    radial-gradient(80% 90% at 8% 10%, color-mix(in srgb, var(--accent, var(--lime)) 22%, transparent), transparent 58%),
    radial-gradient(70% 80% at 92% 20%, color-mix(in srgb, var(--accent, var(--lime)) 12%, transparent), transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, var(--card)) 0%, var(--bg) 100%);
}

.portal-home > .portal-hero-glow-alt {
  display: none;
}

html:has(.portal-home),
body:has(.portal-home),
html:has(.account-page-wash),
body:has(.account-page-wash) {
  overflow-x: hidden;
  max-width: 100%;
}

.page.wide:has(.portal-home),
.page.wide:has(.account-page-wash) {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 16px;
  overflow-x: hidden;
}

.portal-home > .portal-hero,
.portal-home > .portal-alert,
.portal-home > .portal-section,
.portal-home > .portal-foot {
  position: relative;
  z-index: 1;
}

.portal-home > .portal-alert,
.portal-home > .portal-section:not(.portal-section--modules),
.portal-home > .portal-foot {
  max-width: var(--portal-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--portal-inline);
  padding-right: var(--portal-inline);
}

/* Evita padding duplo: .portal-foot já define o inset da linha */
.portal-home > .portal-foot {
  box-sizing: border-box;
  width: 100%;
}

.portal-home > .portal-section--modules {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* —— Hero —— */
.portal-hero {
  --hero-title-size: clamp(40px, 5.5vw, 72px);
  position: relative;
  padding: clamp(16px, 2.4vw, 28px) 0 0;
  margin-bottom: 0;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
}

.portal-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--portal-block-gap);
  max-width: var(--portal-max);
  margin: 0 auto;
  padding-left: var(--portal-inline);
  padding-right: var(--portal-inline);
}

.portal-hero-glow {
  position: absolute;
  width: min(520px, 58vw);
  height: min(520px, 58vw);
  top: -18%;
  left: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--lime)) 32%, transparent), transparent 68%);
  filter: blur(36px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.portal-hero-glow-alt {
  top: auto;
  left: auto;
  right: -10%;
  bottom: -28%;
  width: min(420px, 48vw);
  height: min(420px, 48vw);
  opacity: 0.38;
}

.portal-hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
  opacity: 0.55;
}

.portal-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 100%;
  padding: 0;
  animation: portal-rise 0.55s ease both;
}

.portal-hero-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.portal-hero-greeting {
  --hero-title-size: clamp(40px, 5.5vw, 72px);
  display: flex;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
}

.portal-hero-avatar {
  --hero-avatar-size: calc(var(--hero-title-size) * 1.24 + 2px);
  width: var(--hero-avatar-size);
  height: var(--hero-avatar-size);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent, #0b6e6e) 78%, var(--ink));
  color: #fff;
  font-family: var(--display);
  font-size: calc(var(--hero-title-size) * 0.34);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
}

.portal-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.portal-hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-family: var(--display);
  font-size: var(--hero-title-size);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.portal-hello {
  display: block;
  font-size: 0.36em;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--muted);
}

.portal-hello-name {
  display: block;
  width: fit-content;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ink) 55%, color-mix(in srgb, var(--accent, var(--lime)) 55%, var(--ink)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-api-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 0.18em;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
}

.portal-api-status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.portal-api-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--card) 70%, transparent);
}

.portal-api-dot--ok {
  background: #22c55e;
}

.portal-api-dot--err {
  background: #ef4444;
}

.portal-api-status-item--tasks {
  padding-left: 2px;
}

.portal-agenda-overdue {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.portal-agenda-overdue strong {
  font-size: 1.05em;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.portal-agenda-overdue:hover {
  color: var(--ink);
}

.portal-agenda-overdue:hover strong {
  color: var(--accent, var(--lime));
}

.home-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.home-widgets[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.home-widgets[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-widgets[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* —— Widgets da home —— */
.home-widget,
.agenda-today {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 460px;
  padding: 22px 20px 16px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--accent, var(--lime)));
  box-shadow:
    0 24px 60px color-mix(in srgb, var(--ink) 8%, transparent),
    0 1px 0 color-mix(in srgb, #fff 50%, transparent) inset;
  backdrop-filter: blur(18px);
  animation: portal-rise 0.65s ease 0.08s both;
  overflow: hidden;
}

.home-widget::before,
.agenda-today::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--lime)), color-mix(in srgb, var(--accent, var(--lime)) 20%, transparent));
}

.home-widget-head,
.agenda-today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.home-widget-eyebrow,
.agenda-today-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

.home-widget-head h2,
.agenda-today-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.home-widget-date,
.agenda-today-date {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.home-widget-date-count {
  font: inherit;
  color: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.home-widget-stats,
.agenda-today-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.home-widget-stats strong,
.agenda-today-stats strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.home-widget-stats-done,
.agenda-today-stats-done {
  color: color-mix(in srgb, var(--lime) 70%, var(--muted));
}

.home-widget-list,
.agenda-today-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.home-widget-list > li + li,
.agenda-today-list > li + li {
  border-top: 1px solid var(--line);
}

.home-widget-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.agenda-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.home-widget-list > li:first-child .agenda-item,
.agenda-today-list > li:first-child .agenda-item {
  padding-top: 4px;
}

.agenda-item:hover {
  background: transparent;
}

.agenda-item.is-done {
  opacity: 0.55;
}

.agenda-item.is-done .agenda-item-main strong {
  text-decoration: line-through;
}

.agenda-item-overdue {
  color: var(--danger, #b42318);
  font-weight: 600;
}

.agenda-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--item-color, var(--lime));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--item-color, var(--lime)) 22%, transparent);
}

.agenda-item-main {
  min-width: 0;
}

.agenda-item-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.agenda-item-time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.agenda-item-main strong {
  display: block;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.agenda-item-kind {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agenda-item-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: var(--charcoal);
  background: var(--lime);
}

.home-widget-empty,
.agenda-today-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px 8px;
}

.home-widget-empty p,
.agenda-today-empty p {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.home-widget-hint,
.agenda-today-hint {
  color: var(--muted) !important;
  font-size: 13px !important;
}

.home-widget--finance .home-widget-hint {
  margin: 8px 2px 0;
}

.home-widget-btn,
a.home-widget-btn {
  margin-top: 0;
  width: max-content;
  max-width: 100%;
  height: 27.6px;
  padding: 0 15px;
  text-decoration: none;
  background: var(--accent, var(--lime));
  border-color: var(--accent, var(--lime));
  color: var(--accent-ink, var(--charcoal, #121212));
  font-family: var(--display);
  font-size: 10.35px;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: none;
}

.home-widget-btn:hover,
a.home-widget-btn:hover {
  background: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  color: var(--accent-ink, var(--charcoal, #121212));
  transform: none;
}

.home-widget-foot,
.agenda-today-foot {
  margin-top: auto;
  padding-top: 12px;
  flex-shrink: 0;
  border-top: none;
}

.home-widget-foot .home-widget-btn {
  margin-top: 0;
}

.home-widget-finance {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.home-widget-finance-chart {
  width: 100%;
  margin: 4px 0 6px;
}

.home-widget-finance-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.home-widget-finance-chart text {
  font-size: 9px;
  font-weight: 600;
  fill: var(--muted);
}

.home-widget-finance-chart-zero {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.home-widget-finance--compact {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.home-widget-finance--compact li {
  padding: 8px 0;
}

.home-widget-finance--compact strong {
  font-size: 15px;
}

.home-widget-finance li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.home-widget-finance li:first-child {
  padding-top: 4px;
}

.home-widget-finance li + li {
  border-top: 1px solid var(--line);
}

.home-widget-finance span {
  font-size: 13px;
  color: var(--muted);
}

.home-widget-finance-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.home-widget-finance strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.home-widget-finance-delta {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.home-widget-finance-delta.is-up {
  color: var(--ok, #067647);
}

.home-widget-finance-delta.is-down {
  color: var(--danger, #b42318);
}

.home-widget-finance .is-positive strong {
  color: #2563eb;
}

.home-widget-finance .is-negative strong {
  color: #ef4444;
}

.home-widget-finance.home-widget-finance--columns {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}

.home-widget-finance--columns li,
.home-widget-finance--columns li:first-child {
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 4px 8px;
  text-align: center;
}

.home-widget-finance--columns li + li {
  border-top: 0;
  border-left: 1px solid var(--line);
}

.home-widget-finance--columns li:first-child {
  padding-left: 0;
}

.home-widget-finance--columns li:last-child {
  padding-right: 0;
}

.home-widget-finance--columns .home-widget-finance-value {
  align-items: center;
  max-width: 100%;
}

.home-widget-finance--columns strong {
  max-width: 100%;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-widget-records {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.home-widget-records > li + li {
  border-top: 1px solid var(--line);
}

.home-widget-record {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
}

.home-widget-records > li:first-child .home-widget-record {
  padding-top: 4px;
}

.home-widget-record:hover {
  background: transparent;
}

.home-widget-record strong {
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-widget-record span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-widget-record.is-positive strong {
  color: var(--ok, #067647);
}

.home-widget-record.is-negative strong {
  color: var(--danger, #b42318);
}

.home-widget-empty--inline {
  flex: 0 0 auto;
  padding: 4px 0 0;
}

.home-widget-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.home-widget-notes > li + li {
  border-top: 1px solid var(--line);
}

.home-note {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
}

.home-widget-notes > li:first-child .home-note {
  padding-top: 4px;
}

.home-note:hover {
  background: transparent;
}

.home-note strong {
  font-size: 14px;
  font-weight: 650;
}

.home-note span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.home-widget-social-chart {
  flex: 0 0 auto;
  width: 100%;
  margin: 4px 0 8px;
  --social-chart-views: var(--accent, var(--lime, #d4ff3b));
  --social-chart-reach: #2563eb;
}

.home-widget-social-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.home-widget-social-chart text {
  font-size: 9px;
  font-weight: 600;
  fill: var(--muted);
}

.home-widget-social-chart-base {
  stroke: var(--line);
  stroke-width: 1;
}

.home-widget-social-chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.home-widget-social-chart-line.is-views {
  stroke: var(--social-chart-views);
}

.home-widget-social-chart-line.is-reach {
  stroke: var(--social-chart-reach);
}

.home-widget-social-chart-area.is-views {
  fill: color-mix(in srgb, var(--social-chart-views) 16%, transparent);
}

.home-widget-social-chart-area.is-reach {
  fill: color-mix(in srgb, var(--social-chart-reach) 12%, transparent);
}

.home-widget-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.home-widget-social-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  padding: 10px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-widget-social-card--post {
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
}

.home-widget-social-card:first-child {
  padding-top: 4px;
}

.home-widget-social-card + .home-widget-social-card {
  border-top: 1px solid var(--line);
}

.home-widget-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 36px;
  min-height: 100%;
}

.home-widget-social-icon .account-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
  border: 0;
  flex-shrink: 0;
  color: var(--ink);
}

.home-widget-social-icon .account-channel-icon svg {
  width: 28px;
  height: 28px;
}

.home-widget-social-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.home-widget-social-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-widget-social-head strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-widget-social-time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.home-widget-social-kind {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-widget-social-kind.is-published {
  color: var(--ok, #067647);
  border-color: var(--ok-line, #abefc6);
  background: var(--ok-bg, #ecfdf3);
}

.home-widget-social-kind.is-scheduled {
  color: #9a7b12;
  border-color: color-mix(in srgb, #d4a017 40%, var(--line));
  background: color-mix(in srgb, #d4a017 12%, transparent);
}

.home-widget-social-channels {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.home-widget-social-channels .account-channel-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.home-widget-social-channels .account-channel-icon svg {
  width: 14px;
  height: 14px;
}

.home-widget-social-channel-name {
  font-size: 12px;
  color: var(--muted);
}

.home-widget-social-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  line-height: 0;
}

.home-widget-social-trend svg {
  width: 14px;
  height: 14px;
}

.home-widget-social-trend.is-up {
  color: var(--status-green, var(--ok, #067647));
}

.home-widget-social-trend.is-down {
  color: var(--status-red, var(--danger, #d92d20));
}

.home-widget-social-line {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.home-widget-social-line strong {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.home-widget-social-sep {
  margin: 0 8px;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.home-widget-social-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--danger, #b42318);
}

.agenda-today-btn {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  font-weight: 700;
}

/* —— Alerts —— */
.portal-alert {
  margin-bottom: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.95rem;
}

.portal-alert--warn {
  border-color: rgba(212, 255, 59, 0.35);
  background: rgba(212, 255, 59, 0.08);
}

/* —— Sections —— */
.portal-section {
  margin-bottom: 40px;
}

.portal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.portal-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.portal-section--center {
  text-align: center;
}

.portal-section--center .portal-section-head {
  justify-content: center;
}

.portal-section--center .shortcuts-row {
  justify-content: center;
}

.portal-section--shortcuts {
  margin-top: var(--portal-section-gap);
  background: transparent;
}

.portal-section--shortcuts .portal-section-head {
  margin-bottom: calc(16px * 0.7);
}

.portal-section--shortcuts .portal-section-head h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* —— Modules stage (cinematic reel) —— */
.portal-section--modules {
  margin-bottom: 0;
}

.modules-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--portal-section-gap) 0 0;
  background: transparent;
}

.modules-stage-glow,
.modules-stage-glow-alt,
.modules-stage-grain {
  display: none;
}

.modules-stage-inner {
  position: relative;
  z-index: 1;
  max-width: var(--portal-max);
  margin: 0 auto;
  padding: 0 var(--portal-inline);
}

.module-reel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.module-scene {
  --scene-pad: clamp(14px, 1.6vw, 18px);
  --module-icon-bg: #3b82f6;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--card) 72%, var(--bg));
  animation: modules-scene-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.04s * var(--scene-i, 0));
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.3s ease;
}

.module-scene[data-module="agenda"] { --module-icon-bg: #3b82f6; }
.module-scene[data-module="autosocial"] { --module-icon-bg: #4f5bd5; }
.module-scene[data-module="propostas"] { --module-icon-bg: #22c55e; }
.module-scene[data-module="engaja"] { --module-icon-bg: #d946ef; }
.module-scene[data-module="finance"] { --module-icon-bg: #f97316; }
.module-scene[data-module="notes"] { --module-icon-bg: #14b8a6; }
.module-scene[data-module="pass"] { --module-icon-bg: #f43f5e; }
.module-scene[data-module="tasks"] { --module-icon-bg: #3b82f6; }
.module-scene[data-module="tools"] { --module-icon-bg: #7c3aed; }

.module-scene-beam {
  position: absolute;
  inset: -10% auto auto -20%;
  width: 90%;
  height: 90%;
  background: radial-gradient(
    circle at 20% 20%,
    color-mix(in srgb, var(--accent, var(--lime)) 28%, transparent),
    transparent 68%
  );
  opacity: 0;
  transform: translate(-8%, -8%) scale(0.92);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.module-scene-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 58%;
  max-width: 156px;
  max-height: 118px;
  color: var(--module-icon-bg, #3b82f6);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    80% 70% at 100% 0%,
    color-mix(in srgb, var(--module-icon-bg, #3b82f6) 22%, transparent),
    transparent 68%
  );
}

.module-scene-corner svg {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  display: block;
}

html[data-theme="light"] .module-scene-corner {
  opacity: 0.62;
}

.module-scene-visual {
  position: relative;
  z-index: 1;
  aspect-ratio: auto;
  overflow: visible;
  display: grid;
  place-items: start;
  padding: var(--scene-pad) var(--scene-pad) 4px;
  background: none;
  border-bottom: 0;
}

.module-scene-visual::before,
.module-scene-visual::after {
  display: none;
}

.module-scene-icon-glass {
  position: relative;
  inset: auto;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: var(--module-icon-bg, #3b82f6);
  border: 0;
  box-shadow:
    0 8px 18px color-mix(in srgb, var(--module-icon-bg, #3b82f6) 38%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.module-scene-icon-glass-glow {
  display: none;
}

.module-scene-icon-glass-shine {
  display: none;
}

.module-scene-icon-glass-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  pointer-events: none;
  z-index: 2;
}

.module-scene-icon {
  position: relative;
  z-index: 3;
  width: 24px;
  height: 24px;
  color: #fff;
  filter: none;
  transition: transform 0.35s ease;
}

@keyframes module-icon-reflect {
  0%,
  18% {
    opacity: 0;
    transform: skewX(-18deg) translateX(0);
  }
  28% {
    opacity: 0.95;
  }
  52% {
    opacity: 0.55;
    transform: skewX(-18deg) translateX(280%);
  }
  62%,
  100% {
    opacity: 0;
    transform: skewX(-18deg) translateX(320%);
  }
}

@keyframes module-icon-glow-breathe {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.78;
    transform: scale(1.08);
  }
}

html[data-theme="dark"] .module-scene-icon {
  color: #fff;
}

html[data-theme="dark"] .module-scene-icon-glass {
  background: var(--module-icon-bg, #3b82f6);
  box-shadow:
    0 8px 18px color-mix(in srgb, var(--module-icon-bg, #3b82f6) 42%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent);
}

.module-scene-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: var(--scene-pad);
  min-height: 124px;
}

.module-scene-index,
.module-scene-copy,
.module-scene-cta {
  position: relative;
  z-index: 1;
}

.module-scene-index {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--faint);
  min-width: 0;
  transition: color 0.25s ease;
}

.module-scene-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.module-scene-title {
  font-family: var(--display);
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), letter-spacing 0.35s ease;
}

.module-scene-desc {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.module-scene-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  justify-self: start;
  width: fit-content;
  max-width: max-content;
  margin-top: auto;
  height: 27.6px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--accent, var(--lime));
  background: var(--accent, var(--lime));
  color: var(--accent-ink, var(--charcoal, #121212));
  font-family: var(--display);
  font-size: 10.35px;
  font-weight: 800;
  letter-spacing: -0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
  box-shadow: none;
}

.module-scene:hover,
.module-scene:focus-visible {
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 42%, var(--line));
  transform: translateY(-3px);
}

.module-scene:hover .module-scene-beam,
.module-scene:focus-visible .module-scene-beam {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.module-scene:hover .module-scene-icon-glass,
.module-scene:focus-visible .module-scene-icon-glass {
  transform: scale(1.06);
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--module-icon-bg, #3b82f6) 48%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 34%, transparent);
}

.module-scene:hover .module-scene-icon,
.module-scene:focus-visible .module-scene-icon {
  color: #fff;
  transform: scale(1.06);
}

.module-scene:hover .module-scene-index,
.module-scene:focus-visible .module-scene-index {
  color: var(--accent, var(--lime));
}

.module-scene:hover .module-scene-title,
.module-scene:focus-visible .module-scene-title {
  transform: translateX(4px);
  letter-spacing: -0.035em;
}

.module-scene:hover .module-scene-desc,
.module-scene:focus-visible .module-scene-desc {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.module-scene:hover .module-scene-cta,
.module-scene:focus-visible .module-scene-cta {
  opacity: 1;
  transform: translateY(0);
}

.module-scene:hover .module-scene-cta:hover,
.module-scene:focus-visible .module-scene-cta {
  background: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  color: var(--accent-ink, var(--charcoal, #121212));
}

.module-scene:focus-visible {
  outline: 2px solid var(--accent, var(--lime));
  outline-offset: 2px;
}

@keyframes modules-glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 6%, 0) scale(1.08); }
}

@keyframes modules-scene-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Shortcuts —— */
.shortcuts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.shortcut-chip {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.shortcut-chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--lime) 35%, var(--line));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.shortcut-chip img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
}

.alert-ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.portal-foot {
  max-width: var(--portal-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 48px;
  margin-bottom: 28px;
  padding: 0 var(--portal-inline);
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

.portal-foot::before {
  display: none;
  content: none;
}

.portal-foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Rodapé nas ferramentas — mesma distância da Agenda, sem linha */
body.measure-module > .measure-module-foot,
.measure-module-foot.portal-foot {
  max-width: var(--portal-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 24px;
  margin-bottom: 12px;
  padding: 0 var(--portal-inline);
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

body.measure-module > .measure-module-foot::before,
.measure-module-foot.portal-foot::before {
  display: none;
  content: none;
}

.measure-module-foot.portal-foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Em conta.php o .account-page já aplica o padding horizontal */
.account-page > .portal-foot {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

@keyframes portal-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-hero-copy,
  .home-widget,
  .agenda-today,
  .module-scene,
  .module-scene-beam,
  .module-scene-title,
  .module-scene-cta,
  .module-scene-icon,
  .module-scene-icon-glass,
  .module-scene-icon-glass-shine,
  .module-scene-icon-glass-glow,
  .modules-stage-glow,
  .shortcut-chip {
    animation: none;
    transition: none;
  }

  .module-scene-icon-glass-shine {
    opacity: 0.35;
    transform: skewX(-18deg) translateX(40%);
  }

  .module-scene-cta {
    opacity: 1;
    transform: none;
  }
}

html[data-theme="light"] .portal-home {
  background: var(--portal-wash);
}

html[data-theme="light"] .account-page-wash {
  background:
    radial-gradient(80% 90% at 8% 10%, color-mix(in srgb, var(--accent, var(--lime)) 28%, transparent), transparent 58%),
    radial-gradient(70% 80% at 92% 20%, color-mix(in srgb, var(--accent, var(--lime)) 14%, transparent), transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 65%, #fff) 0%, var(--bg) 100%);
}

html[data-theme="light"] .home-widget,
html[data-theme="light"] .agenda-today {
  box-shadow: 0 16px 40px rgba(18, 18, 18, 0.08);
}

@media (max-width: 1280px) {
  .module-reel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .module-reel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-widgets,
  .home-widgets[data-count="1"],
  .home-widgets[data-count="2"],
  .home-widgets[data-count="3"] {
    grid-template-columns: 1fr;
  }

  .home-widget,
  .agenda-today {
    max-height: none;
    min-height: 0;
  }

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

@media (max-width: 640px) {
  .portal-hero {
    --hero-title-size: clamp(36px, 11vw, 52px);
    padding: 12px 0 0;
  }

  .portal-hero-title-row {
    gap: 12px;
  }

  .portal-hero-greeting {
    --hero-title-size: clamp(36px, 11vw, 52px);
    gap: 12px;
  }

  .portal-api-status {
    gap: 10px;
  }

  .portal-api-status-item {
    font-size: 12px;
  }

  .portal-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .portal-section--center .portal-section-head {
    align-items: center;
  }

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

  .module-scene {
    min-height: 0;
  }

  .module-scene-meta {
    min-height: 120px;
  }

  .module-scene-cta {
    opacity: 1;
    transform: none;
  }

  .module-scene-title {
    font-size: clamp(18px, 5vw, 24px);
  }

  .shortcut-chip {
    width: 46px;
    height: 46px;
  }

  .shortcut-chip img {
    width: 24px;
    height: 24px;
  }
}

/* —— Portal header —— */
header.topbar.portal-topbar {
  display: block;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 55;
  background: transparent;
  background-color: transparent;
  border: 0;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--ink);
  overflow: visible;
}

html[data-header-tone="light"] .portal-logo {
  filter: invert(1);
}

html[data-header-tone="dark"] .portal-topbar {
  color: #fff;
}

html[data-header-tone="dark"] .portal-topbar .brand-text {
  color: #fff;
}

html[data-header-tone="dark"] .portal-nav-toggle,
html[data-header-tone="dark"] .portal-topbar .portal-logout {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

html[data-header-tone="dark"] .portal-avatar {
  border-color: rgba(255, 255, 255, 0.22);
}

.portal-topbar-inner,
.portal-topbar-inner.wide,
header.portal-topbar .topbar-inner,
header.portal-topbar .topbar-inner.wide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
  min-height: 88px;
  min-width: 0;
  width: 100%;
  max-width: var(--portal-max);
  margin-left: auto;
  margin-right: auto;
  padding: 12px var(--portal-inline);
  box-sizing: border-box;
  overflow: visible;
}

.portal-brand {
  min-width: 0;
}

.portal-logo {
  display: block;
  height: 58px;
  width: auto;
  max-width: 288px;
  object-fit: contain;
  object-position: left center;
}

.portal-nav-toggle {
  display: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
}

.portal-nav {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  overflow-x: hidden;
}

.portal-nav a {
  color: color-mix(in srgb, currentColor 62%, transparent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 9px;
  white-space: nowrap;
}

.portal-nav a:hover,
.portal-nav a.is-active {
  color: inherit;
  background: color-mix(in srgb, var(--accent, #0b6e6e) 16%, transparent);
}

.portal-topbar-right {
  gap: 12px;
  position: relative;
  overflow: visible;
}

.portal-color-menu {
  position: relative;
  flex-shrink: 0;
}

.portal-color-trigger {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  background: var(--bg, #fff);
  border: 2px solid var(--accent, #0b6e6e);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
}

.portal-color-trigger:hover,
.portal-color-menu.is-open .portal-color-trigger {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #0b6e6e) 35%, transparent);
}

.portal-color-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 60;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: top right;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s ease;
}

.portal-color-menu.is-open .portal-color-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.portal-picker-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.portal-picker-group {
  display: grid;
  gap: 8px;
}

.portal-picker-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

.portal-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-swatch {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: var(--dot, #fff);
  cursor: pointer;
  position: relative;
  display: inline-grid;
  place-items: center;
  font-size: 0;
}

.portal-swatch:hover {
  transform: translateY(-1px);
}

.portal-swatch-custom {
  background: var(--dot, #fff);
  overflow: hidden;
}

.portal-swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent, #0b6e6e) 78%, var(--ink));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
}

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

.portal-avatar.is-active,
.portal-avatar:hover {
  border-color: var(--accent, #0b6e6e);
}

.portal-topbar .portal-logout {
  color: inherit;
  border-color: var(--line);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.portal-topbar .portal-logout:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  border-color: var(--line-strong);
}

html[data-header-tone="dark"] .portal-topbar .portal-logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.account-page-wash {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100dvh - 88px);
}

.account-page {
  position: relative;
  z-index: 1;
  max-width: var(--portal-max);
  margin: 28px auto 0;
  padding: 0 var(--portal-inline) 8px;
  container-type: inline-size;
}

.account-page h1 {
  margin: 0 0 19.2px;
  font-family: var(--display);
  font-size: var(--page-title-size);
  font-weight: 800;
  letter-spacing: var(--page-title-tracking);
  line-height: var(--page-title-leading);
  max-width: 100%;
}

.account-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: 22px;
  align-items: start;
}

.account-col-fields {
  display: contents;
}

.account-col-fields > .account-row[data-account-row="avatar"] {
  grid-column: 1;
  grid-row: 1;
}

.account-list {
  display: grid;
  gap: 22px;
  grid-column: 1;
  grid-row: 2;
  padding-top: 14.4px;
}

.account-col-widgets {
  display: grid;
  gap: 22px;
  grid-column: 2;
  grid-row: 2;
}

.account-row {
  padding: 0;
}

.account-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-row-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.account-row-value {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

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

.account-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.account-row-actions .btn {
  cursor: pointer;
  text-decoration: none;
}

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

.account-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 28px;
  width: 100%;
}

.account-save-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ok);
  text-align: center;
  transition: opacity 0.4s ease;
}

.account-save-status.is-gone {
  opacity: 0;
}

.account-widgets {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--card) 34%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.account-widgets-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.account-widgets-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.account-widget-slot {
  display: grid;
  gap: 12px;
}

.account-autosoc-block {
  display: grid;
  gap: 10px;
}

.account-autosoc-block h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.account-autosoc-block + .account-autosoc-block {
  margin-top: 12px;
}

.account-autosoc-block + .account-autosoc-block--rss {
  margin-top: 24px;
}

.account-autosoc-hint:empty,
.account-buffer-channels:empty,
.account-feed-list:empty,
.account-shortcut-actions:empty {
  display: none;
}

.account-page #openai-model::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  opacity: 0;
}

.account-autosoc-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.account-smtp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: end;
}

@media (max-width: 520px) {
  .account-smtp-row {
    grid-template-columns: 1fr;
  }
}

.account-buffer-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  font-size: 13px;
}

.account-channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.account-channel-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.account-channel-icon--instagram { color: #e1306c; }
.account-channel-icon--facebook { color: #1877f2; }
.account-channel-icon--tiktok { color: var(--ink); }
.account-channel-icon--youtube { color: #ff0000; }
.account-channel-icon--linkedin { color: #0a66c2; }
.account-channel-icon--x { color: var(--ink); }
.account-channel-icon--threads { color: var(--ink); }
.account-channel-icon--pinterest { color: #e60023; }

.account-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.account-feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.account-feed-item a {
  min-width: 0;
  flex: 1;
  color: inherit;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-feed-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
}

.account-feed-remove svg {
  width: 13px;
  height: 13px;
  display: block;
}

.account-shortcut-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.account-shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.account-shortcut-thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.account-shortcut-thumb img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.account-shortcut-meta {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.account-shortcut-meta strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.account-shortcut-meta a {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-shortcut-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

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

.account-shortcut-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-shortcut-actions:not(:has(button:not([hidden]))) {
  display: none;
}

.account-autosoc-hint.is-error {
  color: var(--danger);
}

.account-widget-notes-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.account-widget-notes-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 70%, var(--card));
}

.account-widget-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.account-widget-note input {
  margin-top: 3px;
}

.account-actions .btn-primary {
  background: var(--accent, var(--lime));
  border-color: var(--accent, var(--lime));
  color: var(--accent-ink, var(--charcoal, #121212));
  width: max-content;
  max-width: max-content;
  flex: 0 0 auto;
  padding-inline: 28px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.account-actions .btn-primary:hover {
  background: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 72%, #000);
  color: var(--accent-ink, var(--charcoal, #121212));
}

.account-page label.lbl,
.account-page .lbl {
  display: grid;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
}

.account-avatar-field {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.account-avatar-field .lbl {
  flex: 1;
  min-width: 0;
}

.account-avatar-field .account-row-actions {
  justify-content: flex-start;
}

.account-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent, #0b6e6e) 70%, var(--ink));
  color: #fff;
  font-weight: 700;
}

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

.account-file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.account-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.account-ok {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: var(--ok);
}

@media (max-width: 640px) {
  .account-row-main,
  .account-avatar-field {
    flex-wrap: wrap;
  }

  .account-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

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

  .account-col-fields {
    display: grid;
    gap: 22px;
  }

  .account-col-fields > .account-row[data-account-row="avatar"],
  .account-list,
  .account-col-widgets {
    grid-column: auto;
    grid-row: auto;
  }

  .account-list {
    padding-top: 0;
  }
}

@media (max-width: 1024px) {
  :root {
    --portal-inline: clamp(24px, 5vw, 48px);
  }

  .portal-topbar-inner,
  .portal-topbar-inner.wide,
  header.portal-topbar .topbar-inner,
  header.portal-topbar .topbar-inner.wide {
    grid-template-columns: auto 1fr auto;
    padding: 10px var(--portal-inline);
  }

  .portal-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-self: start;
  }

  .portal-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .portal-topbar-right {
    grid-column: 3;
    grid-row: 1;
  }

  .portal-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    overflow: auto;
  }

  .portal-topbar.is-nav-open .portal-nav {
    display: flex;
  }
}

@media (max-width: 720px) {
  .portal-topbar-inner,
  .portal-topbar-inner.wide,
  header.portal-topbar .topbar-inner {
    grid-template-columns: auto 1fr auto;
  }

  .portal-topbar-right {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    width: 100%;
  }

  .portal-nav {
    grid-row: 3;
  }

  .portal-logo {
    height: 48px;
  }
}
