:root {
  --kalilab-bg-1: #07111b;
  --kalilab-bg-2: #0b1220;
  --kalilab-bg-3: #0f1923;

  --kalilab-panel-bg: rgba(10, 17, 28, 0.34);
  --kalilab-panel-border: rgba(72, 202, 228, 0.10);
  --kalilab-panel-glow: rgba(0, 180, 216, 0.05);

  --kalilab-card-top: rgba(18, 28, 45, 0.92);
  --kalilab-card-bottom: rgba(10, 17, 30, 0.96);

  --kalilab-border: rgba(0, 180, 216, 0.16);
  --kalilab-border-hover: rgba(72, 202, 228, 0.34);
  --kalilab-border-soft: rgba(255, 255, 255, 0.05);

  --kalilab-shadow:
    0 8px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 180, 216, 0.05);

  --kalilab-shadow-hover:
    0 14px 30px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 180, 216, 0.14);

  --kalilab-text: #ecf8ff;
  --kalilab-text-soft: #9fb3c8;
  --kalilab-text-dim: #7f95ac;

  --kalilab-accent: #00b4d8;
  --kalilab-accent-2: #48cae4;
  --kalilab-accent-3: #90e0ef;

  --kalilab-danger: #ef4444;
  --kalilab-danger-bg: rgba(239, 68, 68, 0.10);
  --kalilab-danger-border: rgba(239, 68, 68, 0.35);
}

/* Basis */
html,
body,
#page_container {
  background:
    radial-gradient(circle at top left, rgba(0, 180, 216, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(72, 202, 228, 0.05), transparent 20%),
    linear-gradient(180deg, var(--kalilab-bg-1) 0%, var(--kalilab-bg-2) 46%, #0a1018 100%) !important;
  color: var(--kalilab-text) !important;
}

body,
button,
input,
textarea {
  color: var(--kalilab-text) !important;
}

/* Obere Infoleiste ruhig */
div[class*="information-widget"],
div[class*="widget_resources"],
div[class*="widget_search"],
div[class*="widget_datetime"],
div[class*="widget_greeting"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Suchfeld */
input,
input[type="text"],
.search-input {
  background: rgba(18, 24, 35, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: var(--kalilab-text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

input:focus,
input[type="text"]:focus,
.search-input:focus {
  outline: none !important;
  border-color: rgba(0, 180, 216, 0.42) !important;
  box-shadow:
    0 0 0 3px rgba(0, 180, 216, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

/* =========================
   V4 GROUP PANELS
   ========================= */
div[data-name],
section {
  position: relative;
  margin-bottom: 22px !important;
  padding: 14px 14px 18px 14px !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%),
    rgba(10, 17, 28, 0.22) !important;
  border: 1px solid var(--kalilab-panel-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.02),
    0 0 0 1px rgba(0,180,216,0.03),
    0 12px 30px rgba(0, 0, 0, 0.18) !important;
}

/* Panel-Topline */
div[data-name]::before,
section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0,180,216,0) 0%,
    rgba(72,202,228,0.32) 50%,
    rgba(0,180,216,0) 100%
  );
  opacity: 0.8;
}

/* Gruppenüberschriften */
h2,
.group-title {
  color: #e8f7ff !important;
  font-weight: 800 !important;
  letter-spacing: 0.15px;
  margin-bottom: 1rem !important;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.08);
}

/* =========================
   EINHEITLICHE CARDS
   ========================= */
.service-card,
.bookmark,
.widget-card,
.information-widget,
div[class*="service_"],
div[class*="bookmark_"] {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--kalilab-card-top) 0%, var(--kalilab-card-bottom) 100%) !important;
  border: 1px solid var(--kalilab-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--kalilab-shadow) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease !important;
  min-height: 86px;
}

/* Top Accent */
.service-card::before,
.bookmark::before,
.widget-card::before,
div[class*="service_"]::before,
div[class*="bookmark_"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0, 180, 216, 0) 0%,
    rgba(72, 202, 228, 0.55) 50%,
    rgba(0, 180, 216, 0) 100%
  );
  opacity: 0.75;
}

/* innerer shine */
.service-card::after,
.bookmark::after,
.widget-card::after,
div[class*="service_"]::after,
div[class*="bookmark_"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.035) 0%,
      rgba(255,255,255,0.00) 24%,
      rgba(0,180,216,0.025) 100%
    );
  pointer-events: none;
}

/* Hover */
.service-card:hover,
.bookmark:hover,
.widget-card:hover,
div[class*="service_"]:hover,
div[class*="bookmark_"]:hover {
  transform: translateY(-2px);
  border-color: var(--kalilab-border-hover) !important;
  box-shadow: var(--kalilab-shadow-hover) !important;
  background: linear-gradient(180deg, rgba(22, 34, 54, 0.95) 0%, rgba(12, 20, 34, 0.98) 100%) !important;
}

/* Titel */
.service-card h3,
.service-card .title,
.bookmark h3,
.bookmark .title,
.widget-card h3,
div[class*="service_"] h3,
div[class*="bookmark_"] h3 {
  color: #f4fbff !important;
  font-weight: 750 !important;
  font-size: 1rem !important;
  letter-spacing: 0.1px;
}

/* Texte */
.service-card p,
.service-card .description,
.bookmark p,
.bookmark .description,
.widget-card p,
div[class*="service_"] p,
div[class*="bookmark_"] p {
  color: var(--kalilab-text-soft) !important;
  font-size: 0.89rem !important;
  line-height: 1.35 !important;
}

small,
span[class*="description"],
div[class*="description"] {
  color: var(--kalilab-text-dim) !important;
}

