/* Müşteri ekranı düzeni (telefon öncelikli). Renkler ve ortak parçalar ortak.css'te (SELECT-ERP tasarım sistemi). */
html { background: var(--bg); }
body.m { min-height: 100vh; background: var(--bg); color: var(--fg); font-family: var(--font);
  padding-bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
body.m a { color: var(--accent); }

/* Üst çubuk */
.m-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 60px; padding: 8px max(16px, env(safe-area-inset-left)) 8px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.gecis-serit + .m-top { top: 38px; }
.m-top .brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--fg);
  font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.m-top .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-fg);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
.m-mark svg { width: 18px; height: 18px; fill: currentColor; }
.m-top .row { flex: none; display: flex; align-items: center; gap: 8px; }
.langs { display: inline-flex; padding: 2px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.langs a { padding: 4px 9px; border-radius: 99px; text-decoration: none; color: var(--muted) !important; }
.langs a.on { background: var(--surface); color: var(--fg) !important; box-shadow: var(--shadow-1); }
.m-bal { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 99px; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent) !important; font-weight: 800; font-size: 14px; text-decoration: none;
  font-variant-numeric: tabular-nums; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.m-bal-plus { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); }
.m-bal-plus svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* İçerik */
.m-main { max-width: 600px; margin: 0 auto; padding: 18px 16px; }
.m-main h1 { font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin: 4px 0 14px; }
.m-main h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.m-main .card { margin-bottom: 12px; border-radius: var(--r-lg); }
.m-center { text-align: center; } .small { font-size: 13px; }
.m-help { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }
.big-btn { min-height: 52px; padding: 14px; font-size: 16px; font-weight: 700; border-radius: 14px; }
.btn .ik, .m-ik { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.btn .ik { margin-right: 6px; }

/* Canlı şarj kartı */
.m-live { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); box-shadow: var(--shadow-2); }
.m-live-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: pl 1.4s infinite; flex: none; }
.pulse.warn { background: var(--warn); }
@keyframes pl { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.m-kwh { font-size: 56px; font-weight: 800; text-align: center; margin: 12px 0 4px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.m-kwh small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.m-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; margin: 12px 0; }
.m-grid3 > div { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 4px; }
.m-grid3 span, .m-tile span, .m-price span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.m-grid3 b { font-size: 17px; font-variant-numeric: tabular-nums; }
.m-soc { position: relative; height: 28px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 12px; }
.m-soc div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ok), var(--accent)); }
.m-soc span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.m-ready { font-weight: 800; color: var(--ok); font-size: 17px; margin: 0 0 6px; }
.m-warn { font-weight: 700; color: var(--warn); margin: 0 0 8px; }

