:root {
  color-scheme: dark;
  --ink: #17120d;
  --ink-soft: #2a2118;
  --paper: #f1e4c8;
  --paper-soft: #d9c7a4;
  --gold: #d2a44d;
  --gold-bright: #f0c66c;
  --copper: #9a5a2e;
  --green: #70a474;
  --red: #c86d5e;
  --blue: #7798b4;
  --line: rgba(239, 207, 146, 0.15);
  --panel: rgba(28, 22, 16, 0.92);
  --panel-light: rgba(51, 40, 29, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background: var(--ink);
}

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

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Oeffentliche Startseite */

.landing-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0d0a07;
}

.landing-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  background: #0d0a07;
}

.landing-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10, 7, 4, 0.72),
      rgba(17, 12, 7, 0.12) 26%,
      rgba(17, 12, 7, 0.12) 74%,
      rgba(10, 7, 4, 0.72)
    ),
    radial-gradient(
      ellipse at center,
      transparent 54%,
      rgba(7, 5, 3, 0.48) 100%
    );
  content: "";
  pointer-events: none;
}

.landing-backdrop {
  position: absolute;
  z-index: -2;
  inset: -2.5rem;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.landing-backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(clamp(1rem, 2.4vw, 2rem)) brightness(0.34) saturate(0.72);
  transform: scale(1.06);
}

