:root {
  color-scheme: dark;
  --bg: #0b0a10;
  --bg-soft: #111018;
  --panel: rgba(24, 22, 32, 0.86);
  --panel-solid: #181620;
  --panel-hover: #1d1a27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f5fb;
  --text-soft: #b7b1c4;
  --text-muted: #7f788c;
  --purple: #8b5cf6;
  --purple-bright: #a78bfa;
  --green: #37d17b;
  --red: #fb7185;
  --blue: #60a5fa;
  --amber: #f5b942;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  --radius: 22px;
  --radius-small: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3f8;
  --bg-soft: #ebe8f0;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-hover: #faf9fc;
  --line: rgba(33, 25, 46, 0.09);
  --line-strong: rgba(33, 25, 46, 0.15);
  --text: #1a1720;
  --text-soft: #5f5869;
  --text-muted: #8e8797;
  --shadow: 0 24px 70px rgba(52, 39, 68, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -10%, rgba(139, 92, 246, 0.11), transparent 35rem),
    var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Shared */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup > span:last-child {
  display: grid;
  line-height: 1.05;
}

.brand-lockup strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-lockup small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 7px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.brand-mark span {
  border-radius: 3px;
  background: rgba(167, 139, 250, 0.35);
}

.brand-mark span:first-child,
.brand-mark span:last-child {
  background: linear-gradient(145deg, var(--purple-bright), #6d28d9);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--purple-bright) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-pulse,
.refresh-dot,
.secure-dot {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(55, 209, 123, 0.12);
}

.status-pulse::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(55, 209, 123, 0.45);
  border-radius: inherit;
  animation: pulse 2s ease-out infinite;
  content: "";
}

@keyframes pulse {
  0% { opacity: 0.8; transform: scale(0.6); }
  75%, 100% { opacity: 0; transform: scale(1.7); }
}

/* Login */
.login-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 35%, rgba(124, 58, 237, 0.18), transparent 28rem),
    #0a090e;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.9fr) minmax(480px, 1.1fr);
}

.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 570px);
  min-height: 100vh;
  margin-left: auto;
  padding: 52px 72px 40px;
  flex-direction: column;
  justify-content: center;
}

.brand-lockup--login {
  position: absolute;
  top: 46px;
  left: 72px;
}

.login-copy {
  margin-top: 30px;
}

.login-copy h1 {
  max-width: 460px;
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.login-copy > p:last-child {
  max-width: 450px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 16px;
}

.login-form {
  display: grid;
  margin-top: 38px;
  gap: 10px;
}

.login-form label {
  margin-top: 7px;
  color: #d8d3df;
  font-size: 13px;
  font-weight: 650;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 19px;
  height: 19px;
  color: #777082;
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  outline: none;
  color: #f7f5fb;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input:focus {
  border-color: rgba(167, 139, 250, 0.72);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.form-alert {
  padding: 11px 14px;
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: 11px;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.09);
  font-size: 13px;
}

.form-success {
  padding: 11px 14px;
  border: 1px solid rgba(55, 209, 123, 0.24);
  border-radius: 11px;
  color: #bbf7d0;
  background: rgba(55, 209, 123, 0.09);
  font-size: 13px;
}

.primary-button {
  display: inline-flex;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.26), inset 0 1px rgba(255, 255, 255, 0.2);
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  box-shadow: 0 15px 32px rgba(109, 40, 217, 0.35), inset 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.primary-button--wide {
  width: 100%;
  height: 54px;
  margin-top: 18px;
}

.primary-button svg {
  width: 18px;
}

.login-footnote {
  display: flex;
  margin: 26px 0 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #817a8c;
  font-size: 12px;
}

.login-visual {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.18), transparent 25rem);
  background-size: 52px 52px, 52px 52px, auto;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0a090e 0, transparent 18%, transparent 80%, rgba(10, 9, 14, 0.35));
  content: "";
  pointer-events: none;
}

.visual-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.visual-orb--one {
  width: 260px;
  height: 260px;
  top: 15%;
  right: 8%;
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 100px rgba(139, 92, 246, 0.18);
}

