@import url("/assets/keenicons/styles.bundle.css");

:root {
  --bg: #030303;
  --bg2: #0b0d0c;
  --panel: rgba(24, 25, 25, .82);
  --panel-strong: rgba(27, 29, 29, .94);
  --panel-soft: rgba(13, 14, 14, .72);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(64, 156, 255, .36);
  --text: #f7f7ef;
  --muted: #8f9089;
  --accent: #2f9bff;
  --accent2: #7cc7ff;
  --accent3: #ffffff;
  --danger: #ef4444;
  --shadow: 0 34px 90px rgba(0, 0, 0, .56);
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 24px;
  --space-xl: 32px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 12%, rgba(47, 155, 255, .16), transparent 24%),
    radial-gradient(circle at 15% 5%, rgba(255, 255, 255, .08), transparent 28%),
    linear-gradient(145deg, #000, var(--bg2) 52%, #020202);
  color: var(--text);
  font: 15px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 54px 48px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 44px;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .025), 0 0 110px rgba(47, 155, 255, .08);
}

a { color: var(--text); text-decoration: none; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.08; margin-bottom: 10px; }
h2 { font-size: 24px; line-height: 1.2; margin-bottom: 12px; }

.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }

.nav {
  position: fixed;
  z-index: 20;
  top: 78px;
  left: 78px;
  bottom: 78px;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 14px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(25, 26, 25, .96), rgba(12, 13, 13, .9));
  box-shadow: var(--shadow);
}

.nav::before,
.nav::after {
  content: "";
  width: 54px;
  height: 1px;
  background: rgba(255, 255, 255, .11);
  margin: 14px 0;
}

.nav a {
  width: 54px;
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #f1f1ea;
  font-size: 0;
  background: transparent;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.nav a:hover {
  border-color: var(--line-strong);
  background: rgba(47, 155, 255, .14);
  transform: translateY(-1px);
}

.nav a::first-letter { font-size: 0; }

.brand {
  font-weight: 900;
  background: var(--accent) !important;
  color: #050505 !important;
  border-color: rgba(255, 255, 255, .28) !important;
  box-shadow: 0 18px 40px rgba(47, 155, 255, .22);
}

.brand::after { content: "S"; font-size: 22px; }
.nav a[href="/apps.php"]::after { content: "A"; font-size: 18px; font-weight: 800; }
.nav a[href="/licenses.php"]::after { content: "L"; font-size: 18px; font-weight: 800; }
.nav a[href="/admin/index.php"]::after { content: "M"; font-size: 18px; font-weight: 800; }
.nav a[href="/logout.php"] { margin-top: auto; }
.nav a[href="/logout.php"]::after { content: "Q"; font-size: 18px; font-weight: 800; }
.nav span { display: none; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1340px, calc(100% - 220px));
  margin: 0 56px 0 164px;
  padding: 86px 0 56px;
}

.auth {
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth::after {
  content: "";
  position: fixed;
  width: min(820px, 70vw);
  height: min(820px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 155, 255, .13), rgba(255, 255, 255, .06) 40%, transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 34px;
}

.auth-card h1 { font-size: 38px; }

.auth-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-brand span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  background: var(--accent);
  color: #030303;
  box-shadow: 0 18px 44px rgba(47, 155, 255, .26);
  font-size: 26px;
  font-weight: 900;
}

.auth-brand h1,
.auth-brand p { margin: 0; }

.card,
.panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 42%),
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid .card strong {
  display: block;
  font-size: 38px;
  line-height: 1.1;
}

.grid .card span { color: var(--muted); }

.stat-card,
.link-card {
  min-height: 118px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover,
.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 28px 90px rgba(47, 155, 255, .14);
}

.link-card { display: grid; place-items: center; text-align: center; }

.page-heading {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-heading h1 { margin-bottom: 6px; }
.page-heading p { margin: 0; }

label {
  display: grid;
  gap: 8px;
  color: #caccc1;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea,
button,
.button {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(2, 2, 2, .64);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  letter-spacing: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(63, 180, 255, .7);
  box-shadow: 0 0 0 4px rgba(47, 155, 255, .12);
}

textarea { resize: vertical; font: inherit; }

button,
.button {
  background: var(--accent);
  border-color: rgba(255, 255, 255, .14);
  color: #050505;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
  transition: transform .15s ease, filter .15s ease;
}

button:hover,
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button { display: inline-block; }
.inline-button { width: auto; }
.secondary { background: rgba(255, 255, 255, .055); border-color: rgba(255, 255, 255, .14); color: var(--text); }

.alert {
  background: rgba(127, 29, 29, .38);
  border: 1px solid rgba(239, 68, 68, .55);
  padding: 12px 14px;
  border-radius: 16px;
  margin: 12px 0;
}

.alert.success {
  background: rgba(47, 155, 255, .13);
  border-color: rgba(47, 155, 255, .42);
}

.table {
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(14, 15, 15, .82);
  box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 13px; border-bottom: 1px solid rgba(137, 154, 255, .13); text-align: left; }
th { color: #b8c2ee; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
code { background: rgba(0, 0, 0, .52); border: 1px solid var(--line); border-radius: 9px; padding: 3px 7px; color: #eaffb8; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.form-grid button { align-self: end; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; align-items: center; min-width: 220px; }
.actions form { margin: 0; }

.dashboard-shell { padding-top: 86px; }

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-top h1 { font-size: clamp(32px, 4vw, 48px); }

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

.icon-button,
.avatar-button,
.icon-link,
.metric-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: #f4f4ed;
  font-weight: 900;
}

.avatar-button {
  background: #f3f4ed;
  color: #080808;
}

.icon-link {
  width: auto;
  height: auto;
  min-width: 54px;
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 999px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr .52fr;
  grid-auto-rows: minmax(220px, auto);
  gap: 22px;
}

.hero-panel {
  grid-row: span 2;
  min-height: 650px;
  display: grid;
  align-content: start;
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 190px;
  left: 10%;
  bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .16), transparent 66%);
  filter: blur(18px);
  pointer-events: none;
}

.hero-panel h2 {
  max-width: 520px;
  font-size: clamp(30px, 4vw, 42px);
}

.workspace-preview {
  position: relative;
  width: min(560px, 96%);
  min-height: 330px;
  margin: 22px auto 30px;
  padding: 22px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, .16);
  background:
    radial-gradient(circle at 70% 20%, rgba(47, 155, 255, .24), transparent 25%),
    linear-gradient(145deg, #111, #050505);
  box-shadow: 0 36px 80px rgba(0, 0, 0, .62);
  transform: perspective(1100px) rotateX(8deg) rotateY(-13deg) rotateZ(-4deg);
  transform-origin: center;
}

.workspace-preview::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -24px;
  height: 24px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, #1d1d1d, #090909);
  border: 1px solid rgba(255, 255, 255, .1);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #f6f7ee;
  color: #050505;
  font-weight: 900;
}

.preview-toolbar b {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 12px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 14px;
  color: #f8f8f2;
  font-size: 26px;
  font-weight: 900;
}

.preview-row i {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preview-cards span,
.preview-focus {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .09);
}

.preview-cards span:first-child {
  background: var(--accent);
  color: #050505;
}

.preview-cards b { font-size: 30px; line-height: 1; }
.preview-cards small,
.preview-focus small { color: inherit; opacity: .68; }

.preview-focus {
  margin-top: 12px;
  min-height: 110px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
}

.preview-focus strong { font-size: 24px; }
.hero-copy { color: #d9d9d1; max-width: 520px; font-size: 22px; line-height: 1.7; }
.quick-actions { display: flex; gap: 12px; margin-top: 14px; }

.metric-panel strong,
.gauge-panel strong {
  display: block;
  font-size: 48px;
  line-height: 1.05;
  margin: 4px 0;
}

.metric-panel p,
.gauge-panel p { color: var(--muted); margin-bottom: 10px; }

.metric-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bar-chart {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 24px;
}

.bar-chart span {
  flex: 1;
  min-width: 26px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .68), rgba(96, 98, 88, .55));
}

.bar-chart .striped {
  background: repeating-linear-gradient(135deg, var(--accent) 0 4px, transparent 4px 10px);
}

.donut-panel,
.gauge-panel {
  display: grid;
  place-items: center;
  text-align: center;
}

.donut {
  --value: 0%;
  width: 158px;
  height: 158px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, rgba(14, 15, 15, .94) 63%, transparent 64%),
    conic-gradient(var(--accent) var(--value), #f3f4ed 0 72%, rgba(255, 255, 255, .08) 0);
}

.donut span { font-size: 28px; font-weight: 900; }

.gauge {
  width: 180px;
  height: 90px;
  position: relative;
  overflow: hidden;
  margin: 8px 0 14px;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 18px solid rgba(255, 255, 255, .08);
  border-bottom: 0;
  border-radius: 180px 180px 0 0;
}

.gauge span {
  position: absolute;
  inset: 0;
  border: 18px solid var(--accent);
  border-right-color: #f3f4ed;
  border-bottom: 0;
  border-radius: 180px 180px 0 0;
  transform: rotate(-8deg);
}

.trend-panel {
  grid-column: span 2;
  min-height: 330px;
}

.trend-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

.trend-stats b { display: block; color: var(--text); font-size: 22px; }

.line-chart {
  position: relative;
  height: 150px;
  border-bottom: 4px solid rgba(47, 155, 255, .78);
  background:
    linear-gradient(160deg, transparent 15%, rgba(47, 155, 255, .24) 16% 35%, transparent 36%),
    repeating-linear-gradient(120deg, transparent 0 9px, rgba(47, 155, 255, .82) 9px 14px, transparent 14px 24px);
  clip-path: polygon(0 65%, 20% 58%, 38% 36%, 58% 34%, 78% 26%, 100% 8%, 100% 100%, 0 100%);
  border-radius: 18px;
}

.line-chart span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3f4ed;
}

.line-chart span:nth-child(1) { left: 0; top: 88px; }
.line-chart span:nth-child(2) { left: 22%; top: 80px; }
.line-chart span:nth-child(3) { left: 42%; top: 48px; }
.line-chart span:nth-child(4) { left: 58%; top: 46px; }
.line-chart span:nth-child(5) { left: 78%; top: 32px; }
.line-chart span:nth-child(6) { right: 0; top: 12px; }

.recent-panel {
  grid-column: span 3;
  min-height: 220px;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.recent-list a {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
}

.recent-list span { color: var(--muted); font-size: 13px; }

.detail-grid { margin-bottom: 18px; }
.key-block { display: block; overflow-wrap: anywhere; font-size: 18px; margin-top: 6px; }
.two-column { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.section-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.section-heading form { margin: 0; width: auto; }
.code-block {
  margin: 18px 0 0;
  overflow: auto;
  background: rgba(0, 0, 0, .48);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  color: var(--text);
}

@media (max-width: 1180px) {
  body::before { inset: 18px; }
  .nav {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    border-radius: 0;
    padding: 12px 16px;
  }
  .nav::before,
  .nav::after { display: none; }
  .nav a { width: auto; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .nav a::after { content: none !important; }
  .brand { font-size: 14px !important; }
  .wrap { width: min(100% - 32px, 1180px); margin: 0 auto; padding-top: 32px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .hero-panel,
  .trend-panel,
  .recent-panel { grid-column: span 2; }
  .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body::before { display: none; }
  h1 { font-size: 30px; }
  .grid,
  .form-grid,
  .dashboard-grid,
  .trend-stats,
  .recent-list { grid-template-columns: 1fr; }
  .hero-panel,
  .trend-panel,
  .recent-panel { grid-column: auto; }
  .hero-panel { min-height: auto; }
  .dashboard-top,
  .page-heading,
  .quick-actions { display: block; }
  .top-actions { margin-top: 16px; }
  .actions { min-width: 0; flex-wrap: wrap; }
  .two-column { grid-template-columns: 1fr; }
  .workspace-preview { width: min(420px, 100%); transform: none; }
  .hero-copy { font-size: 18px; }
}

/* Command center refinement */
.command-top {
  align-items: center;
  padding: 8px 0 6px;
}

.command-top h1 {
  margin-bottom: 8px;
  font-size: clamp(40px, 5vw, 66px);
  letter-spacing: 0;
}

.command-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.command-strip span {
  color: var(--muted);
  font-size: 13px;
}

.command-strip b {
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #030303;
  font-size: 12px;
}

.command-grid {
  grid-template-columns: minmax(440px, 1.35fr) minmax(260px, .82fr) minmax(220px, .58fr);
  grid-auto-rows: minmax(210px, auto);
}

.command-panel {
  min-height: 680px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  background:
    linear-gradient(145deg, rgba(47, 155, 255, .10), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 50%, rgba(0, 0, 0, .38));
}

.command-panel .hero-copy h2 {
  max-width: 560px;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: 0;
}

.command-preview {
  align-self: center;
  width: min(620px, 100%);
  min-height: 390px;
  margin: 0 auto;
  transform: perspective(1200px) rotateX(7deg) rotateY(-10deg) rotateZ(-3deg);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.preview-grid span {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .065);
}

.preview-grid .hot {
  background: var(--accent);
  color: #030303;
}

.preview-grid b {
  font-size: 36px;
  line-height: 1;
}

.preview-grid small {
  color: inherit;
  opacity: .68;
}

.license-rail {
  height: 8px;
  margin: 18px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.license-rail i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #c9e7ff);
}

.command-preview .preview-focus {
  min-height: 92px;
  align-content: center;
}

.health-panel {
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.health-panel strong {
  font-size: 54px;
  line-height: 1;
}

.metric-panel,
.donut-panel,
.gauge-panel,
.health-panel,
.trend-panel,
.recent-panel {
  border-radius: 30px;
}

.metric-panel:hover,
.donut-panel:hover,
.gauge-panel:hover,
.health-panel:hover,
.trend-panel:hover,
.recent-panel:hover {
  border-color: rgba(47, 155, 255, .32);
}

.recent-list a:hover {
  border-color: rgba(47, 155, 255, .42);
  background: rgba(47, 155, 255, .08);
}

@media (max-width: 1180px) {
  .command-grid {
    grid-template-columns: 1fr 1fr;
  }
  .command-strip {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .command-top h1 {
    font-size: 38px;
  }
  .command-grid {
    grid-template-columns: 1fr;
  }
  .command-panel {
    min-height: auto;
  }
  .command-preview {
    min-height: 0;
    transform: none;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
}

/* Stable sidebar layout */
.nav {
  top: 24px;
  left: 24px;
  bottom: 24px;
  width: 240px;
  align-items: stretch;
  gap: 8px;
  padding: 18px;
  border-radius: 28px;
}

.nav::before,
.nav::after {
  display: none;
}

.nav > a {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 14px !important;
  font-weight: 750;
  color: var(--text);
}

.nav > a::after {
  content: none !important;
}

.nav > a::first-letter {
  font-size: inherit;
}

.nav > a span:not(.nav-icon) {
  display: inline !important;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.nav-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.brand {
  min-height: 58px !important;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, .055) !important;
  color: var(--text) !important;
  box-shadow: none;
}

.brand::after {
  content: none !important;
}

.brand .nav-icon {
  background: var(--accent);
  color: #030303;
}

.nav > span {
  display: block;
  flex: 1;
}

.wrap {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 40px 34px 56px 296px;
}

body::before {
  inset: 18px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.command-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .8fr) minmax(220px, .55fr);
}

.command-panel {
  min-height: 600px;
}

.command-preview {
  min-height: 340px;
  transform: none;
}

.dashboard-grid {
  gap: 18px;
}

.top-actions {
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .wrap {
    padding-left: 284px;
    padding-right: 24px;
  }
  .command-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .78fr);
  }
  .command-panel,
  .trend-panel,
  .recent-panel {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  body::before {
    display: none;
  }
  .nav {
    position: sticky;
    top: 0;
    left: 0;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-width: 0 0 1px;
    border-radius: 0;
    overflow-x: auto;
  }
  .nav > a {
    width: auto;
    min-width: max-content;
    min-height: 42px;
    padding: 0 12px 0 6px;
  }
  .brand {
    margin: 0;
    min-height: 42px !important;
  }
  .nav > span {
    flex: 0 0 12px;
  }
  .wrap {
    width: min(100% - 28px, 1180px);
    margin: 0 auto;
    padding: 26px 0 44px;
  }
  .dashboard-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .top-actions {
    justify-content: flex-start;
  }
  .command-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .command-panel,
  .trend-panel,
  .recent-panel,
  .hero-panel {
    grid-column: auto;
  }
  .command-panel {
    min-height: auto;
  }
  .recent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav > a span:not(.nav-icon) {
    display: none;
  }
  .nav > a {
    padding: 0 6px;
  }
  .nav-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
  .command-top h1 {
    font-size: 34px;
  }
  .form-grid,
  .grid,
  .recent-list,
  .trend-stats,
  .preview-grid {
    grid-template-columns: 1fr;
  }
  .card,
  .panel {
    border-radius: 20px;
    padding: 18px;
  }
  .workspace-preview {
    padding: 16px;
  }
  .preview-toolbar {
    display: grid;
    border-radius: 18px;
  }
  .quick-actions {
    display: grid;
    gap: 10px;
  }
}

/* Dashboard v2: admin cockpit + user portal */
.dashboard-v2 {
  max-width: 1440px;
  display: grid;
  gap: 22px;
}

.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 16%, rgba(47, 155, 255, .18), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
}

.dash-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 8px;
}

.hero-status {
  min-width: 160px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, .24);
}

.hero-status span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hero-status strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 0;
}

.kpi-card {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}

.kpi-card:hover {
  border-color: rgba(47, 155, 255, .44);
}

.kpi-card span,
.kpi-card small {
  color: var(--muted);
}

.kpi-card strong {
  font-size: 34px;
  line-height: 1;
}

.kpi-card.warning strong {
  color: #ffb86b;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 22px;
}

.user-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .65fr);
}

.span-2 {
  grid-column: span 2;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin-bottom: 4px;
}

.ops-panel {
  min-height: 300px;
}

.ops-meter {
  --value: 0%;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  margin: 8px 0 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, rgba(14, 15, 15, .95) 65%, transparent 66%),
    conic-gradient(var(--accent) var(--value), rgba(255,255,255,.09) 0);
}

.ops-meter span {
  font-size: 24px;
  font-weight: 900;
}

.ops-bars {
  height: 88px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.ops-bars i {
  flex: 1;
  border-radius: 10px 10px 5px 5px;
  background: rgba(255,255,255,.18);
}

.ops-bars .hot {
  background: var(--accent);
}

.action-list {
  display: grid;
  gap: 9px;
}

.action-list a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}

.action-list a:hover {
  border-color: rgba(47, 155, 255, .44);
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-list a {
  display: grid;
  grid-template-columns: minmax(180px, .95fr) minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}

.compact-list a:hover {
  border-color: rgba(47, 155, 255, .44);
}

.compact-list span {
  color: var(--muted);
}

.compact-list b {
  justify-self: end;
  font-size: 12px;
  color: var(--text);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-list div {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.event-list div:last-child {
  border-bottom: 0;
}

.event-list span {
  color: var(--muted);
  font-size: 13px;
}

.product-card {
  min-height: 250px;
  background:
    radial-gradient(circle at 86% 12%, rgba(47, 155, 255, .16), transparent 26%),
    linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018));
}

.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(47, 155, 255, .14);
  color: #bfe0ff;
  font-size: 12px;
}

.license-key-line {
  margin: 18px 0;
}

.seat-rail {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  margin-bottom: 12px;
}

.seat-rail i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #c9e7ff);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.feature-list span {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-weight: 700;
}

.feature-list .on {
  border-color: rgba(47, 155, 255, .42);
  color: #c9e7ff;
  background: rgba(47, 155, 255, .10);
}

.feature-list .off {
  opacity: .62;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-layout,
  .user-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .dash-hero {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .compact-list a {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .compact-list b {
    justify-self: start;
  }
}

/* Account page */
.account-page {
  display: grid;
  gap: 22px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.account-panel {
  min-width: 0;
}

.account-form {
  grid-template-columns: 1fr;
}

.account-facts {
  display: grid;
  gap: 12px;
}

.account-facts span {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.account-facts b {
  overflow-wrap: anywhere;
}

.account-facts small {
  color: var(--muted);
}

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

/* Public landing page */
.landing {
  overflow-x: hidden;
}

.landing::before {
  inset: 22px;
}

.landing-nav {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}

.landing-brand::before {
  content: "S";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #030303;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.landing-nav nav > a:not(.button) {
  color: var(--muted);
}

.landing-nav nav > a:not(.button):hover {
  color: var(--text);
}

.landing-hero {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 98px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1fr);
  align-items: center;
  gap: 54px;
  padding: 54px 0 82px;
}

.landing-copy h1 {
  max-width: 680px;
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: .96;
  margin-bottom: 22px;
}

.landing-copy p:not(.eyebrow) {
  max-width: 620px;
  color: #b9bab3;
  font-size: 18px;
}

.landing-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.landing-product {
  position: relative;
  min-height: 520px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 34px;
  background:
    radial-gradient(circle at 74% 18%, rgba(47, 155, 255, .24), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 52%, rgba(0,0,0,.38));
  box-shadow: 0 44px 120px rgba(0,0,0,.58);
  transform: perspective(1100px) rotateX(5deg) rotateY(-10deg) rotateZ(-2deg);
}

.landing-product::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -30px;
  height: 34px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #1c1d1e, #070707);
  border: 1px solid rgba(255,255,255,.10);
}

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 999px;
  background: #f5f7fb;
  color: #050505;
  font-weight: 900;
}

.product-top b {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #030303;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.product-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: rgba(255,255,255,.07);
}

.product-card.hot {
  background: var(--accent);
  color: #030303;
}

.product-card strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.product-card span {
  color: inherit;
  opacity: .68;
}

.product-line {
  height: 130px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: rgba(0,0,0,.24);
}

.product-line i {
  flex: 1;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, var(--accent), rgba(47,155,255,.18));
}

