/* Shinobi SEO Command Center - Designsystem
   Dunkle Profi-Oberflaeche. Die Anime-Ebene liegt in Farbe, Benennung und Bewegung,
   nicht in Bildern. Keine Google-Fonts (Hotlink-Abmahnrisiko), reiner System-Stack. */

:root {
  /* Grundflaechen */
  --tinte:        #08090d;
  --grund:        #0b0d13;
  --flaeche:      #111420;
  --flaeche-hoch: #171b2b;
  --rand:         #232838;
  --rand-hell:    #2f3547;

  /* Text */
  --text:         #e8ebf5;
  --text-leise:   #98a0b8;
  --text-still:   #626b85;

  /* Chakra-Palette */
  --chakra:       #4cc9f0;
  --chakra-tief:  #2b8fb3;
  --sharingan:    #e63946;
  --gold:         #f4a261;
  --natur:        #56d364;
  --violett:      #9d7cf0;

  /* Rangfarben */
  --rang-s: #e63946;
  --rang-a: #f4a261;
  --rang-b: #4cc9f0;
  --rang-c: #7a8399;

  --radius:    14px;
  --radius-s:  9px;
  --schatten:  0 8px 28px rgba(0, 0, 0, .5);
  --glanz:     0 0 0 1px rgba(76, 201, 240, .16), 0 0 24px rgba(76, 201, 240, .09);

  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--grund);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hintergrund: zwei sehr weiche Chakra-Schleier, bewusst dezent */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(76, 201, 240, .10), transparent 60%),
    radial-gradient(48rem 34rem at 92% 4%, rgba(230, 57, 70, .07), transparent 62%);
}

/* ---------------- Grundgeruest ---------------- */

.huelle {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

.seitenleiste {
  background: linear-gradient(180deg, var(--tinte), #0a0c12);
  border-right: 1px solid var(--rand);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.marke {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 6px 16px;
  border-bottom: 1px solid var(--rand);
}

.marke-siegel {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--sharingan) 0 26%, #7d1620 27% 46%, #14161f 47%);
  box-shadow: 0 0 14px rgba(230, 57, 70, .38);
  position: relative;
  animation: siegel-dreh 14s linear infinite;
}
.marke-siegel::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(230, 57, 70, .55);
}
@keyframes siegel-dreh { to { transform: rotate(360deg); } }

.marke-text b { display: block; font-size: 14px; letter-spacing: .3px; }
.marke-text span { display: block; font-size: 10.5px; color: var(--text-still); letter-spacing: 1.1px; text-transform: uppercase; }

.navi { display: flex; flex-direction: column; gap: 3px; }
.navi-titel {
  font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--text-still); padding: 4px 10px 7px;
}

.navi-punkt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  border-radius: var(--radius-s);
  color: var(--text-leise);
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 13.5px;
  transition: background .16s, color .16s, border-color .16s;
  user-select: none;
}
.navi-punkt:hover { background: var(--flaeche); color: var(--text); }
.navi-punkt.aktiv {
  background: linear-gradient(90deg, rgba(76, 201, 240, .14), transparent);
  border-color: rgba(76, 201, 240, .28);
  color: var(--text);
}
.navi-punkt .sym { width: 17px; text-align: center; opacity: .9; font-size: 14px; }
.navi-punkt .zahl {
  margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums;
  background: var(--flaeche-hoch); border: 1px solid var(--rand);
  padding: 1px 7px; border-radius: 20px; color: var(--text-leise);
}
.navi-punkt .zahl.warn { background: rgba(230,57,70,.14); border-color: rgba(230,57,70,.35); color: #ff8b93; }

.inhalt { padding: 24px 30px 60px; max-width: 1560px; }

/* ---------------- Kopfzeile ---------------- */

.kopf {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 22px; flex-wrap: wrap;
}
.kopf h1 { font-size: 23px; font-weight: 650; letter-spacing: -.2px; }
.kopf .unter { color: var(--text-leise); font-size: 13px; margin-top: 3px; }

/* ---------------- Bausteine ---------------- */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 18px;
}
.karte-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.karte-kopf h2, .karte-kopf h3 {
  font-size: 13px; font-weight: 600; letter-spacing: .7px;
  text-transform: uppercase; color: var(--text-leise);
}

