/*!
 * Modul Spedition – Live-Karte, Cockpit, Liga, Fahrtenbuch. Farben über --sp-… (Layouts können sie setzen), sonst aus --gsi-accent.
 * © 2026 gameserver-install.de · by rumpel
 */
.sp, .sp-map, .sp-box { --sp-accent: var(--gsi-accent, #f59e0b); --sp-road: var(--sp-accent); --sp-glow: var(--sp-accent); --sp-truck: #22d3ee; --sp-city: currentColor;
    --sp-text: currentColor; --sp-card: var(--gsi-surface, rgba(127,127,127,.08)); --sp-line: var(--gsi-border, rgba(127,127,127,.25)); --sp-muted: var(--gsi-muted, #888);
    --sp-up: #22c55e; --sp-down: #ef4444; }
.sp { display: grid; gap: 22px; }
.sp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sp-head h1 { margin: 0; }
.sp-kicker { margin: 0 0 6px; font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sp-accent); }
.sp-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sp-nav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--sp-line); text-decoration: none; font-weight: 600; font-size: .9rem; color: inherit; }
.sp-nav a:hover, .sp-nav a.is-active { border-color: var(--sp-accent); color: var(--sp-accent); }
.sp-btn, .sp-nav a.sp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--sp-accent); color: var(--gsi-accent-ink, #111); font-weight: 700; text-decoration: none; cursor: pointer; font: inherit; font-weight: 700; }
.sp-btn--ghost { background: transparent; border: 1px solid var(--sp-line); color: inherit; }
.sp-muted { color: var(--sp-muted); }
.sp-card { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 18px; padding: 20px 22px; min-width: 0; }
.sp-card h2 { margin: 0 0 14px; font-size: 1.2rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sp-card h2 small { font-size: .78rem; font-weight: 500; color: var(--sp-muted); }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.sp-grid--wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.sp-more { margin: 12px 0 0; font-size: .88rem; }
.sp-inline { display: inline; margin: 0 6px 6px 0; }

/* Zahlen */
.sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.sp-stats div { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; }
.sp-stats b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sp-stats span { font-size: .8rem; color: var(--sp-muted); }

/* Karte */
.sp-map { position: relative; height: clamp(360px, 56vh, 640px); border-radius: 20px; overflow: hidden; border: 1px solid var(--sp-line);
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.04), transparent 70%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 48px 48px, #0b0f16; color: #e5e7eb; --sp-text: #e5e7eb; --sp-city: #cbd5e1; }
.sp-map__canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sp-map__top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.sp-map__top > * { pointer-events: auto; }
.sp-map__games { display: inline-flex; background: rgba(0,0,0,.55); border-radius: 999px; padding: 4px; backdrop-filter: blur(8px); }
.sp-map__games button { border: 0; background: none; color: #e5e7eb; font: 700 .8rem/1 system-ui, sans-serif; letter-spacing: .08em; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.sp-map__games button[aria-pressed="true"] { background: var(--sp-accent); color: #111; }
.sp-map__live { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.55); border-radius: 999px; padding: 8px 14px; font-size: .85rem; backdrop-filter: blur(8px); }
.sp-map__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-up); box-shadow: 0 0 0 0 var(--sp-up); animation: sp-ping 1.8s infinite; }
@keyframes sp-ping { 70% { box-shadow: 0 0 0 8px transparent; } }
.sp-map__zoom { position: absolute; right: 14px; bottom: 14px; display: grid; gap: 6px; }
.sp-map__zoom button { width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1.1rem; cursor: pointer; }
.sp-map__tip { position: absolute; z-index: 2; max-width: 210px; background: rgba(10,12,18,.92); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: .82rem; pointer-events: none; }
.sp-map__tip small { color: var(--sp-accent); font-weight: 700; }
.sp-map__empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 40px; color: #94a3b8; margin: 0; }
.sp-map__empty[hidden] { display: none; }

