/* KranTeam Zentrale - Kacheln und Benutzerverwaltung (ergaenzt kranteam-design.css) */
.kacheln { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1340px) { .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kachel { --c1: #0257af; --c2: #01468e; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: linear-gradient(150deg, var(--c1), var(--c2)); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
          display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; padding: 12% 16px 16px; text-align: center; color: #fff;
          cursor: pointer; font: inherit; box-shadow: 0 2px 6px rgba(1, 40, 90, .18); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.kachel:nth-child(6n+2) { --c1: #0a6fb0; --c2: #0a4f86; }
.kachel:nth-child(6n+3) { --c1: #1a5bd0; --c2: #123f96; }
.kachel:nth-child(6n+4) { --c1: #0b7c9a; --c2: #075a73; }
.kachel:nth-child(6n+5) { --c1: #3b57c4; --c2: #2a3f94; }
.kachel:nth-child(6n+6) { --c1: #4a4fb8; --c2: #34378a; }
.kachel:hover, .kachel:focus-visible { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(1, 40, 90, .34), 0 0 0 1px rgba(255,255,255,.35) inset; filter: brightness(1.12) saturate(1.1); outline: none; }
.kachel:active { transform: translateY(-1px); }
.kachel.laedt { opacity: .6; pointer-events: none; }
.kachel .kachel-sym { width: 64px; height: 64px; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; border-radius: 16px; transition: background .16s ease; }
.kachel:hover .kachel-sym { background: rgba(255,255,255,.28); }
.kachel .kachel-sym svg { width: 36px; height: 36px; }
.kachel b { font-size: 16px; font-weight: 600; line-height: 1.25; color: #fff; }
.kachel span.t { font-size: 12.5px; color: rgba(255,255,255,.82); line-height: 1.4; }
/* Programm im Zentrale-Fenster */
.app.app-offen .sidebar { display: none; }
.app.app-offen .main { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.app-leiste { flex: 0 0 46px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--graphite-dark); color: #fff; border-bottom: 3px solid var(--yellow); }
.app-leiste .titel { font-weight: 600; letter-spacing: .02em; }
.app-leiste .rechts { margin-left: auto; font-size: 12.5px; color: #c9cdd2; }
.app-rahmen { flex: 1; position: relative; background: #fff; }
.app-rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.app-laden { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-weight: 500; background: var(--bg); }.leer-start { max-width: 520px; margin: 60px auto; text-align: center; color: var(--ink-2); }
.apps-haken { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.apps-haken .check.aus { color: var(--ink-3); }
.hinweis-box { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.liste td .apps-kurz { color: var(--ink-2); font-size: 12.5px; }
.login-card .feld { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .app { flex-direction: column; height: auto; } .sidebar { width: auto; flex: none; } .apps-haken { grid-template-columns: 1fr; } .main { padding: 20px 16px 40px; } }

/* ---------- Ladesymbol: das Desktop-Symbol der Zentrale, animiert ---------- */
.lade-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(16, 18, 22, .78); backdrop-filter: blur(4px); animation: lade-ein .25s ease backwards; }
.lade-box { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.lade-svg { width: 168px; height: 168px; overflow: visible; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55)); animation: lade-schweben 3.2s ease-in-out infinite; }
.lade-text { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .04em; text-shadow: 0 0 14px rgba(255, 255, 0, .35); }
.lade-text .punkte::after { content: ""; animation: lade-punkte 1.4s steps(1, end) infinite; }
.app-laden .lade-text { color: var(--ink); text-shadow: none; }
.lade-svg .ring { transform-origin: 100px 100px; animation: lade-dreh 2.6s linear infinite; }
.lade-svg .ring2 { transform-origin: 100px 100px; animation: lade-dreh 4.4s linear infinite reverse; }
.lade-svg .nabe { transform-origin: 100px 100px; animation: lade-puls 1.4s ease-in-out infinite; }
.lade-svg .sat { transform-box: fill-box; transform-origin: center; animation: lade-sat 1.4s ease-in-out infinite; }
.lade-svg .sat:nth-of-type(2) { animation-delay: .28s; } .lade-svg .sat:nth-of-type(3) { animation-delay: .56s; }
.lade-svg .sat:nth-of-type(4) { animation-delay: .84s; } .lade-svg .sat:nth-of-type(5) { animation-delay: 1.12s; }
.lade-svg .strahl { stroke-dasharray: 9 70; animation: lade-strahl 1.4s linear infinite; }
.lade-svg .strahl:nth-of-type(2) { animation-delay: .28s; } .lade-svg .strahl:nth-of-type(3) { animation-delay: .56s; }
.lade-svg .strahl:nth-of-type(4) { animation-delay: .84s; } .lade-svg .strahl:nth-of-type(5) { animation-delay: 1.12s; }
@keyframes lade-dreh { to { transform: rotate(360deg); } }
@keyframes lade-puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes lade-sat { 0%, 100% { transform: scale(.8); opacity: .55; } 40% { transform: scale(1.35); opacity: 1; } }
@keyframes lade-strahl { from { stroke-dashoffset: 79; } to { stroke-dashoffset: 0; } }
@keyframes lade-schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lade-ein { from { opacity: 0; } to { opacity: 1; } }
@keyframes lade-punkte { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) { .lade-svg, .lade-svg * { animation-duration: 6s !important; } }
.lade-overlay.weg { opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.app-wechsel { display: flex; gap: 4px; margin-left: 10px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); }
.app-chip { width: 34px; height: 30px; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: #aab1ba; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.app-chip .sym { width: 19px; height: 19px; }
.app-chip:hover { background: rgba(255,255,255,.14); color: #fff; transform: translateY(-1px); }
.app-chip.aktiv { background: var(--blue); color: #fff; box-shadow: 0 0 12px rgba(18,125,235,.65); cursor: default; }
/* Intro beim Öffnen eines Programms: Symbol „landet“ mit Stoßwelle, am Ende fliegt es auf den Bildschirm zu */
.lade-overlay.intro .lade-svg { animation: intro-ein .75s cubic-bezier(.2, 1.35, .3, 1) both, lade-schweben 3.2s ease-in-out .75s infinite; }
.lade-overlay.intro .lade-text { animation: intro-text .6s ease .35s both; }
.lade-welle { position: absolute; left: 50%; top: 50%; width: 168px; height: 168px; margin: -96px 0 0 -84px; border-radius: 42px; border: 3px solid rgba(255, 255, 0, .75); box-shadow: 0 0 40px rgba(255, 255, 0, .45), inset 0 0 30px rgba(255, 255, 0, .25); opacity: 0; animation: intro-welle 1.5s ease-out .25s infinite; pointer-events: none; }
.lade-welle.w2 { border-color: rgba(90, 169, 255, .8); box-shadow: 0 0 40px rgba(90, 169, 255, .45); animation-delay: .95s; }
.lade-overlay.intro.weg { opacity: 0; transition: opacity .26s ease .02s; }
.lade-overlay.intro.weg .lade-svg { transform: scale(1.5); opacity: 0; transition: transform .26s ease-in, opacity .26s ease-in; animation: none; }
@keyframes intro-ein { 0% { transform: scale(.15) rotate(-140deg); opacity: 0; filter: blur(10px) drop-shadow(0 0 0 rgba(0,0,0,0)); } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; filter: blur(0) drop-shadow(0 18px 34px rgba(0,0,0,.55)); } }
@keyframes intro-text { from { opacity: 0; transform: translateY(10px); letter-spacing: .3em; } to { opacity: 1; transform: none; letter-spacing: .04em; } }
@keyframes intro-welle { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
/* ---------- Startanimation der Zentrale ---------- */
[hidden] { display: none !important; }                 /* .app { display:flex } darf „hidden“ nicht aushebeln (sonst blitzt die Seitenleiste auf) */
.start-overlay { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #1a2130 0%, #0b0c0f 72%); }
.start-overlay.weg { opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.start-overlay.weg .start-box { transform: scale(1.1); transition: transform .8s ease; }
.start-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 34px; }
.start-bild { position: relative; width: 280px; height: 280px; display: grid; place-items: center; }
.start-bild .lade-svg { width: 280px; height: 280px; animation: start-ein 1.2s cubic-bezier(.2, .9, .25, 1) both, lade-schweben 3.4s ease-in-out 1.2s infinite; }
.start-halo { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 0, .2), rgba(18, 125, 235, .13) 42%, transparent 68%); opacity: 0; animation: start-halo 1.6s ease .5s both; }
.start-blitz { position: absolute; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffff9a 38%, transparent 70%); opacity: 0; animation: start-blitz 1s ease-out 1.45s both; pointer-events: none; }
.start-welle { position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; margin: -140px 0 0 -140px; border-radius: 70px; border: 3px solid rgba(255, 255, 0, .8); box-shadow: 0 0 50px rgba(255, 255, 0, .5); opacity: 0; animation: intro-welle 1.5s ease-out 1.45s both; pointer-events: none; }
.start-welle.w2 { border-color: rgba(90, 169, 255, .85); box-shadow: 0 0 50px rgba(90, 169, 255, .5); animation-delay: 1.8s; }
.start-titel { color: #fff; font-weight: 700; font-size: 30px; letter-spacing: .42em; text-transform: uppercase; opacity: 0; animation: start-text 1.1s ease 1.2s both; text-shadow: 0 0 26px rgba(255, 255, 0, .4); padding-left: .42em; }
.start-titel b { color: var(--yellow); font-weight: 700; }
.start-sub { color: #8f99a6; letter-spacing: .32em; font-size: 12px; text-transform: uppercase; opacity: 0; animation: start-text 1s ease 1.7s both; padding-left: .32em; margin-top: -20px; }
@keyframes start-ein { 0% { opacity: 0; transform: scale(.5); filter: blur(20px) brightness(.4); } 100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); } }
@keyframes start-halo { to { opacity: 1; } }
@keyframes start-blitz { 0% { opacity: .95; transform: scale(.4); } 100% { opacity: 0; transform: scale(24); } }
@keyframes start-text { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-card, .app { animation: seite-ein .6s ease both; }
@keyframes seite-ein { from { opacity: 0; } to { opacity: 1; } }   /* nur Einblenden, keine Bewegung: sonst „springen“ die Kacheln */
/* Programmwechsel: dunkle Animation bleibt, bis alles bereit ist; weich ausblenden */
.app-rahmen { background: #16171a; }
.lade-overlay.intro { transition: opacity 1.2s cubic-bezier(.45, 0, .2, 1), backdrop-filter 1.2s ease, background-color 1.2s ease; }
.lade-overlay.intro.weg { opacity: 0; background-color: rgba(16, 18, 22, 0); backdrop-filter: blur(0); transition: opacity 1.2s cubic-bezier(.45, 0, .2, 1), backdrop-filter 1.2s ease, background-color 1.2s ease; }
.lade-overlay.intro.weg .lade-svg { transform: scale(1.1); opacity: 0; filter: blur(3px) drop-shadow(0 18px 34px rgba(0, 0, 0, .4)); transition: transform 1.1s cubic-bezier(.3, 0, .2, 1), opacity .9s ease .05s, filter 1.1s ease; animation: none; }
.lade-overlay.intro.weg .lade-text { opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .9s ease; }
.lade-overlay.intro.weg .lade-welle { opacity: 0 !important; animation: none; }
.app-rahmen iframe { transition: opacity 1.1s cubic-bezier(.3, 0, .2, 1); }
/* Ansehen/Bearbeiten je Programm im Benutzerfenster */
.apps-haken { grid-template-columns: 1fr !important; gap: 2px 0; }
.app-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0; border-bottom: 1px solid var(--line); }
.app-zeile .check { height: 34px; }
.stufe { height: 30px; min-width: 120px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid #cfd4da; background: #fff; border-radius: 0; }
.stufe.fest { display: inline-grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.stufe:disabled { opacity: .45; }
/* Beenden: Startanimation rückwärts – Titel verschwindet, Welle zieht sich zusammen, Icon schrumpft, wird unscharf und erlischt */
.app-leiste .btn-rot { margin-left: 14px; }
.start-overlay.rueck { animation: ende-bg .45s ease both; }
.rueck .start-halo { animation: ende-halo 1.4s ease .2s both; opacity: 1; }
.rueck .start-bild .lade-svg { animation: ende-icon 1.5s cubic-bezier(.55, 0, .75, .35) .35s both; }
.rueck .start-welle { animation: ende-welle 1.2s ease-in .25s both; }
.rueck .start-welle.w2 { animation-delay: .5s; }
.rueck .start-titel, .rueck .start-sub { opacity: 1; animation: ende-text .8s ease .1s both; }
.rueck .start-sub { animation-delay: .2s; }
@keyframes ende-bg { from { opacity: 0; } to { opacity: 1; } }
@keyframes ende-icon { 0% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); } 100% { opacity: 0; transform: scale(.45) rotate(60deg); filter: blur(22px) brightness(.35); } }
@keyframes ende-halo { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ende-welle { 0% { opacity: 0; transform: scale(2.4); } 40% { opacity: .75; } 100% { opacity: 0; transform: scale(.55); } }
@keyframes ende-text { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px); } }
/* ---------- Kacheln: gruppiert, nur Symbol + Titel, Text beim Hovern ---------- */
.kat { margin-bottom: 30px; }
.kat-titel { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.kat-titel::before { content: ""; width: 26px; height: 9px; background: var(--yellow); transform: skewX(-20deg); }
.kat-titel::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kachel { justify-content: center !important; gap: 10px !important; padding: 8% 12px 10px !important; }
.kachel .kachel-sym { width: 84px; height: 84px; border-radius: 20px; }
.kachel .kachel-sym svg { width: 48px; height: 48px; }
.kachel b { font-size: 16px; }
.kachel .t { max-height: 0; opacity: 0; overflow: hidden; margin-top: -6px; font-size: 12px; line-height: 1.35; transition: max-height .22s ease, opacity .2s ease, margin .22s ease; }
.kachel:hover .t, .kachel:focus-visible .t { max-height: 53px; opacity: 1; margin-top: 0; }
.kachel::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; background: var(--yellow); border-radius: 3px 3px 0 0; opacity: 0; transform: scaleX(.4); transition: opacity .2s, transform .2s; }
.kachel { position: relative; }
.kachel:hover::after, .kachel:focus-visible::after { opacity: 1; transform: none; }
/* Farbwelten je Kategorie (innerhalb der KranTeam-Farben) */
.kachel[data-kat="personal"] { --c1: #4a52c4; --c2: #323a94; }
.kachel[data-kat="fuhrpark"] { --c1: #0b7f9c; --c2: #066078; }
.kachel[data-kat="vertrieb"] { --c1: #0560b8; --c2: #02458c; }
.kachel[data-kat="finanzen"] { --c1: #3f4d68; --c2: #283247; }
.kachel[data-kat]:nth-child(even) { filter: brightness(1.07); }
.kachel[data-kat]:hover { filter: brightness(1.14) saturate(1.1); }
/* ---------- Favoriten ---------- */
.stern { position: absolute; top: 9px; right: 9px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: rgba(255,255,255,.7); opacity: 0; transition: opacity .15s, background .15s, transform .15s; cursor: pointer; z-index: 2; }
.stern svg { width: 19px; height: 19px; }
.kachel:hover .stern, .kachel:focus-visible .stern { opacity: 1; }
.stern:hover { background: rgba(255,255,255,.2); transform: scale(1.12); }
.stern.an { opacity: 1; color: var(--yellow); }
.stern.an svg { fill: currentColor; filter: drop-shadow(0 0 5px rgba(255,255,0,.55)); }
.kat.fav .kat-titel::before { background: var(--yellow); }
.kachel.zieht { opacity: .35; transform: scale(.96); }
.kachel.ziel { outline: 3px dashed var(--yellow); outline-offset: 3px; }
.kachel[draggable="true"] { cursor: grab; }
.kachel[draggable="true"]:active { cursor: grabbing; }
/* Kacheln „in Arbeit“ (apps.json status = inArbeit): ausgegraut mit gelbem Band; öffnen nur Administratoren */
.kachel.in-arbeit { --c1: #8b9099; --c2: #646973; filter: none; opacity: .8; cursor: default; }
.kachel.in-arbeit:hover, .kachel.in-arbeit:focus-visible { transform: none; box-shadow: none; filter: none; opacity: .92; }
.kachel.in-arbeit::after { display: none; }
.kachel.in-arbeit .t { color: rgba(255,255,255,.92); }   /* Beschreibung erscheint wie bei allen Kacheln beim Drüberfahren */
.kachel.in-arbeit:hover .t, .kachel.in-arbeit:focus-visible .t { max-height: 62px; opacity: 1; margin-top: 0; }
.kachel.in-arbeit .kachel-sym { background: rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
.arbeit-band { position: absolute; top: 14px; left: -36px; width: 150px; padding: 4px 0; transform: rotate(-35deg); background: var(--yellow, #ffff00); color: #050505;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.arbeit-admin { position: absolute; right: 10px; bottom: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: #fff; background: rgba(0,0,0,.28); padding: 2px 7px; }
.kachel.in-arbeit[data-arbeit] { cursor: not-allowed; }

/* Kachel „in Arbeit“ für Administratoren: das Schild unten rechts hat Vorrang, die Beschreibung wird mit „…“ gekürzt */
.kachel.in-arbeit.mit-admin { padding-bottom: 34px !important; }
.kachel.in-arbeit.mit-admin .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-overflow: ellipsis; }
.kachel.in-arbeit.mit-admin:hover .t, .kachel.in-arbeit.mit-admin:focus-visible .t { max-height: 34px; }
.arbeit-admin { z-index: 1; white-space: nowrap; }
/* Baustellenfenster */
.modal.baustelle { overflow: hidden; }
.baustelle-band { height: 16px; flex: 0 0 16px; background: repeating-linear-gradient(-45deg, #ffff00 0 16px, #050505 16px 32px); }
.baustelle-inhalt { display: flex; gap: 16px; align-items: center; margin: 6px 0 14px; }
.baustelle-sym { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; background: #e4e6e9; color: var(--ink-2); }
.baustelle-sym svg { width: 36px; height: 36px; }
.baustelle-inhalt b { font-size: 17px; }
.baustelle-text { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.baustelle-hinweis { margin: 0; color: var(--ink-2); line-height: 1.5; }

/* ---------- Feste Kachelgroesse + Favoriten-Optik (Paket Kachelgroesse) ---------- */
.kacheln { grid-template-columns: repeat(auto-fill, 208px) !important; justify-content: start; gap: 22px !important; }
.kachel { width: 208px; }
.kachel .kachel-sym { width: 82px !important; height: 82px !important; border-radius: 21px !important; }
.kachel .kachel-sym svg { width: 46px !important; height: 46px !important; }
.kachel b { font-size: 15.8px !important; }
.kachel .t { font-size: 12.5px !important; }
.stern { top: 6px; right: 6px; width: 28px; height: 28px; }
.stern svg { width: 17px; height: 17px; }
/* Favoriten-Abschnitt: gelbe Umrandung + gelbe Ecke "Favorit" */
.kat.fav .kachel { border: 2px solid var(--yellow); box-shadow: 0 0 0 1px rgba(255,255,0,.25), 0 3px 10px rgba(1,40,90,.28); }
.kat.fav .kachel::before { content: "Favorit"; position: absolute; top: 0; left: 0; z-index: 3; padding: 3px 9px 3px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1a1a1a; background: var(--yellow); border-radius: 12px 0 10px 0; pointer-events: none; }