@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap');

/* OpenCPO Charge App Skin — Auto-generated from Stitch export */
/* Generator: stitch-to-skin v1.0 */

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

:root {
  --bg: #f8fafb;
  --bg2: #f2f4f5;
  --bg3: #e8eaeb;
  --bg-deep: #ffffff;
  --card: #ffffff;
  --card-hover: #f2f4f5;
  --border: #dde3e8;
  --border-strong: #bcc8d0;
  --accent: #006686;
  --accent2: #00B0E4;
  --on-accent: #ffffff;
  --green: #476800;
  --green-bright: #5c8200;
  --red: #ba1a1a;
  --yellow: #7c5800;
  --text: #191c1d;
  --text1: #191c1d;
  --text2: #5f6b72;
  --text3: #8d979e;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --font-headline: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-label: 'Inter', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
  --card2: rgba(0,0,0,0.04);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Screens ── */

.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.screen.active {
  display: flex;
}

/* ── Loading ── */

#loading {
  align-items: center;
  justify-content: center;
}

.loading-inner {
  text-align: center;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 0 12px #6fd2ff40);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Header ── */

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}

.header-subtitle {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-footer {
  text-align: center;
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
}

.app-footer a {
  color: var(--text3);
  text-decoration: none;
}

/* ── Page content ── */

.page-content {
  flex: 1;
  padding: 24px 20px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* ── Charger card ── */

.charger-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.charger-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.location-icon {
  font-size: 18px;
}

.location-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  font-family: var(--font-label);
}

.charger-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--font-headline);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.available {
  background: #a2cce326;
  color: var(--green);
  border: 1px solid #a2cce34d;
}

