:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #151515;
  --surface-2: #1b1b1b;
  --surface-3: #0c0c0c;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f7f7;
  --muted: #8b8b92;
  --muted-2: #5d5d64;
  --red: #ef2330;
  --red-dark: #b91520;
  --green: #00a87e;
  --cyan: #00f5ff;
  --danger: #ff5a66;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(239, 35, 48, 0.12), transparent 28rem),
    linear-gradient(180deg, #080606 0, #050505 290px, #050505 100%);
  color: var(--text);
}

button,
input,
select,
code {
  font: inherit;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100vw - 32px));
  min-height: 62px;
  margin: 0 auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.header-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff3945, var(--red-dark));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 0 0 6px rgba(239, 35, 48, 0.08);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand-lockup span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.server-pill,
.account-pill,
.nav-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.server-pill,
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.server-pill code {
  color: var(--cyan);
  font-size: 0.78rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 168, 126, 0.75);
}

.avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #c7c7cb;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nav-button:hover,
.nav-button.active {
  border-color: rgba(239, 35, 48, 0.55);
  background: rgba(239, 35, 48, 0.1);
  color: #fff;
}

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

.burger-button {
  display: grid;
  width: 38px;
  height: 34px;
  place-items: center;
  gap: 0;
  padding: 7px 9px;
  border: 1px solid rgba(239, 35, 48, 0.45);
  border-radius: 9px;
  background: rgba(239, 35, 48, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.burger-button span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.burger-button:hover {
  border-color: rgba(239, 35, 48, 0.75);
  background: rgba(239, 35, 48, 0.18);
}

body.menu-open {
  overflow: hidden;
}

.side-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background 160ms ease;
}

.side-menu.open {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.64);
}

.side-menu-panel {
  width: min(310px, calc(100vw - 42px));
  height: 100%;
  padding: 18px;
  border-right: 1px solid rgba(239, 35, 48, 0.62);
  background: #101010;
  box-shadow: 28px 0 80px rgba(0, 0, 0, 0.42);
  transform: translateX(-102%);
  transition: transform 180ms ease;
}

.side-menu.open .side-menu-panel {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.side-menu-header strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 1.15rem;
}

.side-menu-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.side-menu-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.side-menu-nav a:hover {
  border-color: rgba(239, 35, 48, 0.55);
  background: rgba(239, 35, 48, 0.1);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 42px;
}

.hero {
  max-width: 700px;
  min-height: 242px;
  padding-top: 2px;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0 0 24px;
  padding: 0 13px;
  border: 1px solid rgba(239, 35, 48, 0.45);
  border-radius: 999px;
  background: rgba(239, 35, 48, 0.08);
  color: #ff4b55;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.support-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff4b55;
}

.hero h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--red);
}

.hero-copy {
  max-width: 565px;
  margin: 16px 0 0;
  color: #b8b8c0;
  font-size: 1.04rem;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats div {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.hero-stats span,
.hero-stats strong {
  display: block;
}

.hero-stats span {
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-stats strong {
  margin-top: 3px;
  color: #fff;
  font-size: 1.15rem;
}

.hero-stats .error {
  color: var(--danger);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.workflow-strip article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
}

.workflow-strip article:last-child {
  border-right: 0;
}

.workflow-strip strong {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(239, 35, 48, 0.42);
  border-radius: 50%;
  background: rgba(239, 35, 48, 0.1);
  color: #ff535c;
  font-size: 0.78rem;
  font-weight: 950;
}

.workflow-strip span {
  color: #d3d3d8;
  font-size: 0.84rem;
  font-weight: 760;
}

.profiles-section {
  margin-top: 30px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.section-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.section-title span {
  height: 1px;
  background: var(--line);
}

.section-title p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-tools input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  font: inherit;
}

.profile-tools input::placeholder {
  color: var(--muted);
}

.profile-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-filter-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
  cursor: pointer;
  font-weight: 900;
}

.profile-filter-tab[aria-pressed="true"] {
  border-color: rgba(239, 35, 48, 0.62);
  background: rgba(239, 35, 48, 0.14);
  color: #ffffff;
}

.profile-filter-tab:hover,
.profile-filter-tab:focus-visible {
  border-color: rgba(239, 35, 48, 0.55);
  outline: none;
}

.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.28);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--red)), rgba(239, 35, 48, 0.4));
}

