:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e5eaf1;
  --line-strong: #d6deea;
  --text: #17243b;
  --muted: #718096;
  --soft: #99a6b8;
  --primary: #2368f5;
  --primary-2: #24b6df;
  --primary-soft: #edf4ff;
  --cyan: #1cc8dd;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef5261;
  --nav: #07162d;
  --nav-deep: #040d1f;
  --nav-text: #9dacbf;
  --shadow: 0 8px 26px rgb(26 45 78 / 7%);
  --shadow-lg: 0 20px 50px rgb(17 31 57 / 14%);
  font-family:
    Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-width: 960px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgb(76 150 255 / 7%), transparent 25%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 242px;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 20% 4%, rgb(35 104 245 / 22%), transparent 25%),
    linear-gradient(180deg, var(--nav), var(--nav-deep));
  box-shadow: 10px 0 34px rgb(5 15 34 / 9%);
}

.brand {
  display: flex;
  height: 72px;
  flex: none;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid rgb(119 151 205 / 14%);
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand span {
  margin-top: 3px;
  color: #7386a4;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.nav-scroll {
  flex: 1;
  padding: 12px 11px 20px;
  overflow: auto;
  scrollbar-width: none;
}

.nav-group + .nav-group {
  margin-top: 13px;
}

.nav-group__label {
  padding: 0 12px;
  margin: 10px 0 6px;
  color: #53647e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.nav-item {
  display: flex;
  height: 39px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin: 2px 0;
  color: var(--nav-text);
  font-size: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgb(255 255 255 / 4%);
}

.nav-item.active {
  position: relative;
  color: #fff;
  background: linear-gradient(90deg, rgb(35 104 245 / 96%), rgb(34 110 218 / 68%));
  border-color: rgb(115 171 255 / 20%);
  box-shadow: 0 10px 22px rgb(17 73 183 / 24%);
}

.nav-item.active::before {
  position: absolute;
  left: -11px;
  width: 3px;
  height: 23px;
  content: "";
  background: #82dfff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #23d9ff;
}

.nav-icon {
  display: grid;
  width: 19px;
  height: 19px;
  flex: none;
  place-items: center;
  color: currentcolor;
}

.nav-icon svg,
.ui-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-foot {
  flex: none;
  padding: 14px 18px;
  color: #5c708f;
  font-size: 9px;
  border-top: 1px solid rgb(119 151 205 / 12%);
}

.main-shell {
  min-height: 100vh;
  margin-left: 242px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 3px 14px rgb(28 45 75 / 3%);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8b98aa;
  font-size: 11px;
}

.breadcrumb a,
.breadcrumb span {
  color: #76869c;
  text-decoration: none;
}

.breadcrumb a {
  transition: color 140ms ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--primary);
  outline: none;
}

.breadcrumb b {
  color: var(--text);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.context-pill,
.top-icon,
.user-chip {
  height: 38px;
  border: 1px solid #e0e6ee;
  color: #526278;
  background: #fff;
}

.context-pill {
  min-width: 168px;
  padding: 0 32px 0 12px;
  border-radius: 9px;
  font-size: 10px;
  outline: 0;
}

.top-icon {
  display: grid;
  position: relative;
  width: 38px;
  place-items: center;
  border-radius: 9px;
}

.top-icon::after {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 5px;
  border-radius: 20px;
}

.avatar {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #fff;
  font-size: 10px;
  background: linear-gradient(135deg, #246af5, #24bad3);
  border-radius: 50%;
}

.user-chip b {
  font-size: 10px;
}

.page-content {
  min-height: calc(100vh - 72px);
  padding: 22px 26px 30px;
}

.page-content.cockpit-content {
  padding: 0;
  background: #020b1d;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 32px;
  margin-bottom: 14px;
}

.page-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 1320px) {
  .sidebar {
    width: 222px;
  }
  .main-shell {
    margin-left: 222px;
  }
  .context-pill {
    min-width: 145px;
  }
}
