:root,
[data-bs-theme="light"] {
  --bs-primary: #087d3c;
  --bs-primary-rgb: 8, 125, 60;
  --bs-primary-text-emphasis: #07542c;
  --bs-primary-bg-subtle: #e6f5eb;
  --bs-primary-border-subtle: #b9e3c5;
  --bs-success: #087d3c;
  --bs-success-rgb: 8, 125, 60;
  --bs-success-bg-subtle: #e6f5eb;
  --bs-danger: #b72d32;
  --bs-danger-rgb: 183, 45, 50;
  --bs-danger-bg-subtle: #faebec;
  --bs-body-bg: #f4f7f5;
  --bs-body-bg-rgb: 244, 247, 245;
  --bs-link-color: #087d3c;
  --bs-link-hover-color: #075d30;
}

body { color: #263c31; }
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active { color: #fff; background-color: #087d3c; border-color: #087d3c; box-shadow: none; }
.btn-primary:hover,
.btn-primary:focus { background-color: #066a34; border-color: #066a34; }
.btn-outline-primary { color: #087d3c; border-color: #9ed1af; }
.btn-outline-primary:hover { color: #fff; background: #087d3c; border-color: #087d3c; }
.text-primary { color: #087d3c !important; }
.bg-primary { background-color: #087d3c !important; }
.bg-label-primary { color: #087d3c !important; background: #e6f5eb !important; }
.border-primary { border-color: #087d3c !important; }
.form-control:focus,
.form-select:focus { border-color: #61b77f; box-shadow: 0 0 0 .2rem rgba(8, 125, 60, .12); }
.form-check-input:checked { background-color: #087d3c; border-color: #087d3c; }
.page-item.active .page-link { background-color: #087d3c; border-color: #087d3c; }
#layout-menu { --bs-menu-active-bg: #087d3c; --bs-menu-active-color: #fff; }
#layout-menu .menu-item.active > .menu-link { background: #e5f4eb !important; color: #087d3c !important; }
#layout-menu .menu-item.active > .menu-link .menu-icon { color: #087d3c !important; }
.content-wrapper { background: #f4f7f5; }
.card { border-color: #e0ebe4; }

.cf-page-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cf-eyebrow { color: #087d3c; font-size: .75rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.cf-page-head h1 { margin: .35rem 0; color: #173629; font-size: clamp(1.6rem, 2.2vw, 2.3rem); font-weight: 750; }
.cf-page-head p { margin: 0; color: #61776a; font-size: .95rem; }
.cf-preview-badge { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #d7e9dd; border-radius: 2rem; padding: .5rem .8rem; background: #fff; color: #476353; font-size: .78rem; font-weight: 700; }
.cf-hero { padding: 1.8rem 2rem; border-radius: 1.1rem; background: linear-gradient(120deg, #093c28, #087d3c); color: #fff; box-shadow: 0 14px 32px rgba(8, 80, 43, .13); }
.cf-hero h2 { color: #fff; font-size: 1.7rem; margin: .35rem 0; }
.cf-hero p { color: #d5ecde; margin: 0; }
.cf-stat { border-radius: 1rem; border: 1px solid #dce9e0; background: #fff; padding: 1.2rem; min-height: 112px; }
.cf-stat small { display: block; color: #6e8174; font-weight: 650; }
.cf-stat strong { display: block; margin-top: .5rem; color: #173629; font-size: 1.75rem; line-height: 1.1; }
.cf-stat em { display: block; margin-top: .25rem; color: #087d3c; font-size: .76rem; font-style: normal; }
.cf-card { border: 1px solid #dce9e0; border-radius: 1rem; background: #fff; overflow: hidden; }
.cf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.3rem; border-bottom: 1px solid #e8efea; }
.cf-card-head h3 { margin: 0; color: #19392a; font-size: 1.05rem; }
.cf-table { width: 100%; border-collapse: collapse; }
.cf-table th { padding: .85rem 1rem; background: #f5f8f6; color: #637b6b; font-size: .71rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cf-table td { padding: .9rem 1rem; border-top: 1px solid #edf2ee; vertical-align: middle; font-size: .87rem; }
.cf-table tbody tr:hover { background: #f8fcf9; }
.cf-table strong { color: #1a382a; }
.cf-table small { display: block; color: #779082; }
.cf-pill { display: inline-block; padding: .3rem .55rem; border-radius: 99px; background: #e6f5eb; color: #087d3c; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.cf-pill.warn { background: #fff3e5; color: #a66416; }
.cf-pill.danger { background: #faebec; color: #b72d32; }
.cf-progress { height: .42rem; border-radius: 1rem; background: #e8efea; overflow: hidden; }
.cf-progress > span { display: block; height: 100%; background: #11a359; }
.cf-stack { display: grid; gap: 1rem; }
.cf-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .8rem; }
.cf-flow button { text-align: left; border: 1px solid #d9e8de; border-radius: .9rem; padding: 1rem; background: #fff; color: #1c3b2c; cursor: pointer; }
.cf-flow button:hover { border-color: #087d3c; box-shadow: 0 8px 22px #0e683019; }
.cf-flow b { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #e7f5eb; color: #087d3c; margin-bottom: .7rem; }
.cf-flow span { display: block; font-weight: 800; }
.cf-flow small { display: block; color: #708579; margin-top: .4rem; }
.cf-action { color: #087d3c; border: none; background: transparent; font-weight: 750; cursor: pointer; }
.cf-action:hover { text-decoration: underline; }
.cf-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.cf-toolbar .form-control, .cf-toolbar .form-select { width: auto; min-width: 190px; background: #fff; }
.cf-detail { border-left: 4px solid #087d3c; border-radius: .8rem; padding: 1.1rem; background: #f0f8f2; }
.cf-detail h3 { color: #173629; font-size: 1.1rem; margin-bottom: .4rem; }
.cf-detail p { color: #5a7263; margin-bottom: .7rem; }
.cf-figure { font-size: 1.6rem; font-weight: 800; color: #087d3c; }
.cf-muted-note { color: #6d8073; font-size: .82rem; }
.cf-list-item { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid #ebf0ec; }
.cf-list-item:last-child { border-bottom: 0; }
.cf-list-item b { color: #1c3d2c; }
@media (max-width: 800px) { .cf-table { min-width: 690px; } .cf-table-wrap { overflow-x: auto; } .cf-hero { padding: 1.35rem; } }

/* Tema oscuro Camfoods: superficies y controles consistentes, no sólo el menú. */
[data-bs-theme="dark"] {
  color-scheme: dark;
  --bs-primary: #56c985;
  --bs-primary-rgb: 86, 201, 133;
  --bs-primary-text-emphasis: #8ce4ac;
  --bs-primary-bg-subtle: #173d2c;
  --bs-primary-border-subtle: #285d42;
  --bs-success: #56c985;
  --bs-success-rgb: 86, 201, 133;
  --bs-success-bg-subtle: #173d2c;
  --bs-danger: #ef777b;
  --bs-danger-rgb: 239, 119, 123;
  --bs-danger-bg-subtle: #44272c;
  --bs-body-bg: #101917;
  --bs-body-bg-rgb: 16, 25, 23;
  --bs-paper-bg: #192622;
  --bs-paper-bg-rgb: 25, 38, 34;
  --bs-body-color: #c8d6ce;
  --bs-body-color-rgb: 200, 214, 206;
  --bs-heading-color: #f0f6f2;
  --bs-emphasis-color: #f0f6f2;
  --bs-base-color: #e5f0e9;
  --bs-base-color-rgb: 229, 240, 233;
  --bs-secondary-color: #9eb1a5;
  --bs-tertiary-bg: #23342e;
  --bs-border-color: #31443a;
  --bs-border-color-translucent: rgba(193, 227, 202, .13);
  --bs-link-color: #77dda0;
  --bs-link-hover-color: #a4efbd;
  --bs-custom-link-color: #77dda0;
  --bs-navbar-bg: rgba(25, 38, 34, .96);
  --bs-navbar-border-color: #31443a;
  --bs-navbar-box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  --bs-menu-bg: #17231f;
  --bs-menu-color: #c8d6ce;
  --bs-menu-header-color: #93a99a;
  --bs-box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .layout-wrapper,
[data-bs-theme="dark"] .layout-container,
[data-bs-theme="dark"] .layout-page,
[data-bs-theme="dark"] .content-wrapper {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .layout-navbar,
[data-bs-theme="dark"] .bg-navbar-theme,
[data-bs-theme="dark"] .bg-footer-theme,
[data-bs-theme="dark"] .content-footer {
  background: var(--bs-paper-bg) !important;
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] #layout-menu {
  background: #17231f !important;
  border-right: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"] #layout-menu .menu-item.active > .menu-link {
  background: #194a32 !important;
  color: #a7efc2 !important;
}
[data-bs-theme="dark"] #layout-menu .menu-item.active > .menu-link .menu-icon {
  color: #a7efc2 !important;
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .popover {
  background-color: var(--bs-paper-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer,
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .table > :not(caption) > * > * {
  border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .select2-container--default .select2-selection {
  background-color: #14201c;
  color: var(--bs-body-color);
  border-color: #3a5144;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #91a598; opacity: 1; }
/* Floating controls use their label as the visible hint. Keep the placeholder
   for :placeholder-shown, but never paint it over the label in either theme. */
.form-floating > .form-control::placeholder,
.form-floating > .form-control-plaintext::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}
[data-bs-theme="dark"] .authentication-inner .card {
  background: rgba(17, 32, 25, .96);
  border-color: #3a5144;
}
[data-bs-theme="dark"] .authentication-inner .auth-heading { color: #f0f6f2; }
[data-bs-theme="dark"] .authentication-inner .auth-subtitle { color: #b2c5b7; }
[data-bs-theme="dark"] .authentication-inner .auth-form .form-control,
[data-bs-theme="dark"] .authentication-inner .auth-form .input-group-text {
  background-color: #14201c;
  color: #f0f6f2;
  border-color: #45604f;
}
[data-bs-theme="dark"] .authentication-inner .auth-form .form-floating > label,
[data-bs-theme="dark"] .authentication-inner .auth-form .form-check-label { color: #bdcec1; }
[data-bs-theme="dark"] .authentication-inner .auth-form .form-control:focus {
  border-color: #56c985;
  box-shadow: 0 0 0 .2rem rgba(86, 201, 133, .17);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #17251f;
  color: #f0f6f2;
  border-color: #56c985;
  box-shadow: 0 0 0 .2rem rgba(86, 201, 133, .17);
}
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus { background: #42af70; border-color: #42af70; color: #07150d; }
[data-bs-theme="dark"] .btn-outline-primary { color: #8ce4ac; border-color: #367953; }
[data-bs-theme="dark"] .btn-outline-primary:hover { background: #245b3d; border-color: #56c985; color: #f0f6f2; }
[data-bs-theme="dark"] .text-primary { color: #80dfa3 !important; }
[data-bs-theme="dark"] .bg-label-primary { background: #1b4831 !important; color: #a7efc2 !important; }
[data-bs-theme="dark"] .cf-page-head h1,
[data-bs-theme="dark"] .cf-card-head h3,
[data-bs-theme="dark"] .cf-stat strong,
[data-bs-theme="dark"] .cf-table strong,
[data-bs-theme="dark"] .cf-detail h3,
[data-bs-theme="dark"] .cf-list-item b { color: #eff7f1; }
[data-bs-theme="dark"] .cf-page-head p,
[data-bs-theme="dark"] .cf-stat small,
[data-bs-theme="dark"] .cf-table small,
[data-bs-theme="dark"] .cf-flow small,
[data-bs-theme="dark"] .cf-detail p,
[data-bs-theme="dark"] .cf-muted-note { color: #a9bcb0; }
[data-bs-theme="dark"] .cf-eyebrow,
[data-bs-theme="dark"] .cf-action,
[data-bs-theme="dark"] .cf-figure { color: #80dfa3; }
[data-bs-theme="dark"] .cf-preview-badge,
[data-bs-theme="dark"] .cf-stat,
[data-bs-theme="dark"] .cf-card,
[data-bs-theme="dark"] .cf-flow button { background: #192622; border-color: #31443a; color: #e2eee5; }
[data-bs-theme="dark"] .cf-card-head,
[data-bs-theme="dark"] .cf-table td,
[data-bs-theme="dark"] .cf-list-item { border-color: #31443a; }
[data-bs-theme="dark"] .cf-table th { background: #21342b; color: #b5cbb9; }
[data-bs-theme="dark"] .cf-table tbody tr:hover { background: #22382c; }
[data-bs-theme="dark"] .cf-pill,
[data-bs-theme="dark"] .cf-flow b { background: #194a32; color: #a7efc2; }
[data-bs-theme="dark"] .cf-pill.warn { background: #49371d; color: #f8ce86; }
[data-bs-theme="dark"] .cf-pill.danger { background: #44272c; color: #ff9a9e; }
[data-bs-theme="dark"] .cf-progress { background: #31443a; }
[data-bs-theme="dark"] .cf-toolbar .form-control,
[data-bs-theme="dark"] .cf-toolbar .form-select { background: #14201c; }
[data-bs-theme="dark"] .cf-detail { background: #1d3629; }
