@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800;900&display=swap');
  
*, *::before, *::after {
  box-sizing: border-box !important;
}

:root {
  color-scheme: dark;
  --bg: #09090b; --card: #18181b; --border: #27272a; --text: #f8fafc; --muted: #a1a1aa;
  --taxi: #eab308; --life: #14b8a6; --driver: #3b82f6; --fleet: #10b981; --cargo: #8b5cf6; 
  --sped: #f59e0b; --quote: #d946ef; --fuel: #f59e0b; --plan: #a855f7;
  --success: #22c55e; --danger: #ef4444; --warning: #eab308; --info: #0ea5e9;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
.app-container { max-width: 500px; width: 100%; margin: 0 auto; min-height: 100vh; padding-bottom: 120px; position: relative; z-index: 1; overflow-x: hidden;}

.wiz-bg { position: fixed; top: 0; left: 0; right: 0; height: 60vh; background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 70%); z-index: -1; pointer-events: none; }
.panel { background: linear-gradient(145deg, #18181b, #121214); border: 1px solid rgba(255,255,255,0.05); border-radius: 20px; margin: 12px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); position: relative; overflow: hidden; width: calc(100% - 24px); max-width: 100%; }
.p-title { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center; letter-spacing: 1px;}
.form-section { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 14px; border-radius: 14px; margin-bottom: 12px; width: 100%; max-width: 100%;}
.fs-title { font-size: 0.75rem; text-transform: uppercase; font-weight: 800; margin-bottom: 10px; color: var(--muted); display:flex; align-items:center; gap:8px;}

.btn { width: 100%; padding: 15px; border-radius: 14px; border: none; font-weight: 900; font-size: 0.95rem; cursor: pointer; text-transform: uppercase; transition: all 0.2s; margin-top: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.3); max-width: 100%; }
.btn:active { transform: translateY(2px) scale(0.98); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.btn-driver { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3); } 
.btn-home { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);} 
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);}
.btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);}
.btn-quote { background: linear-gradient(135deg, #d946ef, #c026d3); color: #fff;}

.inp-row { display: flex; gap: 10px; margin-bottom: 10px; width: 100%; max-width: 100%;}
.inp-group { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.inp-group label { font-size: 0.65rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; padding-left: 4px; text-transform: uppercase; letter-spacing: 0.5px;}
.inp-group input, .inp-group select { background: #000; border: 1px solid var(--border); color: #fff; padding: 14px; border-radius: 12px; font-size: 1rem; font-weight: 600; outline: none; width: 100%; max-width: 100%; box-sizing: border-box; transition: 0.3s; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);}
.inp-group input:focus, .inp-group select:focus { border-color: var(--driver); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.big-inp { font-size: 1.8rem !important; padding: 15px !important; font-weight: 900 !important; text-align: center !important; letter-spacing:-1px; width: 100%; max-width: 100%; }

/* --- PRZYWRÓCONE PIĘKNE KARTY (WIZARD) --- */
.wiz-screen { display: none; padding: 20px; min-height: 95vh; flex-direction: column; justify-content: center; animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1); width: 100%; max-width: 100%; }
.wiz-screen.active { display: flex; }
@keyframes fadeIn { from {opacity:0; transform:translateY(20px);} to {opacity:1; transform:translateY(0);} }

.w-title { font-size: 2.5rem; font-weight: 900; text-align: center; margin-bottom: 5px; letter-spacing: -1.5px; color:#fff;}
.w-sub { color: var(--muted); text-align: center; margin-bottom: 30px; font-size: 1rem; font-weight: 600; text-transform:uppercase; letter-spacing:1px;}
.premium-input { background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.1); color: #fff; font-size: 2rem; font-weight: 900; text-align: center; padding: 20px; border-radius: 20px; width: 100%; max-width: 100%; box-sizing: border-box; transition: all 0.3s; box-shadow: inset 0 5px 15px rgba(0,0,0,0.3); letter-spacing: -1px; margin-bottom: 20px;}
.premium-input:focus { border-color: var(--driver); background: rgba(59,130,246,0.05); box-shadow: 0 0 20px rgba(59,130,246,0.3); outline: none; }
.opt-card { background: linear-gradient(145deg, #1e1e22, #121214); border: 2px solid rgba(255,255,255,0.05); border-radius: 20px; padding: 20px; margin-bottom: 15px; cursor: pointer; display: flex; align-items: center; transition: all 0.3s; box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.opt-card.selected { border-color: var(--driver); background: linear-gradient(145deg, #1e293b, #121214); box-shadow: 0 10px 30px rgba(59,130,246,0.3); }
.opt-icon { font-size: 2.2rem; margin-right: 18px; background: rgba(255,255,255,0.05); width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; border-radius: 18px; transition: 0.3s; flex-shrink: 0;}
.opt-card.selected .opt-icon { background: rgba(59,130,246,0.2); }
.opt-text h3 { margin: 0 0 4px 0; color: #fff; font-size: 1.2rem;}
.opt-text p { margin: 0; color: var(--muted); font-size: 0.85rem;}

header { padding: 12px 15px; background: rgba(9, 9, 11, 0.85); border-bottom: 1px solid rgba(255,255,255,0.05); position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; backdrop-filter: blur(16px); width: 100%; max-width: 100%; }
.logo { font-weight: 900; font-size: 1.1rem; cursor:pointer; display:flex; align-items:center; gap:8px; padding:6px 12px; background:transparent; border-radius:12px; border:none; color:#fff;}
.badge { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 10px; font-weight: 800; font-size:0.8rem; }

.dash-hero { text-align: center; padding: 25px 0 15px; }
.dash-hero p { margin: 0 0 6px 0; font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; }
.dash-hero h1 { margin: 0; font-size: 3.5rem; font-weight: 900; letter-spacing: -2px; line-height: 1; text-shadow: 0 10px 30px rgba(0,0,0,0.5);}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; padding: 0 12px;}
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px;}
.box { background: linear-gradient(145deg, #18181b, #121214); border: 1px solid rgba(255,255,255,0.05); padding: 15px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,0.3);}
.box span { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; font-weight: 800; margin-bottom: 6px; letter-spacing: 0.5px;}
.box strong { font-size: 1.2rem; font-weight: 900; letter-spacing: -0.5px;}

.log-item { background: #000; border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; padding: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; border-left: 4px solid var(--driver);}

/* --- NOWE HORIZONTALNE SUWAKI (UKRYWANIE SCROLLBARÓW) --- */
.chip-box, div[style*="overflow-x:auto"], div[style*="overflow-x: auto"] { 
    display: flex; gap: 8px; margin-bottom: 15px; padding-bottom: 5px; 
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    max-width: 100%;
}
.chip-box::-webkit-scrollbar, div[style*="overflow-x:auto"]::-webkit-scrollbar, div[style*="overflow-x: auto"]::-webkit-scrollbar { 
    display: none; /* Chrome, Safari, Opera */
}

.chip { padding: 12px 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); color: var(--muted); border-radius: 12px; font-size: 0.8rem; font-weight: 800; cursor: pointer; white-space: nowrap; flex: 1; text-align: center; transition: all 0.2s;}
.chip.active { background: var(--driver); color: #fff; border-color: var(--driver); }

.mode-switch { display: flex; background: #000; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); padding: 5px; margin-bottom: 15px; width: 100%; max-width: 100%;}
.mode-switch .m-btn { flex: 1; text-align: center; padding: 10px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; cursor: pointer; border-radius: 8px; color: var(--muted); transition: 0.3s; }
.mode-switch .m-btn.active { background: var(--driver); color: #fff; box-shadow:0 4px 10px rgba(59,130,246,0.3);}

.nav { position: fixed; bottom: 0; width: 100%; max-width: 500px; background: rgba(18, 18, 20, 0.95); border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-around; padding: 10px 0 20px 0; z-index: 1000; backdrop-filter: blur(20px); box-shadow: 0 -10px 30px rgba(0,0,0,0.6);}
.nav-item { color: var(--muted); text-align: center; font-size: 0.55rem; font-weight: 800; cursor: pointer; text-transform: uppercase; flex: 1; transition: 0.2s; letter-spacing:0.5px;}
.nav-item.active { color: var(--driver); transform: translateY(-3px);}
.nav-item.act-home { color: var(--life); transform: translateY(-3px);}
.nav-item i { font-size: 1.3rem; display: block; margin-bottom: 4px; font-style: normal; }

/* --- MODALE Z ANIMACJĄ POP-IN --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 30000; padding: 15px; display: flex; flex-direction: column; justify-content:center; align-items:center; animation: fadeIn 0.2s; }
.modal-overlay .panel { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.hidden { display: none !important; }

@keyframes popIn { 
    0% { opacity: 0; transform: scale(0.9); } 
    100% { opacity: 1; transform: scale(1); } 
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); } 70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.shake-anim { animation: shake 0.3s ease-in-out; }
.btn-live { animation: pulse 2s infinite; background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: 2px solid #34d399;}
.highlight-input { border-color: var(--success) !important; background: rgba(34, 197, 94, 0.15) !important; transition: 0.5s; box-shadow: 0 0 15px rgba(34,197,94,0.4)!important;}

.section-lbl { font-size: 0.75rem; color: var(--driver); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin: 25px 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 6px;}

.leaflet-layer, .leaflet-control-zoom-in, .leaflet-control-zoom-out, .leaflet-control-attribution { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%); }
.leaflet-container { background: #000; border-radius: 14px; border: 1px solid var(--border); box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);}

/* --- ULEPSZONA SIATKA KATEGORII (KOMPAKTOWA) --- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 15px; }
.cat-item { background: rgba(255,255,255,0.03); border: 2px solid transparent; border-radius: 12px; padding: 10px 4px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; justify-content: center; align-items: center;}
.cat-item.active { background: rgba(255,255,255,0.1); border-color: #fff; transform: scale(1.05); }
.cat-icon { font-size: 1.5rem; margin-bottom: 4px; display: block; }
.cat-lbl { font-size: 0.58rem; font-weight: 700; color: var(--muted); text-transform: uppercase; line-height: 1.1; word-wrap: break-word; text-align: center;}

.acc-card { background: linear-gradient(145deg, #18181b, #121214); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); position:relative; overflow:hidden;}
.acc-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--life); }

.fin-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed rgba(255,255,255,0.1); font-size: 0.9rem; align-items: center;}
.fin-row:last-child { border-bottom: none; }
.fin-label { color: var(--muted); font-weight: 600;}
.fin-val { font-weight: 800; font-size: 1.1rem;}

.budget-bar-bg { width: 100%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; margin-top: 8px;}
.budget-bar-fill { height: 100%; transition: width 0.5s; border-radius: 5px;}