.gitter { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }

.knopf {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--flaeche-hoch);
  border: 1px solid var(--rand-hell);
  color: var(--text);
  padding: 8px 15px;
  border-radius: var(--radius-s);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.knopf:hover:not(:disabled) { background: #1e2333; border-color: var(--chakra-tief); }
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }

.knopf.haupt {
  background: linear-gradient(135deg, var(--chakra), var(--chakra-tief));
  border-color: transparent; color: #04121a; font-weight: 650;
}
.knopf.haupt:hover:not(:disabled) { filter: brightness(1.1); border-color: transparent; }
.knopf.gefahr { border-color: rgba(230,57,70,.4); color: #ff9aa1; }
.knopf.gefahr:hover:not(:disabled) { background: rgba(230,57,70,.12); }
.knopf.klein { padding: 5px 10px; font-size: 12px; }

input, select, textarea {
  width: 100%;
  background: var(--tinte);
  border: 1px solid var(--rand);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-s);
  font: inherit; font-size: 13.5px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--chakra-tief);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, .12);
}
label { display: block; font-size: 12px; color: var(--text-leise); margin-bottom: 5px; }
.feld { margin-bottom: 13px; }

/* ---------------- Chakra-Ring (Health-Score) ---------------- */

.chakra-ring { position: relative; width: 168px; height: 168px; flex: none; }
.chakra-ring svg { transform: rotate(-90deg); }
.chakra-ring .spur { fill: none; stroke: var(--rand); stroke-width: 9; }
.chakra-ring .fuellung {
  fill: none; stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.22,.8,.28,1);
  filter: drop-shadow(0 0 7px currentColor);
}
.chakra-mitte {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.chakra-mitte .wert { font-size: 42px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.chakra-mitte .label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-still); margin-top: 5px; }

