:root {
  --punk-black: #0b1018;
  --punk-red: #7788ad;
  --punk-red-dark: #536486;
  --punk-ivory: #f4f5f7;
  --punk-ink: #1c1f27;
  --punk-gray: #6d7384;
  --fitness-accent: #6f82ab;
  --fitness-accent-soft: #cad2e3;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

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

body {
  margin-bottom: 60px;
  color: var(--punk-ink);
  background-color: #090d14;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(96, 124, 172, 0.2), transparent 33%),
    radial-gradient(circle at 86% 10%, rgba(162, 178, 212, 0.12), transparent 36%),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.015) 0 2px, rgba(0, 0, 0, 0) 2px 16px),
    linear-gradient(180deg, #0d1119 0%, #080b12 100%);
  font-family: Consolas, "Courier New", monospace;
}

* {
  font-family: Consolas, "Courier New", monospace;
}

h1,
h2,
h3,
h4,
h5 {
  color: #f2f4f8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.app-navbar {
  background:
    linear-gradient(95deg, rgba(121, 141, 182, 0.15) 0%, rgba(12, 17, 26, 0.22) 22%, rgba(8, 11, 18, 0.96) 100%),
    linear-gradient(180deg, #101724 0%, #090e16 100%);
  border-bottom-color: rgba(184, 196, 224, 0.35) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.44);
}

.navbar-brand {
  color: #f0f3fb !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0;
}

.brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(145, 167, 208, 0.38), rgba(89, 104, 135, 0.1));
  border: 1px solid rgba(177, 194, 227, 0.48);
  box-shadow: 0 0 0 3px rgba(148, 167, 203, 0.12);
}

.brand-wordmark-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  line-height: 1;
}

.brand-wordmark {
  font-size: 1.1rem;
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: rgba(208, 218, 240, 0.95);
}

.btn-outline-secondary{
min-width:77px;

}

