/*
 * Global styles for LPóticas Platform (Propshaft serves this file as-is).
 * Landing and legal pages use additional stylesheets linked from their layouts.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #0f172a;
}

a {
  color: inherit;
}

.alert-danger {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
}

.alert-danger ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.alert-danger h2 {
  font-size: 15px;
  margin: 0 0 6px;
}

/* Internal admin UI (Materialize layout) */
body.app-internal {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main.app-main {
  flex: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

nav.nav-internal .brand-logo {
  position: relative;
  font-size: 1.35rem;
  font-weight: 600;
}

@media only screen and (max-width: 992px) {
  nav.nav-internal .brand-logo {
    left: 0;
    transform: none;
  }
}

.page-heading {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: #37474f;
}

.actions-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.actions-row form {
  display: inline-block;
  margin: 0;
}

.testimonial-share-link {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-all;
}

.testimonial-share-link--compact {
  margin-bottom: 0.4rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
}

.testimonial-publication-switch {
  white-space: nowrap;
}

.testimonial-admin-index__content-cell {
  min-width: 28rem;
  max-width: 46rem;
  vertical-align: top;
}

.testimonial-admin-index__full-text {
  margin: 0.65rem 0 0.35rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #1565c0;
  border-radius: 6px;
  background: #ffffff;
  color: #263238;
}

.testimonial-admin-index__full-text p {
  margin: 0 0 0.7rem;
}

.testimonial-admin-index__full-text p:last-child {
  margin-bottom: 0;
}

.testimonial-admin-index__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.testimonial-admin-quote {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid #1565c0;
  background: #f8fafc;
  color: #263238;
}

.testimonial-admin-quote p {
  margin: 0 0 0.75rem;
}

.testimonial-admin-quote p:last-child {
  margin-bottom: 0;
}

.testimonial-word-counter__summary {
  margin: -0.5rem 0 0;
}

.testimonial-word-counter.is-over-limit .testimonial-word-counter__summary {
  color: #c62828 !important;
  font-weight: 600;
}

/* --- Breadcrumbs: use +div.app-breadcrumb+ (not +nav+) — Materialize CDN styles raw +nav+ with pink bar --- */
.app-breadcrumb.breadcrumb-section {
  font-size: 0.9375rem;
  line-height: 1.45;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.breadcrumb-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.breadcrumb-trail__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-trail__item + .breadcrumb-trail__item::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin: 0 0.55rem;
  border-right: 1.5px solid #cfd8dc;
  border-bottom: 1.5px solid #cfd8dc;
  transform: rotate(-45deg);
  vertical-align: middle;
  opacity: 0.85;
}

.breadcrumb-trail__link {
  color: #1565c0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.breadcrumb-trail__link:hover {
  color: #0d47a1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb-trail__link:focus-visible {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
  border-radius: 2px;
}

.breadcrumb-trail__logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.breadcrumb-trail__logo-link:hover {
  text-decoration: none;
}

.breadcrumb-trail__logo {
  display: block;
  width: auto;
  height: 30px;
  max-width: 168px;
  object-fit: contain;
  object-position: left center;
}

.breadcrumb-trail__current {
  color: #455a64;
  font-weight: 600;
  max-width: min(42vw, 18rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media screen and (min-width: 601px) {
  .breadcrumb-trail__current {
    max-width: min(50vw, 28rem);
  }
}

/* App shell: white “chip” aligned with header blue, not full-width stained block */
.breadcrumb-section--internal {
  margin: 0 0 1.35rem;
  padding: 0.15rem 0 0;
  border: none;
  background: transparent;
}

.breadcrumb-section--internal .breadcrumb-trail {
  margin: 0;
  padding: 0.65rem 1rem 0.7rem;
  font-size: 0.8125rem;
  letter-spacing: 0.012em;
  background: #ffffff;
  border: 1px solid rgba(21, 101, 192, 0.14);
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

/* Standalone strip: flat list inside grey bar (no card on +ol+) */
.breadcrumb-section--standalone .breadcrumb-trail {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Legal / wide standalone strip (used outside the app container on institutional pages) */
.breadcrumb-section--standalone {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  color: #334155;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.breadcrumb-section--standalone .breadcrumb-trail__link {
  color: #2563eb;
}

.breadcrumb-section--standalone .breadcrumb-trail__link:hover {
  color: #1d4ed8;
}

.breadcrumb-section--standalone .breadcrumb-trail__current {
  color: #64748b;
}

/* Mensalidades: grouped by competency month (+details+); views: customers#show, customer_monthly_payments#index */
.payments-month-details {
  margin: 0 0 0.85rem;
  border: 1px solid rgba(21, 101, 192, 0.12);
  border-radius: 8px;
  background: #fff;
}

.payments-month-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 1rem;
}

.payments-month-summary::-webkit-details-marker {
  display: none;
}

.payments-month-summary .payments-month-summary__title {
  font-weight: 600;
  color: #1565c0;
}

.payments-month-body {
  padding: 0 0.75rem 0.75rem;
}

.payments-month-body .responsive-table {
  margin: 0;
}

/* Admin email inbox */
.email-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.email-page-heading h1,
.email-page-heading p {
  margin-bottom: 0.35rem;
}

.email-search {
  display: flex;
  align-items: center;
  width: min(31rem, 100%);
  padding: 0 0.5rem 0 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.email-search input[type="search"] {
  height: 2.75rem;
  margin: 0;
  border: 0;
  box-shadow: none;
}

.email-shell {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  min-height: 34rem;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.email-folders {
  padding: 1rem;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.email-compose-button {
  width: 100%;
  margin-bottom: 1rem;
}

nav.email-folder-nav {
  height: auto;
  line-height: normal;
  background: transparent;
  box-shadow: none;
}

.email-folder-link {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.65rem;
  margin-bottom: 0.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: #334155;
}

.email-folder-link:hover,
.email-folder-link.active {
  background: #dbeafe;
  color: #0d47a1;
}

.email-folder-link .material-icons {
  font-size: 1.25rem;
}

.email-addresses {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.5rem;
  padding: 0 0.7rem;
  color: #64748b;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.email-list-item {
  display: grid;
  grid-template-columns: 0.75rem minmax(9rem, 0.8fr) minmax(15rem, 2fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
}

.email-list-item:hover {
  background: #f8fafc;
}

.email-list-item.unread {
  background: #eff6ff;
  color: #0f172a;
}

.email-unread-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: transparent;
}

.email-list-item.unread .email-unread-dot {
  background: #1976d2;
}

.email-list-sender,
.email-list-content,
.email-list-content strong,
.email-list-content small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-list-content {
  display: grid;
  gap: 0.2rem;
}

.email-list-content small {
  color: #64748b;
}

.email-list-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
}

.email-list-meta .material-icons {
  font-size: 1rem;
}

.email-empty-state {
  padding: 5rem 2rem;
  text-align: center;
  color: #64748b;
}

.email-empty-state > .material-icons {
  font-size: 3.5rem;
  color: #90a4ae;
}

.email-empty-state h2 {
  color: #334155;
  font-size: 1.4rem;
}

.email-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.email-shell--message {
  min-height: 42rem;
}

.email-reader {
  min-width: 0;
  padding: 1.25rem 1.5rem 2rem;
}

.email-reader-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.email-reader-header h1 {
  margin: 0.55rem 0 0.15rem;
  font-size: 1.65rem;
}

.email-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.email-back-link .material-icons {
  font-size: 1.15rem;
}

.email-reader-actions,
.email-thread-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.email-reader-actions form,
.email-thread-footer form {
  display: inline-flex;
}

.email-thread {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
}

.email-message-card {
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
}

.email-message-card--outbound {
  border-left: 4px solid #42a5f5;
}

.email-message-card > header {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  background: #f8fafc;
}

.email-sender-avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #1565c0;
  color: #fff;
  font-weight: 700;
}

.email-message-addressing {
  display: grid;
}

.email-message-addressing small,
.email-message-status {
  color: #64748b;
}

.email-message-addressing details {
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

.email-message-addressing summary {
  cursor: pointer;
  color: #1565c0;
}

.email-message-addressing dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.5rem;
}

.email-message-addressing dt {
  font-weight: 700;
}

.email-message-addressing dd {
  margin: 0;
}

.email-privacy-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #fff8e1;
  color: #7c5d00;
  font-size: 0.82rem;
}

.email-privacy-notice .material-icons {
  font-size: 1rem;
}

.email-message-body {
  padding: 1.25rem;
  overflow-wrap: anywhere;
}

.email-message-body:has(.email-html-frame) {
  padding: 0;
}

.email-html-frame {
  display: block;
  width: 100%;
  min-height: 48rem;
  border: 0;
  background: #fff;
}

.email-message-body blockquote {
  border-left-color: #90a4ae;
}

.email-message-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.email-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0 1.25rem 1.25rem;
}

.email-attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 18rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.email-attachment span {
  display: grid;
  min-width: 0;
}

.email-attachment strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-attachment small {
  color: #64748b;
}

.email-delivery-error {
  margin: 0;
  padding: 0.75rem 1.25rem;
  background: #ffebee;
  color: #b71c1c;
}

.email-thread-footer {
  padding-top: 0.5rem;
}

.email-compose-card {
  max-width: 56rem;
  margin: 1rem auto 3rem;
}

.email-compose-form {
  display: grid;
  gap: 0.5rem;
}

.email-compose-form select {
  margin-top: 0.75rem;
}

.email-compose-body {
  min-height: 13rem;
}

.email-compose-copy-fields summary {
  cursor: pointer;
  color: #1565c0;
}

.email-compose-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .email-page-heading,
  .email-reader-header {
    align-items: stretch;
    flex-direction: column;
  }

  .email-search {
    width: 100%;
  }

  .email-shell {
    grid-template-columns: 1fr;
  }

  .email-folders {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  nav.email-folder-nav {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
  }

  .email-folder-link {
    grid-template-columns: auto auto auto;
    white-space: nowrap;
  }

  .email-addresses {
    display: none;
  }
}

@media (max-width: 600px) {
  .email-list-item {
    grid-template-columns: 0.5rem 1fr auto;
  }

  .email-list-sender {
    grid-column: 2;
  }

  .email-list-content {
    grid-column: 2 / -1;
  }

  .email-list-meta {
    grid-column: 3;
    grid-row: 1;
  }

  .email-reader {
    padding: 1rem;
  }

  .email-message-card > header {
    grid-template-columns: 2.5rem 1fr;
  }

  .email-message-status {
    grid-column: 2;
  }
}