/* Kutucuklar, listeler */
.m-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-grid2 .btn { white-space: normal; min-width: 0; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.m-tile { display: block; text-decoration: none; color: var(--fg) !important; transition: transform .15s, box-shadow .15s; }
.m-tile b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.m-list { padding: 4px 16px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.m-row:last-of-type { border-bottom: 0; }
.m-row .r { text-align: right; } .m-row b { font-variant-numeric: tabular-nums; }
.m-more { display: block; text-align: right; padding: 8px 0; font-size: 14px; font-weight: 700; text-decoration: none; }
.m-st { display: flex; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--fg) !important; transition: border-color .15s, box-shadow .15s; }
.m-st:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-2); }
.m-st .r { text-align: right; }
.m-conn { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.m-price b { font-size: 30px; font-weight: 800; display: block; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.m-price b small { font-size: 15px; color: var(--muted); font-weight: 500; }
.m-price > small { color: var(--muted); font-size: 12px; }
.m-iban { display: grid; grid-template-columns: 90px 1fr; gap: 8px 10px; background: var(--surface-2); padding: 14px; border-radius: var(--r-md); word-break: break-all; }
.m-iban span { color: var(--muted); font-size: 13px; }
.m-text p { font-size: 14px; line-height: 1.65; color: var(--fg-2); } .m-text h3 { margin-top: 16px; }
label.check span { font-size: 14px; }
.m-map { height: 46vh; min-height: 280px; margin: 0 0 12px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.m-mini { height: 180px; margin: 10px 0 0; border-radius: var(--r-md); overflow: hidden; }
.m-filt { justify-content: space-between; align-items: center; margin-bottom: 6px; }
.m-adres p { margin: 0 0 6px; }
.leaflet-popup-content a { font-weight: 700; }

/* Alt gezinme */
.m-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 12; display: flex; align-items: flex-end;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -12px rgb(0 0 0 / .18); }
.m-nav a { flex: 1; min-width: 0; height: var(--bottomnav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted) !important; text-decoration: none; }
.m-nav a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-nav a:not(.m-scan) svg { box-sizing: content-box; padding: 4px 16px; border-radius: 99px; transition: background .15s; }
.m-nav a.on { color: var(--accent) !important; font-weight: 800; }
.m-nav a.on:not(.m-scan) svg { background: var(--accent-soft); }
.m-nav .m-scan { justify-content: flex-end; padding-bottom: 8px; color: var(--accent) !important; font-weight: 800; }
.m-nav .m-scan > span:first-child { display: grid; place-items: center; width: 56px; height: 56px; margin: -22px 0 2px; border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-fg);
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent); border: 3px solid var(--bg); }
.m-nav .m-scan svg { width: 24px; height: 24px; stroke-width: 2; }
@media (min-width: 700px) {
  .m-nav { left: calc(50% - 300px); right: calc(50% - 300px); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; }
}

/* Giriş ve kayıt */
body.m:has(.m-login) { padding-bottom: 0; }
.m-login { min-height: 100svh; max-width: 440px; display: flex; flex-direction: column; padding-block: clamp(26px, 8svh, 84px) clamp(24px, 6svh, 60px); }
.m-hero { text-align: center; padding: 8px 8px 4px; }
.m-hero img { display: block; margin: 0 auto 12px; width: 84px; height: 84px; border-radius: 24px; box-shadow: var(--shadow-2); }
.m-hero strong { display: block; color: var(--fg); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.m-hero h1 { justify-content: center; color: var(--muted); font-size: clamp(17px, 4.4vw, 21px); font-weight: 600; margin: 6px 0; }
.m-hero p { color: var(--muted); margin: 0 0 18px; }
.m-login-welcome { flex: 1; display: grid; place-items: center; min-height: 48px; margin: 0; color: var(--accent); font-size: 22px; font-weight: 700; }
.m-login form { padding: 20px; border-radius: 22px; box-shadow: var(--shadow-2); }
.m-login .form-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-login .form-top h2 { margin: 0; text-transform: none; letter-spacing: -.01em; font-size: 18px; color: var(--fg); }
.m-login .btn { min-height: 48px; font-weight: 700; }
.m-login .m-center { margin: 0 0 8px; }
@media (prefers-reduced-motion: no-preference) {
  .m-login .m-hero { animation: m-gir .45s ease-out both; }
  @keyframes m-gir { from { opacity: 0; transform: translateY(8px); } }
}

/* QR okuma */
.scan-box { position: relative; width: 100%; aspect-ratio: 1/1; max-height: 62vh; background: #000; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-2); }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16%; border: 3px solid rgb(255 255 255 / .92); border-radius: 22px; box-shadow: 0 0 0 999px rgb(0 0 0 / .38); }
.scan-box.off { aspect-ratio: auto; height: 120px; background: var(--surface-2); box-shadow: none; }
.scan-box.off .scan-frame, .scan-box.off video { display: none; }
.file-btn { display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }

/* Yönetici müşteri hesabına geçtiğinde üstte duran uyarı şeridi */
.gecis-serit { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  min-height: 38px; padding: 7px 16px; background: #7c2d12; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.gecis-serit a { color: #fff !important; background: rgb(255 255 255 / .18); padding: 3px 10px; border-radius: 99px; text-decoration: none; white-space: nowrap; }

@media (max-width: 380px) {
  .m-top .brand > span:last-child { display: none; }
  .m-kwh { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } .m-tile, .m-st { transition: none; } }