/* Tabellen, Listen */
.sp-table { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sp-table li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; }
.sp-table li:nth-child(odd) { background: rgba(127,127,127,.06); }
.sp-table li.is-up { box-shadow: inset 3px 0 0 var(--sp-up); }
.sp-table li.is-down { box-shadow: inset 3px 0 0 var(--sp-down); }
.sp-pos { font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sp-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.sp-who img { border-radius: 50%; object-fit: cover; flex: none; }
.sp-who span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-who small { font-weight: 500; font-size: .75rem; color: var(--sp-muted); }
.sp-rating { font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-km { font-size: .82rem; color: var(--sp-muted); white-space: nowrap; }
.sp-ltable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sp-ltable th, .sp-ltable td { padding: 9px 10px; border-bottom: 1px solid var(--sp-line); text-align: left; }
.sp-ltable th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-muted); }
.sp-ltable tr.is-up td:first-child { box-shadow: inset 3px 0 0 var(--sp-up); color: var(--sp-up); }
.sp-ltable tr.is-down td:first-child { box-shadow: inset 3px 0 0 var(--sp-down); color: var(--sp-down); }
.sp-ltable tr.is-me td { background: color-mix(in srgb, var(--sp-accent) 12%, transparent); }
.sp-scroll { overflow-x: auto; }
.sp-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-jobs li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.sp-jobs li span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sp-jobs small { color: var(--sp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-jobs time { font-size: .78rem; color: var(--sp-muted); white-space: nowrap; }
.sp-q { display: inline-grid; place-items: center; min-width: 38px; height: 30px; border-radius: 10px; font-weight: 800; font-size: .9rem; color: #111; }
.sp-q--a { background: #4ade80; } .sp-q--b { background: #facc15; } .sp-q--c { background: #f87171; }
.sp-rules { padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--sp-line); font-size: .9rem; }
.sp-rules p { margin: 0; }

/* Trophäen */
.sp-trophies { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-trophy { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.sp-trophy .sp-cup { grid-row: span 2; font-size: 1.6rem; text-align: center; }
.sp-trophy small { color: var(--sp-muted); }
.sp-trophy--1 .sp-cup { filter: drop-shadow(0 0 6px #fbbf24); }
.sp-trophy--2 .sp-cup { filter: grayscale(1) brightness(1.4); }
.sp-trophy--3 .sp-cup { filter: sepia(1) hue-rotate(-20deg) saturate(1.6) brightness(.85); }
.sp-fame { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sp-trophycount { margin: 8px 0 0; display: flex; gap: 12px; flex-wrap: wrap; font-weight: 600; }

/* Fahrer */
.sp-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.sp-profile__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.sp-profile__img--empty { display: grid; place-items: center; background: var(--sp-accent); color: #111; font-size: 2.4rem; font-weight: 800; }
.sp-profile h1 { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp-profile__stats { display: flex; gap: 18px; }
.sp-profile__stats div { display: flex; flex-direction: column; align-items: center; }
.sp-profile__stats b { font-size: 1.6rem; }
.sp-profile__stats span { font-size: .78rem; color: var(--sp-muted); }
.sp-badge { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.sp-badge--live { background: var(--sp-up); color: #052e12; }
.sp-bar { height: 8px; border-radius: 8px; background: rgba(127,127,127,.2); overflow: hidden; margin: 6px 0; }
.sp-bar span { display: block; height: 100%; width: 0; background: var(--sp-accent); border-radius: 8px; transition: width .6s; }
.sp-bar--warn span { background: var(--sp-down); }

/* Cockpit */
.sp-cockpit { display: grid; gap: 16px; padding: 22px; border-radius: 24px; background: linear-gradient(160deg, #111827, #05070b); color: #e5e7eb; border: 1px solid rgba(255,255,255,.08); }
.sp-cockpit__state { margin: 0; font-size: .85rem; color: #94a3b8; }
.sp-cockpit.is-online .sp-cockpit__state { color: var(--sp-up); }
.sp-dash { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(220px, 1.2fr); gap: 16px; align-items: center; }
.sp-gauge { position: relative; }
.sp-gauge svg { width: 100%; display: block; }
.sp-gauge__track { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 14; stroke-linecap: round; }
.sp-gauge__val { fill: none; stroke: var(--sp-accent); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 0 100; opacity: 0; transition: stroke-dasharray .4s, opacity .3s; }
.sp-gauge__val.is-on { opacity: 1; }
.sp-gauge__val--rpm { stroke: #22d3ee; }
.sp-gauge__limit { stroke: #ef4444; stroke-width: 4; stroke-linecap: round; }
.sp-cockpit.is-over .sp-gauge__val { stroke: #ef4444; }
.sp-gauge__num { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; display: flex; flex-direction: column; }
.sp-gauge__num b { font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-gauge__num small { color: #94a3b8; }
.sp-limit { position: absolute; top: 0; right: 4%; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 5px solid #dc2626; display: grid; place-items: center; color: #111; font-weight: 800; }
.sp-limit[hidden] { display: none; }
.sp-gear { position: absolute; top: 0; right: 4%; min-width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.sp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-tile { background: rgba(255,255,255,.05); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.sp-tile small, .sp-jobcard small { color: #94a3b8; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.sp-tile b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-jobcard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sp-jobcard > div { background: rgba(255,255,255,.05); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.sp-jobcard b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-jobcard span { font-size: .82rem; color: #94a3b8; }
.sp-card--key { border-color: var(--sp-accent); }
.sp-key { display: block; padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; background: rgba(0,0,0,.35); word-break: break-all; font-size: .95rem; }
.sp-check { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.sp-box__count { margin: 0 0 6px; }
.sp-box ul { margin: 0 0 6px; padding-left: 1.1em; }

@media (max-width: 900px) {
    .sp-grid--wide, .sp-dash { grid-template-columns: 1fr; }
    .sp-jobcard { grid-template-columns: 1fr 1fr; }
    .sp-profile { grid-template-columns: auto 1fr; }
    .sp-profile__stats { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .sp-map__live i { animation: none; } }
.sp-list { margin: 6px 0 14px; padding-left: 1.2em; line-height: 1.6; }
.sp-more summary { cursor: pointer; color: var(--sp-muted, inherit); }