.visual-orb--two {
  width: 180px;
  height: 180px;
  bottom: 10%;
  left: 12%;
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 80px rgba(59, 130, 246, 0.16);
}

.preview-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(24, 21, 33, 0.72);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.preview-card--main {
  width: min(480px, 70%);
  padding: 24px;
  border-radius: 28px;
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
}

.preview-head {
  display: flex;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
  gap: 12px;
}

.preview-head > span:nth-child(2),
.preview-app > span,
.preview-card--status > span:last-child {
  display: grid;
}

.preview-head strong,
.preview-app strong,
.preview-card--status strong {
  color: #f8f6fb;
  font-size: 13px;
}

.preview-head small,
.preview-app small,
.preview-card--status small {
  margin-top: 3px;
  color: #827b8e;
  font-size: 10px;
}

.preview-head i {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(55, 209, 123, 0.7);
}

.preview-logo {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #a78bfa, #6d28d9);
  font-weight: 800;
}

.preview-stats {
  display: grid;
  margin: 18px 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.preview-stats span {
  display: grid;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.preview-stats small {
  color: #837b90;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-stats strong {
  margin-top: 5px;
  font-size: 23px;
}

.preview-app {
  display: flex;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 15px;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.026);
}

.preview-app b {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  place-items: center;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.17);
  font-size: 10px;
}

.preview-app b.green {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.preview-app i {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
}

.preview-card--status {
  position: absolute;
  right: 8%;
  bottom: 19%;
  display: flex;
  padding: 14px 18px;
  border-radius: 16px;
  align-items: center;
  gap: 12px;
  transform: rotate(2deg);
}

.access-visual {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(34, 197, 94, 0.1), transparent 25rem);
  background-size: 52px 52px, 52px 52px, auto;
}

