html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f6f8;
  color: #1f2937;
}

main {
  flex: 1;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-container {
  max-width: 1180px;
}

.page-shell {
  flex: 1;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-kicker {
  color: #6b7280;
  margin-bottom: 0;
}

.app-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.app-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.app-card-body {
  padding: 1.25rem;
}

.campaign-summary-card {
  border: 1px solid #dbe2ea;
  border-radius: .5rem;
  padding: .9rem 1rem;
  background: #f8fafc;
}

.campaign-message-preview {
  border: 1px solid #dbe2ea;
  border-radius: .5rem;
  padding: .85rem 1rem;
  background: #fff;
}

.campaign-message-preview > summary {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
}

.campaign-message-full {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #111827;
}

.campaign-recipient-message-cell {
  min-width: 18rem;
  max-width: 28rem;
}

.campaign-recipient-message-preview {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.campaign-recipient-message-details {
  margin-top: .35rem;
}

.campaign-recipient-message-details summary {
  cursor: pointer;
  color: #0d6efd;
  font-size: .875rem;
}

.campaign-recipient-message-full {
  margin-top: .4rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #374151;
  font-size: .875rem;
}

.campaign-signal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.table > :not(caption) > * > * {
  padding: .85rem .75rem;
}

.table thead th {
  color: #4b5563;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
}

.form-label {
  font-weight: 600;
  color: #374151;
}

.form-control,
.form-select {
  border-color: #d1d5db;
}

.editable-combobox {
  position: relative;
}

.editable-combobox-menu {
  position: absolute;
  top: calc(100% + .25rem);
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 14rem;
  overflow-y: auto;
  padding: .35rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: .375rem;
  box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .12);
}

.editable-combobox-toggle {
  width: 2.75rem;
}

.editable-combobox-option {
  display: block;
  width: 100%;
  padding: .45rem .65rem;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: #1f2937;
  text-align: left;
}

.editable-combobox-option:hover,
.editable-combobox-option:focus,
.editable-combobox-option.active {
  background: #e9f2ff;
  color: #0b5ed7;
  outline: 0;
}

.validation-summary-valid.alert {
  display: none;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6b7280;
}

.company-list {
  display: flex;
  flex-direction: column;
}

.company-list-row {
  padding: 1rem 1.25rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
}

.company-list-row:last-child {
  border-bottom: 0;
}

.company-list-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.company-list-row__title-wrap {
  min-width: 0;
  flex: 1;
}

.company-list-row__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.company-list-row__actions {
  flex: 0 0 auto;
}

.company-list-row__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .85rem 1rem;
}

.company-list-row__meta {
  min-width: 0;
}

.company-list-row__label {
  display: block;
  margin-bottom: .2rem;
  color: #6b7280;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.company-list-row__value {
  display: block;
  color: #111827;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.company-indicators {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
  max-width: 19rem;
}

.company-indicator {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  padding: .18rem .25rem;
  border: 1px solid #e2e8f0;
  border-radius: .3rem;
  background: #f8fafc;
  text-align: center;
}

.company-indicator-value {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.05;
}

.company-indicator--has-value {
  color: #198754;
}

.company-indicator--missing {
  color: #9ca3af;
}

.company-indicator--error {
  color: #dc3545;
}

.filter-check-dropdown {
  position: relative;
}

.filter-check-dropdown__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  overflow: hidden;
  background-color: #fff;
  text-align: left;
  white-space: nowrap;
}

.filter-check-dropdown__toggle [data-filter-dropdown-label] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-check-dropdown__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + .25rem);
  left: 0;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  padding: .35rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: .375rem;
  box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .15);
}

.filter-check-dropdown__option {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .4rem .45rem;
  border-radius: .25rem;
  cursor: pointer;
  font-size: .875rem;
}

.filter-check-dropdown__option:hover {
  background: #f1f5f9;
}

.filter-check-dropdown__option.is-conflicting {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .7;
}

.company-indicator-code {
  display: block;
  color: #475569;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.company-pagination {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: .125rem;
}

.company-pagination .pagination {
  flex-wrap: wrap;
  gap: .25rem;
}

.company-pagination .page-link {
  border-radius: .25rem;
}

.detail-list {
  display: grid;
  gap: 1rem;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 1rem;
  align-items: start;
}

.detail-label {
  color: #6b7280;
  font-weight: 600;
}

.detail-value {
  color: #111827;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stat-card {
  min-height: 132px;
}