.product-line i:nth-child(1) { height: 42%; }
.product-line i:nth-child(2) { height: 64%; }
.product-line i:nth-child(3) { height: 52%; }
.product-line i:nth-child(4) { height: 88%; }
.product-line i:nth-child(5) { height: 72%; }

.product-detail {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.product-detail span {
  font-weight: 900;
}

.product-detail b {
  color: var(--muted);
  font-size: 13px;
}

.landing-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.04);
}

.landing-section h2 {
  max-width: 700px;
  font-size: clamp(28px, 4vw, 48px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin-bottom: 0;
}

.tool-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-product-card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 12%, rgba(47, 155, 255, .13), transparent 28%),
    rgba(0, 0, 0, .22);
}

.tool-product-card:hover {
  border-color: rgba(47, 155, 255, .45);
}

.tool-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(47, 155, 255, .34);
  border-radius: 999px;
  color: #c9e7ff;
  background: rgba(47, 155, 255, .10);
  font-size: 12px;
  font-weight: 800;
}

.tool-product-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.tool-product-card p {
  color: var(--muted);
  margin: 0;
}

.tool-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-product-meta b {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.tool-product-card > a {
  display: inline-flex;
  width: fit-content;
  color: #c9e7ff;
  font-weight: 800;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.landing-cards article,
.workflow-list span {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.20);
}

.landing-cards h3 {
  margin-bottom: 8px;
}

.landing-cards p {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: start;
}

.workflow-list {
  display: grid;
  gap: 12px;
}

.workflow-list span {
  display: flex;
  gap: 14px;
  align-items: center;
}

.workflow-list b {
  color: var(--accent);
}

@media (max-width: 920px) {
  .landing-nav {
    align-items: flex-start;
  }
  .landing-nav,
  .landing-nav nav {
    flex-wrap: wrap;
  }
  .landing-hero,
  .split-section {
    grid-template-columns: 1fr;
  }
  .landing-product {
    min-height: 0;
    transform: none;
  }
  .landing-cards {
    grid-template-columns: 1fr;
  }
  .tool-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .landing-nav nav {
    gap: 10px;
  }
  .landing-nav nav > a:not(.button) {
    display: none;
  }
  .landing-hero {
    gap: 28px;
    padding-top: 34px;
  }
  .landing-copy h1 {
    font-size: 42px;
  }
  .landing-actions {
    display: grid;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    display: grid;
  }
  .tool-product-grid {
    grid-template-columns: 1fr;
  }
  .landing-section {
    padding: 22px;
  }
}

/* Nextmind-inspired landing refinement */
.next-landing .landing-nav {
  padding-top: 30px;
}

.next-hero {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(420px, .86fr);
  align-items: center;
  gap: 58px;
  padding: 52px 0 70px;
}

.next-hero-copy h1 {
  max-width: 780px;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: .92;
  margin-bottom: 24px;
}

.next-hero-copy p:not(.eyebrow) {
  max-width: 620px;
  color: #b9bab3;
  font-size: 18px;
}

.next-hero-visual {
  min-height: 540px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 36px;
  background:
    radial-gradient(circle at 72% 12%, rgba(47,155,255,.26), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.025) 55%, rgba(0,0,0,.40));
  box-shadow: 0 48px 130px rgba(0,0,0,.62);
  transform: perspective(1100px) rotateX(5deg) rotateY(-9deg) rotateZ(-2deg);
}

.visual-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 999px;
  background: #f5f7fb;
  color: #050505;
  font-weight: 900;
}

.visual-top b {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
}

.visual-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.visual-card {
  min-height: 126px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: rgba(255,255,255,.07);
}

.visual-card.primary {
  background: var(--accent);
  color: #030303;
}

.visual-card b {
  font-size: 42px;
  line-height: 1;
}

.visual-card small {
  opacity: .68;
}

.visual-flow {
  height: 130px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: rgba(0,0,0,.24);
}

.visual-flow i {
  flex: 1;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, var(--accent), rgba(47,155,255,.18));
}

.visual-flow i:nth-child(1) { height: 42%; }
.visual-flow i:nth-child(2) { height: 64%; }
.visual-flow i:nth-child(3) { height: 52%; }
.visual-flow i:nth-child(4) { height: 88%; }
.visual-flow i:nth-child(5) { height: 72%; }

.visual-note {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.visual-note small {
  color: var(--muted);
}

.stats-strip {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-strip span {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  color: var(--muted);
}

.stats-strip b {
  display: block;
  color: var(--text);
  font-size: 26px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.category-strip span {
  padding: 8px 11px;
  border: 1px solid rgba(47,155,255,.32);
  border-radius: 999px;
  color: #c9e7ff;
  background: rgba(47,155,255,.08);
  font-size: 13px;
  font-weight: 800;
}

.next-section {
  margin-bottom: 38px;
}

.landing-cta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 54px;
  padding: 42px;
  border: 1px solid rgba(47,155,255,.30);
  border-radius: 32px;
  background:
    radial-gradient(circle at 86% 14%, rgba(47,155,255,.18), transparent 30%),
    rgba(255,255,255,.045);
  text-align: center;
}

.landing-cta h2 {
  font-size: clamp(32px, 5vw, 62px);
}

.tool-detail-hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(300px, .55fr);
  gap: 38px;
  align-items: center;
  padding: 60px 0;
}

.tool-detail-hero h1 {
  font-size: clamp(46px, 7vw, 88px);
  line-height: .94;
}

.tool-detail-hero p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
}

.tool-detail-card {
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 74% 16%, rgba(47,155,255,.20), transparent 28%),
    rgba(255,255,255,.045);
}

@media (max-width: 960px) {
  .next-hero,
  .tool-detail-hero {
    grid-template-columns: 1fr;
  }
  .next-hero-visual {
    min-height: 0;
    transform: none;
  }
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .next-hero-copy h1,
  .tool-detail-hero h1 {
    font-size: 42px;
  }
  .visual-board,
  .stats-strip {
    grid-template-columns: 1fr;
  }
  .next-hero-visual,
  .landing-cta {
    padding: 22px;
  }
}

/* Nextmind visual skin for public pages */
.next-landing,
.tool-detail-page {
  background:
    radial-gradient(circle at 78% 10%, rgba(47, 155, 255, .18), transparent 24%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .07), transparent 22%),
    linear-gradient(180deg, #020202 0%, #080909 48%, #020202 100%);
}

.next-landing::before,
.tool-detail-page::before {
  display: none;
}

.next-landing .landing-nav,
.tool-detail-page .landing-nav {
  width: min(1280px, calc(100% - 44px));
  padding: 24px 0;
}

.next-landing .landing-nav nav,
.tool-detail-page .landing-nav nav {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(18px);
}

.next-landing .landing-nav nav > a:not(.button),
.tool-detail-page .landing-nav nav > a:not(.button) {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 750;
}

.next-landing .button,
.tool-detail-page .button {
  border-radius: 999px;
  padding: 12px 18px;
}

.next-landing .button:not(.secondary),
.tool-detail-page .button:not(.secondary) {
  box-shadow: 0 18px 48px rgba(47, 155, 255, .22);
}

.next-hero {
  width: min(1280px, calc(100% - 44px));
  gap: 72px;
  padding-top: 76px;
}

.next-hero-copy h1 {
  font-weight: 850;
  letter-spacing: -1.8px;
}

.next-hero-copy p:not(.eyebrow) {
  line-height: 1.75;
  color: #a9aba5;
}

.next-hero-visual {
  min-height: 590px;
  border-radius: 42px;
  background:
    radial-gradient(circle at 74% 16%, rgba(47, 155, 255, .32), transparent 27%),
    radial-gradient(circle at 25% 82%, rgba(255, 255, 255, .10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035) 44%, rgba(0,0,0,.46));
  box-shadow: 0 60px 150px rgba(0,0,0,.74);
}

.next-hero-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 32px;
}

.visual-top {
  position: relative;
  z-index: 1;
}

.visual-board,
.visual-flow,
.visual-note {
  position: relative;
  z-index: 1;
}

.visual-card,
.tool-product-card,
.landing-cards article,
.workflow-list span {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}

.visual-card {
  border-radius: 26px;
}

.stats-strip {
  width: min(1280px, calc(100% - 44px));
}

.stats-strip span {
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
}

.landing-section,
.landing-cta {
  width: min(1280px, calc(100% - 44px));
  border-radius: 36px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}

.next-section {
  padding: 46px;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2,
.landing-section h2,
.landing-cta h2 {
  font-weight: 820;
  letter-spacing: -.6px;
}

.category-strip {
  margin-bottom: 26px;
}

.tool-product-grid {
  gap: 22px;
}

.tool-product-card {
  min-height: 310px;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 12%, rgba(47, 155, 255, .16), transparent 26%),
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.022));
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.tool-product-card:hover {
  transform: translateY(-4px);
  background:
    radial-gradient(circle at 82% 12%, rgba(47, 155, 255, .22), transparent 27%),
    linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.028));
}

.tool-product-card h3 {
  font-size: 28px;
  line-height: 1.12;
}

.tool-product-card > a::after {
  content: " ->";
}

.landing-cards {
  gap: 22px;
}

.landing-cards article {
  min-height: 220px;
  padding: 26px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 10%, rgba(47,155,255,.12), transparent 26%),
    rgba(0,0,0,.22);
}

.landing-cards h3 {
  font-size: 24px;
}

.workflow-list {
  gap: 16px;
}

.workflow-list span {
  min-height: 84px;
  padding: 22px;
  border-radius: 26px;
  background: rgba(0,0,0,.25);
}

.workflow-list b {
  flex: 0 0 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47,155,255,.13);
  border: 1px solid rgba(47,155,255,.30);
}

.landing-cta {
  padding: 58px 42px;
}

.tool-detail-hero {
  width: min(1280px, calc(100% - 44px));
  min-height: 650px;
}

.tool-detail-card {
  border-radius: 36px;
  min-height: 390px;
  background:
    radial-gradient(circle at 74% 16%, rgba(47,155,255,.28), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.026));
  box-shadow: 0 48px 130px rgba(0,0,0,.62);
}

@media (max-width: 960px) {
  .next-hero {
    gap: 38px;
    padding-top: 44px;
  }
  .next-section {
    padding: 34px;
  }
  .next-hero-visual,
  .tool-detail-card {
    border-radius: 30px;
  }
}

@media (max-width: 620px) {
  .next-landing .landing-nav nav,
  .tool-detail-page .landing-nav nav {
    border-radius: 22px;
  }
  .next-section,
  .landing-cta {
    padding: 24px;
    border-radius: 26px;
  }
  .tool-product-card,
  .landing-cards article {
    min-height: 0;
    border-radius: 24px;
  }
}

/* NexMind-style final pass for public marketing pages */
.next-landing,
.tool-detail-page {
  --landing-blue: #2f9bff;
  --landing-cyan: #72d6ff;
  --landing-orange: #ff6d2d;
  --landing-orange-soft: #ff9b54;
  --landing-panel: rgba(11, 13, 16, .82);
  --landing-panel-2: rgba(16, 19, 24, .72);
  color: #f7f7f3;
  background:
    radial-gradient(circle at 50% 11%, rgba(47,155,255,.20), transparent 21%),
    radial-gradient(circle at 48% 22%, rgba(255,109,45,.13), transparent 18%),
    radial-gradient(circle at 9% 39%, rgba(47,155,255,.10), transparent 23%),
    radial-gradient(circle at 91% 62%, rgba(255,109,45,.09), transparent 25%),
    linear-gradient(180deg, #020203 0%, #050608 42%, #020203 100%);
}

.next-landing::after,
.tool-detail-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 18%, #000 0 30%, transparent 62%);
}

.next-landing .landing-nav,
.tool-detail-page .landing-nav {
  width: min(1160px, calc(100% - 40px));
  padding: 22px 0 10px;
}

.next-landing .landing-brand::before,
.tool-detail-page .landing-brand::before {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0 14%, transparent 15%),
    linear-gradient(135deg, var(--landing-blue), var(--landing-orange));
  color: transparent;
  box-shadow: 0 0 28px rgba(47,155,255,.30);
}

.next-landing .landing-brand,
.tool-detail-page .landing-brand {
  font-size: 15px;
  letter-spacing: 0;
}

.next-landing .landing-nav nav,
.tool-detail-page .landing-nav nav {
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.12);
}

.next-landing .landing-nav nav > a:not(.button),
.tool-detail-page .landing-nav nav > a:not(.button) {
  padding: 8px 12px;
  color: rgba(247,247,243,.72);
  font-size: 12px;
}

.next-landing .button,
.tool-detail-page .button {
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, var(--landing-orange), #346dff);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 16px 42px rgba(255,109,45,.18);
}

.next-landing .button.secondary,
.tool-detail-page .button.secondary {
  background: rgba(255,255,255,.06);
  color: #fff;
  box-shadow: none;
}

.next-hero {
  width: min(1120px, calc(100% - 40px));
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 34px;
  padding: 96px 0 42px;
}

.next-hero-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.next-hero-copy .eyebrow,
.landing-section .eyebrow,
.landing-cta .eyebrow,
.tool-detail-hero .eyebrow {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 7px 12px;
  border: 1px solid rgba(255,109,45,.34);
  border-radius: 999px;
  background: rgba(255,109,45,.08);
  color: var(--landing-orange-soft);
  font-size: 11px;
  letter-spacing: .9px;
}

.next-hero-copy h1 {
  max-width: 860px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: .98;
  letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f6f0e8 54%, #ff8750 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.next-hero-copy p:not(.eyebrow) {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(247,247,243,.68);
}

.next-hero .landing-actions {
  justify-content: center;
}

.next-hero-visual {
  width: min(920px, 100%);
  min-height: 430px;
  margin: 12px auto 0;
  padding: 18px;
  border-radius: 28px;
  transform: perspective(1300px) rotateX(7deg);
  transform-origin: top center;
  background:
    radial-gradient(circle at 24% 14%, rgba(47,155,255,.24), transparent 24%),
    radial-gradient(circle at 86% 82%, rgba(255,109,45,.22), transparent 26%),
    linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.028) 44%, rgba(0,0,0,.52));
  box-shadow:
    0 48px 140px rgba(0,0,0,.72),
    0 0 0 1px rgba(255,255,255,.10);
}

.next-hero-visual::before {
  inset: 12px;
  border-radius: 22px;
}

.visual-top {
  background: rgba(255,255,255,.95);
  font-size: 12px;
}

.visual-top b {
  background: linear-gradient(135deg, var(--landing-blue), var(--landing-orange));
  color: #fff;
}

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

.visual-card {
  min-height: 106px;
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}

.visual-card.primary {
  background: linear-gradient(145deg, var(--landing-blue), var(--landing-orange));
}

.visual-card b {
  font-size: 34px;
}

.visual-flow {
  height: 104px;
  border-radius: 18px;
}

.visual-flow i {
  background: linear-gradient(180deg, var(--landing-blue), var(--landing-orange));
}

.visual-note {
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}

.partner-strip {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto 70px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  color: rgba(247,247,243,.70);
  font-size: 12px;
}

.partner-strip span {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.stats-strip {
  width: min(1060px, calc(100% - 40px));
  margin-bottom: 86px;
}

.stats-strip span {
  min-height: 128px;
  border-radius: 14px;
  border-color: rgba(255,255,255,.09);
  background:
    radial-gradient(circle at 92% 100%, rgba(255,109,45,.22), transparent 38%),
    var(--landing-panel);
}

.stats-strip b {
  color: #fff;
  font-size: 24px;
}

.landing-section,
.landing-cta {
  width: min(1120px, calc(100% - 40px));
  margin-bottom: 86px;
  border-radius: 18px;
  border-color: rgba(255,255,255,.09);
  background:
    radial-gradient(circle at 100% 100%, rgba(255,109,45,.10), transparent 31%),
    rgba(255,255,255,.025);
}

.next-section {
  padding: 38px;
}

.section-head {
  align-items: start;
}

.landing-section h2,
.landing-cta h2 {
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
  text-align: center;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head > div {
  width: 100%;
}

.section-head .button {
  flex: 0 0 auto;
}

.category-strip {
  justify-content: center;
}

.category-strip span,
.tool-category {
  border-color: rgba(47,155,255,.30);
  background: rgba(47,155,255,.08);
  color: #bfe6ff;
  font-size: 11px;
}

.tool-product-grid {
  gap: 18px;
}

.tool-product-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 19px;
  border-radius: 14px;
  border-color: rgba(255,255,255,.09);
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    radial-gradient(circle at 95% 102%, rgba(255,109,45,.28), transparent 34%),
    var(--landing-panel);
}

.tool-product-card::after,
.landing-cards article::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,109,45,.55), transparent);
}

.tool-product-card h3 {
  font-size: 21px;
  line-height: 1.2;
}

.tool-product-card p,
.landing-cards p,
.workflow-list span,
.muted {
  color: rgba(247,247,243,.62);
  font-size: 13px;
  line-height: 1.65;
}

.tool-product-meta code {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-product-card > a {
  color: var(--landing-orange-soft);
  font-size: 12px;
}

.split-section {
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1fr);
}

.workflow-list span,
.landing-cards article {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border-color: rgba(255,255,255,.09);
  background:
    radial-gradient(circle at 100% 100%, rgba(255,109,45,.18), transparent 34%),
    var(--landing-panel-2);
}

.workflow-list b {
  color: #fff;
  background: rgba(255,109,45,.14);
  border-color: rgba(255,109,45,.32);
}

.landing-cards h3 {
  font-size: 19px;
}

.landing-cta {
  padding: 56px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(47,155,255,.20), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(255,109,45,.26), transparent 30%),
    rgba(255,255,255,.035);
}

.landing-cta .button {
  margin-top: 8px;
}

.tool-detail-hero {
  width: min(1120px, calc(100% - 40px));
  min-height: auto;
  padding: 98px 0 70px;
  grid-template-columns: minmax(0, .95fr) minmax(300px, .62fr);
}

.tool-detail-hero h1 {
  font-size: clamp(42px, 7vw, 74px);
  letter-spacing: 0;
}

.tool-detail-card {
  min-height: 340px;
  border-radius: 18px;
  border-color: rgba(255,255,255,.09);
  background:
    radial-gradient(circle at 85% 20%, rgba(47,155,255,.24), transparent 30%),
    radial-gradient(circle at 82% 96%, rgba(255,109,45,.25), transparent 36%),
    rgba(255,255,255,.045);
}

@media (max-width: 960px) {
  .visual-board,
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .split-section,
  .tool-detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .next-landing .landing-nav,
  .tool-detail-page .landing-nav {
    width: min(100% - 28px, 1120px);
    gap: 12px;
  }

  .next-landing .landing-nav nav,
  .tool-detail-page .landing-nav nav {
    width: 100%;
    justify-content: space-between;
  }

  .next-landing .landing-nav nav > a:not(.button):first-child,
  .tool-detail-page .landing-nav nav > a:not(.button):first-child {
    display: inline-flex;
  }

  .next-hero {
    width: min(100% - 28px, 1120px);
    padding-top: 54px;
  }

  .next-hero-copy h1,
  .tool-detail-hero h1 {
    font-size: 38px;
  }

  .next-hero-visual {
    min-height: 0;
    transform: none;
  }

  .visual-board,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .visual-flow {
    height: 82px;
  }

  .stats-strip,
  .landing-section,
  .landing-cta,
  .tool-detail-hero {
    width: min(100% - 28px, 1120px);
    margin-bottom: 46px;
  }

  .partner-strip {
    width: min(100% - 28px, 920px);
    margin-bottom: 44px;
  }

  .next-section {
    padding: 22px;
  }
}

/* User dashboard polish */
.user-hero {
  align-items: center;
}

.user-hero .hero-status {
  justify-self: end;
}

.user-layout > .panel {
  min-width: 0;
}

.user-layout .panel {
  padding: 24px;
}

.user-layout .panel + .panel {
  margin-top: 0;
}

.user-layout .panel-title h2 {
  font-size: 22px;
}

