:root {
  color-scheme: light dark;
  --background: #f7f7f7;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-muted: #f2f2f2;
  --text: #111114;
  --text-secondary: #62626a;
  --separator: rgba(60, 60, 67, 0.16);
  --separator-strong: rgba(60, 60, 67, 0.28);
  --accent: #111111;
  --accent-pressed: #333333;
  --accent-soft: rgba(17, 17, 17, 0.07);
  --accent-contrast: #ffffff;
  --success: #248a3d;
  --success-soft: rgba(36, 138, 61, 0.12);
  --warning: #a45d00;
  --warning-soft: rgba(255, 149, 0, 0.14);
  --danger: #d70015;
  --danger-soft: rgba(215, 0, 21, 0.11);
  --purple: #111111;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  --top-safe: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --left-safe: env(safe-area-inset-left, 0px);
  --right-safe: env(safe-area-inset-right, 0px);
  --content-width: 560px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #000000;
  --surface: #1c1c1e;
  --surface-elevated: #252527;
  --surface-muted: #2c2c2e;
  --text: #f5f5f7;
  --text-secondary: #a6a6ad;
  --separator: rgba(235, 235, 245, 0.16);
  --separator-strong: rgba(235, 235, 245, 0.28);
  --accent: #f5f5f7;
  --accent-pressed: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --accent-contrast: #111111;
  --success: #32d74b;
  --success-soft: rgba(50, 215, 75, 0.16);
  --warning: #ffb340;
  --warning-soft: rgba(255, 179, 64, 0.16);
  --danger: #ff453a;
  --danger-soft: rgba(255, 69, 58, 0.16);
  --purple: #f5f5f7;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #000000;
    --surface: #1c1c1e;
    --surface-elevated: #252527;
    --surface-muted: #2c2c2e;
    --text: #f5f5f7;
    --text-secondary: #a6a6ad;
    --separator: rgba(235, 235, 245, 0.16);
    --separator-strong: rgba(235, 235, 245, 0.28);
    --accent: #f5f5f7;
    --accent-pressed: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.1);
    --accent-contrast: #111111;
    --success: #32d74b;
    --success-soft: rgba(50, 215, 75, 0.16);
    --warning: #ffb340;
    --warning-soft: rgba(255, 179, 64, 0.16);
    --danger: #ff453a;
    --danger-soft: rgba(255, 69, 58, 0.16);
    --purple: #f5f5f7;
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

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

button,
a,
summary,
select {
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 9vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1rem;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: max(8px, var(--top-safe));
  left: max(8px, var(--left-safe));
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

#page-content:focus {
  outline: none;
}

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

.eyebrow,
.section-kicker {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.connection-banner {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  min-height: calc(34px + var(--top-safe));
  padding: calc(8px + var(--top-safe)) max(16px, var(--right-safe)) 8px max(16px, var(--left-safe));
  background: var(--warning);
  color: #17130b;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.connection-banner:not([hidden]) ~ #primary-content .top-bar {
  padding-top: 34px;
}

.auth-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: max(32px, calc(var(--top-safe) + 20px)) max(20px, var(--right-safe)) max(32px, calc(var(--bottom-safe) + 20px)) max(20px, var(--left-safe));
  background: var(--background);
}

