/* applications.css — page-specific styles for the redesigned applications page.
   The application cards themselves are still rendered with Bootstrap classes by
   applications.js (unchanged); these rules soften them to sit inside the new
   db-* shell. Status tracker styling for the band at the top lives here too. */

/* application cards rendered by applications.js */
#application-summary-container .card {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
#application-summary-container .card-body { padding: 14px 16px; }

/* compact card header: thumb + title/meta + actions */
.app-head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.app-thumb {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
}
.app-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-thumb-fb {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 9px; font-weight: 800; text-align: center;
  word-break: break-all; line-height: 1.15; padding: 2px;
}
.app-thumb-fb .bi { font-size: 20px; }
.app-main { flex: 1 1 auto; min-width: 160px; }
.app-title {
  font-size: 14.5px; font-weight: 800; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.app-meta {
  font-size: 11.5px; color: var(--ink2); font-weight: 500; margin-top: 3px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.app-meta span { white-space: nowrap; }
.app-meta .app-id { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.app-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* soften the functional alert blocks inside the card */
#application-summary-container .alert { border-radius: 11px; border: none; }
#application-summary-container .alert-info { background: var(--primary-soft); }
#application-summary-container .alert-warning { background: var(--amber-soft); }
#application-summary-container .alert-primary { background: var(--primary-soft); }
#application-summary-container .badge { border-radius: 99px; font-weight: 700; }
#application-summary-container .btn { border-radius: 9px; font-weight: 600; }

@media (max-width: 760px) {
  #application-summary-container .card { border-radius: 12px; }
  #application-summary-container .card-body { padding: 12px 13px; }
  #application-summary-container .card.mb-3 { margin-bottom: 10px !important; }
  #application-summary-container .row.mt-3 { margin-top: 10px !important; }
  .app-head { gap: 10px; }
  .app-thumb { width: 38px; height: 38px; border-radius: 9px; }
  .app-thumb-fb { font-size: 8px; }
  .app-title { font-size: 13.5px; gap: 7px; }
  .app-meta { font-size: 11px; gap: 6px; margin-top: 2px; }
  .app-actions { width: 100%; margin-top: 4px; gap: 7px; }
  .app-actions .dk-btn { flex: 1 1 auto; font-size: 13px; height: 38px; padding: 0 10px; }
  .app-reminder-row { flex-wrap: wrap; row-gap: 4px; }
  .app-reminder-ctl { width: 100%; justify-content: space-between; }
}


/* tinted action chips — actions that navigate or commit get their own colour so
   the row reads as distinct affordances; slate is the shared neutral for the
   toggles that merely disclose a panel further down the card */
.dk-btn-amber { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.dk-btn-amber:hover { background: #f7e5c1; color: var(--amber); box-shadow: none; }
.dk-btn-teal { background: var(--teal-soft); color: var(--teal); box-shadow: none; }
.dk-btn-teal:hover { background: #d4ebe7; color: var(--teal); box-shadow: none; }
.dk-btn-green { background: var(--green-soft); color: var(--green); box-shadow: none; }
.dk-btn-green:hover { background: #e0eed0; color: var(--green); box-shadow: none; }
.dk-btn-violet { background: var(--violet-soft); color: var(--violet); box-shadow: none; }
.dk-btn-violet:hover { background: #e4dbf6; color: var(--violet); box-shadow: none; }
.dk-btn-slate { background: #eef1f5; color: var(--ink2); box-shadow: none; border: none; }
.dk-btn-slate:hover { background: #e3e8ee; color: var(--ink); box-shadow: none; }

/* collapsible auto-email reminder opt-out panel (toggled from the actions row) */
.app-reminders {
  border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: #fafbfc;
}
.app-reminder-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.app-reminder-row:first-child { border-top: none; padding-top: 2px; }
.app-reminder-name { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }

/* status text sits beside the toggle on the right side of the row */
.app-reminder-ctl { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; justify-content: flex-end; }
.app-reminder-status { font-size: 11.5px; color: var(--ink2); text-align: right; }

/* switch sits right, with a word naming the state it is currently in, so the
   toggle never has to be interpreted on its own */
.app-reminder-switch { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-left: 0; }
.app-reminder-switch .form-check-input { cursor: pointer; margin: 0; float: none; }
.app-reminder-switch .form-check-label {
  font-size: 12px; font-weight: 700; cursor: pointer; min-width: 44px;
  color: var(--ink);
}
.app-reminder-switch .form-check-input:not(:checked) ~ .form-check-label { color: var(--ink2); }

/* collapsible disbursal-request history (toggled from the actions row) */
.app-req-history {
  border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: #fafbfc;
}
.app-req-history h6 { font-size: 13px; font-weight: 700; color: var(--ink2); }
