/* academic-page.css — soften the Bootstrap academic form, cards, and tabulator
   table so they sit inside the new db-* shell. Form markup/logic unchanged. */

.academic-shell .card { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.academic-shell .alert-info {
  background: var(--primary-soft); border: none; border-radius: 14px;
  color: var(--primary-700); font-size: 13.5px;
}
.academic-shell .alert-info a { color: var(--primary); font-weight: 700; }

/* student photo block */
.academic-shell .academic-detail-photo { border-radius: 14px; }

/* form controls */
.academic-shell .form-control,
.academic-shell .form-select {
  border-radius: 10px; border-color: var(--line2); font-weight: 600; color: var(--ink);
}
.academic-shell .form-control:focus,
.academic-shell .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.academic-shell .form-label { font-weight: 700; color: var(--ink); font-size: 13px; }

/* primary buttons within the form pick up the new look */
.academic-shell .btn-primary {
  background: var(--primary); border-color: var(--primary); border-radius: 10px; font-weight: 700;
}
.academic-shell .btn-primary:hover { background: var(--primary-700); border-color: var(--primary-700); }

/* tabulator academic table */
.academic-shell .tabulator {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--card); font-family: inherit;
}
.academic-shell .tabulator .tabulator-header {
  background: #fafbfc; border-bottom: 1px solid var(--line);
}
.academic-shell .tabulator .tabulator-col { background: #fafbfc; }

/* ---- flat form treatment: simple sections, no elevated cards ---- */
.academic-shell .card { box-shadow: none; }
.academic-shell .accordion-button {
  box-shadow: none !important;
  border-color: var(--line) !important;
}
.academic-shell .accordion-item {
  border: 1.5px solid #8fb2e6 !important; /* match profile accordions */
}
.academic-shell form .card,
.academic-shell .border { border-color: var(--line) !important; border-radius: 12px; }

/* tighter field spacing + stronger primary actions */
.academic-shell .mb-3 { margin-bottom: .6rem !important; }
.academic-shell .mb-4 { margin-bottom: .85rem !important; }
.academic-shell .form-control, .academic-shell .form-select { padding: 8px 12px; font-size: 13.5px; }
.academic-shell .btn-primary, .academic-shell .btn-success {
  border: none; border-radius: 10px; font-weight: 700; padding: 9px 18px;
  box-shadow: 0 1px 2px rgba(20,30,45,.06), 0 2px 8px rgba(47,95,192,.18);
}
.academic-shell .btn-success { background: var(--green); }
.academic-shell .btn-success:hover { background: #3f6d17; }

/* ---- redesigned academic layout components ---- */
/* small round student photo in the card header */
.acad-photo {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); flex: 0 0 auto;
}

/* applied-scholarships list: height-limited + compact cards */
.acad-apps { max-height: 178px; overflow-y: auto; }
.acad-apps .card {
  background: #fafbfc !important; border: 1px solid var(--line);
  border-radius: 11px; margin-bottom: 8px !important; padding: 9px 11px !important;
}
.acad-apps .fw-medium { font-size: 12px; font-weight: 600; color: var(--ink2); line-height: 1.5; }
.acad-apps .fw-medium:first-child { color: var(--ink); font-weight: 700; }

/* class links look clickable: chip style */
.acad-apps .class-link {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 11.5px; border-radius: 99px; padding: 2px 9px;
  margin: 1px 1px; text-decoration: none; transition: background .14s;
}
.acad-apps .class-link:hover { background: #dfeafa; }

/* form actions row */
.acad-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 4px 2px 8px;
}

/* tighter vertical rhythm in the academic cards */
.academic-shell .form-label { margin-bottom: 3px; }
.academic-shell .row.g-2 + .row.g-2 { margin-top: 2px; }

/* "Needed by your applications" — single-column tidy rows, name first */
.acad-apps .row { margin: 0; }
.acad-apps .col-md-6 { width: 100%; padding: 0; }
.acad-apps .card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card) !important;
}
.acad-apps .card > div:nth-child(1) { order: 2; font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.acad-apps .card > div:nth-child(2) { order: 1; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.acad-apps .card > div:nth-child(3) { order: 3; margin-top: 3px; }

/* academic years table — kill the legacy yellow, modern look */
#academic-details-table { background: var(--card) !important; }
#academic-details-table .tabulator-header {
  background: #fafbfc; border-bottom: 1px solid var(--line);
}
#academic-details-table .tabulator-col {
  background: #fafbfc !important; border-right: none;
}
#academic-details-table .tabulator-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--ink3);
}
#academic-details-table .tabulator-row {
  border-bottom: 1px solid var(--line); background: var(--card);
  font-size: 12px; font-weight: 600; color: var(--ink); min-height: 30px;
}
#academic-details-table .tabulator-row:nth-child(even) { background: #fafbfc; }
#academic-details-table .tabulator-row:hover { background: var(--primary-soft) !important; }
#academic-details-table .tabulator-cell { border-right: none; padding: 4px 7px; }

/* inline row actions */
.acad-row-btn {
  border: 1px solid var(--line2); background: var(--card); color: var(--ink2);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; margin: 0 2px; transition: background .14s, color .14s;
}
.acad-row-btn.edit:hover { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.acad-row-btn.del:hover { background: var(--red-soft); color: var(--red); border-color: transparent; }

/* table header filters */
#academic-details-table .tabulator-header-filter input {
  border: 1px solid var(--line2); border-radius: 7px; padding: 3px 7px;
  font-family: inherit; font-size: 11.5px; font-weight: 500; color: var(--ink);
  background: var(--card); width: 100%;
}
#academic-details-table .tabulator-header-filter input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft);
}

/* update-mode button on the amber palette */
.academic-shell .btn-warning {
  background: var(--amber); border: none; color: #fff;
  border-radius: 10px; font-weight: 700; padding: 9px 18px;
}
.academic-shell .btn-warning:hover { background: #a36808; color: #fff; }

/* collapsed-row toggle + sub-list styling */
#academic-details-table .tabulator-responsive-collapse-toggle {
  background: var(--primary-soft); color: var(--primary); border-radius: 7px;
}
#academic-details-table .tabulator-responsive-collapse { border-top: 1px solid var(--line); }
#academic-details-table .tabulator-responsive-collapse td { font-size: 12px; padding: 3px 6px; }
