/* Pazarlama Takip — mobil öncelikli arayüz */
:root {
  --bg: #f3efe6;
  --bg-deep: #e7e0d2;
  --ink: #14201b;
  --muted: #5c6b63;
  --brand: #0b3d2e;
  --brand-2: #1a6b4f;
  --accent: #c45c26;
  --accent-soft: #f3d9c8;
  --line: rgba(20, 32, 27, 0.12);
  --card: rgba(255, 252, 246, 0.92);
  --ok: #1f7a4c;
  --err: #a12828;
  --warn: #9a6b12;
  --shadow: 0 18px 40px rgba(11, 61, 46, 0.08);
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 107, 79, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 92, 38, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(243, 239, 230, 0.86);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  background:
    linear-gradient(145deg, var(--brand-2), var(--brand)),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 45%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
  animation: mark-pulse 4s ease-in-out infinite;
}
@keyframes mark-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}
.brand-text small { color: var(--muted); font-size: 0.72rem; }

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
}
.top-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
}
.top-nav a.is-active,
.top-nav a:hover {
  color: var(--brand);
  background: rgba(11, 61, 46, 0.08);
}
.header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.header-logout,
.nav-logout {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
}
.header-logout:hover,
.nav-logout:hover {
  background: rgba(196, 92, 54, 0.12);
  border-color: rgba(196, 92, 54, 0.25);
}
.header-logout .icon-logout,
.nav-logout .icon-logout { display: block; }
.greeting-title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.share-box {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
}
.share-box input {
  width: 100%;
  font-size: 0.85rem;
}

/* Admin / portal modals — scrollable body, sticky actions */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 32, 27, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  overflow: hidden;
  overscroll-behavior: contain;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 1.3rem);
  max-height: calc(100dvh - 1.3rem);
  margin: 0;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 61, 46, 0.22);
  padding: 0;
  animation: fade-up 0.25s ease both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.modal-dialog.modal-wide {
  width: min(920px, 100%);
}
.modal-dialog h2 {
  font-family: var(--display);
  color: var(--brand);
  font-size: 1.25rem;
  margin: 0;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.95rem 1.15rem 0.65rem;
  flex: 0 0 auto;
}
.modal-dialog > .flash {
  margin: 0 1.15rem 0.5rem;
  flex: 0 0 auto;
}
.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
}
.modal-close:hover { background: rgba(11,61,46,0.08); color: var(--brand); }
.modal-dialog > form.auth-form,
.modal-dialog > form,
.modal-dialog > .modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 1.15rem 0.35rem;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  grid-column: 1 / -1;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(255,253,248,0.92), #fffdf8 35%);
  padding: 0.75rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal-dialog,
  .modal-dialog.modal-wide {
    width: 100%;
    max-height: min(92vh, calc(100dvh - 0.35rem));
    border-radius: 16px 16px 0 0;
  }
}
.modal-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem 0.85rem;
}
@media (min-width: 720px) {
  .modal-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .modal-grid-3 .field { margin-bottom: 0; }
  .modal-grid-3 .span-2 { grid-column: span 2; }
  .modal-grid-3 .span-3 { grid-column: 1 / -1; }
}
.modal-grid-3 .field.checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding-top: 0.35rem;
}
.modal-grid-3 textarea {
  min-height: 64px;
}
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.btn-edit-row {
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
}
.user-chip {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
}

.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem calc(2.5rem + var(--safe-b));
}
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem;
}

.hero {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 0 0.5rem;
  animation: fade-up 0.6s ease both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 0.6rem;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.hero p.lead {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.portal-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
@media (min-width: 720px) {
  .portal-grid { grid-template-columns: repeat(3, 1fr); }
}
.portal-link {
  display: block;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.portal-link:hover {
  transform: translateY(-2px);
  border-color: rgba(26, 107, 79, 0.35);
}
.portal-link h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: var(--brand);
}
.portal-link p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  animation: fade-up 0.45s ease both;
}
.panel h1, .panel h2 {
  font-family: var(--display);
  color: var(--brand);
  margin: 0 0 0.75rem;
}
.panel h1 { font-size: 1.55rem; }
.panel h2 { font-size: 1.2rem; }
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.panel-head h1, .panel-head h2 { margin: 0; }

.muted { color: var(--muted); }
.stack { display: grid; gap: 0.85rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.field { margin-bottom: 0.85rem; }
.auth-form .field input:not([type="checkbox"]):not([type="radio"]),
.auth-form .field select,
.auth-form .field textarea,
.login-wrap .field input:not([type="checkbox"]):not([type="radio"]),
.login-wrap .field select,
.login-wrap .field textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"],
input:not([type]),
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 2.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
textarea {
  height: auto;
  min-height: 90px;
  resize: vertical;
}
input[type="file"] {
  height: auto;
  padding: 0.45rem 0.5rem;
}
/* Checkboxes: do NOT inherit full-width / appearance:none text-input styles */
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 0.4rem 0 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--brand-2);
  appearance: auto;
  -webkit-appearance: auto;
  cursor: pointer;
  flex: 0 0 auto;
}
label.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
label.check-inline input[type="checkbox"] {
  margin: 0;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(26, 107, 79, 0.35);
  border-color: var(--brand-2);
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid rgba(26, 107, 79, 0.45);
  outline-offset: 2px;
}

