/* Compact admin sidebar. Scoped so the classic Unfold sidebar is unchanged. */

.icam-shell-sidebar {
  --shell-rail: 96px;
  --shell-panel: 292px;
  display: flex;
  flex: 0 0 auto;
  height: 100vh;
  height: 100dvh;
  position: sticky;
  top: 0;
  z-index: 40;
  background: #f4f7f5;
}

.icam-shell-sidebar__frame {
  display: flex;
  height: 100%;
  position: relative;
  border-right: 1px solid #e3ebe6;
}

.icam-shell-collapse {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.icam-shell-collapse .material-symbols-outlined {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.icam-shell-collapse:hover {
  background: #f4fbf8;
  border-color: #cfe3db;
  color: #0f6a56;
}

.icam-shell-collapse:focus-visible {
  outline: 2px solid #0f6a56;
  outline-offset: 2px;
}

.icam-shell-collapse--rail {
  margin-top: 8px;
}

.icam-shell-sidebar.is-collapsed.is-flyout .icam-shell-collapse--rail {
  display: none !important;
}

[x-cloak] {
  display: none !important;
}

.icam-shell-rail {
  width: var(--shell-rail);
  background: #f4f7f5;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 16px;
  gap: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d5e0da transparent;
}

.icam-shell-rail__mark {
  width: 84px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 42, 32, 0.08), 0 0 0 1px #d5e3dc;
}

.icam-shell-rail__mark img {
  display: block !important;
  width: 72px !important;
  height: 36px !important;
  max-width: none !important;
  object-fit: contain;
  opacity: 1 !important;
  visibility: visible !important;
}

.icam-rail-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icam-shell-rail__btn {
  width: 80px;
  min-height: 72px;
  margin: 10px 0 0;
  padding: 6px 4px 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  font: 650 11px/1.15 Inter, ui-sans-serif, system-ui, sans-serif;
}

.icam-shell-rail__btn::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: #8ea89c;
}

.icam-rail-ico {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--rail-hi), var(--rail-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 0 rgba(15, 23, 42, 0.18),
    0 6px 10px rgba(15, 23, 42, 0.12);
}

.icam-rail-ico svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  filter: drop-shadow(0 1px 0 rgba(15, 23, 42, 0.18));
}

.icam-shell-icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 520, "GRAD" 150, "opsz" 24;
}

