/* ============================================================================
   sidoun-theme.css — gemeinsames SIDOUN-Theme für das AVA-Modul
   Wird von index.php (Navigator), editor.php, projekt.php, preisspiegel.php
   genutzt. Palette/Optik dem SIDOUN-Globe-Navigator nachempfunden.
   ========================================================================== */

:root {
  /* Marke / Akzent (Verband) */
  --sid-green:        #1a7f3e;
  --sid-green-dark:   #14622f;
  --sid-green-light:  #e6f3ec;

  /* Navigator-Hintergrund (blaugrauer Verlauf) */
  --sid-nav-bg-a:     #dfe6ee;
  --sid-nav-bg-b:     #aebccd;

  /* IILSE / Globe (orange-gelber Radialverlauf) */
  --sid-iilse-a:      #f7b733;
  --sid-iilse-b:      #e06a1b;

  /* App-Box-Farben (SIDOUN-typisch) */
  --sid-grd:          #9c3f8a;
  --sid-stm:          #6f8f3c;
  --sid-lv:           #d99a2b;
  --sid-abr:          #2f8f8f;
  --sid-kom:          #3f6f9c;
  --sid-gm:           #7a5a9c;
  --sid-ga:           #4a7fb0;
  --sid-bap:          #b35c2a;
  --sid-dd:           #6c757d;

  /* Ribbon / Flächen */
  --sid-ribbon-a:     #f3f5f7;
  --sid-ribbon-b:     #e4e8ec;
  --sid-divider:      #d6dbe0;
  --sid-table-head:   #eef1f4;
  --sid-filterrow:    #fafbfc;

  --sid-ink:          #233140;
  --sid-ink-soft:     #5a6a7a;
}

/* ---------------------------------------------------------------- Topbar */
.sid-topbar {
  background: var(--sid-green);
  color: #fff;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.sid-topbar .sid-brand {
  font-weight: 700;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sid-topbar .sid-sub {
  opacity: .85;
  font-size: .9rem;
}
.sid-topbar .sid-spacer { margin-left: auto; }
.sid-topbar a,
.sid-topbar a:hover { color: #fff; }

/* ---------------------------------------------------------------- IILSE */
.sid-iilse {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sid-iilse-a), var(--sid-iilse-b));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25), inset 0 2px 6px rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  transition: transform .12s ease;
}
.sid-iilse:hover { transform: scale(1.06); }
.sid-iilse i { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }

/* ---------------------------------------------------------------- Globe */
.sid-globe {
  width: 280px;
  height: 280px;
  max-width: 60vw;
  max-height: 60vw;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #cfe3f2 0%, #7fb0d8 38%, #2f6fa0 72%, #1b4d76 100%);
  box-shadow:
    0 10px 30px rgba(30, 60, 90, .35),
    inset -14px -14px 40px rgba(0, 0, 0, .28),
    inset 12px 12px 30px rgba(255, 255, 255, .25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  position: relative;
  overflow: hidden;
}
.sid-globe::after {
  /* angedeutete Kontinente / Lichtschein */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 30% at 60% 55%, rgba(95, 150, 90, .55), transparent 70%),
    radial-gradient(ellipse 28% 22% at 35% 40%, rgba(95, 150, 90, .45), transparent 70%),
    radial-gradient(ellipse 22% 30% at 50% 78%, rgba(95, 150, 90, .35), transparent 70%);
  pointer-events: none;
}
.sid-globe .sid-globe-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: .06em;
  z-index: 1;
}
.sid-globe .sid-globe-sub {
  font-size: .85rem;
  opacity: .9;
  letter-spacing: .25em;
  text-transform: uppercase;
  z-index: 1;
}

/* ---------------------------------------------------------------- Card */
.sid-card {
  background: linear-gradient(160deg, #2f8f8f, #246b6b);
  color: #fff;
  border-radius: 12px;
  padding: .85rem 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
}
.sid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, .28);
}
.sid-card .sid-card-check {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sid-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  font-size: .95rem;
}
.sid-card .sid-card-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .85;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sid-card .sid-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: .15rem 0 .35rem;
  line-height: 1.2;
}
.sid-card .sid-card-meta {
  font-size: .8rem;
  line-height: 1.45;
  opacity: .95;
}
.sid-card .sid-card-meta .muted { opacity: .7; }

/* ---------------------------------------------------------------- App-Boxen */
.sid-appbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  background: var(--sid-dd);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  cursor: pointer;
  text-align: center;
  padding: .4rem;
}
.sid-appbox:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #fff;
}
.sid-appbox .sid-appbox-icon {
  font-size: 1.9rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
}
.sid-appbox .sid-appbox-code {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .04em;
}
.sid-appbox .sid-appbox-name {
  font-size: .68rem;
  line-height: 1.15;
  opacity: .92;
}
.sid-appbox.is-disabled {
  filter: grayscale(.55) opacity(.55);
  pointer-events: none;
  cursor: default;
}
.sid-appbox .sid-soon {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: .55rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(0, 0, 0, .25);
  border-radius: 6px;
  padding: 1px 5px;
}
.sid-appbox-wrap { position: relative; }

