/* ============================================================
   EWITY — official custom stylesheet
   (Our own overrides on top of Sneat — nothing in demo.css)
   Sections: [1] Sidebar menu polish  [2] SA tables compact
   ============================================================ */

/* ============================================================
   [1] SIDEBAR MENU — BUTTON-TYPE items + 100% colored icons
   (super-admin + company panel, both)
   ============================================================ */
/* [1a] Icon GLYPH — iconify mask technique: the glyph is painted via
   `background-color` (mask-image: var(--svg)). Hence a SOLID
   background-color here = 100% visible icon color. Do not touch the mask
   (setting mask:none makes the icon DISAPPEAR). Chip-style
   backgrounds clip inside the mask, so give the glyph itself
   a solid color. */
.menu-inner .menu-item > .menu-link > .menu-icon {
  width: 22px;
  height: 22px;
  margin-right: 0.6rem;
  flex-shrink: 0;
  background-color: #7367f0;
}
.menu-inner .menu-item.active > .menu-link > .menu-icon {
  background-color: #fff !important;
}

/* [1b] Color rotation — 7 palette, SOLID glyph colors (100% visible) */
.menu-inner > .menu-item:nth-child(7n+2) > .menu-link > .menu-icon { background-color: #28c76f; }
.menu-inner > .menu-item:nth-child(7n+3) > .menu-link > .menu-icon { background-color: #ea5455; }
.menu-inner > .menu-item:nth-child(7n+4) > .menu-link > .menu-icon { background-color: #ff9f43; }
.menu-inner > .menu-item:nth-child(7n+5) > .menu-link > .menu-icon { background-color: #00cfe8; }
.menu-inner > .menu-item:nth-child(7n+6) > .menu-link > .menu-icon { background-color: #696bff; }
.menu-inner > .menu-item:nth-child(7n+7) > .menu-link > .menu-icon { background-color: #8a8d96; }
/* active: white glyph on top of the gradient button */
.menu-inner > .menu-item.active > .menu-link > .menu-icon { background-color: #fff !important; }

/* [1c] BUTTON-TYPE menu links — rounded, hover soft, active gradient */
.menu-inner > .menu-item {
  margin: 0 !important;
}
.menu-inner .menu-item > .menu-link {
  border-radius: 0.55rem;
  margin: 2px 10px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.menu-inner .menu-item > .menu-link:hover {
  background: rgba(115, 103, 240, 0.09);
}
.menu-inner .menu-item.active > .menu-link {
  background: linear-gradient(135deg, #7367f0, #9055fd) !important;
  color: #fff !important;
  box-shadow: 0 0.25rem 0.6rem rgba(115, 103, 240, 0.35);
}
.menu-inner .menu-item.active > .menu-link > div {
  color: #fff !important;
}
.menu-inner .menu-item > .menu-link > div {
  font-size: 0.95rem !important;
  line-height: 1.3 !important;
}
/* sub-menu items — small buttons aligned with the parent text.
   Parent text start: link margin 10px + padding-left 0.8rem + icon
   22px + gap 0.6rem ≈ 54px. Sub text at the same 54px: margin 10px +
   padding-left 2.75rem. The core ::before dot looks out of place
   in button style, so it is hidden. */
.menu-inner .menu-sub {
  margin: 0 !important;
  padding: 0 0 2px 0 !important;
}
.menu-inner .menu-sub .menu-item {
  margin: 0 !important;
}
.menu-inner .menu-sub .menu-item .menu-link {
  border-radius: 0.45rem;
  margin: 1px 10px;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  padding-left: 1.35rem;
  padding-right: 0.8rem;
  font-size: 0.875rem !important;
  background: transparent;
  display: flex;
  align-items: center;
}
/* sub-menu icons — chhote (15px), parent ki color family inherit */
.menu-inner .menu-sub .menu-item .menu-link > .menu-icon {
  width: 15px;
  height: 15px;
  margin-right: 0.55rem;
  flex-shrink: 0;
  background-color: #a5a3b8;
}
.menu-inner .menu-sub .menu-item.active > .menu-link > .menu-icon {
  background-color: #7367f0 !important;
}
.menu-inner > .menu-item:nth-child(7n+1) .menu-sub .menu-icon { background-color: #7367f0; }
.menu-inner > .menu-item:nth-child(7n+2) .menu-sub .menu-icon { background-color: #28c76f; }
.menu-inner > .menu-item:nth-child(7n+3) .menu-sub .menu-icon { background-color: #ea5455; }
.menu-inner > .menu-item:nth-child(7n+4) .menu-sub .menu-icon { background-color: #ff9f43; }
.menu-inner > .menu-item:nth-child(7n+5) .menu-sub .menu-icon { background-color: #00cfe8; }
.menu-inner > .menu-item:nth-child(7n+6) .menu-sub .menu-icon { background-color: #696bff; }
.menu-inner > .menu-item:nth-child(7n+7) .menu-sub .menu-icon { background-color: #8a8d96; }
.menu-inner .menu-sub .menu-item .menu-link::before {
  display: none;
}
.menu-inner .menu-sub .menu-item .menu-link:hover {
  background: rgba(115, 103, 240, 0.09);
}
.menu-inner .menu-sub .menu-item.active > .menu-link {
  background: rgba(115, 103, 240, 0.14) !important;
  color: #7367f0 !important;
  box-shadow: none;
}
.menu-inner .menu-header {
  padding-top: 0.6rem !important;
  padding-bottom: 0.2rem !important;
  padding-left: 1.4rem !important;
  margin-top: 0.4rem !important;
}
.menu-inner .menu-header .menu-header-text {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}
.menu-inner .menu-item .menu-link .menu-badge {
  margin-left: auto;
}
/* the toggle arrow sits at absolute right — keep the badge from colliding with it */
.menu-inner .menu-item > .menu-link.menu-toggle .badge {
  margin-right: 1.4rem;
}

/* ============================================================
   [2] SA TABLES — compact (list pages like admin/users)
   apply the .sa-table class on the wrapper
   ============================================================ */
/* [2a] Avatar fix — direct text/icon is centered + filled too
   (renders correctly even without the Sneat .avatar-initial wrapper) */
.avatar {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
  flex-shrink: 0;
}
.avatar > .bx {
  font-size: 1.15rem;
}
.sa-table .table > :not(caption) > * > * {
  padding: 0.45rem 0.6rem;
}
.sa-table .avatar {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
}
.sa-table .btn-sm {
  padding: 0.18rem 0.32rem;
  font-size: 0.85rem;
  line-height: 1.2;
}
.sa-table td small {
  font-size: 0.75rem;
}
.sa-table .table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a3a4a5;
  padding-bottom: 0.3rem;
}

/* ============================================================
   [3] SETTINGS NAV ? button-style anchor nav (admin/settings)
   ============================================================ */
.settings-nav-group {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a3a4a5;
  margin: 0.7rem 0 0.35rem;
  font-weight: 600;
}
.settings-nav-group:first-child {
  margin-top: 0;
}
.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.2rem;
  border-radius: 0.4rem;
  color: #566a7f;
  text-decoration: none;
  font-size: 0.875rem;
  background: transparent;
  border: 0;
  text-align: left;
  transition: all 0.15s ease-in-out;
}
.settings-nav-btn i {
  font-size: 1.1rem;
  color: #7367f0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(115, 103, 240, 0.1);
  border-radius: 0.35rem;
  flex-shrink: 0;
}
.settings-nav-btn:hover {
  background: rgba(115, 103, 240, 0.08);
  color: #7367f0;
}
.settings-nav-btn.active {
  background: #7367f0;
  color: #fff;
}
.settings-nav-btn.active i {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* [3b] Settings nav ? mobile pe compact chip-cloud */
@media (max-width: 991.98px) {
  .settings-nav-btn {
    display: inline-flex;
    width: auto;
    margin: 0 0.25rem 0.4rem 0;
  }
  .settings-nav-group {
    display: block;
    margin: 0.6rem 0 0.35rem;
  }
}

/* ============================================================
   [5] HEADER ? tight gap + responsive (SA + company navbar)
   ============================================================ */
/* [5a] navbar-to-content gap + ALIGNMENT fix
   the navbar is STATIC now (layout-navbar-fixed removed) — container-xxl
   in both places = left edges perfectly align. Only the margin is kept tight. */
.layout-navbar.navbar-detached {
  margin-block: 0.6rem 0.75rem !important;
}
html .layout-navbar-fixed .container-p-y:not([class^=pt-]):not([class*=" pt-"]),
html .container-p-y:not([class^=pt-]):not([class*=" pt-"]) {
  padding-block-start: 0.75rem !important;
}
.layout-navbar {
  block-size: auto !important;
  min-block-size: 4rem;
}

/* [5b] header items ? desktop search fixed width, mobile full-row */
@media (min-width: 992px) {
  .navbar-search-wrapper {
    inline-size: 250px;
  }
}
@media (max-width: 991.98px) {
  .header-nav-main {
    flex-wrap: wrap !important;
    row-gap: 0.5rem !important;
  }
  .navbar-search-wrapper {
    order: 10;
    flex: 1 1 100% !important;
    inline-size: 100%;
    margin-inline-end: 0 !important;
  }
  .header-dropdown {
    max-inline-size: calc(100vw - 32px) !important;
  }
}

/* [5c] header nav ? overflow fix (icons off-screen bug) */
.navbar-nav-right {
  min-inline-size: 0;
}
.header-nav-main {
  flex-wrap: nowrap;
}
.header-nav-main .navbar-search-wrapper {
  inline-size: 250px;
  min-inline-size: 0;
}
@media (max-width: 991.98px) {
  .header-nav-main {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .header-nav-main .navbar-search-wrapper {
    inline-size: 100%;
    order: 10;
  }
  .navbar-nav-right {
    row-gap: 0.5rem;
  }
}

/* [5d] horizontal overflow fix ? 100% zoom pe right side cut bug */
html, body {
  overflow-x: clip;
  max-inline-size: 100vw;
}
.layout-wrapper.layout-content-navbar {
  max-inline-size: 100vw;
  overflow-x: clip;
}
.layout-page, .content-wrapper {
  max-inline-size: 100%;
}

/* [5e] header items ? sab right side cluster me */
.navbar-nav-right {
  justify-content: flex-end !important;
}

/* fallback: purane browsers */
html, body {
  overflow-x: hidden;
}