.user-layout code {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .dashboard-v2 {
    gap: 18px;
  }
  .user-hero .hero-status {
    justify-self: stretch;
  }
  .user-layout .panel {
    padding: 20px;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* Compact scale pass */
body {
  font-size: 14px;
  line-height: 1.45;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
}

h2 {
  font-size: 19px;
}

.eyebrow {
  font-size: 11px;
  margin-bottom: 8px;
}

.card,
.panel {
  border-radius: 20px;
  padding: 16px;
}

.nav {
  width: 220px;
  padding: 14px;
}

.nav > a {
  min-height: 42px;
  gap: 10px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 13px !important;
}

.nav > a span:not(.nav-icon) {
  font-size: 13px;
}

.nav-icon {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.brand {
  min-height: 50px !important;
}

.wrap {
  padding: 28px 28px 44px 268px;
}

.dashboard-top {
  margin-bottom: 18px;
}

.command-top h1 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.command-strip {
  min-width: 210px;
  padding: 9px 11px;
}

.top-actions {
  gap: 10px;
}

.icon-button,
.avatar-button {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.icon-link {
  min-width: 46px;
  padding: 7px 10px;
}

.dashboard-grid,
.command-grid {
  gap: 14px;
}

.command-grid {
  grid-auto-rows: minmax(170px, auto);
}

.command-panel {
  min-height: 500px;
  gap: 14px;
}

.command-panel .hero-copy h2 {
  font-size: clamp(25px, 3.2vw, 38px);
  max-width: 500px;
}

.hero-copy {
  font-size: 16px;
  line-height: 1.55;
}

.command-preview,
.workspace-preview {
  min-height: 280px;
  padding: 16px;
  border-radius: 24px;
}

.preview-toolbar {
  padding: 9px 11px;
}

.preview-toolbar b {
  padding: 6px 10px;
}

.preview-grid {
  gap: 9px;
  margin-top: 12px;
}

.preview-grid span {
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
}

.preview-grid b {
  font-size: 27px;
}

.preview-focus {
  min-height: 78px;
  border-radius: 16px;
}

.preview-focus strong {
  font-size: 19px;
}

.quick-actions {
  gap: 10px;
}

.metric-panel strong,
.gauge-panel strong,
.health-panel strong {
  font-size: 36px;
}

.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.bar-chart {
  height: 105px;
  gap: 7px;
  margin-top: 14px;
}

.bar-chart span {
  min-width: 18px;
}

.donut {
  width: 124px;
  height: 124px;
}

.donut span {
  font-size: 22px;
}

.gauge {
  width: 142px;
  height: 72px;
}

.gauge::before,
.gauge span {
  border-width: 14px;
}

.trend-panel {
  min-height: 255px;
}

.trend-stats {
  gap: 10px;
  margin-bottom: 14px;
}

.trend-stats b {
  font-size: 18px;
}

.line-chart {
  height: 112px;
}

.recent-panel {
  min-height: 170px;
}

.recent-list {
  gap: 10px;
}

.recent-list a {
  min-height: 78px;
  padding: 11px;
  border-radius: 13px;
}

.form-grid {
  gap: 11px;
  margin-bottom: 16px;
}

input,
select,
textarea,
button,
.button {
  border-radius: 11px;
  padding: 10px 11px;
}

th,
td {
  padding: 10px 11px;
}

@media (max-width: 1280px) {
  .wrap {
    padding-left: 256px;
    padding-right: 22px;
  }
}

@media (max-width: 980px) {
  .wrap {
    width: min(100% - 24px, 1180px);
    padding: 22px 0 36px;
  }
  .nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .command-top h1 {
    font-size: 28px;
  }
  .command-preview,
  .workspace-preview {
    padding: 13px;
  }
}

/* Metronic demo4 inspired shell */
.metronic-app,
body:not(.auth):has(.app-sidebar) {
  --kt-bg: #f4f6fa;
  --kt-surface: #ffffff;
  --kt-muted: #6b7280;
  --kt-text: #07111f;
  --kt-line: #e5eaf2;
  --kt-primary: #1b84ff;
  --kt-primary-soft: #eef6ff;
  --kt-sidebar: #eef2f7;
  background: var(--kt-bg);
  color: var(--kt-text);
}

body:has(.app-sidebar)::before,
.metronic-auth::before {
  display: none;
}

.mobile-topbar {
  display: none;
}

.app-sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 290px;
  display: flex;
  background: var(--kt-sidebar);
  border-right: 1px solid var(--kt-line);
}

.sidebar-primary {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-right: 1px solid var(--kt-line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #1b84ff, #0b5ed7);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(27, 132, 255, .24);
}

.sidebar-logo {
  flex: 0 0 auto;
}

.icon-nav,
.sidebar-bottom {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.icon-nav {
  flex: 1;
  align-content: start;
}

.sidebar-bottom {
  flex: 0 0 auto;
}

.icon-nav a,
.sidebar-bottom a {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #64748b;
  transition: .16s ease;
}

.icon-nav a span,
.sidebar-bottom a span {
  position: absolute;
  left: 47px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}

.icon-nav a:hover span,
.sidebar-bottom a:hover span {
  opacity: 1;
}

.icon-nav a:hover,
.icon-nav a.active,
.sidebar-bottom a:hover {
  background: var(--kt-surface);
  border-color: var(--kt-line);
  color: var(--kt-primary);
}

.icon-nav i,
.sidebar-bottom i {
  font-size: 20px;
}

.sidebar-secondary {
  flex: 1;
  min-width: 0;
  padding: 22px 14px;
  overflow-y: auto;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  margin-bottom: 18px;
  border: 1px solid var(--kt-line);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--kt-primary-soft);
  color: var(--kt-primary);
  font-weight: 800;
}

.sidebar-profile strong,
.sidebar-profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile strong {
  font-size: 13px;
  color: var(--kt-text);
}

.sidebar-profile small {
  font-size: 11px;
  color: var(--kt-muted);
}

.side-section {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.side-section p {
  margin: 0 0 5px;
  padding: 0 9px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.side-section a {
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.side-section a:hover,
.side-section a.active {
  color: var(--kt-primary);
  border-color: var(--kt-line);
  background: var(--kt-surface);
}

.compact-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--kt-text);
  font-weight: 800;
}

body:has(.app-sidebar) .wrap {
  width: auto;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 28px 30px 46px 320px;
}

body:has(.app-sidebar) h1 {
  color: var(--kt-text);
  font-size: clamp(26px, 3vw, 38px);
}

body:has(.app-sidebar) h2,
body:has(.app-sidebar) h3 {
  color: var(--kt-text);
}

body:has(.app-sidebar) .muted {
  color: var(--kt-muted);
}

body:has(.app-sidebar) .eyebrow {
  color: var(--kt-primary);
  letter-spacing: .08em;
}

body:has(.app-sidebar) .panel,
body:has(.app-sidebar) .card,
body:has(.app-sidebar) .table,
body:has(.app-sidebar) .dash-hero,
body:has(.app-sidebar) .kpi-card {
  border: 1px solid var(--kt-line);
  border-radius: 14px;
  background: var(--kt-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

body:has(.app-sidebar) .panel,
body:has(.app-sidebar) .card {
  padding: 22px;
}

body:has(.app-sidebar) .dash-hero,
.portal-hero {
  border: 1px solid var(--kt-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 94% 18%, rgba(27,132,255,.16), transparent 25%),
    linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

body:has(.app-sidebar) .kpi-card {
  color: var(--kt-text);
}

body:has(.app-sidebar) .kpi-card strong {
  color: var(--kt-text);
}

body:has(.app-sidebar) .button,
body:has(.app-sidebar) button {
  background: var(--kt-primary);
  color: #fff;
  border-color: var(--kt-primary);
  box-shadow: 0 10px 22px rgba(27,132,255,.16);
}

body:has(.app-sidebar) .button.secondary,
body:has(.app-sidebar) .icon-link {
  background: var(--kt-primary-soft);
  color: var(--kt-primary);
  border-color: #d8ebff;
  box-shadow: none;
}

body:has(.app-sidebar) input,
body:has(.app-sidebar) select,
body:has(.app-sidebar) textarea {
  background: #fff;
  color: var(--kt-text);
  border-color: var(--kt-line);
}

body:has(.app-sidebar) input:focus,
body:has(.app-sidebar) select:focus,
body:has(.app-sidebar) textarea:focus {
  border-color: rgba(27,132,255,.55);
  box-shadow: 0 0 0 3px rgba(27,132,255,.10);
}

body:has(.app-sidebar) .table {
  overflow: hidden;
}

body:has(.app-sidebar) table {
  color: var(--kt-text);
}

body:has(.app-sidebar) th {
  background: #f8fafc;
  color: #64748b;
  border-bottom: 1px solid var(--kt-line);
}

body:has(.app-sidebar) td {
  border-top: 1px solid var(--kt-line);
  color: #334155;
}

body:has(.app-sidebar) code {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.portal-page {
  display: grid;
  gap: 22px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
}

.portal-hero h1 {
  max-width: 760px;
}

.portal-preview {
  padding: 18px;
  border: 1px solid var(--kt-line);
  border-radius: 16px;
  background: #111827;
  color: #fff;
}

.portal-preview .preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
}

.portal-preview .preview-toolbar b {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--kt-primary);
}

.portal-preview .preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.portal-preview .preview-grid span {
  min-height: 86px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
}

.portal-preview .preview-grid b,
.portal-preview .preview-grid small {
  display: block;
}

.portal-preview .preview-grid b {
  font-size: 28px;
}

.portal-preview .preview-grid small {
  color: rgba(255,255,255,.64);
}

.preview-chart {
  height: 92px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}

.preview-chart i {
  flex: 1;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #1b84ff, rgba(27,132,255,.18));
}

.preview-chart i:nth-child(1) { height: 40%; }
.preview-chart i:nth-child(2) { height: 65%; }
.preview-chart i:nth-child(3) { height: 52%; }
.preview-chart i:nth-child(4) { height: 88%; }
.preview-chart i:nth-child(5) { height: 72%; }

.portal-kpis {
  margin: 0;
}

.app-category-strip {
  justify-content: flex-start;
}

body:has(.app-sidebar) .category-strip span,
body:has(.app-sidebar) .tool-category {
  color: var(--kt-primary);
  background: var(--kt-primary-soft);
  border-color: #d8ebff;
}

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

body:has(.app-sidebar) .metronic-tool-card {
  min-height: 245px;
  background:
    radial-gradient(circle at 100% 0, rgba(27,132,255,.11), transparent 32%),
    #fff;
}

body:has(.app-sidebar) .tool-product-card h3 {
  color: var(--kt-text);
}

body:has(.app-sidebar) .tool-product-card p {
  color: var(--kt-muted);
}

body:has(.app-sidebar) .tool-product-card > a {
  color: var(--kt-primary);
}

.portal-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .58fr);
}

.metronic-auth {
  min-height: 100vh;
  background: var(--kt-bg, #f4f6fa);
  color: var(--kt-text, #07111f);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1fr);
}

.auth-form-side,
.auth-brand-panel {
  display: grid;
  align-items: center;
  padding: 38px;
}

.auth-form-side {
  justify-items: center;
}

.metronic-auth-card {
  width: min(100%, 390px);
  border: 1px solid var(--kt-line, #e5eaf2);
  border-radius: 16px;
  background: #fff;
  color: var(--kt-text, #07111f);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.auth-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.auth-title h1,
.auth-title p {
  margin: 0;
}

.metronic-auth-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 650;
}

.metronic-auth-card input {
  background: #fff;
  color: var(--kt-text, #07111f);
  border-color: var(--kt-line, #e5eaf2);
}

.metronic-auth-card button {
  background: #1b84ff;
  color: #fff;
  border-color: #1b84ff;
}

.auth-home-link {
  display: block;
  text-align: center;
  color: #1b84ff;
  font-weight: 700;
}

.auth-brand-panel {
  margin: 20px;
  border: 1px solid var(--kt-line, #e5eaf2);
  border-radius: 20px;
  align-content: space-between;
  background:
    radial-gradient(circle at 18% 20%, rgba(27,132,255,.18), transparent 24%),
    radial-gradient(circle at 92% 88%, rgba(27,132,255,.16), transparent 30%),
    linear-gradient(135deg, #ffffff, #eef6ff);
}

.auth-brand-panel h2 {
  max-width: 620px;
  color: var(--kt-text, #07111f);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.02;
}

.auth-brand-panel p:not(.eyebrow) {
  max-width: 560px;
  color: var(--kt-muted, #6b7280);
  font-size: 16px;
}

.auth-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-mini-grid span {
  padding: 16px;
  border: 1px solid var(--kt-line, #e5eaf2);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
}

.auth-mini-grid b,
.auth-mini-grid small {
  display: block;
}

.auth-mini-grid b {
  color: var(--kt-text, #07111f);
}

.auth-mini-grid small {
  color: var(--kt-muted, #6b7280);
}

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

  .portal-hero,
  .portal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid var(--kt-line);
    background: rgba(244,246,250,.92);
    backdrop-filter: blur(14px);
  }

  .mobile-auth {
    padding: 8px 11px;
    border-radius: 10px;
    background: var(--kt-primary-soft);
    color: var(--kt-primary);
    font-weight: 750;
  }

  .app-sidebar {
    position: sticky;
    top: 60px;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--kt-line);
  }

  .sidebar-primary {
    width: 100%;
    flex-direction: row;
    padding: 10px 14px;
    overflow-x: auto;
    border-right: 0;
  }

  .sidebar-logo,
  .sidebar-secondary {
    display: none;
  }

  .icon-nav,
  .sidebar-bottom {
    width: auto;
    display: flex;
    gap: 8px;
  }

  .icon-nav a span,
  .sidebar-bottom a span {
    display: none;
  }

  body:has(.app-sidebar) .wrap {
    padding: 20px 16px 36px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    order: -1;
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .portal-hero,
  body:has(.app-sidebar) .panel,
  body:has(.app-sidebar) .card {
    padding: 16px;
  }

  .portal-preview .preview-grid,
  .auth-mini-grid,
  .metronic-tool-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-side,
  .auth-brand-panel {
    padding: 20px;
  }

  .auth-brand-panel {
    margin: 12px;
  }
}

/* Global APP SULTH theme tokens */
:root,
:root[data-theme="light"] {
  --bg-primary: #f4f6fa;
  --bg-secondary: #eef2f7;
  --card-bg: #ffffff;
  --card-bg-soft: #f8fafc;
  --border-color: #e5eaf2;
  --text-primary: #07111f;
  --text-secondary: #6b7280;
  --text-muted: #94a3b8;
  --accent-primary: #1b84ff;
  --accent-primary-soft: #eef6ff;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, .045);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-primary: #121418;
  --bg-secondary: #191c22;
  --card-bg: #1d2129;
  --card-bg-soft: #171a20;
  --border-color: #2d3440;
  --text-primary: #edf1f7;
  --text-secondary: #a8b0bd;
  --text-muted: #7f8998;
  --accent-primary: #5aa7ff;
  --accent-primary-soft: rgba(90, 167, 255, .14);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, .26);
  color-scheme: dark;
}

body:has(.app-sidebar),
.metronic-app,
.metronic-auth {
  --kt-bg: var(--bg-primary);
  --kt-surface: var(--card-bg);
  --kt-muted: var(--text-secondary);
  --kt-text: var(--text-primary);
  --kt-line: var(--border-color);
  --kt-primary: var(--accent-primary);
  --kt-primary-soft: var(--accent-primary-soft);
  --kt-sidebar: var(--bg-secondary);
}

body:has(.app-sidebar) {
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent-primary) 10%, transparent), transparent 26%),
    var(--bg-primary);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 4px 6px;
}

.workspace-brand strong,
.workspace-brand small {
  display: block;
}

.workspace-brand strong {
  color: var(--text-primary);
  font-size: 14px;
}

.workspace-brand small {
  color: var(--text-secondary);
  font-size: 11px;
}

.app-sidebar {
  background: var(--bg-secondary);
  border-right-color: var(--border-color);
}

.sidebar-primary {
  border-right-color: var(--border-color);
}

.sidebar-profile,
.side-section a:hover,
.side-section a.active,
.icon-nav a:hover,
.icon-nav a.active,
.sidebar-bottom a:hover {
  background: var(--card-bg);
  border-color: var(--border-color);
}

.sidebar-profile {
  position: relative;
}

.sidebar-profile strong,
.side-section a,
.compact-brand,
.workspace-brand strong {
  color: var(--text-primary);
}

.sidebar-profile small,
.side-section p {
  color: var(--text-muted);
}

.icon-nav a,
.sidebar-bottom a {
  color: var(--text-secondary);
}

.icon-nav a:hover,
.icon-nav a.active,
.sidebar-bottom a:hover,
.side-section a:hover,
.side-section a.active {
  color: var(--accent-primary);
}

.avatar-menu {
  margin-left: auto;
  position: relative;
}

.avatar-menu summary {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}

.avatar-menu summary::-webkit-details-marker {
  display: none;
}

.avatar-menu[open] summary,
.avatar-menu summary:hover {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.avatar-dropdown {
  position: absolute;
  z-index: 60;
  top: 38px;
  right: 0;
  width: 270px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}

.avatar-dropdown-head {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--card-bg-soft);
}

.avatar-dropdown-head strong,
.avatar-dropdown-head small,
.avatar-dropdown-head em {
  display: block;
}

.avatar-dropdown-head strong {
  color: var(--text-primary);
  font-size: 13px;
}

.avatar-dropdown-head small {
  color: var(--text-secondary);
  font-size: 11px;
}

.avatar-dropdown-head em {
  width: fit-content;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.avatar-dropdown > a,
.dropdown-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
}

.avatar-dropdown > a:hover {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.dropdown-row {
  color: var(--text-secondary);
}

.dropdown-row b {
  color: var(--text-primary);
}

.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  margin: 6px 0;
  border-radius: 12px;
  background: var(--card-bg-soft);
}

.theme-switcher button {
  min-height: 30px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
  font-size: 11px;
}

.theme-switcher button.active,
.theme-switcher button:hover {
  background: var(--card-bg);
  border-color: var(--border-color);
  color: var(--accent-primary);
}

.theme-toggle {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--card-bg-soft);
  color: var(--text-primary);
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.theme-toggle i {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--border-color);
  transition: background .18s ease;
}

.theme-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.theme-toggle.active i {
  background: var(--accent-primary);
}

.theme-toggle.active i::after {
  transform: translateX(14px);
}

body:has(.app-sidebar) .panel,
body:has(.app-sidebar) .card,
body:has(.app-sidebar) .table,
body:has(.app-sidebar) .dash-hero,
body:has(.app-sidebar) .kpi-card,
.portal-hero,
.metronic-auth-card,
.auth-brand-panel {
  background: var(--card-bg);
  border-color: var(--border-color);
  box-shadow: var(--shadow-soft);
}

body:has(.app-sidebar) .dash-hero,
.portal-hero,
.auth-brand-panel {
  background:
    radial-gradient(circle at 94% 18%, color-mix(in srgb, var(--accent-primary) 14%, transparent), transparent 25%),
    linear-gradient(135deg, var(--card-bg), var(--card-bg-soft));
}

body:has(.app-sidebar) th {
  background: var(--card-bg-soft);
  color: var(--text-secondary);
}

body:has(.app-sidebar) td,
body:has(.app-sidebar) table {
  color: var(--text-primary);
}

body:has(.app-sidebar) code {
  background: var(--card-bg-soft);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body:has(.app-sidebar) .action-list a,
body:has(.app-sidebar) .workflow-list span,
body:has(.app-sidebar) .compact-list a,
body:has(.app-sidebar) .event-list div {
  background: var(--card-bg-soft);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body:has(.app-sidebar) .tool-product-card,
body:has(.app-sidebar) .metronic-tool-card {
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-primary) 12%, transparent), transparent 32%),
    var(--card-bg);
  border-color: var(--border-color);
}

.portal-preview {
  background: #151a22;
}

:root[data-theme="dark"] .portal-preview {
  background: #202631;
}

.auth-theme-switcher {
  margin-top: 8px;
}

.metronic-auth-card .auth-theme-switcher button {
  color: var(--text-secondary);
}

.metronic-auth-card .auth-theme-switcher button.active,
.metronic-auth-card .auth-theme-switcher button:hover {
  color: var(--accent-primary);
}

:root[data-theme="dark"] .brand-mark {
  box-shadow: 0 10px 28px rgba(90, 167, 255, .18);
}

:root[data-theme="dark"] .avatar-dropdown {
  box-shadow: 0 20px 50px rgba(0, 0, 0, .34);
}

@media (max-width: 980px) {
  .mobile-topbar {
    background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
    border-bottom-color: var(--border-color);
  }
}

.admin-console {
  display: grid;
  gap: 22px;
}

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

.admin-mini-stats span {
  padding: 13px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg-soft);
}

.admin-mini-stats b,
.admin-mini-stats small {
  display: block;
}

.admin-mini-stats b {
  color: var(--text-primary);
  font-size: 22px;
}

.admin-mini-stats small {
  color: var(--text-secondary);
}

/* APP SULTH UI/UX fixing pass */
:root,
:root[data-theme="light"] {
  --bg-primary: #f5f7fb;
  --bg-secondary: #eef2f7;
  --bg-tertiary: #e7edf5;
  --card-bg: #ffffff;
  --card-bg-hover: #f8fbff;
  --sidebar-bg: #eef2f7;
  --sidebar-secondary-bg: #f7f9fc;
  --border-color: #dfe6f0;
  --border-muted: #edf1f6;
  --text-primary: #111827;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-primary: #1b84ff;
  --accent-hover: #0f6bdc;
  --accent-contrast: #ffffff;
  --accent-primary-soft: #eaf4ff;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, .055);
  --shadow-float: 0 24px 70px rgba(15, 23, 42, .18);
  --sidebar-primary-width: 70px;
  --sidebar-secondary-width: 240px;
}

:root[data-theme="dark"] {
  --bg-primary: #121418;
  --bg-secondary: #181b21;
  --bg-tertiary: #20242c;
  --card-bg: #1b1f27;
  --card-bg-hover: #222832;
  --sidebar-bg: #171a20;
  --sidebar-secondary-bg: #1b1f27;
  --border-color: #2c3340;
  --border-muted: #252b36;
  --text-primary: #edf1f7;
  --text-secondary: #a6afbd;
  --text-muted: #7f8998;
  --accent-primary: #5aa7ff;
  --accent-hover: #8cc2ff;
  --accent-contrast: #0f172a;
  --accent-primary-soft: rgba(90, 167, 255, .14);
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, .24);
  --shadow-float: 0 28px 80px rgba(0, 0, 0, .42);
}

body:has(.app-sidebar),
.metronic-app,
.metronic-auth {
  --kt-bg: var(--bg-primary);
  --kt-surface: var(--card-bg);
  --kt-muted: var(--text-secondary);
  --kt-text: var(--text-primary);
  --kt-line: var(--border-color);
  --kt-primary: var(--accent-primary);
  --kt-primary-soft: var(--accent-primary-soft);
  --kt-sidebar: var(--sidebar-bg);
  background: var(--bg-primary);
  color: var(--text-primary);
}

body:has(.app-sidebar)::before,
body:has(.app-sidebar)::after {
  display: none;
}

.app-sidebar {
  width: calc(var(--sidebar-primary-width) + var(--sidebar-secondary-width));
  background: transparent;
  border-right: 0;
  z-index: 100;
}

.sidebar-primary {
  position: relative;
  z-index: 120;
  width: var(--sidebar-primary-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 0;
  overflow: visible;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
}

.sidebar-top,
.sidebar-bottom {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
}

.category-nav {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
  scrollbar-width: thin;
}

.category-nav::-webkit-scrollbar {
  width: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 999px;
}

.sidebar-icon-link,
.icon-nav a,
.sidebar-bottom a,
.avatar-menu summary {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-icon-link:hover,
.sidebar-icon-link.active,
.icon-nav a:hover,
.icon-nav a.active,
.sidebar-bottom a:hover,
.sidebar-bottom a.active,
.avatar-menu[open] summary,
.avatar-menu summary:hover {
  background: var(--card-bg);
  border-color: var(--border-color);
  color: var(--accent-primary);
}

.sidebar-icon-link span,
.icon-nav a span,
.sidebar-bottom a span,
.avatar-menu summary > span:not(.avatar) {
  position: absolute;
  z-index: 1;
  left: 50px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
  font-size: 12px;
  font-weight: 700;
  transition: opacity .14s ease, transform .14s ease;
}

.sidebar-floating-tooltip {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: opacity .12s ease, transform .12s ease;
}

.sidebar-floating-tooltip.show {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar-icon-link:hover span,
.icon-nav a:hover span,
.sidebar-bottom a:hover span,
.avatar-menu summary:hover > span:not(.avatar) {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar-secondary {
  position: relative;
  z-index: 80;
  width: var(--sidebar-secondary-width);
  flex: 0 0 var(--sidebar-secondary-width);
  height: 100vh;
  padding: 0;
  overflow: visible;
  background: var(--sidebar-secondary-bg);
  border-right: 1px solid var(--border-color);
}

.sidebar-secondary-inner {
  height: 100%;
  overflow-y: auto;
  padding: 20px 14px;
}

.sidebar-resizer {
  position: absolute;
  z-index: 130;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: col-resize;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.sidebar-resizer:hover::after,
.is-resizing-sidebar .sidebar-resizer::after {
  background: var(--accent-primary);
}

body:has(.app-sidebar) .wrap {
  padding-left: calc(var(--sidebar-primary-width) + var(--sidebar-secondary-width) + 30px);
  transition: padding-left .16s ease;
}

.workspace-brand,
.sidebar-profile,
.side-section a {
  color: var(--text-primary);
}

.workspace-brand small,
.side-section p,
.sidebar-profile small {
  color: var(--text-muted);
}

.side-section a {
  background: transparent;
}

.side-section a:hover,
.side-section a.active {
  background: var(--card-bg-hover);
  border-color: var(--border-color);
  color: var(--accent-primary);
}

.sidebar-account-menu {
  position: relative;
}

.compact-avatar {
  width: 32px;
  height: 32px;
}

.avatar-menu {
  margin-left: 0;
}

.avatar-dropdown {
  z-index: 400;
  left: 50px;
  right: auto;
  top: auto;
  bottom: 0;
  background: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
  transform-origin: left bottom;
  width: 320px;
  max-width: min(320px, calc(100vw - 92px));
  padding: 12px;
}

.sidebar-account-menu .avatar-dropdown {
  position: fixed;
  z-index: 10020;
  left: calc(var(--sidebar-primary-width) + 12px);
  bottom: 16px;
  width: 340px;
  max-width: min(340px, calc(100vw - var(--sidebar-primary-width) - 24px));
}

.avatar-menu[open] .avatar-dropdown {
  animation: dropdownIn .14s ease both;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-dropdown-head,
.theme-switcher,
.dropdown-row {
  background: var(--card-bg-hover);
}

.avatar-dropdown-head {
  padding: 12px;
  margin-bottom: 8px;
}

.avatar-dropdown > a,
.dropdown-row {
  padding: 10px 11px;
}

.theme-switcher {
  padding: 7px;
  margin: 8px 0;
}

.avatar-dropdown > a:hover,
.theme-switcher button.active,
.theme-switcher button:hover,
.language-switcher button.active,
.language-switcher button:hover {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.language-switcher button {
  min-height: 24px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
  font-size: 11px;
}

body:has(.app-sidebar) .panel,
body:has(.app-sidebar) .card,
body:has(.app-sidebar) .table,
body:has(.app-sidebar) .dash-hero,
body:has(.app-sidebar) .kpi-card,
.portal-hero,
.metronic-auth-card,
.auth-brand-panel {
  background: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

body:has(.app-sidebar) .dash-hero,
.portal-hero,
.auth-brand-panel {
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-primary) 13%, transparent), transparent 28%),
    linear-gradient(135deg, var(--card-bg), var(--card-bg-hover));
}

body:has(.app-sidebar) .muted,
body:has(.app-sidebar) .tool-product-card p,
.auth-brand-panel p:not(.eyebrow) {
  color: var(--text-secondary);
}

body:has(.app-sidebar) th,
body:has(.app-sidebar) .action-list a,
body:has(.app-sidebar) .workflow-list span,
body:has(.app-sidebar) .compact-list a,
body:has(.app-sidebar) .event-list div,
.admin-mini-stats span,
.auth-mini-grid span {
  background: var(--card-bg-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body:has(.app-sidebar) td,
body:has(.app-sidebar) table,
body:has(.app-sidebar) h1,
body:has(.app-sidebar) h2,
body:has(.app-sidebar) h3,
.metronic-auth-card,
.auth-brand-panel h2,
.auth-mini-grid b {
  color: var(--text-primary);
}

body:has(.app-sidebar) input,
body:has(.app-sidebar) select,
body:has(.app-sidebar) textarea,
.metronic-auth-card input {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body:has(.app-sidebar) code {
  background: var(--card-bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body:has(.app-sidebar) .button,
body:has(.app-sidebar) button:not(.sidebar-resizer):not(.mobile-icon-button):not([data-theme-toggle]):not([data-lang-value]) {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--accent-contrast);
}

body:has(.app-sidebar) .button:hover,
body:has(.app-sidebar) button:not(.sidebar-resizer):not(.mobile-icon-button):not([data-theme-toggle]):not([data-lang-value]):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.theme-switcher button,
.metronic-auth-card .auth-theme-switcher button {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

.mobile-icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: none;
}

.sidebar-overlay {
  display: none;
}

.mobile-account-overlay,
.mobile-account-sheet {
  display: none;
}

@media (max-width: 980px) {
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 210;
    background: color-mix(in srgb, var(--bg-primary) 94%, transparent);
    border-bottom-color: var(--border-color);
  }

  .app-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    width: var(--sidebar-primary-width);
    height: calc(100vh - 60px);
    display: block;
    border: 0;
  }

  .sidebar-primary {
    height: 100%;
    width: var(--sidebar-primary-width);
    flex-direction: column;
    padding: 12px 0;
    border-right: 1px solid var(--border-color);
  }

  .sidebar-logo {
    display: grid;
  }

  .category-nav {
    display: grid;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar-bottom {
    display: grid;
    width: 100%;
  }

  .sidebar-secondary {
    position: fixed;
    z-index: 205;
    top: 60px;
    left: var(--sidebar-primary-width);
    bottom: 0;
    width: min(300px, calc(100vw - var(--sidebar-primary-width) - 20px));
    height: calc(100vh - 60px);
    display: block;
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-float);
  }

  body.sidebar-secondary-open .sidebar-secondary {
    transform: translateX(0);
  }

  .sidebar-resizer {
    display: none;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 190;
    inset: 60px 0 0 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(15, 23, 42, .36);
    transition: opacity .2s ease;
  }

  body.sidebar-secondary-open .sidebar-overlay {
    pointer-events: auto;
    opacity: 1;
  }

  body:has(.app-sidebar) .wrap {
    padding: 20px 16px 36px calc(var(--sidebar-primary-width) + 16px);
  }

  .avatar-dropdown {
    position: fixed;
    left: calc(var(--sidebar-primary-width) + 8px);
    bottom: 14px;
  }
}

/* Final dark-mode and overflow correction layer */
.sidebar-primary,
.category-nav,
.sidebar-top,
.sidebar-bottom {
  max-width: var(--sidebar-primary-width);
  overflow-x: hidden;
}

.sidebar-primary {
  overflow-y: visible;
}

.sidebar-top,
.sidebar-bottom {
  overflow-y: visible;
}

.sidebar-primary a,
.sidebar-account-menu summary {
  flex: 0 0 auto;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] body:has(.app-sidebar),
:root[data-theme="dark"] .metronic-app {
  background: var(--bg-primary);
  color: var(--text-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) .wrap,
:root[data-theme="dark"] .portal-page,
:root[data-theme="dark"] .dashboard-v2,
:root[data-theme="dark"] .account-page,
:root[data-theme="dark"] main {
  background: transparent;
  color: var(--text-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) section,
:root[data-theme="dark"] body:has(.app-sidebar) .panel,
:root[data-theme="dark"] body:has(.app-sidebar) .card,
:root[data-theme="dark"] body:has(.app-sidebar) .table,
:root[data-theme="dark"] body:has(.app-sidebar) .dash-hero,
:root[data-theme="dark"] body:has(.app-sidebar) .kpi-card,
:root[data-theme="dark"] body:has(.app-sidebar) .tool-product-card,
:root[data-theme="dark"] .portal-hero {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) th,
:root[data-theme="dark"] body:has(.app-sidebar) td,
:root[data-theme="dark"] body:has(.app-sidebar) input,
:root[data-theme="dark"] body:has(.app-sidebar) select,
:root[data-theme="dark"] body:has(.app-sidebar) textarea,
:root[data-theme="dark"] body:has(.app-sidebar) code {
  background-color: var(--card-bg-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) .dash-hero,
:root[data-theme="dark"] .portal-hero {
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-primary) 13%, transparent), transparent 28%),
    linear-gradient(135deg, var(--card-bg), var(--card-bg-hover));
}

/* Final account layer and dark typography guard */
.sidebar-account-menu[open],
.sidebar-account-menu[open] summary {
  z-index: 10010;
}

.sidebar-account-menu[open] .avatar-dropdown {
  pointer-events: auto;
  isolation: isolate;
}

:root[data-theme="dark"] body:has(.app-sidebar) .wrap :where(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,label,td,th,a,li,dt,dd,div,code,pre,summary) {
  color: var(--text-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) .wrap :where(.muted, small, .eyebrow + p, .panel-title p, .tool-product-card p, .kpi-card small, .hero-status span, .event-list span, .compact-list span) {
  color: var(--text-secondary);
}

:root[data-theme="dark"] body:has(.app-sidebar) :where(.side-section p, .workspace-brand small, .sidebar-profile small, .avatar-dropdown-head small, .dropdown-row, .theme-switcher button) {
  color: var(--text-muted);
}

:root[data-theme="dark"] body:has(.app-sidebar) :where(.side-section a:hover, .side-section a.active, .tool-product-card > a, .icon-link, .eyebrow, .theme-switcher button.active, .theme-switcher button:hover) {
  color: var(--accent-primary);
}

:root[data-theme="dark"] body:has(.app-sidebar) :where(button, .button) {
  color: var(--accent-contrast);
}

:root[data-theme="dark"] body:has(.app-sidebar) :where(input, select, textarea) {
  color: var(--text-primary);
  background: var(--card-bg);
}

:root[data-theme="dark"] body:has(.app-sidebar) :where(input::placeholder, textarea::placeholder) {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  :root {
    --sidebar-primary-width: 62px;
  }

  .sidebar-icon-link,
  .icon-nav a,
  .sidebar-bottom a,
  .avatar-menu summary {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  body:has(.app-sidebar) .wrap {
    padding-left: calc(var(--sidebar-primary-width) + 12px);
  }
}

/* Final compact dropdown, semantic color and minimal scrollbar polish */
.sidebar-account-menu .avatar-dropdown {
  width: 286px;
  max-width: min(286px, calc(100vw - var(--sidebar-primary-width) - 18px));
  padding: 8px;
  border-radius: 14px;
}

.sidebar-account-menu .avatar-dropdown-head {
  gap: 9px;
  padding: 9px;
  margin-bottom: 5px;
  border-radius: 11px;
}

.sidebar-account-menu .avatar-dropdown-head .avatar {
  width: 32px;
  height: 32px;
}

.sidebar-account-menu .avatar-dropdown-head strong {
  font-size: 12px;
}

.sidebar-account-menu .avatar-dropdown-head small {
  font-size: 10px;
}

.sidebar-account-menu .avatar-dropdown-head em {
  margin-top: 4px;
  padding: 3px 6px;
  font-size: 9px;
}

.sidebar-account-menu .avatar-dropdown > a {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 650;
}

.sidebar-account-menu .avatar-dropdown > a:hover {
  background: var(--card-bg-hover);
  color: var(--accent-primary);
}

.sidebar-account-menu .theme-switcher {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  margin: 5px 0;
  border-radius: 10px;
  background: var(--card-bg-hover);
}

.sidebar-account-menu .theme-switcher button {
  min-height: 24px;
  padding: 4px 5px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  color: var(--text-secondary);
}

.sidebar-account-menu .theme-switcher button.active,
.sidebar-account-menu .theme-switcher button:hover {
  background: var(--card-bg);
  color: var(--accent-primary);
  border-color: var(--border-color);
}

body:has(.app-sidebar) .category-strip span,
body:has(.app-sidebar) .tool-category {
  background: var(--accent-primary-soft);
  border-color: color-mix(in srgb, var(--accent-primary) 28%, var(--border-color));
  color: var(--accent-primary);
}

body:has(.app-sidebar) .button.secondary,
body:has(.app-sidebar) a.button.secondary,
body:has(.app-sidebar) .icon-link {
  background: var(--card-bg-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: none;
}

body:has(.app-sidebar) .button.secondary:hover,
body:has(.app-sidebar) a.button.secondary:hover,
body:has(.app-sidebar) .icon-link:hover {
  background: var(--accent-primary-soft);
  border-color: color-mix(in srgb, var(--accent-primary) 32%, var(--border-color));
  color: var(--accent-primary);
}

body:has(.app-sidebar) :where(.tool-product-meta b, .panel-title h2, .section-head h2, .account-facts b, .kpi-card strong) {
  color: var(--text-primary);
}

body:has(.app-sidebar) :where(.tool-product-meta span, .panel-title p, .account-facts small, .kpi-card small) {
  color: var(--text-secondary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*:hover,
*:focus,
*:focus-within {
  scrollbar-color: color-mix(in srgb, var(--text-muted) 42%, transparent) transparent;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: transparent;
}

*:hover::-webkit-scrollbar-thumb,
*:focus::-webkit-scrollbar-thumb,
*:focus-within::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--text-muted) 38%, transparent);
}

*:hover::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--text-muted) 62%, transparent);
}

.sidebar-secondary-inner,
.category-nav,
.table,
.avatar-dropdown {
  scrollbar-gutter: stable;
}

/* Mobile app-first navigation: below 768px */
@media (max-width: 767px) {
  :root {
    --mobile-header-height: 58px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 400;
    min-height: var(--mobile-header-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    background: color-mix(in srgb, var(--bg-primary) 94%, transparent);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
  }

  .mobile-topbar .compact-brand {
    min-height: 0 !important;
    flex: 1;
    font-size: 13px;
  }

  .mobile-auth,
  .mobile-user-box {
    min-width: 0;
    padding: 7px 9px;
    font-size: 11px;
  }

  .mobile-user-box {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: none;
  }

  .app-sidebar {
    position: fixed;
    z-index: 420;
    inset: var(--mobile-header-height) auto 0 0;
    width: min(340px, calc(100vw - 24px));
    height: calc(100vh - var(--mobile-header-height));
    display: block;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-float);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.mobile-nav-open .app-sidebar,
  body.sidebar-secondary-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-primary {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
    overflow: hidden;
    border-right: 0;
    background: var(--sidebar-bg);
  }

  .sidebar-top {
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: flex-start;
    overflow: visible;
  }

  .sidebar-logo {
    display: inline-grid;
  }

  .category-nav {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    justify-items: stretch;
    gap: 4px;
    padding: 2px 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar-bottom {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    display: grid;
    justify-items: stretch;
    gap: 4px;
    overflow: visible;
    padding-top: 8px;
    border-top: 1px solid var(--border-muted);
  }

  .sidebar-bottom .sidebar-account-menu {
    display: none;
  }

  .sidebar-icon-link,
  .icon-nav a,
  .sidebar-bottom a,
  .avatar-menu summary {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 10px;
    border-radius: 12px;
  }

  .sidebar-icon-link i,
  .icon-nav a i,
  .sidebar-bottom a i {
    width: 22px;
    display: inline-grid;
    place-items: center;
    font-size: 18px;
  }

  .sidebar-icon-link span,
  .icon-nav a span,
  .sidebar-bottom a span,
  .avatar-menu summary > span:not(.avatar) {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
  }

  .sidebar-floating-tooltip {
    display: none;
  }

  .sidebar-secondary {
    position: static;
    z-index: auto;
    width: 100%;
    height: auto;
    display: block;
    transform: none;
    transition: none;
    background: var(--sidebar-secondary-bg);
    border: 1px solid var(--border-muted);
    border-radius: 14px;
    box-shadow: none;
    margin: 0 14px 14px;
    overflow: hidden;
  }

  .sidebar-resizer {
    display: none;
  }

  .sidebar-secondary-inner {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 12px;
  }

  .workspace-brand {
    display: none;
  }

  .side-section {
    margin-bottom: 0;
  }

  .side-section p {
    padding: 0 6px;
    margin-bottom: 7px;
  }

  .side-section a {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 9px;
    border-radius: 10px;
    font-size: 13px;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 410;
    inset: var(--mobile-header-height) 0 0 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(15, 23, 42, .38);
    transition: opacity .2s ease;
  }

  body.mobile-nav-open .sidebar-overlay,
  body.sidebar-secondary-open .sidebar-overlay {
    pointer-events: auto;
    opacity: 1;
  }

  body:has(.app-sidebar) .wrap {
    width: 100%;
    min-height: calc(100vh - var(--mobile-header-height));
    padding: 14px 12px 28px;
    margin: 0;
  }

  .portal-page,
  .dashboard-v2,
  .account-page {
    gap: 14px;
  }

  .portal-hero,
  body:has(.app-sidebar) .dash-hero,
  body:has(.app-sidebar) .panel,
  body:has(.app-sidebar) .card {
    border-radius: 14px;
    padding: 14px;
  }

  .kpi-grid,
  .dash-layout,
  .tool-product-grid,
  .metronic-tool-grid,
  .account-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .table {
    overflow-x: auto;
  }

  .mobile-account-overlay {
    position: fixed;
    z-index: 500;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: rgba(15, 23, 42, .38);
    transition: opacity .2s ease;
    display: block;
  }

  .mobile-account-sheet {
    position: fixed;
    z-index: 510;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: var(--shadow-float);
    transform: translateY(calc(100% + 18px));
    transition: transform .22s ease;
  }

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

  body.mobile-account-open .mobile-account-sheet {
    transform: translateY(0);
  }

  .mobile-account-sheet a {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
  }

  .mobile-account-sheet a:hover {
    background: var(--card-bg-hover);
    color: var(--accent-primary);
  }

  .mobile-account-sheet .theme-switcher {
    margin: 5px 0;
    padding: 4px;
  }

  .mobile-account-sheet .theme-switcher button {
    min-height: 30px;
    font-size: 11px;
  }

  body:has(.app-sidebar) h1 {
    font-size: clamp(24px, 8vw, 32px);
  }

  body:has(.app-sidebar) h2 {
    font-size: 18px;
  }
}

/* Mobile desktop-like floating dual sidebar */
@media (max-width: 767px) {
  .app-sidebar {
    top: calc(var(--mobile-header-height) + 10px);
    left: 10px;
    bottom: auto;
    width: min(356px, calc(100vw - 20px));
    height: min(620px, calc(100vh - var(--mobile-header-height) - 24px));
    display: flex;
    overflow: visible;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    box-shadow: var(--shadow-float);
    transform: translate3d(-108%, 0, 0) scale(.985);
    opacity: 0;
    transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .24s ease;
  }

  body.mobile-nav-open .app-sidebar,
  body.sidebar-secondary-open .app-sidebar {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  .sidebar-primary {
    width: 64px;
    max-width: 64px;
    height: 100%;
    min-height: 0;
    flex: 0 0 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
    border-radius: 20px 0 0 20px;
    background: color-mix(in srgb, var(--sidebar-bg) 96%, transparent);
    backdrop-filter: blur(18px);
  }

  .sidebar-top {
    justify-content: center;
    justify-items: center;
    width: 64px;
    max-width: 64px;
  }

  .category-nav {
    width: 64px;
    max-width: 64px;
    flex: 1 1 auto;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 0;
  }

  .sidebar-bottom {
    width: 64px;
    max-width: 64px;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-muted);
    overflow: hidden;
  }

  .sidebar-icon-link,
  .icon-nav a,
  .sidebar-bottom a,
  .avatar-menu summary {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 12px;
  }

  .sidebar-icon-link i,
  .icon-nav a i,
  .sidebar-bottom a i {
    width: auto;
    font-size: 18px;
  }

  .sidebar-icon-link span,
  .icon-nav a span,
  .sidebar-bottom a span,
  .avatar-menu summary > span:not(.avatar) {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-secondary {
    position: relative;
    z-index: 1;
    top: auto;
    left: auto;
    bottom: auto;
    width: calc(100% - 64px);
    height: 100%;
    flex: 1 1 auto;
    display: block;
    margin: 0;
    border: 0;
    border-radius: 0 20px 20px 0;
    background: color-mix(in srgb, var(--sidebar-secondary-bg) 96%, transparent);
    box-shadow: none;
    transform: none;
    overflow: hidden;
    backdrop-filter: blur(18px);
  }

  .sidebar-secondary-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px;
    scroll-behavior: smooth;
  }

  .workspace-brand {
    display: flex;
    padding: 0 2px 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-muted);
  }

  .workspace-brand .brand-mark {
    display: none;
  }

  .side-section p {
    padding: 0 4px;
    margin-bottom: 8px;
  }

  .side-section a {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  .sidebar-overlay {
    z-index: 390;
    inset: var(--mobile-header-height) 0 0 0;
    background: rgba(15, 23, 42, .28);
    backdrop-filter: blur(2px);
    transition: opacity .26s ease;
  }

  .sidebar-floating-tooltip {
    display: none;
  }

  .sidebar-bottom .sidebar-account-menu {
    display: none;
  }

  body:has(.app-sidebar) .wrap {
    padding: 14px 12px 28px;
  }
}

/* APP SULTH ecosystem polish */
.portal-page,
.discover-page,
.tool-workspace-page {
  display: grid;
  gap: 18px;
}

.portal-hero,
.discover-hero,
.tool-workspace-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: center;
  padding: clamp(20px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--accent-primary) 14%, transparent), transparent 32%),
    linear-gradient(135deg, var(--card-bg), color-mix(in srgb, var(--bg-secondary) 84%, var(--accent-primary) 6%));
  box-shadow: var(--shadow-soft);
}

.portal-hero::after,
.discover-hero::after,
.tool-workspace-hero::after {
  content: "";
  position: absolute;
  inset: auto 24px 18px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
  filter: blur(24px);
  pointer-events: none;
}

.portal-hero > *,
.discover-hero > *,
.tool-workspace-hero > * {
  position: relative;
  z-index: 1;
}

.portal-hero h1,
.discover-hero h1,
.tool-workspace-hero h1 {
  max-width: 720px;
  margin: 8px 0 10px;
  color: var(--text-primary);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.discover-hero h1,
.tool-workspace-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.portal-hero .muted,
.discover-hero .muted,
.tool-workspace-hero .muted {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.portal-preview {
  display: grid;
  gap: 14px;
  min-height: 250px;
  padding: 16px;
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent-primary) 18%, var(--card-bg)), var(--card-bg)),
    var(--card-bg);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent-contrast) 10%, transparent);
}

.preview-toolbar,
.preview-grid,
.preview-chart {
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.preview-toolbar b,
.preview-grid b {
  color: var(--text-primary);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
}

.preview-grid span {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card-bg);
}

.preview-grid small {
  color: var(--text-muted);
  font-size: 11px;
}

.preview-chart {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 100px;
  padding: 12px;
}

.preview-chart i {
  flex: 1;
  min-height: 28px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--accent-primary), color-mix(in srgb, var(--accent-primary) 14%, var(--card-bg)));
}

.preview-chart i:nth-child(2) { height: 58px; }
.preview-chart i:nth-child(3) { height: 82px; }
.preview-chart i:nth-child(4) { height: 48px; }
.preview-chart i:nth-child(5) { height: 72px; }

.app-cms-page {
  --accent-primary: var(--app-accent, var(--accent-primary));
}

.app-page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--app-accent, var(--accent-primary)) 18%, transparent), transparent 34%),
    linear-gradient(135deg, var(--card-bg), color-mix(in srgb, var(--bg-secondary) 78%, var(--app-accent, var(--accent-primary)) 8%));
  box-shadow: var(--shadow-soft);
}

.app-page-hero h1 {
  max-width: 760px;
  margin: 8px 0 10px;
  color: var(--text-primary);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.03;
  letter-spacing: 0;
}

.app-page-hero .muted {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.75;
}

.app-page-preview {
  min-height: 240px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  background: color-mix(in srgb, var(--card-bg) 88%, var(--app-accent, var(--accent-primary)) 8%);
}

.app-page-preview img,
.app-page-media-grid img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border-muted);
}

.app-page-section {
  padding: clamp(18px, 3vw, 28px);
}

.app-page-card-grid,
.app-page-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.app-page-mini-card {
  display: grid;
  gap: 9px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
}

.app-page-mini-card span {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-accent, var(--accent-primary)) 12%, var(--card-bg));
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 800;
}

