/* =====================================================================
   Admin shell: sidebar, top bar, menus, quick search and the login page.
   Loaded on every page after style.css; refines the shared theme tokens.
   ===================================================================== */

:root {
  --base-clr: #ffffff;
  --bg-clr: #f5f4fa;
  --hover-clr: #f0edff;
  --hover-clr-2: #f8f7fc;
  --text-clr: #17131f;
  --secondary-text-clr: #625c6f;
  --accent-clr: #7a5cff;
  --btn-hover: #6848ed;

  --lk-side-w: 264px;
  --lk-side-mini: 78px;
  --lk-top-h: 64px;
  --lk-border: rgba(23, 19, 31, 0.08);
  --lk-soft: rgba(23, 19, 31, 0.045);
  --lk-accent-soft: rgba(122, 92, 255, 0.11);
  --lk-shadow: 0 1px 2px rgba(23, 19, 31, 0.04), 0 8px 24px rgba(23, 19, 31, 0.06);
  --lk-shadow-lg: 0 24px 60px -12px rgba(23, 19, 31, 0.25), 0 2px 6px rgba(23, 19, 31, 0.06);
  --lk-top-bg: rgba(245, 244, 250, 0.82);
  --lk-red: #ef4444;
  --lk-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.dark-theme {
  --base-clr: #17141f;
  --bg-clr: #0e0c14;
  --hover-clr: #24202f;
  --hover-clr-2: #1d1a27;
  --text-clr: #f4f2fa;
  --secondary-text-clr: #a7a1b5;
  --accent-clr: #8d70ff;
  --btn-hover: #7a5cff;

  --lk-border: rgba(255, 255, 255, 0.08);
  --lk-soft: rgba(255, 255, 255, 0.05);
  --lk-accent-soft: rgba(141, 112, 255, 0.16);
  --lk-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --lk-shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  --lk-top-bg: rgba(14, 12, 20, 0.8);
  --lk-red: #f87171;
}

/* ── Page frame ───────────────────────────────────────────────────── */
body.lk-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  background: var(--bg-clr);
  color: var(--text-clr);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.lk-body main {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.lk-body main > :not(.lk-topbar) {
  animation: lk-rise 420ms var(--lk-ease) both;
}
@keyframes lk-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
body.lk-body :focus-visible {
  outline: 2px solid var(--accent-clr);
  outline-offset: 2px;
}
body.lk-body button { font-family: inherit; }

.lk-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--secondary-text-clr);
  font-size: 1rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.lk-icon-btn:hover { background: var(--hover-clr); color: var(--text-clr); }
.lk-icon-btn:active { transform: scale(0.94); }

.lk-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7a5cff, #c084fc);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.lk-avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 0.78rem; }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.lk-sidebar {
  position: sticky;
  top: 0;
  z-index: 950;
  align-self: start;
  box-sizing: border-box;
  width: var(--lk-side-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--base-clr);
  border-right: 1px solid var(--lk-border);
  transition: width 280ms var(--lk-ease), transform 280ms var(--lk-ease);
  overflow: hidden;
}
.lk-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--lk-top-h);
  padding: 0 14px 0 18px;
  flex: none;
}
.lk-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.lk-logo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.lk-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7a5cff 0%, #a26bff 55%, #e879f9 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px -6px rgba(122, 92, 255, 0.65);
}
.lk-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
  transition: opacity 200ms ease;
}
.lk-brand-text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.lk-brand-text small { font-size: 0.72rem; color: var(--secondary-text-clr); }
.lk-collapse-btn i { transition: transform 280ms var(--lk-ease); }
.lk-close-btn { display: none; }

.lk-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 12px 12px;
}
/* Themed scrollbars (sidebar, menus, quick search): thin, rounded, accent-tinted,
   no arrow buttons; stronger while hovered. `scrollbar-width` is left to browsers
   without ::-webkit-scrollbar, because in Chrome/Edge it switches the custom
   styles off and brings back the default Windows bar. */