.status-badge.preparing {
  background: var(--yellow, #eab308)26;
  color: var(--yellow);
  border: 1px solid var(--yellow, #eab308)4d;
}

.status-badge.occupied {
  background: #6fd2ff26;
  color: var(--accent);
  border: 1px solid #6fd2ff4d;
}

.status-badge.loading {
  background: var(--yellow, #eab308)26;
  color: var(--yellow);
  border: 1px solid var(--yellow, #eab308)4d;
}

/* ── Rate display ── */

.rate-display {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.rate-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  font-family: var(--font-headline);
}

.rate-label {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rate-note {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

/* ── Step guide ── */

.step-guide {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.step-item + .step-item {
  margin-top: 8px;
}

.step-item.active {
  opacity: 1;
}

.step-item.done {
  opacity: 0.5;
}

.step-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text1);
  font-family: var(--font-label);
}

.step-desc {
  font-size: 12px;
  color: var(--text3);
}

/* ── Info note ── */

.info-note {
  background: #6fd2ff14;
  border: 1px solid #6fd2ff33;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 20px;
  line-height: 1.5;
}

.info-note strong {
  color: var(--accent);
}

/* ── Buttons ── */

.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  font-family: var(--font-headline);
  letter-spacing: 0.02em;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--on-accent);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary.btn-ready {
  background: linear-gradient(135deg, #a2cce3, #bbe6fd);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--red));
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
}

.btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: #6fd2ff1a;
  border: 1px solid #6fd2ff4d;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-headline);
}

/* ── Form ── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-label);
}

.form-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #6fd2ff26;
}

.form-input::placeholder {
  color: var(--text3);
}

/* ── Live session ── */

.power-display {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  margin-bottom: 16px;
  text-align: center;
}

.power-value {
  font-size: 80px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-headline);
}

.power-unit {
  font-size: 20px;
  color: var(--text2);
  margin-top: 4px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.session-stats {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 14px;
  color: var(--text2);
  font-family: var(--font-label);
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-value.mono {
  font-family: var(--font-mono);
}

/* ── SoC battery bar ── */

.soc-bar {
  position: relative;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.soc-fill {
  height: 100%;
  background: linear-gradient(90deg, #a2cce3, #bbe6fd);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transition: width 1s ease;
}

.soc-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-family: var(--font-headline);
}

/* ── Receipt ── */

.receipt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.receipt-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.receipt-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-headline);
}

.receipt-subtitle {
  font-size: 13px;
  color: var(--text2);
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #bcc8d033;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-row.total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-headline);
}

.receipt-row .label {
  color: var(--text2);
}

.receipt-row .value {
  font-weight: 600;
  color: var(--text);
}

.success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── Map & Tab Layout ── */

.hidden { display: none !important; }
.home-screen { display: flex; flex-direction: column; height: 100dvh; }
.home-tab-content { flex: 1; position: relative; overflow: hidden; }
#charger-map { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }

.bottom-tab-bar {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
  font-family: var(--font-label);
}

.bottom-tab.active { color: var(--accent); }

/* ── Map controls ── */

.map-geo-btn {
  position: absolute;
  bottom: 100px;
  right: 12px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.map-zoom-controls {
  position: absolute;
  bottom: 160px;
  right: 12px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1100;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Bottom sheet ── */

.map-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1200;
  max-height: 60vh;
  overflow-y: auto;
}

.map-bottom-sheet.open {
  transform: translateY(0);
  padding: 16px 20px 24px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.sheet-charger-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-headline);
}

.sheet-charger-addr {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

.sheet-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sheet-btn-nav {
  background: var(--accent);
  color: var(--on-accent);
}

/* ── Session charger info ── */

.session-charger-info {
  text-align: center;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.session-charger-name {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-headline);
}

.session-charger-detail {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
  font-family: var(--font-label);
}

/* ── Error ── */

.error-card {
  background: #ba1a1a1a;
  border: 1px solid #ba1a1a4d;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ── Utility ── */

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.text-center { text-align: center; }
.text-muted { color: var(--text2); font-size: 13px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Live indicator ── */

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 8px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-green 1.5s ease-in-out infinite;
}

/* ── Animations ── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html { scroll-behavior: smooth; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-content {
  animation: fadeSlideUp 0.35s ease-out;
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.charger-card {
  animation: cardEntry 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes availPulse {
  0%, 100% { box-shadow: 0 0 0 0 #a2cce34d; }
  50% { box-shadow: 0 0 12px 4px #a2cce326; }
}

.status-badge.available {
  animation: availPulse 2s ease-in-out infinite;
}

.btn {
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px #6fd2ff4d;
}

@keyframes chargingGlow {
  0%, 100% { box-shadow: 0 0 20px #6fd2ff14; }
  50% { box-shadow: 0 0 40px #6fd2ff33; }
}

.charging-active {
  animation: chargingGlow 2s ease-in-out infinite;
  border-color: var(--accent) !important;
}

@keyframes charging-glow {
  0%, 100% { filter: drop-shadow(0 0 8px #6fd2ff4d); }
  50% { filter: drop-shadow(0 0 24px #6fd2ffb3) drop-shadow(0 0 48px #a2cce333); }
}

.power-value.charging {
  animation: charging-glow 2s ease-in-out infinite;
}

@keyframes otpSuccess {
  0% { border-color: var(--border); }
  50% { border-color: var(--green); box-shadow: 0 0 12px #a2cce34d; }
  100% { border-color: var(--green); }
}

.otp-success {
  animation: otpSuccess 0.6s ease-out forwards;
}

@keyframes checkBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.check-bounce {
  animation: checkBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pinDrop {
  0% { transform: translateY(-20px); opacity: 0; }
  60% { transform: translateY(3px); opacity: 1; }
  100% { transform: translateY(0); }
}

.leaflet-marker-icon {
  animation: pinDrop 0.4s ease-out;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.error-card {
  animation: errorShake 0.4s ease-out;
}

/* ── Leaflet z-index overrides ── */

.leaflet-top, .leaflet-bottom { z-index: 999 !important; }
.leaflet-pane { z-index: 400 !important; }
.leaflet-tile-pane { z-index: 200 !important; }
.leaflet-overlay-pane { z-index: 400 !important; }
.leaflet-marker-pane { z-index: 600 !important; }
.leaflet-tooltip-pane { z-index: 650 !important; }
.leaflet-popup-pane { z-index: 700 !important; }

/* ── User dot ── */

.user-dot-outer {
  width: 20px; height: 20px; border-radius: 50%;
  background: #6fd2ff4d;
  display: flex; align-items: center; justify-content: center;
  animation: userPulse 2s ease-in-out infinite;
}

.user-dot-inner {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}

@keyframes userPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ── Scan ── */

@keyframes scanLine {
  0%, 100% { top: 10%; }
  50% { top: 90%; }
}

/* ── Pin marker ── */

.charger-marker-wrap { background: none !important; border: none !important; }

.pin-pulse {
  animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {
  0%, 100% { filter: drop-shadow(0 0 0px transparent); }
  50% { filter: drop-shadow(0 0 8px #6fd2ff80); }
}


/* =========================================================
   WaMiBo Charge
   Custom overrides
   ========================================================= */

:root {
    --bg: #f5f7f9;
    --bg2: #eef3f5;
    --bg3: #e5ecef;
    --bg-deep: #ffffff;

    --card: #ffffff;
    --card-hover: #f7fafb;

    --border: #dde4e8;
    --border-strong: #c5d0d6;

    --accent: #007c9e;
    --accent2: #00a9cf;

    --green: #3e7b36;
    --green-bright: #4e9344;

    --text: #172126;
    --text1: #172126;
    --text2: #526169;
    --text3: #7c8a91;

    --radius: 1rem;
    --radius-sm: .7rem;
}

/* Mehr Platz auf Desktop */
.page-content {
    max-width: 760px;
    padding: 32px 24px;
}

/* Karten moderner und leichter */
.charger-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 8px 28px rgba(15, 23, 42, .06);
}

/* Titel */
.charger-title {
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

/* Status weniger technisch */
.status-badge {
    text-transform: none;
    letter-spacing: 0;
    border-radius: 999px;
    font-size: 14px;
    padding: 6px 12px;
}

.status-badge.available {
    background: #edf7ec;
    color: #32702c;
    border-color: #cde5ca;
}

/* Buttons */
.btn-primary,
button.btn-primary {
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    min-height: 50px;
    font-weight: 650;
    box-shadow: 0 5px 16px rgba(0, 124, 158, .18);
}

.btn-primary:hover,
button.btn-primary:hover {
    background: #006c89;
}

/* Kopfbereich dezenter */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding-top: 22px;
    padding-bottom: 18px;
}

/* Mobile bleibt kompakt */
@media (max-width: 600px) {
    .page-content {
        max-width: 100%;
        padding: 18px 14px;
    }

    .charger-card {
        padding: 20px;
        border-radius: 16px;
    }

    .charger-title {
        font-size: 22px;
    }
}
