/* KurierCalc Pro 1.20.5 – integrated premium layer. No business values live in CSS. */
:root {
  --p5-blue: #1689ff; --p5-cyan: #00c7ff; --p5-green: #29d67d;
  --p5-amber: #ffbd4a; --p5-red: #ff5e6d; --p5-violet: #9b7bff;
  --p5-panel: linear-gradient(150deg, rgba(9,31,55,.97), rgba(3,14,29,.98));
  --p5-border: rgba(76,139,197,.42);
  --p5-glow: 0 18px 52px rgba(0,41,94,.26), inset 0 1px 0 rgba(255,255,255,.035);
}
body { background: radial-gradient(1100px 600px at 55% -10%, rgba(0,100,255,.16), transparent 68%), #020814; }
.module-main { background: radial-gradient(900px 500px at 50% 0, rgba(11,94,196,.065), transparent 70%); }
.module-section, details.module-section, .module-card, .bd-panel, .bd-chart-card, .calculator-page .calculator, .account-grid > section { border-color: var(--p5-border); background: var(--p5-panel); box-shadow: var(--p5-glow); }
.module-section > h2, .bd-panel h2, .bd-chart-card h2, .card h2 { letter-spacing: -.01em; }
.page-heading h1, .work-page > h1, .bd-hero h1 { text-wrap: balance; letter-spacing: -.035em; }
.eyebrow, .bd-kicker { color: #62bfff; letter-spacing: .15em; font-weight: 800; }
.module-table thead th { background: #0a2746; color: #a9d6ff; border-bottom-color: #2d6699; }
.module-table tbody tr { transition: background .16s ease, transform .16s ease; }
.module-table tbody tr:hover { background: rgba(22,137,255,.08); }
input, select, textarea { border-color: #315f88; background: rgba(5,22,40,.9); }
input:focus, select:focus, textarea:focus { border-color: var(--p5-blue); box-shadow: 0 0 0 4px rgba(22,137,255,.13); }
button, .primary, .primary-link { font-weight: 750; }
button.primary, .primary, .primary-link { background: linear-gradient(110deg, #0758d3, #1689ff 55%, #00b9f1); box-shadow: 0 9px 25px rgba(0,104,255,.24); }
.status-chip, .status-ok, .market-status { border-radius: 999px; }
.workspace-ai-composer, .dashboard-ai-leader, .ai-home { border-color: rgba(155,123,255,.48); background: radial-gradient(600px 260px at 0 0, rgba(111,82,255,.17), transparent 72%), var(--p5-panel); }
.workspace-ai-heading > span { background: linear-gradient(145deg, var(--p5-violet), var(--p5-cyan)); box-shadow: 0 0 24px rgba(130,102,255,.32); }
.premium-card-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.premium-card-heading h2 { margin: 3px 0 0; }
.provider-chip { padding: 6px 9px; border: 1px solid #3475a8; border-radius: 999px; color: #a9d9ff; background: #092640; font-size: .72rem; }

/* Interactive route preview */
.route-panel { min-width: 0; }
.route-map-shell { position: relative; min-height: 330px; margin-top: 16px; overflow: hidden; border: 1px solid #2c6698; border-radius: 15px; background: radial-gradient(circle at 50% 40%, rgba(14,105,205,.2), transparent 60%), #061424; }
.route-map-consent { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 26px; text-align: center; background: radial-gradient(circle at 50% 30%, rgba(16,129,255,.22), transparent 60%), linear-gradient(160deg, rgba(5,22,40,.95), rgba(2,10,22,.98)); }
.route-map-shell[data-map-state="ready"] .route-map-consent { display: none; }
.route-preview-points { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; color: #dcefff; }
.route-preview-points span:not([aria-hidden]) { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-map-consent p { max-width: 54ch; color: #9db8d2; }
.route-map-consent button { min-height: 44px; padding-inline: 20px; color: white; border-color: #1f93ff; background: linear-gradient(110deg, #0758d3, #1689ff); }
.route-map-canvas { position: absolute; inset: 0; width: 100%; min-height: 330px; }
.route-map-marker { display: block; width: 24px; height: 24px; border: 4px solid white; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 5px 18px rgba(0,0,0,.5); }
.route-map-marker.start { background: var(--p5-green); }
.route-map-marker.destination { background: var(--p5-red); }
.route-preview-status { min-height: 22px; margin: 10px 0 4px; color: #a8c5df; }
.route-map-shell[data-map-state="error"] { border-color: rgba(255,94,109,.7); }
.route-map-shell[data-map-state="loading"] { border-color: var(--p5-cyan); }
.route-panel #mapsLink { display: flex; justify-content: center; margin-top: 12px; min-height: 42px; align-items: center; border: 1px solid #246ba9; border-radius: 9px; color: #c7e8ff; background: #082b4c; }
.map-attribution { display: block; margin-top: 10px; color: #7695b2; line-height: 1.45; }
.maplibregl-popup-content { color: #ddecfa; background: #08223b; border: 1px solid #3672a6; }
.maplibregl-popup-tip { border-top-color: #08223b!important; }
.maplibregl-ctrl-group { background: #08223b!important; }

/* Diesel market intelligence */
.diesel-market-widget { position: relative; overflow: hidden; }
.diesel-market-widget::before, .dashboard-diesel-index::before { position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: rgba(22,137,255,.12); content: ""; pointer-events: none; }
.market-status { position: relative; padding: 6px 10px; border: 1px solid #4d6680; color: #b7cadc; background: #10233a; font-size: .72rem; }
.market-status.manual { color: #79ebb1; border-color: rgba(41,214,125,.5); background: rgba(25,104,66,.25); }
.market-status.stale { color: #ffd179; border-color: rgba(255,189,74,.55); background: rgba(116,76,15,.24); }
.diesel-index-price { position: relative; display: flex; gap: 14px; align-items: center; margin: 18px 0 12px; }
.fuel-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #2879b6; border-radius: 13px; background: linear-gradient(145deg, #0b3d6e, #071a31); box-shadow: 0 0 25px rgba(0,154,255,.15); font-size: 1.55rem; }
.diesel-index-price > div { display: grid; gap: 3px; }
.diesel-index-price strong { font-size: clamp(1.7rem, 3vw, 2.35rem); color: #f4f9ff; }
.diesel-index-price span:last-child { color: #8fb0cd; font-size: .78rem; }
.diesel-chart-wrap { position: relative; padding: 8px; border: 1px solid rgba(59,111,157,.45); border-radius: 12px; background: rgba(2,13,27,.56); }
.diesel-chart-wrap svg, .dashboard-sparkline { display: block; width: 100%; overflow: visible; }
.chart-grid { fill: none; stroke: rgba(113,154,190,.16); stroke-width: 1; }
.chart-line { fill: none; stroke: #18a6ff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(24,166,255,.55)); }
#dieselIndexChartPoints circle { fill: #26d886; stroke: #dfffee; stroke-width: 1.5; }
#dieselIndexEmpty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: #809db8; }
#dieselIndexEmpty[hidden] { display: none; }
.diesel-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 13px 0; }
.diesel-compare > div { display: grid; gap: 4px; padding: 11px; border: 1px solid #285375; border-radius: 10px; background: rgba(7,28,49,.7); }
.diesel-compare span { color: #8facc7; font-size: .75rem; }
.diesel-compare strong { color: #f1f8ff; font-size: .94rem; }
.dashboard-diesel-index { position: relative; overflow: hidden; }
.dashboard-diesel-index .diesel-index-price strong { font-size: 1.75rem; }
.bd-visual-grid { grid-template-columns: repeat(3, minmax(0,1fr))!important; }
.master-provider-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.master-provider-grid article { display: grid; gap: 6px; padding: 15px; border: 1px solid #285578; border-radius: 12px; background: rgba(5,24,43,.75); }
.master-provider-grid span, .master-provider-grid small { color: #86a7c4; }
.master-provider-grid strong { color: #f1f8ff; font-size: 1.15rem; }

/* Account and authentication surfaces */
.account-grid { align-items: stretch; }
.account-grid > section { position: relative; overflow: hidden; }
.account-grid > section::after { position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--p5-blue), var(--p5-violet)); content: ""; }
.account-identity { display: grid; grid-template-columns: minmax(110px,.55fr) 1fr; gap: 10px 18px; }
.account-identity dt { color: #7da3c5; }
.account-identity dd { margin: 0; color: #edf7ff; font-weight: 700; }
.login-card { box-shadow: 0 28px 80px rgba(0,20,55,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.system-info-slot { display: flex; min-width: 0; justify-content: flex-end; }
.mobile-user-actions { display: none; }

@media (max-width: 1180px) {
  .bd-visual-grid { grid-template-columns: 1fr 1fr!important; }
  .dashboard-diesel-index { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  body.nav-open { overflow: hidden; }
  .sidebar { display: flex!important; flex-direction: column; position: fixed!important; inset: 0 auto 0 0; z-index: 80; width: min(320px,88vw)!important; height: 100dvh!important; max-height: 100dvh!important; padding: 18px 12px max(18px,env(safe-area-inset-bottom))!important; overflow-x: hidden!important; overflow-y: auto!important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 22px 0 70px rgba(0,0,0,.5); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar .menu { display: grid!important; flex: 0 0 auto; overflow: visible!important; }
  .sidebar .menu .nav-section { display: block!important; }
  .sidebar .menu a { width: 100%; }
  .system-info-slot { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .system-info-slot:empty { display: none; }
  .mobile-user-actions { display: block; flex: 0 0 auto; margin-top: 14px; padding: 14px 4px 4px; border-top: 1px solid rgba(91,161,223,.28); }
  .mobile-user-actions .system-info { display: grid!important; grid-template-columns: 1fr 1fr; width: 100%; gap: 9px; }
  .mobile-user-actions .company-identity, .mobile-user-actions #moduleClock { display: none!important; }
  .mobile-user-actions .notification-wrap { grid-column: 1 / -1; }
  .mobile-user-actions .notification { width: 100%; justify-content: center; min-height: 44px; }
  .mobile-user-actions .notification-menu { position: static; width: 100%; max-width: none; margin-top: 8px; }
  .mobile-user-actions .account-link, .mobile-user-actions .topbar-logout { display: inline-flex!important; min-height: 44px; justify-content: center; }
  .calculator-support, .diesel-compare, .bd-visual-grid { grid-template-columns: 1fr!important; }
  .master-provider-grid { grid-template-columns: 1fr; }
  .dashboard-diesel-index { grid-column: auto; }
  .route-map-shell, .route-map-canvas { min-height: 290px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .module-table tbody tr { transition: none!important; } }