.lk-nav::-webkit-scrollbar,
.lk-menu::-webkit-scrollbar,
.lk-palette-list::-webkit-scrollbar { width: 6px; height: 6px; }
.lk-nav::-webkit-scrollbar-track,
.lk-menu::-webkit-scrollbar-track,
.lk-palette-list::-webkit-scrollbar-track { background: transparent; }
.lk-nav::-webkit-scrollbar-button,
.lk-menu::-webkit-scrollbar-button,
.lk-palette-list::-webkit-scrollbar-button { display: none; }
.lk-nav::-webkit-scrollbar-thumb,
.lk-menu::-webkit-scrollbar-thumb,
.lk-palette-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-clr) 18%, transparent);
  transition: background 160ms ease;
}
.lk-nav:hover::-webkit-scrollbar-thumb,
.lk-menu:hover::-webkit-scrollbar-thumb,
.lk-palette-list:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent-clr) 42%, transparent); }
.lk-nav::-webkit-scrollbar-thumb:hover,
.lk-menu::-webkit-scrollbar-thumb:hover,
.lk-palette-list::-webkit-scrollbar-thumb:hover { background: var(--accent-clr); }
@supports not selector(::-webkit-scrollbar) {
  .lk-nav, .lk-menu, .lk-palette-list {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent-clr) 30%, transparent) transparent;
  }
}
.lk-nav-group + .lk-nav-group { margin-top: 14px; }
.lk-nav-label {
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--secondary-text-clr);
  opacity: 0.8;
  white-space: nowrap;
}
.lk-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  margin-top: 2px;
  border-radius: 12px;
  color: var(--secondary-text-clr);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}
.lk-nav-link i {
  width: 22px;
  flex: none;
  text-align: center;
  font-size: 1rem;
  transition: transform 200ms var(--lk-ease);
}
.lk-nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lk-nav-link:hover { background: var(--hover-clr); color: var(--text-clr); }
.lk-nav-link:hover i { transform: translateX(1px) scale(1.06); }
.lk-nav-link.active {
  background: var(--lk-accent-soft);
  color: var(--accent-clr);
  font-weight: 600;
}
.lk-nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-clr);
}
.lk-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lk-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
}

.lk-side-foot {
  flex: none;
  padding: 12px;
  border-top: 1px solid var(--lk-border);
}
.lk-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: var(--hover-clr-2);
}
.lk-me-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
  white-space: nowrap;
}
.lk-me-text strong { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lk-me-text small { font-size: 0.72rem; color: var(--secondary-text-clr); overflow: hidden; text-overflow: ellipsis; }
.lk-logout-btn { width: 36px; height: 36px; }
.lk-logout-btn:hover { color: var(--lk-red); background: rgba(239, 68, 68, 0.1); }

/* Collapsed (desktop): icons only. */
body.lk-collapsed .lk-sidebar { width: var(--lk-side-mini); }
body.lk-collapsed .lk-side-head { padding: 0; justify-content: center; flex-direction: column; height: auto; gap: 6px; padding-top: 13px; }
body.lk-collapsed .lk-brand { flex: none; }
body.lk-collapsed .lk-brand-text,
body.lk-collapsed .lk-nav-text,
body.lk-collapsed .lk-me-text { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
body.lk-collapsed .lk-brand-text,
body.lk-collapsed .lk-nav-text,
body.lk-collapsed .lk-me-text { display: none; }
body.lk-collapsed .lk-collapse-btn i { transform: rotate(180deg); }
body.lk-collapsed .lk-nav { padding: 6px 13px 12px; }
body.lk-collapsed .lk-nav-label { padding: 0; justify-content: center; font-size: 0; }
body.lk-collapsed .lk-nav-label::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--lk-border); }
body.lk-collapsed .lk-nav-link { justify-content: center; padding: 0; gap: 0; }
body.lk-collapsed .lk-nav-link.active::before { left: -13px; }
body.lk-collapsed .lk-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.6rem;
  box-shadow: 0 0 0 2px var(--base-clr);
}
body.lk-collapsed .lk-me { flex-direction: column; padding: 8px 0; gap: 6px; }

