/*
 * 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 {
  --ga-black: #050505;
  --ga-panel: #111111;
  --ga-pink: #ec0064;
  --ga-pink-dark: #97003f;
  --ga-white: #ffffff;
  --ga-muted: #b8b8b8;
  --ga-line: #2a2a2a;
}

body {
  background: var(--ga-black);
  color: var(--ga-white);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: inherit;
}

.notice,
.alert {
  margin: 0;
  padding: 0.75rem 1rem;
}

.dashboard {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2rem;
}

.dashboard-hero {
  align-items: end;
  border-bottom: 4px solid var(--ga-pink);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.dashboard-kicker,
.dashboard-month {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.dashboard h1 {
  color: var(--ga-pink);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  margin: 0.35rem 0;
  text-transform: uppercase;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.dashboard-actions a {
  background: var(--ga-pink);
  color: var(--ga-white);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.8rem 1rem;
  text-decoration: none;
  text-transform: uppercase;
}

.dashboard-actions a:first-child {
  background: var(--ga-white);
  color: var(--ga-black);
}

.dashboard-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.dashboard-stat {
  background: var(--ga-pink);
  color: var(--ga-white);
  min-height: 8rem;
  padding: 1rem;
}

.dashboard-stat--total {
  background: var(--ga-white);
  color: var(--ga-black);
}

.dashboard-stat--danger {
  background: var(--ga-pink-dark);
}

.dashboard-stat--revenue {
  background: var(--ga-white);
  color: var(--ga-black);
}

.dashboard-stat span,
.dashboard-stat small {
  display: block;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-stat strong {
  display: block;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin: 0.6rem 0;
  overflow-wrap: anywhere;
}

.dashboard-stat--revenue strong {
  font-size: clamp(1.9rem, 2.4vw, 2.7rem);
  line-height: 1.05;
}

.dashboard-stat small {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-stat--total small {
  color: #505050;
}

.dashboard-stat--revenue small {
  color: #505050;
}

.dashboard-lists {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-list {
  background: var(--ga-panel);
  border-top: 0.5rem solid var(--ga-pink);
  min-height: 12rem;
}

.dashboard-list h2 {
  background: var(--ga-white);
  color: var(--ga-black);
  font-size: 1rem;
  font-weight: 900;
  margin: 0;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
}

.dashboard-student-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-student-list li {
  border-bottom: 1px solid var(--ga-line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.dashboard-student-list a {
  color: var(--ga-white);
  font-weight: 800;
}

.dashboard-student-list span {
  color: var(--ga-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.dashboard-empty {
  color: var(--ga-muted);
  font-weight: 700;
  margin: 0;
  padding: 1rem;
}

.dashboard-history {
  background: var(--ga-panel);
  border-top: 0.5rem solid var(--ga-white);
  margin-bottom: 1.5rem;
}

.dashboard-section-heading,
.report-panel__heading {
  align-items: center;
  background: var(--ga-white);
  color: var(--ga-black);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.dashboard-section-heading span,
.report-panel__heading span {
  color: #505050;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-section-heading h2,
.report-panel__heading h2 {
  font-size: 2rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}

.dashboard-section-heading a {
  background: var(--ga-pink);
  color: var(--ga-white);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
}

.revenue-chart {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(12, minmax(3.75rem, 1fr));
  min-width: 52rem;
  padding: 1.25rem 1rem 1rem;
  position: relative;
}

.revenue-bar {
  color: var(--ga-white);
  display: grid;
  gap: 0.45rem;
  grid-template-rows: 1.5rem 11rem 2.5rem;
  position: relative;
  text-align: center;
  text-decoration: none;
  z-index: 1;
}

.revenue-target-line {
  border-top: 2px dashed var(--ga-white);
  left: 1rem;
  pointer-events: none;
  position: absolute;
  right: 1rem;
  z-index: 2;
}

.revenue-target-line span {
  background: var(--ga-white);
  bottom: 0.3rem;
  color: var(--ga-black);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.45rem;
  position: absolute;
  right: 0;
  text-transform: uppercase;
}

.revenue-bar:hover .revenue-bar__fill,
.revenue-bar:focus .revenue-bar__fill {
  background: var(--ga-white);
}

.revenue-bar__amount {
  align-self: end;
  font-size: 0.72rem;
  font-weight: 900;
}

.revenue-bar__track {
  align-items: end;
  background: #1d1d1d;
  display: flex;
  justify-content: stretch;
}

.revenue-bar__fill {
  background: var(--ga-pink);
  display: block;
  min-height: 2px;
  transition: background-color 120ms ease;
  width: 100%;
}

.revenue-bar__month {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revenue-bar__month small {
  color: var(--ga-muted);
  display: block;
  font-size: 0.65rem;
  margin-top: 0.2rem;
}

.reports-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2rem;
}

.reports-hero {
  align-items: end;
  border-bottom: 4px solid var(--ga-pink);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.reports-kicker,
.reports-month {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.reports-page h1 {
  color: var(--ga-pink);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  margin: 0.35rem 0;
  text-transform: uppercase;
}

.reports-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.reports-actions a,
.report-month-link,
.report-month-form input[type="submit"] {
  background: var(--ga-pink);
  border: 0;
  color: var(--ga-white);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 0.8rem 1rem;
  text-decoration: none;
  text-transform: uppercase;
}

.reports-actions a:first-child {
  background: var(--ga-white);
  color: var(--ga-black);
}

.report-controls {
  align-items: end;
  background: var(--ga-panel);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  margin-bottom: 1rem;
  padding: 1rem;
}

.report-month-link {
  justify-self: start;
}

.report-month-link--next,
.report-month-link--disabled {
  justify-self: end;
}

.report-month-link--disabled {
  background: var(--ga-line);
  color: var(--ga-muted);
  cursor: default;
}

.report-month-form {
  align-items: end;
  display: flex;
  gap: 0.5rem;
}

.report-month-form label {
  color: var(--ga-muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-month-form select {
  background: var(--ga-white);
  border: 0;
  border-radius: 0;
  color: var(--ga-black);
  font-size: 0.9rem;
  font-weight: 900;
  min-height: 2.6rem;
  padding: 0 2.25rem 0 0.75rem;
}

.report-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  margin-bottom: 1rem;
}

.report-stat {
  background: var(--ga-pink);
  min-height: 7rem;
  padding: 1rem;
}

.report-stat--revenue {
  background: var(--ga-white);
  color: var(--ga-black);
}

.report-stat span,
.report-stat small {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  margin: 0.65rem 0;
  overflow-wrap: anywhere;
}

.report-stat small {
  color: rgba(255, 255, 255, 0.78);
}

.report-stat--revenue small {
  color: #505050;
}

.report-details {
  display: grid;
  gap: 1rem;
  grid-template-columns: 0.9fr 1.1fr;
  margin-bottom: 1rem;
}

.report-panel,
.report-history {
  background: var(--ga-panel);
  border-top: 0.5rem solid var(--ga-pink);
}

.report-panel__heading strong {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.report-student-list,
.report-payment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-student-list li,
.report-payment-list li {
  border-bottom: 1px solid var(--ga-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.9rem 1rem;
}

.report-student-list a,
.report-payment-list a {
  color: var(--ga-white);
  font-weight: 900;
  text-decoration-color: var(--ga-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2rem;
}

.report-student-list span,
.report-payment-list span {
  color: var(--ga-muted);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}

.report-payment-list strong {
  font-size: 1rem;
  white-space: nowrap;
}

.report-empty {
  color: var(--ga-muted);
  font-weight: 700;
  margin: 0;
  padding: 1rem;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  border-collapse: collapse;
  min-width: 42rem;
  width: 100%;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--ga-line);
  padding: 0.85rem 1rem;
  text-align: right;
}

.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}

.report-table thead th {
  color: var(--ga-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-table tbody th,
.report-table tbody td:last-child {
  font-weight: 900;
}

.report-table a {
  text-decoration-color: var(--ga-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2rem;
}

.report-table__current {
  background: rgba(236, 0, 100, 0.18);
}

.students-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2rem;
}

.students-hero {
  align-items: end;
  border-bottom: 4px solid var(--ga-pink);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.students-kicker,
.students-month,
.students-section-label {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.students-page h1 {
  color: var(--ga-pink);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  margin: 0.35rem 0;
  text-transform: uppercase;
}

.students-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.students-actions a {
  background: var(--ga-pink);
  color: var(--ga-white);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.8rem 1rem;
  text-decoration: none;
  text-transform: uppercase;
}

.students-actions a:first-child {
  background: var(--ga-white);
  color: var(--ga-black);
}

.students-priority,
.students-group {
  background: var(--ga-panel);
}

.students-priority {
  border-top: 0.75rem solid var(--ga-pink);
  margin-bottom: 1.25rem;
}

.students-groups {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.15fr 0.85fr;
}

.students-group--active {
  border-top: 0.5rem solid var(--ga-white);
}

.students-group--dormant {
  border-top: 0.5rem solid var(--ga-line);
  opacity: 0.72;
}

.students-section-header {
  align-items: center;
  background: var(--ga-white);
  color: var(--ga-black);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.students-priority .students-section-header {
  background: var(--ga-pink);
  color: var(--ga-white);
}

.students-priority .students-section-label {
  color: rgba(255, 255, 255, 0.78);
}

.students-section-header h2 {
  font-size: 2rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}

.students-section-header strong {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.student-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.student-group-list li {
  align-items: center;
  border-bottom: 1px solid var(--ga-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
}

.student-group-list a {
  color: var(--ga-white);
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration-color: var(--ga-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}

.student-group-list span,
.student-group-list small,
.student-group-empty {
  color: var(--ga-muted);
  font-weight: 700;
}

.student-group-list span {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.student-group-list small {
  font-size: 0.85rem;
  white-space: nowrap;
}

.student-group-list--lapsed li {
  background: linear-gradient(90deg, rgba(236, 0, 100, 0.18), transparent 58%);
  min-height: 4.25rem;
}

.student-group-list--lapsed a {
  font-size: 1.2rem;
}

.student-group-list--dormant li {
  padding: 0.75rem 1rem;
}

.student-group-list--dormant a {
  color: #d6d6d6;
  font-size: 0.95rem;
}

.student-group-empty {
  margin: 0;
  padding: 1rem;
}

.student-detail-page,
.receipt-page {
  margin: 0 auto;
  max-width: 960px;
  padding: 2rem;
}

.student-detail-hero,
.receipt-hero {
  align-items: end;
  border-bottom: 4px solid var(--ga-pink);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.student-detail-kicker,
.student-detail-meta,
.receipt-kicker,
.receipt-meta,
.student-payments-header span,
.receipt-summary span {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.student-detail-page h1,
.receipt-page h1 {
  color: var(--ga-pink);
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  margin: 0.35rem 0;
  text-transform: uppercase;
}

.student-detail-actions,
.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.student-detail-actions a,
.receipt-actions a,
.receipt-link {
  background: var(--ga-pink);
  color: var(--ga-white);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.8rem 1rem;
  text-decoration: none;
  text-transform: uppercase;
}

.student-detail-actions a:first-child,
.receipt-actions a:first-child {
  background: var(--ga-white);
  color: var(--ga-black);
}

.student-payments,
.receipt-details {
  background: var(--ga-panel);
  border-top: 0.5rem solid var(--ga-pink);
}

.student-payments-header {
  align-items: center;
  background: var(--ga-white);
  color: var(--ga-black);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.student-payments-header h2 {
  font-size: 2rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}

.student-payments-header strong {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.student-payment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.student-payment-list li {
  align-items: center;
  border-bottom: 1px solid var(--ga-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
}

.student-payment-list a:not(.receipt-link) {
  color: var(--ga-white);
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration-color: var(--ga-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}

.student-payment-list span,
.student-payment-empty {
  color: var(--ga-muted);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.student-payment-empty {
  margin: 0;
  padding: 1rem;
}

.receipt-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}

.receipt-summary div {
  background: var(--ga-pink);
  color: var(--ga-white);
  min-height: 6rem;
  padding: 1rem;
}

.receipt-summary div:first-child {
  background: var(--ga-white);
  color: var(--ga-black);
}

.receipt-summary strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-top: 0.75rem;
}

.receipt-details dl {
  margin: 0;
}

.receipt-details div {
  border-bottom: 1px solid var(--ga-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 12rem minmax(0, 1fr);
  padding: 1rem;
}

.receipt-details dt {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.receipt-details dd {
  font-weight: 900;
  margin: 0;
}

.payment-status {
  border-radius: 4px;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0.5rem;
  padding: 0.15rem 0.4rem;
}

.payment-status--active {
  background: #e8f5e9;
  color: #1b5e20;
}

.payment-status--due_soon {
  background: #fff8e1;
  color: #8a5a00;
}

.payment-status--overdue,
.payment-status--unpaid {
  background: #ffebee;
  color: #b71c1c;
}

@media (max-width: 800px) {
  .dashboard {
    padding: 1rem;
  }

  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .dashboard-stats,
  .dashboard-lists,
  .students-groups,
  .report-stats,
  .report-details {
    grid-template-columns: 1fr;
  }

  .dashboard-history {
    overflow-x: auto;
  }

  .dashboard-section-heading {
    align-items: start;
    flex-direction: column;
  }

  .reports-page {
    padding: 1rem;
  }

  .reports-hero {
    align-items: start;
    flex-direction: column;
  }

  .reports-actions {
    justify-content: flex-start;
  }

  .report-controls {
    align-items: stretch;
    grid-template-columns: 1fr 1fr;
  }

  .report-month-form {
    align-items: stretch;
    flex-direction: column;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .report-month-form select,
  .report-month-form input[type="submit"] {
    min-height: 2.75rem;
  }

  .report-student-list li,
  .report-payment-list li {
    grid-template-columns: 1fr;
  }

  .students-page {
    padding: 1rem;
  }

  .students-hero {
    align-items: start;
    flex-direction: column;
  }

  .students-actions {
    justify-content: flex-start;
  }

  .student-detail-hero,
  .receipt-hero {
    align-items: start;
    flex-direction: column;
  }

  .student-detail-actions,
  .receipt-actions {
    justify-content: flex-start;
  }

  .student-group-list li {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .student-group-list small {
    white-space: normal;
  }

  .student-payment-list li,
  .receipt-summary,
  .receipt-details div {
    grid-template-columns: 1fr;
  }
}
