/* MissouriMVR Batching theme — palette extracted from www.missourimvr.com
   (crimson #be1e2d primary, #1e73be blue accent, #222/#444 text, Poppins + Roboto). */

:root {
  --brand: #be1e2d;
  --brand-dark: #9a1824;
  --brand-darker: #7e131d;
  --accent: #1e73be;
  --ink: #222222;
  --ink-soft: #444444;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --border: #e4e7ec;
  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, sans-serif;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background-color: var(--surface-muted);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, .navbar-brand, .btn, .card-header, .stat-value {
  font-family: var(--font-heading);
}

h1, h2, h3 {
  color: var(--ink);
}

/* ----- Navbar ----- */
.navbar-mvr {
  background: var(--ink);
  border-bottom: 3px solid var(--brand);
}

.navbar-mvr .navbar-brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
}

.navbar-mvr .navbar-brand .brand-accent {
  color: #ff6b76;
  font-weight: 300;
}

.navbar-mvr .nav-link,
.navbar-mvr .btn-link.nav-link {
  color: rgba(255, 255, 255, .85);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: .95rem;
}

.navbar-mvr .nav-link:hover,
.navbar-mvr .nav-link:focus {
  color: #fff;
}

.navbar-mvr .nav-link.active {
  color: #fff;
  border-bottom: 2px solid var(--brand);
}

.navbar-mvr .navbar-toggler {
  border-color: rgba(255, 255, 255, .3);
}

.navbar-mvr .navbar-toggler-icon {
  filter: invert(1);
}

/* ----- Buttons & links ----- */
.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.btn-brand:hover, .btn-brand:focus, .btn-brand:active {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-darker) !important;
  color: #fff !important;
}

.btn-outline-brand {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.btn-outline-brand:hover {
  background-color: var(--brand);
  color: #fff;
}

.link-brand {
  color: var(--accent);
  text-decoration: none;
}

.link-brand:hover {
  color: var(--brand);
  text-decoration: underline;
}

a {
  color: var(--accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(30, 115, 190, .25);
}

/* ----- Cards & tables ----- */
.card {
  border: 1px solid var(--border);
  border-radius: .5rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  overflow: hidden;
}

.card-header {
  background: var(--surface);
  border-bottom: 2px solid var(--brand);
  color: var(--ink);
}

.table thead th {
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-bottom-width: 1px;
}

/* ----- Hero (landing) ----- */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, #3a3a3a 60%, var(--brand-darker) 100%);
  color: #fff;
  border-radius: .75rem;
  padding: 4rem 2.5rem;
  margin-bottom: 2rem;
}

.hero h1 {
  color: #fff;
  font-weight: 700;
}

.hero .tagline {
  color: #ffb3ba;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.35rem;
}

.hero p.lead-copy {
  color: rgba(255, 255, 255, .85);
  max-width: 46rem;
}

.feature-card {
  height: 100%;
  text-align: center;
  padding: 1.5rem 1rem;
}

.feature-card .feature-icon {
  font-size: 2rem;
  color: var(--brand);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-top: .75rem;
}

.feature-card p {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ----- Stats (batch detail) ----- */
.stat-card .card-body {
  padding: .9rem 1.1rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.stat-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-soft);
}

/* ----- Alerts ----- */
.alert-brand {
  background: #fdf1f2;
  border: 1px solid #f3c2c7;
  color: var(--ink);
}

/* ----- Footer ----- */
.footer {
  flex-shrink: 0;
  background: var(--ink);
  color: rgba(255, 255, 255, .7);
  padding: 1.25rem 0;
  margin-top: 3rem;
  font-size: .85rem;
}

.footer a {
  color: rgba(255, 255, 255, .85);
}

/* ----- Forms ----- */
.form-label {
  font-weight: 500;
  color: var(--ink);
}

/* ----- Auth card ----- */
.auth-card {
  max-width: 26rem;
  margin: 3rem auto;
}

/* ----- Back button (pill, on-brand, arrow nudges on hover) ----- */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .95rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: .9rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2rem;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.btn-back:hover, .btn-back:focus {
  color: var(--accent);
  border-color: var(--accent);
  background: #eef5fc;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

.btn-back .btn-back-arrow {
  line-height: 1;
  transition: transform .15s ease;
}

.btn-back:hover .btn-back-arrow {
  transform: translateX(-3px);
}

/* ----- DataTables (server-side grids) ----- */
/* The "entries per page" selector and the export buttons share the top-left cell;
   give the buttons clear separation so they don't crowd the dropdown. */
div.dt-buttons {
  margin-top: .65rem;
}

/* Breathing room between the toolbar and the grid, and around paging controls. */
table.dataTable {
  margin-top: .85rem !important;
}

div.dt-layout-row + div.dt-layout-row {
  margin-top: .35rem;
}

/* Keep the search box from hugging the buttons row on narrow screens. */
div.dt-search {
  margin-bottom: .25rem;
}