.auth-card {
  width: min(100%, 390px);
  padding: 28px 22px 22px;
  border: 0;
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-icon {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 0;
  box-shadow: none;
}

.auth-card .eyebrow {
  margin-bottom: 7px;
}

.auth-copy {
  max-width: 300px;
  margin: 12px auto 24px;
  color: var(--text-secondary);
}

.login-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

.login-form label {
  padding-left: 4px;
  font-size: 0.84rem;
  font-weight: 650;
}

input,
select {
  min-height: 44px;
  border: 1px solid var(--separator-strong);
  border-radius: 12px;
  background: var(--surface-muted);
}

input {
  width: 100%;
  padding: 10px 12px;
}

input::placeholder {
  color: var(--text-secondary);
  opacity: 0.82;
}

.form-message {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.82rem;
}

.privacy-note {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  line-height: 1.45;
}

.button,
.icon-button,
.text-button,
.section-link,
.tab-bar a,
.segmented-control button,
.alert-row,
.resource-link,
.project-card summary {
  min-height: 44px;
}

.icon-button,
.text-button,
.section-link,
.tab-bar a,
.segmented-control button,
.alert-row,
.resource-link,
.project-card summary {
  transition: transform 90ms ease, background-color 120ms ease, opacity 120ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: transform 90ms ease, background-color 120ms ease, opacity 120ms ease;
}

.button:active:not(:disabled):not([aria-disabled="true"]),
.icon-button:active:not(:disabled),
.text-button:active:not(:disabled),
.section-link:active,
.segmented-control button:active:not(:disabled),
.alert-row:active,
.tab-bar a:active,
.resource-link:active,
.project-card summary:active {
  transform: scale(0.98);
  opacity: 0.78;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button-primary:active:not(:disabled) {
  background: var(--accent-pressed);
}

.button-secondary {
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

.button-danger {
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.button-block {
  width: 100%;
}

.button-compact {
  flex: 0 0 auto;
  min-width: 92px;
}

.button-external {
  width: 100%;
}

.button-external .icon {
  width: 18px;
  height: 18px;
}

.button:disabled,
.button[aria-disabled="true"],
.icon-button:disabled {
  cursor: default;
  opacity: 0.46;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .spinner {
  display: block;
}

.is-loading.button .button-label {
  opacity: 0.88;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.top-bar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: saturate(175%) blur(20px);
  -webkit-backdrop-filter: saturate(175%) blur(20px);
}

.top-bar-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: min(100%, var(--content-width));
  min-height: calc(86px + var(--top-safe));
  margin: 0 auto;
  padding: calc(16px + var(--top-safe)) max(16px, var(--right-safe)) 12px max(16px, var(--left-safe));
}

.top-bar .eyebrow {
  margin-bottom: 4px;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
  transition: transform 90ms ease, opacity 120ms ease, background-color 120ms ease;
}

.icon-button:hover {
  background: var(--surface-elevated);
}

.refresh-icon {
  width: 21px;
  height: 21px;
}

#refresh-button.is-loading .refresh-icon {
  animation: spin 800ms linear infinite;
}

.global-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(calc(100% - 32px), calc(var(--content-width) - 32px));
  margin: 10px auto 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 24%, transparent);
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--text);
  font-size: 0.8rem;
}

.text-button {
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.page-content {
  width: min(100%, var(--content-width));
  min-height: 60vh;
  margin: 0 auto;
  padding: 12px max(16px, var(--right-safe)) calc(88px + var(--bottom-safe)) max(16px, var(--left-safe));
}

.page {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
}

.server-hero {
  position: relative;
  display: grid;
  gap: 17px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--separator);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
}

.server-hero-heading,
.card-heading,
.section-heading,
.settings-card-action,
.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.server-hero-heading {
  align-items: flex-start;
}

.server-mark {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  background: transparent;
  color: var(--text);
}

.server-mark .icon {
  width: 38px;
  height: 38px;
  stroke-width: 2.15;
}

.server-hero h2 {
  max-width: 240px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 720;
}

.status-symbol {
  display: inline-grid;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.68rem;
  line-height: 1;
  place-items: center;
}

.status-healthy {
  background: var(--success-soft);
  color: var(--success);
}