.app-page-mini-card h3,
.app-page-cta h2 {
  margin: 0;
  color: var(--text-primary);
}

.app-page-mini-card p,
.app-page-cta p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.app-page-cta {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--app-accent, var(--accent-primary)) 28%, var(--border-color));
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--app-accent, var(--accent-primary)) 16%, transparent), transparent 38%),
    var(--card-bg);
}

.trend-preview {
  align-content: start;
}

.trend-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.trend-stat-row span,
.trend-keyword-panel span {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--card-bg);
}

.trend-stat-row b {
  color: var(--text-primary);
  font-size: 20px;
}

.trend-stat-row small {
  color: var(--text-muted);
}

.trend-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-keyword-cloud i {
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-accent, var(--accent-primary)) 10%, var(--card-bg));
  color: var(--text-primary);
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}

.trend-dashboard-showcase {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, .7fr) minmax(220px, .7fr);
  gap: 14px;
}

.trend-chart-card,
.trend-card-list,
.trend-keyword-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
}

.trend-card-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--card-bg);
}

.trend-card-list article span {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.app-builder-admin .builder-tabs,
.app-builder-admin .builder-toolbar {
  margin-bottom: 14px;
}

.builder-preview-shell {
  height: min(760px, 78vh);
  padding: 8px;
  overflow: hidden;
}

.builder-preview-shell iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: var(--card-bg);
}