.access-preview {
  position: relative;
  z-index: 1;
  width: min(430px, 68%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: rgba(24, 21, 33, 0.74);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.access-preview-icon {
  display: grid;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 18px;
  place-items: center;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

.access-preview-icon svg {
  width: 27px;
}

.access-preview > p {
  margin: 28px 0 6px;
  color: #9f8fd2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.access-preview h2 {
  margin: 0;
  color: #f8f6fb;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.access-preview-status {
  display: inline-flex;
  margin-top: 17px;
  padding: 7px 11px;
  border: 1px solid rgba(55, 209, 123, 0.16);
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  color: #86efac;
  background: rgba(55, 209, 123, 0.06);
  font-size: 10px;
  font-weight: 700;
}

.access-preview-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(55, 209, 123, 0.7);
}

.access-preview-security {
  display: flex;
  margin-top: 30px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  align-items: center;
  gap: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.access-preview-security > svg {
  width: 20px;
  color: #a78bfa;
}

.access-preview-security > span {
  display: grid;
}

.access-preview-security strong {
  color: #f8f6fb;
  font-size: 12px;
}

.access-preview-security small {
  margin-top: 3px;
  color: #827b8e;
  font-size: 10px;
}

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

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 78px;
  padding: 0 clamp(24px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-pill,
.monitor-badge {
  display: inline-flex;
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(55, 209, 123, 0.17);
  border-radius: 999px;
  align-items: center;
  gap: 9px;
  color: color-mix(in srgb, var(--green) 80%, var(--text));
  background: rgba(55, 209, 123, 0.06);
  font-size: 11px;
  font-weight: 700;
}

.system-pill--alert {
  border-color: rgba(251, 113, 133, 0.2);
  color: var(--red);
  background: rgba(251, 113, 133, 0.07);
}

.system-pill--alert .status-pulse {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  place-items: center;
  color: var(--text-soft);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.moon-icon {
  display: none;
}

:root[data-theme="light"] .sun-icon {
  display: none;
}

:root[data-theme="light"] .moon-icon {
  display: block;
}

.profile {
  display: flex;
  margin-left: 5px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 11px;
  place-items: center;
  color: var(--purple-bright);
  background: rgba(139, 92, 246, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.profile-copy {
  display: grid;
  line-height: 1.15;
}

.profile-copy strong {
  font-size: 12px;
  text-transform: capitalize;
}

.profile-copy small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-main {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 80px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero h1 span {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.65em;
  transform: rotate(-7deg);
}

.hero > div > p:last-child {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 16px;
}

.last-refresh {
  display: flex;
  margin: 0 0 2px;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.refresh-dot {
  width: 6px;
  height: 6px;
}

.stats-grid {
  display: grid;
  margin-top: 38px;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  display: flex;
  min-height: 130px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(145deg, var(--panel), color-mix(in srgb, var(--panel) 88%, transparent));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  place-items: center;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-icon--purple {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.13);
}

.stat-icon--green {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.stat-icon--blue {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.stat-icon--amber {
  color: #fcd34d;
  background: rgba(245, 185, 66, 0.12);
}

.stat-copy {
  display: grid;
}

.stat-copy small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stat-copy strong {
  margin-top: 5px;
  font-size: 28px;
  font-weight: 730;
  letter-spacing: -0.04em;
}

.stat-copy em {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.content-section {
  margin-top: 54px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.filters {
  display: flex;
  gap: 10px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  color: var(--text-muted);
  transform: translateY(-50%);
}

.search-box input,
.filters select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: var(--panel);
}

.search-box input {
  width: 220px;
  padding: 0 13px 0 40px;
}

.filters select {
  min-width: 175px;
  padding: 0 32px 0 13px;
}

.search-box input:focus,
.filters select:focus {
  border-color: rgba(139, 92, 246, 0.58);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.09);
}

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

.app-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent, #8b5cf6) 8%, transparent), transparent 17rem),
    var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.app-card--purple {
  --accent: #8b5cf6;
}

.app-card--green {
  --accent: #22c55e;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent, #8b5cf6) 26%, var(--line));
  transform: translateY(-2px);
}

.app-card--loading {
  min-height: 475px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-icon {
  display: grid;
  width: 50px;
  height: 50px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 15px;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 76%, white);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.app-icon svg {
  width: 23px;
  height: 23px;
}

.status-badge {
  display: inline-flex;
  height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--panel-solid) 80%, transparent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge--online {
  border-color: rgba(55, 209, 123, 0.16);
  color: color-mix(in srgb, var(--green) 80%, var(--text));
  background: rgba(55, 209, 123, 0.065);
}

.status-badge--online i {
  background: var(--green);
  box-shadow: 0 0 8px rgba(55, 209, 123, 0.6);
}

.status-badge--offline {
  border-color: rgba(251, 113, 133, 0.16);
  color: var(--red);
  background: rgba(251, 113, 133, 0.065);
}

.status-badge--offline i {
  background: var(--red);
}

.app-card-copy {
  margin-top: 23px;
}

.category-label {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.app-card-copy h3 {
  margin: 7px 0 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.app-card-copy p {
  max-width: 470px;
  min-height: 42px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.metrics-row {
  display: grid;
  margin-top: 24px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
}

.metrics-row span,
.app-meta span {
  display: grid;
}

.metrics-row span + span {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.metrics-row small,
.app-meta small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metrics-row strong {
  margin-top: 5px;
  font-size: 16px;
}

.sparkline-wrap {
  display: flex;
  height: 55px;
  margin-top: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sparkline-wrap > span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 9px;
}

.sparkline {
  width: 160px;
  height: 34px;
  overflow: visible;
}

.sparkline path {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.sparkline--alert path {
  stroke: var(--red);
}

.sparkline--empty {
  display: flex;
  width: 150px;
  align-items: center;
  gap: 5px;
}

.sparkline--empty span {
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
}

.app-meta {
  display: grid;
  padding: 15px 0 17px;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.app-meta strong {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
}

.launch-button {
  display: flex;
  height: 45px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: color-mix(in srgb, var(--accent) 67%, var(--text));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: 12px;
  font-weight: 750;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.launch-button:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  color: white;
  background: color-mix(in srgb, var(--accent) 80%, #3b176f);
}

.launch-button svg {
  width: 15px;
}

.empty-state {
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

.activity-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.section-head--compact {
  margin-bottom: 18px;
  align-items: center;
}

.monitor-badge {
  border-color: var(--line);
  color: var(--text-muted);
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monitor-badge .status-pulse {
  width: 5px;
  height: 5px;
}

.activity-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.activity-empty,
.activity-item {
  display: flex;
  min-height: 68px;
  padding: 12px 16px;
  align-items: center;
  gap: 13px;
  background: color-mix(in srgb, var(--panel-solid) 55%, transparent);
}

.activity-item + .activity-item {
  border-top: 1px solid var(--line);
}

.activity-empty > span:nth-child(2),
.activity-item > span:nth-child(2) {
  display: grid;
}

.activity-empty strong,
.activity-item strong {
  font-size: 12px;
}

.activity-empty small,
.activity-item small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.activity-empty time,
.activity-item time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 9px;
}

.activity-check,
.activity-alert {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  place-items: center;
}

.activity-check {
  color: var(--green);
  background: rgba(55, 209, 123, 0.09);
}

.activity-check svg {
  width: 16px;
}

.activity-alert {
  color: var(--red);
  background: rgba(251, 113, 133, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.footer {
  display: flex;
  width: min(1320px, calc(100% - 48px));
  min-height: 70px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 10px;
}

.footer b {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--purple-bright);
  background: rgba(139, 92, 246, 0.08);
  font-weight: 700;
}

/* Password dialog */
.password-dialog {
  width: min(500px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.45);
}

.password-dialog::backdrop {
  background: rgba(5, 4, 8, 0.72);
  backdrop-filter: blur(5px);
}

.password-form {
  display: grid;
  padding: 27px;
  gap: 9px;
}

.dialog-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dialog-head .eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  place-items: center;
  color: var(--purple-bright);
  background: rgba(139, 92, 246, 0.12);
}

.dialog-icon svg {
  width: 21px;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--text);
  background: var(--panel-hover);
}

.dialog-close svg {
  width: 16px;
}

.dialog-copy {
  margin: 13px 0 9px;
  color: var(--text-soft);
  font-size: 12px;
}

.password-form > label {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.password-form > input:not([type="hidden"]) {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: var(--bg-soft);
}

.password-form > input:focus {
  border-color: rgba(139, 92, 246, 0.62);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.field-hint {
  color: var(--text-muted);
  font-size: 10px;
}

.dialog-actions {
  display: flex;
  margin-top: 20px;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions .primary-button {
  min-width: 190px;
}

.secondary-button {
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-soft);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  color: var(--text);
  background: var(--panel-hover);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

@media (max-width: 1000px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel {
    width: min(100%, 580px);
    margin: 0 auto;
  }

  .login-visual {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 18px;
  }

  .topbar .brand-lockup small,
  .profile-copy,
  .topbar-actions > .icon-button:first-of-type {
    display: none;
  }

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

  .profile {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .dashboard-main {
    width: min(100% - 28px, 1320px);
    padding: 40px 0 60px;
  }

  .hero {
    display: block;
  }

  .last-refresh {
    margin-top: 20px;
  }

  .stats-grid {
    margin-top: 28px;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    min-height: 118px;
    padding: 17px;
    gap: 11px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-copy strong {
    font-size: 23px;
  }

  .content-section {
    margin-top: 40px;
  }

  .section-head {
    display: block;
  }

  .filters {
    margin-top: 18px;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .filters select {
    min-width: 0;
    max-width: 46%;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    padding: 21px;
  }

  .section-head--compact {
    display: flex;
  }

  .monitor-badge {
    display: none;
  }

  .footer {
    width: min(100% - 28px, 1320px);
  }

  .footer span:last-child {
    display: none;
  }
}

@media (max-width: 520px) {
  .login-panel {
    min-height: 100vh;
    padding: 110px 24px 32px;
  }

  .brand-lockup--login {
    top: 34px;
    left: 24px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: auto;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filters select {
    width: 100%;
    max-width: none;
  }

  .metrics-row,
  .app-meta {
    gap: 12px;
  }

  .metrics-row span + span {
    padding-left: 14px;
  }

  .sparkline {
    width: 125px;
  }

  .password-form {
    padding: 22px;
  }

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

  .dialog-actions .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
