:root {
  --navy: #0e4660;
  --navy-dark: #0b3a50;
  --ink: #0d3d55;
  --muted: #4f6b7a;
  --lime: #c8e600;
  --lime-dark: #9fc200;
  --green: #6a9a3a;
  --bg: #f4f5f5;
  --card: #ffffff;
  --line: #e6eaec;
  --skeleton: #eef1f2;
  --banner: #c9d6dc;
  --banner-bar: #a9c3cd;
  --red: #e0322b;
  --red-bg: #fde8e7;
  --radius: 18px;
  --offer: #f6f8f9;
  --hover: #e4e4e4;
  --danger: #ef7b6c;
}
:root[data-theme="dark"] {
  --ink: #e6eef2;
  --muted: #9fb3bd;
  --bg: #0b1d26;
  --card: #11303f;
  --line: #23485a;
  --skeleton: #1a3d4e;
  --banner: #1d4253;
  --banner-bar: #2a5568;
  --offer: #0f2a37;
  --hover: #1a3d4e;
  --red-bg: #3a1e1e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Figtree", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 254px 1fr; min-height: 100vh; }

.sidebar { background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; }
.brand {
  background: var(--navy-dark); height: 68px; display: flex; align-items: center;
  padding: 0 18px; font-weight: 700; font-size: 36px; letter-spacing: -1px; color: var(--lime);
}
.brand sup { font-size: 14px; margin-left: 2px; }
.nav { list-style: none; margin: 0; padding: 14px 0; }
.nav a {
  display: flex; align-items: center; gap: 16px; padding: 22px 26px; color: #fff;
  text-decoration: none; font-size: 20px; font-weight: 500; transition: background .15s;
}
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.active, .nav a.active svg { color: var(--lime); }
.nav svg { width: 26px; height: 26px; flex: none; color: #b8c9d2; }

.topbar {
  height: 80px; background: var(--card); display: flex; justify-content: flex-end; align-items: center;
  gap: 32px; padding: 0 40px; position: relative; z-index: 10;
}
.langs { display: flex; gap: 10px; font-size: 26px; }
.langs span:last-child { opacity: .4; }
.user-wrap { position: relative; align-self: stretch; display: flex; }
.user { color: #9aa7ae; letter-spacing: 2px; font-weight: 500; font-size: 17px; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0 24px; border-radius: 4px 4px 0 0; }
.user::after { content: ""; border: 6px solid transparent; border-top-color: var(--ink); margin-top: 6px; transition: transform .15s; }
.user[aria-expanded="true"] { background: var(--hover); }
.user[aria-expanded="true"]::after { transform: rotate(180deg) translateY(6px); }

.menu {
  position: absolute; top: 100%; right: 0; width: 380px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 0 0 6px 6px; box-shadow: 0 10px 30px rgba(0,0,0,.15);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.menu.open { opacity: 1; visibility: visible; transform: none; }
.menu > * { border-bottom: 1px solid var(--line); }
.menu > *:last-child { border-bottom: 0; }
.menu-head { padding: 24px 20px; }
.menu-head strong { display: block; font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.menu-head span { color: var(--muted); font-size: 17px; }
.menu-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; background: none; border: 0;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: left;
}
.menu-row:hover { background: var(--hover); }
.menu-row svg { width: 20px; height: 20px; flex: none; }
.menu-row.dark { padding: 22px 20px; color: var(--muted); font-size: 17px; }
.menu-row.caps { letter-spacing: 2px; font-size: 15px; justify-content: space-between; }
.menu-row.logout { justify-content: center; color: var(--danger); letter-spacing: 2px; font-size: 15px; gap: 4px; }
.switch { margin-left: auto; width: 40px; height: 22px; border-radius: 999px; background: #8a8a8a; position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.menu-row[aria-checked="true"] .switch { background: var(--lime-dark); }
.menu-row[aria-checked="true"] .switch::after { transform: translateX(18px); }

.content {
  display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 20px;
  padding: 46px 60px 60px; max-width: 1680px;
}
.col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.col-right { gap: 20px; }

.card { background: var(--card); border-radius: var(--radius); padding: 28px; }
.label { font-size: 15px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 20px; }

.skeleton { height: 16px; background: var(--skeleton); border-radius: 3px; margin-bottom: 20px; }

.btn {
  border-radius: 999px; padding: 8px 30px; font-weight: 600; font-size: 18px;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink);
}
.btn-lime { background: var(--lime); border-color: var(--lime-dark); color: #0d3d55; }
.btn-link { border: 0; background: none; padding: 8px 20px; }
.btn:hover { filter: brightness(.96); }
.btn-row { display: flex; gap: 20px; align-items: center; }

/* ---------- Profile ---------- */
.profile { text-align: center; padding-top: 60px; min-height: 700px; display: flex; flex-direction: column; }
.avatar {
  width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, #8fa7b3, #4f6b7a); color: #fff;
  display: grid; place-items: center; font-size: 52px; font-weight: 600;
}
.profile h2 { margin: 0 0 46px; font-size: 26px; font-weight: 600; }
.profile .skeletons { padding: 0 34px; }
.profile .btn-row { margin-top: auto; }

/* Charging card */
.ccard {
  width: 300px; max-width: 100%; height: 158px; margin: 10px auto 36px; background: var(--lime);
  border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 6px 14px rgba(0,0,0,.08); color: #0d3d55;
}
.ccard small { font-size: 12px; display: block; color: #3d5a2a; }
.ccard .id { font-size: 18px; font-weight: 600; }
.ccard .bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 13px; }
.badge-active { background: #fff; border-radius: 999px; font-size: 10px; padding: 2px 8px; letter-spacing: 1px; color: var(--muted); }

.consents { min-height: 290px; }

/* ---------- Banner ---------- */
.banner { background: var(--banner); border-radius: var(--radius); padding: 28px; }
.banner .label { margin-bottom: 28px; }
.banner .bar { height: 16px; background: var(--banner-bar); margin-bottom: 18px; }
.dots { display: flex; justify-content: center; gap: 14px; margin-top: 4px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #c7ced2; }
.dots span.on { background: var(--navy); }

/* ---------- Free kWh ---------- */
.free { display: grid; grid-template-columns: 1fr minmax(0, 430px); gap: 20px; }
.gauge-wrap { display: flex; flex-direction: column; }
.gauge { position: relative; width: 260px; height: 260px; margin: auto; }
.gauge svg { width: 100%; height: 100%; }
.gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge strong { font-size: 46px; font-weight: 700; letter-spacing: -1px; }
.gauge span { font-size: 20px; }
.note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 18px; }

.pkgs { display: flex; flex-direction: column; gap: 12px; }
.pkg { border: 2px solid var(--line); border-radius: 12px; padding: 18px 20px 16px; }
.pkg-head { display: flex; justify-content: space-between; align-items: center; }
.pkg-head .label { margin: 0; font-size: 15px; }
.pkg-head .icons { display: flex; gap: 8px; }
.pkg h4 { margin: 6px 0 8px; font-size: 21px; font-weight: 500; }
.pkg p { margin: 0 0 14px; color: var(--muted); font-size: 18px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; }
.icon-btn { border: 0; background: none; padding: 0; color: var(--ink); display: grid; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Explore ---------- */
.explore { overflow: hidden; }
.explore .skeleton.long { width: 87%; }
.explore .skeleton.short { width: 77%; margin-bottom: 38px; }
.offers { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -28px; padding-right: 28px; padding-bottom: 6px; }
.offer {
  flex: 0 0 428px; max-width: 85vw; scroll-snap-align: start; border: 2px solid var(--line); border-radius: 12px;
  background: var(--offer); padding: 20px 20px 20px;
}
.offer h3 { margin: 0 0 10px; font-size: 27px; font-weight: 600; text-transform: uppercase; }
.offer p { margin: 0 0 10px; font-size: 18px; color: var(--muted); line-height: 1.3; }
.save { display: inline-block; background: var(--red-bg); color: var(--red); font-weight: 600; letter-spacing: 1px; font-size: 15px; padding: 3px 8px; border-radius: 999px; }
.offer dl { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0 12px; }
.offer dt { font-size: 16px; color: var(--muted); }
.offer dd { margin: 0; font-size: 27px; font-weight: 600; }
.offer .btn { width: 100%; padding: 6px; }

/* ---------- Charging ---------- */
.section-title { font-size: 27px; font-weight: 600; margin: 50px 0 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { padding: 22px 24px; }
.stat .label { margin-bottom: 14px; }
.stat strong { font-size: 27px; font-weight: 600; }
.sessions .skeleton { margin: 34px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
  .content { grid-template-columns: 400px minmax(0, 1fr); padding: 32px; }
  .free { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .content { grid-template-columns: 1fr; }
  .col-left { order: 2; }
  .profile { min-height: 0; }
  .profile .btn-row { margin-top: 30px; justify-content: center; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { display: flex; overflow-x: auto; padding: 0; }
  .nav a { padding: 14px 16px; font-size: 16px; white-space: nowrap; gap: 8px; }
  .nav svg { width: 20px; height: 20px; }
  .topbar { padding: 0 16px; height: 64px; }
  .content { padding: 16px; }
  .card, .banner { padding: 20px; }
  .stats { grid-template-columns: 1fr; }
  .offers { margin-right: -20px; padding-right: 20px; }
  .offer { flex-basis: 300px; }
  .gauge { width: 220px; height: 220px; }
  .gauge strong { font-size: 38px; }
}

/* ---------- Shared bits ---------- */
a.btn { display: inline-block; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Account settings ---------- */
.back {
  margin-right: auto; display: flex; align-items: center; gap: 6px; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: 1px;
}
.back svg { width: 16px; height: 16px; }
.back:hover { text-decoration: underline; }

.account { padding: 36px 60px 60px; max-width: 1400px; }
.account h1 { font-size: 22px; font-weight: 500; margin: 0 0 40px; }
.tabs { display: flex; gap: 52px; overflow-x: auto; margin-bottom: 36px; }
.tab {
  background: none; border: 0; border-bottom: 3px solid transparent; padding: 0 2px 14px;
  color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: 2px; white-space: nowrap;
}
.tab[aria-selected="true"] { border-bottom-color: var(--ink); }
.tab:hover { border-bottom-color: var(--line); }
.tab[aria-selected="true"]:hover { border-bottom-color: var(--ink); }

.form-card { max-width: 1110px; margin: 0 auto; padding: 32px 30px 40px; }
.form-card h2 { font-size: 20px; font-weight: 500; margin: 0 0 30px; }
.form-card h2:not(:first-child) { margin-top: 56px; }
.form-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.form-top h2 { margin-top: 26px; }
.form-actions { display: flex; gap: 12px; }
.form-actions .btn { border-radius: 4px; letter-spacing: 1px; font-size: 16px; padding: 8px 18px; }
.form-actions .btn-lime { box-shadow: 0 3px 6px rgba(0,0,0,.15); }
[hidden] { display: none !important; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 26px; align-items: center; }
.field { position: relative; }
.field label {
  position: absolute; top: -9px; left: 12px; padding: 0 5px; background: var(--card);
  font-size: 12px; color: var(--muted); pointer-events: none;
}
.field input, .field select {
  width: 100%; height: 44px; padding: 0 16px; font: inherit; font-size: 18px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 4px; outline: none;
  appearance: none; -webkit-appearance: none;
}
.field select {
  padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%);
  background-position: calc(100% - 26px) 20px, calc(100% - 21px) 20px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus { border-color: var(--ink); }
.field input:disabled, .field select:disabled { color: var(--muted); cursor: default; opacity: 1; -webkit-text-fill-color: var(--muted); }
.field .eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  color: var(--muted); display: grid; padding: 4px;
}
.field .eye svg { width: 22px; height: 22px; }
.field.has-eye input { padding-right: 44px; }

.hint {
  display: flex; align-items: center; gap: 30px; background: var(--offer); border-radius: 4px;
  padding: 18px 26px 18px 34px; font-size: 15px; letter-spacing: .5px; line-height: 1.3;
}
.hint b { color: var(--lime-dark); font-size: 30px; font-weight: 700; }

.check { display: flex; align-items: center; gap: 12px; font-size: 18px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--lime-dark); margin: 0; }
.delivery { margin-top: 34px; }

.placeholder-card { max-width: 1110px; margin: 0 auto; }

@media (max-width: 800px) {
  .account { padding: 24px 16px 40px; }
  .tabs { gap: 28px; }
  .grid2 { grid-template-columns: 1fr; gap: 26px; }
  .grid2 > .spacer { display: none; }
  .form-card { padding: 22px 18px 30px; }
  .hint { padding: 14px 18px; gap: 18px; }
}

/* ---------- Drivers ---------- */
.app > div { display: flex; flex-direction: column; min-width: 0; }
.drivers { padding: 36px 40px 60px; flex: 1; }
.drivers h1 { font-size: 22px; font-weight: 500; margin: 0 0 24px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar-right { display: flex; gap: 36px; }
.btn-navy {
  display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border: 0;
  border-radius: 4px; padding: 10px 18px; font-size: 16px; font-weight: 500; letter-spacing: 1.5px;
}
.btn-navy:hover { background: var(--navy-dark); }
.btn-navy svg { width: 20px; height: 20px; }

.dd { position: relative; }
.dd-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); font-size: 18px; padding: 6px 0; }
.dd-btn.caps { font-size: 16px; letter-spacing: 1.5px; font-weight: 500; }
.dd-btn svg { width: 20px; height: 20px; }
.dd-btn::after { content: ""; border: 5px solid transparent; border-top-color: currentColor; margin-top: 5px; }
.dd-menu { width: 200px; border-radius: 6px; top: calc(100% + 6px); z-index: 20; overflow: hidden; }
.dd-menu .menu-row { font-size: 16px; }
.dd-menu .menu-row[aria-checked="true"] { font-weight: 600; }
.dd-menu .menu-row[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--lime-dark); }

.table-card { padding: 0 0 8px; border-radius: 8px; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; white-space: nowrap; }
.table th { text-align: left; font-weight: 600; padding: 22px 16px; }
.table td { padding: 12px 16px; height: 62px; border-top: 1px solid var(--line); }
.table tbody tr:hover { background: var(--offer); }
.table .cb { width: 56px; padding-left: 24px; }
.table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; vertical-align: middle; }
.table .actions { text-align: right; padding-right: 20px; }
.table .empty { text-align: center; color: var(--muted); }
.btn-sm { font-size: 15px; padding: 6px 20px; border-radius: 4px; letter-spacing: .5px; box-shadow: 0 2px 4px rgba(0,0,0,.12); }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 8px; vertical-align: 1px; }
.status.on::before { background: var(--lime-dark); }

.pager { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 15px; flex-wrap: wrap; }
.pager-select { width: 100px; }
.pager-select select { height: 40px; font-size: 16px; }
.range { margin: 0 30px; }
.pager-nav { display: flex; gap: 12px; }
.pager-nav button { background: none; border: 0; color: var(--ink); display: grid; padding: 6px; border-radius: 50%; }
.pager-nav button:hover:not(:disabled) { background: var(--hover); }
.pager-nav button:disabled { opacity: .3; cursor: default; }
.pager-nav svg { width: 20px; height: 20px; }

.footer {
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap; padding: 24px 40px;
  color: var(--muted); font-size: 15px; line-height: 1.5;
}
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--ink); }

@media (max-width: 800px) {
  .drivers { padding: 24px 16px 40px; }
  .toolbar-right { gap: 20px; }
  .pager { justify-content: flex-start; padding: 8px 12px; }
  .range { margin: 0; }
  .footer { padding: 20px 16px; gap: 16px; }
}