.app-nav-link {
  color: #dce3f5 !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 0.85rem !important;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.app-nav-link:hover,
.app-nav-link:focus,
.app-nav-link.active {
  color: #f5f7fd !important;
  background-color: rgba(130, 148, 187, 0.2);
  border-color: rgba(191, 204, 232, 0.38);
}


.settings-gear-icon {
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.42rem;
  opacity: 0.94;
}
.dropdown-menu {
  background-color: #f2f4f8;
  border: 1px solid rgba(35, 42, 58, 0.2);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(3, 8, 16, 0.28);
  margin-top: 0.5rem;
}

.dropdown-item {
  color: var(--punk-ink);
  padding: 0.62rem 1rem;
  font-weight: 600;
  border-radius: 10px;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #dde4f0;
  color: #2f3a52;
}

.brand-logo {
  width: 40px;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.card {
  border: 1px solid rgba(25, 31, 44, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #f3f4f6 0%, #ebedf1 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.card-title {
  color: #1a1e28;
}

.table {
  --bs-table-bg: #f3f4f6;
  --bs-table-striped-bg: #e8eaee;
  --bs-table-color: var(--punk-ink);
  border-color: rgba(31, 38, 51, 0.2);
}

.table thead th {
  background: linear-gradient(180deg, #d9dde5 0%, #ccd2dc 100%);
  color: #1f2633;
  border-bottom: 2px solid rgba(96, 110, 137, 0.46);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.86rem;
}

.card-header {
  background-color: transparent !important;
  border-bottom: none;
}

.card-header .btn-link {
  color: var(--punk-red-dark) !important;
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.card-header .btn-link:hover,
.card-header .btn-link:not(.collapsed) {
  color: #4f5f84 !important;
}

.table tbody tr.year-separator td {
  border-top: 2px solid #6f7d98;
}

.workout-row-link {
  cursor: pointer;
}

.workout-row-link:hover td {
  background-color: #dce3ef;
}

.score-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.score-bar-track {
  width: 170px;
  max-width: 100%;
  height: 0.9rem;
  border: 1px solid rgba(28, 35, 49, 0.22);
  background-color: #dce1ea;
}

.score-bar-fill {
  height: 100%;
  background-color: #6a7e9f;
}

.number-value {
  font-family: Consolas, "Courier New", monospace;
  text-align: right;
  font-weight: 500;
  display: inline-block;
  min-width: 3.6em;
  padding-right: 0.2em;
}

.score-bar-value {
  min-width: 2.8rem;
  text-align: right;
  font-weight: 500;
  font-family: Consolas, "Courier New", monospace;
}

.score-intensity {
  color: var(--score-color, #cb6400);
  font-weight: 700;
}

.lifts-table .rank-col,
.lifts-table .lift-rank-cell {
  width: 1%;
  white-space: nowrap;
}

.lifts-table .date-col,
.lifts-table .lift-date-cell {
  white-space: nowrap;
}

.lifts-table .number-value-compact {
  min-width: 1.6em;
  padding-right: 0;
}

@media (max-width: 576px) {
  .lifts-table .rank-col,
  .lifts-table .lift-rank-cell {
    width: 2.0rem;
    max-width: 2.0rem;
    text-align: left !important;
  }

  .lifts-table .date-col,
  .lifts-table .lift-date-cell {
    min-width: 6.9rem;
  }
}

.lift-highlight-options {
  border: 0;
  margin: 0;
  padding: 0;
}

.lift-highlight-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--punk-ink);
}

.lift-highlight-row td {
  background-color: #ece7d8 !important;
}

.lift-highlight-row td:first-child {
  box-shadow: inset 4px 0 0 #6b7792;
}

#lifts-content {
  position: relative;
}

#lifts-content.lifts-loading {
  pointer-events: none;
}

#lifts-content.lifts-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(232, 235, 241, 0.72);
  z-index: 10;
}

#lifts-content.lifts-loading::after {
  content: "";
  position: absolute;
  width: 1.8rem;
  height: 1.8rem;
  top: 50%;
  left: 50%;
  margin-top: -0.9rem;
  margin-left: -0.9rem;
  border: 2px solid rgba(80, 92, 118, 0.18);
  border-top-color: #495872;
  border-radius: 50%;
  animation: lifts-spin 0.65s linear infinite;
  z-index: 11;
}

@keyframes lifts-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #5f7196;
  --bs-btn-border-color: #4f5f84;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #4f5f84;
  --bs-btn-hover-border-color: #445273;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #445273;
  --bs-btn-active-border-color: #445273;
}

.form-control {
  border: 1px solid rgba(35, 42, 58, 0.22);
  border-radius: 12px;
  background-color: #f4f5f8;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(106, 126, 166, 0.28);
  border-color: #62739a;
}

.alert-warning {
  color: #4b4130;
  background: #f2ead7;
  border: 1px solid #cfbb8d;
  border-radius: 12px;
}

.alert-success {
  color: #233e31;
  background: #ddeee6;
  border: 1px solid #8fbda7;
  border-radius: 12px;
}

.import-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 24, 38, 0.66);
  backdrop-filter: blur(2px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.import-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.import-loading-card {
  min-width: min(90vw, 22rem);
  max-width: 26rem;
  padding: 1.5rem 1.75rem;
  text-align: center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 26, 40, 0.98), rgba(8, 12, 20, 0.98));
  color: #f7fbff;
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.35);
}

.app-footer {
  background-color: #ecf2fb;
  border-top-color: rgba(25, 35, 50, 0.18) !important;
  color: #1a2738 !important;
}

.footer-logo {
  width: 34px;
  height: auto;
}

.text-muted {
  color: var(--punk-gray) !important;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.monthly-row-link {
  cursor: pointer;
}

.monthly-row-link:hover td {
  background-color: #e2e6ec !important;
}

.monthly-lift-card {
  border: 1px solid rgba(25, 35, 50, 0.16);
}

.monthly-lift-name {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--punk-ink);
}