/* Balken je Bereich */
.bereich-zeile { display: grid; grid-template-columns: 132px 1fr 44px; align-items: center; gap: 11px; margin-bottom: 9px; }
.bereich-zeile .name { font-size: 12.5px; color: var(--text-leise); }
.bereich-zeile .wert { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.balken { height: 6px; background: var(--tinte); border-radius: 4px; overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 4px; transition: width .9s cubic-bezier(.22,.8,.28,1); }

/* ---------------- Missionen ---------------- */

.mission {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-left: 3px solid var(--rang-c);
  border-radius: var(--radius);
  padding: 15px 17px;
  margin-bottom: 11px;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.mission:hover { transform: translateX(2px); box-shadow: var(--schatten); }
.mission.s { border-left-color: var(--rang-s); }
.mission.a { border-left-color: var(--rang-a); }
.mission.b { border-left-color: var(--rang-b); }
.mission.erledigt { opacity: .5; }
.mission.erledigt .mission-titel { text-decoration: line-through; }

.mission-kopf { display: flex; align-items: flex-start; gap: 12px; }

.rang-abzeichen {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 800; letter-spacing: -.5px;
  border: 1px solid;
}
.rang-abzeichen.s { color: var(--rang-s); border-color: rgba(230,57,70,.42); background: rgba(230,57,70,.11); }
.rang-abzeichen.a { color: var(--rang-a); border-color: rgba(244,162,97,.42); background: rgba(244,162,97,.11); }
.rang-abzeichen.b { color: var(--rang-b); border-color: rgba(76,201,240,.42); background: rgba(76,201,240,.11); }
.rang-abzeichen.c { color: var(--rang-c); border-color: var(--rand-hell); background: var(--flaeche-hoch); }

.mission-titel { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.mission-text { font-size: 13px; color: var(--text-leise); }

.mission-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.marke-pille {
  font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: var(--flaeche-hoch); border: 1px solid var(--rand);
  color: var(--text-leise); font-variant-numeric: tabular-nums;
}
.marke-pille.prio { color: var(--chakra); border-color: rgba(76,201,240,.3); }
.marke-pille.xp   { color: var(--gold);   border-color: rgba(244,162,97,.3); }

.mission-details {
  margin-top: 13px; padding-top: 13px;
  border-top: 1px solid var(--rand);
  display: none;
}
.mission.offen-details .mission-details { display: block; }
.details-block { margin-bottom: 12px; }
.details-block h4 {
  font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--text-still); margin-bottom: 4px;
}
.details-block p { font-size: 13px; color: var(--text-leise); }

.url-liste { max-height: 190px; overflow-y: auto; margin-top: 6px; }
.url-liste a {
  display: block; font-family: var(--mono); font-size: 11.5px;
  color: var(--chakra); text-decoration: none; padding: 2px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.url-liste a:hover { text-decoration: underline; }

/* ---------------- Tabellen ---------------- */

.tabelle-huelle { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--rand); }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--flaeche); }
th {
  text-align: left; padding: 10px 13px;
  font-size: 10.5px; letter-spacing: .9px; text-transform: uppercase;
  color: var(--text-still); background: var(--tinte);
  border-bottom: 1px solid var(--rand); white-space: nowrap;
  position: sticky; top: 0;
}
td { padding: 9px 13px; border-bottom: 1px solid rgba(35,40,56,.6); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(76,201,240,.04); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
td.pfad { font-family: var(--mono); font-size: 12px; color: var(--text-leise); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.punkt-score {
  display: inline-block; min-width: 38px; text-align: center;
  padding: 2px 7px; border-radius: 6px; font-weight: 650;
  font-variant-numeric: tabular-nums; font-size: 12.5px;
}

/* ---------------- Fortschritt / Crawl ---------------- */

.crawl-leiste {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 15px 17px; margin-bottom: 18px;
}
.crawl-balken { height: 7px; background: var(--tinte); border-radius: 4px; overflow: hidden; margin-top: 11px; }
.crawl-balken i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--chakra-tief), var(--chakra));
  transition: width .4s ease;
  box-shadow: 0 0 11px rgba(76,201,240,.5);
}
.crawl-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; }
.puls { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--chakra); animation: pulsieren 1.3s ease-in-out infinite; }
@keyframes pulsieren { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

/* ---------------- Projektkarten ---------------- */

.projekt-karte {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 17px;
  cursor: pointer; transition: border-color .17s, transform .17s, box-shadow .17s;
  position: relative; overflow: hidden;
}
.projekt-karte:hover {
  border-color: rgba(76,201,240,.4); transform: translateY(-2px); box-shadow: var(--schatten);
}
.projekt-karte .oben { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.projekt-karte h3 { font-size: 15.5px; font-weight: 620; margin-bottom: 2px; }
.projekt-karte .url { font-size: 11.5px; color: var(--text-still); font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.projekt-karte .fuss { display: flex; gap: 15px; font-size: 12px; color: var(--text-leise); margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--rand); }
.projekt-karte .fuss b { color: var(--text); font-variant-numeric: tabular-nums; }

.mini-ring { width: 54px; height: 54px; flex: none; position: relative; }
.mini-ring svg { transform: rotate(-90deg); }
.mini-ring .zahl {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ---------------- Rangleiste (XP) ---------------- */

.rang-leiste {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(100deg, rgba(244,162,97,.09), transparent 62%);
  border: 1px solid rgba(244,162,97,.22);
  border-radius: var(--radius); padding: 13px 17px;
}
/* Das Stirnband ersetzt das frühere Kästchen - es braucht mehr Breite
   und bringt seinen eigenen Fortschrittsbalken mit. */
.rang-leiste { gap: 18px; padding: 15px 18px; }
.rang-info { flex: 1; min-width: 0; }
.rang-info .name { font-size: 15px; font-weight: 650; color: var(--gold); }
.rang-info .fort { font-size: 11.5px; color: var(--text-leise); margin-top: 1px; }
.rang-balken { height: 5px; background: var(--tinte); border-radius: 3px; overflow: hidden; margin-top: 7px; }
.rang-balken i { display: block; height: 100%; background: linear-gradient(90deg, #b06f2e, var(--gold)); transition: width .9s; }

/* ---------------- Kennzahlkacheln ---------------- */

.kachel {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 15px 17px;
}
.kachel .k-label { font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-still); }
.kachel .k-wert { font-size: 27px; font-weight: 700; letter-spacing: -.9px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.kachel .k-zusatz { font-size: 12px; color: var(--text-leise); margin-top: 2px; }

/* ---------------- Meldungen ---------------- */

.hinweis {
  border-radius: var(--radius-s); padding: 12px 15px; font-size: 13px;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
}
.hinweis.info { background: rgba(76,201,240,.07); border-color: rgba(76,201,240,.26); color: #b9e6f7; }
.hinweis.warn { background: rgba(244,162,97,.07); border-color: rgba(244,162,97,.26); color: #f5d5b4; }
.hinweis.fehler { background: rgba(230,57,70,.08); border-color: rgba(230,57,70,.3); color: #ffb3b8; }
.hinweis.gut { background: rgba(86,211,100,.07); border-color: rgba(86,211,100,.26); color: #b7ecbe; }

.leer { text-align: center; padding: 54px 20px; color: var(--text-still); }
.leer .sym { font-size: 40px; opacity: .28; margin-bottom: 12px; }
.leer p { font-size: 13.5px; }

/* ---------------- Overlay / Login ---------------- */

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 5, 9, .86);
  backdrop-filter: blur(7px);
  display: grid; place-items: center; padding: 20px;
}
.overlay[hidden] { display: none; }
.dialog {
  background: var(--flaeche); border: 1px solid var(--rand-hell);
  border-radius: 18px; padding: 26px; width: min(460px, 100%);
  box-shadow: var(--schatten), var(--glanz);
  max-height: 90vh; overflow-y: auto;
}
.dialog h2 { font-size: 18px; margin-bottom: 5px; }
.dialog .unter { color: var(--text-leise); font-size: 13px; margin-bottom: 19px; }
.dialog-knoepfe { display: flex; gap: 9px; justify-content: flex-end; margin-top: 19px; }

.login-siegel {
  width: 62px; height: 62px; margin: 0 auto 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--sharingan) 0 24%, #7d1620 25% 45%, #12141c 46%);
  box-shadow: 0 0 26px rgba(230,57,70,.4);
  animation: siegel-dreh 11s linear infinite;
}

/* ---------------- Chart ---------------- */

.chart { width: 100%; height: 150px; }
.chart .linie { fill: none; stroke: var(--chakra); stroke-width: 2; }
.chart .flaeche-fuell { fill: url(#verlauf-fuellung); }
.chart .punkt { fill: var(--chakra); }
.chart .achse { stroke: var(--rand); stroke-width: 1; }
.chart text { fill: var(--text-still); font-size: 10px; }

/* ---------------- Reiter ---------------- */

.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 18px; flex-wrap: wrap; }
.reiter button {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-leise); padding: 9px 14px; cursor: pointer;
  font: inherit; font-size: 13px; transition: color .15s, border-color .15s;
}
.reiter button:hover { color: var(--text); }
.reiter button.aktiv { color: var(--chakra); border-bottom-color: var(--chakra); }

/* ---------------- Code ---------------- */

pre.code {
  background: var(--tinte); border: 1px solid var(--rand);
  border-radius: var(--radius-s); padding: 13px;
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  overflow-x: auto; color: #cfe8f5; max-height: 340px;
}

/* ---------------- Toast ---------------- */

.toast-bereich { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--flaeche-hoch); border: 1px solid var(--rand-hell);
  border-radius: var(--radius-s); padding: 11px 15px; font-size: 13px;
  box-shadow: var(--schatten); animation: toast-rein .28s ease;
  max-width: 330px;
}
.toast.gut { border-color: rgba(86,211,100,.4); }
.toast.fehler { border-color: rgba(230,57,70,.4); }
@keyframes toast-rein { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- Hilfsklassen ---------------- */

.reihe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reihe.eng { gap: 6px; }
.schieb { margin-left: auto; }
.leise { color: var(--text-leise); }
.still { color: var(--text-still); }
.klein { font-size: 12px; }
.mono { font-family: var(--mono); }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
[hidden] { display: none !important; }

.lader {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--rand-hell); border-top-color: var(--chakra);
  animation: dreh .75s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ---------------- Mobil ---------------- */

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

  /* Die Raster fordern sonst 320 px je Spalte - in einer Karte auf dem Handy
     stehen aber nur rund 300 px zur Verfuegung, und der Inhalt lief ueber. */
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .seitenleiste {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 12px; padding: 12px;
  }
  .marke { border-bottom: none; padding: 0; }
  .navi { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .navi-titel { display: none; }
  .inhalt { padding: 16px; }
  .chakra-ring { width: 138px; height: 138px; }
  .chakra-mitte .wert { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
