:root {
  color-scheme: dark;
  --navy-950: #010812;
  --navy-900: #051426;
  --navy-850: #081a30;
  --navy-800: #0b213b;
  --navy-700: #183a61;
  --line: rgba(132, 169, 211, 0.22);
  --line-strong: rgba(142, 181, 228, 0.36);
  --gold: #ffc11c;
  --gold-strong: #ffdb57;
  --gold-soft: rgba(255, 193, 28, 0.13);
  --cyan: #62e6ff;
  --green: #32e981;
  --red: #ff6675;
  --text: #f8fbff;
  --muted: #9caec5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.22);
  --radius-xl: 30px;
  --radius-lg: 21px;
  --radius-md: 15px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--navy-950); }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 72% -15%, #174274 0, transparent 41%), radial-gradient(circle at -12% 82%, rgba(132,94,0,.12), transparent 34%), var(--navy-950); color: var(--text); line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(91, 232, 255, 0.6); outline-offset: 3px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.16em; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(100px); opacity: 0.18; pointer-events: none; }
.ambient-one { width: 420px; height: 420px; top: -200px; right: 8%; background: #1767c3; }
.ambient-two { width: 280px; height: 280px; bottom: -120px; left: 20%; background: #c58f00; opacity: 0.08; }

/* Podpis startowy — odwzorowanie ekranu otwierającego aplikację Android. */
body.is-booting #authView,
body.is-booting #appView { opacity: 0; }
body.is-booting.boot-content-ready #authView:not(.hidden),
body.is-booting.boot-content-ready #appView:not(.hidden) { opacity: 1; transition: opacity 480ms ease; }
.boot-splash { position: fixed; z-index: 1000; inset: 0; min-height: 100dvh; overflow: hidden; isolation: isolate; display: grid; color: #f8fafc; background: linear-gradient(180deg, #020a17 0%, #03162b 52%, #020c1b 100%); opacity: 1; transition: opacity 520ms ease, visibility 0s linear 520ms; }
.boot-splash::before { content: ""; position: absolute; z-index: -1; inset: auto -18vw -31vh; height: 52vh; opacity: .22; background: radial-gradient(ellipse at 50% 100%, rgba(255, 194, 26, .17), transparent 67%); pointer-events: none; }
.boot-splash.is-leaving { visibility: hidden; pointer-events: none; opacity: 0; }
.boot-splash__content { width: min(100%, 680px); min-height: 100dvh; margin: 0 auto; padding: max(34px, env(safe-area-inset-top)) max(34px, env(safe-area-inset-right)) max(34px, env(safe-area-inset-bottom)) max(34px, env(safe-area-inset-left)); display: flex; flex-direction: column; align-items: center; text-align: center; }
.boot-splash__signature { width: 100%; margin-top: clamp(36px, 8.2vh, 88px); display: flex; flex-direction: column; align-items: center; }
.boot-splash__logo { width: clamp(116px, 29vw, 158px); height: clamp(116px, 29vw, 158px); object-fit: contain; filter: drop-shadow(0 18px 31px rgba(255, 194, 26, .2)); animation: boot-logo-arrive 700ms cubic-bezier(.22, 1, .36, 1) both; }
.boot-splash__name { margin: clamp(16px, 2.4vh, 22px) 0 0; display: grid; color: #f8fafc; font-size: clamp(1.35rem, 5vw, 1.875rem); font-weight: 900; line-height: 1.1; }
.boot-splash__name span:first-child { color: #ffc21a; letter-spacing: .08em; }
.boot-splash__name span:last-child { margin-top: 2px; font-size: .77em; letter-spacing: .18em; }
.boot-splash__rule { width: 82px; height: 2px; margin-top: clamp(17px, 2.4vh, 22px); background: #ffc21a; box-shadow: 0 0 12px rgba(255, 194, 26, .28); }
.boot-splash__product { margin: clamp(14px, 2vh, 18px) 0 0; color: #a8b4c7; font-size: clamp(.66rem, 2.8vw, .875rem); font-weight: 800; letter-spacing: .12em; }
.boot-splash__legal { margin: auto 0 0; color: #a8b4c7; font-size: clamp(.67rem, 2.6vw, .75rem); line-height: 1.55; }
.boot-splash__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.button { border: 1px solid transparent; border-radius: 999px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--text); font-weight: 800; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button.primary { color: #07111e; background: linear-gradient(135deg, var(--gold-strong), #ffb70d); box-shadow: 0 12px 30px rgba(255, 190, 20, 0.19); }
.button.secondary { color: var(--text); background: #142b49; border-color: var(--line); }
.button.danger { color: #ffdce1; background: rgba(255, 116, 130, 0.12); border-color: rgba(255, 116, 130, 0.35); }
.button.wide { width: 100%; justify-content: space-between; padding: 15px 20px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.04); color: var(--muted); font-weight: 900; }

input, select { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: rgba(2, 10, 21, 0.72); color: var(--text); padding: 13px 14px; }
input::placeholder { color: #6f819a; }
label { display: grid; gap: 7px; color: #d5dfed; font-size: 0.83rem; font-weight: 700; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 53%, calc(100% - 13px) 53%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.auth-layout { min-height: 100vh; max-width: 1180px; margin: 0 auto; padding: 48px 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr); gap: 70px; align-items: center; }
.auth-brand { max-width: 650px; }
.brand-mark { width: 134px; height: 134px; object-fit: contain; margin-bottom: 18px; filter: drop-shadow(0 18px 30px rgba(255, 191, 0, 0.15)); }
.auth-brand h1 { max-width: 620px; margin: 0; font-size: clamp(2.8rem, 6.6vw, 5.8rem); line-height: 0.96; letter-spacing: -0.065em; }
.brand-copy { max-width: 570px; margin: 28px 0; color: #b5c4d8; font-size: 1.08rem; line-height: 1.7; }
.platforms { display: flex; flex-wrap: wrap; gap: 9px; }
.platforms span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: #ccd8e8; font-size: 0.78rem; background: rgba(10, 27, 49, 0.52); }
.auth-card { border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 25px; background: linear-gradient(160deg, rgba(14, 34, 61, 0.96), rgba(6, 18, 35, 0.96)); box-shadow: var(--shadow); }
.auth-tabs { padding: 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border-radius: 999px; background: rgba(2, 10, 20, 0.7); }
.auth-tab { border: 0; border-radius: 999px; padding: 11px; color: var(--muted); background: transparent; font-weight: 800; }
.auth-tab.active { color: var(--navy-950); background: var(--gold); }
.auth-form { padding: 30px 4px 8px; display: grid; gap: 18px; }
.auth-form h2 { margin: 0 0 8px; font-size: 1.75rem; }
.auth-form p { margin-top: 0; line-height: 1.5; }
.form-message { min-height: 1.35em; margin: 9px 4px; color: var(--gold); font-size: 0.84rem; font-weight: 700; }
.form-message.error { color: var(--red); }
.form-message.success { color: var(--green); }
.security-note { margin: 16px 4px 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.74rem; text-align: center; }
.security-note span { color: var(--green); }
.admin-entry { margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; color: var(--text); background: rgba(20,43,73,.62); text-decoration: none; }
.admin-entry > span:first-child { color: var(--gold); font-size: 1.2rem; }
.admin-entry strong, .admin-entry small { display: block; }
.admin-entry small { margin-top: 3px; color: var(--muted); font-size: .68rem; }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(4, 13, 26, 0.88); backdrop-filter: blur(22px); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 0 6px 34px; }
.logo img { width: 52px; height: 52px; object-fit: contain; }
.logo strong, .logo small { display: block; }
.logo strong { color: var(--gold); font-size: 1.12rem; letter-spacing: 0.05em; }
.logo small { margin-top: 2px; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.22em; }
.main-nav { display: grid; gap: 7px; }
.nav-item { border: 0; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: transparent; color: var(--muted); text-align: left; font-weight: 760; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--gold); background: var(--gold-soft); }
.nav-icon { width: 24px; font-size: 1.25rem; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px 5px 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) 42px; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy-950); font-weight: 900; }
.user-meta { overflow: hidden; }
.user-meta strong, .user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 0.83rem; }
.user-meta small { margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.workspace { min-width: 0; }
.topbar { min-height: 105px; padding: 24px clamp(22px, 4vw, 54px); display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(5, 16, 31, 0.55); backdrop-filter: blur(18px); }
.mobile-brand { display: none; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.mobile-brand img { width: 45px; height: 45px; object-fit: contain; }
.mobile-brand strong, .mobile-brand small { display: block; }
.mobile-brand strong { color: var(--gold); letter-spacing: .04em; }
.mobile-brand small { margin-top: 2px; color: var(--muted); font-size: .58rem; letter-spacing: .18em; }
.topbar h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.04em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.charger-select-wrap { min-width: min(280px, 38vw); gap: 4px; color: var(--muted); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.charger-select-wrap select { padding-block: 10px; text-transform: none; letter-spacing: 0; font-weight: 700; }
.connection-badge { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; font-size: 0.73rem; font-weight: 850; }
.connection-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px rgba(255, 116, 130, 0.65); }
.connection-badge.online { color: var(--green); border-color: rgba(82, 230, 146, 0.25); background: rgba(82, 230, 146, 0.07); }
.connection-badge.online span { background: var(--green); box-shadow: 0 0 13px rgba(82, 230, 146, 0.72); }
.content { padding: clamp(22px, 4vw, 52px); max-width: 1500px; margin: 0 auto; }

.dashboard { display: grid; gap: 20px; }
.hero-card { min-height: 390px; overflow: hidden; position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr); align-items: center; gap: 26px; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(28px, 4.5vw, 58px); background: radial-gradient(circle at 80% 40%, rgba(30, 88, 145, 0.28), transparent 33%), linear-gradient(135deg, rgba(15, 38, 67, 0.98), rgba(5, 18, 35, 0.98)); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; inset: auto -110px -190px auto; width: 380px; height: 380px; border: 1px solid rgba(255, 201, 40, 0.12); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,201,40,0.025), 0 0 0 120px rgba(255,201,40,0.018); pointer-events: none; }
.hero-copy { min-width: 0; position: relative; z-index: 1; }
.status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 760; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.status-dot.online { background: var(--green); box-shadow: 0 0 14px rgba(82,230,146,0.7); }
.hero-copy h2 { margin: 16px 0 5px; font-size: clamp(2rem, 4.5vw, 4rem); letter-spacing: -0.055em; }
.session-details { margin: 32px 0 28px; display: flex; flex-wrap: wrap; gap: 28px; }
.session-details div { min-width: 116px; }
.session-details span, .session-details strong { display: block; }
.session-details span { margin-bottom: 7px; color: var(--muted); font-size: 0.72rem; }
.session-details strong { font-size: 1.2rem; }
.charge-button { min-width: 220px; color: #06101c; background: var(--gold); }
.charge-button.stop { color: #ffdce1; background: rgba(255, 116, 130, 0.13); border-color: rgba(255, 116, 130, 0.5); }
.charge-button span:first-child { font-size: 1.3rem; }
.hint { margin: 12px 0 0; font-size: 0.76rem; }
.gauge-wrap { position: relative; z-index: 1; display: grid; justify-items: center; }
.power-gauge { --level: 0deg; position: relative; width: clamp(220px, 24vw, 300px); aspect-ratio: 1; border-radius: 50%; padding: 16px; display: grid; place-items: center; background: conic-gradient(from 210deg, var(--gold) 0 var(--level), rgba(255,255,255,0.07) var(--level) 240deg, transparent 240deg 360deg); box-shadow: 0 0 60px rgba(255, 197, 28, 0.09); }
.power-gauge::before { content: ""; position: absolute; width: 76%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: radial-gradient(circle at 40% 35%, #16375d, #071528 70%); }
.power-gauge::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; background: conic-gradient(from 210deg, transparent 0 18deg, rgba(255,255,255,.95) 33deg, rgba(255,201,40,.55) 45deg, transparent 65deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 17px), #000 calc(100% - 16px)); mask: radial-gradient(farthest-side, transparent calc(100% - 17px), #000 calc(100% - 16px)); pointer-events: none; }
.power-gauge.charging { box-shadow: 0 0 72px rgba(255, 197, 28, 0.19); }
.power-gauge.charging::after { opacity: 1; animation: charge-sweep 1.55s linear infinite; }
.gauge-inner { position: relative; z-index: 1; display: grid; justify-items: center; }
.gauge-bolt { margin-bottom: 3px; color: var(--gold); font-size: 2.1rem; line-height: .8; filter: drop-shadow(0 0 9px rgba(255,201,40,.52)); }
.power-gauge.charging .gauge-bolt { animation: charge-pulse .9s ease-in-out infinite alternate; }
.gauge-inner span { font-size: clamp(2.7rem, 5vw, 4.5rem); font-weight: 900; letter-spacing: -0.06em; }
.gauge-inner .gauge-bolt { font-size: 2.1rem; letter-spacing: 0; }
.gauge-inner small { color: var(--gold); font-weight: 850; }
.gauge-wrap > p { margin: 18px 0 0; color: var(--muted); font-size: 0.8rem; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-height: 122px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; align-items: center; gap: 14px; background: rgba(10, 26, 48, 0.72); }
.metric-icon { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); font-weight: 900; font-size: 0.8rem; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 0.7rem; }
.metric-card strong { margin: 5px 0; font-size: 1.2rem; }
.metric-card small { color: #71849e; font-size: 0.66rem; }
.setup-notice { border: 1px solid rgba(255, 201, 40, 0.28); border-radius: var(--radius-lg); padding: 24px; background: var(--gold-soft); }
.setup-notice h3 { margin: 0 0 8px; }
.setup-notice p { color: #c5d0df; }
.copy-row { margin-top: 17px; display: flex; align-items: center; gap: 10px; }
.copy-row code, .result-card code { min-width: 0; flex: 1; overflow-wrap: anywhere; border-radius: 12px; padding: 12px; color: var(--gold); background: rgba(3, 10, 20, 0.65); }

.empty-state { min-height: 570px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed rgba(255, 201, 40, 0.26); border-radius: var(--radius-xl); padding: 30px; background: rgba(8, 25, 46, 0.55); }
.empty-state img { width: 110px; height: 110px; object-fit: contain; }
.empty-state h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.empty-state p:not(.eyebrow) { max-width: 550px; color: var(--muted); line-height: 1.6; }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -0.04em; }
.count-pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 0.72rem; }
.history-list { display: grid; gap: 12px; }
.history-row { border: 1px solid var(--line); border-radius: 17px; padding: 17px 20px; display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); align-items: center; gap: 14px; background: rgba(10, 26, 48, 0.68); }
.history-row span, .history-row strong { display: block; }
.history-row span { color: var(--muted); font-size: 0.68rem; }
.history-row strong { margin-top: 5px; font-size: 0.92rem; }
.history-empty { min-height: 310px; border: 1px dashed var(--line); border-radius: var(--radius-lg); display: grid; place-items: center; color: var(--muted); }
.two-column { display: grid; grid-template-columns: minmax(300px, 0.95fr) minmax(300px, 1.05fr); gap: 18px; align-items: start; }
.panel-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 30px); background: linear-gradient(150deg, rgba(13, 33, 59, 0.86), rgba(7, 21, 40, 0.9)); }
.panel-card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.panel-card > p { line-height: 1.55; }
.stack-form { margin-top: 24px; display: grid; gap: 16px; }
.result-card { margin-top: 20px; border: 1px solid rgba(82,230,146,0.32); border-radius: var(--radius-md); padding: 18px; background: rgba(82,230,146,0.07); }
.result-card code { display: block; margin-bottom: 12px; }
.result-card ol { margin: 18px 0 0; padding-left: 20px; color: #c6d2e1; line-height: 1.6; }
.setup-guide { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(3,13,26,0.42); }
.setup-guide summary { padding: 16px 18px; cursor: pointer; color: var(--gold); font-weight: 800; }
.setup-guide ol { margin: 0; padding: 0 24px 5px 40px; color: #c6d2e1; line-height: 1.58; }
.setup-guide li { margin-bottom: 9px; }
.setup-guide p { margin: 4px 18px 18px; color: var(--muted); line-height: 1.55; }
.setup-guide code { overflow-wrap: anywhere; }
.pairing-success { margin-top:20px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; border:1px solid rgba(82,230,146,.42); border-radius:18px; padding:16px; color:#e9fff1; background:linear-gradient(135deg,rgba(50,233,129,.13),rgba(5,27,36,.84)); box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 16px 35px rgba(0,0,0,.15); animation:pairing-arrive 280ms cubic-bezier(.22,1,.36,1); }
.pairing-success:focus { outline:3px solid rgba(255,193,28,.42); outline-offset:3px; }
.pairing-success-icon { width:42px; height:42px; display:grid; place-items:center; border:1px solid rgba(126,246,177,.56); border-radius:50%; color:#c7ffdd; background:rgba(50,233,129,.16); box-shadow:0 0 22px rgba(50,233,129,.14); }
.pairing-success-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.pairing-success-copy { min-width:0; }
.pairing-success-copy .eyebrow { margin:0 0 3px; color:#a6eac2; }
.pairing-success-copy h4 { margin:0; font-size:1.02rem; line-height:1.25; }
.pairing-success-copy .muted { margin:5px 0 0; overflow-wrap:anywhere; font-size:.78rem; }
.pairing-success-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.pairing-success-actions .button { min-height:40px; padding-inline:12px; font-size:.78rem; }
.charger-list { display: grid; gap: 11px; }
.charger-list-item { border:1px solid var(--line); border-radius:18px; padding:14px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; background:rgba(3,13,26,.45); transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.charger-list-item strong, .charger-list-item small { display: block; }
.charger-list-item strong { font-size:.94rem; line-height:1.3; }
.charger-list-item small { margin-top:6px; color:var(--muted); font-size:.68rem; overflow-wrap:anywhere; }
.charger-identity { min-width:0; display:flex; align-items:center; gap:12px; }
.charger-copy { min-width:0; }
.charger-device-icon { flex:0 0 auto; width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(132,169,211,.23); border-radius:14px; color:#9bb8d8; background:linear-gradient(145deg,rgba(25,55,91,.86),rgba(8,27,51,.9)); }
.charger-device-icon svg { width:24px; height:24px; fill:currentColor; }
.charger-actions { display: flex; align-items: center; gap: 7px; }
.charger-state { min-height:30px; display:inline-flex; align-items:center; gap:7px; border:1px solid rgba(255,102,117,.2); border-radius:999px; padding:5px 9px; color:#f5a0aa; background:rgba(255,102,117,.055); font-size:.65rem; font-weight:800; }
.charger-state > span:first-child { width:7px; height:7px; border-radius:50%; background:var(--red); }
.charger-state.online { color:#9bf1c1; border-color:rgba(50,233,129,.2); background:rgba(50,233,129,.06); }
.charger-state.online > span:first-child { background:var(--green); box-shadow:0 0 9px rgba(50,233,129,.62); }
.remove-button { min-height:38px; border:1px solid transparent; border-radius:10px; background:transparent; color:#ee8a96; padding:8px 10px; font-size:.72rem; font-weight:800; }
.remove-button:hover { border-color:rgba(255,102,117,.2); background:rgba(255,102,117,.07); }
.charger-list-item.selected { border-color:rgba(255,193,28,.48); background:linear-gradient(145deg,rgba(30,45,61,.82),rgba(11,29,50,.88)); box-shadow:inset 3px 0 0 rgba(255,193,28,.82),0 12px 28px rgba(0,0,0,.14); }
.charger-list-item.selected .charger-device-icon { color:var(--gold); border-color:rgba(255,193,28,.28); background:linear-gradient(145deg,rgba(255,193,28,.14),rgba(255,193,28,.055)); }
.charger-open { min-height:38px; padding:8px 12px; font-size:.72rem; }
.charger-open:disabled { color:var(--gold); border-color:rgba(255,193,28,.26); background:rgba(255,193,28,.09); opacity:1; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.rfid-card { grid-column: 1 / -1; }
.rfid-heading { display:flex; justify-content:space-between; align-items:start; gap:16px; }
.rfid-heading h3, .rfid-heading p { margin-top:0; }
.rfid-list { margin-top:18px; display:grid; gap:9px; }
.rfid-list-item { border:1px solid var(--line); border-radius:14px; padding:13px 14px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; background:rgba(3,13,26,.45); }
.rfid-list-item strong, .rfid-list-item small { display:block; }
.rfid-list-item small { margin-top:4px; color:var(--muted); }
.rfid-enrollment { margin-top:16px; padding:16px; border:1px solid var(--line); border-radius:16px; background:rgba(3,13,26,.48); }
.rfid-actions { display:flex; gap:9px; flex-wrap:wrap; }
.rfid-save { margin-top:15px; display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; }
.installer-intro { max-width:760px; line-height:1.6; }
.installer-lock { max-width:690px; margin-top:22px; }
.installer-grid { margin-top:20px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.installer-grid label + label { margin-top:14px; }
.installer-grid input[readonly] { color:var(--gold); background:rgba(3,13,26,.55); }
.installer-danger { border-color:rgba(255,116,130,.3); }
.inline-form { margin-top: 20px; display: flex; align-items: end; gap: 10px; }
.inline-form label { flex: 1; }
.switch-row { margin-top:20px; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:18px; border:1px solid rgba(132,169,211,.18); border-radius:16px; padding:12px 14px; background:linear-gradient(145deg,rgba(4,18,35,.64),rgba(2,12,25,.62)); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.switch-row.enabled { border-color:rgba(255,193,28,.3); background:linear-gradient(145deg,rgba(255,193,28,.085),rgba(5,20,37,.72)); }
.switch-row.unconfirmed { border-style:dashed; }
.switch-copy { min-width:0; }
.switch-copy strong,.switch-copy small { display:block; }
.switch-copy small { margin-top:5px; color:var(--muted); font-weight:500; line-height:1.35; }
.switch-control { position:relative; flex:0 0 auto; min-height:48px; display:flex; align-items:center; gap:10px; }
.switch-control input { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
.switch-track { width:58px; height:32px; display:block; border:1px solid rgba(151,177,208,.25); border-radius:999px; padding:3px; background:#24364c; box-shadow:inset 0 2px 5px rgba(0,0,0,.28); transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.switch-thumb { width:24px; height:24px; display:block; border-radius:50%; background:linear-gradient(145deg,#fff,#dbe5f0); box-shadow:0 3px 8px rgba(0,0,0,.38); transition:transform 200ms cubic-bezier(.22,1,.36,1),background 180ms ease; }
.switch-control input:checked + .switch-track { border-color:rgba(255,193,28,.58); background:linear-gradient(135deg,#ffcf35,#ffae0d); box-shadow:inset 0 1px 1px rgba(255,255,255,.35),0 0 0 4px rgba(255,193,28,.07); }
.switch-control input:checked + .switch-track .switch-thumb { transform:translateX(26px); background:#071322; }
.switch-control input:focus-visible + .switch-track { outline:3px solid rgba(255,193,28,.32); outline-offset:3px; }
.switch-control input:disabled + .switch-track { filter:saturate(.35); opacity:.58; }
.switch-state { min-width:62px; color:var(--muted); font-size:.68rem; font-weight:800; }
.switch-row.enabled .switch-state { color:var(--gold); }
.switch-row.unconfirmed .switch-state { color:#9fb6d0; }
.mobile-nav { display: none; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: min(520px, calc(100vw - 30px)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; color: var(--text); background: #142b49; box-shadow: var(--shadow); transition: opacity 180ms, transform 180ms; font-size: 0.82rem; font-weight: 750; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes charge-sweep { to { transform: rotate(360deg); } }
@keyframes charge-pulse { from { opacity:.62; transform:scale(.92); } to { opacity:1; transform:scale(1.08); } }

@media (max-width: 1080px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-card { grid-template-columns: 1fr 0.8fr; }
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; gap: 38px; padding-block: 32px; }
  .auth-brand { text-align: center; margin: 0 auto; }
  .brand-mark { width: 98px; height: 98px; }
  .auth-brand h1 { font-size: clamp(2.7rem, 12vw, 4.6rem); }
  .platforms { justify-content: center; }
  .app-layout { display: block; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar { position: sticky; z-index: 8; top: 0; min-height: 86px; padding: 15px 18px; }
  .mobile-brand { display: flex; }
  .page-heading { display:none; }
  .topbar-actions { flex-direction: column-reverse; align-items: end; gap: 6px; }
  .charger-select-wrap { min-width: min(220px, 52vw); }
  .charger-select-wrap > span { display: none; }
  .connection-badge { padding: 5px 9px; }
  .content { padding: 18px; }
  .hero-card { min-height: 0; grid-template-columns: 1fr; padding: 27px 22px; }
  .power-gauge { width: min(230px, 68vw); }
  .hero-copy { text-align: center; }
  .status-line, .session-details { justify-content: center; }
  .two-column, .settings-grid, .installer-grid { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(4, 13, 26, 0.94); backdrop-filter: blur(20px); }
  .mobile-nav .nav-item { padding: 6px 3px; display: grid; place-items: center; gap: 1px; font-size: 0.63rem; }
  .mobile-nav .nav-icon { font-size: 1.15rem; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .auth-layout { padding: 22px 14px 34px; }
  .auth-layout { gap: 18px; }
  .auth-brand .brand-copy, .auth-brand .platforms { display:none; }
  .auth-brand .brand-mark { width:72px; height:72px; margin-bottom:8px; }
  .auth-card { padding: 17px; border-radius: 22px; }
  .auth-brand h1 { font-size: 2.15rem; line-height:1; }
  .brand-copy { font-size: 0.94rem; }
  .topbar h1 { font-size: 1.3rem; }
  .topbar .eyebrow { display: none; }
  .charger-select-wrap { min-width: 48vw; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; }
  .metric-card { min-height:110px; padding:13px 10px; gap:9px; }
  .metric-icon { width:36px; height:36px; }
  .rfid-save { grid-template-columns:1fr; }
  .session-details { gap: 15px; }
  .session-details div { min-width: 90px; }
  .copy-row, .inline-form { align-items: stretch; flex-direction: column; }
  .copy-row .button, .inline-form .button { width: 100%; }
  .history-row { grid-template-columns: 1fr 1fr; }
}

/* Final visual system — shared by desktop, iOS/iPadOS and Windows PWA. */
.button,
.icon-button,
.nav-item,
.auth-tab,
.remove-button { min-height: 44px; }
.button { letter-spacing: -.01em; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.button.primary { background: linear-gradient(135deg, #ffdc55 0%, #ffc21d 48%, #ffb10d 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.46), 0 12px 34px rgba(255,181,14,.2); }
.button.secondary { background: linear-gradient(145deg, rgba(25,54,91,.96), rgba(14,37,66,.96)); border-color: var(--line-strong); }
.button.danger { background: linear-gradient(145deg, rgba(96,26,39,.52), rgba(55,20,31,.62)); }
.icon-button svg { width: 20px; height: 20px; fill: currentColor; }

input,
select { min-height: 48px; border-color: rgba(132,169,211,.25); background-color: rgba(1,9,20,.76); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
input:hover,
select:hover { border-color: var(--line-strong); }
input:focus,
select:focus { border-color: rgba(255,193,28,.7); background-color: rgba(2,13,28,.92); box-shadow: 0 0 0 4px rgba(255,193,28,.09); }

.auth-layout { max-width: 1240px; padding: clamp(30px,5vw,72px) clamp(20px,4vw,42px); grid-template-columns: minmax(0,1.12fr) minmax(370px,.72fr); gap: clamp(46px,7vw,92px); }
.auth-brand { position: relative; }
.auth-brand::after { content:""; position:absolute; z-index:-1; width:440px; height:440px; left:-170px; top:-110px; border-radius:50%; background:radial-gradient(circle,rgba(27,99,171,.19),transparent 67%); pointer-events:none; }
.brand-mark { width: 122px; height: 122px; margin-bottom: 22px; filter: drop-shadow(0 18px 34px rgba(255,184,0,.19)); }
.auth-brand h1 { max-width: 650px; font-size: clamp(3.1rem,6.2vw,5.35rem); line-height:.98; letter-spacing:-.064em; text-wrap:balance; }
.brand-copy { max-width: 590px; color:#b4c2d4; font-size:1.04rem; }
.platforms span { display:inline-flex; align-items:center; min-height:34px; border-color:rgba(132,169,211,.24); background:linear-gradient(145deg,rgba(15,39,69,.72),rgba(6,21,39,.72)); }
.platforms span::before { content:""; width:6px; height:6px; margin-right:8px; border-radius:50%; background:var(--green); box-shadow:0 0 10px rgba(50,233,129,.62); }
.auth-card { position:relative; overflow:hidden; border-color:rgba(142,181,228,.27); padding:27px; background:linear-gradient(155deg,rgba(15,39,69,.97),rgba(5,18,35,.98)); box-shadow:0 32px 90px rgba(0,0,0,.43), inset 0 1px 0 rgba(255,255,255,.035); }
.auth-card::before { content:""; position:absolute; inset:0 0 auto; height:1px; background:linear-gradient(90deg,transparent,rgba(255,215,82,.66),transparent); }
.auth-tabs { border:1px solid rgba(132,169,211,.12); }
.auth-tab { transition:color 160ms ease,background 160ms ease,box-shadow 160ms ease; }
.auth-tab.active { background:linear-gradient(135deg,#ffdc55,#ffb812); box-shadow:0 8px 24px rgba(255,183,16,.16); }
.admin-entry { min-height:64px; border-color:rgba(132,169,211,.28); background:linear-gradient(145deg,rgba(24,52,87,.78),rgba(12,31,56,.8)); transition:transform 160ms ease,border-color 160ms ease,background 160ms ease; }
.admin-entry:hover { transform:translateY(-1px); border-color:rgba(255,193,28,.45); background:linear-gradient(145deg,rgba(31,64,104,.84),rgba(13,36,64,.86)); }

.app-layout { grid-template-columns: 248px minmax(0,1fr); }
.sidebar { position:sticky; overflow:hidden; padding:26px 18px; border-right-color:rgba(132,169,211,.18); background:linear-gradient(180deg,rgba(5,18,35,.97),rgba(2,11,22,.96)); box-shadow:20px 0 60px rgba(0,0,0,.12); }
.sidebar::after { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,transparent,var(--gold),transparent); opacity:.58; }
.logo { padding:0 8px 31px; }
.logo img { width:49px; height:49px; filter:drop-shadow(0 8px 18px rgba(255,184,0,.16)); }
.main-nav { gap:8px; }
.nav-item { position:relative; border:1px solid transparent; overflow:hidden; }
.nav-item.active { border-color:rgba(255,193,28,.23); color:var(--gold); background:linear-gradient(135deg,rgba(255,193,28,.145),rgba(255,193,28,.055)); box-shadow:inset 3px 0 0 rgba(255,193,28,.78); }
.nav-icon { display:grid; place-items:center; }
.nav-icon svg { width:22px; height:22px; fill:currentColor; }
.sidebar-footer { border-top-color:rgba(132,169,211,.17); }
.user-avatar { background:linear-gradient(135deg,#ffdd5c,#ffb510); box-shadow:0 8px 20px rgba(255,183,16,.14); }

.workspace { min-height:100vh; background:linear-gradient(180deg,rgba(4,16,30,.15),rgba(2,10,20,.35)); }
.topbar { position:sticky; z-index:8; top:0; min-height:96px; border-bottom-color:rgba(132,169,211,.15); background:rgba(4,16,31,.77); box-shadow:0 10px 34px rgba(0,0,0,.12); }
@supports (backdrop-filter: blur(18px)) { .topbar { backdrop-filter:blur(22px) saturate(1.12); } }
.charger-select-wrap select { border-color:rgba(132,169,211,.24); background-color:rgba(3,14,28,.82); }
.connection-badge { min-height:38px; border-color:rgba(255,102,117,.26); background:rgba(255,102,117,.055); }
.connection-badge.online { color:var(--green); border-color:rgba(50,233,129,.28); background:rgba(50,233,129,.075); }
.connection-badge.online span { animation:online-breathe 1.9s ease-in-out infinite; }
.content { width:100%; max-width:1440px; padding:clamp(24px,3.6vw,50px); }

.dashboard { gap:16px; }
.hero-card { min-height:402px; isolation:isolate; border-color:rgba(221,174,68,.28); padding:clamp(30px,4vw,54px); background-image:linear-gradient(100deg,rgba(2,13,27,.82) 0%,rgba(3,16,31,.6) 46%,rgba(2,12,25,.42) 100%),radial-gradient(circle at 52% 24%,rgba(13,45,78,.12),rgba(1,8,18,.35) 82%),url("./hero-energy-wave-v1.png"); background-position:center,center,center 70%; background-size:cover,cover,cover; background-repeat:no-repeat; background-color:#041121; box-shadow:var(--shadow),inset 0 1px 0 rgba(255,228,155,.07),0 22px 70px rgba(0,0,0,.2); }
.hero-card > * { position:relative; z-index:1; }
.hero-card::before { content:""; position:absolute; z-index:0; inset:0; opacity:.16; background-image:linear-gradient(118deg,rgba(255,255,255,.11),transparent 19%,transparent 76%,rgba(255,190,35,.08)); pointer-events:none; }
.hero-card::after { z-index:0; width:430px; height:430px; inset:auto -130px -225px auto; border-color:rgba(255,193,28,.13); }
.status-line { width:max-content; min-width:0; max-width:100%; border:1px solid rgba(132,169,211,.19); border-radius:999px; padding:7px 11px; background:rgba(2,13,27,.5); }
.status-line > span:last-child { min-width:0; white-space:normal; overflow-wrap:anywhere; }
.status-line .status-dot { flex-shrink:0; }
.hero-copy h2 { margin-top:19px; font-size:clamp(2.25rem,4vw,3.8rem); }
.hero-copy > .mono { display:inline-block; margin:4px 0 0; border-radius:8px; padding:4px 8px; background:rgba(1,10,21,.4); font-size:.78rem; letter-spacing:.045em; }
.session-details { display:grid; grid-template-columns:repeat(3,minmax(100px,1fr)); gap:10px; max-width:620px; margin:29px 0 25px; }
.session-details div { min-width:0; min-height:78px; padding:13px 14px; border:1px solid rgba(132,169,211,.17); border-radius:14px; background:linear-gradient(145deg,rgba(6,22,42,.74),rgba(2,13,27,.62)); }
.session-details span { margin-bottom:8px; }
.session-details strong { font-size:1.16rem; white-space:nowrap; }
.charge-button { min-height:50px; min-width:238px; }
.gauge-wrap { min-width:0; }
.live-pill { margin:0 0 16px; display:inline-flex; align-items:center; gap:7px; border:1px solid rgba(50,233,129,.23); border-radius:999px; padding:6px 10px; color:#bdeed2; background:rgba(50,233,129,.055); font-size:.68rem; font-weight:780; letter-spacing:.025em; }
.live-pill span { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 11px rgba(50,233,129,.72); }
.power-gauge { --progress:0; width:clamp(232px,23vw,304px); padding:0; overflow:visible; background:transparent; filter:drop-shadow(0 20px 34px rgba(0,0,0,.22)); }
.power-gauge::before { z-index:0; width:74%; border-color:rgba(145,187,233,.24); background:radial-gradient(circle at 40% 32%,#183f6a,#07172b 66%,#04101f); box-shadow:inset 0 1px 1px rgba(255,255,255,.045),0 18px 45px rgba(0,0,0,.3); }
.power-gauge::after,
.power-gauge.charging::after { display:none; }
.gauge-svg { position:absolute; z-index:1; inset:-3%; width:106%; height:106%; overflow:visible; transform:rotate(0.001deg); }
.gauge-orbit-track,
.gauge-track,
.gauge-progress { fill:none; transform-origin:120px 120px; }
.gauge-orbit-track { stroke:rgba(104,157,216,.18); stroke-width:1.4; stroke-dasharray:1.4 4.4; }
.gauge-track { stroke:rgba(57,92,134,.5); stroke-width:14; stroke-linecap:round; stroke-dasharray:75 25; transform:rotate(135deg); }
.gauge-progress { opacity:0; stroke:#ffc11c; stroke-width:14; stroke-linecap:round; stroke-dasharray:var(--progress) 100; transform:rotate(135deg); transition:opacity 160ms ease,stroke-dasharray 650ms cubic-bezier(.22,1,.36,1); filter:drop-shadow(0 0 4px rgba(255,193,28,.38)); }
.power-gauge.has-power .gauge-progress { opacity:1; }
.gauge-flow { transform-box:view-box; transform-origin:120px 120px; }
.gauge-orbit { opacity:0; transform-origin:120px 120px; transition:opacity 220ms ease; }
.gauge-spark { fill:#ffe277; filter:drop-shadow(0 0 7px rgba(255,193,28,.95)); }
.spark-two { fill:#ffc11c; }
.spark-three { fill:#fff2b2; }
.gauge-inner { z-index:2; }
.power-gauge.charging { box-shadow:0 0 88px rgba(255,190,24,.16); }
.power-gauge.charging .gauge-track { stroke-dasharray:100 0; }
.power-gauge.charging .gauge-flow { animation:charging-flow 4.8s linear infinite; }
.power-gauge.charging .gauge-orbit { opacity:.8; animation:energy-orbit 9.6s linear infinite; }
.power-gauge.charging .gauge-progress { stroke:#ffcd36; filter:drop-shadow(0 0 5px rgba(255,193,28,.55)); }
.power-gauge.charging .gauge-bolt { animation:charge-pulse 2.4s ease-in-out infinite alternate; }
.gauge-inner > span:not(.gauge-bolt) { text-shadow:0 6px 24px rgba(0,0,0,.35); }
.gauge-bolt { width:40px; height:40px; display:grid; place-items:center; }
.gauge-bolt svg { width:34px; height:34px; display:block; fill:currentColor; }
.charge-action-icon { width:20px; height:20px; display:grid; place-items:center; }
.charge-action-icon svg { grid-area:1 / 1; width:20px; height:20px; display:block; fill:currentColor; }
.charge-stop-icon { display:none !important; }
.charge-button.stop .charge-start-icon { display:none; }
.charge-button.stop .charge-stop-icon { display:block !important; }
.gauge-wrap > p { border:1px solid rgba(132,169,211,.15); border-radius:999px; padding:7px 11px; background:rgba(2,13,27,.44); }

.metrics-grid { gap:12px; }
.metric-card { min-width:0; min-height:118px; border-color:rgba(132,169,211,.2); background:linear-gradient(145deg,rgba(12,32,58,.82),rgba(5,19,37,.84)); box-shadow:var(--shadow-soft),inset 0 1px 0 rgba(255,255,255,.025); transition:transform 180ms ease,border-color 180ms ease; }
.metric-icon { border:1px solid rgba(255,193,28,.15); background:linear-gradient(145deg,rgba(255,193,28,.16),rgba(255,193,28,.07)); box-shadow:inset 0 1px 0 rgba(255,255,255,.05); }
.metric-card strong { font-size:1.26rem; }
.panel-card,
.history-row,
.empty-state { border-color:rgba(132,169,211,.21); background:linear-gradient(150deg,rgba(12,32,58,.88),rgba(5,18,35,.91)); box-shadow:var(--shadow-soft),inset 0 1px 0 rgba(255,255,255,.025); }
.panel-card h3 { letter-spacing:-.02em; }
.count-pill { border-color:rgba(132,169,211,.26); background:rgba(9,28,52,.62); }
.charger-list-item,
.rfid-list-item,
.rfid-enrollment { border-color:rgba(132,169,211,.19); background:linear-gradient(145deg,rgba(4,18,35,.72),rgba(2,12,25,.67)); }
.setup-guide { border-color:rgba(132,169,211,.2); }

@media (hover:hover) {
  .metric-card:hover,
  .history-row:hover,
  .charger-list-item:hover { transform:translateY(-2px); border-color:rgba(142,181,228,.36); }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .app-layout { grid-template-columns:220px minmax(0,1fr); }
  .sidebar { padding-inline:14px; }
  .hero-card { grid-template-columns:minmax(0,1fr) minmax(250px,.78fr); }
  .session-details { grid-template-columns:repeat(2,minmax(110px,1fr)); }
  .session-details div:last-child { grid-column:1 / -1; }
}

@media (max-width: 900px) {
  .app-layout { display:block; padding-bottom:calc(78px + env(safe-area-inset-bottom)); }
  .sidebar { display:none; }
  .topbar { min-height:82px; padding:12px 18px; }
  .mobile-brand { display:flex; }
  .page-heading { display:none; }
  .content { padding:20px; }
  .mobile-nav { position:fixed; z-index:20; left:0; right:0; bottom:0; min-height:calc(70px + env(safe-area-inset-bottom)); padding:7px 10px max(7px,env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid rgba(132,169,211,.22); background:rgba(3,14,28,.95); box-shadow:0 -15px 40px rgba(0,0,0,.2); backdrop-filter:blur(22px); }
  .mobile-nav .nav-item { min-height:54px; padding:5px 3px; display:grid; place-items:center; align-content:center; gap:2px; border-radius:14px; font-size:.63rem; }
  .mobile-nav .nav-item.active { box-shadow:inset 0 0 0 1px rgba(255,193,28,.2); }
  .mobile-nav .nav-icon { width:auto; }
  .mobile-nav .nav-icon svg { width:22px; height:22px; }
  .toast { bottom:calc(88px + env(safe-area-inset-bottom)); }
  .two-column,.settings-grid,.installer-grid { grid-template-columns:1fr; }
}

@media (min-width: 681px) and (max-width: 900px) {
  .hero-card { grid-template-columns:minmax(0,1.05fr) minmax(240px,.75fr); }
  .power-gauge { width:min(29vw,265px); }
}

@media (max-width: 680px) {
  .auth-layout { min-height:100svh; padding:22px 14px 34px; grid-template-columns:1fr; gap:18px; align-content:center; }
  .auth-brand { text-align:center; margin:0 auto; }
  .auth-brand::after { display:none; }
  .auth-brand .brand-copy,.auth-brand .platforms { display:none; }
  .auth-brand .brand-mark { width:70px; height:70px; margin:0 0 8px; }
  .auth-brand h1 { max-width:340px; font-size:clamp(2rem,10.5vw,2.75rem); line-height:1; }
  .auth-card { width:100%; max-width:460px; margin:0 auto; padding:17px; border-radius:23px; }
  .auth-form { padding:23px 2px 5px; gap:15px; }
  .auth-form h2 { font-size:1.55rem; }
  .security-note { margin-top:12px; }

  .topbar { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; padding:10px 13px; }
  .mobile-brand { min-width:0; }
  .mobile-brand img { width:42px; height:42px; }
  .topbar-actions { min-width:0; flex-direction:column-reverse; align-items:flex-end; gap:4px; }
  .charger-select-wrap { width:min(205px,55vw); min-width:0; }
  .charger-select-wrap select { min-height:37px; padding:7px 31px 7px 11px; font-size:.72rem; }
  .connection-badge { min-height:25px; padding:3px 8px; font-size:.64rem; }
  .connection-badge span { width:6px; height:6px; }
  .content { padding:14px 12px 22px; }
  .hero-card { min-height:0; grid-template-columns:minmax(0,1fr); gap:0; padding:18px 16px 19px; border-radius:23px; background-image:linear-gradient(180deg,rgba(2,13,27,.69) 0%,rgba(2,13,27,.49) 47%,rgba(1,9,20,.66) 100%),radial-gradient(circle at 50% 23%,rgba(13,45,78,.1),rgba(1,8,18,.3) 82%),url("./hero-energy-wave-v1.png"); background-position:center,center,center bottom; }
  .hero-copy { display:contents; }
  .status-line { grid-row:1; justify-self:start; }
  .hero-copy h2 { grid-row:2; margin:13px 0 3px; font-size:clamp(1.85rem,9vw,2.7rem); text-align:left; }
  .hero-copy > .mono { grid-row:3; justify-self:start; }
  .gauge-wrap { grid-row:4; margin:16px 0 14px; }
  .live-pill { display:none; }
  .power-gauge { width:min(48vw,190px,24svh); }
  .gauge-wrap > p { margin-top:8px; }
  .session-details { grid-row:5; width:100%; max-width:none; margin:0 0 13px; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .session-details div { min-height:68px; padding:9px 8px; text-align:left; }
  .session-details div:last-child { grid-column:auto; }
  .session-details span { min-height:2.3em; font-size:.61rem; line-height:1.15; }
  .session-details strong { font-size:clamp(.78rem,3.6vw,.98rem); }
  .charge-button { grid-row:6; width:100%; }
  .hint { grid-row:7; text-align:center; }
  .metrics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .metric-card { min-height:104px; padding:13px 11px; gap:9px; border-radius:17px; }
  .metric-icon { width:36px; height:36px; border-radius:11px; }
  .metric-card strong { font-size:1.03rem; }
  .metric-card small { overflow-wrap:anywhere; }
  .section-heading { align-items:center; margin-bottom:17px; }
  .section-heading h2 { font-size:1.75rem; }
  .section-heading .button { padding-inline:13px; }
  .panel-card { padding:19px 16px; border-radius:19px; }
  .history-row { grid-template-columns:1fr 1fr; padding:15px; }
  .copy-row,.inline-form { align-items:stretch; flex-direction:column; }
  .copy-row .button,.inline-form .button { width:100%; }
  .rfid-save { grid-template-columns:1fr; }
  .charger-list-item { grid-template-columns:1fr; }
  .charger-actions { width:100%; display:grid; grid-template-columns:auto minmax(108px,1fr) auto; }
  .charger-open { width:100%; }
  .switch-row { align-items:flex-start; flex-direction:column; }
  .switch-control { width:100%; justify-content:flex-end; }
  .pairing-success { grid-template-columns:auto minmax(0,1fr); align-items:start; gap:11px; padding:14px; }
  .pairing-success-icon { width:38px; height:38px; }
  .pairing-success-actions { grid-column:1 / -1; width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .pairing-success-actions .button { width:100%; }
}

@media (max-width: 380px) {
  .mobile-brand span { display:none; }
  .charger-select-wrap { width:64vw; }
  .content { padding-inline:10px; }
  .hero-card { padding-inline:15px; }
  .power-gauge { width:min(48vw,190px,24svh); }
  .metric-card { display:grid; grid-template-columns:32px minmax(0,1fr); padding-inline:9px; }
  .metric-icon { width:32px; height:32px; }
  .mobile-nav { padding-inline:5px; }
  .mobile-nav .nav-item { font-size:.59rem; }
}

@media (max-height: 580px) {
  .boot-splash__content { padding-block: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-bottom)); }
  .boot-splash__signature { margin-top: clamp(12px, 5vh, 30px); }
  .boot-splash__logo { width: clamp(88px, 25vh, 116px); height: clamp(88px, 25vh, 116px); }
  .boot-splash__name { margin-top: 10px; }
  .boot-splash__rule { margin-top: 12px; }
  .boot-splash__product { margin-top: 11px; }
  .boot-splash__legal { font-size: .62rem; line-height: 1.4; }
}

@media (display-mode: standalone) {
  .topbar { padding-top:max(10px,env(safe-area-inset-top)); }
}

@media (min-width:901px) and (max-height:820px) {
  .topbar { min-height:78px; }
  .content { padding-block:clamp(14px,2.4vh,20px); }
  .dashboard { gap:12px; }
  .hero-card { height:clamp(310px,calc(100dvh - 78px - 40px - 12px - 106px),402px); min-height:310px; padding-block:23px; }
  .hero-copy h2 { margin-top:13px; font-size:clamp(2rem,3.5vw,3.15rem); }
  .session-details { margin:18px 0 15px; }
  .session-details div { min-height:68px; padding-block:10px; }
  .power-gauge { width:min(34vh,260px); }
  .live-pill { margin-bottom:9px; }
  .gauge-wrap > p { margin-top:10px; }
  .metric-card { min-height:94px; padding:12px 14px; }
}

@media (min-width:901px) and (max-width:1080px) and (max-height:820px) {
  .hero-card { height:clamp(285px,calc(100dvh - 78px - 40px - 12px - 200px),382px); min-height:285px; }
  .power-gauge { width:min(30vh,225px); }
  .metric-card { min-height:94px; }
}

/* Krótkie ekrany telefonu: cała karta sterująca pozostaje widoczna, a dalsza treść przewija się normalnie. */
@media (max-width:680px) and (max-height:820px) {
  .topbar { min-height:68px; padding-block:7px; }
  .mobile-brand img { width:36px; height:36px; }
  .topbar-actions { gap:2px; }
  .content { padding-block:8px 12px; }
  .dashboard { gap:10px; }
  .hero-card { grid-template-columns:minmax(0,1fr) minmax(110px,34vw); grid-template-rows:auto auto auto auto auto auto; align-items:start; column-gap:8px; padding:11px 13px 12px; }
  .status-line { grid-column:1; grid-row:1; width:100%; min-width:0; padding:5px 8px; font-size:.62rem; }
  .status-line > span:last-child { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.2; }
  .hero-copy h2 { grid-column:1; grid-row:2; margin:8px 0 2px; font-size:clamp(1.42rem,7vw,2rem); line-height:1.05; overflow-wrap:anywhere; }
  .hero-copy > .mono { grid-column:1; grid-row:3; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.65rem; }
  .gauge-wrap { grid-column:2; grid-row:1 / 4; align-self:center; margin:0; }
  .power-gauge { width:min(34vw,152px,24svh); }
  .gauge-wrap > p { max-width:100%; margin:4px 0 0; padding:4px 7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.59rem; }
  .gauge-bolt { width:26px; height:26px; }
  .gauge-bolt svg { width:23px; height:23px; }
  #gaugeValue { font-size:clamp(1.65rem,6.6vw,2.35rem); }
  .gauge-inner small { font-size:.58rem; }
  .session-details { grid-column:1 / -1; grid-row:4; margin:8px 0; gap:5px; }
  .session-details div { min-height:52px; padding:6px 7px; border-radius:11px; }
  .session-details span { min-height:0; margin-bottom:4px; font-size:.56rem; line-height:1.08; }
  .session-details strong { font-size:clamp(.7rem,3.5vw,.9rem); }
  .charge-button { grid-column:1 / -1; grid-row:5; min-height:42px; }
  .hint { grid-column:1 / -1; grid-row:6; margin:5px 0 0; font-size:.64rem; line-height:1.2; }
}

@media (max-width:680px) and (max-height:560px) {
  .topbar { min-height:61px; }
  .content { padding-top:6px; }
  .hero-card { padding-block:9px 10px; }
  .power-gauge { width:min(32vw,126px,22svh); }
  .session-details { margin:6px 0; }
  .session-details div { min-height:47px; }
  .hint { display:none; }
}

@keyframes online-breathe { 0%,100%{opacity:.76;transform:scale(.9)} 50%{opacity:1;transform:scale(1.13)} }
@keyframes boot-logo-arrive { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
@keyframes pairing-arrive { from { opacity:0; transform:translateY(-7px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes gauge-breathe { 0%,100%{filter:drop-shadow(0 0 0 rgba(255,193,28,0))} 50%{filter:drop-shadow(0 0 12px rgba(255,193,28,.18))} }
@keyframes energy-orbit { to { transform:rotate(360deg); } }
@keyframes charging-flow { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes orbit-dashes { to { stroke-dashoffset:-23.2; } }
@keyframes progress-glow { from { stroke:#ffb50e; filter:drop-shadow(0 0 3px rgba(255,193,28,.32)); } to { stroke:#ffdc59; filter:drop-shadow(0 0 9px rgba(255,193,28,.78)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.service-report{margin-bottom:18px}.service-summary{display:grid;grid-template-columns:minmax(120px,1fr) 2fr;gap:8px 16px}.service-summary dt{color:var(--text-muted,#8995a8)}.service-summary dd{margin:0;overflow-wrap:anywhere}.service-table-wrap{overflow-x:auto}.service-table{width:100%;border-collapse:collapse;text-align:left}.service-table th,.service-table td{padding:9px 8px;border-bottom:1px solid #354154;overflow-wrap:anywhere}.service-report details{margin-top:16px}.service-report summary{cursor:pointer;padding:10px 0}@media(max-width:480px){.service-summary{grid-template-columns:1fr}.service-summary dd{margin-bottom:8px}}
