html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --ink: #1f2933;
  --muted: #64748b;
  --line: #e3d9ce;
  --primary: #7c2d12;
  --primary-strong: #431407;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --gold: #d97706;
  --berry: #be123c;
  --sky: #2563eb;
  --warning: #b45309;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #157347;
  --success-soft: #e9f7ef;
  --shadow: 0 16px 40px rgba(67, 20, 7, .1);
  --shadow-soft: 0 10px 24px rgba(31, 41, 51, .08);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100%;
  margin-bottom: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, .2), transparent 24rem),
    radial-gradient(circle at top right, rgba(15, 118, 110, .14), transparent 28rem),
    linear-gradient(180deg, #fffaf4 0, var(--bg) 22rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
h5 {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.65rem, 2vw, 2.25rem);
}

.app-navbar {
  background:
    linear-gradient(90deg, rgba(124, 45, 18, .98), rgba(180, 83, 9, .96) 52%, rgba(15, 118, 110, .96));
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 30px rgba(67, 20, 7, .18);
  backdrop-filter: blur(12px);
}

.navbar-brand {
  align-items: center;
  color: #fff !important;
  display: inline-flex;
  font-size: 1.15rem;
  font-weight: 800;
  gap: .55rem;
}

.navbar-brand::before {
  align-items: center;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 8px;
  content: "LB";
  display: inline-flex;
  font-size: .78rem;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, .84) !important;
  border-radius: 6px;
  font-weight: 650;
  padding: .45rem .8rem !important;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(255, 255, 255, .16);
  color: #fff !important;
}

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

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

.app-shell {
  max-width: 1180px;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: .35rem 0;
}

.page-header h1 {
  margin-bottom: .25rem;
}

.text-muted,
.text-muted.mb-0,
.text-muted.small {
  color: var(--muted) !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 18px 44px rgba(67, 20, 7, .13);
}

.card-header {
  background: linear-gradient(90deg, #fff7ed, #ecfdf5);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
}

.card-body.p-4::before {
  display: none;
}

.stat-card {
  min-height: 142px;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 247, 237, .9)),
    var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.stat-card::after {
  background: rgba(217, 119, 6, .12);
  border-radius: 999px;
  content: "";
  height: 7rem;
  position: absolute;
  right: -2.8rem;
  top: -2.5rem;
  width: 7rem;
}

.row .col-md-4:nth-child(2) .stat-card {
  border-left-color: var(--accent);
}

.row .col-md-4:nth-child(2) .stat-card::after {
  background: rgba(15, 118, 110, .13);
}

.row .col-md-4:nth-child(3) .stat-card {
  border-left-color: var(--berry);
}

.row .col-md-4:nth-child(3) .stat-card::after {
  background: rgba(190, 18, 60, .1);
}

.stat-card .label {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 750;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: .65rem;
  color: var(--primary-strong);
  font-size: 2.4rem;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: .7rem;
  color: var(--muted);
  font-size: .92rem;
}

.feature-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  box-shadow: var(--shadow-soft);
  color: #fff;
  font-weight: 800;
}

.table-toolbar {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: #fffaf4;
}

.table-toolbar .form-control {
  max-width: 420px;
}

.table {
  margin: 0;
  color: var(--ink);
  font-size: .92rem;
}

.table thead th {
  background: #f8eadc;
  color: #5f321b;
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: .85rem 1rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  border-bottom: 1px solid var(--line);
  padding: .8rem 1rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: #fff7ed;
}

.fw-medium,
.fw-semibold {
  font-weight: 750;
}

.badge-active,
.badge-inactive {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
  gap: .35rem;
  padding: .32rem .7rem;
  white-space: nowrap;
}

.badge-active {
  background: var(--success-soft);
  border: 1px solid rgba(21, 115, 71, .22);
  color: var(--success);
}

.badge-active::before {
  content: "";
  width: .42rem;
  height: .42rem;
  background: currentColor;
  border-radius: 50%;
}

.badge-inactive {
  background: #fff7e8;
  border: 1px solid rgba(183, 121, 31, .24);
  color: var(--warning);
}

.badge-inactive::before {
  content: "";
  width: .42rem;
  height: .42rem;
  background: currentColor;
  border-radius: 50%;
}

.form-label {
  color: #4b2e21;
  font-size: .88rem;
  font-weight: 750;
  margin-bottom: .35rem;
}

.form-control,
.form-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: .58rem .75rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .14);
}

.form-control:hover,
.form-select:hover {
  border-color: #d6a37c;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  letter-spacing: 0;
  padding: .5rem .95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #b45309) !important;
  border-color: #8a3b13 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(124, 45, 18, .2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary)) !important;
  border-color: var(--primary-strong) !important;
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border-color: var(--line) !important;
  color: #44505e !important;
}

.btn-outline-secondary:hover {
  background: var(--surface-soft) !important;
  border-color: #d6a37c !important;
}

.btn-danger,
.btn-outline-danger:hover {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.btn-outline-danger {
  border-color: rgba(180, 35, 24, .35) !important;
  color: var(--danger) !important;
}

.btn-action {
  min-width: 76px;
  padding: .35rem .65rem !important;
  font-size: .82rem !important;
}

.alert {
  border-radius: 6px;
}

.alert-success {
  background: linear-gradient(90deg, var(--success-soft), #fff7ed);
  border-color: rgba(21, 115, 71, .2);
  color: var(--success);
}

.alert-danger {
  background: var(--danger-soft);
  border-color: rgba(180, 35, 24, .22);
  color: var(--danger);
}

.validation-summary-valid {
  display: none;
}

.app-alert {
  margin-bottom: 1rem;
}

dl.row dt {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
}

dl.row dd {
  border-bottom: 1px dashed var(--line);
  padding-bottom: .35rem;
}

.text-center.py-5 {
  color: var(--muted);
}

.empty-state {
  background: linear-gradient(135deg, #fff7ed, #ecfdf5);
  border-top: 1px solid var(--line);
}

.no-results-row td {
  background: #fff7ed;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 576px) {
  .app-shell {
    padding-top: 1rem;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header .btn,
  form .btn {
    width: 100%;
  }

  form .d-flex {
    flex-direction: column;
  }

  .table-toolbar .form-control {
    max-width: none;
  }
}