.builder-section-card {
  border-color: color-mix(in srgb, var(--accent-primary) 18%, var(--border-color));
}

.portal-kpis .kpi-card,
.app-card,
.empty-state,
.workspace-band article {
  color: var(--text-primary);
}

.ecosystem-section,
.discover-page > .panel,
.tool-workspace-page > .panel {
  overflow: visible;
}

.app-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.app-card {
  display: grid;
  gap: 14px;
  min-height: 250px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--accent-primary) 10%, transparent), transparent 30%),
    var(--card-bg);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-color));
  background:
    radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--accent-primary) 14%, transparent), transparent 32%),
    var(--card-bg-hover);
}

.app-card-top,
.app-card-meta,
.tool-hero-actions,
.generate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 24%, var(--border-color));
  border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 16%, var(--card-bg)), var(--card-bg));
  color: var(--accent-primary);
  font-weight: 800;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-icon-lg {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 22px;
}

.free-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--success) 26%, var(--border-color));
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 11%, var(--card-bg));
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
}

.app-card h3,
.empty-state h3,
.workspace-band h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.25;
}

.app-card p,
.empty-state p,
.workspace-band p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.app-card-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.app-card > a,
.workspace-band a,
.template-list a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 750;
}

.app-card > a:hover,
.workspace-band a:hover,
.template-list a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-color));
  color: var(--accent-primary);
  background: var(--card-bg-hover);
}

.category-strip.app-category-strip,
.discover-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.category-strip.app-category-strip span,
.discover-tabs a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.discover-tabs a.active,
.discover-tabs a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 40%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--card-bg));
  color: var(--accent-primary);
}

.home-collection-grid,
.tool-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 14px;
}

.mini-app-list,
.template-list,
.usage-stack {
  display: grid;
  gap: 9px;
}

.mini-app-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.mini-app-list a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 36%, var(--border-color));
  background: var(--card-bg-hover);
}

.mini-app-list b,
.mini-app-list small {
  min-width: 0;
}

.mini-app-list b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.mini-app-list small {
  color: var(--text-muted);
  font-size: 11px;
}

.workspace-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.workspace-band article {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--accent-primary) 10%, transparent), transparent 34%),
    var(--card-bg);
}

.workspace-band span {
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed color-mix(in srgb, var(--accent-primary) 30%, var(--border-color));
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-primary) 5%, var(--card-bg));
  text-align: center;
}

.notification-page {
  display: grid;
  gap: 16px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pills a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.filter-pills a.active,
.filter-pills a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--card-bg));
  color: var(--text-primary);
}

.notification-search,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.notification-search input,
.notification-search select {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-primary);
}

.notification-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
}

.notification-card.unread {
  border-color: color-mix(in srgb, var(--accent-primary) 36%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 7%, var(--card-bg));
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--accent-primary);
}

.notification-content {
  display: grid;
  gap: 7px;
}

.notification-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.notification-meta span {
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.notification-meta em {
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-primary) 12%, var(--card-bg));
  color: var(--accent-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.notification-card h3,
.notification-card p {
  margin: 0;
}

.notification-card h3 {
  color: var(--text-primary);
  font-size: 15px;
}

.notification-card p,
.notification-card small {
  color: var(--text-secondary);
  font-size: 12px;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.notification-actions form {
  margin: 0;
}

.forum-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.forum-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.forum-create-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 72%, #0b0b0b);
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-primary) 96%, #ffffff 8%), color-mix(in srgb, var(--accent-primary) 88%, #050505 14%));
  color: #fff !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent-primary) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.forum-create-action:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--accent-primary) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.2);
}

.forum-create-action i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
}

.forum-page > .category-strip {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 var(--space-md);
  padding: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card-bg) 86%, var(--bg-secondary));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.forum-page > .category-strip::-webkit-scrollbar {
  display: none;
}

.forum-page > .category-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  scroll-snap-align: start;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.forum-page > .category-strip a i {
  color: var(--icon-muted);
  font-size: 14px;
}

.forum-page > .category-strip a:hover {
  border-color: var(--border-muted);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.forum-page > .category-strip a.active {
  border-color: color-mix(in srgb, var(--accent-primary) 46%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 12%, var(--card-bg));
  color: var(--text-primary);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent-primary) 14%, transparent);
}

.forum-page > .category-strip a.active i {
  color: var(--accent-primary);
}

.forum-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.forum-quick-actions h2 {
  margin: 4px 0 0;
  color: var(--text-primary);
}

.forum-action-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.forum-thread-list,
.forum-replies {
  display: grid;
  gap: 12px;
}

.forum-thread-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--card-bg);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.forum-thread-card:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 32%, var(--border-color));
  background: var(--card-bg-hover);
  transform: translateY(-1px);
}

.forum-thread-card.pinned {
  border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-color));
}

.forum-thread-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 14px;
  padding: 14px;
  color: inherit;
}

.forum-thread-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.forum-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 900;
}

.forum-meta,
.forum-tags,
.forum-post-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.forum-meta span,
.forum-meta em,
.forum-tags small {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.forum-meta em {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--card-bg));
}

.forum-thread-card h3 {
  margin: 6px 0 5px;
  color: var(--text-primary);
  font-size: 15px;
}

.forum-thread-card p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.forum-thread-stats {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.forum-thread-stats strong {
  color: var(--text-primary);
  font-size: 16px;
}

.forum-post {
  display: grid;
  gap: 12px;
}

.forum-post.solution {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border-color));
  background: color-mix(in srgb, var(--success) 6%, var(--card-bg));
}

.forum-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.forum-post-head small {
  display: block;
  color: var(--text-secondary);
}

.forum-body {
  color: var(--text-primary);
  line-height: 1.65;
}

.forum-body pre {
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}

.forum-editor {
  display: grid;
  gap: 12px;
}

.forum-editor textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text-primary);
}

.editor-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.forum-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.forum-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 750;
}

.otp-input {
  text-align: center;
  letter-spacing: .28em;
  font-size: 22px;
  font-weight: 900;
}

.otp-card .secondary {
  width: 100%;
}

.table-actions {
  gap: 6px;
}

.table-actions button,
.table-actions select,
.table-actions input {
  min-height: 32px;
}

@media (max-width: 767px) {
  .forum-hero-actions,
  .forum-quick-actions,
  .forum-toolbar,
  .forum-thread-card > a {
    grid-template-columns: 1fr;
    display: grid;
  }

  .forum-action-grid {
    justify-content: stretch;
  }

  .forum-action-grid a,
  .forum-hero-actions a {
    justify-content: center;
    width: 100%;
  }

  .forum-thread-stats {
    justify-items: start;
    grid-template-columns: repeat(4, auto);
  }

  .forum-fab {
    display: inline-flex;
  }
}

.nav-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid var(--sidebar-bg);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.nav-badge.is-hidden {
  display: none;
}

.compact-empty {
  min-height: 132px;
}

.span-all {
  grid-column: 1 / -1;
}

.discover-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.discover-search input {
  width: min(360px, 100%);
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
}

.discover-search input::placeholder {
  color: var(--text-muted);
}

.category-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-hero-actions {
  justify-content: end;
  flex-wrap: wrap;
}

.generate-panel {
  min-height: 340px;
}

.app-detail-story {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: center;
}

.app-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
}

.generate-surface {
  display: grid;
  gap: 12px;
}

.generate-surface label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.generate-surface textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font: inherit;
  outline: none;
}

.generate-surface textarea::placeholder {
  color: var(--text-muted);
}

.usage-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--bg-secondary);
}

.usage-stack span,
.tool-product-meta span {
  color: var(--text-muted);
  font-size: 12px;
}

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

@media (max-width: 980px) {
  .portal-hero,
  .discover-hero,
  .tool-workspace-hero,
  .app-detail-story,
  .home-collection-grid,
  .tool-workspace-grid {
    grid-template-columns: 1fr;
  }

  .workspace-band {
    grid-template-columns: 1fr;
  }

  .discover-search,
  .category-intro,
  .tool-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .portal-page,
  .discover-page,
  .tool-workspace-page {
    gap: 12px;
  }

  .portal-hero,
  .discover-hero,
  .tool-workspace-hero {
    padding: 16px;
    border-radius: 18px;
  }

  .portal-hero h1,
  .discover-hero h1,
  .tool-workspace-hero h1 {
    font-size: 29px;
    line-height: 1.08;
  }

  .preview-grid,
  .app-card-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 0;
  }

  .mini-app-list a {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mini-app-list small {
    grid-column: 2;
  }

  .tool-identity {
    align-items: flex-start;
  }

  .generate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .generate-actions .button {
    width: 100%;
  }
}

/* Admin operations system */
.admin-app {
  --bg-primary: #f5f7fb;
  --bg-secondary: #eef2f7;
  --bg-tertiary: #e8edf5;
  --card-bg: #ffffff;
  --card-bg-hover: #f8fafc;
  --sidebar-bg: #ffffff;
  --sidebar-secondary-bg: #f8fafc;
  --border-color: #dce3ee;
  --border-muted: #edf1f6;
  --text-primary: #202938;
  --text-secondary: #667085;
  --text-muted: #8a94a6;
  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-contrast: #ffffff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, .07);
  --shadow-float: 0 22px 60px rgba(15, 23, 42, .14);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.admin-app::before {
  display: none;
}

.admin-sidebar {
  position: fixed;
  z-index: 80;
  inset: 0 auto 0 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--sidebar-bg) 96%, var(--bg-primary));
  box-shadow: 10px 0 30px rgba(15, 23, 42, .03);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.admin-brand > span,
.admin-user-pill > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), color-mix(in srgb, var(--accent-primary) 55%, #7dd3fc));
  color: var(--accent-contrast);
  font-weight: 850;
}

.admin-brand strong,
.admin-user-pill strong {
  display: block;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.2;
}

.admin-brand small,
.admin-user-pill small,
.admin-topbar span {
  color: var(--text-muted);
  font-size: 11px;
}

.admin-nav {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-nav section,
.admin-nav-group {
  display: grid;
  gap: 4px;
}

.admin-nav-group {
  border-radius: 14px;
}

.admin-nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group summary span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-nav-group summary i:first-child {
  color: var(--accent-primary);
  font-size: 15px;
}

.admin-nav-group summary i:last-child {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform .18s ease;
}

.admin-nav-group[open] summary {
  background: #f8fafc;
  color: var(--text-primary);
}

.admin-nav-group[open] summary i:last-child {
  transform: rotate(180deg);
}

.admin-nav-items {
  display: grid;
  gap: 4px;
  padding: 3px 0 7px;
}

.admin-nav a,
.admin-sidebar-foot a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 32px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
}

.admin-nav a:hover,
.admin-nav a.active,
.admin-sidebar-foot a:hover {
  background: var(--card-bg-hover);
  color: var(--text-primary);
}

.admin-nav a.active {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.admin-sidebar-foot {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.admin-sidebar-foot a {
  padding-left: 10px;
}

.admin-topbar {
  position: sticky;
  z-index: 70;
  top: 0;
  grid-column: 2;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: blur(16px);
}

.admin-topbar strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px 6px 6px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--card-bg);
}

.admin-user-pill > span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 12px;
}

.admin-main {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 18px;
  align-content: start;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.admin-app .dash-hero {
  background:
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, .10), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}

.admin-app .dash-hero,
.admin-app .panel,
.admin-app .card,
.admin-app .table,
.admin-app .kpi-card,
.admin-module-card {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

.admin-app .kpi-card {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.admin-app .kpi-card span,
.admin-app .kpi-card small,
.admin-app .muted,
.admin-app small {
  color: var(--text-secondary);
}

.admin-app .kpi-card strong,
.admin-app h1,
.admin-app h2,
.admin-app h3,
.admin-app label,
.admin-app th,
.admin-app td {
  color: var(--text-primary);
}

.admin-app .button,
.admin-app button:not(.sidebar-resizer),
.admin-app input[type="submit"] {
  border: 1px solid color-mix(in srgb, var(--accent-primary) 22%, var(--border-color));
  background: var(--accent-primary);
  color: var(--accent-contrast);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .16);
}

.admin-app .button:hover,
.admin-app button:not(.sidebar-resizer):hover,
.admin-app input[type="submit"]:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.admin-app .button.secondary,
.admin-app button.secondary,
.admin-app a.button.secondary {
  border-color: var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: none;
}

.admin-app .button.secondary:hover,
.admin-app button.secondary:hover,
.admin-app a.button.secondary:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 34%, var(--border-color));
  background: #f8fbff;
  color: var(--accent-primary);
}

.admin-app input,
.admin-app select,
.admin-app textarea {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
}

.admin-app input::placeholder,
.admin-app textarea::placeholder {
  color: var(--text-muted);
}

.admin-app .table {
  overflow-x: auto;
}

.admin-app table {
  border-collapse: separate;
  border-spacing: 0;
}

.admin-app th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-app td,
.admin-app th {
  border-bottom: 1px solid var(--border-muted);
}

.admin-app tr:hover td {
  background: #fbfdff;
}

.admin-app code {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-app .alert {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.admin-app .alert.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.admin-app .action-list a,
.admin-app .compact-list a,
.admin-app .event-list div {
  border: 1px solid var(--border-color);
  background: var(--card-bg-hover);
  color: var(--text-primary);
}

.admin-app .action-list a:hover,
.admin-app .compact-list a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 34%, var(--border-color));
  background: #f8fbff;
  color: var(--accent-primary);
}

.admin-app .action-list a *,
.admin-app .compact-list a * {
  color: inherit;
}

.admin-app .danger-action,
.admin-app button.danger-action,
.admin-app .button.danger-action {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--border-color));
  background: #fff5f5;
  color: #b91c1c;
  box-shadow: none;
}

.admin-app .danger-action:hover,
.admin-app button.danger-action:hover,
.admin-app .button.danger-action:hover {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.bulk-action-bar {
  position: sticky;
  bottom: 18px;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: min(1280px, 100%);
  margin: 14px auto 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.bulk-action-bar .button,
.bulk-action-bar button {
  width: auto;
}

.delete-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(8px);
}

.delete-modal.show {
  display: grid;
}

.delete-modal-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.delete-modal-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #fee2e2;
  color: #b91c1c;
}

.delete-modal-card h3 {
  margin-bottom: 8px;
}

.delete-modal-card p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.delete-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.delete-modal-actions button {
  width: auto;
}

.chatbot-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
}

.chatbot-launcher {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, var(--border-color));
  background: var(--accent-primary);
  color: var(--accent-contrast);
  box-shadow: 0 18px 48px rgba(37, 99, 235, .26);
}

.chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  display: none;
  width: min(380px, calc(100vw - 32px));
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
}

.chatbot-widget.open .chatbot-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: chatbotIn .2s ease both;
}

@keyframes chatbotIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-muted);
}

.chatbot-panel header div {
  display: grid;
  gap: 2px;
}

.chatbot-panel header span {
  color: var(--text-secondary);
  font-size: 12px;
}

.chatbot-panel header button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: none;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
}

.chatbot-messages article {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.chatbot-messages .assistant {
  align-self: flex-start;
  border: 1px solid var(--border-muted);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.chatbot-messages .user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: var(--accent-contrast);
}

.chatbot-messages .typing {
  color: var(--text-secondary);
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-muted);
}

.chatbot-form input {
  min-width: 0;
}

.chatbot-form button {
  width: auto;
}

@media (max-width: 767px) {
  .chatbot-widget {
    right: 16px;
    bottom: 16px;
  }

  .chatbot-panel {
    height: min(520px, calc(100vh - 120px));
  }
}

.admin-app .page-heading {
  padding: 0;
  margin: 0;
}

.admin-app .page-heading h1,
.admin-app .dash-hero h1,
.admin-module-card h2 {
  color: var(--text-primary);
}

.admin-app .page-heading .muted,
.admin-module-card p {
  color: var(--text-secondary);
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.admin-module-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 210px;
  padding: 18px;
}

.admin-module-card span {
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.admin-module-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.admin-module-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.admin-module-card a,
.admin-chip-nav a {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 750;
}

.admin-module-card a:hover,
.admin-chip-nav a:hover,
.admin-chip-nav a.active {
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--card-bg));
  color: var(--accent-primary);
}

.admin-chip-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.admin-app .form-grid,
.admin-app .table {
  overflow: visible;
}

.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-app .check-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 750;
}

.admin-app .check-row input {
  width: auto;
}

.upload-field {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent-primary) 26%, var(--border-color));
  border-radius: 16px;
  background: #fbfdff;
}

.upload-preview {
  width: 118px;
  min-height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-field small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.color-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
}

.color-field input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 4px;
}

.color-field span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--swatch);
}

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

.admin-app table {
  min-width: 820px;
}

.license-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--bg-secondary);
}

.license-key-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.admin-upload-zone {
  display: grid;
  gap: 10px;
  place-items: center;
  padding: 28px;
  border: 1px dashed var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
  text-align: center;
}

.admin-upload-zone i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--accent-primary);
  font-size: 22px;
}

.admin-upload-zone input[type="file"] {
  width: min(100%, 360px);
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
}

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

.admin-search input {
  min-width: min(360px, 60vw);
}

.admin-media-grid,
.admin-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-media-card,
.admin-icon-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--text-primary);
}

.admin-media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-secondary);
}

.admin-media-card code,
.admin-icon-card code {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-media-card form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-icon-card {
  cursor: pointer;
  text-align: left;
}

.admin-icon-card i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--accent-primary);
  font-size: 20px;
}

.admin-icon-card.is-copied {
  border-color: var(--accent-primary);
}

.admin-secondary,
.admin-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-weight: 750;
}

.admin-danger {
  color: var(--danger);
}

