/* =====================================================================
   Livestock Transport ERP - theme built from the company logo
   Maroon  #8c0f28 (logo red)   |   Forest green #0a5a2e (logo green)
   ===================================================================== */
:root {
  --maroon-950: #2a040b;
  --maroon-900: #3f0611;
  --maroon-800: #5a0b1a;
  --maroon-700: #75102a;
  --maroon-600: #8c0f28;
  --maroon-500: #a8163a;
  --maroon-100: #f9e6ea;
  --maroon-50:  #fdf4f6;

  --green-900: #03301a;
  --green-800: #04421f;
  --green-700: #0a5a2e;
  --green-600: #12743d;
  --green-500: #1a9150;
  --green-300: #57c98a;
  --green-100: #e2f3e9;

  --amber-600: #a86200;
  --amber-100: #fff1d6;
  --sky-700: #0b5f83;
  --sky-100: #dff2fb;

  --ink: #251b1e;
  --muted: #74696d;
  --paper: #f5f2f1;
  --line: #ebe5e6;
  --card: #ffffff;
  --sidebar-w: 268px;

  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-primary: #8c0f28;
  --bs-primary-rgb: 140, 15, 40;
  --bs-success: #0a5a2e;
  --bs-success-rgb: 10, 90, 46;
  --bs-danger: #b3261e;
  --bs-danger-rgb: 179, 38, 30;
  --bs-link-color: #8c0f28;
  --bs-link-hover-color: #5a0b1a;
  --bs-border-color: var(--line);
  --bs-border-radius: .6rem;
  --bs-border-radius-lg: .9rem;
}

