/* Prodexa Personel Mobil — açık zemin, magenta aksan, Ubuntu (app/static) */
@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap");

:root {
  --px-magenta: #a3238e;
  --px-magenta-dark: #8a1d78;
  --px-orange: #fdb913;
  --px-lime: #8cc63f;
  --px-cyan: #00aeef;
  --px-navy: #2d3748;
  --px-blue: #a3238e;
  --px-blue-dark: #8a1d78;
  --px-ik: #a3238e;
  --px-ink: #333333;
  --px-muted: #777777;
  --px-line: #eceff3;
  --px-bg: #f5f5f5;
  --px-bg-soft: #fafafa;
  --px-card: #ffffff;
  --px-ok: #5a9e2f;
  --px-warn: #d97706;
  --px-danger: #be123c;
  --px-radius: 12px;
  --px-radius-sm: 10px;
  --nav-h: 60px;
  --px-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --px-font: "Ubuntu", "Segoe UI", system-ui, sans-serif;
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--px-bg);
  color: var(--px-ink);
  font-family: var(--px-font);
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
}

body.has-nav {
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

input,
textarea,
select,
button {
  font-family: inherit;
  -webkit-user-select: text;
  user-select: text;
}

/* Gökkuşağı şerit */
.px-rainbow {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--px-magenta) 0 25%,
    var(--px-orange) 25% 50%,
    var(--px-lime) 50% 75%,
    var(--px-cyan) 75% 100%
  );
  flex-shrink: 0;
}

/* —— Header —— */
.mobil-header {
  background: #fff;
  color: var(--px-ink);
  padding: 12px 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none;
  border-bottom: none;
}

.mobil-header::after {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 10px;
  background: linear-gradient(
    90deg,
    var(--px-magenta) 0 25%,
    var(--px-orange) 25% 50%,
    var(--px-lime) 50% 75%,
    var(--px-cyan) 75% 100%
  );
}

.mobil-header .btn-back {
  color: var(--px-magenta);
  background: rgba(163, 35, 142, 0.08);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 0;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobil-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  color: var(--px-muted);
  letter-spacing: -0.01em;
}

.mobil-header .btn-logout {
  color: var(--px-magenta);
  background: rgba(163, 35, 142, 0.08);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 0;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-left: auto;
}

.mobil-header .btn-logout:hover,
.mobil-header .btn-logout:focus {
  color: #fff;
  background: var(--px-magenta);
}

.mobil-screen {
  min-height: 100vh;
  padding: 16px 16px 28px;
}

body.has-nav .mobil-screen {
  min-height: auto;
}

/* —— Buttons —— */
.mobil-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  text-decoration: none;
  color: #fff;
  background: var(--px-magenta);
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(163, 35, 142, 0.28);
  transition: background 0.15s ease, transform 0.05s ease;
}

.mobil-btn:active {
  transform: scale(0.98);
}

.mobil-btn:hover {
  background: var(--px-magenta-dark);
  color: #fff;
}

.mobil-btn.secondary {
  background: rgba(163, 35, 142, 0.1);
  color: var(--px-magenta);
  box-shadow: none;
}

.mobil-btn.secondary:hover {
  background: rgba(163, 35, 142, 0.16);
  color: var(--px-magenta-dark);
}

.mobil-btn.ghost {
  background: transparent;
  border: 1.5px solid var(--px-line);
  color: var(--px-muted);
  box-shadow: none;
}

.mobil-btn.ghost:hover {
  border-color: var(--px-magenta);
  color: var(--px-magenta);
}

.mobil-btn.ok {
  background: var(--px-lime);
  color: #1a2e0a;
  box-shadow: 0 6px 18px rgba(140, 198, 63, 0.3);
}

.mobil-btn.danger {
  background: var(--px-danger);
  box-shadow: none;
}

/* —— Forms —— */
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--px-muted);
  margin-bottom: 6px;
}

.aktif-input,
.mobil-input {
  background: #fff;
  border: 1.5px solid var(--px-line);
  border-radius: var(--px-radius-sm);
  padding: 13px 14px;
  color: var(--px-ink);
  font-size: 1rem;
  width: 100%;
  margin-bottom: 12px;
}

.aktif-input:focus,
.mobil-input:focus {
  outline: none;
  border-color: var(--px-magenta);
  box-shadow: 0 0 0 3px rgba(163, 35, 142, 0.15);
}

.aktif-input::placeholder,
.mobil-input::placeholder {
  color: #a0aec0;
}

/* —— KPI —— */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--px-card);
  border: none;
  border-radius: var(--px-radius);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--px-shadow);
}

.kpi-card .v {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--px-ink);
}

