/*
 * 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.
 */

:root {
  color: #172033;
  background: #f5f7fa;
  font-family: system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: #ffffff;
  border-bottom: 1px solid #dfe3ea;
}

.site-name {
  color: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  color: #526079;
}

.table-link {
  font-weight: 700;
}

.logout-button {
  padding: 0.55rem 0.85rem;
  color: #ffffff;
  background: #172033;
  border: 0;
  border-radius: 0.35rem;
  cursor: pointer;
}

.helm {
  width: min(70rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.helm-heading {
  margin-bottom: 1.5rem;
}

.helm-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.page-subtitle {
  margin: 0.5rem 0 0;
  color: #526079;
}

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

.page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #526079;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 0;
}

.metric,
.activity {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.6rem;
}

.metric dt {
  color: #526079;
  font-size: 0.9rem;
}

.metric dd {
  margin: 0.5rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.activity {
  margin-top: 1rem;
}

.invoice-summary-card {
  margin-top: 1rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.6rem;
}

.invoice-summary-card p {
  margin: 0.5rem 0 0;
}

.invoice-summary-total {
  font-size: 1.75rem;
  font-weight: 700;
}

.invoice-summary-card small {
  color: #526079;
}

.pipeline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.pipeline-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.pipeline-stage {
  padding: 1rem;
  color: inherit;
  background: #f5f7fa;
  border: 1px solid #dfe3ea;
  border-radius: 0.35rem;
  text-decoration: none;
}

.pipeline-stage:hover {
  border-color: #526079;
}

.pipeline-stage h3 {
  margin: 0;
  font-size: 1rem;
}

.pipeline-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.activity h2 {
  margin: 0;
  font-size: 1.15rem;
}

.activity p {
  margin: 1.5rem 0 0;
  color: #526079;
}

.primary-link {
  padding: 0.7rem 0.85rem;
  color: #ffffff;
  background: #172033;
  border-radius: 0.35rem;
  font-weight: 700;
  text-decoration: none;
}

.table-card,
.form-card,
.detail-card {
  overflow-x: auto;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.6rem;
}

.detail-card h2 {
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
}

.section-card {
  margin-top: 1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin: 0;
}

.section-card h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-actions a,
.text-button {
  color: #526079;
  font: inherit;
}

.text-button {
  padding: 0;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.table-submit {
  margin: 1rem 0 0;
  text-align: right;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.invoice-totals {
  width: min(100%, 22rem);
  margin: 1.5rem 0 0 auto;
}

.invoice-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.invoice-totals div:last-child {
  padding-top: 0.75rem;
  border-top: 1px solid #dfe3ea;
  font-weight: 700;
}

.invoice-totals dd {
  margin: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.details dt {
  color: #526079;
  font-size: 0.9rem;
}

.details dd {
  margin: 0.5rem 0 0;
  font-weight: 700;
}

.empty-state,
.form-note {
  color: #526079;
}

.empty-state {
  margin: 0;
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid #dfe3ea;
}

th {
  color: #526079;
  font-size: 0.9rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-active {
  color: #245c3a;
  background: #edf8f1;
}

.status-inactive {
  color: #526079;
  background: #eef1f5;
}

.form-card {
  max-width: 36rem;
}

.billing-preferences-card {
  max-width: 48rem;
}

.resource-form fieldset {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid #dfe3ea;
  border-radius: 0.35rem;
}

.resource-form legend {
  padding: 0 0.4rem;
  font-weight: 700;
}

.billing-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.billing-snapshot h3,
.invoice-notes h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.billing-snapshot address {
  font-style: normal;
  line-height: 1.5;
}

.billing-snapshot dl {
  margin: 0;
}

.billing-snapshot dl div {
  margin-bottom: 1rem;
}

.billing-snapshot dd {
  margin: 0.25rem 0 0;
  font-weight: 700;
}

.invoice-notes {
  margin-top: 1.5rem;
}

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

.generation-form {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.generation-form .form-field {
  width: min(100%, 15rem);
}

.form-field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: #172033;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.35rem;
  font: inherit;
}

.login-page {
  display: grid;
  min-height: 100vh;
  padding: 1rem;
  place-items: center;
}

.login-card {
  width: min(100%, 26rem);
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.6rem;
}

.login-heading {
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-heading h1 {
  margin: 0;
  font-size: 1.75rem;
}

.login-heading p {
  margin: 0.5rem 0 0;
  color: #526079;
}

.login-form,
.form-field {
  display: grid;
  gap: 0.5rem;
}

.form-field {
  margin: 0;
}

.login-form {
  gap: 1rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: #172033;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 0.35rem;
  font: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #526079;
  outline: 2px solid #dfe3ea;
  outline-offset: 1px;
}

.sign-in-button {
  padding: 0.7rem 0.85rem;
  color: #ffffff;
  background: #172033;
  border: 0;
  border-radius: 0.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.forgot-password {
  display: block;
  margin-top: 1rem;
  color: #526079;
  text-align: center;
}

.flash {
  padding: 0.75rem;
  border-radius: 0.35rem;
}

.flash-alert {
  color: #8b1e2d;
  background: #fff0f2;
}

.flash-notice {
  color: #245c3a;
  background: #edf8f1;
}

.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;
}
