/* Mobil arayüz — dark theme (main.css'teki light vars'ı override eder) */
body.mobile-wrap {
  /* dark theme overrides */
  --bg:       #0d1117;
  --bg-2:     #161b22;
  --bg-3:     #21262d;
  --border:   #30363d;
  --text:     #e6edf3;
  --text-dim: #8b949e;
  --primary:  #ff4b6a;   /* dark-theme'de daha yumuşak kırmızı */
  --primary-soft: rgba(255,75,106,0.12);

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d1117 100%);
  padding: 20px;
  font-family: 'Open Sans', -apple-system, system-ui, sans-serif;
  color: var(--text);
}

.phone {
  width: 375px;
  height: 780px;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 0 0 2px #30363d, 0 20px 60px rgba(0,0,0,0.6);
  position: relative;
}
.phone::before {
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 28px; background: #000; border-radius: 20px; z-index: 10;
}
.screen {
  width: 100%; height: 100%; background: var(--bg); border-radius: 32px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  color: var(--text);
}
.screen-content { flex: 1; overflow-y: auto; padding: 60px 20px 90px; }
.screen-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.screen-sub   { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }

/* Mobile card + stats */
.status-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
}
.status-card.ok { border-color: #3fb950; background: rgba(63,185,80,0.08); }
.status-card .label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }
.status-card .value { font-size: 18px; font-weight: 700; margin-top: 6px; color: var(--text); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat.late .num { color: #f0883e; }
.stat .lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; font-weight: 700; }

.list-item {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.list-item .primary   { font-weight: 700; font-size: 13px; color: var(--text); }
.list-item .secondary { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* Mobile-scoped badge overrides (dark versions) */
body.mobile-wrap .badge.green  { background: rgba(63,185,80,0.15);  color: #3fb950; border: none; }
body.mobile-wrap .badge.orange { background: rgba(240,136,62,0.15); color: #f0883e; border: none; }
body.mobile-wrap .badge.red    { background: rgba(248,81,73,0.15);  color: #f85149; border: none; }
body.mobile-wrap .badge.blue   { background: rgba(88,166,255,0.15); color: #58a6ff; border: none; }

/* Mobile hint + error dark */
body.mobile-wrap .hint {
  background: rgba(255,75,106,0.08);
  border: 1px solid rgba(255,75,106,0.25);
  color: var(--text-dim);
}
body.mobile-wrap .hint code {
  color: var(--primary);
  background: rgba(255,75,106,0.15);
}
body.mobile-wrap .error {
  background: rgba(248,81,73,0.1);
  border-color: rgba(248,81,73,0.3);
  color: #f85149;
}

/* Mobile inputs on dark */
body.mobile-wrap .form-group input,
body.mobile-wrap .form-group select {
  background: var(--bg); color: var(--text); border-color: var(--border);
}
body.mobile-wrap .form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,75,106,0.12); }

/* Mobile buttons on dark */
body.mobile-wrap .btn.secondary {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--border);
}

/* Bottom nav */
.nav {
  position: absolute; bottom: 0; left: 0; right: 0; height: 72px;
  background: var(--bg-2); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  border-radius: 0 0 32px 32px;
}
.nav a {
  color: var(--text-dim); text-align: center; font-size: 10px; padding: 8px; flex: 1;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.nav a.active { color: var(--primary); }
.nav a .icon { font-size: 22px; display: block; text-transform: none; }

/* Scanner */
.scanner-frame {
  width: 240px; height: 240px; margin: 20px auto;
  border: 2px solid var(--primary); border-radius: 20px;
  position: relative; overflow: hidden;
  background: rgba(255,75,106,0.05);
}
.scanner-frame::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary); box-shadow: 0 0 12px var(--primary);
  animation: scan 2s linear infinite;
}
@keyframes scan { 0% { top: 0; } 50% { top: calc(100% - 3px); } 100% { top: 0; } }

.token-input {
  width: 100%; padding: 12px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-family: 'SF Mono', Menlo, monospace; font-size: 13px;
}
.scan-result {
  padding: 14px; border-radius: 10px; margin-top: 12px; font-size: 13px; font-weight: 700;
}
.scan-result.ok  { background: rgba(63,185,80,0.12); color: #3fb950; border: 1px solid #3fb950; }
.scan-result.err { background: rgba(248,81,73,0.12); color: #f85149; border: 1px solid #f85149; }

/* Mobile login screen */
.mobile-login { padding: 60px 30px; }
.mobile-login h1 { color: var(--primary); margin-bottom: 8px; font-weight: 800; }
.mobile-login .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 30px; }
.mobile-login input {
  width: 100%; padding: 14px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); margin-bottom: 12px; font-size: 14px;
  font-family: inherit;
}
.mobile-login button {
  width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none;
  border-radius: 10px; font-weight: 800; font-size: 15px; margin-top: 8px; cursor: pointer;
  font-family: inherit;
}

/* Standalone PWA / gerçek cihaz */
@media (display-mode: standalone), (max-width: 500px) {
  body.mobile-wrap { padding: 0; background: var(--bg); min-height: 100vh; min-height: 100dvh; }
  .phone {
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0; padding: 0; box-shadow: none;
  }
  .phone::before { display: none; }
  .screen { border-radius: 0; }
  .screen-content { padding-top: max(60px, env(safe-area-inset-top, 60px)); padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .nav { padding-bottom: env(safe-area-inset-bottom, 0px); height: calc(72px + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
}
