html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* --- Rad Resolve brand palette (shared with Follow-Up Manager) --- */
:root {
  --rr-navy: #0f1e31;
  --rr-navy-dark: #0a1524;
  --rr-blue: #5784b5;
  --rr-blue-dark: #3f6a99;
  --rr-blue-light: #e9f0f7;
}

a {
  color: var(--rr-blue-dark);
}

a:hover {
  color: var(--rr-navy);
}

.btn-primary {
  background-color: var(--rr-navy);
  border-color: var(--rr-navy);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--rr-blue-dark) !important;
  border-color: var(--rr-blue-dark) !important;
}

.btn-outline-primary {
  color: var(--rr-blue-dark);
  border-color: var(--rr-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--rr-blue) !important;
  border-color: var(--rr-blue) !important;
  color: #fff !important;
}

.text-primary {
  color: var(--rr-blue-dark) !important;
}

.border-primary {
  border-color: var(--rr-navy) !important;
}

.form-check-input:checked {
  background-color: var(--rr-navy);
  border-color: var(--rr-navy);
}

/* --- Nav bar --- */
.lf-navbar {
  background-color: var(--rr-navy);
}

.lf-navbar .navbar-brand {
  color: #fff;
  font-weight: 600;
}

.lf-navbar .navbar-brand:hover {
  color: #fff;
}

.lf-navbar .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.lf-navbar .nav-link:hover,
.lf-navbar .nav-link.nav-current {
  background-color: var(--rr-blue);
  color: #fff;
  border-radius: 0.25rem;
}

#mobileSidebar {
  width: 250px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--rr-blue);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.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;
}
/* --- Organization logo / brand mark ---
   Display sizes: login 280x96, sidebar 182x56, mobile bar 140x32, public invoice/estimate header 240x64 (CSS pixels). */
.lf-brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  max-width: 100%;
}

.lf-logo-img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lf-brand-auth .lf-logo-img { max-width: min(280px, 100%); max-height: 96px; }
.lf-brand-sidebar .lf-logo-img { max-width: min(182px, 100%); max-height: 56px; }
.lf-brand-mobile .lf-logo-img { max-width: min(140px, 100%); max-height: 32px; }
.lf-brand-public .lf-logo-img { max-width: min(240px, 100%); max-height: 64px; }

/* The staff menu is dark navy, so the logo sits on a white plate to stay visible whatever colors it uses. */
.lf-logo-plate {
  display: inline-block;
  background: #fff;
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  line-height: 0;
  max-width: 100%;
}

.lf-brand-mobile .lf-logo-plate { padding: 0.2rem 0.4rem; }

.lf-logo-frame { display: inline-block; line-height: 0; max-width: 100%; }

.lf-brand-name { font-weight: 600; }
.lf-brand-sidebar .lf-brand-name,
.lf-brand-mobile .lf-brand-name { color: #fff; }
.lf-brand-sidebar { flex-wrap: wrap; gap: 0.4rem; }
.lf-brand-public .lf-brand-name { font-size: 1.5rem; }
.lf-brand-auth.lf-brand-textonly .lf-brand-name { font-size: 1.75rem; color: var(--rr-navy); }

/* Login / account screens, shown without the staff menu */
.lf-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 1.5rem;
  background: #f5f7fa;
}

.lf-auth-brand { margin-bottom: 1.5rem; text-align: center; }

.lf-auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

/* Identity's pages lay their forms out in narrow Bootstrap columns; inside the card they should fill it. */
.lf-auth-card .row > [class*="col-"] { width: 100%; flex: 0 0 100%; max-width: 100%; }
.lf-auth-card .col-md-4:empty, .lf-auth-card .col-md-6.col-md-offset-2:empty { display: none; }
.lf-auth-card section + section { margin-top: 1.5rem; }

/* Checkerboard behind a logo preview so transparent logos are visible */
.lf-checker { background: repeating-conic-gradient(#f1f3f5 0% 25%, #fff 0% 50%) 50% / 16px 16px; }

/* On the login screen the name (if shown) goes under the logo, both centered */
.lf-brand-auth { flex-direction: column; justify-content: center; text-align: center; }
.lf-brand-auth .lf-brand-name { font-size: 1.25rem; color: var(--rr-navy); }