.icam-shell-rail__btn[data-shell-module="office"] .icam-rail-ico { --rail-hi: #3dbe9a; --rail-lo: #0b5c48; }
.icam-shell-rail__btn[data-shell-module="centres"] .icam-rail-ico { --rail-hi: #60a5fa; --rail-lo: #1d4ed8; }
.icam-shell-rail__btn[data-shell-module="people"] .icam-rail-ico { --rail-hi: #c4b5fd; --rail-lo: #6d28d9; }
.icam-shell-rail__btn[data-shell-module="learn"] .icam-rail-ico { --rail-hi: #4ade80; --rail-lo: #15803d; }
.icam-shell-rail__btn[data-shell-module="exams"] .icam-rail-ico { --rail-hi: #fbbf24; --rail-lo: #b45309; }
.icam-shell-rail__btn[data-shell-module="grading"] .icam-rail-ico { --rail-hi: #fb7185; --rail-lo: #be123c; }
.icam-shell-rail__btn[data-shell-module="compete"] .icam-rail-ico { --rail-hi: #fdba74; --rail-lo: #c2410c; }
.icam-shell-rail__btn[data-shell-module="fees"] .icam-rail-ico { --rail-hi: #2dd4bf; --rail-lo: #0f766e; }
.icam-shell-rail__btn[data-shell-module="meet"] .icam-rail-ico { --rail-hi: #93c5fd; --rail-lo: #1e40af; }
.icam-shell-rail__btn[data-shell-module="attendance"] .icam-rail-ico { --rail-hi: #86efac; --rail-lo: #166534; }
.icam-shell-rail__btn[data-shell-module="hr"] .icam-rail-ico { --rail-hi: #d8b4fe; --rail-lo: #7e22ce; }
.icam-shell-rail__btn[data-shell-module="orders"] .icam-rail-ico { --rail-hi: #fcd34d; --rail-lo: #b45309; }
.icam-shell-rail__btn[data-shell-module="quest"] .icam-rail-ico { --rail-hi: #fda4af; --rail-lo: #be123c; }
.icam-shell-rail__btn[data-shell-module="cards"] .icam-rail-ico { --rail-hi: #7dd3fc; --rail-lo: #0369a1; }
.icam-shell-rail__btn[data-shell-module="masters"] .icam-rail-ico { --rail-hi: #5eead4; --rail-lo: #0f766e; }
.icam-shell-rail__btn[data-shell-module="reports"] .icam-rail-ico { --rail-hi: #6ee7b7; --rail-lo: #047857; }
.icam-shell-rail__btn[data-shell-module="settings"] .icam-rail-ico { --rail-hi: #cbd5e1; --rail-lo: #475569; }
.icam-shell-rail__btn[data-shell-module="system"] .icam-rail-ico { --rail-hi: #94a3b8; --rail-lo: #334155; }
.icam-shell-rail__btn[data-shell-module="more"] .icam-rail-ico { --rail-hi: #cbd5e1; --rail-lo: #64748b; }

.icam-shell-rail__btn span:last-child {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icam-shell-rail__btn[data-shell-module="system"] {
  margin-top: 16px;
}

.icam-shell-rail__btn:hover {
  background: #fff;
  color: #0f172a;
}

.icam-shell-rail__btn.is-on,
.icam-shell-rail__btn.is-on:hover {
  background: #fff;
  color: #0c5c4a;
  box-shadow: 0 1px 2px rgba(15, 42, 32, 0.06), 0 0 0 1px #d3e6de;
}

.icam-shell-rail__btn:focus-visible,
.icam-shell-link:focus-visible {
  outline: 2px solid #0f6a56;
  outline-offset: 1px;
}

.icam-shell-stage {
  width: var(--shell-panel);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.icam-shell-stage__find {
  margin: 8px 8px 0;
}

.icam-shell-rail__btn.is-dim {
  display: none;
}

.icam-shell-panel {
  width: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
}

.icam-shell-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
  padding: 12px 10px 10px;
  border-bottom: 1px solid #eef1f5;
}

.icam-shell-panel__title {
  min-width: 0;
}

.icam-shell-panel__head strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.icam-shell-panel__head small {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.icam-shell-panel__find {
  grid-column: 1 / -1;
  margin-top: 8px;
  height: 32px;
  border: 1px solid #e6eaf0;
  border-radius: 7px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: #94a3b8;
}

.icam-shell-panel__find .material-symbols-outlined {
  font-size: 18px;
}

.icam-shell-panel__find input {
  border: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.icam-shell-panel__tree {
  overflow: auto;
  padding: 6px;
}

.icam-shell-fold {
  margin: 0;
}

.icam-shell-panel__group {
  width: calc(100% - 12px);
  margin: 14px 6px 4px;
  padding: 10px 8px 8px;
  border: 0;
  border-top: 1px solid #dce7e2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #475569;
}

.icam-shell-panel__group .material-symbols-outlined {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: #64748b;
  transition: transform 0.15s ease;
}

.icam-shell-panel__group:hover {
  color: #0f172a;
}

.icam-shell-fold.is-collapsed .icam-shell-panel__group .material-symbols-outlined {
  transform: rotate(-90deg);
}

.icam-shell-fold.is-collapsed .icam-shell-fold__body {
  display: none;
}

.icam-shell-panel__tree > .icam-shell-fold:first-child .icam-shell-panel__group {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 0;
}

.icam-shell-sidebar a.icam-shell-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 6px;
  padding-right: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a !important;
  text-decoration: none;
}

.icam-shell-sidebar a.icam-shell-link .icam-shell-icon {
  flex: none;
}

.icam-shell-sidebar a.icam-shell-link[data-tone="blue"] .icam-shell-icon { color: #1d4ed8; }
.icam-shell-sidebar a.icam-shell-link[data-tone="teal"] .icam-shell-icon { color: #0f766e; }
.icam-shell-sidebar a.icam-shell-link[data-tone="amber"] .icam-shell-icon { color: #b45309; }
.icam-shell-sidebar a.icam-shell-link[data-tone="violet"] .icam-shell-icon { color: #6d28d9; }
.icam-shell-sidebar a.icam-shell-link[data-tone="rose"] .icam-shell-icon { color: #be123c; }
.icam-shell-sidebar a.icam-shell-link[data-tone="green"] .icam-shell-icon { color: #15803d; }

.icam-shell-sidebar a.icam-shell-link.is-on .icam-shell-icon {
  color: #0f6a56;
}

.icam-shell-link__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icam-shell-link:hover {
  background: #f8fafc;
}

.icam-shell-sidebar a.icam-shell-link.is-on,
.icam-shell-sidebar a.icam-shell-link.is-on:hover {
  background: #e7f6f1;
  color: #0c5c4a !important;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #0f6a56;
}

html.dark .icam-shell-sidebar,
html.dark .icam-shell-rail,
html.dark .icam-shell-stage,
html.dark .icam-shell-panel {
  background: #f4f7f5;
  color: #1e293b;
}

html.dark .icam-shell-link:hover {
  background: #eef4f1;
}

html.dark .icam-shell-panel__find,
html.dark .icam-shell-panel__find input {
  background: #fff;
  border-color: #e3ebe6;
  color: #0f172a;
}

.icam-shell-link em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 99px;
  padding: 0 5px;
}

.icam-shell-panel__none,
.icam-shell-panel__empty,
.icam-shell-rail__empty {
  margin: 12px 8px;
  font-size: 12px;
  color: #64748b;
}

.icam-shell-sidebar.is-collapsed .icam-shell-stage {
  display: none;
}

@media (max-width: 1023px) {
  .icam-shell-sidebar.is-collapsed .icam-shell-stage,
  .icam-shell-sidebar.is-collapsed.is-flyout .icam-shell-stage {
    display: flex;
    position: static;
    box-shadow: none;
    width: var(--shell-panel);
  }

  body:has(.icam-shell-sidebar.is-open) {
    overflow: hidden;
  }
}

.icam-shell-sidebar.is-collapsed.is-flyout {
  position: sticky;
}

.icam-shell-sidebar.is-collapsed.is-flyout .icam-shell-stage {
  display: flex;
  position: absolute;
  left: var(--shell-rail);
  top: 0;
  bottom: 0;
  z-index: 50;
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.12);
}

.icam-shell-backdrop {
  display: none;
}

@media (max-width: 1023px) {
  .icam-shell-sidebar {
    position: fixed;
    z-index: 70;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    height: 100vh;
  }

  .icam-shell-sidebar.is-open {
    transform: none;
  }

  .icam-shell-sidebar.is-open .icam-shell-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    border: 0;
    background: rgba(15, 23, 42, 0.4);
  }

  .icam-shell-topbar__icon--desktop,
  .icam-shell-collapse {
    display: none;
  }

  .icam-shell-panel__head {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1024px) {
  .icam-shell-topbar__icon--mobile {
    display: none;
  }
}