.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-unknown {
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.updated-label,
.card-hint,
.list-summary,
.page-intro,
.sheet-note,
.version-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.section-heading {
  min-height: 34px;
  margin-bottom: 9px;
}

.section-heading h2 {
  font-size: 1rem;
}

.availability-label {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 650;
}

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

.metric-card {
  display: flex;
  min-width: 0;
  min-height: 142px;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: var(--surface);
}

.metric-card-compact {
  min-height: 116px;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 4px;
  font-size: clamp(1.42rem, 7vw, 1.72rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.metric-value-small {
  font-size: clamp(1.14rem, 5.7vw, 1.45rem);
}

.sparkline {
  width: 100%;
  height: 42px;
  margin-top: auto;
  color: var(--accent);
  overflow: visible;
}

.sparkline-purple {
  color: var(--purple);
}

.sparkline .sparkline-area {
  fill: currentColor;
  opacity: 0.11;
  stroke: none;
}

.sparkline .sparkline-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.metric-description {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-progress {
  width: 100%;
  height: 6px;
  margin-top: auto;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: var(--surface-muted);
  color: var(--accent);
  appearance: none;
  -webkit-appearance: none;
}

.metric-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--surface-muted);
}

.metric-progress::-webkit-progress-value {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: background-color 150ms ease;
}

.metric-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

.metric-progress.is-warning { color: var(--warning); }
.metric-progress.is-critical { color: var(--danger); }
.metric-progress.is-warning::-webkit-progress-value { background: var(--warning); }
.metric-progress.is-critical::-webkit-progress-value { background: var(--danger); }
.metric-progress.is-warning::-moz-progress-bar { background: var(--warning); }
.metric-progress.is-critical::-moz-progress-bar { background: var(--danger); }

.group-card,
.install-card {
  padding: 16px;
  border: 1px solid var(--separator);
  border-radius: 18px;
  background: var(--surface);
}

.card-heading {
  align-items: flex-start;
}

.card-heading h2 {
  margin-top: 3px;
}

.compact-status {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.coolify-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0;
  border-top: 1px solid var(--separator);
  border-bottom: 1px solid var(--separator);
}

.coolify-stats div {
  display: grid;
  gap: 2px;
  padding: 12px 8px;
  text-align: center;
}

.coolify-stats div + div {
  border-left: 1px solid var(--separator);
}

.coolify-stats strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.coolify-stats span {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.coolify-projects {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

.projects-heading {
  margin-bottom: 0;
}

.projects-heading h3 {
  font-size: 0.95rem;
}

.projects-heading .list-summary {
  text-align: right;
}

.card-hint {
  margin-top: 9px;
  text-align: center;
}

.section-link {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.stack-list,
.alerts-list,
.projects-list {
  display: grid;
  gap: 9px;
}

.empty-state {
  display: grid;
  min-height: 112px;
  gap: 5px;
  padding: 20px;
  border: 1px dashed var(--separator-strong);
  border-radius: 16px;
  place-content: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-secondary);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 0.92rem;
}

.empty-state p {
  font-size: 0.76rem;
}

.alert-row {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: transform 90ms ease, background-color 120ms ease;
}

.alert-row:hover {
  background: var(--surface-elevated);
}

.alert-indicator,
.resource-indicator {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  place-items: center;
}

.alert-copy,
.resource-copy {
  min-width: 0;
}

.alert-copy strong,
.resource-copy strong {
  display: block;
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-copy span,
.resource-copy span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.install-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: var(--surface);
}

.install-card .button {
  grid-column: 1 / -1;
}

.install-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 1.5rem;
}

.install-card h2 {
  font-size: 0.98rem;
}

.install-card p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.page-intro {
  padding: 4px 2px 0;
  font-size: 0.86rem;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-field input {
  padding-left: 38px;
  border-color: transparent;
  background: var(--surface);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-muted);
}

.segmented-control button {
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 680;
}

.segmented-control button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.11);
  color: var(--text);
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: var(--surface);
}

.project-card summary {
  display: grid;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.project-card summary::-webkit-details-marker {
  display: none;
}

.project-card[open] summary {
  border-bottom: 1px solid var(--separator);
}

.project-status-dot,
.resource-status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}

.project-summary-copy {
  min-width: 0;
}

.project-summary-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-summary-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.71rem;
}

.disclosure-chevron {
  color: var(--text-secondary);
  transition: transform 160ms ease;
}

.project-card[open] .disclosure-chevron {
  transform: rotate(90deg);
}

.environment-list {
  display: grid;
  gap: 15px;
  padding: 13px;
}

.environment h3 {
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.resource-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--separator);
}

.resource-row {
  display: grid;
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: var(--surface-muted);
}

.resource-status-dot {
  width: 8px;
  height: 8px;
  border: 0;
  box-shadow: none;
}

.resource-state {
  color: var(--text-secondary);
  font-size: 0.68rem;
  text-align: right;
}