/* Hover label for the collapsed sidebar. */
.lk-tip {
  position: fixed;
  z-index: 1300;
  padding: 6px 10px;
  border-radius: 8px;
  background: #17131f;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.lk-tip.show { opacity: 1; transform: none; }
body.dark-theme .lk-tip { background: #f4f2fa; color: #17131f; }

.lk-scrim {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(12, 10, 18, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms;
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.lk-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--lk-top-h);
  padding: 0 24px;
  box-sizing: border-box;
  flex: none;
  background: var(--lk-top-bg);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--lk-border);
}
.lk-menu-btn { display: none; }
.lk-title { min-width: 0; flex: 1; }
.lk-title h1 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lk-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--secondary-text-clr);
  line-height: 1.2;
}
.lk-crumb i { font-size: 0.55rem; opacity: 0.7; }

.lk-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, 32vw);
  height: 42px;
  padding: 0 8px 0 14px;
  box-sizing: border-box;
  border: 1px solid var(--lk-border);
  border-radius: 12px;
  background: var(--base-clr);
  color: var(--secondary-text-clr);
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.lk-search-btn:hover { border-color: color-mix(in srgb, var(--accent-clr) 45%, transparent); box-shadow: 0 0 0 4px var(--lk-accent-soft); }
.lk-search-btn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-search-btn kbd,
.lk-palette kbd {
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid var(--lk-border);
  background: var(--hover-clr-2);
  font: 600 0.68rem Poppins, sans-serif;
  color: var(--secondary-text-clr);
  white-space: nowrap;
}
.lk-search-icon { display: none; }

.lk-top-actions { display: flex; align-items: center; gap: 4px; }
.lk-dot-count {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lk-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg-clr);
}
.lk-when-dark { display: none; }
body.dark-theme .lk-when-dark { display: inline-block; }
body.dark-theme .lk-when-light { display: none; }

.lk-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  margin-left: 6px;
  padding: 0 10px 0 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-clr);
  cursor: pointer;
  transition: background 160ms ease;
}
.lk-profile-btn:hover,
.lk-profile-btn[aria-expanded="true"] { background: var(--hover-clr); }
.lk-profile-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; max-width: 150px; }
.lk-profile-text strong { font-size: 0.84rem; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-profile-text small { font-size: 0.7rem; color: var(--secondary-text-clr); }
.lk-caret { font-size: 0.65rem; color: var(--secondary-text-clr); transition: transform 200ms ease; }
.lk-profile-btn[aria-expanded="true"] .lk-caret { transform: rotate(180deg); }

/* ── Dropdown menus ───────────────────────────────────────────────── */
.lk-menu-wrap { position: relative; }
.lk-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 960;
  width: 280px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--lk-border);
  border-radius: 16px;
  background: var(--base-clr);
  box-shadow: var(--lk-shadow-lg);
  transform-origin: top right;
  animation: lk-pop 180ms var(--lk-ease);
}
.lk-menu[hidden] { display: none; }
@keyframes lk-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.lk-menu a,
.lk-menu button[role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-clr);
  font: 500 0.86rem Poppins, sans-serif;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.lk-menu a > i,