/* Box-Farb-Modifier */
.sid-appbox.sid-grd { background: linear-gradient(160deg, #b04ea0, var(--sid-grd)); }
.sid-appbox.sid-stm { background: linear-gradient(160deg, #82a64b, var(--sid-stm)); }
.sid-appbox.sid-lv  { background: linear-gradient(160deg, #eab348, var(--sid-lv)); }
.sid-appbox.sid-abr { background: linear-gradient(160deg, #3da6a6, var(--sid-abr)); }
.sid-appbox.sid-kom { background: linear-gradient(160deg, #5285b3, var(--sid-kom)); }
.sid-appbox.sid-gm  { background: linear-gradient(160deg, #9070b3, var(--sid-gm)); }
.sid-appbox.sid-ga  { background: linear-gradient(160deg, #5e95c6, var(--sid-ga)); }
.sid-appbox.sid-bap { background: linear-gradient(160deg, #cf7d48, var(--sid-bap)); }
.sid-appbox.sid-dd  { background: linear-gradient(160deg, #818a93, var(--sid-dd)); }

/* ---------------------------------------------------------------- Panel-Head */
.sid-panel-head {
  background: linear-gradient(180deg, var(--sid-ribbon-a), var(--sid-ribbon-b));
  border: 1px solid var(--sid-divider);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: .5rem .85rem;
  font-weight: 600;
  color: var(--sid-ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ---------------------------------------------------------------- Filterrow */
.sid-filterrow {
  background: var(--sid-filterrow);
}
.sid-filterrow input,
.sid-filterrow select {
  font-size: .85rem;
}

/* ---------------------------------------------------------------- Table */
.sid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: #fff;
}
.sid-table thead th {
  background: var(--sid-table-head);
  color: var(--sid-ink);
  font-weight: 600;
  text-align: left;
  padding: .45rem .6rem;
  border-bottom: 1px solid var(--sid-divider);
  white-space: nowrap;
}
.sid-table tbody td {
  padding: .4rem .6rem;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}
.sid-table tbody tr:hover { background: var(--sid-green-light); }
.sid-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------------------------------------------------------------- Navigator-Layout */
.sid-navigator {
  min-height: calc(100vh - 56px);
  background: linear-gradient(135deg, var(--sid-nav-bg-a), var(--sid-nav-bg-b));
  position: relative;
  overflow: hidden;
}
.sid-nav-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr minmax(150px, 220px);
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 2rem;
  min-height: calc(100vh - 56px);
}
.sid-nav-left  { display: flex; flex-direction: column; gap: 1rem; }
.sid-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.sid-nav-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  align-content: start;
}

.sid-lastview {
  background: linear-gradient(160deg, var(--sid-iilse-a), var(--sid-iilse-b));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  align-self: flex-start;
  transition: transform .12s ease;
}
.sid-lastview:hover { transform: translateY(-1px); color: #fff; }

@media (max-width: 991px) {
  .sid-nav-grid {
    grid-template-columns: 1fr;
  }
  .sid-nav-right {
    grid-template-columns: repeat(4, 1fr);
  }
  .sid-globe { order: -1; }
}
@media (max-width: 575px) {
  .sid-nav-right { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------- Globus-Animation
   (28.07.2026, Wunsch Erik): echter rotierender Globus, bewusst ressourcenschonend —
   EINE transform-Animation (GPU-composited, kein Layout/Paint je Frame, kein
   WebGL/Canvas), pausiert bei prefers-reduced-motion. Das Kontinent-/Meridianband
   ist doppelt breit und wandert um -50 %: nahtlose Schleife. */
.sid-globe::after {
  inset: auto;
  top: 0; left: 0; bottom: 0;
  width: 200%;
  background:
    /* Kontinent-Andeutungen, zweimal (x und x+50 %) fuer den nahtlosen Umlauf */
    radial-gradient(ellipse 20% 30% at 30% 55%, rgba(95, 150, 90, .55), transparent 70%),
    radial-gradient(ellipse 14% 22% at 17.5% 40%, rgba(95, 150, 90, .45), transparent 70%),
    radial-gradient(ellipse 11% 30% at 25% 78%, rgba(95, 150, 90, .35), transparent 70%),
    radial-gradient(ellipse 20% 30% at 80% 55%, rgba(95, 150, 90, .55), transparent 70%),
    radial-gradient(ellipse 14% 22% at 67.5% 40%, rgba(95, 150, 90, .45), transparent 70%),
    radial-gradient(ellipse 11% 30% at 75% 78%, rgba(95, 150, 90, .35), transparent 70%),
    /* Meridiane */
    repeating-linear-gradient(90deg,
      transparent 0 5.7%, rgba(255, 255, 255, .09) 5.7% 6.25%);
  animation: sid-globe-umlauf 36s linear infinite;
  will-change: transform;
}
@keyframes sid-globe-umlauf {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Licht/Schatten der Kugel liegt UEBER dem wandernden Band — eigene, ruhige Schicht. */
.sid-globe::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .30) 0%, transparent 45%),
    radial-gradient(circle at 70% 75%, rgba(0, 0, 30, .22) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .sid-globe::after { animation: none; }
}
