/* KGF style admin theme (apna CSS, template copy nahi) */
:root {
  --hdr: #157347;
  --bg: #f7f7ff;
  --text: #4c5258;
  --card: #ffffff;
  --line: #e9ecef;
  --nav: #ffffff;
  --muted: #8a9096;
  --shadow: 0 2px 6px 0 rgba(218,218,253,.65), 0 2px 6px 0 rgba(206,206,238,.54);
}
[data-theme="dark"] {
  --bg: #1a1d21;
  --text: #d6d9dc;
  --card: #23272b;
  --line: #34393e;
  --nav: #23272b;
  --muted: #9aa1a8;
  --shadow: 0 2px 6px 0 rgba(0,0,0,.4);
}
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select, [data-theme="dark"] .input-group-text {
  background: #1f2327; color: var(--text); border-color: var(--line);
}
[data-theme="dark"] .table { --bs-table-bg: var(--card); --bs-table-color: var(--text); --bs-table-hover-bg: #2b3035; --bs-table-hover-color: var(--text); --bs-table-striped-bg:#262a2f; border-color: var(--line); }
[data-theme="dark"] .dropdown-menu, [data-theme="dark"] .offcanvas, [data-theme="dark"] .accordion-item, [data-theme="dark"] .accordion-button { background: var(--card); color: var(--text); }
[data-theme="dark"] .dropdown-item { color: var(--text); }
[data-theme="dark"] .text-dark-auto, [data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 { color: #eef0f2; }
[data-theme="dark"] .alert-light { background:#2b3035; color:var(--text); }

body { font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; background: var(--bg); color: var(--text); }
a { color: #008cff; }
h5, h6 { font-weight: 500; }

/* ---------- header */
.kgf-header { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: var(--hdr); z-index: 1031; color: #fff; }
.kgf-header .brand { display: flex; align-items: center; height: 100%; padding: 0 18px 0 22px; border-right: 1px solid rgba(255,255,255,.18); text-decoration: none; }
.kgf-header .logo { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--hdr); font-size: 22px; box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.hdr-search { position: relative; margin-left: 14px; width: 300px; }
.hdr-search input { width: 100%; border: 0; border-radius: 5px; height: 36px; padding: 0 12px 0 36px; outline: none; color: #333; }
.hdr-search i { position: absolute; left: 12px; top: 8px; color: #333; }
.hdr-btn { color: #fff !important; font-size: 20px; padding: 0 12px; position: relative; display: inline-flex; align-items: center; height: 60px; text-decoration: none; border: 0; background: none; }
.hdr-badge { position: absolute; top: 9px; right: 3px; background: #f62718; color: #fff; font-size: 9px; font-weight: 600; min-width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; padding: 0 3px; }
.hdr-drop { width: 260px; padding-top: 0; }
.hdr-drop-title { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.user-box { border-left: 1px solid rgba(255,255,255,.18); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #e1e1e1; color: #333; display: grid; place-items: center; font-size: 15px; }

/* ---------- horizontal nav */
.kgf-nav { position: fixed; top: 60px; left: 0; right: 0; background: var(--nav); box-shadow: 0 .1rem .7rem rgba(0,0,0,.1); z-index: 1030; padding: 0 22px; }
.kgf-nav .nav { min-height: 56px; align-items: center; }
.kgf-nav .nav-link { color: var(--text); padding: 9px 15px; margin: 6px 2px; border-radius: 4px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.kgf-nav .nav-link:hover, .kgf-nav .nav-link.active, .kgf-nav .show > .nav-link { background: rgba(21,115,71,.08); color: var(--hdr); }
.kgf-nav .nav-link i { font-size: 16px; }
.kgf-nav .dropdown-toggle::after { border: 0; content: "\F282"; font-family: bootstrap-icons; font-size: 10px; vertical-align: 0; margin-left: 4px; }
.kgf-nav .dropdown-menu { border: 0; box-shadow: 0 .5rem 1rem rgba(0,0,0,.12); border-radius: 6px; padding: 8px 0; min-width: 260px; margin-top: 0 !important; }
.kgf-nav .dropdown-item { padding: 6px 22px; color: var(--muted); display: flex; align-items: center; gap: 14px; font-size: 14.5px; }
.kgf-nav .dropdown-item i { font-size: 10px; }
.kgf-nav .dropdown-item:hover, .kgf-nav .dropdown-item.active { background: transparent; color: var(--hdr); }
.demo-date { font-size: 12px; color: rgba(255,255,255,.85); white-space: nowrap; }
@media (max-width: 991px) {
  .kgf-nav { padding: 0 8px; max-height: calc(100vh - 60px); overflow-y: auto; }
  .kgf-nav .nav { flex-direction: column; align-items: stretch; padding: 8px 0; }
  .kgf-nav .dropdown-menu { position: static !important; transform: none !important; box-shadow: none; }
}

/* ---------- page */
.page { padding: 132px 22px 70px; }
.page-auth { padding: 40px 16px; }
@media (max-width: 991px) { .page { padding: 76px 12px 70px; } }
.card { border: 0; border-radius: 6px; box-shadow: var(--shadow); background: var(--card); color: var(--text); margin-bottom: 0; }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 500; }
.page-crumb { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; }
.page-crumb .t { font-size: 17px; font-weight: 500; padding-right: 12px; border-right: 1px solid var(--line); }
.page-crumb .s { color: var(--muted); }

/* ---------- stat cards with gradient circle icon */
.stat { border-left: 4px solid; }
.stat .num { font-size: 20px; font-weight: 500; margin-top: 4px; }
.stat .lbl { font-size: 13px; color: var(--muted); }
.ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 20px; flex-shrink: 0; }
.g-blue   { background: linear-gradient(to right, #17ead9, #6078ea); }
.g-red    { background: linear-gradient(to right, #f54ea2, #ff7676); }
.g-green  { background: linear-gradient(to right, #00b09b, #96c93d); }
.g-orange { background: linear-gradient(to right, #ffdf40, #ff8359); }
.g-purple { background: linear-gradient(to right, #7f00ff, #e100ff); }
.g-teal   { background: linear-gradient(to right, #0cebeb, #20e3b2, #29ffc6); }
.g-dark   { background: linear-gradient(to right, #414d0b, #727a17); }
.g-navy   { background: linear-gradient(to right, #42e695, #3bb2b8); }
.b-blue { border-color: #17a2b8 !important; } .b-red { border-color: #f41127 !important; }
.b-green { border-color: #17a00e !important; } .b-orange { border-color: #ffc107 !important; }
.t-blue { color: #17a2b8; } .t-red { color: #f41127; } .t-green { color: #17a00e; } .t-orange { color: #ffc107; }

/* ---------- profile card + toggles */
.profile-card .big-av { width: 100px; height: 100px; border-radius: 50%; border: 3px solid #008cff; background: #e1e1e1; color: #333; display: grid; place-items: center; font-size: 38px; margin: 0 auto 12px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.toggle-row .form-switch .form-check-input { width: 2.1em; cursor: pointer; }
.toggle-row .form-check-input:checked { background-color: #17a00e; border-color: #17a00e; }
.toggle-row small { color: var(--muted); }
.wd-block { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.wd-block:last-child { border-bottom: 0; }
.btn-set { background: #f41127; border-color: #f41127; color: #fff; }
.btn-set:hover { background: #d30e20; color: #fff; }

/* dual range slider */
.dual { position: relative; height: 26px; }
.dual input[type=range] { position: absolute; left: 0; top: 4px; width: 100%; pointer-events: none; appearance: none; background: none; }
.dual input[type=range]::-webkit-slider-thumb { pointer-events: auto; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #0d6efd; cursor: pointer; position: relative; z-index: 3; }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #0d6efd; border: 0; cursor: pointer; }
.dual .track { position: absolute; top: 11px; left: 0; right: 0; height: 5px; border-radius: 3px; background: #dee2e6; }
.dual .fill { position: absolute; top: 11px; height: 5px; border-radius: 3px; background: #0d6efd; }
.single-range { width: 100%; accent-color: #0d6efd; }

/* ---------- report toolbar + tables */
.btn-primary { background: #008cff; border-color: #008cff; }
.btn-excel { background: #008cff; color: #fff; border: 0; }
.btn-excel:hover { background: #0074d4; color: #fff; }
.accordion-button { font-size: 14.5px; padding: 13px 18px; }
.accordion-button:not(.collapsed) { background: transparent; color: var(--text); box-shadow: none; }
.tbl { margin-bottom: 0; }
.tbl th { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); background: var(--card) !important; vertical-align: middle; }
.tbl td { white-space: nowrap; vertical-align: middle; font-size: 13.5px; }
.tbl .filter-row th { background: rgba(0,0,0,.025) !important; padding: 6px; }
.tbl .filter-row input { font-size: 12px; min-width: 70px; }
.btn-action { background: #f41127; color: #fff; border: 0; }
.btn-action:hover, .btn-action:focus { background: #d30e20; color: #fff; }
.btn-group .btn-action.dropdown-toggle-split { background: #d30e20; }
.pager .page-link { color: #fff; background: #0a8a0a; border-radius: 50% !important; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; margin-right: 6px; border: 0; }
.pager .page-link.off { background: #e9ecef; color: #333; }

/* ---------- footer, back to top, gear */
.kgf-footer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); text-align: center; padding: 8px; font-size: 13.5px; z-index: 1020; }
.back-top { position: fixed; right: 16px; bottom: 50px; width: 36px; height: 36px; background: #008cff; color: #fff; border-radius: 6px; display: grid; place-items: center; z-index: 1021; text-decoration: none; }
.back-top:hover { color: #fff; }
.theme-gear { position: fixed; right: 0; top: 280px; width: 36px; height: 36px; background: #0d6efd; color: #fff; border: 0; border-radius: 6px 0 0 6px; z-index: 1025; font-size: 18px; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatches button { height: 44px; border: 0; border-radius: 6px; cursor: pointer; }

/* ---------- tree */
.tree ul { padding-left: 26px; border-left: 1px dashed #9ca3af; margin-left: 8px; }
.tree li { list-style: none; margin: 6px 0; position: relative; }
.tree li:before { content: ""; position: absolute; left: -26px; top: 14px; width: 22px; border-top: 1px dashed #9ca3af; }
.nd { display: inline-block; padding: 4px 10px; border-radius: 6px; border: 1px solid; color: #222; }
.nd.on { background: #e8f5ee; border-color: #16a34a; } .nd.off { background: #fef2f2; border-color: #ef4444; }
[data-theme="dark"] .text-muted { color: var(--muted) !important; }
[data-theme="dark"] .table-light, [data-theme="dark"] .table-light td { --bs-table-bg: #2b3035; color: var(--text); }
[data-theme="dark"] .nd { color: #222; }
[data-theme="dark"] .kgf-nav .nav-link.active, [data-theme="dark"] .kgf-nav .nav-link:hover { color: #4ade80; background: rgba(74,222,128,.08); }
