:root {
  --bg: #f3f7ff;
  --bg-soft: #eef4ff;
  --sidebar-top: #1f2a47;
  --sidebar-bottom: #273a63;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d9e5f5;
  --line-strong: #c8d8ec;
  --text: #1c2840;
  --muted: #6d7f9a;
  --brand: #2f80ff;
  --accent: #1cc8b2;
  --violet: #7f56d9;
  --amber: #f6a623;
  --danger: #e4606d;
  --ok: #1ca67a;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow: 0 16px 42px rgba(19, 45, 85, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% -10%, #dff0ff 0%, transparent 35%),
    radial-gradient(circle at 88% 110%, #d9f7f1 0%, transparent 38%), var(--bg);
  overflow-x: hidden;
  overflow-y: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Manrope", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

img {
  max-width: 100%;
  display: block;
}

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

.layout {
  position: relative;
  min-height: 100vh;
  overflow: visible;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(122, 179, 255, 0.26), transparent 34%),
    radial-gradient(circle at 85% 92%, rgba(33, 201, 178, 0.18), transparent 42%),
    linear-gradient(180deg, #1a2440 0%, #1d2c4f 48%, #1f3360 100%);
  padding: 20px 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  left: 0;
  top: 0;
  width: 264px;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.09s linear, opacity 0.08s linear, visibility 0.08s linear;
  will-change: transform;
  backface-visibility: hidden;
  box-shadow: 16px 0 38px rgba(15, 31, 59, 0.28);
  overflow: hidden;
}

body.menu-collapsed .sidebar {
  transform: translateX(calc(-100% - 18px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 12px;
  margin-bottom: 2px;
  border-radius: 14px;
  border: 1px solid rgba(193, 222, 255, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(3px);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f2d55;
  background: linear-gradient(135deg, #9bd6ff 0%, #81f0e0 52%, #89b2ff 100%);
  box-shadow: 0 10px 20px rgba(12, 38, 72, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.brand h1 {
  margin: 0;
  color: #fff;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
}

.brand p {
  margin: 2px 0 0;
  color: #b8cbed;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-label {
  margin: 2px 8px 0;
  color: #9ab3da;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 2px 6px 2px 2px;
}

.menu-section {
  display: grid;
  gap: 6px;
}

.menu-section-title {
  margin: 0 6px 2px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8faad1;
  font-weight: 700;
}

.menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  min-height: 52px;
  padding: 8px 10px;
  text-decoration: none;
  color: #dde8fd;
  border: 1px solid rgba(180, 209, 245, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.menu-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, #80cbff, #33cdb7);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.menu-item:hover {
  border-color: rgba(141, 197, 255, 0.55);
  background: linear-gradient(145deg, rgba(69, 138, 235, 0.3), rgba(49, 191, 173, 0.2));
  box-shadow: 0 10px 18px rgba(12, 26, 53, 0.23), inset 0 0 0 1px rgba(184, 226, 255, 0.12);
  transform: translateY(-1px);
}

.menu-item.active {
  color: #fff;
  background: linear-gradient(125deg, rgba(62, 146, 255, 0.5), rgba(44, 202, 184, 0.34));
  border-color: rgba(162, 225, 255, 0.78);
  box-shadow: 0 14px 26px rgba(9, 27, 56, 0.32), inset 0 0 0 1px rgba(187, 234, 255, 0.34);
}

.menu-item.active::before,
.menu-item:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #d6edff;
  background: linear-gradient(145deg, rgba(160, 210, 255, 0.25), rgba(153, 245, 229, 0.16));
  border: 1px solid rgba(192, 225, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 10px rgba(8, 25, 52, 0.18);
}

.menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item:hover .menu-icon,
.menu-item.active .menu-icon {
  color: #e8f7ff;
  border-color: rgba(195, 232, 255, 0.45);
  background: linear-gradient(145deg, rgba(176, 225, 255, 0.3), rgba(165, 248, 234, 0.24));
}

.menu-copy {
  min-width: 0;
  display: block;
}

.menu-text {
  font-weight: 650;
  font-size: 0.96rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-subtext {
  margin-top: 2px;
  color: #9eb6d8;
  font-size: 0.71rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item:hover .menu-subtext,
.menu-item.active .menu-subtext {
  color: #c8ddfa;
}

.sidebar-footer {
  margin-top: 0;
  border-top: 1px solid rgba(185, 214, 248, 0.2);
  padding: 10px 8px 6px;
  display: grid;
  gap: 9px;
  background: linear-gradient(180deg, rgba(17, 34, 63, 0), rgba(17, 34, 63, 0.28));
}

.sidebar-user {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: center;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #16355f;
  background: linear-gradient(145deg, #b7deff, #9ff3e5);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.user-meta {
  display: grid;
  line-height: 1.1;
}

.user-meta strong {
  color: #e5efff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta span {
  color: #a8bfe0;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.sidebar-pills {
  display: flex;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(189, 211, 242, 0.36);
  color: #d7e8ff;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  background: rgba(255, 255, 255, 0.05);
}

.chip-tier {
  border-color: rgba(132, 218, 255, 0.72);
  background: rgba(132, 218, 255, 0.18);
}

.menu::-webkit-scrollbar {
  width: 7px;
}

.menu::-webkit-scrollbar-track {
  background: transparent;
}

.menu::-webkit-scrollbar-thumb {
  background: rgba(142, 178, 224, 0.42);
  border-radius: 999px;
}

.menu::-webkit-scrollbar-thumb:hover {
  background: rgba(170, 205, 247, 0.56);
}

.main {
  margin-left: 264px;
  height: 100dvh;
  padding: 8px 18px 18px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  transition: margin-left 0.09s linear;
}

body.menu-collapsed .main {
  margin-left: 0;
}

.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: max(2px, env(safe-area-inset-top));
  z-index: 20;
  border: 1px solid rgba(209, 225, 246, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% -40%, rgba(68, 136, 233, 0.14), transparent 55%),
    radial-gradient(circle at 95% -20%, rgba(27, 190, 170, 0.12), transparent 52%),
    linear-gradient(130deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 255, 0.98));
  -webkit-backdrop-filter: blur(13px) saturate(130%);
  backdrop-filter: blur(13px) saturate(130%);
  box-shadow:
    0 18px 42px rgba(16, 45, 88, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.78) inset;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(47, 128, 255, 0.6), rgba(28, 200, 178, 0.56), rgba(127, 86, 217, 0.52));
  border-radius: 999px;
  opacity: 0.95;
  box-shadow: 0 2px 8px rgba(68, 122, 207, 0.35);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1;
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #1f3154;
}

.topbar p {
  margin: 4px 0 0;
  color: #5a7399;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.quick-pill {
  border-radius: 999px;
  background: linear-gradient(145deg, #edf5ff, #e5f1ff);
  border: 1px solid #c6daf8;
  color: #355f98;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(70, 120, 189, 0.13);
}

.quick-pill--soft {
  background: linear-gradient(145deg, #edfdf8, #e2f8f2);
  border-color: #bfeee3;
  color: #137e6e;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #cddcf0;
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
  color: #37537c;
  padding: 5px 9px 5px 6px;
  box-shadow: 0 8px 16px rgba(46, 83, 138, 0.12);
  max-width: 220px;
}

.profile-menu {
  position: relative;
  z-index: 35;
}

.profile-menu-trigger {
  border: 1px solid #cddcf0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-menu-trigger:hover {
  border-color: #a9c6ea;
  box-shadow: 0 12px 22px rgba(33, 70, 120, 0.2);
  transform: translateY(-1px);
}

.profile-chip-caret {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d0dff3;
  background: #f0f6ff;
  color: #5a7ba7;
  flex-shrink: 0;
}

.profile-chip-caret svg {
  width: 12px;
  height: 12px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.profile-menu.is-open .profile-chip-caret svg {
  transform: rotate(180deg);
}

.profile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(330px, calc(100vw - 24px));
  z-index: 120;
  border-radius: 16px;
  border: 1px solid #d4e3f8;
  background:
    radial-gradient(circle at 85% -30%, rgba(84, 149, 237, 0.18), transparent 48%),
    linear-gradient(160deg, #ffffff, #f5f9ff 68%);
  box-shadow: 0 24px 46px rgba(17, 42, 81, 0.24);
  padding: 12px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-menu.is-open .profile-menu-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-menu-header {
  border-radius: 12px;
  border: 1px solid #d8e6f8;
  background: linear-gradient(145deg, #f8fcff, #eef5ff);
  padding: 10px;
  margin-bottom: 8px;
}

.profile-menu-header strong {
  display: block;
  font-size: 0.89rem;
  color: #253f66;
}

.profile-menu-header > span {
  margin-top: 2px;
  display: block;
  font-size: 0.75rem;
  color: #5e789e;
}

.profile-menu-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-menu-tags span {
  border-radius: 999px;
  border: 1px solid #cde0f7;
  background: #f8fbff;
  color: #47668f;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
}

.profile-menu-item {
  width: 100%;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #33527d;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.profile-menu-item:hover {
  border-color: #c7dbf6;
  background: linear-gradient(145deg, #f8fbff, #edf5ff);
  transform: translateX(1px);
}

.profile-menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: #3b669f;
  border: 1px solid #cfe0f6;
  background: linear-gradient(145deg, #ebf4ff, #deecff);
}

.profile-menu-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-menu-copy {
  min-width: 0;
  display: grid;
  line-height: 1.1;
}

.profile-menu-copy strong {
  font-size: 0.78rem;
  color: #29476f;
}

.profile-menu-copy span {
  margin-top: 3px;
  font-size: 0.7rem;
  color: #627ca0;
}

.profile-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #16355f;
  background: linear-gradient(145deg, #b7deff, #9ff3e5);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.profile-chip-meta {
  display: grid;
  line-height: 1.05;
  min-width: 0;
}

.profile-chip-meta strong {
  font-size: 0.73rem;
  font-weight: 800;
  color: #29466f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chip-meta span {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #5b769d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cadbf1;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f2f8ff);
  color: #45618a;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 11px;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(46, 89, 150, 0.14);
}

.menu-trigger-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(145deg, #e7f1ff, #dcecff);
  border: 1px solid #cbddf7;
}

.menu-trigger:hover {
  border-color: #9fc2ea;
  background: linear-gradient(145deg, #f9fcff, #edf6ff);
}

.topbar form {
  margin: 0;
}

.topbar .btn {
  border: 1px solid #bdd1eb;
  border-radius: 13px;
  padding: 8px 14px;
  background: linear-gradient(145deg, #ffffff, #edf6ff);
  color: #2f4f7a;
  box-shadow: 0 9px 18px rgba(39, 75, 125, 0.12);
}

.topbar .btn:hover {
  border-color: #99bce6;
  background: linear-gradient(145deg, #ffffff, #e7f2ff);
}

.content {
  margin-top: 10px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(130deg, #ffffff, #f5f9ff 65%, #f4fcfa);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 1fr);
  gap: 14px;
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  color: #4d6fa3;
  background: #e8f1ff;
  border: 1px solid #d3e4fb;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h3 {
  margin: 10px 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 68ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  border-radius: 999px;
  border: 1px solid #d4e1f4;
  background: #f8fbff;
  color: #4b668b;
  font-size: 0.76rem;
  padding: 5px 10px;
  white-space: nowrap;
}

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #d8e5f5;
  background: #fff;
  min-height: 190px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.hero-insight-card {
  --hero-tone-start: var(--brand);
  --hero-tone-end: var(--accent);
  border-radius: var(--radius-lg);
  border: 1px solid #d8e5f5;
  background: linear-gradient(145deg, #ffffff, #f7fbff);
  box-shadow: 0 12px 24px rgba(23, 54, 101, 0.11);
  padding: 12px;
  min-height: 110px;
}

.hero-insight-brand {
  --hero-tone-start: #2f80ff;
  --hero-tone-end: #5aa6ff;
}

.hero-insight-success {
  --hero-tone-start: #1cbf9a;
  --hero-tone-end: #40d6b3;
}

.hero-insight-danger {
  --hero-tone-start: #e4606d;
  --hero-tone-end: #f2919b;
}

.hero-insight-violet {
  --hero-tone-start: #7f56d9;
  --hero-tone-end: #9f79ea;
}

.hero-insight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.hero-insight-head h4 {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #5f789a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-insight-head strong {
  font-size: 1.12rem;
  line-height: 1;
  color: #203a62;
  letter-spacing: -0.01em;
}

.hero-insight-progress {
  margin: 10px 0 8px;
  height: 8px;
  border-radius: 999px;
  background: #e4ecf8;
  overflow: hidden;
}

.hero-insight-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hero-tone-start), var(--hero-tone-end));
}

.hero-insight-card p {
  margin: 0;
  font-size: 0.78rem;
  color: #607a9f;
  line-height: 1.35;
}

.grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-card,
.panel,
.mini-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
}

.kpi-card {
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -50px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  opacity: 0.26;
}

.kpi-card.trend-up::after {
  background: radial-gradient(circle, rgba(28, 200, 178, 0.52), transparent 70%);
}

.kpi-card.trend-down::after {
  background: radial-gradient(circle, rgba(228, 96, 109, 0.35), transparent 70%);
}

.kpi-card.trend-stable::after {
  background: radial-gradient(circle, rgba(47, 128, 255, 0.35), transparent 70%);
}

.kpi-card h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.kpi-card p {
  margin: 9px 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

.sparkline {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbe8fb, #c5e0ff);
}

.kpi-card.trend-up .sparkline {
  background: linear-gradient(90deg, #9fe8dd, #45cdb7);
}

.kpi-card.trend-down .sparkline {
  background: linear-gradient(90deg, #ffd1d6, #ec8792);
}

.panel {
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel h3 {
  margin: 0;
  font-size: 1rem;
}

.panel-chip {
  border-radius: 999px;
  border: 1px solid #d4e4f7;
  background: #f4f9ff;
  color: #53729e;
  font-size: 0.74rem;
  padding: 4px 9px;
  white-space: nowrap;
}

.chart-box {
  width: 100%;
  min-height: 250px;
  height: 250px;
}

.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.table-tools input,
.table-tools select {
  min-height: 36px;
  border: 1px solid #d3e2f4;
  border-radius: 10px;
  background: #f8fbff;
  color: #3d5881;
  padding: 0 10px;
  font-size: 0.82rem;
}

.table-tools input {
  min-width: 180px;
  flex: 1 1 210px;
}

.table-tools select {
  min-width: 106px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e4edf8;
  border-radius: 12px;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  table-layout: auto;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid #edf2fa;
  font-size: 0.84rem;
  white-space: nowrap;
}

.data-table th {
  color: #5e7698;
  background: #f8fbff;
  font-weight: 700;
}

.data-table tr:hover td {
  background: #f9fcff;
}

.table-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.table-footer [data-table-count] {
  color: #617b9f;
  font-size: 0.8rem;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  margin-right: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid transparent;
}

.status-ok {
  background: #e7f8f3;
  color: var(--ok);
  border-color: #bce9dd;
}

.status-bad {
  background: #ffedf0;
  color: var(--danger);
  border-color: #facad1;
}

.status-tier {
  background: #efe8ff;
  color: var(--violet);
  border-color: #d9c8ff;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  background: #edf4ff;
  color: #3f679f;
  border: 1px solid #d5e5fb;
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 4px 9px;
}

.mini-panel {
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.mini-panel h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.mini-panel img {
  border-radius: 10px;
  border: 1px solid #dde9f8;
}

.product-card p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.price {
  margin: 0;
  color: #1b5fd3;
  font-size: 1.1rem;
  font-weight: 800;
}

.chip-product {
  color: #4d678f;
  background: #f2f7ff;
  border-color: #d6e4f8;
}

.btn {
  border: 1px solid #cddcf0;
  border-radius: 10px;
  padding: 9px 12px;
  background: #f8fbff;
  color: #3a5379;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.btn:hover {
  border-color: #a7c2e7;
}

.btn-primary {
  background: linear-gradient(115deg, var(--brand), var(--accent));
  border-color: transparent;
  color: #fff;
}

.btn-ghost {
  background: #ffffff;
  color: #456086;
}

.btn-danger {
  border-color: #f1b4be;
  background: linear-gradient(135deg, #f06b7e, #d84859);
  color: #fff;
  box-shadow: 0 10px 20px rgba(191, 59, 78, 0.25);
}

.btn-danger:hover {
  border-color: #e5909d;
  background: linear-gradient(135deg, #f37b8c, #d43f52);
}

.topbar .btn-danger {
  border-color: #f1b4be;
  background: linear-gradient(135deg, #f06b7e, #d84859);
  color: #fff;
  box-shadow: 0 10px 20px rgba(191, 59, 78, 0.25);
}

.topbar .btn-danger:hover {
  border-color: #e5909d;
  background: linear-gradient(135deg, #f37b8c, #d43f52);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 31, 57, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 25;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.login-shell--single {
  width: min(640px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.login-visual,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.login-visual h2 {
  margin: 0;
  font-size: 1.4rem;
}

.login-visual p {
  margin: 7px 0 14px;
  color: var(--muted);
}

.login-visual img {
  border-radius: 14px;
  border: 1px solid #dde9f8;
}

.login-card h1 {
  margin: 0;
}

.auth-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d9e6f7;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 20px rgba(32, 65, 110, 0.08);
}

.auth-panel--view {
  margin-top: 0;
}

.login-switch {
  margin-top: 12px;
  padding: 4px;
  display: flex;
  gap: 6px;
  border: 1px solid #d7e5f8;
  border-radius: 12px;
  background: linear-gradient(145deg, #f6faff, #eef5ff);
}

.login-switch-btn {
  flex: 1 1 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #4f6c94;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-switch-btn:hover {
  color: #2f4f7f;
  background: rgba(255, 255, 255, 0.65);
}

.login-switch-btn.active {
  color: #fff;
  border-color: rgba(122, 175, 242, 0.25);
  background: linear-gradient(115deg, var(--brand), var(--accent));
  box-shadow: 0 10px 22px rgba(37, 96, 170, 0.3);
  transform: translateY(-1px);
}

.login-views {
  margin-top: 12px;
  overflow: hidden;
  border-radius: 16px;
  perspective: 1200px;
}

.login-views-track {
  width: 200%;
  display: flex;
  transform: translateX(0);
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.login-views[data-active-view="new-user"] .login-views-track {
  transform: translateX(-50%);
}

.login-view {
  width: 50%;
  padding: 0 1px;
  opacity: 0.44;
  filter: blur(0.8px);
  transform: translate3d(16px, 0, 0) scale(0.985);
  transform-origin: center center;
  transition:
    opacity 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.56s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-views[data-active-view="passkey"] .login-view[data-view="passkey"],
.login-views[data-active-view="new-user"] .login-view[data-view="new-user"] {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.login-views[data-active-view="new-user"] .login-view[data-view="passkey"] {
  transform: translate3d(-18px, 0, 0) scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .login-switch-btn,
  .login-views-track,
  .login-view {
    transition: none !important;
  }
}

.auth-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.alert {
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid #facad1;
  background: #ffedf0;
  color: #a83f4b;
  font-size: 0.9rem;
  padding: 9px;
}

.alert-success {
  border-color: #bfe9de;
  background: #e8f9f3;
  color: #176f5f;
}

.admin-control-grid {
  align-items: stretch;
}

.admin-kpi-grid {
  gap: 12px;
}

.admin-kpi-card {
  background: linear-gradient(145deg, #ffffff, #f5faff 75%);
  border-color: #d5e4f8;
}

.admin-workbench-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}

.admin-provision-panel {
  background:
    radial-gradient(circle at 8% 8%, rgba(80, 145, 238, 0.11), transparent 30%),
    linear-gradient(150deg, #ffffff, #f6faff 72%);
  border-color: #d1e3f8;
  padding: 16px;
  overflow-x: clip;
}

.admin-flow {
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.admin-flow-step {
  border: 1px solid #d7e6f9;
  border-radius: 11px;
  background: linear-gradient(145deg, #fbfdff, #f2f7ff);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
}

.admin-flow-step span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #2a4f7f;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid #c8ddf6;
  background: linear-gradient(145deg, #e7f2ff, #dcedff);
}

.admin-flow-step p {
  margin: 0;
  font-size: 0.78rem;
  color: #4d6a93;
  font-weight: 600;
}

.admin-side-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-governance-panel,
.admin-audit-panel {
  background: linear-gradient(145deg, #ffffff, #f7fbff);
  border-color: #d5e5f8;
}

.admin-tier-rows {
  margin-top: 6px;
  display: grid;
  gap: 9px;
}

.admin-tier-row {
  border: 1px solid #d8e7f9;
  border-radius: 11px;
  background: #fcfeff;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
}

.admin-tier-row > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-tier-row strong {
  color: #26466f;
  font-size: 0.78rem;
}

.admin-tier-row span {
  color: #627da1;
  font-size: 0.72rem;
}

.admin-tier-row p {
  margin: 0;
  font-size: 1rem;
  color: #1f3d64;
  font-weight: 800;
}

.admin-tier-track {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: #e3ecf8;
  overflow: hidden;
}

.admin-tier-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.admin-tier-row--t1 .admin-tier-track span {
  background: linear-gradient(90deg, #2f80ff, #66a4ff);
}

.admin-tier-row--t2 .admin-tier-track span {
  background: linear-gradient(90deg, #1cc8b2, #61decf);
}

.admin-tier-row--t3 .admin-tier-track span {
  background: linear-gradient(90deg, #7f56d9, #a186eb);
}

.admin-tier-row--t4 .admin-tier-track span {
  background: linear-gradient(90deg, #f6a623, #ffbf58);
}

.admin-governance-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-governance-meta span {
  border: 1px solid #d1e2f7;
  border-radius: 999px;
  background: #f8fbff;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #48658d;
}

.admin-audit-stream {
  max-height: 430px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.admin-audit-stream::-webkit-scrollbar {
  width: 7px;
}

.admin-audit-stream::-webkit-scrollbar-thumb {
  background: rgba(137, 169, 211, 0.5);
  border-radius: 999px;
}

.admin-audit-item {
  border: 1px solid #d8e7f9;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f6faff);
  padding: 10px;
}

.admin-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-audit-head strong {
  margin: 0;
  font-size: 0.8rem;
  color: #224167;
  letter-spacing: 0.01em;
}

.admin-audit-item p {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #567196;
  line-height: 1.35;
}

.admin-audit-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-audit-meta span {
  font-size: 0.7rem;
  color: #6a83a6;
  border-radius: 999px;
  border: 1px solid #d6e6f8;
  background: #f9fcff;
  padding: 3px 8px;
}

.admin-chart-grid,
.admin-table-grid {
  align-items: start;
}

.admin-table-panel {
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  border-color: #d6e5f8;
}

.admin-control-panel,
.admin-policy-panel {
  padding: 16px;
  background: linear-gradient(155deg, #ffffff, #f7fbff);
}

.admin-user-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-form-grid {
  display: grid;
  gap: 10px;
}

.admin-form-grid > label {
  min-width: 0;
}

.admin-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-user-form label {
  color: #5e789d;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-user-form input,
.admin-user-form select {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff, #f7fbff);
  color: #2f4e79;
  padding: 0 10px;
  font-size: 0.84rem;
}

.admin-user-form select {
  appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image:
    linear-gradient(45deg, transparent 50%, #6684ac 50%),
    linear-gradient(135deg, #6684ac 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-permissions-builder {
  margin-top: 6px;
  border: 1px solid #d4e4f8;
  border-radius: 12px;
  background: linear-gradient(150deg, #f9fcff, #f2f8ff);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.admin-permissions-builder .panel-head {
  margin-bottom: 0;
}

.admin-permissions-builder .panel-head h3 {
  font-size: 0.92rem;
}

.admin-multiselect {
  min-height: 170px !important;
  height: 170px;
  padding: 6px 8px !important;
  background-image: none !important;
  overflow: auto;
}

.admin-multiselect option {
  padding: 4px 6px;
}

.admin-form-note {
  margin: -2px 0 0;
  font-size: 0.78rem;
  color: #5f7a9f;
}

.admin-submit-btn {
  min-height: 42px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.admin-lock-note {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #cbdcf3;
  background: linear-gradient(145deg, #f5faff, #edf5ff);
  padding: 12px;
}

.admin-lock-note strong {
  display: block;
  color: #2a4973;
  font-size: 0.9rem;
}

.admin-lock-note p {
  margin: 6px 0 0;
  color: #607a9f;
  font-size: 0.82rem;
}

.admin-stat-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat-tile {
  border-radius: 12px;
  border: 1px solid #d7e5f8;
  background: linear-gradient(145deg, #ffffff, #f4f9ff);
  padding: 10px;
  box-shadow: 0 10px 20px rgba(28, 60, 107, 0.08);
}

.admin-stat-tile h4 {
  margin: 0;
  font-size: 0.76rem;
  color: #607a9f;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-stat-tile p {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #203b61;
}

.admin-meters {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.admin-meter {
  border-radius: 11px;
  border: 1px solid #d7e6f8;
  background: #fbfdff;
  padding: 9px 10px;
}

.admin-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #55719a;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-meter-head strong {
  color: #234069;
  font-weight: 800;
}

.admin-meter-track {
  margin-top: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e1ebf8;
  overflow: hidden;
}

.admin-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ff, #1cc8b2);
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid #cfdeef;
  border-radius: 10px;
  background: #f9fbff;
  color: #284162;
  padding: 10px;
}

input:focus {
  outline: none;
  border-color: #89b6f2;
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.16);
}

.demo-credentials {
  margin-top: 16px;
  border-top: 1px dashed #dbe7f7;
  padding-top: 12px;
}

.demo-credentials h3 {
  margin: 0;
  font-size: 0.9rem;
}

.demo-credentials ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.stepup-body {
  background:
    radial-gradient(circle at 10% -20%, rgba(129, 186, 255, 0.34), transparent 38%),
    radial-gradient(circle at 90% 120%, rgba(69, 215, 193, 0.2), transparent 42%), var(--bg);
}

.stepup-card {
  position: relative;
  overflow: hidden;
}

.stepup-card::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 128, 255, 0.2), rgba(28, 200, 178, 0));
  pointer-events: none;
}

.stepup-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stepup-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stepup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 56, 0.56);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 70;
}

.stepup-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.stepup-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.stepup-modal-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  border: 1px solid #d5e4f7;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  box-shadow: 0 30px 65px rgba(14, 37, 73, 0.32);
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.stepup-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.stepup-modal.is-open .stepup-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.stepup-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.stepup-modal-head h2 {
  margin: 0;
  font-size: 1.24rem;
}

.stepup-close {
  width: 34px;
  height: 34px;
  border: 1px solid #d3e2f6;
  border-radius: 10px;
  background: #f7fbff;
  color: #57739a;
  font-weight: 800;
  cursor: pointer;
}

.stepup-close:hover {
  border-color: #9fbde5;
}

.stepup-qr-wrap {
  margin: 10px 0;
}

.stepup-guide {
  margin-top: 10px;
  border: 1px solid #d8e7f8;
  border-radius: 12px;
  background: linear-gradient(145deg, #fafdff, #f3f9ff);
  padding: 10px 12px;
}

.stepup-guide p {
  margin: 0;
  font-size: 0.82rem;
  color: #4f6d96;
  line-height: 1.4;
}

.stepup-guide ol {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.stepup-guide li {
  color: #4f6d96;
  font-size: 0.8rem;
  line-height: 1.38;
}

.stepup-guide a {
  color: #2a64ba;
  font-weight: 700;
}

.stepup-guide-note {
  margin-top: 8px !important;
  color: #5e7fa6 !important;
}

.stepup-qr-wrap img {
  width: min(330px, 100%);
  margin: 0 auto;
  border-radius: 12px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1220px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 264px;
    max-width: 82vw;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.menu-collapsed .sidebar {
    transform: translateX(-100%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.menu-open .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
    height: 100dvh;
    padding: 8px 12px 12px;
  }

  .topbar {
    top: max(0px, env(safe-area-inset-top));
    border-radius: 15px;
  }

  .topbar-right .quick-pill {
    display: none;
  }

  .profile-chip {
    max-width: 150px;
  }

  .profile-menu-panel {
    right: 0;
    left: auto;
    width: min(310px, calc(100vw - 24px));
  }

  .hero-panel,
  .two-col,
  .three-col,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .admin-workbench-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    top: max(0px, env(safe-area-inset-top));
    padding: 9px 10px;
    border-radius: 14px;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-menu {
    order: 3;
    width: 100%;
  }

  .profile-menu-trigger {
    width: 100%;
    justify-content: space-between;
    max-width: none;
  }

  .profile-menu-panel {
    right: auto;
    left: 0;
    width: min(100%, calc(100vw - 24px));
  }

  .topbar-left {
    gap: 10px;
  }

  .topbar h2 {
    font-size: 1rem;
  }

  .topbar p {
    font-size: 0.81rem;
  }

  .hero-copy p {
    font-size: 0.9rem;
  }

  .hero-insights {
    grid-template-columns: 1fr;
  }

  .admin-form-grid--2,
  .admin-form-grid--3,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .kpi-card,
  .mini-panel {
    padding: 12px;
  }

  .table-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .table-tools input,
  .table-tools select,
  .table-tools .btn {
    width: 100%;
  }

  .stepup-actions {
    grid-template-columns: 1fr;
  }

  .stepup-modal-card {
    padding: 14px;
  }
}