.profile-card-top {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 24px 20px 12px;
}

.workstation-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent, var(--red)) 48%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, var(--red)) 18%, transparent);
  color: white;
  font-size: 0.8rem;
  font-weight: 950;
}

.profile-card h2 {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
}

.profile-description {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 0.84rem;
  line-height: 1.45;
}

.profile-category {
  width: fit-content;
  margin: 0 20px 8px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--red)) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--red)) 10%, transparent);
  color: color-mix(in srgb, var(--accent, var(--red)) 68%, #ffffff);
  font-size: 0.72rem;
  font-weight: 900;
}

.profile-risk-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  align-content: flex-start;
  margin: 0 20px 8px;
}

.risk-badge {
  display: inline-flex;
  flex: 0 0 auto;
  height: 23px;
  align-items: center;
  align-self: flex-start;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.risk-badge.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.risk-badge.info {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.08);
  color: #7dd3fc;
}

.risk-badge.neutral {
  background: rgba(255, 255, 255, 0.025);
}

.app-count {
  min-width: 82px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--red)) 48%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--red)) 14%, transparent);
  color: color-mix(in srgb, var(--accent, var(--red)) 72%, #ffffff);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.app-list {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 8px 20px 14px;
  list-style: none;
}

.app-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  color: #f2f4f7;
  font-size: 0.86rem;
}

.app-list li span {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(0, 168, 126, 0.5);
  border-radius: 50%;
  background: rgba(0, 168, 126, 0.13);
}

.app-list li span::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
  transform: rotate(-45deg) translateY(-1px);
}

.app-list li.app-list-extra {
  display: none;
}

.profile-card.apps-expanded .app-list li.app-list-extra {
  display: flex;
}

.app-list .app-list-more button {
  width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
}

.app-list .app-list-more button:hover,
.app-list .app-list-more button:focus-visible {
  border-color: color-mix(in srgb, var(--accent, var(--red)) 50%, transparent);
  color: #ffffff;
  outline: none;
}

.inline-command {
  margin: 0 20px 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #090909;
}

.inline-command summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  list-style: none;
}

.inline-command summary::-webkit-details-marker {
  display: none;
}

.inline-command[open] summary {
  border-bottom: 1px solid var(--line);
  color: #ffffff;
}

.inline-command code {
  display: block;
  padding: 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.primary-button,
.secondary-button,
.success-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  border: 1px solid rgba(239, 35, 48, 0.75);
  background: linear-gradient(180deg, #ff333f, var(--red-dark));
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #d5d5db;
}

.success-button {
  border: 1px solid rgba(0, 168, 126, 0.6);
  background: linear-gradient(180deg, #00b98b, #047857);
  color: #ffffff;
}

.danger-button {
  border: 1px solid rgba(255, 90, 102, 0.48);
  background: rgba(255, 90, 102, 0.1);
  color: #ffd2d6;
}

.secondary-button:hover,
.primary-button:hover,
.success-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.error-card {
  min-height: 160px;
  padding: 22px;
  color: var(--danger);
}

.empty-profile-card {
  display: block;
  min-height: 150px;
  padding: 22px;
}

.empty-profile-card h2 {
  margin: 0;
}

.empty-profile-card p {
  color: var(--muted-2);
}

.auth-body {
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(440px, calc(100vw - 28px));
}

.auth-panel,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.auth-panel {
  padding: 24px;
}

.login-heading {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.login-heading img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(239, 35, 48, 0.24));
}

.login-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow,
.detail-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-form,
.user-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.pushover-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}

.pushover-toggle input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--cyan);
}

.pushover-events {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.pushover-events legend {
  padding: 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pushover-events label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.pushover-events input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--cyan);
}

.login-form label,
.login-form span {
  display: grid;
  gap: 7px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  padding: 0 12px;
}

select option {
  background: #121212;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 46px;
  border-radius: 9px;
  box-shadow: 0 16px 34px rgba(239, 35, 48, 0.24);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: #ff9aa0;
  font-size: 0.9rem;
}

.admin-panel {
  margin-top: 28px;
  padding: 18px;
}

.admin-shell {
  padding-top: 36px;
}

.admin-hero {
  max-width: 760px;
  margin-bottom: 22px;
}

.admin-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.admin-hero h1 span {
  color: var(--red);
}