.lk-menu button > i { width: 18px; text-align: center; color: var(--secondary-text-clr); }
.lk-menu a:hover,
.lk-menu button[role="menuitem"]:hover,
.lk-menu a:focus-visible { background: var(--hover-clr); }
.lk-menu .danger,
.lk-menu .danger i { color: var(--lk-red); }
.lk-menu-sep { height: 1px; margin: 6px 4px; background: var(--lk-border); }
.lk-menu-me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--lk-border); }
.lk-menu-me > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lk-menu-me strong { font-size: 0.9rem; }
.lk-menu-me small { font-size: 0.75rem; color: var(--secondary-text-clr); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lk-alerts { width: 360px; }
.lk-menu-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 10px; }
.lk-menu-head strong { font-size: 0.95rem; }
.lk-menu-head span { font-size: 0.75rem; color: var(--secondary-text-clr); }
.lk-menu a.lk-alert { min-height: 58px; padding: 8px 10px; }
.lk-alert-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 0.92rem;
}
.lk-alert-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.lk-alert-text strong { font-size: 0.85rem; font-weight: 600; }
.lk-alert-text small { font-size: 0.74rem; color: var(--secondary-text-clr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-alert-count {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lk-soft);
  font-size: 0.78rem;
  font-weight: 600;
}
.lk-menu-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px 26px; text-align: center; color: var(--secondary-text-clr); font-size: 0.85rem; }
.lk-menu-empty i { font-size: 1.8rem; color: #16a34a; }

.tone-violet { background: rgba(122, 92, 255, 0.13); color: #7a5cff; }
.tone-amber { background: rgba(217, 119, 6, 0.13); color: #d97706; }
.tone-red { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.tone-blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.tone-green { background: rgba(22, 163, 74, 0.13); color: #16a34a; }
.tone-pink { background: rgba(219, 39, 119, 0.12); color: #db2777; }
.tone-gray { background: var(--lk-soft); color: var(--secondary-text-clr); }
body.dark-theme .tone-violet { color: #a48bff; }
body.dark-theme .tone-amber { color: #f59e0b; }
body.dark-theme .tone-red { color: #f87171; }
body.dark-theme .tone-blue { color: #60a5fa; }
body.dark-theme .tone-green { color: #22c55e; }
body.dark-theme .tone-pink { color: #f472b6; }

/* ── Quick search palette ─────────────────────────────────────────── */
.lk-palette-wrap {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(12, 10, 18, 0.5);
  backdrop-filter: blur(3px);
  animation: lk-fade 160ms ease;
}
.lk-palette-wrap[hidden] { display: none; }
@keyframes lk-fade { from { opacity: 0; } to { opacity: 1; } }
.lk-palette {
  width: min(620px, 100%);
  max-height: min(560px, 76vh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--lk-border);
  border-radius: 18px;
  background: var(--base-clr);
  box-shadow: var(--lk-shadow-lg);
  overflow: hidden;
  animation: lk-pop 200ms var(--lk-ease);
}
.lk-palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 58px;
  flex: none;
  border-bottom: 1px solid var(--lk-border);
}
.lk-palette-input i { color: var(--secondary-text-clr); }
.lk-palette-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-clr);
  font: 400 1rem Poppins, sans-serif;
}
body.lk-body .lk-palette-input input:focus-visible { outline: none; }
.lk-palette-list { overflow-y: auto; padding: 8px; }
.lk-palette-group { padding: 10px 10px 4px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary-text-clr); }
.lk-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--text-clr);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}
.lk-palette-item > i:first-child {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lk-soft);
  color: var(--secondary-text-clr);
  font-size: 0.85rem;
  flex: none;
}
.lk-palette-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-palette-item small { color: var(--secondary-text-clr); font-size: 0.75rem; }
.lk-palette-item .lk-go { opacity: 0; color: var(--secondary-text-clr); font-size: 0.75rem; }
.lk-palette-item.active { background: var(--lk-accent-soft); }
.lk-palette-item.active > i:first-child { background: var(--accent-clr); color: #fff; }
.lk-palette-item.active .lk-go { opacity: 1; }
.lk-palette-item mark { background: none; color: var(--accent-clr); font-weight: 600; }
.lk-palette-empty { padding: 34px 16px; text-align: center; color: var(--secondary-text-clr); font-size: 0.88rem; }
.lk-palette-foot {
  display: flex;
  gap: 16px;
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid var(--lk-border);
  font-size: 0.74rem;
  color: var(--secondary-text-clr);
}
.lk-palette-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Confirm dialog (logout) ──────────────────────────────────────── */
.lk-dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(12, 10, 18, 0.5);
  backdrop-filter: blur(3px);
  animation: lk-fade 160ms ease;
}
.lk-dialog {
  width: min(400px, 100%);
  padding: 26px 24px 20px;
  box-sizing: border-box;
  border-radius: 20px;
  background: var(--base-clr);
  box-shadow: var(--lk-shadow-lg);
  text-align: center;
  animation: lk-pop 200ms var(--lk-ease);
}
.lk-dialog .lk-alert-icon { margin: 0 auto 14px; width: 52px; height: 52px; border-radius: 16px; font-size: 1.2rem; }
.lk-dialog h3 { font-size: 1.1rem; font-weight: 600; }
.lk-dialog p { margin-top: 6px; color: var(--secondary-text-clr); font-size: 0.88rem; }
.lk-dialog-actions { display: flex; gap: 10px; margin-top: 22px; }
.lk-dialog-actions button {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--lk-border);
  background: var(--base-clr);
  color: var(--text-clr);
  font: 500 0.9rem Poppins, sans-serif;
  cursor: pointer;
}
.lk-dialog-actions button:hover { background: var(--hover-clr); }
.lk-dialog-actions .danger { border-color: transparent; background: #dc2626; color: #fff; }
.lk-dialog-actions .danger:hover { background: #b91c1c; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .lk-profile-text,
  .lk-caret { display: none; }
  .lk-profile-btn { padding: 0 6px; }
}

@media (max-width: 900px) {
  body.lk-body { grid-template-columns: minmax(0, 1fr); }
  .lk-sidebar,
  body.lk-collapsed .lk-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1050;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    box-shadow: none;
  }
  body.lk-nav-open .lk-sidebar { transform: none; box-shadow: var(--lk-shadow-lg); }
  body.lk-nav-open .lk-scrim { opacity: 1; visibility: visible; }
  body.lk-nav-open { overflow: hidden; }
  .lk-collapse-btn { display: none; }
  .lk-close-btn { display: inline-grid; }
  .lk-menu-btn { display: inline-grid; margin-left: -8px; }
  .lk-topbar { padding: 0 16px; gap: 8px; }
  /* The collapsed (icon) look is a desktop-only state. */
  body.lk-collapsed .lk-side-head { flex-direction: row; height: var(--lk-top-h); padding: 0 14px 0 18px; justify-content: flex-start; gap: 8px; }
  body.lk-collapsed .lk-brand { flex: 1; }
  body.lk-collapsed .lk-brand-text,
  body.lk-collapsed .lk-me-text { display: flex; }
  body.lk-collapsed .lk-nav-text { display: block; }
  body.lk-collapsed .lk-brand-text,
  body.lk-collapsed .lk-nav-text,
  body.lk-collapsed .lk-me-text { opacity: 1; width: auto; pointer-events: auto; }
  body.lk-collapsed .lk-nav { padding: 6px 12px 12px; }
  body.lk-collapsed .lk-nav-label { padding: 0 12px; justify-content: flex-start; font-size: 0.68rem; }
  body.lk-collapsed .lk-nav-label::after { display: none; }
  body.lk-collapsed .lk-nav-link { justify-content: flex-start; padding: 0 12px; gap: 12px; }
  body.lk-collapsed .lk-badge { position: static; min-width: 20px; height: 20px; font-size: 0.68rem; box-shadow: none; }
  body.lk-collapsed .lk-me { flex-direction: row; padding: 8px; gap: 10px; }
}

@media (max-width: 760px) {
  .lk-search-btn { display: none; }
  .lk-search-icon { display: inline-grid; }
}

@media (max-width: 560px) {
  :root { --lk-top-h: 58px; }
  .lk-topbar { padding: 0 12px; gap: 4px; }
  .lk-crumb { display: none; }
  .lk-title h1 { font-size: 1rem; }
  .lk-top-actions { gap: 0; }
  .lk-profile-btn { margin-left: 2px; }
  .lk-menu,
  .lk-alerts {
    position: fixed;
    top: calc(var(--lk-top-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
  }
  .lk-topbar > .lk-top-actions > .lk-theme-btn { display: none; }
  .lk-palette-wrap { padding-top: 10px; }
  .lk-palette { max-height: calc(100dvh - 20px); }
  .lk-palette-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.lk-body *,
  body.lk-body *::before,
  body.lk-body *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ── Login page ───────────────────────────────────────────────────── */
body.lk-login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-clr);
  color: var(--text-clr);
  font-family: Poppins, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.lk-login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  color: #fff;
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(232, 121, 249, 0.55), transparent 60%),
    radial-gradient(900px 600px at 120% 120%, rgba(56, 189, 248, 0.35), transparent 55%),
    linear-gradient(140deg, #4c2fd6 0%, #7a5cff 45%, #9d5cff 100%);
}
.lk-login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.lk-login-art > * { position: relative; z-index: 1; }
.lk-login-art .lk-brand { flex: none; }
.lk-login-art .lk-brand-text small { color: rgba(255, 255, 255, 0.75); }
.lk-login-art .lk-logo { background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); backdrop-filter: blur(6px); }
.lk-login-art h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; max-width: 480px; }
.lk-login-art p.lead { margin-top: 14px; max-width: 440px; font-size: 0.98rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.lk-login-points { display: grid; gap: 12px; margin-top: 30px; list-style: none; }
.lk-login-points li { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.92); }
.lk-login-points i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); }
.lk-login-art footer { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); }

