/* Konfourt brand theme — UI primary = ink; lime = sidebar accent only */

:root {
  --kf-lime: #e0ff55;
  --kf-ink: #2e3840;
  --kf-ink-rgb: 46, 56, 64;
  --kf-lime-rgb: 224, 255, 85;
  --kf-white: #ffffff;
  --kf-surface: #f4f6f7;
  --kf-muted: #6b7580;

  --primary-rgb: var(--kf-ink-rgb);
  --primary-tint1-rgb: 70, 85, 96;
  --primary-tint2-rgb: 90, 110, 40;
  --primary-tint3-rgb: 180, 210, 70;
  --secondary-rgb: var(--kf-ink-rgb);
  --body-bg-rgb: 244, 246, 247;
  --dark-rgb: var(--kf-ink-rgb);
  --success-rgb: 46, 160, 110;
}

html {
  --primary-rgb: 46, 56, 64 !important;
}

/* Dark sidebar → brand ink */
[data-menu-styles="dark"][data-theme-mode="light"] {
  --menu-bg: #2e3840;
  --menu-prime-color: rgba(255, 255, 255, 0.72);
  --menu-border-color: rgba(255, 255, 255, 0.08);
}

.app-sidebar {
  background: var(--kf-ink) !important;
}

.app-sidebar .side-menu__item.active,
.app-sidebar .slide.has-sub.open > .side-menu__item {
  background: rgba(var(--kf-lime-rgb), 0.12) !important;
}

.app-sidebar .side-menu__item.active .side-menu__label,
.app-sidebar .side-menu__item.active .side-menu__icon,
.app-sidebar .side-menu__item.active .side-menu__angle {
  color: var(--kf-lime) !important;
  fill: var(--kf-lime) !important;
}

.app-sidebar .side-menu__item:hover {
  background: rgba(var(--kf-lime-rgb), 0.08) !important;
}

.app-sidebar .side-menu__item:hover .side-menu__label,
.app-sidebar .side-menu__item:hover .side-menu__icon,
.app-sidebar .side-menu__item:hover .side-menu__angle {
  color: var(--kf-lime) !important;
  fill: var(--kf-lime) !important;
}

.app-sidebar .slide__category .category-name {
  color: rgba(224, 255, 85, 0.55) !important;
}

.main-sidebar-header {
  border-block-end-color: rgba(255, 255, 255, 0.08) !important;
}

.main-sidebar-header .header-logo img.kf-sidebar-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.kf-header-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* Primary UI: charcoal (readable) — lime only as sidebar accent */
.btn-primary {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #2e3840;
  --bs-btn-border-color: #2e3840;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #3a4650;
  --bs-btn-hover-border-color: #3a4650;
  --bs-btn-focus-shadow-rgb: 46, 56, 64;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #232b32;
  --bs-btn-active-border-color: #232b32;
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #2e3840;
  --bs-btn-disabled-border-color: #2e3840;
  font-weight: 600;
}

.btn-outline-primary {
  --bs-btn-color: #2e3840;
  --bs-btn-border-color: #2e3840;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #2e3840;
  --bs-btn-hover-border-color: #2e3840;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #2e3840;
  --bs-btn-active-border-color: #2e3840;
}

.avatar.bg-primary,
.bg-primary {
  background-color: #2e3840 !important;
  color: #ffffff !important;
}

.badge.bg-primary {
  background-color: #2e3840 !important;
  color: #ffffff !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #2e3840;
  box-shadow: 0 0 0 0.2rem rgba(46, 56, 64, 0.2);
}

.form-check-input:checked {
  background-color: var(--kf-ink);
  border-color: var(--kf-ink);
}

a:not(.btn):not(.side-menu__item):not(.header-link):not(.dropdown-item):not(.list-group-item) {
  color: var(--kf-ink);
}

a:not(.btn):not(.side-menu__item):not(.header-link):not(.dropdown-item):not(.list-group-item):hover {
  color: #1f272e;
}

.page-header-breadcrumb .page-title {
  line-height: 1.3;
  color: var(--kf-ink);
}

.header-profile-dropdown button.dropdown-item {
  cursor: pointer;
}

.text-primary {
  color: var(--kf-ink) !important;
}

/* Auth / login */
body.kf-auth {
  min-height: 100vh;
  background: var(--kf-surface);
}

.kf-auth-shell {
  min-height: 100vh;
}

.kf-auth-brand {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(224, 255, 85, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, #2e3840 0%, #232b32 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.kf-auth-brand::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(224, 255, 85, 0.28), transparent 65%);
  pointer-events: none;
}

.kf-auth-brand::after {
  content: "";
  position: absolute;
  top: 12%;
  left: -8%;
  width: 42%;
  height: 55%;
  border: 1px solid rgba(224, 255, 85, 0.25);
  border-radius: 2rem;
  transform: rotate(-18deg);
  pointer-events: none;
}

.kf-auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  text-align: center;
  color: #fff;
}

.kf-auth-brand-inner .kf-logo {
  height: auto;
  width: min(100%, 320px);
  margin-bottom: 1.75rem;
  border-radius: 0.5rem;
}

.kf-auth-card .kf-logo-dark {
  height: auto;
  width: min(100%, 220px);
  margin-bottom: 1.25rem;
  border-radius: 0.35rem;
}

.kf-auth-brand-inner h1 {
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: #fff;
}

.kf-auth-brand-inner h1 span {
  color: var(--kf-lime);
}

.kf-auth-brand-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

.kf-auth-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f6f7 100%);
}

.kf-auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(46, 56, 64, 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 50px rgba(46, 56, 64, 0.08);
}

.kf-auth-card .card-body {
  padding: 2rem 1.75rem;
}

@media (min-width: 576px) {
  .kf-auth-card .card-body {
    padding: 2.5rem;
  }
}

.kf-auth-card .kf-auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kf-ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.kf-auth-card .kf-auth-subtitle {
  color: var(--kf-muted);
  margin-bottom: 1.75rem;
}

.kf-auth-mobile-brand {
  display: none;
}

@media (max-width: 1199.98px) {
  .kf-auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .kf-auth-mobile-brand img {
    height: auto;
    width: min(100%, 200px);
    border-radius: 0.35rem;
  }
}

/* Legacy auth cover override */
.authentication-cover {
  min-height: 100vh;
  background: linear-gradient(180deg, #2e3840 0%, #232b32 100%);
}