.admin-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  min-width: min(500px, 100%);
  margin: 18px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.admin-tab.active {
  background: rgba(239, 35, 48, 0.16);
  color: #ffffff;
}

.admin-view {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.admin-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, 0.42);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.admin-alert[hidden] {
  display: none;
}

.admin-alert strong {
  color: #ffffff;
}

.admin-alert span {
  color: #fecaca;
  overflow-wrap: anywhere;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.watch-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.07);
}

.watch-panel[hidden] {
  display: none;
}

.watch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watch-panel-header h3 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 0.95rem;
}

.watch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.watch-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  cursor: pointer;
}

.watch-item:hover,
.watch-item:focus-visible {
  border-color: rgba(220, 31, 38, 0.5);
  outline: none;
}

.watch-item strong,
.watch-item span {
  display: inline;
}

.watch-item strong {
  color: #ffffff;
  font-size: 0.8rem;
}

.watch-item span {
  color: #fde68a;
  font-size: 0.78rem;
}

.install-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) minmax(170px, 220px) auto;
  gap: 10px;
  margin-top: 16px;
}

.install-options {
  position: relative;
}

.install-options summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.install-options summary::-webkit-details-marker {
  display: none;
}

.install-options-panel {
  position: absolute;
  right: 0;
  z-index: 15;
  display: grid;
  width: min(520px, calc(100vw - 44px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #151515;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.install-options-panel .secondary-button,
.install-options-panel .primary-button {
  min-height: 42px;
}

.export-button {
  min-width: 150px;
}

.stat-card {
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.stat-card--error {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.1);
}

.stat-card--error strong {
  color: #fca5a5;
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  margin-top: 6px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
}

.profile-breakdown-panel {
  margin-top: 14px;
}

.profile-breakdown-panel summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-count-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-count-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-count-row strong {
  color: #ffffff;
  font-size: 0.86rem;
}

.profile-count-row small {
  color: var(--muted);
  font-size: 0.76rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  vertical-align: middle;
}

.status-badge.success {
  border: 1px solid rgba(0, 168, 126, 0.46);
  background: rgba(0, 168, 126, 0.12);
  color: #4ade80;
}

.status-badge.warning {
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.status-badge.info {
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

.status-badge.error {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.status-badge.stalled {
  border: 1px solid rgba(251, 191, 36, 0.56);
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
}

.status-badge.today {
  border: 1px solid rgba(220, 31, 38, 0.42);
  background: rgba(220, 31, 38, 0.14);
  color: #fecaca;
}

.install-event-row .install-progress {
  color: #cbd5e1;
}

.install-event-row .install-error {
  color: #fca5a5;
}

.admin-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-header h2 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 1.3rem;
}

.user-form {
  grid-template-columns: 1fr 1fr 150px auto;
  margin-top: 16px;
}

.users-list,
.install-events-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.install-events-panel {
  margin-top: 24px;
}

.user-row,
.install-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.install-event-row {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.install-event-row:hover,
.install-event-row:focus-visible {
  border-color: rgba(220, 31, 38, 0.45);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.install-event-row time {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.empty-list {
  margin: 14px 0 0;
  color: var(--muted);
}

.truncation-notice {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  background: color-mix(in srgb, #f59e0b 10%, transparent);
  color: #d97706;
  font-size: 0.85rem;
}

.user-row strong,
.user-row small,
.install-event-row strong,
.install-event-row small {
  display: block;
}

.user-row strong,
.install-event-row strong {
  color: #ffffff;
}

.user-row small,
.install-event-row small {
  margin-top: 4px;
  color: var(--muted);
}

.user-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.user-row button:disabled,
.user-row-actions button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

#passwordResetForm {
  display: contents;
}

#passwordResetForm input {
  width: 100%;
  margin-top: 4px;
}

body.modal-open {
  overflow: hidden;
}

.detail-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.detail-overlay[hidden],
.modal-overlay[hidden] {
  display: none;
}

.install-detail-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(220, 31, 38, 0.36);
  border-radius: 10px;
  background: #12151d;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.install-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.install-detail-header h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 1.25rem;
}

.install-detail-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.install-detail-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.copy-error-button,
.copy-summary-button {
  margin-left: auto;
}

.manual-validate-button {
  min-height: 34px;
}

.delete-install-button {
  min-height: 34px;
}

.copy-error-button + .copy-summary-button,
.copy-summary-button + .copy-error-button {
  margin-left: 0;
}

.install-detail-summary strong {
  color: #ffffff;
}

.install-detail-summary span:not(.status-badge) {
  color: var(--muted);
}

.install-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.timeline-item > span {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 2px solid rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.timeline-item.done > span {
  border-color: #22c55e;
  background: #22c55e;
}

.timeline-item.error > span {
  border-color: #ef4444;
  background: #ef4444;
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item strong {
  color: #ffffff;
  font-size: 0.84rem;
}

.timeline-item small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

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

.computer-history {
  display: grid;
  gap: 10px;
}

.manual-validation-note {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(0, 168, 126, 0.3);
  border-radius: 9px;
  background: rgba(0, 168, 126, 0.08);
}

.manual-validation-note strong {
  color: #ffffff;
}

.manual-validation-note span,
.manual-validation-note p {
  margin: 0;
  color: var(--muted-2);
}

.computer-history-header {
  padding-top: 4px;
}

.computer-history-header strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
}

.computer-history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.history-item.active {
  border-color: rgba(220, 31, 38, 0.5);
  background: rgba(220, 31, 38, 0.1);
}

.history-item:hover,
.history-item:focus-visible {
  border-color: rgba(220, 31, 38, 0.45);
  outline: none;
}

.history-item span,
.history-item strong,
.history-item small {
  overflow-wrap: anywhere;
}

.history-item span,
.history-item small {
  color: var(--muted);
}

.history-item strong {
  color: #ffffff;
}

.install-detail-row {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.install-detail-row.wide {
  grid-column: 1 / -1;
}

.install-detail-row.error {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.08);
}

.install-detail-row span,
.install-detail-row strong {
  display: block;
}

.install-detail-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.install-detail-row strong {
  margin-top: 7px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.install-detail-row--teamviewer {
  border-color: rgba(0, 114, 206, 0.4);
  background: rgba(0, 114, 206, 0.08);
}

.install-detail-row--teamviewer strong {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.teamviewer-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.teamviewer-link:hover {
  text-decoration: underline;
}

.copy-inline-button {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.03em;
}
.copy-inline-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.warning-modal {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 8px;
  background: #14110b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.warning-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #f59e0b;
  color: #171000;
  font-size: 1.8rem;
  font-weight: 900;
}

.warning-modal h2 {
  margin: 4px 0 10px;
  color: #ffffff;
  font-size: 1.35rem;
}

.warning-modal p {
  margin: 0;
  color: #f5dca7;
  line-height: 1.55;
}

.warning-modal strong {
  color: #ffffff;
}

.admin-confirm-modal {
  width: min(520px, 100%);
}

.success-confirm .warning-modal {
  border-color: rgba(0, 168, 126, 0.42);
  background: #0b1712;
}

.success-confirm .warning-mark {
  background: var(--green);
  color: #02130f;
}

.success-confirm .warning-modal p {
  color: #c9f4e8;
}

.danger-confirm .warning-modal {
  border-color: rgba(255, 90, 102, 0.5);
  background: #170b0d;
}

.danger-confirm .warning-mark {
  background: var(--danger);
  color: #200205;
}

.danger-confirm .warning-modal p {
  color: #ffd2d6;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

  .server-pill {
    max-width: 100%;
  }

  .server-pill code {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .shell,
  .header-inner {
    width: min(100vw - 20px, 1180px);
  }

  .shell {
    padding-top: 34px;
  }

  .profile-cards {
    grid-template-columns: 1fr;
  }

  .profile-tools {
    grid-template-columns: 1fr;
  }

  .profile-filter-tabs {
    justify-content: flex-start;
  }

  .profile-card-top,
  .card-actions,
  .user-form,
  .install-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(3, 1fr);
    min-width: 100%;
  }

  .install-toolbar input,
  .install-options {
    grid-column: auto;
  }

  .install-options summary {
    width: 100%;
  }

  .install-options-panel {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .copy-error-button,
  .copy-summary-button,
  .manual-validate-button,
  .delete-install-button {
    width: 100%;
    margin-left: 0;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .workflow-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-strip article:last-child {
    border-bottom: 0;
  }

  .install-detail-grid {
    grid-template-columns: 1fr;
  }

  .install-timeline {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .app-count {
    justify-self: start;
  }

  .hero-stats {
    flex-direction: column;
  }
}
