/* Shared authenticated header. Page templates include app_header.html; pages should not restyle this shell. */
.topbar.app-topbar,
.lf-unified-app-header,
.lf-topbar {
  position: relative;
  z-index: 8000;
  width: 100%;
  min-height: var(--lf-topbar-height, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.app-topbar-copy,
.topbar-copy {
  min-width: 260px;
  flex: 1 1 420px;
  display: grid;
  gap: 8px;
}

.app-header-identity {
  min-width: 0;
  display: flex;
  align-items: center;
}

.app-header-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-welcome-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--lf-color-text, #0f172a);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
  font-weight: 820;
  letter-spacing: 0;
}

.app-topbar .subtitle,
.lf-unified-app-header .subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--lf-color-muted, #64748b);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.app-header-title-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--lf-color-primary, #2563eb);
  background: var(--lf-color-primary-soft, rgba(37, 99, 235, 0.08));
  box-shadow: none;
}

.app-header-title-icon svg {
  width: 20px;
  height: 20px;
}

.app-header-title-icon--whatsapp {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

.app-header-title-icon--right {
  margin-left: 2px;
}

.app-header-title-icon--hand.app-header-title-icon--right {
  width: auto;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: 0.9em;
  line-height: 1;
  transform: translateY(-1px);
}

.dashboard-topbar-actions.app-topbar-actions,
.app-topbar-actions {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.dashboard-today-pill {
  width: auto;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  align-items: center;
  gap: var(--lf-space-2, 8px);
  padding: 0 var(--lf-space-3, 12px);
  border: 1px solid var(--lf-color-border, rgba(148, 163, 184, 0.22));
  border-radius: var(--lf-radius-pill, 999px);
  background: transparent;
  color: var(--lf-color-text, #0f172a);
  box-shadow: none;
  font-size: var(--lf-font-size-sm, 13px);
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-today-pill svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1180px) {
  .topbar.app-topbar,
  .lf-unified-app-header,
  .lf-topbar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .app-topbar-copy,
  .topbar-copy {
    min-width: 0;
    flex: 1 1 auto;
  }

  .dashboard-topbar-actions.app-topbar-actions,
  .app-topbar-actions {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .topbar.app-topbar,
  .lf-unified-app-header,
  .lf-topbar {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .dashboard-topbar-actions.app-topbar-actions,
  .app-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
