:root {
  --amcas-bg: #f5f7fb;
  --amcas-panel: #ffffff;
  --amcas-panel-soft: #f9fbff;
  --amcas-border: #dce3ee;
  --amcas-text: #172033;
  --amcas-muted: #647085;
  --amcas-link: #225ea8;
  --amcas-accent: #2f7d6d;
  --amcas-accent-soft: #e7f3ef;
  --amcas-warning: #f4b942;
  --amcas-danger: #c44e52;
}

html {
  background: var(--amcas-bg);
}

body {
  background:
    linear-gradient(180deg, #eef4fb 0, var(--amcas-bg) 300px),
    var(--amcas-bg);
  color: var(--amcas-text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.5;
}

a {
  color: var(--amcas-link);
}

a:hover {
  color: #174473;
}

.app-shell {
  max-width: 1240px;
  padding-bottom: 48px;
  padding-top: 22px;
}

.app-header {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-title {
  font-size: 2.4rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.cycle-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--amcas-border);
  border-radius: 8px;
  color: var(--amcas-muted);
  display: flex;
  flex: 1 1 360px;
  font-size: 0.98rem;
  gap: 8px;
  justify-content: flex-end;
  line-height: 1.2;
  margin: 0;
  max-width: 760px;
  padding: 9px 12px;
}

.cycle-label {
  color: #27334a;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-right: 2px;
  text-transform: uppercase;
}

.cycle-primary-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cycle-pill,
.historical-cycle-select {
  background: #ffffff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: var(--amcas-link);
  font-size: 0.94rem;
  font-weight: 700;
  min-height: 34px;
}

.cycle-pill {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
  padding: 0 10px;
  text-decoration: none;
}

.cycle-pill:hover {
  border-color: #9bbadd;
  text-decoration: none;
}

.cycle-pill.is-active {
  background: var(--amcas-accent-soft);
  border-color: rgba(47, 125, 109, 0.55);
  color: #18594d;
}

.cycle-pill-label,
.cycle-pill-year {
  display: block;
  white-space: nowrap;
}

.cycle-pill-label {
  font-size: 0.8rem;
}

.cycle-pill-year {
  font-size: 0.98rem;
}

.historical-cycle-select {
  appearance: auto;
  cursor: pointer;
  padding: 0 8px;
}

.workspace-grid {
  align-items: flex-start;
}

.sidebar-panel,
.content-panel,
.chart-panel,
.table-panel,
.transcriptStatus,
.applicationEntry {
  background: var(--amcas-panel);
  border: 1px solid var(--amcas-border);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.07);
}

.sidebar-panel {
  margin-bottom: 24px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.sidebar-secondary {
  padding-top: 0;
  position: static;
  top: auto;
}

.entry-panel .form-group {
  margin-bottom: 0.9rem;
}

.entry-panel small {
  display: block;
  line-height: 1.35;
}

.entry-heading {
  border-bottom: 1px solid var(--amcas-border);
  margin: -2px 0 14px;
  padding-bottom: 10px;
}

.entry-heading h2 {
  color: #1f2d44;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.25;
  margin: 0;
}

.content-panel {
  padding: 16px;
}

.chart-panel,
.table-panel {
  padding: 18px;
}

.chart-panel + .chart-panel,
.chart-panel + .table-panel {
  margin-top: 24px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.section-heading h2,
.section-heading h4 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.section-heading h4 {
  font-size: 1.05rem;
}

#appn,
#tsn {
  color: var(--amcas-accent);
  font-weight: 750;
}

.section-note,
.pull-note,
.table-note {
  color: var(--amcas-muted);
}

.chart-container,
.chart-ts-container {
  background: var(--amcas-panel-soft);
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  height: 58vh !important;
  margin-top: 14px;
  min-height: 360px;
  overflow: hidden;
  padding: 14px;
}

.pull-note {
  border-top: 1px solid var(--amcas-border);
  display: block;
  margin-top: 14px;
  padding-top: 12px;
}

.form-group label {
  color: #243149;
  font-weight: 650;
}

.form-control {
  border-color: #cfd8e6;
  border-radius: 7px;
  box-shadow: none;
  min-height: 42px;
}

.form-control:focus {
  border-color: #6d9cd2;
  box-shadow: 0 0 0 0.18rem rgba(34, 94, 168, 0.14);
}

.form-check {
  background: #fbfcff;
  border: 1px solid #e5ebf4;
  border-radius: 7px;
  margin-bottom: 6px;
  padding: 7px 9px 7px 31px;
}

.form-check-input {
  margin-top: 0.42rem;
}

.radio-card-grid {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.identity-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.identity-options .radio-card {
  align-items: center;
  border-radius: 0;
  justify-content: center;
  min-height: 36px;
  padding: 7px 6px;
}

.identity-options .radio-card:first-child {
  border-bottom-left-radius: 7px;
  border-top-left-radius: 7px;
}

.identity-options .radio-card:last-child {
  border-bottom-right-radius: 7px;
  border-top-right-radius: 7px;
}

.identity-options .radio-card + .radio-card {
  margin-left: -1px;
}

.identity-options .radio-card .form-check-input {
  margin-top: 0;
}

.delivery-options {
  gap: 0;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delivery-options .radio-card {
  align-items: center;
  border-radius: 0;
  gap: 6px;
  height: 100%;
  justify-content: center;
  min-height: 40px;
  padding: 8px 7px;
  text-align: center;
}

.delivery-options .radio-card:nth-child(1) {
  border-top-left-radius: 7px;
}

.delivery-options .radio-card:nth-child(2) {
  border-top-right-radius: 7px;
}

.delivery-options .radio-card:nth-child(3) {
  border-bottom-left-radius: 7px;
  margin-top: -1px;
}

.delivery-options .radio-card:nth-child(4) {
  border-bottom-right-radius: 7px;
  margin-left: -1px;
  margin-top: -1px;
}

.delivery-options .radio-card:nth-child(2) {
  margin-left: -1px;
}

.delivery-options .radio-card .form-check-input {
  margin-top: 0;
}

.delivery-options .radio-card span {
  line-height: 1.15;
}

.radio-card {
  align-items: flex-start;
  background: #fbfcff;
  border: 1px solid #e5ebf4;
  border-radius: 7px;
  color: #243149;
  cursor: pointer;
  display: flex;
  font-weight: 600;
  gap: 8px;
  line-height: 1.28;
  margin: 0;
  min-height: 42px;
  padding: 9px 10px;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.radio-card:hover,
.radio-card:focus-within {
  background: #f3f8ff;
  border-color: #b8cce6;
}

.radio-card .form-check-input {
  flex: 0 0 auto;
  margin: 0.2rem 0 0;
  position: static;
}

.radio-card span {
  display: block;
  min-width: 0;
}

.radio-card:has(input:checked) {
  background: var(--amcas-accent-soft);
  border-color: rgba(47, 125, 109, 0.55);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 109, 0.2);
}

.btn {
  border-radius: 7px;
  font-weight: 650;
  white-space: normal;
}

.btn-warning {
  background: var(--amcas-warning);
  border-color: #e1a52d;
  color: #18202f;
}

.btn-primary {
  background: var(--amcas-link);
  border-color: var(--amcas-link);
}

.btn-success {
  background: var(--amcas-accent);
  border-color: var(--amcas-accent);
}

.btn-danger {
  background: var(--amcas-danger);
  border-color: var(--amcas-danger);
}

.action-block {
  margin-top: 12px;
}

.action-block small {
  margin-top: 8px;
}

.support-block {
  color: var(--amcas-muted);
  margin-top: 0;
  padding-top: 18px;
}

.support-block p {
  margin-bottom: 0.7rem;
}

.sidebar-links {
  margin-top: 18px;
}

.sidebar-title {
  color: #27334a;
  font-size: 1rem;
  font-weight: 750;
  margin: 16px 0 10px;
}

.sidebar-links ul {
  list-style: none;
  margin: 0;
  padding-left: 0 !important;
}

.sidebar-link {
  display: block;
  font-weight: 650;
  padding: 5px 0;
}

.interview-coach-hero {
  background: #103f55;
  border-radius: 8px;
  color: #ffffff;
  display: block;
  padding: 16px;
  text-decoration: none;
}

.interview-coach-hero:hover {
  color: #ffffff;
  text-decoration: none;
}

.interview-coach-hero strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.15;
  margin-bottom: 7px;
}

.interview-coach-hero span {
  display: block;
}

.interview-coach-hero > span:not(.hero-kicker):not(.hero-cta) {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  line-height: 1.35;
}

.hero-kicker {
  color: #f7d775;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-cta {
  align-items: center;
  background: #ffffff;
  border-radius: 7px;
  color: #103f55;
  display: inline-flex !important;
  font-weight: 800;
  margin-top: 13px;
  padding: 7px 10px;
}

.partner-logo {
  display: block;
  margin-top: 20px;
  max-width: 100%;
}

.legal-footer {
  border-top: 1px solid var(--amcas-border);
  color: var(--amcas-muted);
  font-size: 0.78rem;
  line-height: 1.38;
  margin-top: 18px;
  padding-top: 14px;
}

.legal-footer p {
  margin-bottom: 0.55rem;
}

.legal-footer p:last-child {
  margin-bottom: 0;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.legal-links a {
  font-weight: 650;
}

.transcriptStatus,
.applicationEntry {
  box-shadow: none;
  margin-top: 18px;
  padding: 14px;
}

.transcriptStatus + .transcriptStatus {
  margin-top: 16px;
}

.form-section-header {
  align-items: flex-start;
  border-bottom: 1px solid #e9eef6;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.form-section-header h3 {
  color: #1f2d44;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
  margin: 0;
}

.form-section-header p {
  color: var(--amcas-muted);
  font-size: 0.9rem;
  margin: 0;
}

.transcriptStatus .form-section-header p {
  display: none;
}

.date-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.date-field label {
  display: block;
  font-size: 0.94rem;
  line-height: 1.32;
  margin-bottom: 5px;
}

.date-field {
  position: relative;
}

.date-input-wrap {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #cbd7e8;
  border-radius: 8px;
  display: flex;
  min-height: 42px;
  overflow: hidden;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.date-input-wrap:focus-within,
.date-input-wrap:hover {
  border-color: #8fb3dd;
  box-shadow: 0 0 0 3px rgba(34, 94, 168, 0.1);
}

.date-input-wrap .form-control {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--amcas-text);
  cursor: pointer;
  font-weight: 650;
  min-width: 0;
  padding: 0 9px;
}

.date-input-wrap .form-control::placeholder {
  color: #6a7485;
  font-weight: 500;
}

.date-picker-button {
  background: #eef5ff;
  border: 0;
  border-left: 1px solid #cbd7e8;
  color: var(--amcas-link);
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 750;
  min-width: 70px;
  padding: 0 9px;
  transition:
    background-color 120ms ease,
    color 120ms ease;
}

.date-picker-button:focus,
.date-picker-button:hover {
  background: var(--amcas-link);
  color: #ffffff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.transcriptStatus .form-actions {
  justify-content: center;
}

.entry-help {
  color: var(--amcas-muted);
  display: block;
  margin-top: 10px;
}

.entry-help-callout {
  background: transparent;
  border-left: 3px solid #f1cf68;
  color: var(--amcas-muted);
  font-size: 0.88rem;
  font-weight: 650;
  padding: 2px 0 2px 8px;
}

.clear-date {
  display: inline-block;
  font-size: 0.88rem;
  margin-top: 5px;
}

.flatpickr-calendar.hasTime {
  overflow: hidden;
}

.flatpickr-done-row {
  background: #f8fbff;
  border-top: 1px solid #dce3ee;
  padding: 8px;
  text-align: right;
}

.flatpickr-done-button {
  background: var(--amcas-link);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 750;
  min-height: 32px;
  padding: 0 14px;
}

.flatpickr-done-button:focus,
.flatpickr-done-button:hover {
  background: #174473;
}

.table {
  color: var(--amcas-text);
  table-layout: fixed;
  margin-bottom: 0;
  width: 100%;
}

.table td,
.table thead th {
  padding: 0.55rem 0.6rem;
  vertical-align: middle;
}

.table thead th {
  background: #eef4fb;
  border-bottom: 1px solid var(--amcas-border);
  color: #27334a;
  font-size: 0.88rem;
  font-weight: 750;
}

.transcript-date-col {
  width: 30%;
}

.transcript-method-col {
  text-align: center;
  width: 17.5%;
}

.table-label-short {
  display: none;
}

.scroll {
  border: 1px solid var(--amcas-border);
  border-radius: 8px;
  margin-top: 0;
  max-height: 240px !important;
  overflow-y: auto;
}

.transcript-table-scroll {
  max-height: 200px !important;
}

#tbody tr:nth-child(even) td {
  filter: saturate(0.92);
}

@media (max-width: 767.98px) {
  .app-shell {
    padding-top: 16px;
  }

  .app-title {
    font-size: 2rem;
  }

  .cycle-nav {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .cycle-primary-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cycle-pill {
    justify-content: center;
    text-align: center;
  }

  .historical-cycle-select {
    width: 100%;
  }

  .sidebar-panel {
    margin-top: 22px;
    position: static;
  }

  .entry-panel {
    margin-top: 0;
  }

  .content-panel {
    padding: 14px;
  }

  .chart-container,
  .chart-ts-container {
    height: 430px !important;
    min-height: 430px;
  }

  .table-panel {
    padding: 14px;
  }

  .table td,
  .table thead th {
    font-size: 0.82rem;
    line-height: 1.15;
    padding: 0.48rem 0.24rem;
  }

  .transcript-date-col {
    width: 33%;
  }

  .transcript-method-col {
    width: 16.75%;
  }

  .table-label-full {
    display: none;
  }

  .table-label-short {
    display: inline;
  }

  .identity-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