.kpi-card .l {
  font-size: 0.68rem;
  color: var(--px-muted);
  margin-top: 4px;
  font-weight: 500;
}

.kpi-card.accent .v {
  color: var(--px-magenta);
}

.kpi-card.ok .v {
  color: var(--px-lime);
}

.kpi-card.warn .v {
  color: var(--px-orange);
}

/* —— Menu tiles —— */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu-tile {
  background: var(--px-card);
  border: none;
  border-radius: var(--px-radius);
  padding: 16px 14px;
  text-decoration: none;
  color: var(--px-ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  box-shadow: var(--px-shadow);
}

.menu-tile i {
  font-size: 1.35rem;
  color: var(--px-magenta);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(163, 35, 142, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-tile span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--px-ink);
}

.menu-tile small {
  color: var(--px-muted);
  font-size: 0.75rem;
}

/* —— Sections / cards —— */
.section-label {
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--px-magenta);
  margin: 18px 0 10px;
  font-weight: 700;
}

.info-card {
  background: var(--px-card);
  border-radius: var(--px-radius);
  border: none;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--px-shadow);
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--px-line);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .k {
  color: var(--px-muted);
  font-size: 0.85rem;
}

.info-row .v {
  font-weight: 700;
  text-align: right;
  font-size: 0.9rem;
  color: var(--px-ink);
}

.list-item {
  background: var(--px-card);
  border-radius: var(--px-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  border: none;
  box-shadow: var(--px-shadow);
}

.list-item .title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--px-ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.list-item .meta {
  font-size: 0.8rem;
  color: var(--px-muted);
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #f0f0f0;
  color: var(--px-muted);
}

.chip.ok {
  background: rgba(140, 198, 63, 0.18);
  color: #4d7c1f;
}

.chip.warn {
  background: rgba(253, 185, 19, 0.22);
  color: #9a6b00;
}

.chip.danger {
  background: #ffe4e6;
  color: var(--px-danger);
}

/* —— Bottom nav —— */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--px-line);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--px-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.bottom-nav a i {
  font-size: 1.2rem;
}

.bottom-nav a.active {
  color: var(--px-magenta);
  font-weight: 700;
}

/* —— Toast —— */
#toast-host {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(320px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-item {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: mobilSlideIn 0.25s ease;
  pointer-events: auto;
}

.toast-item.success {
  background: #5a9e2f;
  color: #fff;
}

.toast-item.error {
  background: #9f1239;
  color: #fff;
}

.toast-item.warning {
  background: #d97706;
  color: #fff;
}

.toast-item.info {
  background: var(--px-magenta);
  color: #fff;
}

@keyframes mobilSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hello {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--px-ink);
}

.hello-sub {
  color: var(--px-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.logo-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-wrap img {
  max-width: 168px;
  height: auto;
}

.text-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--px-magenta);
}

.text-muted {
  color: var(--px-muted) !important;
}

@media (max-width: 767px) {
  .mobil-btn {
    min-height: 48px;
  }

  .menu-tile {
    min-height: 104px;
  }
}

@media (min-width: 768px) {
  .mobil-screen {
    max-width: 560px;
    margin: 0 auto;
  }

  .bottom-nav {
    max-width: 560px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid var(--px-line);
    border-right: 1px solid var(--px-line);
  }

  .mobil-header {
    max-width: 560px;
    margin: 0 auto;
  }
}

/* —— PWA yükle popup —— */
.pwa-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(45, 55, 72, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
}

.pwa-install-overlay.is-open {
  display: flex;
}

.pwa-install-sheet {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px 16px 12px 12px;
  padding: 0 20px 20px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  text-align: center;
  animation: pwa-sheet-up 0.28s ease-out;
}

@keyframes pwa-sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-rainbow {
  height: 4px;
  margin: 0 -20px 16px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(
    90deg,
    var(--px-magenta) 0 25%,
    var(--px-orange) 25% 50%,
    var(--px-lime) 50% 75%,
    var(--px-cyan) 75% 100%
  );
}

.pwa-install-icon {
  margin: 4px auto 12px;
}

.pwa-install-icon img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: var(--px-shadow);
}

.pwa-install-sheet h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--px-magenta);
}

.pwa-install-lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--px-muted);
  line-height: 1.4;
}

.pwa-install-ios {
  text-align: left;
  background: var(--px-bg-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.pwa-install-ios ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--px-ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pwa-install-ios li + li {
  margin-top: 6px;
}

.pwa-install-sheet .mobil-btn.ghost {
  background: transparent;
  color: var(--px-muted);
  box-shadow: none;
}

@media (min-width: 768px) {
  .pwa-install-overlay {
    align-items: center;
  }

  .pwa-install-sheet {
    border-radius: 16px;
  }
}
