/* AAF Generator -- Lasallian Youth Orchestra
   Clean, minimal theme with a single green accent, built for readability.
   Loaded after Bootstrap 5.3.8's CDN stylesheet on every page, so plain
   selectors here (no !important needed) win on equal specificity. */

:root {
  --green: #0f8a4b;
  --green-dark: #0b6b3a;
  --green-tint: #eef8f2;
  --green-tint-strong: #dcf1e4;
  --ink: #202628;
  --ink-muted: #6b7278;
  --line: #e3e6e8;
  --paper: #fbfcfb;
  --radius-lg: 0.75rem;
  --radius-md: 0.5rem;
  --radius-sm: 0.4rem;
  --shadow-card: 0 1px 2px rgba(16, 24, 32, 0.04), 0 12px 28px -14px rgba(16, 24, 32, 0.14);
  --shadow-card-hover: 0 1px 2px rgba(16, 24, 32, 0.05), 0 18px 34px -14px rgba(16, 24, 32, 0.18);
}

html, body {
  min-height: 100%;
}

body {
  /* A very soft green wash anchored at the top of the page, fading
     quickly into the paper color -- adds warmth without competing with
     the form for attention. */
  background:
    radial-gradient(60rem 22rem at 50% -6rem, var(--green-tint) 0%, rgba(238, 248, 242, 0) 70%),
    var(--paper);
  background-attachment: fixed;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 2.5rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .card-title {
  font-family: inherit;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Page header ---------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: 2.25rem 1rem 1.75rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.site-header__mark {
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  object-fit: contain;
}

.site-header__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-header__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.site-header__title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.card--official {
  border-top: 3px solid var(--green);
}

.card-body {
  padding: 2rem 1.85rem;
}

.card-title {
  font-size: 1.1rem;
}

.card-subtitle-text {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Forms ---------- */
label, .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink);
}

.form-control, .form-select {
  border-color: var(--line);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:hover, .form-select:hover {
  border-color: #c7ccd0;
}

.form-control:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 0.18rem rgba(15, 138, 75, 0.15);
}

.form-control[readonly] {
  background-color: var(--green-tint);
  color: var(--green-dark);
  font-weight: 500;
  border-color: var(--green-tint-strong);
}

.form-text {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.form-check-input:checked {
  background-color: var(--green);
  border-color: var(--green);
}

.form-check-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 0.18rem rgba(15, 138, 75, 0.15);
}

/* Native file inputs -- style the button portion so uploads feel like
   part of the same system instead of a raw OS control. */
.form-control[type="file"] {
  padding: 0.45rem 0.8rem;
}

.form-control[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--green-tint);
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.form-control[type="file"]:hover::file-selector-button {
  background: var(--green-tint-strong);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px -8px rgba(15, 138, 75, 0.5);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.18rem rgba(15, 138, 75, 0.25);
}

.btn-primary:active {
  transform: translateY(1px);
}

a {
  color: var(--green-dark);
}

a:hover {
  color: var(--green);
}

/* ---------- Field rows (course / professor lists) ---------- */
.field-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.1rem;
  border-bottom: 1px solid var(--line);
}

.field-row:last-of-type {
  border-bottom: none;
}

.field-row__label {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink);
}

/* ---------- Page footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.78rem;
  margin-top: 2.5rem;
}

.site-footer__dot {
  color: var(--line);
}

/* ---------- Submitted / preview page ---------- */
.preview-shell {
  display: flex;
  min-height: 70vh;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}

.preview-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 1.1rem 0.9rem;
  overflow-y: auto;
}

.preview-sidebar h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.8rem;
}

.file-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.file-btn span {
  overflow-wrap: anywhere;
}

.file-btn:hover {
  background: var(--green-tint);
  border-color: var(--green);
}

.file-btn.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.preview-viewer {
  flex-grow: 1;
  background: #525659;
}

.preview-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.preview-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background-color: var(--green);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.download-btn:hover {
  background-color: var(--green-dark);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
  .site-header {
    padding: 1.75rem 1rem 1.25rem;
  }

  .site-header__mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .site-header__title {
    font-size: 1.1rem;
  }

  .card-body {
    padding: 1.5rem 1.25rem;
  }

  .preview-shell {
    flex-direction: column;
  }

  .preview-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