.monthly-lift-date {
  font-size: 0.78rem;
  color: var(--punk-gray);
  white-space: nowrap;
  font-family: Consolas, "Courier New", monospace;
}

.monthly-dategroup-nowrap {
  white-space: nowrap;
}

.monthly-lift-score {
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.monthly-lift-score-empty {
  color: var(--punk-gray);
  font-size: 2.4rem;
}

.monthly-lift-repsweight {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  color: var(--punk-ink);
}

.monthly-calendar-card {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.monthly-calendar {
  max-width: 420px;
}

.monthly-calendar-weekdays,
.monthly-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.monthly-calendar-weekdays {
  margin-bottom: 0.6rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  color: var(--punk-ink);
}

.monthly-calendar-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2rem;
}

.monthly-calendar-cell .day-number {
  width: 2.05rem;
  height: 2.05rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  color: var(--punk-ink);
}

.monthly-calendar-cell .day-number.workout-day {
  border: 2px solid #6a7b9d;
}

.monthly-calendar-cell.outside-month .day-number {
  opacity: 0.35;
  background: repeating-linear-gradient(
    45deg,
    rgba(24, 22, 20, 0.03),
    rgba(24, 22, 20, 0.03) 4px,
    rgba(24, 22, 20, 0.08) 4px,
    rgba(24, 22, 20, 0.08) 8px
  );
}
/* Training program uses the existing Bootstrap cards, palette and typeface. */
.program-intro, .program-intro a { color: #c7d1e5; }
.program-page .card h2, .program-page .card h3 { color: var(--punk-ink); }
.program-round-nav, .program-totals { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.program-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.program-exercise { padding: 1rem 1.25rem; border-bottom: 1px solid #c7cdd7; border-left: 4px solid transparent; }
.program-exercise:last-child { border-bottom: 0; }
.program-exercise h3 { line-height: 1.7; letter-spacing: 0; }
.program-priority { border-left-color: var(--fitness-accent); }
.program-priority h3 { font-size: 1.12rem; }
.program-tier-one { color: #0b5ed7; background: transparent; }
.program-complete { border-left-color: #347953; background: #d2edda; }
.program-complete .program-status { color: #22613e; font-weight: bold; }
.program-status { margin-top: .35rem; }
.program-optional { display: block; font-size: .8rem; margin-bottom: .35rem; color: #4d586e; }
.program-actual { margin: .5rem 0 0; padding-left: 1.3rem; font-size: .85rem; }
.program-progress { display: block; width: 100%; height: 1rem; margin-top: .6rem; accent-color: #537b62; }
.program-form { display: grid; gap: .75rem; margin-top: .75rem; }
.program-form label { display: grid; gap: .25rem; font-size: .85rem; }
.program-form select { max-width: 100%; }
.program-page summary { cursor: pointer; }
.program-page .validation-summary-valid { display: none; }
@media (max-width: 767px) {
  .program-days { grid-template-columns: minmax(0, 1fr); }
  .program-round-nav { gap: .5rem; }
  .program-round-nav a { flex: 1 1 auto; font-size: .8rem; }
  .program-exercise { padding: 1rem; overflow-wrap: anywhere; }
  .program-form .form-select { font-size: .85rem; }
}

.program-day { display: block; }
.program-day > summary { display: flex; align-items: center; gap: .65rem; list-style: none; }
.program-day > summary::-webkit-details-marker { display: none; }
.program-day > summary::after { content: "▸"; margin-left: auto; }
.program-day[open] > summary::after { content: "▾"; }
.program-day > summary:focus-visible { outline: 2px solid #0b5ed7; outline-offset: -3px; }
.program-day-complete > summary { background: #d2edda; border-left: 4px solid #347953; }
.program-day-check { color: #22613e; margin-right: .35rem; }
.program-day:not([open]) > summary { border-bottom: 0; border-radius: inherit; }