.icon-picker-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.icon-picker-field button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg-hover);
  color: var(--accent-primary);
  box-shadow: none;
}

.icon-picker-field input[readonly] {
  cursor: pointer;
}

.upload-preview i[data-icon-preview] {
  color: var(--accent-primary);
  font-size: 26px;
}

.icon-picker-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .24);
  backdrop-filter: blur(8px);
}

.icon-picker-overlay.show {
  display: grid;
}

.icon-picker-dialog {
  width: min(620px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
}

.icon-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-picker-head strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
}

.icon-picker-head small {
  color: var(--text-secondary);
}

.icon-picker-head button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg-hover);
  color: var(--text-primary);
  box-shadow: none;
}

.icon-picker-search {
  width: 100%;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.icon-picker-option {
  min-height: 94px;
  display: grid;
  gap: 7px;
  align-content: center;
  justify-items: start;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg-hover);
  color: var(--text-primary);
  box-shadow: none;
  text-align: left;
}

.icon-picker-option:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 35%, var(--border-color));
  background: var(--accent-primary-soft, #eff6ff);
  color: var(--accent-primary);
}

.icon-picker-option i {
  font-size: 22px;
  color: var(--accent-primary);
}

.icon-picker-option span {
  font-weight: 800;
}

.icon-picker-option small {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: var(--card-bg-hover);
}

.admin-form-section > div:first-child h2 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 15px;
}

.admin-form-section > div:first-child p {
  margin: 0;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
}

.tag-selector {
  display: grid;
  gap: 10px;
}

.tag-selector > input {
  width: 100%;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  cursor: pointer;
}

.tag-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tag-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 750;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.tag-chip span small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.tag-chip input:checked + span {
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-color));
  background: var(--accent-primary-soft, #eff6ff);
  color: var(--accent-primary);
}

.tag-chip input:checked + span small {
  color: color-mix(in srgb, var(--accent-primary) 68%, var(--text-muted));
}

.tag-chip:hover span {
  border-color: color-mix(in srgb, var(--accent-primary) 28%, var(--border-color));
}

.tag-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 980px) {
  .admin-app {
    display: block;
  }

  .admin-sidebar {
    position: relative;
    width: 100%;
    max-height: 420px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .admin-topbar {
    position: sticky;
    top: 0;
  }

  .admin-main {
    padding: 16px;
  }
}

/* Sidebar 1 alignment correction: static top/bottom, stable scrollable category dock */
@media (min-width: 768px) {
  .sidebar-primary {
    width: var(--sidebar-primary-width);
    min-width: var(--sidebar-primary-width);
    max-width: var(--sidebar-primary-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
    padding: 16px 0;
    overflow: visible;
  }

  .sidebar-top,
  .sidebar-bottom {
    width: var(--sidebar-primary-width);
    min-width: var(--sidebar-primary-width);
    max-width: var(--sidebar-primary-width);
    flex: 0 0 auto;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    padding: 0;
    overflow: visible;
  }

  .category-nav {
    width: var(--sidebar-primary-width);
    min-width: var(--sidebar-primary-width);
    max-width: var(--sidebar-primary-width);
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-auto-rows: 40px;
    justify-items: center;
    align-content: start;
    gap: 8px;
    padding: 4px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .category-nav:hover,
  .category-nav:focus-within {
    scrollbar-color: color-mix(in srgb, var(--text-muted) 34%, transparent) transparent;
  }

  .category-nav::-webkit-scrollbar {
    width: 6px;
  }

  .category-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .category-nav::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    background-color: transparent;
  }

  .category-nav:hover::-webkit-scrollbar-thumb,
  .category-nav:focus-within::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--text-muted) 36%, transparent);
  }

  .sidebar-icon-link,
  .icon-nav a,
  .category-nav a,
  .sidebar-bottom > a,
  .sidebar-account-menu summary {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .sidebar-icon-link i,
  .icon-nav a i,
  .category-nav a i,
  .sidebar-bottom > a i,
  .sidebar-account-menu summary i,
  .sidebar-account-menu summary .avatar {
    flex: 0 0 auto;
    margin: 0;
  }

  .sidebar-account-menu {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    display: flex;
    justify-content: center;
    margin: 0;
  }
}

/* Billing system: fintech-style invoice cards shared by user and admin surfaces. */
.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.billing-kpi {
  display: grid;
  gap: 6px;
}

.billing-kpi span,
.invoice-meta span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.billing-kpi strong {
  color: var(--text-primary);
  font-size: 24px;
}

.billing-kpi small,
.invoice-meta small {
  color: var(--text-muted);
}

.invoice-card-list {
  display: grid;
  gap: 12px;
}

.invoice-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, .6fr) minmax(140px, .7fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--card-bg);
}

.invoice-card h3 {
  margin: 10px 0 4px;
  color: var(--text-primary);
  font-size: 17px;
}

.invoice-meta {
  display: grid;
  gap: 5px;
}

.invoice-meta strong {
  color: var(--text-primary);
  font-size: 16px;
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-paid,
.status-active {
  background: rgba(23, 178, 106, .14);
  color: var(--success);
}

.status-pending {
  background: rgba(245, 158, 11, .14);
  color: var(--warning);
}

.status-failed,
.status-expired,
.status-refunded {
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

.admin-billing-tabs {
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .billing-summary-grid,
  .invoice-card {
    grid-template-columns: 1fr;
  }

  .invoice-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .app-page-hero {
    grid-template-columns: 1fr;
  }

  .app-page-preview {
    min-height: 180px;
  }

  .trend-dashboard-showcase,
  .trend-stat-row {
    grid-template-columns: 1fr;
  }
}

.plan-checkout-form {
  margin: 0;
}

.plan-checkout-form button {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tool-product-card .plan-checkout-form button {
  display: block;
  text-align: center;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: var(--accent-primary, var(--accent));
  font-weight: 800;
}

.gateway-grid {
  margin-bottom: 18px;
}

.gateway-card {
  min-height: 220px;
}

.gateway-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.gateway-settings-form .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
}

.gateway-settings-form .toggle-row span {
  display: grid;
  gap: 4px;
}

.gateway-settings-form .toggle-row small {
  color: var(--text-secondary);
}

.gateway-settings-form input[readonly] {
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.checkout-summary {
  position: sticky;
  top: 92px;
}

.payment-method-form,
.payment-method-group {
  display: grid;
  gap: 14px;
}

.payment-method-group {
  padding-top: 10px;
}

.payment-method-group h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.payment-method-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.payment-method-card:hover,
.payment-method-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-primary) 46%, var(--border-color));
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--card-bg));
  transform: translateY(-1px);
}

.payment-method-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-method-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 850;
}

.payment-method-icon img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.payment-method-card b,
.payment-method-card small,
.payment-method-card em {
  display: block;
}

.payment-method-card b {
  color: var(--text-primary);
}

.payment-method-card small,
.payment-method-card em {
  color: var(--text-secondary);
  font-style: normal;
  font-size: 12px;
  margin-top: 3px;
}

.checkout-sticky-action {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.payment-admin-card {
  min-height: 230px;
}

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

.payment-instruction-card {
  display: grid;
  gap: var(--space-md);
}

.payment-qr {
  width: min(260px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  padding: var(--space-sm);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: #fff;
}

.payment-code-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
}

.payment-code-box span {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-code-box code {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 16px;
}

.payment-steps {
  display: grid;
  gap: var(--space-sm);
}

.payment-steps details {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
}

.invoice-total-box {
  width: min(360px, 100%);
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-lg) 0 0 auto;
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
}

.invoice-total-box div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Billing/license refinement: readable light mode and invoice-only printing. */
:root[data-theme="light"] body:has(.app-sidebar) .compact-list :where(div, a) {
  color: var(--text-primary);
}

:root[data-theme="light"] body:has(.app-sidebar) .compact-list b {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--card-bg));
}

:root[data-theme="light"] body:has(.app-sidebar) .compact-list span,
:root[data-theme="light"] body:has(.app-sidebar) .invoice-meta small,
:root[data-theme="light"] body:has(.app-sidebar) .license-meta span {
  color: var(--text-secondary);
}

.license-card-list {
  display: grid;
  gap: var(--space-md);
}

.license-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(110px, .45fr) minmax(120px, .45fr) minmax(110px, .45fr) auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--card-bg);
}

.license-main {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

.license-main h3 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 17px;
}

.license-main code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
}

.license-meta {
  display: grid;
  gap: 6px;
}

.license-meta span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.license-meta b {
  color: var(--text-primary);
}

.license-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.download-card.locked {
  opacity: .72;
}

.locked-note {
  max-width: 220px;
  color: var(--text-secondary);
  font-size: 13px;
}

.status-revoked,
.status-cancelled,
.status-canceled,
.status-suspended,
.status-locked {
  background: rgba(100, 116, 139, .14);
  color: var(--text-secondary);
}

.transaction-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.invoice-document-shell {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  overflow-x: auto;
}

.invoice-paper {
  width: 800px;
  min-height: 1000px;
  flex: 0 0 800px;
  padding: 60px;
  background: #fff;
  color: #000;
  box-shadow: 0 16px 50px rgba(15, 23, 42, .14);
  border-radius: 2px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.invoice-paper :where(h1, h2, h3, h4, p) {
  margin-top: 0;
  color: inherit;
}

.invoice-paper-header {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
  border-bottom: 4px solid #000;
  padding-bottom: 20px;
}

.invoice-company-block {
  font-size: 12px;
  line-height: 1.55;
}

.invoice-company-block p {
  margin: 14px 0 0;
}

.invoice-logo {
  display: block;
  max-width: 220px;
  max-height: 74px;
  object-fit: contain;
}

.invoice-logo-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #111;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h1 {
  margin: 0 0 8px;
  color: #000;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.invoice-title-block strong {
  display: block;
  color: #111;
  font-size: 18px;
}

.invoice-status {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--invoice-accent, #2196F3);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.invoice-paper-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.invoice-paper-details h4 {
  margin: 0 0 10px;
  color: #888;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.invoice-bill-to strong {
  display: block;
  margin-bottom: 5px;
  color: var(--invoice-accent, #2196F3);
  font-size: 18px;
}

.invoice-bill-to span {
  display: block;
  color: #333;
  font-size: 13px;
}

.invoice-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.invoice-meta-box table {
  width: 245px;
  border-collapse: collapse;
}

.invoice-meta-box td {
  padding: 5px 0;
  border: 0;
  color: #111;
  font-size: 14px;
}

.invoice-meta-box td:first-child {
  font-weight: 800;
}

.invoice-meta-box td:last-child {
  text-align: right;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-items-table th {
  padding: 12px 8px;
  border-bottom: 2px solid #000;
  color: #111;
  font-size: 11px;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}

.invoice-items-table td {
  padding: 13px 8px;
  border-bottom: 1px solid #eee;
  color: #111;
  font-size: 14px;
}

.invoice-items-table th:nth-child(2),
.invoice-items-table td:nth-child(2) {
  text-align: center;
}

.invoice-items-table th:nth-child(3),
.invoice-items-table th:nth-child(4),
.invoice-items-table td:nth-child(3),
.invoice-items-table td:nth-child(4) {
  text-align: right;
}

.invoice-total-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}

.invoice-paper .invoice-total-box {
  width: 320px;
  margin: 0;
  padding: 15px 0 0;
  border: 0;
  border-top: 3px solid #000;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.invoice-paper .invoice-total-box div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0;
  color: #111;
}

.invoice-paper .invoice-total-box .grand {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
  font-size: 18px;
}

.invoice-payment-info {
  margin-top: 60px;
  padding-left: 20px;
  border-left: 4px solid var(--invoice-accent, #2196F3);
  color: #111;
  font-size: 13px;
  line-height: 1.6;
}

.invoice-payment-info p {
  margin: 0 0 10px;
}

.invoice-paper-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #eee;
  color: #999;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1000px) {
  .license-card {
    grid-template-columns: 1fr;
  }

  .license-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .invoice-document-shell {
    justify-content: flex-start;
  }

  .invoice-paper {
    transform: scale(.72);
    transform-origin: top left;
    margin-bottom: -280px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body * {
    visibility: hidden !important;
  }

  .invoice-document-shell,
  .invoice-document-shell * {
    visibility: visible !important;
  }

  .app-sidebar,
  .mobile-topbar,
  .sidebar-overlay,
  .page-heading,
  .invoice-screen-layout,
  .payment-instruction-card,
  .panel-title,
  .button,
  script {
    display: none !important;
  }

  .invoice-document-shell {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  .invoice-paper {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 20mm !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-after: avoid;
  }
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary,
  .checkout-sticky-action {
    position: static;
  }

  .payment-method-grid {
    grid-template-columns: 1fr;
  }
}

/* APP SULTH ecosystem landing */
.landing-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(88, 116, 255, .16), transparent 30%),
    radial-gradient(circle at 78% 4%, rgba(19, 202, 190, .12), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #f8fafc 100%);
  color: #172033;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  backdrop-filter: blur(18px);
}

.landing-brand,
.landing-header nav,
.landing-auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.landing-brand {
  color: #111827;
  text-decoration: none;
}

.landing-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: #111827;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .18);
}

.landing-header nav a,
.landing-auth a:not(.button) {
  color: #647084;
  font-weight: 700;
  text-decoration: none;
}

.landing-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 48px;
  min-height: 620px;
}

.landing-hero-copy h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: .93;
  letter-spacing: 0;
  color: #111827;
}

.landing-hero-copy > p:not(.eyebrow) {
  max-width: 580px;
  margin: 24px 0 0;
  color: #516071;
  font-size: 19px;
  line-height: 1.7;
}

.landing-actions,
.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  color: #647084;
  background: rgba(255, 255, 255, .66);
}

.ecosystem-mockup {
  position: relative;
  min-height: 470px;
}

.mockup-window {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 36px 90px rgba(15, 23, 42, .14), inset 0 1px rgba(255, 255, 255, .8);
  backdrop-filter: blur(20px);
}

.mockup-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .28);
}

.mockup-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mockup-top b {
  margin-left: auto;
  color: #647084;
  font-size: 12px;
}

.mockup-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  min-height: 400px;
}

.mockup-body aside {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border-right: 1px solid rgba(148, 163, 184, .24);
  background: rgba(248, 250, 252, .8);
}

.mockup-body aside i {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #4f46e5);
}

.mockup-body section {
  padding: 24px;
}

.mockup-command {
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 16px;
  color: #647084;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.mockup-grid,
.landing-app-grid,
.workflow-section {
  display: grid;
  gap: 16px;
}

.mockup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.mockup-grid div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.mockup-grid span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: #111827;
}

.mockup-grid b,
.mockup-grid small {
  display: block;
  margin-top: 12px;
}

.mockup-grid small {
  color: #647084;
}

.assistant-orbit {
  position: absolute;
  right: -10px;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 102, 241, .26);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 24px 54px rgba(79, 70, 229, .18);
}

.assistant-orbit b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

.landing-section,
.platform-section,
.landing-split article,
.access-section {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 28px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 22px 58px rgba(15, 23, 42, .08);
}

.landing-section-head,
.platform-section,
.access-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-section-head h2,
.platform-section h2,
.landing-split h2,
.access-section h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.landing-section-head a {
  color: #4f46e5;
  font-weight: 800;
  text-decoration: none;
}

.landing-app-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.workflow-section {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.workflow-section article {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 22px;
  background: rgba(255, 255, 255, .7);
}

.workflow-section span {
  color: #4f46e5;
  font-weight: 900;
}

.workflow-section h3 {
  margin: 14px 0 8px;
  color: #111827;
}

.workflow-section p,
.platform-section p,
.landing-split p,
.access-section p {
  color: #647084;
  line-height: 1.65;
}

.platform-preview {
  display: grid;
  gap: 12px;
  min-width: 270px;
}

.platform-preview span {
  padding: 16px 18px;
  border-radius: 16px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, #eef2ff);
}

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.assistant-preview {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.assistant-preview div {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.assistant-preview b,
.assistant-preview span {
  display: block;
}

.assistant-preview span {
  margin-top: 6px;
  color: #647084;
}

.google-auth-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #172033 !important;
  border: 1px solid rgba(148, 163, 184, .38) !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: .72;
}

.metronic-auth {
  background:
    radial-gradient(circle at 16% 14%, rgba(79, 70, 229, .18), transparent 26%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, .14), transparent 28%),
    linear-gradient(135deg, #f8fafc, #eef2ff 52%, #f8fafc);
}

.auth-shell {
  max-width: 1120px;
}

.metronic-auth-card {
  width: min(100%, 460px);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .14);
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 70, 229, .24), transparent 68%);
}

.form-hint {
  display: block;
  margin-top: 7px;
  color: #7b8794;
  font-size: 12px;
}

html[data-theme="dark"] .landing-body {
  background:
    radial-gradient(circle at 20% 10%, rgba(88, 116, 255, .22), transparent 30%),
    radial-gradient(circle at 78% 4%, rgba(19, 202, 190, .14), transparent 28%),
    linear-gradient(180deg, #0d111a 0%, #121827 48%, #0d111a 100%);
  color: #e5e7eb;
}

html[data-theme="dark"] .landing-brand,
html[data-theme="dark"] .landing-hero-copy h1,
html[data-theme="dark"] .landing-section-head h2,
html[data-theme="dark"] .platform-section h2,
html[data-theme="dark"] .landing-split h2,
html[data-theme="dark"] .access-section h2,
html[data-theme="dark"] .workflow-section h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .mockup-window,
html[data-theme="dark"] .landing-section,
html[data-theme="dark"] .platform-section,
html[data-theme="dark"] .landing-split article,
html[data-theme="dark"] .access-section,
html[data-theme="dark"] .workflow-section article {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(17, 24, 39, .72);
}

html[data-theme="dark"] .mockup-grid div,
html[data-theme="dark"] .mockup-command,
html[data-theme="dark"] .assistant-preview div {
  border-color: rgba(148, 163, 184, .18);
  background: #111827;
}

@media (max-width: 980px) {
  .landing-hero,
  .platform-section,
  .landing-split,
  .access-section {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 42px;
  }

  .landing-app-grid,
  .workflow-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-header {
    align-items: flex-start;
  }

  .landing-header nav {
    display: none;
  }

  .landing-auth {
    gap: 10px;
  }

  .landing-page {
    padding-inline: 14px;
  }

  .landing-hero-copy h1 {
    font-size: 46px;
  }

  .ecosystem-mockup {
    min-height: auto;
  }

  .mockup-body {
    grid-template-columns: 54px 1fr;
  }

  .mockup-grid,
  .landing-app-grid,
  .workflow-section {
    grid-template-columns: 1fr;
  }

  .assistant-orbit {
    position: static;
    margin-top: 14px;
  }
}

/* Metronic Tailwind Demo10 foundation layer for APP SULTH */
:root {
  --kt-demo10-font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --kt-demo10-bg: #f6f8fb;
  --kt-demo10-bg-soft: #eef2f7;
  --kt-demo10-surface: #ffffff;
  --kt-demo10-surface-2: #f8fafc;
  --kt-demo10-surface-3: #f1f5f9;
  --kt-demo10-text: #111827;
  --kt-demo10-heading: #0f172a;
  --kt-demo10-muted: #64748b;
  --kt-demo10-border: #e5e7eb;
  --kt-demo10-border-strong: #cbd5e1;
  --kt-demo10-primary: #2563eb;
  --kt-demo10-primary-600: #1d4ed8;
  --kt-demo10-primary-soft: rgba(37, 99, 235, .10);
  --kt-demo10-info: #06b6d4;
  --kt-demo10-success: #16a34a;
  --kt-demo10-warning: #d97706;
  --kt-demo10-danger: #dc2626;
  --kt-demo10-radius-xs: 8px;
  --kt-demo10-radius-sm: 10px;
  --kt-demo10-radius-md: 14px;
  --kt-demo10-radius-lg: 18px;
  --kt-demo10-radius-xl: 24px;
  --kt-demo10-shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --kt-demo10-shadow-sm: 0 8px 24px rgba(15, 23, 42, .07);
  --kt-demo10-shadow-md: 0 18px 48px rgba(15, 23, 42, .10);
  --kt-demo10-shadow-lg: 0 32px 90px rgba(15, 23, 42, .14);
  --kt-demo10-transition: 160ms cubic-bezier(.4, 0, .2, 1);
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 24px;
  --space-xl: 32px;
}

html[data-theme="dark"] {
  --kt-demo10-bg: #0b1018;
  --kt-demo10-bg-soft: #111827;
  --kt-demo10-surface: #151b26;
  --kt-demo10-surface-2: #101722;
  --kt-demo10-surface-3: #1d2635;
  --kt-demo10-text: #e5e7eb;
  --kt-demo10-heading: #f8fafc;
  --kt-demo10-muted: #94a3b8;
  --kt-demo10-border: rgba(148, 163, 184, .18);
  --kt-demo10-border-strong: rgba(148, 163, 184, .28);
  --kt-demo10-primary: #60a5fa;
  --kt-demo10-primary-600: #3b82f6;
  --kt-demo10-primary-soft: rgba(96, 165, 250, .14);
}

body.metronic-app,
body:has(.app-sidebar),
body.admin-app,
body.auth {
  font-family: var(--kt-demo10-font);
  color: var(--kt-demo10-text);
  background:
    radial-gradient(circle at 16% 8%, rgba(37, 99, 235, .09), transparent 30%),
    radial-gradient(circle at 86% 6%, rgba(6, 182, 212, .08), transparent 26%),
    linear-gradient(180deg, var(--kt-demo10-bg), var(--kt-demo10-bg-soft));
}

html[data-theme="dark"] body.metronic-app,
html[data-theme="dark"] body:has(.app-sidebar),
html[data-theme="dark"] body.admin-app,
html[data-theme="dark"] body.auth {
  background:
    radial-gradient(circle at 14% 8%, rgba(59, 130, 246, .16), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(6, 182, 212, .10), transparent 26%),
    linear-gradient(180deg, var(--kt-demo10-bg), #080c13);
}

body.metronic-app::before,
body:has(.app-sidebar)::before,
body:has(.app-sidebar)::after,
body.admin-app::before {
  display: none !important;
}

.wrap,
.admin-main,
.landing-page {
  color: var(--kt-demo10-text);
}

.wrap :where(h1, h2, h3, h4),
.admin-main :where(h1, h2, h3, h4),
.landing-page :where(h1, h2, h3, h4) {
  color: var(--kt-demo10-heading);
  letter-spacing: 0;
}

.muted,
.panel-title p,
.kpi-card small,
.compact-list span,
.event-list span,
.mini-app-list small,
.tool-product-card p {
  color: var(--kt-demo10-muted) !important;
}

.eyebrow {
  color: var(--kt-demo10-primary) !important;
  letter-spacing: .08em;
}

.panel,
.card,
.table,
.dash-hero,
.kpi-card,
.tool-product-card,
.metronic-tool-card,
.app-card,
.landing-section,
.platform-section,
.landing-split article,
.access-section,
.workflow-section article,
.invoice-document-shell,
.checkout-summary,
.payment-instruction-card {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-lg) !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 94%, transparent) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: var(--kt-demo10-shadow-sm) !important;
}