.landing-picture {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.landing-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.landing-controls {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top, 0px) + clamp(1rem, 3vw, 2.5rem));
  right: calc(env(safe-area-inset-right, 0px) + clamp(1rem, 3vw, 2.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-end;
}

.landing-status {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0;
  padding: 0.65rem 0.85rem;
  color: #fff4dc;
  background: rgba(24, 18, 11, 0.66);
  border: 1px solid rgba(255, 231, 183, 0.34);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 700;
}

.landing-login {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  color: #1a1208;
  background: linear-gradient(135deg, #f5d488, #c99b45);
  border: 1px solid rgba(255, 242, 208, 0.72);
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.landing-login:hover {
  background: linear-gradient(135deg, #ffe3a4, #d9ac56);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  transform: translateY(-1px);
}

.landing-login:active {
  transform: translateY(0);
}

.landing-status span,
.environment-badge > span:first-child,
.status-pill span {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(240, 198, 108, 0.15);
}

.landing-copyright {
  position: absolute;
  z-index: 2;
  right: calc(env(safe-area-inset-right, 0px) + clamp(0.9rem, 2.4vw, 2rem));
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(0.7rem, 2vw, 1.4rem));
  color: rgba(255, 243, 218, 0.76);
  font-size: 0.72rem;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92);
}

.landing-login:focus-visible,
.admin-page button:focus-visible,
.admin-page a:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

@media (orientation: portrait) {
  .landing-stage::after {
    background:
      linear-gradient(
        180deg,
        rgba(10, 7, 4, 0.66),
        rgba(17, 12, 7, 0.1) 24%,
        rgba(17, 12, 7, 0.1) 76%,
        rgba(10, 7, 4, 0.72)
      ),
      radial-gradient(
        ellipse at center,
        transparent 54%,
        rgba(7, 5, 3, 0.42) 100%
      );
  }
}

/* Admin-Grundstruktur */

.admin-page {
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 8%, rgba(132, 83, 33, 0.2), transparent 32rem),
    #17130f;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 17.5rem minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 100vh;
  height: 100svh;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.1rem;
  background:
    linear-gradient(rgba(20, 16, 12, 0.94), rgba(20, 16, 12, 0.98)),
    url("/assets/images/hope-banner.jpg") center / cover no-repeat;
  border-right: 1px solid var(--line);
}

.sidebar-close,
.menu-scrim {
  display: none;
}

.sidebar-user {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.45rem 0.45rem 1rem;
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  place-items: center;
  color: #2a1b0e;
  background: linear-gradient(145deg, #f4cf82, #a9692f);
  border: 2px solid rgba(255, 231, 181, 0.75);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

.sidebar-user strong,
.sidebar-user span {
  display: block;
}

.sidebar-user strong {
  max-width: 11.5rem;
  overflow: hidden;
  color: #fff3d9;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  margin-top: 0.16rem;
  color: #bba781;
  font-size: 0.7rem;
}

.sidebar-brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin: 1.25rem 0 1rem;
  padding: 0.6rem 0.55rem;
  text-decoration: none;
}

.brand-star {
  color: var(--gold);
  font-size: 1.65rem;
}

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

.sidebar-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
}

.sidebar-brand small {
  margin-top: 0.08rem;
  color: #aa9773;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.main-navigation {
  display: grid;
  gap: 0.35rem;
}

.nav-item {
  display: grid;
  width: 100%;
  min-height: 2.85rem;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  color: #bcae93;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  transition: 150ms ease;
}

.nav-item:hover {
  color: #fff2d8;
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.is-active {
  color: #fff4dc;
  background: linear-gradient(90deg, rgba(174, 111, 46, 0.28), rgba(91, 60, 31, 0.12));
  border-color: rgba(225, 179, 96, 0.25);
}

.nav-icon {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: #d7a851;
  background: rgba(210, 164, 77, 0.08);
  border: 1px solid rgba(210, 164, 77, 0.16);
  border-radius: 0.42rem;
  font-size: 0.7rem;
  font-weight: 900;
}

.nav-tag {
  color: #978667;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logout-form {
  margin-top: auto;
}

.logout-link {
  display: flex;
  width: 100%;
  min-height: 2.8rem;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  color: #c4b394;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.logout-link:hover {
  color: #fff1d5;
}

.admin-workspace {
  min-width: 0;
}

.admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 1rem clamp(1rem, 3vw, 2.2rem) 0;
  background: rgba(23, 19, 15, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-topline {
  display: flex;
  min-height: 3.7rem;
  gap: 1rem;
  align-items: center;
}

.header-topline h1 {
  margin: 0;
  color: #fff1d4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

.header-topline .eyebrow {
  margin-bottom: 0.18rem;
}

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: var(--paper);
  background: var(--panel-light);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  cursor: pointer;
}

.environment-badge {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-left: auto;
  padding: 0.55rem 0.75rem;
  color: #c7b897;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
}

.sub-navigation {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.sub-navigation .subnav-item {
  position: relative;
  display: inline-block;
  padding: 0.65rem 0.85rem 0.8rem;
  color: #95866d;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.sub-navigation .subnav-item.is-active {
  color: #f1dfbd;
}

.sub-navigation .subnav-item.is-active::after {
  position: absolute;
  right: 0.75rem;
  bottom: -1px;
  left: 0.75rem;
  height: 2px;
  content: "";
  background: var(--gold);
  border-radius: 2px;
}

.admin-content {
  width: min(100%, 96rem);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.2rem);
}

.read-only-banner {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  color: #ead9b9;
  background:
    linear-gradient(100deg, rgba(112, 164, 116, 0.13), rgba(210, 164, 77, 0.06)),
    rgba(24, 19, 14, 0.9);
  border: 1px solid rgba(112, 164, 116, 0.35);
  border-radius: 0.75rem;
}

.read-only-banner[hidden] {
  display: none;
}

.read-only-banner > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: #b9d4b9;
  background: rgba(112, 164, 116, 0.12);
  border: 1px solid rgba(112, 164, 116, 0.25);
  border-radius: 50%;
}

.read-only-banner strong {
  color: #f0dfc0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.read-only-banner p {
  margin: 0.2rem 0 0;
  color: #af9f85;
  font-size: 0.68rem;
  line-height: 1.45;
}

.module-section {
  display: none;
}

.module-section.is-active {
  display: block;
  animation: section-in 200ms ease-out;
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.overview-hero {
  position: relative;
  display: grid;
  min-height: 15rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.7fr);
  gap: 2rem;
  align-items: end;
  overflow: hidden;
  padding: clamp(1.3rem, 4vw, 2.6rem);
  background:
    linear-gradient(100deg, rgba(27, 19, 12, 0.97) 18%, rgba(35, 24, 15, 0.76) 58%, rgba(20, 15, 11, 0.48)),
    url("/assets/images/hope-banner.jpg") center / cover no-repeat;
  border: 1px solid rgba(224, 177, 93, 0.25);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.overview-hero h2 {
  max-width: 15ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.overview-hero p:not(.eyebrow) {
  max-width: 54rem;
  margin: 1rem 0 0;
  color: #d0bea0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.hero-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.hero-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 235, 198, 0.15);
}

.hero-facts dt {
  color: #ae9a79;
  font-size: 0.68rem;
}

.hero-facts dd {
  margin: 0;
  color: #ffedca;
  font-size: 0.72rem;
  font-weight: 800;
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin: 2rem 0 1rem;
}

.section-heading h2 {
  margin: 0;
  color: #f6e5c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
}

.section-heading p:not(.eyebrow) {
  max-width: 50rem;
  margin: 0.5rem 0 0;
  color: #aa9b83;
  font-size: 0.78rem;
  line-height: 1.55;
}

.quiet-button {
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  color: #d6c39f;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 750;
}

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

.server-card {
  min-width: 0;
  padding: 1rem;
  background:
    linear-gradient(150deg, rgba(54, 42, 30, 0.76), rgba(32, 25, 19, 0.88));
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.server-card-top {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.9rem;
}

.server-card-top img {
  width: 4.5rem;
  height: 4.5rem;
  border: 2px solid rgba(229, 190, 116, 0.3);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.server-label-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}

.profile-label {
  color: var(--gold-bright);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.status-pill {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  color: #a99c87;
  font-size: 0.59rem;
  font-weight: 750;
}

.status-pill span {
  width: 0.4rem;
  height: 0.4rem;
  background: #827561;
  box-shadow: none;
}

.status-pill[data-state="online"] span {
  background: var(--green);
}

.status-pill[data-state="offline"] span {
  background: var(--red);
}

.server-card h3 {
  margin: 0.45rem 0 0;
  color: #f6e7ca;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 600;
}

.server-card-top p {
  min-height: 2.1rem;
  margin: 0.3rem 0 0;
  color: #9f9079;
  font-size: 0.64rem;
  line-height: 1.4;
}

.server-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 0;
  border-block: 1px solid var(--line);
}

.server-facts div {
  padding: 0.7rem 0;
}

.server-facts div + div {
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
}

.server-facts dt {
  color: #aa9a80;
  font-size: 0.58rem;
}

.server-facts dd {
  margin: 0.18rem 0 0;
  color: #e5d3b3;
  font-size: 0.7rem;
  font-weight: 800;
}

.server-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.server-actions button {
  min-height: 2.3rem;
  padding: 0.4rem;
  color: #cbb895;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(238, 205, 146, 0.13);
  border-radius: 0.45rem;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.15;
}

.server-actions button:last-child {
  grid-column: 1 / -1;
}

.server-actions button:hover:not(:disabled) {
  color: white;
  border-color: rgba(238, 205, 146, 0.35);
}

.server-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.server-actions button.primary-action {
  color: #261a0d;
  background: linear-gradient(135deg, #ddb158, #b67b33);
  border-color: #efc66f;
}

.server-actions button.is-armed {
  color: white;
  background: #8f4537;
  border-color: #e38b78;
  animation: armed-pulse 1.2s ease-in-out infinite alternate;
}

.action-note {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  color: #b4a487;
  font-size: 0.6rem;
  line-height: 1.45;
  text-align: center;
}

@keyframes armed-pulse {
  to {
    box-shadow: 0 0 0 4px rgba(200, 109, 94, 0.12);
  }
}

.txadmin-link {
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  color: #d8c6a5;
  background: rgba(10, 8, 6, 0.22);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: none;
}

.read-only-note {
  margin: 0 0 0.75rem;
  padding: 0.65rem;
  color: #9f917b;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.5rem;
  font-size: 0.62rem;
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 32rem;
  place-items: center;
  align-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  color: #f3dfbb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 500;
}

.empty-state > p:not(.eyebrow) {
  max-width: 42rem;
  color: #a99a81;
  line-height: 1.7;
}

.empty-monogram {
  display: grid;
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 1.2rem;
  place-items: center;
  color: var(--gold-bright);
  background: radial-gradient(circle, rgba(176, 112, 47, 0.2), rgba(176, 112, 47, 0.04));
  border: 1px solid rgba(224, 177, 93, 0.25);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.contract-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.8rem;
}

.contract-list span {
  padding: 0.45rem 0.65rem;
  color: #c5b18e;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

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

.guardrail-grid article {
  padding: 1.3rem;
  background: var(--panel-light);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.guardrail-grid article > span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.guardrail-grid h3 {
  margin: 1.5rem 0 0.45rem;
  color: #f2dfbd;
  font-size: 0.9rem;
}

.guardrail-grid p {
  margin: 0;
  color: #9f927e;
  font-size: 0.72rem;
  line-height: 1.6;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.role-strip article {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.role-strip article.is-current {
  background: rgba(181, 119, 49, 0.12);
  border-color: rgba(232, 186, 104, 0.32);
}

.role-strip strong,
.role-strip span {
  display: block;
}

.role-strip strong {
  color: #efdcb9;
  font-size: 0.76rem;
}

.role-strip span {
  margin-top: 0.25rem;
  color: #958771;
  font-size: 0.62rem;
}

.audit-list {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.audit-event {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
}

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

.audit-sequence {
  color: #8e7c60;
  font-size: 0.62rem;
  font-weight: 800;
}

.audit-event strong {
  color: #e3d0ad;
  font-size: 0.7rem;
}

.audit-event p,
.audit-event time {
  color: #91836f;
  font-size: 0.6rem;
}

.audit-event p {
  margin: 0.2rem 0 0;
}

.empty-copy {
  margin: 0;
  padding: 2rem;
  color: #8e816c;
  font-size: 0.72rem;
  text-align: center;
}

.initialization-error {
  max-width: 42rem;
  margin: 8vh auto 0;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  color: #d9c7a8;
  background: rgba(58, 35, 28, 0.72);
  border: 1px solid rgba(205, 112, 91, 0.55);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.initialization-error > span {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  margin-bottom: 1rem;
  color: #2d1813;
  background: #dc8c76;
  border-radius: 50%;
  font-weight: 900;
}

.initialization-error h2 {
  margin: 0 0 0.75rem;
  color: #fff0d4;
  font-family: Georgia, "Times New Roman", serif;
}

.initialization-error .quiet-button {
  margin-top: 0.75rem;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  max-width: min(25rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  color: #f5e6c8;
  background: #332719;
  border: 1px solid rgba(231, 190, 115, 0.35);
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: 160ms ease;
  font-size: 0.72rem;
  line-height: 1.45;
}

.toast-region.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-region[data-tone="error"] {
  background: #4b2923;
  border-color: #b85f50;
}

.toast-region[data-tone="success"] {
  background: #223a27;
  border-color: #5b9465;
}

/* Platzhalter- und Rechteseiten */

.legal-page,
.construction-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(rgba(22, 16, 10, 0.84), rgba(22, 16, 10, 0.92)),
    url("/assets/images/hope-banner.jpg") center / cover no-repeat;
}

.legal-card {
  width: min(42rem, 100%);
  padding: clamp(1.3rem, 4vw, 2.5rem);
  background: rgba(28, 21, 15, 0.94);
  border: 1px solid rgba(231, 190, 115, 0.28);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.legal-card h1,
.construction-page h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
}

.legal-card p {
  color: #c9b797;
  line-height: 1.7;
}

.legal-warning {
  padding: 0.8rem;
  color: #f0d5a6 !important;
  background: rgba(181, 119, 49, 0.12);
  border-left: 3px solid var(--gold);
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: #dcb66b;
  font-size: 0.75rem;
  text-decoration: none;
}

.construction-page main {
  text-align: center;
}

.construction-page main > span {
  color: var(--gold);
  font-size: 2.5rem;
}

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

  .server-card {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(16rem, 0.8fr);
    gap: 0 1rem;
  }

  .server-card .server-facts,
  .server-card .server-actions,
  .server-card .read-only-note,
  .server-card .txadmin-link {
    grid-column: 2;
  }

  .server-card-top {
    grid-row: 1 / span 4;
  }
}

@media (max-width: 880px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    width: min(18rem, 88vw);
    transform: translateX(-104%);
    transition: transform 190ms ease;
  }

  .sidebar-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    color: #e9d7b7;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    cursor: pointer;
    font-size: 1.25rem;
  }

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

  .menu-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.58);
    border: 0;
  }

  .menu-open .menu-scrim {
    display: block;
  }

  .menu-button {
    display: grid;
  }

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

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

  .hero-facts div {
    display: block;
  }

  .hero-facts dd {
    margin-top: 0.25rem;
  }
}

@media (max-width: 650px) {
  .landing-controls {
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    right: calc(env(safe-area-inset-right, 0px) + 0.75rem);
    gap: 0.5rem;
  }

  .landing-login {
    min-height: 44px;
    padding-inline: 0.85rem;
    font-size: 0.76rem;
  }

  .environment-badge {
    max-width: 7.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.58rem;
    line-height: 1.2;
    text-align: right;
  }

  .environment-badge > span:first-child {
    flex: 0 0 auto;
  }

  .admin-header {
    padding-inline: 0.8rem;
  }

  .admin-content {
    padding: 0.8rem;
  }

  .overview-hero {
    min-height: 23rem;
    padding: 1.2rem;
    background-position: 58% center;
  }

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

  .hero-facts div {
    display: flex;
  }

  .server-card {
    display: block;
  }

  .server-card .server-facts,
  .server-card .server-actions,
  .server-card .read-only-note,
  .server-card .txadmin-link {
    grid-column: auto;
  }

  .server-card-top {
    grid-template-columns: 3.8rem minmax(0, 1fr);
  }

  .server-card-top img {
    width: 3.8rem;
    height: 3.8rem;
  }

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

  .guardrail-grid,
  .role-strip {
    grid-template-columns: 1fr;
  }

  .audit-event {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .audit-event time {
    grid-column: 2;
    justify-self: start;
  }
}

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