/* Michael Kontrollzentrum - Light Stable v2026.06.08-5
   Ziel: helles Design, Dashboard wieder kompakt, Apps-Verwaltung korrekt. */

* { box-sizing: border-box; }

:root {
  --bg: #eaf4ff;
  --bg2: #f7fbff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #0d2340;
  --muted: #506784;
  --line: #cfe0f5;
  --line-strong: #b6d0ef;
  --blue: #1b7dff;
  --blue-dark: #115ec7;
  --green: #0c9a5b;
  --red: #c92d42;
  --amber: #9b6500;
  --shadow: 0 14px 34px rgba(26, 72, 125, .13);
  --shadow-soft: 0 8px 22px rgba(26, 72, 125, .10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
}

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(27,125,255,.16), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(79,167,255,.14), transparent 26%),
    linear-gradient(180deg, #dceeff 0%, #f7fbff 48%, #ffffff 100%);
  min-height: 100vh;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

/* Header - funktioniert fuer index.php und alte Verwaltungsseiten */
.exec-header,
.topbar-ops,
.mdash-topbar {
  width: min(1380px, calc(100% - 48px));
  margin: 22px auto 0;
}

.exec-header-inner,
.topbar-ops,
.mdash-topbar {
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.exec-brand,
.topbar-title,
.mdash-brand { min-width: 0; }

.exec-kicker,
.eyebrow,
.section-kicker {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 1.9px;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 6px;
}

.exec-brand h1,
.ops-title,
.mdash-brand h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.03;
  letter-spacing: -1px;
}

.exec-brand p,
.ops-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.exec-nav,
.topnav,
.mdash-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.exec-nav a,
.topnav a,
.mdash-nav a,
.btn,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  color: #10233f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(31, 83, 145, .08);
  cursor: pointer;
}

.btn-primary,
button[type="submit"],
input[type="submit"] {
  color: #fff;
  background: linear-gradient(135deg, #126de8, #4a9cff);
  border-color: #126de8;
}

.btn-secondary { background: #eef6ff; color: #1557a8; }
.btn-ghost { background: #fff; color: #18375c; }
.btn.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.btn-icon { width: 40px; min-width: 40px; padding-left: 0; padding-right: 0; }
.btn-warn { color: #9a4a00; background: #fff4df; border-color: #ffd79a; }
.btn-ok { color: #087045; background: #e2f8ed; border-color: #a9e8c8; }

.mdash-version,
.version-badge,
.ops-version {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid #b9d5ff;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1457ad;
  font-size: 12px;
  font-weight: 900;
}

/* Layout */
.exec-shell,
.container {
  width: min(1380px, calc(100% - 48px));
  margin: 18px auto 38px;
}

.exec-section,
.section-block,
.form-panel {
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-soft);
}

.section-heading,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1.1;
}

.section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-note { color: var(--muted); font-size: 13px; font-weight: 700; }

/* Dashboard Favoriten */
.priority-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.priority-card {
  position: relative;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.priority-grid { display: none; }
.priority-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--app-color, var(--blue));
}

.priority-topline,
.priority-actions,
.system-title-line,
.system-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.priority-topline { justify-content: space-between; }
.priority-body h3 { margin: 14px 0 6px; font-size: 21px; line-height: 1.15; }
.priority-body p { margin: 0; color: var(--muted); line-height: 1.45; }
.priority-meta,
.system-check { margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.priority-actions { margin-top: 12px; }

.priority-icon,
.system-icon,
.admin-app-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #edf5ff;
  color: var(--app-color, var(--blue));
  box-shadow: inset 0 0 0 1px #d7e7fb;
  overflow: hidden;
}

.priority-icon svg,
.system-icon svg,
.admin-app-icon svg {
  width: 24px !important;
  height: 24px !important;
  display: block;
}

/* Dashboard Systemliste */
.systems-list { display: flex; flex-direction: column; gap: 10px; }

.system-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 13px 14px 13px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(26,72,125,.08);
  overflow: hidden;
}
.system-accent { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--app-color, var(--blue)); }
.system-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.system-text { min-width: 0; }
.system-title-line h3 { margin: 0; font-size: 18px; line-height: 1.15; }
.system-text p { margin: 4px 0 0; color: var(--muted); }
.system-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