.resource-trailing {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.resource-link {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  place-items: center;
  text-decoration: none;
}

.resource-link .icon {
  width: 17px;
  height: 17px;
}

.settings-group {
  display: grid;
  gap: 7px;
}

.settings-title {
  padding-left: 13px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.settings-card {
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 15px;
  background: var(--surface);
}

.settings-row {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--separator);
}

.settings-value {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-align: right;
}

.settings-card-action {
  min-height: 76px;
  padding: 12px 13px;
}

.settings-card-action strong {
  font-size: 0.9rem;
}

.settings-card-action p {
  max-width: 220px;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.settings-row select {
  max-width: 150px;
  padding: 7px 30px 7px 10px;
  border: 0;
  background-color: var(--surface-muted);
  font-size: 0.82rem;
}

.version-label {
  text-align: center;
}

.tab-bar {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--separator);
  background: color-mix(in srgb, var(--surface) 87%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.tab-bar-inner {
  display: grid;
  width: min(100%, var(--content-width));
  min-height: calc(52px + var(--bottom-safe));
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  padding: 3px max(6px, var(--right-safe)) var(--bottom-safe) max(6px, var(--left-safe));
}

.tab-bar a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 2px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.63rem;
  font-weight: 590;
  text-decoration: none;
  transition: transform 90ms ease, color 120ms ease, background-color 120ms ease;
}

.tab-bar a[aria-current="page"] {
  color: var(--accent);
}

.tab-bar a:hover {
  background: var(--accent-soft);
}

.tab-bar .icon {
  width: 23px;
  height: 23px;
}

.tab-icon-wrap {
  position: relative;
}

.tab-badge {
  position: absolute;
  top: -5px;
  right: -9px;
  display: grid;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  place-items: center;
  background: var(--danger);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
}

.sheet-dialog {
  width: min(calc(100% - 18px), 520px);
  max-height: min(82vh, 680px);
  margin: auto auto max(8px, var(--bottom-safe));
  padding: 10px 18px calc(18px + var(--bottom-safe));
  overflow: auto;
  border: 1px solid var(--separator);
  border-radius: 22px;
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sheet-handle {
  width: 38px;
  height: 5px;
  margin: 0 auto 13px;
  border-radius: 99px;
  background: var(--separator-strong);
}

.sheet-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.sheet-heading h2 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.close-button {
  flex: 0 0 auto;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 1.55rem;
  line-height: 1;
}

.install-steps {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  min-height: 52px;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 13px;
  background: var(--surface-muted);
}

.install-steps li > span {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.82rem;
  font-weight: 800;
}

.install-steps p {
  font-size: 0.85rem;
}

.sheet-note {
  margin: 15px 2px;
  line-height: 1.45;
}

.alert-dialog-message {
  margin-top: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  z-index: 120;
  right: max(16px, var(--right-safe));
  bottom: calc(70px + var(--bottom-safe));
  left: max(16px, var(--left-safe));
  width: fit-content;
  max-width: min(calc(100% - 32px), 420px);
  min-height: 44px;
  margin: 0 auto;
  padding: 11px 15px;
  border: 1px solid var(--separator-strong);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-elevated) 94%, transparent);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 630;
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-loading .metric-value,
.dashboard-loading #server-name,
.dashboard-loading .coolify-stats strong {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-muted), var(--separator), var(--surface-muted));
  background-size: 200% 100%;
  animation: shimmer 1.25s linear infinite;
}

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

.state-healthy { color: var(--success); }
.state-warning { color: var(--warning); }
.state-critical { color: var(--danger); }
.state-unknown { color: var(--text-secondary); }

@media (max-width: 350px) {
  .page-content {
    padding-right: max(12px, var(--right-safe));
    padding-left: max(12px, var(--left-safe));
  }

  .metric-card {
    padding: 11px;
  }

  .settings-card-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-card-action .button {
    width: 100%;
  }
}

@media (min-width: 600px) {
  .page-content {
    padding-top: 18px;
  }

  .sheet-dialog {
    margin-bottom: auto;
  }
}

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

  .button:active:not(:disabled),
  .icon-button:active:not(:disabled),
  .text-button:active:not(:disabled),
  .section-link:active,
  .segmented-control button:active:not(:disabled),
  .alert-row:active,
  .tab-bar a:active,
  .resource-link:active,
  .project-card summary:active {
    transform: none;
  }
}

@media (forced-colors: active) {
  .status-symbol,
  .project-status-dot,
  .resource-status-dot,
  .metric-progress {
    forced-color-adjust: none;
  }

  .button,
  .metric-card,
  .group-card,
  .settings-card,
  .alert-row,
  .project-card {
    border: 1px solid CanvasText;
  }
}
