/* =====================================================================
   RegSearch theme. Follows the RegBackfile theme (header, cards, tables, pills, buttons) on a light-blue map
   instead of the olive one, so the text on the ground is dark navy and the accent is navy.
   ===================================================================== */
:root {
  --rs-bg: #c6dcf2;          /* shows if the map image is missing */
  --rs-accent: #1f4e79;
  --rs-accent-lift: #2b6496;
  --rs-accent-dark: #173d5f;
  --rs-ink: #13283d;
  --rs-paper: #fafafa;
  --rs-hover: #dde9f6;
  --rs-line: rgba(19, 40, 61, .2);
  --rs-shadow-sm: 1px 1px 4px rgba(0, 0, 0, .2);
  --rs-ease: cubic-bezier(.2, .8, .2, 1);
}
html { font-size: 14px; }
body.rs-app {
  background: var(--rs-bg) url('../images/bg.png') center / cover fixed no-repeat;
  color: var(--rs-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 17px; min-height: 100vh;
}
.rs-app h1, .rs-app h2, .rs-app h3, .rs-app h4, .rs-app h5, .rs-app h6 { color: var(--rs-ink); }
.rs-app .text-muted { color: #4b6178 !important; }

/* Header: logo with a ring, two-line bold title, name and Sign Out on the right */
.rs-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 56px; padding: 0 17px; color: var(--rs-ink); }
.rs-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--rs-ink) !important; text-decoration: none; font-weight: 700; font-size: 14px; line-height: 17px; }
.rs-logo { display: inline-flex; width: 36px; height: 33px; flex: 0 0 auto; border: 1px solid #b9c7d6; border-radius: 50%; overflow: hidden; background: #fff; }
.rs-logo svg { width: 100%; height: 100%; }
.rs-user { display: flex; align-items: center; gap: 14px; margin: 0; }
.rs-user-name { color: var(--rs-ink); font-size: 16px; line-height: 19px; }
.rs-btn-light {
  --bs-btn-color: var(--rs-ink); --bs-btn-bg: #fff; --bs-btn-border-color: rgba(31, 78, 121, .25);
  --bs-btn-hover-color: #000; --bs-btn-hover-bg: #eef4fb; --bs-btn-hover-border-color: rgba(31, 78, 121, .45);
  --bs-btn-active-color: #000; --bs-btn-active-bg: #dde9f6; --bs-btn-active-border-color: rgba(31, 78, 121, .45);
  border-radius: 8px; padding: 8px 13px 7px 14px; font-size: 14px; line-height: 17px; font-weight: 400;
}
.rs-main { padding: 40px 0 48px; }

.rs-footer { color: #4b6178; font-size: 12px; padding: 0 0 18px; }

/* White surfaces */
.rs-app .card, .rs-app .modal-content, .rs-app .list-group-item, .rs-app .alert { color: #000; }
.rs-app .card {
  background: #fff; border: .5px solid rgba(0, 0, 0, .15); border-radius: 8px;
  box-shadow: 4px 4px 7.3px rgba(0, 0, 0, .18), inset 0 -6px 4.8px rgba(0, 0, 0, .06);
}
.rs-app .card:hover { box-shadow: 4px 6px 12px rgba(0, 0, 0, .2), inset 0 -6px 4.8px rgba(0, 0, 0, .06); }
.rs-app .form-control, .rs-app .form-select { border-color: rgba(0, 0, 0, .28); transition: border-color .15s, box-shadow .15s; }
.rs-app .form-control:focus, .rs-app .form-select:focus { border-color: #f2b705; box-shadow: 0 0 0 .2rem rgba(242, 183, 5, .25); }

/* Buttons react to the pointer and to a click */
.rs-app .btn { border-radius: 8px; transition: transform .15s var(--rs-ease), box-shadow .15s, background-color .15s, color .15s, border-color .15s; }
.rs-app .btn:not(:disabled):not(.disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.rs-app .btn:not(:disabled):not(.disabled):active { transform: translateY(1px) scale(.97); box-shadow: none; transition-duration: .05s; }
.rs-app .btn-link:hover { box-shadow: none !important; transform: none !important; }
.rs-app .btn-primary, .rs-app .btn-dark {
  --bs-btn-color: #fff; --bs-btn-bg: var(--rs-accent); --bs-btn-border-color: var(--rs-accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--rs-accent-lift); --bs-btn-hover-border-color: var(--rs-accent-lift);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--rs-accent-dark); --bs-btn-active-border-color: var(--rs-accent-dark);
  --bs-btn-disabled-bg: #8fa9c2; --bs-btn-disabled-border-color: #8fa9c2; --bs-btn-disabled-color: #fff;
}
.rs-app .btn-outline-secondary {
  --bs-btn-color: #000; --bs-btn-bg: #fafafa; --bs-btn-border-color: rgba(31, 78, 121, .31);
  --bs-btn-hover-color: #000; --bs-btn-hover-bg: #e3edf8; --bs-btn-hover-border-color: var(--rs-accent);
  --bs-btn-active-color: #000; --bs-btn-active-bg: #cfe0f2; --bs-btn-active-border-color: var(--rs-accent);
  --bs-btn-disabled-color: #6b7f93; --bs-btn-disabled-bg: #f1f4f8; --bs-btn-disabled-border-color: rgba(31, 78, 121, .18);
}

/* Results table: a white card, 54px header row, rows light up under the pointer with a navy edge */
.rs-table-card { overflow: hidden; }
.rs-app .table { --bs-table-color: #000; --bs-table-bg: transparent; --bs-table-hover-color: #000; --bs-table-hover-bg: var(--rs-hover); margin-bottom: 0; font-size: 14px; line-height: 17px; }
.rs-app .table > thead > tr > th { height: 54px; padding: 17px 16px; font-weight: 400; font-size: 15px; line-height: 19px; color: #000; background: #f4f8fc; border-bottom: 1px solid var(--rs-line); vertical-align: middle; white-space: nowrap; }
.rs-app .table > tbody > tr > td { padding: 12px 16px; vertical-align: middle; border-bottom-color: rgba(19, 40, 61, .08); }
.rs-app .table > tbody > tr { cursor: pointer; }
.rs-app .table > :not(caption) > * > * { transition: box-shadow .18s ease; }
.rs-app .table > tbody > tr:hover > * { box-shadow: inset 0 0 0 9999px var(--rs-hover); }
.rs-app .table > tbody > tr:hover > td:first-child { box-shadow: inset 0 0 0 9999px var(--rs-hover), inset 4px 0 0 var(--rs-accent); }

/* Pills, as in RegBackfile: rounded, thin border, dark text, stage colours shared with it */
.rs-app .badge { border: 1px solid rgba(0, 0, 0, .28); border-radius: 8px; padding: 2px 10px; font-size: 13px; line-height: 17px; font-weight: 400; color: #000; }
.rs-app .badge.rs-old { background: #dde3ea; }
.rs-app .badge.rs-new { background: var(--rs-accent); border-color: var(--rs-accent); color: #fff; }
.rs-app .badge.rs-registered, .rs-app .badge.rs-complete { background: #b7ddb0; }
.rs-app .badge.rs-progress, .rs-app .badge.rs-drafting { background: #fab82a; }
.rs-app .badge.rs-review { background: #9fcbe8; }
.rs-app .badge.rs-doc { font-size: .6rem; padding: 0 6px; border-radius: 6px; }
.rs-app .badge.rs-out { background: #cfe0f2; }
.rs-app .badge.rs-sup { background: #eceff3; }

/* Detail window */
.rs-modal-head { background: var(--rs-accent); color: #fff; }
.rs-modal-head .badge.rs-new { background: #fff; color: var(--rs-accent); border-color: #fff; }
.rs-app .list-group-item.active { background: var(--rs-accent); border-color: var(--rs-accent); color: #fff; }
.rs-app .list-group-item-action:hover { background: var(--rs-hover); }

/* Empty state sits on the map, so it uses the navy ink */
.rs-empty { color: var(--rs-ink); }
.rs-empty code { color: var(--rs-accent); background: rgba(255, 255, 255, .65); padding: 1px 5px; border-radius: 4px; }
.rs-status { color: var(--rs-ink); }

/* Sign-in page: the card sits in the middle of the screen, a little above centre */
.rs-bare { min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; padding: 24px 24px 72px; }
.rs-login-card { width: 100%; max-width: 26rem; }

@media (prefers-reduced-motion: reduce) {
  .rs-app .btn, .rs-app .card { transition-duration: .01ms !important; }
  .rs-app .btn:hover { transform: none !important; }
}
@media (max-width: 575.98px) {
  .rs-top { padding: 0 12px; }
  .rs-user-name { display: none; }
  .rs-main { padding-top: 20px; }
}