.status-chip,
.mini-tag,
.badge-chip,
.inline-favorite,
.inline-inactive {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid transparent;
}
.status-chip.is-online { color: var(--green); background: #e0f8eb; border-color: #adeaca; }
.status-chip.is-offline { color: var(--red); background: #ffe6ea; border-color: #ffc5ce; }
.status-chip.is-unknown { color: var(--amber); background: #fff2d8; border-color: #ffd999; }
.mini-priority,
.inline-favorite { color: #1457ad; background: #eaf3ff; border-color: #b9d5ff; }
.inline-inactive { color: #8c2330; background: #ffe6ea; border-color: #ffc5ce; }

/* Apps verwalten */
.admin-app-bar-list { display: flex; flex-direction: column; gap: 10px; }
.admin-app-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 13px 14px 13px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(26,72,125,.08);
  overflow: hidden;
}
.admin-app-bar-accent { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--app-color, var(--blue)); }
.admin-app-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-app-info { min-width: 0; }
.admin-app-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-app-title { margin: 0; font-size: 18px; line-height: 1.15; }
.admin-app-desc { margin-top: 4px; color: var(--muted); font-size: 13px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.badge-online { color: var(--green); background: #e0f8eb; border-color: #adeaca; }
.badge-test { color: #1457ad; background: #eaf3ff; border-color: #b9d5ff; }
.badge-intern { color: #4c5d73; background: #eef2f7; border-color: #d7e0ea; }
.badge-neu { color: #0b6a91; background: #e3f7ff; border-color: #bcecff; }
.badge-wichtig { color: var(--amber); background: #fff2d8; border-color: #ffd999; }
.admin-app-status { color: var(--muted); font-size: 12px; line-height: 1.35; }
.live-status { display: flex; align-items: center; gap: 7px; color: var(--text); font-weight: 900; margin-bottom: 3px; }
.status-dot { width: 9px; height: 9px; border-radius: 999px; background: #d7a000; display: inline-block; }
.status-dot.is-online { background: var(--green); }
.status-dot.is-offline { background: var(--red); }
.status-dot.is-unknown { background: #d7a000; }
.admin-app-links { margin-top: 4px; display: flex; gap: 6px; color: #1457ad; font-weight: 800; }
.admin-app-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.inline-form { margin: 0; }
.star-toggle { width: 38px; min-width: 38px; padding: 0; color: #8a95a4; }
.star-toggle.is-favorite { color: #d99a00; background: #fff5dd; border-color: #ffd999; }
.sortable-row { cursor: grab; }
.sortable-row.dragging { opacity: .65; cursor: grabbing; }
.save-order-btn.is-saved { background: #e0f8eb; border-color: #adeaca; color: var(--green); }

/* Formulare */
.edit-form { display: grid; gap: 10px; max-width: 760px; }
.edit-form label { color: var(--text); font-weight: 900; font-size: 13px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="color"], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fff; color: var(--text);
}
.badge-picker, .check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; }
.alert { padding: 12px 14px; border-radius: 13px; font-weight: 800; margin-bottom: 14px; }
.alert.error, .error { color: #9f1728; background: #ffe4e8; border: 1px solid #ffc1ca; }
.alert.success, .success { color: #087045; background: #e2f8ed; border: 1px solid #a9e8c8; }

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-shell { width: min(450px, 100%); }
.login-box { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.login-glow { display: none; }
.login-title { margin: 6px 0 0; font-size: 34px; color: var(--text); }
.login-subtitle { margin: 6px 0 18px; font-size: 21px; color: var(--muted); }
.login-form { display: grid; gap: 10px; }
.login-form label { font-weight: 900; font-size: 13px; color: var(--text); }

@media (max-width: 980px) {
  .exec-header-inner, .topbar-ops, .mdash-topbar, .section-heading, .section-head { flex-direction: column; align-items: flex-start; }
  .exec-nav, .topnav, .mdash-nav { justify-content: flex-start; }
  .system-row, .admin-app-bar { grid-template-columns: 1fr; }
  .system-side, .admin-app-actions { align-items: flex-start; justify-content: flex-start; }
}

@media (max-width: 700px) {
  .exec-header, .topbar-ops, .mdash-topbar, .exec-shell, .container { width: min(1380px, calc(100% - 18px)); }
  .exec-header-inner, .topbar-ops, .mdash-topbar, .exec-section, .section-block, .form-panel { border-radius: 20px; padding: 16px; }
  .priority-grid-wrap { grid-template-columns: 1fr; }
  .exec-brand h1, .ops-title, .mdash-brand h1 { font-size: 30px; }
}


/* --- Swiss Clean Upgrade v2026.06.30 CH --- */
:root {
  --bg: #f6f8fb;
  --bg2: #ffffff;
  --panel: rgba(255,255,255,.92);
  --panel-soft: #fff8f8;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: #d0d5dd;
  --swiss-red: #e30613;
  --swiss-red-dark: #b0000b;
  --blue: #e30613;
  --blue-dark: #b0000b;
  --green: #078657;
  --red: #d92d20;
  --amber: #b54708;
  --shadow: 0 22px 60px rgba(16,24,40,.10);
  --shadow-soft: 0 12px 34px rgba(16,24,40,.08);
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(227,6,19,.12), transparent 28%),
    radial-gradient(circle at 94% 10%, rgba(255,255,255,.92), transparent 24%),
    linear-gradient(135deg, #fff 0%, #f7f7f8 42%, #fff1f2 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(17,24,39,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(17,24,39,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75), transparent 65%);
}
.exec-header-inner, .topbar-ops, .mdash-topbar, .exec-section, .section-block, .form-panel, .login-box {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  border-color: rgba(208,213,221,.85);
}
.brand-with-icon { display: flex; align-items: center; gap: 16px; }
.brand-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(227,6,19,.22), inset 0 0 0 1px rgba(255,255,255,.7);
  flex: 0 0 auto;
}
.exec-kicker, .eyebrow, .section-kicker { color: var(--swiss-red); letter-spacing: 2.2px; }
.exec-brand h1, .ops-title, .mdash-brand h1, .section-heading h2, .section-head h2, .login-title {
  letter-spacing: -.045em;
}
.exec-nav a, .topnav a, .mdash-nav a, .btn, button, input[type="submit"] {
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(16,24,40,.06);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.exec-nav a:hover, .topnav a:hover, .mdash-nav a:hover, .btn:hover, button:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(16,24,40,.12);
}
.btn-primary, button[type="submit"], input[type="submit"] {
  background: linear-gradient(135deg, var(--swiss-red), var(--swiss-red-dark));
  border-color: var(--swiss-red);
}
.btn-secondary { background: #fff1f2; color: var(--swiss-red-dark); border-color: #fecdd3; }
.btn-ghost { background: #fff; color: #344054; }
.btn-danger {
  color: #fff !important;
  background: linear-gradient(135deg, #d92d20, #a40000) !important;
  border-color: #d92d20 !important;
}
.version-badge, .ops-version, .mdash-version {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--swiss-red-dark);
}
.priority-card, .system-row, .admin-app-bar {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,250,250,.92));
}
.priority-card::after, .system-row::after, .admin-app-bar::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 10px;
  color: rgba(227,6,19,.08);
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  pointer-events: none;
}
.priority-card::before, .system-accent, .admin-app-bar-accent { background: var(--swiss-red); }
.priority-icon, .system-icon, .admin-app-icon {
  background: #fff1f2;
  color: var(--swiss-red);
  box-shadow: inset 0 0 0 1px #fecdd3;
}
.status-chip.is-online, .badge-online { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.status-chip.is-offline, .badge-offline { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.status-chip.is-unknown { color: #93370d; background: #fffaeb; border-color: #fedf89; }
.mini-priority, .inline-favorite, .badge-test { color: var(--swiss-red-dark); background: #fff1f2; border-color: #fecdd3; }
.login-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(227,6,19,.16), transparent 35%),
    linear-gradient(135deg, #ffffff, #fff1f2);
}
.login-box { position: relative; overflow: hidden; text-align: left; }
.login-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--swiss-red), #fff, var(--swiss-red));
}
.login-logo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  object-fit: cover;
  display: block;
  margin-bottom: 16px;
  box-shadow: 0 16px 36px rgba(227,6,19,.24);
}
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="color"], textarea, select {
  border-radius: 16px;
  background: rgba(255,255,255,.95);
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(227,6,19,.14);
  border-color: var(--swiss-red);
}
.delete-confirm-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.danger-panel { border-color: #fecdca; background: #fffafa; }
.danger-text { color: #475467; line-height: 1.55; }
@media (max-width: 700px) {
  .brand-with-icon { align-items: flex-start; }
  .brand-logo { width: 58px; height: 58px; border-radius: 18px; }
  .login-logo { width: 82px; height: 82px; }
  .system-actions, .admin-app-actions, .priority-actions { width: 100%; }
  .system-actions .btn, .admin-app-actions .btn, .priority-actions .btn { flex: 1 1 auto; }
}


/* --- Michaels Dashboard Simplify v2026.06.30 M2 --- */
.exec-brand p,
.priority-meta,
.system-check,
.status-chip,
.admin-app-status,
.admin-badges,
.badge-row,
.system-accent,
.admin-app-bar-accent,
.priority-card::before,
.section-note,
.live-status,
.admin-app-meta-line,
.admin-app-links,
.priority-card::after,
.system-row::after,
.admin-app-bar::after {
  display: none !important;
}

.exec-header-inner,
.topbar-ops,
.mdash-topbar,
.exec-section,
.section-block,
.form-panel,
.login-box {
  border-radius: 28px;
}

.priority-card,
.system-row,
.admin-app-bar {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  box-shadow: 0 14px 34px rgba(16,24,40,.08);
  border: 1px solid rgba(208,213,221,.82);
}

.priority-card,
.system-row,
.admin-app-bar {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92)),
    linear-gradient(0deg, var(--card-tint, rgba(59,130,246,.08)), var(--card-tint, rgba(59,130,246,.08)));
}

.priority-card {
  min-height: 210px;
}

.system-row,
.admin-app-bar {
  padding: 16px 18px;
}

.system-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.system-side {
  gap: 10px;
}

.priority-icon,
.system-icon,
.admin-app-icon {
  background: rgba(255,255,255,.92);
  color: var(--icon-accent, #2563eb);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 8px 20px rgba(15,23,42,.06);
}

.admin-app-bar {
  grid-template-columns: minmax(0,1fr) auto;
}

.inline-favorite {
  color: #0b57d0;
  background: #eaf2ff;
  border-color: #cbdcff;
}

.btn,
button,
input[type="submit"] {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13px;
}

.btn-open {
  min-height: 46px;
  padding: 11px 18px;
  color: #0b57d0 !important;
  background: linear-gradient(135deg, #eef6ff, #dcecff) !important;
  border-color: #c6dcff !important;
  box-shadow: 0 10px 24px rgba(37,99,235,.14);
}

.btn-favorite-toggle {
  color: #0b57d0 !important;
  background: linear-gradient(135deg, #ffffff, #eef4ff) !important;
  border-color: #d6e4ff !important;
  min-width: 110px;
}

.btn-favorite-toggle.is-favorite {
  color: #b45309 !important;
  background: linear-gradient(135deg, #fff8e8, #ffefbf) !important;
  border-color: #ffd978 !important;
}

.btn-secondary {
  background: linear-gradient(135deg, #fff7f7, #ffe8ea) !important;
  color: #b0000b !important;
  border-color: #ffc9d0 !important;
}

.btn-ghost {
  background: rgba(255,255,255,.86) !important;
}

.system-text p,
.admin-app-desc,
.priority-body p {
  font-size: 14px;
}

.exec-brand h1,
.ops-title,
.mdash-brand h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.ops-subtitle,
.version-badge,
.mdash-version,
.ops-version {
  margin-top: 8px;
}

.edit-form {
  max-width: 680px;
  gap: 12px;
}

.check-row {
  margin-top: 6px;
}

.check-item {
  padding: 10px 12px;
  background: rgba(255,255,255,.78);
}

.login-box {
  padding: 34px;
}

.login-title {
  font-size: 36px;
}

.login-subtitle {
  margin-bottom: 12px;
}

.delete-confirm-row {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .admin-app-bar,
  .system-row {
    grid-template-columns: 1fr;
  }
  .admin-app-actions,
  .system-actions {
    justify-content: flex-start;
  }
}