.lk-login-panel { display: grid; place-items: center; padding: 32px 20px; position: relative; }
.lk-login-panel .lk-theme-btn { position: absolute; top: 18px; right: 18px; }
.lk-login-card { width: min(400px, 100%); animation: lk-rise 480ms var(--lk-ease) both; }
.lk-login-card .lk-brand { display: none; margin-bottom: 28px; }
.lk-login-card h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.lk-login-card > p { margin-top: 6px; color: var(--secondary-text-clr); font-size: 0.92rem; }
.lk-login-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  font-size: 0.86rem;
  animation: lk-shake 360ms ease;
}
body.dark-theme .lk-login-error { color: #f87171; }
@keyframes lk-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.lk-login-form { display: grid; gap: 18px; margin-top: 26px; }
.lk-field label { display: block; margin-bottom: 7px; font-size: 0.84rem; font-weight: 500; }
.lk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--lk-border);
  border-radius: 13px;
  background: var(--base-clr);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.lk-input:focus-within { border-color: var(--accent-clr); box-shadow: 0 0 0 4px var(--lk-accent-soft); }
.lk-input > i { color: var(--secondary-text-clr); width: 18px; text-align: center; }
.lk-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-clr);
  font: 400 0.95rem Poppins, sans-serif;
}
.lk-input input:-webkit-autofill { -webkit-text-fill-color: var(--text-clr); transition: background-color 9999s; }
.lk-input .lk-icon-btn { width: 34px; height: 34px; margin-right: -6px; }
.lk-caps { display: none; margin-top: 6px; font-size: 0.76rem; color: #d97706; }
.lk-caps.show { display: block; }
.lk-submit {
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #7a5cff, #9d5cff);
  color: #fff;
  font: 600 0.95rem Poppins, sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 24px -10px rgba(122, 92, 255, 0.7);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lk-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -10px rgba(122, 92, 255, 0.8); }
.lk-submit:disabled { opacity: 0.75; cursor: progress; transform: none; }
.lk-login-note { margin-top: 22px; display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--secondary-text-clr); }

@media (max-width: 900px) {
  body.lk-login { grid-template-columns: minmax(0, 1fr); }
  .lk-login-art { display: none; }
  .lk-login-card .lk-brand { display: flex; }
}

/* ── No access (POC page outside the POC's role) ─────────────────────── */
.lk-denied {
  max-width: 460px;
  margin: 12vh auto 0;
  padding: 0 16px;
  text-align: center;
}
.lk-denied-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(122, 92, 255, 0.12);
  color: var(--accent-clr);
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.lk-denied h2 { font-size: 1.25rem; font-weight: 600; color: var(--text-clr); }
.lk-denied p { margin-top: 8px; font-size: 0.9rem; line-height: 1.55; color: var(--secondary-text-clr); }
.lk-denied-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--accent-clr);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.lk-denied-btn:hover { filter: brightness(1.08); }