.stat-card-link {
  display: block;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.stat-card-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-caption {
  margin-top: .45rem;
  color: #6b7280;
  font-size: .85rem;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.home-quick-link {
  display: block;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  background: #f8fafc;
  color: #111827;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.home-quick-link:hover {
  text-decoration: none;
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.home-quick-link__title {
  display: block;
  margin-bottom: .25rem;
  font-weight: 600;
}

.home-quick-link__meta {
  display: block;
  color: #6b7280;
  font-size: .88rem;
  line-height: 1.4;
}

.home-next-steps {
  display: grid;
  gap: .75rem;
}

.home-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  color: #111827;
  background: #fff;
}

.home-next-step:hover {
  text-decoration: none;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.home-next-step__label {
  color: #6b7280;
  font-size: .88rem;
  font-weight: 600;
}

.home-next-step__value {
  text-align: right;
  font-size: .95rem;
  color: #0f172a;
}

.home-dashboard-table {
  table-layout: fixed;
}

.home-dashboard-table th {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #475569;
  text-transform: uppercase;
}

.home-dashboard-table td,
.home-dashboard-table th {
  padding: .9rem 1rem;
  vertical-align: middle;
}

.home-dashboard-table__title {
  display: inline-block;
  max-width: 100%;
  color: #0f172a;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dashboard-table__title:hover {
  color: #0d6efd;
  text-decoration: none;
}

.home-recent-list {
  display: grid;
  gap: .75rem;
  min-width: 0;
}

.home-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.home-recent-item__content {
  min-width: 0;
  width: 0;
  max-width: 100%;
  flex: 1 1 0%;
  overflow: hidden;
}

.home-recent-item__title {
  display: block;
  width: 100%;
  color: #0f172a;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-recent-item__title:hover {
  color: #0d6efd;
  text-decoration: none;
}

.home-recent-item__meta {
  margin-top: .2rem;
  color: #6b7280;
  font-size: .78rem;
}

.home-recent-item .btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.auth-page {
  background: #f3f4f6;
}

.auth-page .page-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
}

.login-logo {
  max-width: 190px;
  max-height: 72px;
  object-fit: contain;
}

.tag-remove {
  width: .65rem;
  height: .65rem;
  padding: 0;
  font-size: .65rem;
}

.whatsapp-history-table {
  table-layout: fixed;
}

.whatsapp-history-table th:nth-child(1),
.whatsapp-history-table td:nth-child(1) {
  width: 9.5rem;
}

.whatsapp-history-table th:nth-child(2),
.whatsapp-history-table td:nth-child(2) {
  width: 11rem;
}

.whatsapp-history-table th:nth-child(3),
.whatsapp-history-table td:nth-child(3) {
  width: 9.5rem;
}

.whatsapp-history-table th:nth-child(4),
.whatsapp-history-table td:nth-child(4) {
  width: 9.5rem;
}

.whatsapp-history-table th:nth-child(5),
.whatsapp-history-table td:nth-child(5) {
  width: 8rem;
}

.whatsapp-message-cell {
  white-space: normal;
}

.whatsapp-message-preview {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.whatsapp-message-details {
  margin-top: .35rem;
}

.whatsapp-message-details summary {
  cursor: pointer;
  color: #0d6efd;
  font-size: .875rem;
}

.whatsapp-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #374151;
  font-size: .875rem;
}

.whatsapp-message-full {
  margin-top: .4rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #374151;
  font-size: .875rem;
}

.whatsapp-message-toggle .btn-link {
  margin-top: .25rem;
}

.footer {
  padding: 1rem 0;
  margin-top: auto;
  background: #fff;
}

@media (max-width: 767.98px) {
  .page-header {
    flex-direction: column;
  }

  .page-header .btn {
    width: 100%;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .home-quick-grid {
    grid-template-columns: 1fr;
  }

  .home-next-step {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-next-step__value {
    text-align: left;
  }

  .home-dashboard-table {
    min-width: 42rem;
  }

  .home-recent-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-list-row {
    padding: 1rem;
  }

  .company-list-row__header {
    flex-direction: column;
    align-items: stretch;
  }

  .company-list-row__actions {
    width: 100%;
  }

  .company-indicators {
    justify-content: flex-start;
    max-width: 100%;
  }

  .company-list-row__actions .btn {
    flex: 1 1 0;
  }

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

@media (min-width: 768px) and (max-width: 1199.98px) {
  .company-list-row__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.message-center-table-scroll { overflow: visible; }
.message-center-table { width: 100%; table-layout: fixed; }
.message-center-table th, .message-center-table td { padding-top: .55rem; padding-bottom: .55rem; vertical-align: middle; overflow-wrap: anywhere; }
.message-center-table th:nth-child(1) { width: 20%; } .message-center-table th:nth-child(2) { width: 13%; } .message-center-table th:nth-child(3) { width: 20%; } .message-center-table th:nth-child(4) { width: 13%; } .message-center-table th:nth-child(5) { width: 18%; } .message-center-table th:nth-child(6) { width: 16%; }
.message-center-sort-link { color: inherit; text-decoration: none; } .message-center-sort-link:hover { text-decoration: underline; }
.message-center-location, .message-center-campaign { white-space: normal; }
.message-center-campaign span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.message-center-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 20rem; }
.message-center-actions-header, .message-center-actions { white-space: nowrap; }
@media (max-width: 767.98px) { .message-center-table-scroll { overflow-x: auto; overflow-y: visible; } .message-center-table { min-width: 760px; } .message-center-preview { max-width: 16rem; } }

.campaign-list-name { max-width: 16rem; } .campaign-list-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
