/*
 * Mural Enterprises admin theme.
 *
 * Colours are sampled from public/images/mural.png so the panel matches the
 * real logo: deep green disc border, red horns, cream field.
 *
 * Loaded on every admin page through the "MuralBrand" entry in
 * config/adminlte.php, so the whole panel is branded and not just the stock
 * screens.
 */
:root {
  --mural-green: #006030;
  --mural-green-dark: #004a24;
  --mural-green-soft: #e6f0ea;
  --mural-red: #d81f1f;
  --mural-cream: #f0e090;
}

/* ---------- Sidebar ----------
 * Left on AdminLTE's stock dark-primary colours by request. The one rule
 * kept is not a colour choice: it gives the round logo mark a light disc
 * so it stays legible against whatever the sidebar colour is.
 */
.brand-link .brand-image {
  background: #fff;
  padding: 2px;
}

/* ---------- Buttons and accents ---------- */
.btn-mural {
  background-color: var(--mural-green);
  border-color: var(--mural-green);
  color: #fff;
}

.btn-mural:hover,
.btn-mural:focus,
.btn-mural:active {
  background-color: var(--mural-green-dark);
  border-color: var(--mural-green-dark);
  color: #fff;
}

.bg-mural {
  background-color: var(--mural-green) !important;
  color: #fff;
}

.text-mural {
  color: var(--mural-green) !important;
}

.card-mural > .card-header {
  background-color: var(--mural-green);
  color: #fff;
}

/*
 * Retint AdminLTE's primary so admin content pages inherit the brand.
 * Scoped to .content-wrapper — the dashboard/livestock/supplies/etc. pages —
 * so it does not reach the login screen, which also uses .btn-primary and
 * .card-primary but is meant to stay on AdminLTE's stock colours.
 */
.content-wrapper .btn-primary {
  background-color: var(--mural-green);
  border-color: var(--mural-green);
}

.content-wrapper .btn-primary:hover,
.content-wrapper .btn-primary:focus,
.content-wrapper .btn-primary:active {
  background-color: var(--mural-green-dark);
  border-color: var(--mural-green-dark);
}

.content-wrapper .card-primary:not(.card-outline) > .card-header {
  background-color: var(--mural-green);
}

.content-wrapper .card-primary.card-outline {
  border-top: 3px solid var(--mural-green);
}

.btn-success {
  background-color: var(--mural-green);
  border-color: var(--mural-green);
}

.btn-success:hover {
  background-color: var(--mural-green-dark);
  border-color: var(--mural-green-dark);
}

/*
 * Scoped for the same reason as .btn-primary above: keeps the login
 * screen's "forgot password" / "register" links on AdminLTE's defaults.
 *
 * :not(.btn) matters: without it, this rule's specificity (class + tag)
 * beats a plain single-class rule like .btn-mural { color: #fff }, which
 * turned every button styled as an <a> — "Open report" on the reports
 * index, for one — into green text on a green background, invisible.
 * Buttons are never meant to take the plain-link colour regardless.
 */
.content-wrapper a:not(.btn) {
  color: var(--mural-green);
}

.content-wrapper a:not(.btn):hover {
  color: var(--mural-green-dark);
}

.page-item.active .page-link {
  background-color: var(--mural-green);
  border-color: var(--mural-green);
}

.page-link {
  color: var(--mural-green);
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--mural-green);
  border-color: var(--mural-green);
}

/* ---------- Tables and stock cues ---------- */
.table thead th {
  border-top: 0;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #6c757d;
}

.stock-pill {
  font-size: .72rem;
  padding: .22rem .5rem;
  border-radius: 10rem;
}

.ledger-in {
  color: var(--mural-green);
  font-weight: 600;
}

.ledger-out {
  color: var(--mural-red);
  font-weight: 600;
}

.content-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* ---------- Login and register screens ----------
 * Left on AdminLTE's stock colours by request. As with the sidebar, the one
 * rule kept isn't a colour choice — it's a light backdrop so the round logo
 * mark stays legible.
 */
.login-logo img,
.register-logo img {
  background: #fff;
  border-radius: 50%;
  padding: 6px;
}

/* ---------- Print ---------- */
@media print {
  .main-sidebar,
  .main-header,
  .main-footer,
  .no-print {
    display: none !important;
  }

  .content-wrapper {
    margin-left: 0 !important;
  }

  .card {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
  }
}