.panel,
.card,
.table,
.dash-hero {
  padding: clamp(18px, 2vw, 26px);
}

.panel:hover,
.card:hover,
.kpi-card:hover,
.tool-product-card:hover,
.app-card:hover,
.metronic-tool-card:hover {
  border-color: var(--kt-demo10-border-strong) !important;
  box-shadow: var(--kt-demo10-shadow-md) !important;
  transform: translateY(-1px);
  transition: border-color var(--kt-demo10-transition), box-shadow var(--kt-demo10-transition), transform var(--kt-demo10-transition);
}

button,
.button,
a.button,
.icon-link,
.primary-cta,
.forum-create-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent !important;
  border-radius: var(--kt-demo10-radius-sm) !important;
  background: var(--kt-demo10-primary) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
  transition: transform var(--kt-demo10-transition), box-shadow var(--kt-demo10-transition), background var(--kt-demo10-transition), border-color var(--kt-demo10-transition);
}

button:hover,
.button:hover,
a.button:hover,
.icon-link:hover,
.primary-cta:hover,
.forum-create-action:hover {
  background: var(--kt-demo10-primary-600) !important;
  box-shadow: 0 16px 30px rgba(37, 99, 235, .24);
  transform: translateY(-1px);
}

.button.secondary,
a.button.secondary,
button.secondary,
.icon-link,
.google-auth-button {
  border-color: var(--kt-demo10-border) !important;
  background: var(--kt-demo10-surface) !important;
  color: var(--kt-demo10-heading) !important;
  box-shadow: var(--kt-demo10-shadow-xs) !important;
}

.button.secondary:hover,
a.button.secondary:hover,
button.secondary:hover,
.icon-link:hover,
.google-auth-button:hover {
  border-color: var(--kt-demo10-border-strong) !important;
  background: var(--kt-demo10-surface-2) !important;
  color: var(--kt-demo10-primary) !important;
}

input,
select,
textarea,
.media-input-preview,
.icon-picker-field {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-sm) !important;
  background: var(--kt-demo10-surface) !important;
  color: var(--kt-demo10-text) !important;
  transition: border-color var(--kt-demo10-transition), box-shadow var(--kt-demo10-transition), background var(--kt-demo10-transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--kt-demo10-primary) !important;
  box-shadow: 0 0 0 4px var(--kt-demo10-primary-soft) !important;
  outline: 0;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--kt-demo10-muted) 75%, transparent);
}

.table {
  overflow: auto;
  padding: 0 !important;
}

.table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--kt-demo10-text) !important;
}

.table th {
  padding: 14px 16px !important;
  color: var(--kt-demo10-muted) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--kt-demo10-surface-2) !important;
  border-bottom: 1px solid var(--kt-demo10-border) !important;
}

.table td {
  padding: 15px 16px !important;
  color: var(--kt-demo10-text) !important;
  border-bottom: 1px solid var(--kt-demo10-border) !important;
}

.table tbody tr:hover td {
  background: var(--kt-demo10-surface-2);
}

.status-pill,
.free-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--kt-demo10-border);
  background: var(--kt-demo10-surface-2);
  color: var(--kt-demo10-muted);
  font-size: 12px;
  font-weight: 800;
}

.status-active,
.status-paid,
.status-success {
  color: var(--kt-demo10-success) !important;
  background: color-mix(in srgb, var(--kt-demo10-success) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--kt-demo10-success) 24%, transparent) !important;
}

.status-pending,
.status-warning {
  color: var(--kt-demo10-warning) !important;
  background: color-mix(in srgb, var(--kt-demo10-warning) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--kt-demo10-warning) 24%, transparent) !important;
}

.status-failed,
.status-revoked,
.status-cancelled,
.status-expired,
.status-danger {
  color: var(--kt-demo10-danger) !important;
  background: color-mix(in srgb, var(--kt-demo10-danger) 10%, transparent) !important;
  border-color: color-mix(in srgb, var(--kt-demo10-danger) 24%, transparent) !important;
}

.app-sidebar {
  top: 18px !important;
  bottom: 18px !important;
  left: 18px !important;
  height: auto !important;
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-xl) !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 88%, transparent) !important;
  box-shadow: var(--kt-demo10-shadow-lg) !important;
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.sidebar-primary {
  border-right: 1px solid var(--kt-demo10-border) !important;
  background: var(--kt-demo10-surface) !important;
}

.sidebar-logo,
.brand-mark.sidebar-logo {
  background: var(--kt-demo10-heading) !important;
  color: var(--kt-demo10-surface) !important;
  box-shadow: var(--kt-demo10-shadow-sm) !important;
}

.sidebar-primary a,
.icon-nav a,
.sidebar-icon-link,
.sidebar-account-menu summary {
  border: 1px solid transparent !important;
  border-radius: var(--kt-demo10-radius-md) !important;
  color: var(--kt-demo10-muted) !important;
  background: transparent !important;
  transition: background var(--kt-demo10-transition), color var(--kt-demo10-transition), border-color var(--kt-demo10-transition), transform var(--kt-demo10-transition);
}

.sidebar-primary a:hover,
.icon-nav a:hover,
.sidebar-icon-link:hover,
.sidebar-account-menu summary:hover,
.sidebar-primary a.active,
.icon-nav a.active,
.sidebar-icon-link.active,
.sidebar-account-menu.active summary {
  border-color: var(--kt-demo10-border) !important;
  background: var(--kt-demo10-primary-soft) !important;
  color: var(--kt-demo10-primary) !important;
  transform: translateY(-1px);
}

.sidebar-secondary {
  border-left: 0 !important;
  background: var(--kt-demo10-surface-2) !important;
  color: var(--kt-demo10-text) !important;
}

.sidebar-secondary-inner {
  padding: 22px 18px !important;
}

.side-section a,
.mobile-account-sheet a,
.avatar-dropdown a {
  border-radius: var(--kt-demo10-radius-sm) !important;
  color: var(--kt-demo10-text) !important;
}

.side-section a:hover,
.side-section a.active {
  background: var(--kt-demo10-surface) !important;
  color: var(--kt-demo10-primary) !important;
  box-shadow: var(--kt-demo10-shadow-xs);
}

body:has(.app-sidebar) .wrap {
  padding-top: 32px !important;
}

.admin-sidebar {
  top: 18px !important;
  left: 18px !important;
  bottom: 18px !important;
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-xl) !important;
  background: var(--kt-demo10-surface) !important;
  box-shadow: var(--kt-demo10-shadow-lg) !important;
}

.admin-brand {
  color: var(--kt-demo10-heading) !important;
}

.admin-brand span {
  background: var(--kt-demo10-heading) !important;
  color: var(--kt-demo10-surface) !important;
}

.admin-nav-group summary,
.admin-nav-items a,
.admin-sidebar-foot a {
  border-radius: var(--kt-demo10-radius-sm) !important;
  color: var(--kt-demo10-muted) !important;
}

.admin-nav-group summary:hover,
.admin-nav-group[open] summary,
.admin-nav-items a:hover,
.admin-nav-items a.active {
  background: var(--kt-demo10-primary-soft) !important;
  color: var(--kt-demo10-primary) !important;
}

.admin-topbar {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-lg) !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 86%, transparent) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: var(--kt-demo10-shadow-sm) !important;
  backdrop-filter: blur(18px);
}

.admin-main {
  padding-top: 32px !important;
}

.admin-app .panel,
.admin-app .table,
.admin-app .kpi-card {
  background: var(--kt-demo10-surface) !important;
}

.landing-body {
  background:
    radial-gradient(circle at 20% 7%, rgba(37, 99, 235, .13), transparent 28%),
    radial-gradient(circle at 78% 2%, rgba(6, 182, 212, .10), transparent 26%),
    linear-gradient(180deg, var(--kt-demo10-bg), var(--kt-demo10-bg-soft)) !important;
}

.landing-header {
  top: 14px;
  width: min(1180px, calc(100% - 28px));
  border: 1px solid var(--kt-demo10-border);
  border-radius: var(--kt-demo10-radius-xl);
  background: color-mix(in srgb, var(--kt-demo10-surface) 82%, transparent);
  box-shadow: var(--kt-demo10-shadow-sm);
}

.landing-brand span {
  background: var(--kt-demo10-heading);
  color: var(--kt-demo10-surface);
}

.landing-hero {
  min-height: min(720px, calc(100vh - 110px));
}

.landing-hero-copy h1 {
  color: var(--kt-demo10-heading) !important;
}

.ecosystem-mockup .mockup-window,
.mockup-grid div,
.assistant-orbit {
  border-color: var(--kt-demo10-border) !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 88%, transparent) !important;
  box-shadow: var(--kt-demo10-shadow-md) !important;
}

.mockup-body aside,
.mockup-command,
.assistant-preview div {
  background: var(--kt-demo10-surface-2) !important;
}

.category-strip,
.forum-page > .category-strip,
.app-category-strip {
  padding: 8px !important;
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-lg) !important;
  background: var(--kt-demo10-surface) !important;
  box-shadow: var(--kt-demo10-shadow-xs);
}

.category-strip span,
.category-strip a,
.tool-category {
  border: 1px solid transparent !important;
  border-radius: var(--kt-demo10-radius-sm) !important;
  color: var(--kt-demo10-muted) !important;
  background: transparent !important;
}

.category-strip span:hover,
.category-strip a:hover,
.category-strip a.active,
.tool-category.active {
  border-color: var(--kt-demo10-border) !important;
  background: var(--kt-demo10-primary-soft) !important;
  color: var(--kt-demo10-primary) !important;
}

.forum-create-action {
  min-height: 42px;
  padding-inline: 18px !important;
  background: linear-gradient(135deg, var(--kt-demo10-primary), var(--kt-demo10-info)) !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, .28) !important;
}

.forum-thread-card,
.discussion-card,
.forum-dashboard-card,
.notification-card {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-lg) !important;
  background: var(--kt-demo10-surface) !important;
  box-shadow: var(--kt-demo10-shadow-xs) !important;
}

.metronic-auth {
  background:
    radial-gradient(circle at 14% 12%, rgba(37, 99, 235, .14), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(6, 182, 212, .10), transparent 30%),
    linear-gradient(135deg, var(--kt-demo10-bg), var(--kt-demo10-bg-soft)) !important;
}

.metronic-auth-card,
.auth-brand-panel {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-xl) !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 92%, transparent) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: var(--kt-demo10-shadow-lg) !important;
  backdrop-filter: blur(18px);
}

.metronic-auth-card label {
  color: var(--kt-demo10-heading) !important;
}

.auth-brand-panel h2 {
  color: var(--kt-demo10-heading) !important;
}

.chatbot-widget {
  --chatbot-bg: var(--kt-demo10-surface);
  --chatbot-border: var(--kt-demo10-border);
}

.chatbot-launcher {
  background: linear-gradient(135deg, var(--kt-demo10-primary), var(--kt-demo10-info)) !important;
  box-shadow: 0 18px 44px rgba(37, 99, 235, .30) !important;
}

.chatbot-panel {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-xl) !important;
  background: var(--kt-demo10-surface) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: var(--kt-demo10-shadow-lg) !important;
}

.chatbot-messages article {
  border-radius: var(--kt-demo10-radius-md) !important;
}

.chatbot-messages .assistant {
  background: var(--kt-demo10-surface-2) !important;
  color: var(--kt-demo10-text) !important;
}

.chatbot-messages .user {
  background: var(--kt-demo10-primary) !important;
  color: #fff !important;
}

.dropdown,
.avatar-dropdown,
.mobile-account-sheet,
.delete-modal,
.media-manager-modal,
.icon-picker-popup {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-lg) !important;
  background: var(--kt-demo10-surface) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: var(--kt-demo10-shadow-lg) !important;
}

.compact-list a,
.compact-list div,
.event-list div,
.action-list a,
.workflow-list span,
.mini-app-list a {
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: var(--kt-demo10-radius-md) !important;
  background: var(--kt-demo10-surface-2) !important;
  color: var(--kt-demo10-text) !important;
}

.compact-list a:hover,
.action-list a:hover,
.mini-app-list a:hover {
  border-color: var(--kt-demo10-border-strong) !important;
  background: var(--kt-demo10-primary-soft) !important;
}

@media (max-width: 920px) {
  .app-sidebar {
    top: 76px !important;
    left: 12px !important;
    bottom: 12px !important;
    border-radius: var(--kt-demo10-radius-xl) !important;
    transform: translateX(calc(-100% - 24px));
  }

  body.mobile-nav-open .app-sidebar,
  body.sidebar-secondary-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-secondary {
    position: fixed !important;
    top: 88px !important;
    bottom: 24px !important;
    left: calc(var(--sidebar-primary-width, 70px) + 24px) !important;
    width: min(310px, calc(100vw - var(--sidebar-primary-width, 70px) - 42px)) !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: var(--kt-demo10-radius-xl) !important;
    box-shadow: var(--kt-demo10-shadow-lg) !important;
  }

  body:has(.app-sidebar) .wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .mobile-topbar {
    border: 1px solid var(--kt-demo10-border) !important;
    background: color-mix(in srgb, var(--kt-demo10-surface) 90%, transparent) !important;
    box-shadow: var(--kt-demo10-shadow-sm) !important;
    backdrop-filter: blur(18px);
  }

  .admin-sidebar {
    border-radius: 0 var(--kt-demo10-radius-xl) var(--kt-demo10-radius-xl) 0 !important;
  }
}

/* Workspace-first home restoration */
.workspace-home-page {
  display: grid;
  gap: 22px;
}

.workspace-welcome {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 24px;
  min-height: 260px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--kt-demo10-border);
  border-radius: var(--kt-demo10-radius-xl);
  background:
    radial-gradient(circle at 80% 14%, rgba(37, 99, 235, .15), transparent 34%),
    radial-gradient(circle at 18% 100%, rgba(6, 182, 212, .10), transparent 30%),
    color-mix(in srgb, var(--kt-demo10-surface) 92%, transparent);
  box-shadow: var(--kt-demo10-shadow-sm);
}

.workspace-welcome::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--kt-demo10-primary) 22%, transparent);
  background: radial-gradient(circle, var(--kt-demo10-primary-soft), transparent 66%);
  pointer-events: none;
}

.workspace-welcome > * {
  position: relative;
  z-index: 1;
}

.workspace-welcome h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  color: var(--kt-demo10-heading);
}

.workspace-welcome .muted {
  max-width: 560px;
  margin-top: 14px;
  font-size: 17px;
}

.workspace-orbit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workspace-orbit span {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--kt-demo10-border);
  border-radius: var(--kt-demo10-radius-lg);
  color: var(--kt-demo10-heading);
  font-weight: 800;
  background: color-mix(in srgb, var(--kt-demo10-surface) 82%, transparent);
  box-shadow: var(--kt-demo10-shadow-xs);
}

.workspace-orbit span:nth-child(1),
.workspace-orbit span:nth-child(4) {
  background: linear-gradient(135deg, var(--kt-demo10-primary-soft), color-mix(in srgb, var(--kt-demo10-surface) 88%, transparent));
}

.workspace-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.workspace-overview-grid .kpi-card {
  min-height: 138px;
}

.workspace-app-grid {
  margin-top: 20px;
}

.workspace-home-grid {
  align-items: stretch;
}

.workspace-home-grid > .panel {
  min-width: 0;
}

.workspace-flow-band {
  margin-top: 0;
}

.workspace-flow-band article {
  min-height: 210px;
}

.workspace-update-panel .assistant-preview {
  margin-top: 0;
}

.workspace-home-page .panel-title {
  align-items: flex-start;
  gap: 18px;
}

.workspace-home-page .panel-title .eyebrow {
  margin-bottom: 6px;
}

.workspace-home-page .panel-title h2 {
  margin-bottom: 4px;
}

.workspace-home-page .app-card {
  min-height: 245px;
}

.workspace-home-page .mini-app-list a {
  min-height: 72px;
}

@media (max-width: 1180px) {
  .workspace-overview-grid,
  .workspace-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace-welcome,
  .workspace-overview-grid,
  .workspace-app-grid,
  .workspace-home-grid {
    grid-template-columns: 1fr;
  }

  .workspace-welcome {
    min-height: auto;
  }

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

  .workspace-welcome h1 {
    font-size: 42px;
  }
}

/* Account dock safety + floating dropdown layer */
:root {
  --sulth-z-sidebar-primary: 120;
  --sulth-z-sidebar-secondary: 220;
  --sulth-z-overlay: 300;
  --sulth-z-dropdown: 12000;
  --sulth-z-modal: 14000;
  --sulth-z-toast: 15000;
}

.app-sidebar,
.sidebar-primary {
  overflow: visible !important;
}

.sidebar-primary {
  padding-bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
}

.sidebar-bottom {
  padding-bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 10px)) !important;
  margin-bottom: 8px !important;
  gap: 9px !important;
  overflow: visible !important;
  z-index: var(--sulth-z-dropdown) !important;
}

.sidebar-account-menu {
  position: relative !important;
  z-index: var(--sulth-z-dropdown) !important;
}

.sidebar-account-menu summary {
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.avatar-menu[open],
.sidebar-account-menu[open] {
  z-index: var(--sulth-z-dropdown) !important;
}

.sulth-floating-layer {
  position: fixed;
  inset: 0;
  z-index: var(--sulth-z-dropdown);
  pointer-events: none;
  isolation: isolate;
}

.sulth-floating-layer > * {
  pointer-events: auto;
}

.sidebar-account-menu .avatar-dropdown,
.avatar-dropdown {
  z-index: var(--sulth-z-dropdown) !important;
}

.sidebar-account-menu .avatar-dropdown,
.avatar-dropdown.is-floating {
  position: fixed !important;
  left: calc(var(--sidebar-primary-width, 70px) + 28px) !important;
  bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 24px)) !important;
  width: min(340px, calc(100vw - var(--sidebar-primary-width, 70px) - 44px)) !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px !important;
  border: 1px solid var(--kt-demo10-border) !important;
  border-radius: 18px !important;
  background: color-mix(in srgb, var(--kt-demo10-surface) 96%, transparent) !important;
  color: var(--kt-demo10-text) !important;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .22) !important;
  backdrop-filter: blur(20px);
  transform-origin: left bottom !important;
}

.avatar-dropdown.is-floating {
  right: auto !important;
  display: block !important;
  overflow: visible !important;
}

.avatar-menu[open] .avatar-dropdown,
.avatar-dropdown.is-floating {
  animation: accountDropdownIn .16s cubic-bezier(.4, 0, .2, 1) both !important;
}

@keyframes accountDropdownIn {
  from {
    opacity: 0;
    transform: translate3d(-4px, 8px, 0) scale(.98);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.sidebar-account-menu .avatar-dropdown-head,
.avatar-dropdown.is-floating .avatar-dropdown-head {
  border: 1px solid var(--kt-demo10-border);
  border-radius: 14px;
  background: var(--kt-demo10-surface-2) !important;
  margin-bottom: 6px !important;
  padding: 10px !important;
}

.sidebar-account-menu .avatar-dropdown > a,
.sidebar-account-menu .theme-switcher,
.avatar-dropdown.is-floating > a,
.avatar-dropdown.is-floating .theme-switcher {
  border-radius: 12px !important;
  color: var(--kt-demo10-text) !important;
  background: transparent !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
}

.sidebar-account-menu .avatar-dropdown > a:hover,
.sidebar-account-menu .theme-switcher:hover,
.avatar-dropdown.is-floating > a:hover,
.avatar-dropdown.is-floating .theme-switcher:hover {
  color: var(--kt-demo10-primary) !important;
  background: var(--kt-demo10-primary-soft) !important;
}

.sidebar-secondary {
  z-index: var(--sulth-z-sidebar-secondary) !important;
}

.sidebar-overlay {
  z-index: var(--sulth-z-overlay) !important;
}

.delete-modal,
.media-manager-modal,
.icon-picker-popup {
  z-index: var(--sulth-z-modal) !important;
}

.toast,
.notification-toast,
.sulth-toast {
  z-index: var(--sulth-z-toast) !important;
}

/* Ultra minimal login */
.auth-shell-minimal {
  width: min(100%, 440px) !important;
  min-height: 100vh;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  padding: 24px;
}

.minimal-login-card {
  width: min(100%, 420px) !important;
  padding: 30px !important;
  text-align: left;
}

.minimal-auth-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  text-decoration: none;
}

.minimal-auth-logo .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--kt-demo10-heading) !important;
  color: var(--kt-demo10-surface) !important;
  box-shadow: var(--kt-demo10-shadow-sm);
}

.minimal-auth-title {
  justify-content: center;
  text-align: center;
  margin-bottom: 22px !important;
}

.minimal-auth-title h1 {
  margin: 0 0 8px;
  font-size: 28px !important;
  line-height: 1.1;
  color: var(--kt-demo10-heading) !important;
}

.minimal-auth-title p {
  margin: 0;
  color: var(--kt-demo10-muted) !important;
  font-weight: 650;
}