html { scroll-behavior: smooth; }
body { font-size: .925rem; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid rgba(26, 145, 80, .55); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: .6rem; }
.btn-primary {
  --bs-btn-bg: #8c0f28; --bs-btn-border-color: #8c0f28;
  --bs-btn-hover-bg: #75102a; --bs-btn-hover-border-color: #75102a;
  --bs-btn-active-bg: #5a0b1a; --bs-btn-active-border-color: #5a0b1a;
  --bs-btn-disabled-bg: #8c0f28; --bs-btn-disabled-border-color: #8c0f28;
  --bs-btn-focus-shadow-rgb: 140, 15, 40;
}
.btn-success {
  --bs-btn-bg: #0a5a2e; --bs-btn-border-color: #0a5a2e;
  --bs-btn-hover-bg: #04421f; --bs-btn-hover-border-color: #04421f;
  --bs-btn-active-bg: #03301a; --bs-btn-active-border-color: #03301a;
  --bs-btn-disabled-bg: #0a5a2e; --bs-btn-disabled-border-color: #0a5a2e;
  --bs-btn-focus-shadow-rgb: 10, 90, 46;
}
.btn-outline-primary {
  --bs-btn-color: #8c0f28; --bs-btn-border-color: #d9b3bc;
  --bs-btn-hover-bg: #8c0f28; --bs-btn-hover-border-color: #8c0f28;
  --bs-btn-active-bg: #75102a; --bs-btn-active-border-color: #75102a;
}
.btn-outline-success {
  --bs-btn-color: #0a5a2e; --bs-btn-border-color: #a8d5b9;
  --bs-btn-hover-bg: #0a5a2e; --bs-btn-hover-border-color: #0a5a2e;
  --bs-btn-active-bg: #04421f; --bs-btn-active-border-color: #04421f;
}
.no-print a{
  vertical-align: text-top;
}
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f6f1f2; }
.btn-icon { border: 0; background: transparent; padding: .35rem .5rem; color: var(--ink); }
.btn-icon-soft { width: 34px; height: 34px; padding: 0; border: 0; border-radius: .55rem; background: transparent; color: var(--muted); }
.btn-icon-soft:hover { background: var(--maroon-50); color: var(--maroon-600); }
.btn-icon-soft.text-danger:hover { background: #fde8e6; color: #b3261e !important; }
.btn-icon-soft.text-success:hover { background: var(--green-100); color: var(--green-700) !important; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: #4b4145; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #ddd4d6; border-radius: .6rem; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--maroon-500); box-shadow: 0 0 0 .22rem rgba(140, 15, 40, .13); }
.form-check-input:checked { background-color: var(--maroon-600); border-color: var(--maroon-600); }
.form-check-input:focus { border-color: var(--maroon-500); box-shadow: 0 0 0 .22rem rgba(140, 15, 40, .13); }
.form-control::placeholder { color: #b0a5a9; }
.form-text { font-size: .77rem; }
.form-control[readonly] { background: #faf7f7; }
.section-title { font-size: .95rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .55rem; }
.section-title i { color: var(--green-700); }

/* ---------- Shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  display: flex; flex-direction: column;
  background: linear-gradient(185deg, var(--maroon-800) 0%, var(--maroon-900) 55%, var(--maroon-950) 100%);
  color: rgba(255, 255, 255, .78);
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: .8rem; padding: 1.15rem 1.25rem; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand:hover { color: #fff; }
.brand-logo { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.brand-logo img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; }
.brand-text { line-height: 1.2; min-width: 0; }
.brand-text strong { display: block; font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: rgba(255, 255, 255, .55); font-size: .74rem; }

.side-nav { flex: 1; overflow-y: auto; padding: 1rem .8rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.side-link {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: .62rem .85rem; margin-bottom: .15rem;
  border: 0; background: transparent; color: rgba(255, 255, 255, .8); border-radius: .65rem;
  font-weight: 600; font-size: .88rem; text-align: left; position: relative;
}
.side-link i:first-child { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.active { background: rgba(255, 255, 255, .12); color: #fff; }
.side-link.active::before, .side-sublink.active::before {
  content: ''; position: absolute; left: -.8rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--green-300);
}
.side-group .caret { margin-left: auto; font-size: .75rem; transition: transform .2s; }
.side-group:not(.collapsed) .caret { transform: rotate(180deg); }
.side-group:not(.collapsed) { color: #fff; }
.side-sub { margin: .1rem 0 .55rem 1.35rem; padding-left: .75rem; border-left: 1px solid rgba(255, 255, 255, .14); }
.side-sublink {
  display: flex; align-items: center; gap: .6rem; padding: .48rem .7rem; border-radius: .55rem; position: relative;
  color: rgba(255, 255, 255, .66); font-size: .84rem; font-weight: 500;
}
.side-sublink:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-sublink.active { color: #fff; background: rgba(255, 255, 255, .1); font-weight: 600; }
.side-sublink.active::before { left: -.8rem; }
.side-sublink i { font-size: .9rem; opacity: .85; }
.side-foot { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); color: #fff; }
.side-foot small { color: rgba(255, 255, 255, .55); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(20, 3, 7, .55); z-index: 1035; }

.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-700); color: #fff; font-weight: 700; font-size: .85rem;
}
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; background: var(--maroon-600); }

.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1020; height: 64px; display: flex; align-items: center; gap: 1rem;
  padding: 0 1.75rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-title { line-height: 1.2; }
.date-chip { align-items: center; gap: .45rem; padding: .38rem .8rem; border-radius: 2rem; background: var(--green-100); color: var(--green-700); font-weight: 600; font-size: .8rem; }
.user-btn { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .25rem .4rem; border-radius: .7rem; color: var(--ink); }
.user-btn:hover { background: var(--maroon-50); }
.user-btn::after { margin-left: .2rem; color: var(--muted); }
.dropdown-menu { border-radius: .8rem; border-color: var(--line); padding: .4rem; }
.dropdown-item { border-radius: .5rem; font-weight: 500; }
.dropdown-item:active { background: var(--maroon-600); }

.content { flex: 1; padding: 1.75rem; max-width: 1500px; width: 100%; }
.app-footer { padding: 1rem 1.75rem; color: var(--muted); font-size: .8rem; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.page-title { font-size: 1.45rem; margin: 0; }
.page-sub { margin: .2rem 0 0; color: var(--muted); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: 1rem; background: var(--card); box-shadow: 0 1px 2px rgba(60, 10, 20, .04), 0 10px 28px rgba(60, 10, 20, .04); }
.card-body { padding: 1.35rem; }
.card-toolbar { padding: 1rem .6rem; border-bottom: 1px solid var(--line); }
.card-header-plain { padding: 1.1rem 1.35rem 0; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.search-box { position: relative; }
.search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #a89da1; }
.search-box .form-control { padding-left: 2.4rem; }

/* ---------- Tables ---------- */
.table-responsive{ padding: 1rem .6rem;}
.table-modern { --bs-table-hover-bg: #fbf7f8; margin-bottom: 0; }
.table-modern thead th {
  background: #faf6f7; color: #2e2d2e; font-weight: 600; font-size: .8rem; white-space: nowrap;
  border-bottom: 1px solid var(--line); padding: .4rem 1.1rem; border: 1px solid #bcb9bb;
}
.table-modern tbody td { padding: .15rem 1.1rem; border: 1px solid #bcb9bb; }
.table-modern tfoot td { padding: .85rem 1.1rem; background: #faf6f7; font-weight: 700; border-top: 1px solid var(--line); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.25rem; border-top: 1px solid var(--line); }
/* Row-actions cells (icon buttons/links/forms) always lay out in one horizontal line, vertically centered. */
/* .table-modern td.text-end.no-print { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; flex-wrap: nowrap; }
.table-modern td.text-end.no-print form { display: flex; margin: 0; } */
.pagination { --bs-pagination-active-bg: var(--maroon-600); --bs-pagination-active-border-color: var(--maroon-600); --bs-pagination-color: var(--maroon-700); --bs-pagination-hover-color: var(--maroon-800); --bs-pagination-focus-color: var(--maroon-800); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(140, 15, 40, .13); }
.cell-user { display: flex; align-items: center; gap: .75rem; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; font-size: .74rem; padding: .38em .7em; border-radius: 2rem; }
.badge-soft-success { background: var(--green-100); color: var(--green-700); }
.badge-soft-danger { background: var(--maroon-100); color: var(--maroon-600); }
.badge-soft-warning { background: var(--amber-100); color: var(--amber-600); }
.badge-soft-info { background: var(--sky-100); color: var(--sky-700); }
.badge-soft-secondary { background: #efeaeb; color: #6b6064; }
.badge-soft-dark { background: #2a1f22; color: #fff; }

/* ---------- Stat cards ---------- */
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; }
.stat-icon { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; }
.stat-icon.maroon { background: var(--maroon-100); color: var(--maroon-600); }
.stat-icon.green { background: var(--green-100); color: var(--green-700); }
.stat-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.stat-icon.sky { background: var(--sky-100); color: var(--sky-700); }
.stat-value { font-size: 1.55rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat-meta { font-size: .75rem; color: var(--muted); }

.alert-item { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-icon { width: 68px; height: 68px; margin: 0 auto 1rem; border-radius: 50%; background: var(--maroon-50); color: var(--maroon-500); display: grid; place-items: center; font-size: 1.8rem; }

/* ---------- Modals ---------- */
.modal-content { border: 0; border-radius: 1.1rem; box-shadow: 0 24px 60px rgba(40, 5, 12, .28); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1.1rem 1.5rem; }
.modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-body { padding: 1.4rem 1.5rem; }
.modal-footer { border-top: 1px solid var(--line); padding: .9rem 1.5rem; }
.confirm-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: #fde8e6; color: #b3261e; display: grid; place-items: center; font-size: 1.7rem; }

/* ---------- Toasts (top-right corner) ---------- */
.toast-container { z-index: 2000; width: min(390px, 100vw); }
.app-toast {
  width: 100%; border: 0; border-radius: .9rem; background: #fff; overflow: hidden; margin-bottom: .75rem;
  box-shadow: 0 12px 34px rgba(30, 5, 10, .22), 0 0 0 1px rgba(0, 0, 0, .04);
}
.app-toast-body { display: flex; align-items: flex-start; gap: .8rem; padding: .95rem 1rem .95rem .95rem; }
.app-toast-icon { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; }
.app-toast-text { flex: 1; line-height: 1.35; min-width: 0; }
.app-toast-text strong { display: block; font-size: .9rem; }
.app-toast-text span { color: #5f5559; font-size: .85rem; word-break: break-word; }
.app-toast .btn-close { font-size: .7rem; margin-top: .2rem; }
.app-toast-bar { height: 4px; transform-origin: left; animation: toast-bar linear forwards; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.app-toast-success .app-toast-icon { background: var(--green-100); color: var(--green-700); }
.app-toast-success .app-toast-bar { background: var(--green-600); }
.app-toast-error .app-toast-icon { background: var(--maroon-100); color: var(--maroon-600); }
.app-toast-error .app-toast-bar { background: var(--maroon-600); }
.app-toast-warning .app-toast-icon { background: var(--amber-100); color: var(--amber-600); }
.app-toast-warning .app-toast-bar { background: #e0932b; }
.app-toast-info .app-toast-icon { background: var(--sky-100); color: var(--sky-700); }
.app-toast-info .app-toast-bar { background: #2b9ac9; }

/* ---------- Rights matrix ---------- */
.rights-table th, .rights-table td { text-align: center; }
.rights-table th:first-child, .rights-table td:first-child { text-align: left; }
.rights-module td { background: var(--maroon-50); font-weight: 700; color: var(--maroon-700); }
.rights-table .form-check-input { width: 1.2rem; height: 1.2rem; cursor: pointer; margin: 0; }
.rights-table .rc-view:checked, .rights-table .col-all:checked { background-color: var(--green-700); border-color: var(--green-700); }

/* ---------- Trip / invoice forms ---------- */
.item-table th { font-size: .78rem; }
.item-table td { padding: .5rem .5rem; vertical-align: middle; }
.item-table .form-control, .item-table .form-select { padding: .42rem .6rem; }
.total-strip { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 1rem 1.25rem; background: #faf6f7; border-top: 1px solid var(--line); border-radius: 0 0 1rem 1rem; }
.total-strip div { line-height: 1.2; }
.total-strip small { color: var(--muted); display: block; font-size: .76rem; }
.total-strip b { font-size: 1.1rem; }
.kv { display: grid; grid-template-columns: 9.5rem 1fr; gap: .55rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; }

/* ---------- Invoice document ---------- */
.doc { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 2.4rem; max-width: 900px; margin: 0 auto; }
.doc-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; padding-bottom: 1.4rem; border-bottom: 3px solid var(--maroon-600); }
.doc-brand { display: flex; gap: 1rem; align-items: center; }
.doc-brand img { width: 74px; height: 74px; border-radius: 50%; }
.doc-title { font-size: 1.7rem; font-weight: 800; color: var(--maroon-600); text-align: right; line-height: 1.1; }
.doc table.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th { background: var(--maroon-600); color: #fff; padding: .6rem .8rem; font-weight: 600; font-size: .84rem; }
.doc-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.doc-total td { font-weight: 700; }
.doc-grand td { background: var(--green-100); color: var(--green-800); font-size: 1.05rem; font-weight: 800; }
.stamp { display: inline-block; border: 3px solid; border-radius: .5rem; padding: .15rem .8rem; font-weight: 800; letter-spacing: .05em; transform: rotate(-6deg); }
.stamp.paid { color: var(--green-600); border-color: var(--green-600); }
.stamp.void { color: #b3261e; border-color: #b3261e; }

/* ---------- Login ---------- */
.login-body { background: #fff; margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; }
.login-art {
  position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.75rem, 4vh, 3rem) clamp(1.75rem, 4vw, 3.5rem);
  background: linear-gradient(160deg, var(--maroon-700) 0%, var(--maroon-900) 70%, var(--maroon-950) 100%);
}
.ring { position: absolute; border-radius: 50%; border-style: solid; pointer-events: none; }
.ring-a { width: 640px; height: 640px; right: -230px; bottom: -250px; border-width: 46px; border-color: var(--green-800) var(--green-800) transparent transparent; transform: rotate(18deg); opacity: .95; }
.ring-b { width: 460px; height: 460px; right: -120px; bottom: -150px; border-width: 22px; border-color: transparent transparent rgba(255, 255, 255, .13) rgba(255, 255, 255, .13); transform: rotate(-12deg); }
.ring-c { width: 300px; height: 300px; left: -120px; top: -110px; border-width: 34px; border-color: rgba(255, 255, 255, .07); }
.login-art > * { position: relative; z-index: 1; }
.login-art > div { display: flex; flex-direction: column; gap: clamp(.9rem, 2.2vh, 1.5rem); }
.login-logo { width: 72px; height: 72px; border-radius: 50%; background: #fff; padding: 5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.login-logo img { width: 100%; height: 100%; border-radius: 50%; }
.login-art h1 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.35rem); font-weight: 800; line-height: 1.15; max-width: 440px; margin: 0; }
.login-art p.lead { color: rgba(255, 255, 255, .78); max-width: 420px; font-size: .95rem; margin: 0; }
.login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; max-width: 400px; }
.login-points li { display: flex; gap: .8rem; align-items: center; color: rgba(255, 255, 255, .88); font-weight: 500; font-size: .92rem; }
.login-points i { width: 32px; height: 32px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.login-art small { margin-top: clamp(1rem, 3vh, 2rem); display: block; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: clamp(1.75rem, 5vh, 2.5rem) 1.5rem; background: var(--paper); }
.login-card { width: 100%; max-width: 410px; margin: auto 0; }
.login-card h2 { font-size: 1.7rem; font-weight: 800; }
.input-icon { position: relative; }
.input-icon > i.lead-icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #a89da1; z-index: 3; }
.input-icon .form-control { padding-left: 2.6rem; height: 3rem; }
.input-icon .pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); z-index: 3; }
.btn-login { height: 3rem; font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .sidebar-backdrop.show { display: block; }
  .main-wrap { margin-left: 0; }
  .content { padding: 1.1rem; }
  .topbar { padding: 0 1rem; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .kv { grid-template-columns: 8rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .no-print, .toast-container, .app-footer, .sidebar-backdrop { display: none !important; }
  .main-wrap { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  body { background: #fff !important; font-size: 12px; }
  .card, .doc { box-shadow: none !important; border: 0 !important; }
  .doc { padding: 0; max-width: none; }
  .doc-table th { background: #8c0f28 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-grand td { background: #e2f3e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #ccc; }
}


/* =========================================================================
   One look for every input: white fields with the same border, radius and
   height — plain text boxes, plain dropdowns and Select2 dropdowns alike.
   ========================================================================= */
.form-control, .form-select { background-color: #fff; }
.form-control[readonly], .form-control:disabled, .form-select:disabled { background-color: #faf7f7; }

/* Select2 (loaded on a few pages): same metrics as .form-control / .form-select.
   "body" in front makes these win over the Select2 theme stylesheet that loads later. */
body .select2-container--bootstrap-5 .select2-selection {
  background-color: #fff; border: 1px solid #ddd4d6; border-radius: .6rem;
  min-height: calc(1.5em + 1.1rem + 2px); padding: .55rem .8rem; font-size: 1rem; box-shadow: none;
}
body .select2-container--bootstrap-5 .select2-selection--single { padding: .55rem 2.2rem .55rem .8rem; }
body .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.5; color: var(--bs-body-color); }
body .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { color: #b0a5a9; }
body .select2-container--bootstrap-5.select2-container--focus .select2-selection,
body .select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--maroon-500); box-shadow: 0 0 0 .22rem rgba(140, 15, 40, .13);
}
body .select2-container--bootstrap-5 .select2-dropdown { border-color: #ddd4d6; border-radius: .6rem; overflow: hidden; box-shadow: 0 10px 28px rgba(60, 10, 20, .12); }
body .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field { border-color: #ddd4d6; border-radius: .5rem; background-color: #fff; }
body .select2-container--bootstrap-5 .select2-results__option--highlighted { background-color: rgba(140, 15, 40, .1); color: var(--bs-body-color); }
body .select2-container--bootstrap-5 .select2-results__option--selected { background-color: #f6e9ec; color: var(--bs-body-color); }


/* =========================================================================
   Checkboxes / radio buttons: a clearly visible border so they can be seen on the beige page
   ========================================================================= */
.form-check-input {
  width: 1.15em; height: 1.15em; background-color: #fff;
  border: 1.5px solid #6f6166;
}
.form-check-input:hover:not(:disabled) { border-color: var(--maroon-500); }
.form-check-input:checked,
.form-check-input:indeterminate { background-color: var(--maroon-600); border-color: var(--maroon-600); }
.form-check-input:focus { border-color: var(--maroon-500); box-shadow: 0 0 0 .22rem rgba(140, 15, 40, .15); }
.form-check-input:disabled { border-color: #c9bfc3; background-color: #f1ecee; opacity: 1; }