/* Şifre göster/gizle */
.password-wrap {
  position: relative;
  display: block;
}
.password-wrap input {
  padding-right: 2.75rem !important;
}
.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.password-toggle:hover {
  color: var(--brand);
  background: rgba(11, 61, 46, 0.08);
}
.password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  pointer-events: none;
}
.login-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0.15rem 0 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
}
.btn-accent {
  background: linear-gradient(135deg, #d9783d, var(--accent));
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn-danger {
  background: #a12828;
  color: #fff;
}
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
  animation: fade-up 0.35s ease both;
}
.flash-success { background: #dff3e8; color: var(--ok); }
.flash-error { background: #f8e0e0; color: #a12828; }
.flash-info { background: #e7eef8; color: #1d4f8c; }

/* Stats: keep all boxes (e.g. 5) on ONE row; mobile can scroll horizontally */
.stats {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.15rem;
}
.stat {
  flex: 1 1 0;
  min-width: 4.75rem;
  padding: 0.75rem 0.7rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,252,246,0.8));
  border: 1px solid var(--line);
  box-sizing: border-box;
}
@media (min-width: 720px) {
  .stats {
    overflow: visible;
    gap: 0.75rem;
  }
  .stat {
    min-width: 0;
    padding: 0.9rem 0.85rem;
  }
}
.stat .num {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  color: var(--brand);
  line-height: 1.1;
}
.stat .lbl {
  font-size: clamp(0.68rem, 1.6vw, 0.78rem);
  color: var(--muted);
  margin-top: 0.2rem;
  white-space: nowrap;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
table.data tr:hover td { background: rgba(11, 61, 46, 0.03); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7a3a12;
}
.badge-ok { background: #dff3e8; color: var(--ok); }
.badge-err { background: #f8e0e0; color: #a12828; }
.badge-demo { background: #e7eef8; color: #1d4f8c; }

.map-box {
  height: min(62vh, 520px);
  min-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 1;
}
.map-popup img {
  max-width: 180px;
  border-radius: 8px;
  display: block;
  margin-top: 0.4rem;
}
.map-popup strong { display: block; margin-bottom: 0.2rem; }

.visit-list { display: grid; gap: 0.65rem; }
.visit-item {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.65);
}
.visit-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--brand);
}
.visit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.visit-item img.thumb {
  margin-top: 0.5rem;
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
}

.login-wrap {
  max-width: 420px;
  margin: 1rem auto;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.tabs a {
  text-align: center;
  text-decoration: none;
  padding: 0.55rem 0.3rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
}
.tabs a.is-active {
  color: var(--brand);
  background: rgba(11, 61, 46, 0.08);
  border-color: var(--line);
}

.geo-status {
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(11, 61, 46, 0.06);
  margin-bottom: 0.85rem;
}
.geo-status.ok { background: #dff3e8; color: var(--ok); }
.geo-status.err { background: #f8e0e0; color: #a12828; }

.filters {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
}

.empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
}

.fab-hint {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--safe-b));
  z-index: 40;
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .top-nav { width: 100%; order: 3; flex: 1 1 100%; }
  .header-end { margin-left: auto; }
  .user-chip { display: none; }
  table.data { font-size: 0.82rem; }
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 22, 18, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox-backdrop[hidden] { display: none !important; }
.lightbox-backdrop img {
  max-width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  background: #111;
}
.lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 0;
  background: rgba(255,255,255,0.92);
  color: var(--brand);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
img.thumb {
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
img.thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(11,61,46,0.18);
}

/* Phone actions */
.phone-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0.35rem 0 0;
}
.phone-line .phone-num { color: var(--ink); font-weight: 600; }
.phone-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  text-decoration: none;
}
.phone-ico:hover { border-color: rgba(26,107,79,0.4); background: rgba(26,107,79,0.08); }
.phone-ico.wa { color: #128c7e; }
.phone-ico svg { width: 1rem; height: 1rem; display: block; }

/* Quick filters (özel) */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.quick-filters .qf {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.quick-filters .qf.is-active,
.quick-filters .qf:hover {
  color: var(--brand);
  border-color: rgba(26,107,79,0.35);
  background: rgba(26,107,79,0.08);
}

/* Bar charts */
.charts-grid {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1rem;
}
@media (min-width: 800px) {
  .charts-grid { grid-template-columns: 1fr 1fr; }
}
.chart-panel h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--brand);
  margin: 0 0 0.65rem;
}
.bar-chart { display: grid; gap: 0.45rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 7.5rem) 1fr auto;
  gap: 0.45rem;
  align-items: center;
}
.bar-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(11,61,46,0.08);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  min-width: 0;
  transition: width 0.35s ease;
}
.bar-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  min-width: 1.5rem;
  text-align: right;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem 0.85rem;
}
@media (min-width: 640px) {
  .modal-grid-2 { grid-template-columns: 1fr 1fr; }
  .modal-grid-2 .span-2 { grid-column: 1 / -1; }
  .modal-grid-2 .field { margin-bottom: 0; }
}
.photo-edit-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.photo-edit-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

/* Kartvizit okuma */
.kartvizit-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.85rem;
}
.btn-kartvizit {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
}
.kartvizit-preview-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f1ea;
  margin-bottom: 0.65rem;
}
.kartvizit-progress {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}
.kartvizit-progress.is-busy { color: var(--brand); font-weight: 600; }
.kartvizit-crop-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  touch-action: none;
  aspect-ratio: 4 / 5;
  max-height: 46vh;
}
.kartvizit-modal-actions {
  flex-wrap: nowrap;
  gap: 0.4rem;
  justify-content: stretch;
}
.kartvizit-modal-actions .btn {
  flex: 1 1 0;
  padding: 0.45rem 0.35rem;
  font-size: 0.86rem;
  white-space: nowrap;
  min-width: 0;
}
.kartvizit-crop-img,
.kartvizit-live-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
  background: #0d0d0d;
}
.kartvizit-live-video {
  transform: scaleX(1);
}
.kartvizit-crop-frame {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  border-radius: 6px;
  pointer-events: none;
}
.kartvizit-live-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