.auth-inline-error {
  margin: 0 0 14px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid color-mix(in srgb, var(--kt-demo10-danger) 24%, transparent) !important;
  background: color-mix(in srgb, var(--kt-demo10-danger) 10%, transparent) !important;
  color: var(--kt-demo10-danger) !important;
  font-weight: 700;
}

.minimal-login-card .auth-links {
  justify-content: space-between;
  margin-top: 8px;
}

.minimal-login-card .auth-home-link {
  margin-top: 4px;
  color: var(--kt-demo10-muted) !important;
}

.minimal-login-card .auth-theme-switcher {
  margin: 8px auto 0;
}

@media (max-width: 640px) {
  .auth-shell-minimal {
    align-items: start !important;
    padding: 36px 16px 16px;
  }

  .minimal-login-card {
    padding: 24px !important;
  }

  .minimal-auth-title h1 {
    font-size: 25px !important;
  }

  .sidebar-primary,
  .sidebar-bottom {
    padding-bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 14px)) !important;
  }

  .sidebar-account-menu .avatar-dropdown {
    left: calc(var(--sidebar-primary-width, 62px) + 18px) !important;
    bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
    width: min(320px, calc(100vw - var(--sidebar-primary-width, 62px) - 32px)) !important;
  }
}

/* Mobile workspace restoration: compact rail + contextual drawer */
@media (max-width: 767px) {
  :root {
    --mobile-header-height: 62px;
    --mobile-rail-width: 62px;
    --mobile-sidebar-gap: 8px;
    --sulth-z-sidebar-primary: 520;
    --sulth-z-sidebar-secondary: 525;
    --sulth-z-overlay: 500;
    --sulth-z-dropdown: 12000;
  }

  body:has(.app-sidebar) {
    overflow-x: hidden;
  }

  .mobile-topbar {
    position: sticky !important;
    top: 10px !important;
    z-index: 480 !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin: 10px 10px 0;
    padding: 7px 8px !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--kt-demo10-surface) 88%, transparent) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .12) !important;
    backdrop-filter: blur(18px);
  }

  .mobile-topbar .compact-brand {
    min-width: 0;
    justify-content: center;
    overflow: hidden;
    color: var(--kt-demo10-heading) !important;
  }

  .mobile-topbar .compact-brand span:last-child {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-icon-button,
  .mobile-user-box {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 14px !important;
    background: var(--kt-demo10-surface-2) !important;
    color: var(--kt-demo10-heading) !important;
    box-shadow: none !important;
  }

  .app-sidebar {
    position: fixed !important;
    top: calc(var(--mobile-header-height) + 18px) !important;
    left: 10px !important;
    right: auto !important;
    bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) + 10px)) !important;
    width: min(386px, calc(100vw - 20px)) !important;
    height: auto !important;
    display: flex !important;
    gap: var(--mobile-sidebar-gap) !important;
    align-items: stretch !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--kt-demo10-surface) 70%, transparent) !important;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .28) !important;
    backdrop-filter: blur(20px);
    overflow: visible !important;
    transform: translate3d(calc(-100% - 20px), 0, 0) scale(.985) !important;
    opacity: 0;
    pointer-events: none;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), opacity .18s ease;
    z-index: var(--sulth-z-sidebar-secondary) !important;
  }

  body.mobile-nav-open .app-sidebar,
  body.sidebar-secondary-open .app-sidebar {
    transform: translate3d(0, 0, 0) scale(1) !important;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-primary {
    width: var(--mobile-rail-width) !important;
    min-width: var(--mobile-rail-width) !important;
    max-width: var(--mobile-rail-width) !important;
    flex: 0 0 var(--mobile-rail-width) !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 8px !important;
    padding: 10px 0 max(12px, calc(env(safe-area-inset-bottom, 0px) + 10px)) !important;
    overflow: visible !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 20px !important;
    border-bottom: 0 !important;
    background: color-mix(in srgb, var(--kt-demo10-surface) 94%, transparent) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .10) !important;
  }

  .sidebar-top,
  .sidebar-bottom {
    width: var(--mobile-rail-width) !important;
    display: grid !important;
    justify-items: center !important;
    align-content: start !important;
    gap: 7px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .sidebar-bottom {
    margin-top: auto !important;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .category-nav {
    width: var(--mobile-rail-width) !important;
    min-width: var(--mobile-rail-width) !important;
    max-width: var(--mobile-rail-width) !important;
    flex: 1 1 auto !important;
    min-height: 0;
    display: grid !important;
    grid-auto-rows: 40px;
    justify-items: center;
    align-content: start;
    gap: 7px !important;
    padding: 4px 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none;
  }

  .category-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .sidebar-logo,
  .sidebar-primary a,
  .icon-nav a,
  .sidebar-icon-link,
  .sidebar-account-menu summary {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 14px !important;
    margin: 0 auto !important;
    line-height: 1 !important;
    flex: 0 0 40px !important;
  }

  .sidebar-primary a span,
  .icon-nav a span,
  .sidebar-icon-link span,
  .sidebar-account-menu summary > span:not(.avatar) {
    display: none !important;
  }

  .sidebar-primary i,
  .icon-nav i,
  .sidebar-icon-link i {
    width: 20px !important;
    height: 20px !important;
    display: grid !important;
    place-items: center !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .sidebar-primary .avatar,
  .sidebar-account-menu summary .avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
  }

  .sidebar-secondary {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 20px !important;
    background: color-mix(in srgb, var(--kt-demo10-surface-2) 78%, transparent) !important;
    color: var(--kt-demo10-text) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .12) !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: hidden !important;
    backdrop-filter: blur(18px);
    z-index: var(--sulth-z-sidebar-secondary) !important;
  }

  .sidebar-secondary-inner {
    height: 100% !important;
    padding: 16px 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none;
  }

  .sidebar-secondary-inner::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .workspace-brand {
    padding: 10px !important;
    border: 1px solid var(--kt-demo10-border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--kt-demo10-surface) 80%, transparent);
  }

  .side-section {
    margin-top: 12px !important;
  }

  .side-section p {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 0 10px !important;
    padding: 9px 10px !important;
    border: 1px solid var(--kt-demo10-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--kt-demo10-surface) 86%, transparent);
    color: var(--kt-demo10-heading) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
  }

  .side-section a {
    min-height: 38px !important;
    padding: 9px 10px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  .sidebar-resizer {
    display: none !important;
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--sulth-z-overlay) !important;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, .32) !important;
    backdrop-filter: blur(6px);
    transition: opacity .18s ease;
  }

  body.mobile-nav-open .sidebar-overlay,
  body.sidebar-secondary-open .sidebar-overlay,
  body.mobile-account-open .sidebar-overlay,
  body.mobile-account-open .mobile-account-overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-account-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: calc(var(--sulth-z-dropdown) - 2) !important;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, .28) !important;
    backdrop-filter: blur(5px);
    transition: opacity .18s ease;
  }

  .mobile-account-sheet {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 12px)) !important;
    z-index: calc(var(--sulth-z-dropdown) - 1) !important;
    display: grid !important;
    gap: 6px !important;
    max-width: 420px;
    margin: 0 auto;
    padding: 12px !important;
    border: 1px solid var(--kt-demo10-border) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--kt-demo10-surface) 94%, transparent) !important;
    color: var(--kt-demo10-text) !important;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .28) !important;
    backdrop-filter: blur(20px);
    transform: translate3d(0, calc(100% + 28px), 0) scale(.98) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), opacity .18s ease, visibility .18s ease;
  }

  body.mobile-account-open .mobile-account-sheet {
    transform: translate3d(0, 0, 0) scale(1) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-account-sheet .avatar-dropdown-head {
    margin-bottom: 4px !important;
    padding: 10px !important;
    border: 1px solid var(--kt-demo10-border);
    border-radius: 16px;
    background: var(--kt-demo10-surface-2) !important;
  }

  .mobile-account-sheet a,
  .mobile-account-sheet .theme-toggle {
    min-height: 40px !important;
    padding: 8px 10px !important;
    border-radius: 13px !important;
    color: var(--kt-demo10-text) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-account-sheet a:hover,
  .mobile-account-sheet .theme-toggle:hover {
    color: var(--kt-demo10-primary) !important;
    background: var(--kt-demo10-primary-soft) !important;
  }

  .avatar-dropdown:not(.is-floating) {
    display: none !important;
  }

  .avatar-menu[open] .avatar-dropdown.is-floating {
    display: block !important;
  }

  body:has(.app-sidebar) .wrap {
    padding: 18px 12px 32px !important;
  }

  .workspace-home-page,
  .portal-page,
  .discover-page,
  .tool-workspace-page,
  .forum-page {
    gap: 14px !important;
  }

  .workspace-welcome {
    min-height: auto !important;
    padding: 22px !important;
    border-radius: 22px !important;
  }

  .workspace-welcome h1 {
    font-size: clamp(32px, 11vw, 44px) !important;
  }

  .workspace-overview-grid,
  .workspace-app-grid,
  .workspace-home-grid,
  .portal-layout,
  .billing-grid,
  .license-grid,
  .kpi-grid,
  .admin-grid {
    grid-template-columns: 1fr !important;
  }

  .panel,
  .card,
  .table,
  .kpi-card {
    border-radius: 18px !important;
  }

  .category-strip {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .category-strip::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .category-strip a,
  .category-strip span {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .forum-create-action {
    position: fixed !important;
    right: 16px !important;
    bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 84px)) !important;
    z-index: 460 !important;
    box-shadow: 0 18px 38px rgba(37, 99, 235, .28) !important;
  }

  .chatbot-widget {
    right: 14px !important;
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 14px)) !important;
    z-index: 455 !important;
  }
}

/* Demo1-inspired auth reset and account profile polish */
.auth-success-shell { min-height: 100vh; }
.auth-state-card,
.auth-password-card { max-width: 440px; gap: 18px; }
.auth-illustration {
  width: 128px;
  height: 128px;
  margin: 10px auto 0;
  display: grid;
  place-items: center;
  border-radius: 32px;
  color: #2563eb;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.95), rgba(255,255,255,.35) 38%, transparent 39%), linear-gradient(135deg, rgba(37,99,235,.16), rgba(20,184,166,.12));
  border: 1px solid rgba(37,99,235,.18);
  box-shadow: 0 24px 70px rgba(37,99,235,.18);
}
.auth-illustration i { font-size: 54px; }
.auth-illustration-image {
  width: min(180px, 58vw);
  height: 150px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.auth-illustration-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.auth-email-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
  font-size: 13px;
  font-weight: 700;
}
.auth-primary-action { justify-content: center; width: 100%; }
.auth-resend-form,
.auth-reset-request-form { display: grid; gap: 14px; }
.auth-register-card { max-width: 620px; }
.auth-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.otp-input-large {
  text-align: center;
  letter-spacing: 8px;
  font-size: 24px !important;
  font-weight: 900;
}
.auth-resend-form button[disabled] { opacity: .65; cursor: wait; }
.auth-redirect-note { margin: 0; color: var(--muted); text-align: center; font-size: 13px; }
.password-field {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.password-field input { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.password-field button {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent !important;
  color: var(--muted);
  box-shadow: none !important;
}
.password-strength { display: grid; gap: 7px; margin-top: -6px; }
.password-strength::before {
  content: "";
  grid-area: 1 / 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,.24);
}
.password-strength span {
  grid-area: 1 / 1;
  width: 0;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
  transition: width .2s ease, background .2s ease;
}
.password-strength span[data-level="2"] { background: #f59e0b; }
.password-strength span[data-level="3"] { background: #22c55e; }
.password-strength span[data-level="4"] { background: #14b8a6; }
.password-strength small { color: var(--muted); font-size: 12px; }
.account-workspace { display: grid; gap: 20px; }
.account-profile-cover {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(15,23,42,.62), rgba(37,99,235,.24)), var(--profile-banner, radial-gradient(circle at 82% 18%, rgba(20,184,166,.30), transparent 32%)), linear-gradient(135deg, rgba(37,99,235,.14), rgba(255,255,255,.78));
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 28px 80px rgba(15,23,42,.12);
}
.account-profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.62));
  pointer-events: none;
}
.account-profile-main,
.account-profile-actions { position: relative; z-index: 1; }
.account-profile-main { display: flex; align-items: flex-end; gap: 20px; }
.account-profile-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  border: 4px solid rgba(255,255,255,.72);
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  box-shadow: 0 20px 50px rgba(15,23,42,.28);
}
.account-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-profile-main h1,
.account-profile-main p { margin: 0; }
.account-profile-main h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: 0; }
.account-profile-main .eyebrow,
.account-profile-main p,
.profile-meta-row { color: rgba(255,255,255,.82); }
.profile-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-meta-row span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}
.account-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-section-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}
.account-section-tabs::-webkit-scrollbar { display: none; }
.account-section-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.account-section-tabs a:hover,
.account-section-tabs a.active {
  color: var(--text);
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.18);
  transform: translateY(-1px);
}
.profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.profile-stat { display: grid; gap: 7px; }
.profile-stat span,
.profile-stat small { color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-stat strong { color: var(--text); font-size: 30px; }
.profile-info-list { display: grid; gap: 10px; }
.profile-info-list span {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.profile-info-list b { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.profile-info-list em { color: var(--text); font-style: normal; font-weight: 700; overflow-wrap: anywhere; }
.profile-edit-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}
.profile-edit-panel label.wide { grid-column: 1 / -1; }
.avatar img,
.compact-avatar img,
.avatar-dropdown-head .avatar img,
.mobile-user-box .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.avatar,
.compact-avatar,
.mobile-user-box .avatar,
.avatar-dropdown-head .avatar {
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}
.compact-avatar,
.mobile-user-box .compact-avatar,
.sidebar-account-menu summary .compact-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 999px !important;
}
.avatar-dropdown-head .avatar {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  border-radius: 16px !important;
}
.account-profile-avatar {
  aspect-ratio: 1 / 1;
}
.profile-settings-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.profile-settings-preview {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 16px;
  justify-items: start;
}
.profile-settings-preview .account-profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  border-width: 3px;
}
.profile-settings-preview h2,
.profile-settings-preview p {
  margin: 0;
}
.profile-settings-preview h2 {
  color: var(--text);
  font-size: 22px;
}
.profile-settings-preview > div > p,
.profile-settings-preview .muted {
  color: color-mix(in srgb, var(--text) 66%, var(--muted));
}
.profile-preview-list {
  width: 100%;
  display: grid;
  gap: 9px;
}
.profile-preview-list span {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}
.profile-preview-list b,
.profile-form-section h3 {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.profile-preview-list em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.profile-form-section {
  display: grid;
  gap: 12px;
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.profile-form-section:last-of-type {
  border-bottom: 0;
}
.profile-form-section h3 {
  margin: 0;
}
.account-workspace .panel,
.account-workspace .account-section-tabs {
  background: color-mix(in srgb, var(--surface) 94%, white 6%);
}
.account-workspace :where(.panel-title h2, .profile-form-section h3, label, .profile-info-list em, .compact-list b, .compact-list span) {
  color: var(--text);
}
.account-workspace :where(.muted, .panel-title p, .form-hint, .compact-list small, .profile-stat span, .profile-stat small) {
  color: color-mix(in srgb, var(--text) 62%, var(--muted));
}
.account-workspace input,
.account-workspace textarea {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, white 8%);
}
.account-workspace input::placeholder,
.account-workspace textarea::placeholder {
  color: color-mix(in srgb, var(--text) 42%, var(--muted));
}
:root[data-theme="dark"] .account-workspace .panel,
:root[data-theme="dark"] .account-workspace .account-section-tabs {
  background: rgba(15, 23, 42, .86);
}
:root[data-theme="dark"] .account-workspace :where(.muted, .panel-title p, .form-hint, .compact-list small, .profile-stat span, .profile-stat small) {
  color: rgba(203, 213, 225, .78);
}
:root[data-theme="dark"] .account-workspace input,
:root[data-theme="dark"] .account-workspace textarea {
  background: rgba(15, 23, 42, .72);
  color: #f8fafc;
}
:root[data-theme="dark"] .account-section-tabs a {
  color: rgba(203, 213, 225, .86);
}
:root[data-theme="dark"] .account-section-tabs a:hover,
:root[data-theme="dark"] .account-section-tabs a.active {
  color: #f8fafc;
  background: rgba(96, 165, 250, .16);
  border-color: rgba(96, 165, 250, .26);
}
:root[data-theme="light"] .account-workspace,
:root[data-theme="light"] .account-workspace :where(.account-section-tabs, .panel, .profile-stat, .profile-info-list, .form-grid.account-form, .account-panel, .profile-settings-preview) {
  color: #0f172a !important;
}
:root[data-theme="light"] .account-workspace :where(.account-section-tabs a, .account-section-tabs i, .profile-stat strong, .profile-info-list em, .account-form label, .account-form input, .account-form textarea, .account-panel h2, .account-panel h3, .profile-settings-preview h2, .profile-settings-preview em, .compact-list b, .compact-list span, table td, table th) {
  color: #0f172a !important;
}
:root[data-theme="light"] .account-workspace :where(.muted, small, .profile-stat span, .profile-stat small, .profile-info-list b, .panel-title p, .form-hint, .compact-list small, table small) {
  color: #475569 !important;
}
:root[data-theme="light"] .account-workspace :where(.account-section-tabs, .panel, .profile-stat, .account-panel, .profile-settings-preview, .profile-preview-list span) {
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(15, 23, 42, .10) !important;
}
:root[data-theme="light"] .account-workspace :where(input, textarea) {
  background: #fff !important;
  border-color: rgba(15, 23, 42, .14) !important;
  color: #0f172a !important;
}
:root[data-theme="light"] .account-section-tabs a:hover,
:root[data-theme="light"] .account-section-tabs a.active {
  color: #0f172a !important;
  background: rgba(37, 99, 235, .10) !important;
  border-color: rgba(37, 99, 235, .22) !important;
}
:root[data-theme="dark"] .auth-illustration {
  background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(20,184,166,.16));
  border-color: rgba(96,165,250,.20);
  color: #93c5fd;
}
:root[data-theme="dark"] .account-profile-cover {
  background: linear-gradient(145deg, rgba(2,6,23,.64), rgba(37,99,235,.20)), var(--profile-banner, radial-gradient(circle at 82% 18%, rgba(20,184,166,.20), transparent 32%)), linear-gradient(135deg, rgba(15,23,42,.95), rgba(30,41,59,.86));
}
@media (max-width: 980px) {
  .profile-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-profile-cover { align-items: stretch; flex-direction: column; min-height: 0; padding: 26px; }
  .profile-settings-layout { grid-template-columns: 1fr; }
  .profile-settings-preview { position: static; }
}
@media (max-width: 640px) {
  .auth-compact-grid { grid-template-columns: 1fr; }
  .otp-input-large { letter-spacing: 5px; }
  .account-profile-main { align-items: flex-start; flex-direction: column; }
  .account-profile-avatar { width: 88px; height: 88px; border-radius: 22px; font-size: 34px; }
  .profile-dashboard-grid { grid-template-columns: 1fr; }
  .profile-info-list span { grid-template-columns: 1fr; gap: 4px; }
  .account-section-tabs { margin-inline: -8px; border-radius: 16px; }
}

/* Final light-mode account readability guard */
html[data-theme="light"] body.metronic-app .account-workspace :where(.account-section-tabs, .profile-stat, .profile-info-list, .account-form, .account-panel, .profile-settings-preview) :where(h1, h2, h3, h4, h5, h6, label, td, th, li, dt, dd, strong, b, em) {
  color: #111827 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.account-section-tabs, .profile-stat, .profile-info-list, .account-form, .account-panel, .profile-settings-preview) :where(p, span, a) {
  color: #1f2937 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.account-section-tabs, .profile-stat, .profile-info-list, .account-form, .account-panel, .profile-settings-preview) :where(small, .muted, .form-hint, .panel-title p, .compact-list small, .profile-stat span, .profile-stat small, .profile-info-list b, .profile-preview-list b) {
  color: #6b7280 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-stat strong, .profile-info-list em, .profile-preview-list em, .compact-list b) {
  color: #111827 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.account-section-tabs, .profile-stat, .profile-info-list span, .account-panel, .profile-settings-preview, .profile-preview-list span) {
  background-color: rgba(255, 255, 255, .96) !important;
  border-color: rgba(17, 24, 39, .12) !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.account-form input, .account-form textarea, .profile-edit-panel textarea) {
  color: #111827 !important;
  background-color: #ffffff !important;
  border-color: rgba(17, 24, 39, .16) !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.account-form input::placeholder, .account-form textarea::placeholder, .profile-edit-panel textarea::placeholder) {
  color: #9ca3af !important;
}

html[data-theme="light"] body.metronic-app .account-workspace .account-section-tabs a.active,
html[data-theme="light"] body.metronic-app .account-workspace .account-section-tabs a:hover {
  color: #111827 !important;
  background-color: rgba(37, 99, 235, .10) !important;
  border-color: rgba(37, 99, 235, .24) !important;
}

html[data-theme="light"] body.metronic-app .account-workspace .account-section-tabs a.active i,
html[data-theme="light"] body.metronic-app .account-workspace .account-section-tabs a:hover i {
  color: #2563eb !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout),
html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(section, article, aside, form, div) {
  color: #111827 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(h1, h2, h3, h4, h5, h6, label, strong, b, em, td, th) {
  color: #111827 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(p, span, a, li, dt, dd) {
  color: #1f2937 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(small, .muted, .form-hint, .panel-title p, .compact-list small, .profile-stat span, .profile-stat small, .profile-info-list b, .profile-preview-list b) {
  color: #6b7280 !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(input, textarea, select) {
  color: #111827 !important;
  background: #ffffff !important;
  border-color: rgba(17, 24, 39, .16) !important;
}

html[data-theme="light"] body.metronic-app .account-workspace :where(.profile-dashboard-grid, .account-grid, .profile-settings-layout) :where(input::placeholder, textarea::placeholder) {
  color: #9ca3af !important;
}
