/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #1f2933;
  background: #f7f9fb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  color: #ffffff;
  background: #27374d;
}

.app-header-main,
.app-header-actions,
.app-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.app-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand,
.app-nav a {
  color: #ffffff;
  text-decoration: none;
}

.brand {
  font-weight: 800;
}

.app-nav a {
  color: #d7e3f1;
  font-weight: 650;
}

.organization-name {
  color: #d7e3f1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  width: min(100%, 64rem);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.auth-panel {
  width: min(100%, 28rem);
  margin: 8vh auto 0;
}

.auth-panel h1,
.dashboard h1,
.public-landing h1,
.page-heading h1 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
  line-height: 1.15;
}

.dashboard {
  padding: 2rem 0;
}

.dashboard p {
  color: #52616f;
  font-size: 1.125rem;
}

.dashboard-meta {
  margin-top: -0.75rem;
}

.public-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: 2rem;
  align-items: start;
  padding: 8vh 0 2rem;
}

.public-landing-content p {
  max-width: 42rem;
  color: #52616f;
  font-size: 1.125rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #2563eb;
  font-weight: 800;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}

.section-header h1,
.section-header h2 {
  margin: 0;
}

.alert {
  border: 1px solid #f1b8b8;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: #7a271a;
  background: #fff4f2;
}

.public-feature-grid {
  display: grid;
  gap: 0.75rem;
}

.public-feature-grid div,
.settings-section,
.record-list li,
.member-list li {
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #ffffff;
}

.public-feature-grid div {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}

.public-feature-grid span,
.settings-section p,
.detail-list dd,
.record-list small,
.member-list small {
  color: #52616f;
}

.json-report {
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  background: #ffffff;
}

.json-report summary {
  cursor: pointer;
  font-weight: 700;
}

.json-report pre {
  max-width: 100%;
  overflow: auto;
  margin: 0.85rem 0 0;
  color: #1f2933;
  white-space: pre-wrap;
}

.account-list {
  display: grid;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.account-list li {
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  background: #ffffff;
  font-weight: 650;
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

label {
  font-weight: 650;
}

input {
  width: 100%;
  border: 1px solid #bac7d5;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #ffffff;
}

select {
  width: 100%;
  border: 1px solid #bac7d5;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #ffffff;
}

input:focus,
select:focus {
  border-color: #2563eb;
  outline: 3px solid #bfdbfe;
}

.button,
.button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  text-decoration: none;
}

.button {
  border: 0;
  border-radius: 6px;
  padding: 0.72rem 1rem;
  color: #ffffff;
  background: #2563eb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-secondary {
  background: #52616f;
}

.button-danger {
  background: #b42318;
}

.settings-page {
  display: grid;
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}

.page-heading p {
  margin: -0.75rem 0 0;
  color: #52616f;
}

.settings-section {
  padding: 1.25rem;
}

.settings-section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.settings-section h3 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
}

.compact-form {
  max-width: 32rem;
}

.inline-form {
  grid-template-columns: minmax(14rem, 1fr) minmax(10rem, 12rem) auto;
  align-items: end;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
}

.detail-list dt {
  font-weight: 750;
}

.detail-list dd {
  margin: 0;
}

.record-list,
.member-list {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.record-list li,
.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
}

.record-list li {
  align-items: baseline;
}

.member-list li {
  flex-wrap: wrap;
}

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

.organization-switcher select {
  min-width: 12rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-link {
  margin: 1rem 0 0;
  color: #52616f;
}

.auth-link a {
  color: #2563eb;
  font-weight: 650;
}

.flash {
  margin: 0 0 1rem;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}

.flash-notice {
  color: #0f5132;
  background: #d1e7dd;
}

.flash-alert {
  color: #842029;
  background: #f8d7da;
}

@media (max-width: 48rem) {
  .public-landing,
  .inline-form,
  .detail-list div {
    grid-template-columns: 1fr;
  }

  .app-header,
  .app-header-main {
    align-items: flex-start;
  }

  .app-header-main {
    flex-direction: column;
  }

  .app-header-actions {
    justify-content: flex-start;
  }
}
