:root {
  --evasys-teal: #087f78;
  --evasys-teal-dark: #056a65;
  --evasys-teal-deep: #075b59;
  --evasys-teal-soft: #e9f5f3;
  --evasys-teal-soft-2: #f3faf9;
  --evasys-ink: #25343a;
  --evasys-text: #34464d;
  --evasys-muted: #6c7d83;
  --evasys-border: #dbe5e7;
  --evasys-surface: #ffffff;
  --evasys-bg: #f5f8f8;
  --evasys-table-head: #f0f6f5;
  --shadow-sm: 0 1px 2px rgba(28, 55, 61, .04), 0 5px 18px rgba(28, 55, 61, .05);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--evasys-text);
  background: var(--evasys-bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--evasys-bg); }
body { margin: 0; min-height: 100%; background: var(--evasys-bg); color: var(--evasys-text); }
a { color: var(--evasys-teal); }

.topbar {
  min-height: 76px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #fff;
  border-bottom: 1px solid var(--evasys-border);
  box-shadow: 0 2px 12px rgba(18, 63, 67, .04);
}

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

.brand-logo {
  display: block;
  width: 150px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-subtitle {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding-left: 17px;
  border-left: 1px solid var(--evasys-border);
  color: var(--evasys-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: #42555c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.topbar nav a:hover { background: var(--evasys-teal-soft); color: var(--evasys-teal-dark); }
.topbar nav a.logout-link { color: #6c7478; }

.container { max-width: 1520px; margin: 0 auto; padding: 34px 28px 64px; }
.heading-row, .panel-title, .button-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-kicker { margin: 0 0 5px; color: var(--evasys-teal); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0 0 8px; color: var(--evasys-ink); font-size: 30px; line-height: 1.2; letter-spacing: -.45px; }
h2 { margin: 0; color: var(--evasys-ink); font-size: 19px; line-height: 1.3; }
p { line-height: 1.55; }
.muted, small { color: var(--evasys-muted); }

.stats { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; margin: 24px 0; }
.stat, .panel, .login-card {
  background: var(--evasys-surface);
  border: 1px solid var(--evasys-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.stat { position: relative; min-height: 116px; padding: 19px 20px 18px; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #bdc9cc; }
.stat span { display: block; color: var(--evasys-muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; margin-top: 7px; color: var(--evasys-ink); font-size: 30px; line-height: 1.1; }
.stat.total::before { background: var(--evasys-teal); }
.stat.current::before { background: #4c956c; }
.stat.outdated::before { background: #d49a36; }
.stat.unknown::before { background: #819096; }
.stat.offline::before { background: #c85b5b; }
.stat.total { background: linear-gradient(135deg, #fff 0%, var(--evasys-teal-soft-2) 100%); }
.stat-link { color: inherit; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(28, 70, 72, .12); border-color: #b8d7d3; text-decoration: none; }
.stat-link:focus-visible { outline: 3px solid rgba(8, 127, 120, .22); outline-offset: 2px; }
.stat-link.active { border-color: var(--evasys-teal); box-shadow: 0 0 0 2px rgba(8, 127, 120, .10), var(--shadow-sm); }

.panel { margin: 20px 0; padding: 20px; }
.panel-title { padding-bottom: 2px; }
.panel-title a { font-size: 14px; font-weight: 700; text-decoration: none; }
.panel-title a:hover { text-decoration: underline; }
.release-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.release-grid > div {
  position: relative;
  padding: 16px 17px;
  background: var(--evasys-teal-soft-2);
  border: 1px solid #dcecea;
  border-radius: 10px;
}
.release-grid > div::after { content: ""; position: absolute; right: 14px; top: 14px; width: 8px; height: 8px; border-radius: 999px; background: var(--evasys-teal); opacity: .8; }
.release-grid strong, .release-grid span, .release-grid small { display: block; }
.release-grid strong { color: var(--evasys-teal-dark); font-size: 14px; }
.release-grid span { margin: 7px 0 4px; color: var(--evasys-ink); font-size: 18px; font-weight: 650; }

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0 14px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--evasys-border);
  border-radius: 11px;
}
.filters .push { margin-left: auto; }

input, select, button, .button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cbd9dc;
  border-radius: 8px;
  background: #fff;
  color: var(--evasys-text);
  font: inherit;
}
input, select { min-width: 170px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus { border-color: var(--evasys-teal); box-shadow: 0 0 0 3px rgba(8, 127, 120, .12); }
button, .button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 650;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
button:hover, .button:hover { background: #f1f6f6; border-color: #aec5c8; }
button:active, .button:active { transform: translateY(1px); }
.primary { background: var(--evasys-teal); border-color: var(--evasys-teal); color: #fff; }
.primary:hover { background: var(--evasys-teal-dark); border-color: var(--evasys-teal-dark); }
.secondary { background: #fff; color: #3e555c; }
.danger { background: #a94444; color: #fff; border-color: #a94444; }
.danger:hover { background: #913838; border-color: #913838; }

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--evasys-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
table { border-collapse: collapse; width: 100%; min-width: 1050px; }
th, td { text-align: left; padding: 14px 13px; border-bottom: 1px solid #e6edef; vertical-align: top; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--evasys-table-head);
  color: #53666c;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: #fbfdfd; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--evasys-ink); }
td small { display: block; margin-top: 5px; max-width: 380px; line-height: 1.4; }

.url { word-break: break-all; }
.instance-url-link { color: var(--evasys-teal); text-decoration: none; }
.instance-url-link:hover { color: var(--evasys-teal-dark); text-decoration: underline; }
.instance-url-link:focus-visible { outline: 2px solid rgba(8, 127, 120, .28); outline-offset: 2px; border-radius: 2px; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.actions form { margin: 0; }
.actions button, .actions .button { min-height: 36px; padding: 7px 10px; font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; background: #eef2f3; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; opacity: .72; }
.badge.current { background: #e4f4e9; color: #2e6e46; }
.badge.outdated { background: #fff2dc; color: #8a5d17; }
.badge.ahead { background: var(--evasys-teal-soft); color: var(--evasys-teal-dark); }
.badge.offline, .badge.error { background: #fbe8e8; color: #993e3e; }
.badge.unknown, .badge.no_target { background: #eef2f3; color: #66777d; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; color: #3b5158; font-size: 14px; font-weight: 650; }
.form-grid input, .form-grid select { width: 100%; }
.form-grid .wide, .settings-grid .wide { grid-column: 1 / -1; }
.check { flex-direction: row !important; align-items: center; min-height: 42px; }
.check input { width: auto; min-width: 0; accent-color: var(--evasys-teal); }
.settings-grid { display: grid; grid-template-columns: 180px 180px 1fr; gap: 12px; align-items: center; }
.settings-head { color: #5a6b71; font-size: 12px; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }

.login-card { max-width: 440px; margin: 64px auto; padding: 28px; }
.login-card::before { content: "evasys"; display: block; margin-bottom: 20px; color: var(--evasys-teal); font-size: 25px; font-weight: 750; letter-spacing: -.7px; }
.login-card h1 { font-size: 26px; }

.flash { margin-bottom: 16px; padding: 13px 15px; border: 1px solid #dbe5e7; border-radius: 9px; background: #eef4f5; }
.flash.success { background: #e7f5eb; border-color: #cde7d5; color: #2e6541; }
.flash.error { background: #fbeaea; border-color: #efcccc; color: #873737; }
.danger-zone { margin-top: 20px; }
.note { max-width: 900px; line-height: 1.55; }
.empty { padding: 34px; color: var(--evasys-muted); text-align: center; }

.footer { max-width: 1520px; margin: -34px auto 0; padding: 0 28px 28px; color: #87969b; font-size: 12px; }
.footer-inner { padding-top: 14px; border-top: 1px solid #e1e9ea; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .release-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-head { display: none; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 17px 20px; }
  .filters .push { margin-left: 0; }
}

@media (max-width: 560px) {
  .container { padding: 24px 12px 52px; }
  .footer { padding: 0 12px 22px; }
  .stats { grid-template-columns: 1fr; }
  .topbar nav { gap: 3px; }
  .topbar nav a { padding: 7px 9px; }
  .brand-logo { width: 132px; height: auto; }
  .brand-subtitle { min-height: 26px; padding-left: 12px; font-size: 13px; white-space: normal; }
  .filters > * { width: 100%; }
  input, select { min-width: 0; }
  .login-card { margin: 32px 0; padding: 22px; }
}

/* Hosting hierarchy */
.compact { margin: 5px 0 0; }
code { padding: 2px 5px; border-radius: 5px; background: #edf3f3; color: var(--evasys-teal-dark); }
.table-link { color: var(--evasys-teal-dark); font-weight: 700; text-decoration: none; }
.table-link:hover { text-decoration: underline; }

.hosting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.hosting-list-grid { margin-top: 26px; grid-template-columns: repeat(3, minmax(260px, 1fr)); }
.hosting-card {
  display: block;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--evasys-border);
  border-radius: 11px;
  background: #fff;
  color: var(--evasys-text);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}
a.hosting-card:hover { border-color: #a8c9c6; background: #fbfefe; transform: translateY(-1px); }
.static-card { box-shadow: var(--shadow-sm); }
.hosting-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hosting-card h3 { margin: 7px 0 0; color: var(--evasys-ink); font-size: 18px; line-height: 1.25; }
.hosting-total { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--evasys-teal-soft-2); color: var(--evasys-teal-dark); font-size: 19px; }
.type-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.type-badge.tms { background: var(--evasys-teal-soft); color: var(--evasys-teal-dark); }
.type-badge.managed { background: #eef2f3; color: #5a6a70; }
.hosting-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 15px; }
.hosting-metrics span { min-width: 0; padding: 8px 7px; border-radius: 8px; background: #f6f9f9; color: var(--evasys-muted); font-size: 11px; text-align: center; }
.hosting-metrics b { display: block; margin-bottom: 1px; color: var(--evasys-ink); font-size: 16px; }
.group-warning, .group-version, .group-ok { margin-top: 12px; padding: 9px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.group-warning { background: #fff2dc; border: 1px solid #efd6aa; color: #805719; font-weight: 700; }
.group-warning.prominent { padding: 12px 13px; font-size: 13px; }
.group-version { background: #f3f7f7; color: #65757b; }
.group-ok { background: #e5f4ea; border: 1px solid #cfe6d7; color: #346d49; font-weight: 650; }
.hosting-empty { grid-column: 1 / -1; }
.card-actions { margin-top: 15px; justify-content: flex-start; }
.group-stats { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.section-heading { margin: 28px 0 13px; }
.tms-overview { border-left: 4px solid var(--evasys-teal); }

.bulk-table-wrap { overflow-x: auto; margin-top: 15px; border: 1px solid var(--evasys-border); border-radius: 10px; }
.bulk-table { min-width: 820px; }
.bulk-table input { width: 100%; min-width: 130px; }
.bulk-table td, .bulk-table th { padding: 9px; }
.bulk-table .generated-url { min-width: 250px; max-width: 360px; word-break: break-all; vertical-align: middle; }
.icon-button { width: 38px; min-width: 38px; padding: 0; font-size: 20px; line-height: 1; }
.bulk-auth { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; align-items: end; }
.bulk-auth label { display: flex; flex-direction: column; gap: 6px; color: #3b5158; font-size: 13px; font-weight: 650; }
.bulk-auth input, .bulk-auth select { width: 100%; }
.bulk-auth .check { flex-direction: row; }
.bulk-actions { margin-top: 14px; justify-content: flex-start; }
.disabled-row { opacity: .58; }
#path-label { opacity: .72; }
#path-label.tms-active { opacity: 1; }

@media (max-width: 1180px) {
  .hosting-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .hosting-list-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .bulk-auth { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 700px) {
  .hosting-grid, .hosting-list-grid { grid-template-columns: 1fr; }
  .hosting-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bulk-auth { grid-template-columns: 1fr; }
  .group-stats { grid-template-columns: 1fr 1fr; }
}

/* TMS Server_path import */
.import-panel { border-left: 4px solid var(--evasys-teal); }
.import-example { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.import-example > div { min-width: 0; padding: 13px; border: 1px solid var(--evasys-border); border-radius: 9px; background: #f8fbfb; }
.import-example strong { display: block; margin-bottom: 8px; color: var(--evasys-ink); font-size: 13px; }
.import-example pre { margin: 0; overflow-x: auto; color: #52666c; font: 12px/1.5 Consolas, "Courier New", monospace; white-space: pre; }
.import-form { margin-top: 16px; }
.file-field { display: flex; flex-direction: column; gap: 7px; max-width: 760px; color: #3b5158; font-size: 14px; font-weight: 650; }
.file-field input[type="file"] { width: 100%; min-height: 46px; padding: 8px; background: #fff; }
.file-field small { font-weight: 400; }
.import-auth { margin-top: 16px; }
.import-note { margin: 12px 0 0; font-size: 13px; }
@media (max-width: 760px) { .import-example { grid-template-columns: 1fr; } }

/* Automatic monitoring and performance settings */
.monitor-bar {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(135px, .8fr)) minmax(220px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px;
  padding: 13px 14px;
  border: 1px solid var(--evasys-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.monitor-bar > div { min-width: 0; }
.monitor-bar small, .scheduler-mini small { display: block; margin-bottom: 3px; color: var(--evasys-muted); font-size: 11px; }
.monitor-bar strong { display: block; color: var(--evasys-ink); font-size: 13px; line-height: 1.35; }
.monitor-main { display: flex; align-items: center; gap: 10px; }
.monitor-main strong { font-size: 14px; }
.monitor-main small { margin: 2px 0 0; }
.monitor-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: #98a5a9; box-shadow: 0 0 0 4px #eef2f3; }
.monitor-dot.enabled { background: #4c956c; box-shadow: 0 0 0 4px #e4f4e9; }
.monitor-bar.is-running { border-color: #a8cfca; background: #fbfefe; }
.monitor-result strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.settings-form { margin: 0; }
.settings-form .panel { margin-bottom: 18px; }
.monitor-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.monitor-settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #3b5158;
  font-size: 14px;
  font-weight: 650;
}
.monitor-settings-grid input[type="number"] { width: 100%; }
.monitor-settings-grid .setting-check {
  justify-content: center;
  align-self: end;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cbd9dc;
  border-radius: 8px;
  background: var(--evasys-teal-soft-2);
}
.settings-note {
  margin-top: 15px;
  padding: 12px 13px;
  border-left: 3px solid var(--evasys-teal);
  background: var(--evasys-teal-soft-2);
  color: #52666c;
  font-size: 13px;
  line-height: 1.5;
}
.scheduler-mini {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.scheduler-mini span { min-width: 180px; }
.scheduler-mini strong { color: var(--evasys-ink); font-size: 13px; }
.settings-actions { display: flex; justify-content: flex-end; margin: 0 0 22px; }
.source-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f3;
  color: #64757b;
  font-size: 11px;
  font-weight: 750;
}
.source-badge.automatic { background: var(--evasys-teal-soft); color: var(--evasys-teal-dark); }

@media (max-width: 1180px) {
  .monitor-bar { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .monitor-result { grid-column: span 2; }
  .monitor-settings-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 700px) {
  .monitor-bar { grid-template-columns: 1fr; }
  .monitor-result { grid-column: auto; }
  .monitor-bar .button { width: 100%; }
  .monitor-settings-grid { grid-template-columns: 1fr; }
  .settings-actions .primary { width: 100%; }
}

/* Hosting-Bereich: DACH / Scantron / UK */
.badge-row, .detail-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-badges { margin: 0 0 9px; }
.area-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.area-badge.dach { background: #e8f4f2; color: #086b65; }
.area-badge.scantron { background: #eaf0f8; color: #3d5f88; }
.area-badge.uk { background: #f1edf8; color: #665083; }
.hosting-filters { margin: 24px 0 0; }

/* Produkt: evasys / evaexam / ClassClimate */
.product-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.product-badge.evasys { background: #e8f4f2; color: #086b65; }
.product-badge.evaexam { background: #fff1df; color: #8a5a17; }
.product-badge.classclimate { background: #edf0f7; color: #475b7a; }
.product-badge.all { background: #e7f3ef; color: #075d57; }

/* Release calendar / configurable version lines */
.stat.eol::before { background: #a74b4b; }
.badge.eol { background: #f7e4e4; color: #8f3939; }

.lifecycle-badge,
.release-state {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.lifecycle-badge.supported { background: #e4f4e9; color: #2e6e46; }
.lifecycle-badge.ending { background: #fff2dc; color: #8a5d17; }
.lifecycle-badge.planned { background: #eaf0f8; color: #3d5f88; }
.lifecycle-badge.eol { background: #f7e4e4; color: #8f3939; }

.release-card.eol { background: #fffafa; border-color: #ead0d0; }
.release-card.ending { background: #fffdf8; border-color: #ead9bb; }
.release-card.planned { background: #f8fbff; border-color: #dbe4ef; }
.release-card .badge-row { margin-bottom: 9px; }
.release-card .next-release-note { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(0,0,0,.06); color: #3f6d69; }
.release-card .eol-note { color: #8f4b4b; }

.release-calendar-intro { border-left: 4px solid var(--evasys-teal); }
.release-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.release-rules span { padding: 12px 13px; border-radius: 9px; background: #f6f9f9; }
.release-rules strong, .release-rules small { display: block; }
.release-rules strong { color: var(--evasys-ink); font-size: 13px; }
.release-rules small { margin-top: 4px; line-height: 1.4; }

.version-line-list { display: grid; gap: 16px; margin-top: 18px; }
.version-line-card { border: 1px solid var(--evasys-border); border-radius: 11px; background: #fff; overflow: hidden; }
.version-line-card.eol { border-color: #e5caca; }
.version-line-card.ending { border-color: #ead9bb; }
.version-line-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding: 18px; background: #fbfdfd; border-bottom: 1px solid var(--evasys-border); }
.version-line-head h3 { margin: 8px 0 0; color: var(--evasys-ink); font-size: 22px; }
.target-summary { min-width: 220px; text-align: right; }
.target-summary small, .target-summary strong, .target-summary span { display: block; }
.target-summary strong { margin: 3px 0; color: var(--evasys-ink); font-size: 18px; }
.target-summary span { color: var(--evasys-muted); font-size: 12px; }
.version-line-delete-form { margin-top: 10px; }
.version-line-delete-form .line-delete-button { padding: 7px 10px; font-size: 12px; }

.line-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--evasys-border); }
.eol-form, .next-release-form { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.eol-form label { flex: 1; display: flex; flex-direction: column; gap: 6px; color: #3b5158; font-size: 13px; font-weight: 650; }
.next-release-form { justify-content: flex-end; }
.next-release-form > div { min-width: 0; margin-right: auto; }
.next-release-form small, .next-release-form strong, .next-release-form span { display: block; }
.next-release-form strong { margin: 2px 0; color: var(--evasys-ink); }
.next-release-form span { color: var(--evasys-muted); font-size: 12px; }

.release-table-wrap { overflow-x: auto; }
.release-table { min-width: 820px; border: 0; border-radius: 0; }
.release-table td, .release-table th { padding: 10px 12px; }
.release-table td:first-child { width: 140px; }
.release-state.active { background: #e4f4e9; color: #2e6e46; }
.release-state.planned { background: #eaf0f8; color: #3d5f88; }
.release-state.past { background: #eef2f3; color: #66777d; }
.release-edit-form { display: grid; grid-template-columns: 110px 160px minmax(180px, 1fr) auto auto; gap: 8px; align-items: center; }
.release-edit-form input { width: 100%; min-width: 0; }
.danger-link { background: #fff; border-color: #e4c6c6; color: #8f3939; }
.danger-link:hover { background: #fff7f7; border-color: #d99f9f; }
.compact-empty { padding: 18px; }

.two-column-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-column-settings > div { min-width: 0; }
.compact-form { margin-top: 16px; }
.compact-form label small { font-weight: 400; line-height: 1.35; }
button:disabled { opacity: .5; cursor: not-allowed; }

@media (min-width: 981px) {
  .stats { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
  .group-stats { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
}

@media (max-width: 980px) {
  .release-rules, .two-column-settings, .line-controls { grid-template-columns: 1fr; }
  .version-line-head { flex-direction: column; }
  .target-summary { min-width: 0; text-align: left; }
  .next-release-form { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .eol-form, .next-release-form { align-items: stretch; flex-direction: column; }
  .release-edit-form { grid-template-columns: 1fr; }
  .release-table { min-width: 620px; }
}

/* Graylog / Server-Komponenten Vorschau */
.release-rules { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.php-target-inline { margin-top: 7px; }
.php-target-inline strong { display: inline; font-size: inherit; }
.component-target-note { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(0,0,0,.06); color: #446167; }
.component-target-note strong { color: var(--evasys-ink); }
.line-target-form { align-items: flex-end; flex-wrap: wrap; }
.line-target-form label { min-width: 150px; }
.line-target-form label small { color: var(--evasys-muted); font-size: 11px; font-weight: 400; }

.component-target-info { border-left: 4px solid #6f9f99; }
.component-logic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}
.component-logic-grid > div {
  padding: 12px 13px;
  border: 1px solid var(--evasys-border);
  border-radius: 9px;
  background: #f8fbfb;
}
.component-logic-grid strong, .component-logic-grid span { display: block; }
.component-logic-grid strong { color: var(--evasys-ink); font-size: 13px; }
.component-logic-grid span { margin-top: 4px; color: #52666c; font-size: 12px; }

.component-config-preview {
  margin-top: 4px;
  padding: 15px;
  border: 1px solid #cbdcda;
  border-radius: 10px;
  background: #f8fbfb;
}
.component-config-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.component-config-head strong, .component-config-head small { display: block; }
.component-config-head strong { color: var(--evasys-ink); font-size: 14px; }
.component-config-head small { margin-top: 4px; color: var(--evasys-muted); font-weight: 400; line-height: 1.4; }
.component-form-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 12px; }
.component-form-grid label { min-width: 0; }

.server-components-overview { border-left: 4px solid var(--evasys-teal); }
.component-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.component-summary {
  position: relative;
  padding: 12px 13px 12px 17px;
  border: 1px solid var(--evasys-border);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.component-summary::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #9ca9ad; }
.component-summary.current::before { background: #4c956c; }
.component-summary.outdated::before { background: #d99a37; }
.component-summary.conflict::before { background: #a74b4b; }
.component-summary.evamail::before { background: #5b829c; }
.component-summary.not-applicable::before { background: #7b8a8f; }
.component-summary span, .component-summary strong { display: block; }
.component-summary span { color: var(--evasys-muted); font-size: 11px; }
.component-summary strong { margin-top: 3px; color: var(--evasys-ink); font-size: 20px; }
.component-preview-note { margin: 12px 0 0; color: var(--evasys-muted); font-size: 12px; }

.hosting-components-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.hosting-components-mini > span { min-width: 0; padding: 8px 9px; border-radius: 8px; background: #f7faf9; }
.hosting-components-mini small, .hosting-components-mini strong, .hosting-components-mini em, .hosting-components-mini i { display: block; }
.hosting-components-mini small { color: var(--evasys-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.hosting-components-mini strong { margin: 2px 0 4px; color: var(--evasys-ink); font-size: 13px; }
.hosting-components-mini em { font-style: normal; }
.hosting-components-mini i { margin-top: 3px; color: var(--evasys-muted); font-size: 10px; font-style: normal; }

.component-state {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f3;
  color: #66777d;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}
.component-state.current { background: #e4f4e9; color: #2e6e46; }
.component-state.outdated { background: #fff0d9; color: #875b18; }
.component-state.conflict { background: #f7e4e4; color: #8f3939; }
.component-state.unconfigured, .component-state.unknown, .component-state.not_applicable { background: #eef2f3; color: #66777d; }

.server-components-panel { border-left: 4px solid #6f9f99; }
.component-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 15px; }
.component-detail-card { min-width: 0; padding: 15px; border: 1px solid var(--evasys-border); border-radius: 10px; background: #fbfdfd; }
.component-detail-card.graylog-card { background: #f8fafc; }
.component-detail-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.component-detail-title > span:first-child { color: var(--evasys-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.component-detail-card > strong { display: block; color: var(--evasys-ink); font-size: 22px; overflow-wrap: anywhere; }
.component-detail-card > small { display: block; margin-top: 4px; color: var(--evasys-muted); }
.component-detail-card > p { margin: 11px 0 0; color: #52666c; font-size: 12px; line-height: 1.45; }
.component-detail-card .grafana-link { margin-top: 13px; width: 100%; box-sizing: border-box; }

@media (max-width: 1100px) {
  .release-rules, .component-logic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .component-summary-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .component-detail-grid { grid-template-columns: 1fr 1fr; }
  .component-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .release-rules, .component-logic-grid, .component-summary-grid, .component-detail-grid, .component-form-grid, .hosting-components-mini { grid-template-columns: 1fr; }
  .component-config-head { flex-direction: column; }
  .line-target-form { align-items: stretch; }
}

/* Sollstaende: stabile Ausrichtung fuer PHP, evamail und EOL */
.line-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.line-target-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) minmax(190px, auto);
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 16px 18px 18px;
}

.line-target-form label {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 42px auto;
  gap: 6px;
  align-content: start;
}

.line-target-form label > input {
  width: 100%;
  min-width: 0;
}

.line-target-form label > small {
  margin: 0;
  min-height: 30px;
  line-height: 1.35;
}

.line-target-form > button {
  align-self: start;
  margin-top: 23px;
  white-space: nowrap;
}

.next-release-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  border-top: 1px solid var(--evasys-border);
}

.next-release-form > div {
  min-width: 0;
  margin-right: 0;
}

.next-release-form > button {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .line-target-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .line-target-form > button {
    margin-top: 23px;
  }
}

@media (max-width: 700px) {
  .line-target-form,
  .next-release-form {
    grid-template-columns: 1fr;
  }

  .line-target-form label {
    grid-template-rows: auto 42px auto;
  }

  .line-target-form label > small {
    min-height: 0;
  }

  .line-target-form > button {
    width: 100%;
    margin-top: 0;
  }

  .next-release-form > button {
    width: 100%;
  }
}

/* Graylog REST-API integration */
.graylog-settings-panel { border-left: 4px solid var(--evasys-teal); }
.setting-readonly { min-width: 0; padding: 10px 12px; border: 1px solid var(--evasys-border); border-radius: 8px; background: #f8fbfb; }
.setting-readonly small, .setting-readonly strong { display: block; }
.setting-readonly small { margin-bottom: 4px; color: var(--evasys-muted); font-size: 11px; }
.setting-readonly strong { color: var(--evasys-ink); font-size: 13px; overflow-wrap: anywhere; }
.graylog-actions { margin-top: 14px; }

/* Hosting detail: persistent result of the last targeted Graylog diagnostic. */
.graylog-diagnostic { margin-top: 12px; padding-top: 10px; border-top: 1px solid #dbe5e7; }
.graylog-diagnostic small { display: block; color: var(--evasys-muted); }
.graylog-diagnostic p { margin: 6px 0 0; color: #52666c; font-size: 12px; line-height: 1.45; }

/* Graylog: eindeutige Serverzuordnung bei mehrfachen source-Namen. */
.inline-warning { display:block; margin-top:6px; color:#805719; font-size:11px; font-weight:700; line-height:1.35; }
.graylog-mapping-warning { margin-top:10px; }

/* Hosting cards: consistent vertical alignment across a grid row */
.hosting-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hosting-card-head {
  min-height: 74px;
}

.hosting-card-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.hosting-card-head .badge-row {
  min-height: 25px;
}

.hosting-card h3 {
  min-height: 45px;
  overflow-wrap: anywhere;
}

.hosting-metrics {
  flex: 0 0 auto;
}

.hosting-components-mini {
  align-items: stretch;
  flex: 0 0 auto;
}

.hosting-components-mini > span {
  display: flex;
  flex-direction: column;
  min-height: 112px;
}

.hosting-components-mini strong {
  display: flex;
  align-items: flex-start;
  min-height: 34px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hosting-components-mini .component-state {
  min-height: 34px;
  max-width: 100%;
  justify-content: center;
  text-align: center;
}

.hosting-components-mini i {
  margin-top: auto;
  min-height: 13px;
}

.hosting-card > .group-warning,
.hosting-card > .group-version,
.hosting-card > .group-ok {
  margin-top: auto;
}

@media (max-width: 700px) {
  .hosting-card-head,
  .hosting-card h3,
  .hosting-components-mini > span,
  .hosting-components-mini strong,
  .hosting-components-mini .component-state {
    min-height: 0;
  }

  .hosting-card > .group-warning,
  .hosting-card > .group-version,
  .hosting-card > .group-ok {
    margin-top: 12px;
  }
}

/* Five server-component cards: PHP, evamail, MySQL, Grafana and Guacamole. */
@media (min-width: 1101px) {
  .server-components-panel .component-detail-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Grafana und Guacamole: Aktionsbuttons auf identischer Hoehe ausrichten. */
.server-components-panel .grafana-card,
.server-components-panel .guacamole-card {
  display: flex;
  flex-direction: column;
}
.server-components-panel .grafana-card > p,
.server-components-panel .guacamole-card > p {
  margin-bottom: 13px;
}
.server-components-panel .grafana-card .grafana-link,
.server-components-panel .guacamole-card .grafana-link {
  margin-top: auto;
}

/* Microsoft Entra ID login */
.sso-login-block { margin-top: 22px; }
.entra-login-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
}
.login-hint { margin: 10px 0 0; color: #587078; font-size: 13px; line-height: 1.45; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 20px; color: #71868d; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: #d8e3e5; }
.local-login-block h2 { margin: 0 0 4px; font-size: 18px; }
.login-fallback-note { margin-top: 0; font-size: 13px; }

/* Dashboard: show at most seven hosting systems plus one compact link to the full list. */
.hosting-more-card {
  align-items: center;
  justify-content: center;
  min-height: 230px;
  border-style: dashed;
  background: #f8fbfb;
  text-align: center;
}

.hosting-more-card:hover {
  border-color: var(--evasys-teal);
  background: var(--evasys-teal-soft-2);
}

.hosting-more-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 54px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--evasys-teal-soft-2);
  color: var(--evasys-teal-dark);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.hosting-more-card > strong {
  margin-top: 14px;
  color: var(--evasys-ink);
  font-size: 17px;
}

.hosting-more-card > small {
  margin-top: 5px;
  color: var(--evasys-muted);
  font-size: 12px;
}

.hosting-more-arrow {
  margin-top: 16px;
  color: var(--evasys-teal-dark);
  font-size: 22px;
  line-height: 1;
  transition: transform .15s ease;
}

.hosting-more-card:hover .hosting-more-arrow {
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .hosting-more-card { min-height: 150px; }
}


/* Gemeinsame Versionslinien */
.version-line-merge-form { margin-top: 8px; }
.line-merge-button { width: 100%; }