/* Bookmark-Karten explizit an obere Karten angleichen */
.bookmark,
div[class*="bookmark_"] {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  min-height: 82px !important;
}

/* Falls Bookmark-Layout zu flach bleibt */
.bookmark a,
div[class*="bookmark_"] a {
  display: flex !important;
  align-items: center;
  min-height: 52px;
}

/* Icons */
.service-card img,
.service-card svg,
.bookmark img,
.bookmark svg,
.widget-card img,
.widget-card svg {
  opacity: 0.96;
  filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.06));
}

/* Status */
div[class*="status"],
.status {
  filter: saturate(1.05) brightness(1.04);
}

/* Error-Banner */
.error,
[class*="error"],
[class*="failed"],
[class*="danger"] {
  background: linear-gradient(180deg, rgba(127, 17, 17, 0.34), rgba(80, 12, 12, 0.38)) !important;
  border: 1px solid rgba(239, 68, 68, 0.18) !important;
  border-left: 3px solid rgba(239, 68, 68, 0.58) !important;
  border-radius: 10px !important;
  color: #fecaca !important;
  box-shadow: none !important;
}

.error a,
[class*="error"] a,
[class*="failed"] a,
[class*="danger"] a {
  color: #fecaca !important;
}

/* Links */
a {
  color: var(--kalilab-accent-3);
}

a:hover {
  color: #ffffff;
}

/* Header cleaner */
header,
div[class*="header"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a1018;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 216, 0.22);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 180, 216, 0.40);
}

/* Mobile */
@media (max-width: 900px) {
  div[data-name],
  section {
    padding: 12px 12px 16px 12px !important;
    border-radius: 16px !important;
  }

  .service-card,
  .bookmark,
  .widget-card,
  div[class*="service_"],
  div[class*="bookmark_"] {
    border-radius: 12px !important;
    min-height: 76px !important;
  }

  .service-card h3,
  .service-card .title,
  .bookmark h3,
  div[class*="service_"] h3,
  div[class*="bookmark_"] h3 {
    font-size: 0.96rem !important;
  }

  .service-card p,
  .bookmark p,
  div[class*="service_"] p,
  div[class*="bookmark_"] p {
    font-size: 0.84rem !important;
  }
}
/* =========================================
   FIX NUR FÜR DIE UNTEREN BOOKMARK-KARTEN
   ========================================= */

/* Äußerer Bookmark-Container soll wie echte Card wirken */
.bookmark,
div[class*="bookmark_"] {
  min-height: 92px !important;
  display: flex !important;
  align-items: stretch !important;
  padding: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(18, 28, 45, 0.92) 0%, rgba(10, 17, 30, 0.96) 100%) !important;
  border: 1px solid rgba(0, 180, 216, 0.16) !important;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 180, 216, 0.05) !important;
}

/* Der klickbare innere Bereich darf nicht wie ein Balken aussehen */
.bookmark > a,
div[class*="bookmark_"] > a {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 92px !important;
  padding: 16px 18px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  gap: 14px !important;
  text-decoration: none !important;
}

/* Falls Homepage einen inneren Wrapper nutzt */
.bookmark a > div,
div[class*="bookmark_"] a > div {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Icon links wie bei den oberen Karten */
.bookmark img,
.bookmark svg,
div[class*="bookmark_"] img,
div[class*="bookmark_"] svg {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  margin-top: 2px !important;
  opacity: 0.96 !important;
  filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.06));
}

/* Text-Block luftiger */
.bookmark .title,
.bookmark h3,
div[class*="bookmark_"] .title,
div[class*="bookmark_"] h3 {
  display: block !important;
  margin: 0 0 6px 0 !important;
  font-size: 1rem !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  color: #f4fbff !important;
}

.bookmark p,
.bookmark .description,
div[class*="bookmark_"] p,
div[class*="bookmark_"] .description {
  display: block !important;
  margin: 0 !important;
  font-size: 0.89rem !important;
  line-height: 1.35 !important;
  color: #9fb3c8 !important;
  opacity: 1 !important;
}

/* Oft liegt bei Bookmarks alles in einer Reihe – das brechen wir auf */
.bookmark span,
.bookmark small,
div[class*="bookmark_"] span,
div[class*="bookmark_"] small {
  white-space: normal !important;
}

/* Hover wie oben */
.bookmark:hover,
div[class*="bookmark_"]:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(72, 202, 228, 0.34) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 180, 216, 0.14) !important;
  background: linear-gradient(180deg, rgba(22, 34, 54, 0.95) 0%, rgba(12, 20, 34, 0.98) 100%) !important;
}

/* Wenn Homepage die innere Zeile dunkel hinterlegt, killen wir genau das */
.bookmark [class*="bg-"],
.bookmark [class*="backdrop"],
.bookmark [class*="rounded"],
div[class*="bookmark_"] [class*="bg-"],
div[class*="bookmark_"] [class*="backdrop"],
div[class*="bookmark_"] [class*="rounded"] {
  background: transparent !important;
  box-shadow: none !important;
}

/* Optional: obere feine Accent-Linie wie bei Services */
.bookmark::before,
div[class*="bookmark_"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0, 180, 216, 0) 0%,
    rgba(72, 202, 228, 0.55) 50%,
    rgba(0, 180, 216, 0) 100%
  );
  opacity: 0.75;
}

/* Wichtig: kein zusätzlicher innerer Balken */
.bookmark::after,
div[class*="bookmark_"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.035) 0%,
      rgba(255,255,255,0.00) 24%,
      rgba(0,180,216,0.025) 100%
    );
  pointer-events: none;
}