:root {
  --blue: #1a3c6e;
  --blue-dark: #122b50;
  --blue-light: #eaf1fa;
  --accent: #2e7d32;
  --red: #c62828;
  --border: #d5deeb;
  --text: #1c2733;
  --muted: #66788e;
  --bg: #f4f7fb;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
h1, h2, h3 { color: var(--blue); }

/* Topbar */
.topbar {
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar .brand { font-size: 18px; font-weight: 700; }
.topbar .brand small { font-weight: 400; opacity: .8; margin-left: 8px; }
.topbar .userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(20, 40, 80, .06);
}
.card h2 { font-size: 17px; margin-bottom: 14px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: var(--blue-dark); }
button.secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
button.secondary:hover { background: var(--blue-light); }
button.danger { background: #fff; color: var(--red); border: 1px solid var(--red); padding: 6px 10px; font-size: 12px; }
button.danger:hover { background: #fdecec; }
button.small { padding: 6px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-card button { width: 100%; margin-top: 6px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--blue-light); color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
tr:hover td { background: #f8fafd; }
.table-scroll { overflow-x: auto; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Map */
#map { height: 340px; border-radius: 8px; border: 1px solid var(--border); }
.geo-suggest { position: relative; }
.geo-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1100;
  background: #fff; border: 1px solid var(--border); border-radius: 0 0 8px 8px;
  max-height: 220px; overflow-y: auto; box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.geo-list div { padding: 8px 11px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #eef2f7; }
.geo-list div:hover { background: var(--blue-light); }

/* Registration toggle + trial note */
.reg-toggle { margin-top: 14px; text-align: center; font-size: 13px; }
.reg-toggle a { color: var(--blue); font-weight: 600; text-decoration: none; }
.reg-toggle a:hover { text-decoration: underline; }
.trial-note {
  background: var(--blue-light); color: var(--blue); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px;
}

/* Subscription banner */
.sub-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-radius: var(--radius); padding: 13px 18px; margin-bottom: 20px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--border);
}
.sub-banner.info { background: var(--blue-light); color: var(--blue); border-color: #c3d4ec; }
.sub-banner.ok { background: #e5f3e6; color: var(--accent); border-color: #bfe0c1; }
.sub-banner.warn { background: #fdf3e0; color: #9a6a00; border-color: #ecd9ae; }
.sub-banner.err { background: #fdecec; color: var(--red); border-color: #f2c3c3; }

/* Plan cards */
.plan-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.plan-card {
  flex: 1; min-width: 180px; border: 2px solid var(--border); border-radius: 10px;
  padding: 18px; text-align: center;
}
.plan-card:hover { border-color: var(--blue); }
.plan-name { font-size: 15px; font-weight: 700; color: var(--blue); }
.plan-price { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }

/* Language selector */
.lang-sel {
  width: auto; padding: 6px 8px; border-radius: 7px; font-size: 13px; cursor: pointer;
}
.topbar .lang-sel {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5);
}
.topbar .lang-sel option { color: var(--text); }

/* Quick-pick chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px;
  background: var(--blue-light); color: var(--blue); border: 1px solid var(--border);
  cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip:hover { background: var(--blue); color: #fff; }

/* Badges & misc */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.green { background: #e5f3e6; color: var(--accent); }
.badge.gray { background: #eceff3; color: var(--muted); }
.badge.blue { background: var(--blue-light); color: var(--blue); }
.km-big { font-size: 28px; font-weight: 800; color: var(--blue); }
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; display: none; }
.msg.error { background: #fdecec; color: var(--red); display: block; }
.msg.ok { background: #e5f3e6; color: var(--accent); display: block; }
.muted { color: var(--muted); font-size: 13px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat {
  flex: 1; min-width: 150px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.stat .value { font-size: 24px; font-weight: 800; color: var(--blue); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.hidden { display: none !important; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15, 30, 55, .55); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 12px; padding: 24px; width: 100%;
  max-width: 520px; max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 14px; }

@media (max-width: 640px) {
  .container { padding: 12px; }
  .card { padding: 14px; }
}

/* ===== Premium landing (customer login/register) ===== */
.landing { min-height: 100vh; display: flex; }

.landing-left {
  flex: 1.15;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #14264a 0%, #1a3c6e 45%, #2a5b98 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 52px 60px;
}
.landing-left::before {
  content: ''; position: absolute; width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,156,236,.38), transparent 70%);
  top: -170px; right: -130px; pointer-events: none;
}
.landing-left::after {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,125,50,.24), transparent 70%);
  bottom: -150px; left: -110px; pointer-events: none;
}
.ll-inner { position: relative; z-index: 1; max-width: 580px; margin: 0 auto; width: 100%; }
.ll-brand { font-size: 27px; font-weight: 800; letter-spacing: .3px; margin-bottom: 30px; }
.ll-brand::before { content: '📍 '; }
.ll-badge {
  display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  padding: 7px 15px; border-radius: 30px; font-size: 13px; font-weight: 700; margin-bottom: 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ll-title { color: #fff; font-size: 42px; line-height: 1.08; font-weight: 800; margin-bottom: 16px; letter-spacing: -.5px; }
.ll-sub { font-size: 16px; line-height: 1.6; opacity: .92; margin-bottom: 34px; max-width: 500px; }
.ll-features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
.ll-feat {
  display: flex; gap: 13px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 16px 16px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .15s, background .15s;
}
.ll-feat:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.ll-ic { font-size: 22px; line-height: 1.2; }
.ll-feat h3 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.ll-feat p { font-size: 12.5px; line-height: 1.45; opacity: .84; margin: 0; }
.ll-pricing {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 16px 20px;
}
.ll-price { display: flex; flex-direction: column; }
.ll-amt { font-size: 25px; font-weight: 800; line-height: 1.1; }
.ll-per { font-size: 12px; opacity: .82; }
.ll-divider { width: 1px; height: 34px; background: rgba(255,255,255,.22); }
.ll-vat { font-size: 12px; opacity: .72; margin-left: auto; }

.landing-right {
  flex: .85; display: flex; align-items: center; justify-content: center;
  padding: 44px 30px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: 36px; box-shadow: 0 26px 64px rgba(20,40,80,.15);
}
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.auth-brand { font-size: 21px; font-weight: 800; color: var(--blue); }
.auth-brand::before { content: '📍 '; }
.auth-trial {
  background: #e5f3e6; color: var(--accent); border-radius: 11px; padding: 11px 14px;
  font-size: 13px; font-weight: 700; text-align: center; margin-bottom: 22px;
}
.auth-h { font-size: 21px; margin-bottom: 18px; }
.btn-lg { width: 100%; padding: 13px; font-size: 15px; border-radius: 11px; margin-top: 8px; }

@media (max-width: 900px) {
  .landing { flex-direction: column; }
  .landing-right { order: -1; padding: 30px 18px 20px; }
  .landing-left { padding: 34px 22px 44px; }
  .ll-title { font-size: 29px; }
  .ll-sub { font-size: 15px; margin-bottom: 26px; }
  .ll-features { grid-template-columns: 1fr; }
  .auth-card { max-width: 460px; padding: 28px; box-shadow: 0 14px 40px rgba(20,40,80,.12); }
}
@media (max-width: 480px) {
  .ll-pricing { gap: 12px; }
  .ll-divider { display: none; }
  .ll-vat { margin-left: 0; width: 100%; }
}
