:root {
  --bg: #f3efe6;
  --ink: #1c1917;
  --muted: #78716c;
  --card: #fffdf8;
  --line: #e7e0d4;
  --brand: #0f4c5c;
  --brand-2: #1a6b7c;
  --accent: #c45c26;
  --accent-2: #a3471a;
  --ok: #166534;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 76, 92, 0.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(196, 92, 38, 0.08), transparent 35%),
    linear-gradient(180deg, #ebe4d7 0%, var(--bg) 180px, var(--bg) 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.app { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }

/* —— Shop / Vitrin —— */
.shop-home { animation: shopFade 0.55s ease both; }
@keyframes shopFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.shop-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: min(78vh, 680px);
  display: grid;
  align-items: end;
  color: #f8fafc;
  overflow: hidden;
  background: linear-gradient(135deg, #0f4c5c, #1a6b7c);
}
.shop-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.shop-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 0;
  background-color: #0b2f38;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(0px) saturate(0.92);
  transform: scale(1.06);
  transition:
    opacity var(--banner-fade, 1s) ease,
    visibility var(--banner-fade, 1s) ease,
    transform var(--banner-ken, 7s) ease-out;
}
.shop-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1.02);
  z-index: 1;
}
.shop-hero.no-kenburns .shop-hero-slide,
.shop-hero.no-kenburns .shop-hero-slide.is-active {
  transform: none;
}
.shop-hero.hide-cover .shop-hero-cover-wrap {
  display: none;
}
.shop-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(8, 36, 44, 0.94) 18%, rgba(15, 76, 92, 0.62) 46%, rgba(15, 76, 92, 0.28) 72%, rgba(8, 36, 44, 0.45) 100%),
    linear-gradient(0deg, rgba(8, 36, 44, 0.5) 0%, transparent 40%);
}
.shop-hero-cover-wrap {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: max(1.25rem, calc((100vw - 1100px) / 2 + 0.5rem));
  transform: translateY(-50%);
  height: min(86%, calc(min(78vh, 680px) - 4.5rem));
  max-height: 560px;
  aspect-ratio: 3 / 4;
  width: auto;
  max-width: min(34vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.shop-hero-cover {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 6px;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;
  transform: translateY(0) rotate(2.5deg);
  transition: opacity 0.45s ease, transform 0.55s ease;
  opacity: 1;
}
.shop-hero-cover.is-swap {
  opacity: 0;
  transform: translateY(14px) rotate(2.5deg) scale(0.98);
}
.shop-hero-inner {
  position: relative;
  z-index: 4;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4.5rem;
  padding-right: min(38vw, 340px);
}
.shop-hero-brand {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  line-height: 1.02;
}
.shop-hero-title {
  font-family: var(--font);
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  font-weight: 500;
  max-width: 28rem;
  opacity: 0.92;
  margin-bottom: 0.65rem;
  line-height: 1.4;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.shop-hero-lead {
  max-width: 32rem;
  opacity: 0.78;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.shop-hero-title.is-swap,
.shop-hero-lead.is-swap {
  opacity: 0;
  transform: translateY(8px);
}
.shop-hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.shop-hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 1100px;
  width: calc(100% - 2.5rem);
  justify-content: center;
}
.shop-hero-arrow {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(8, 36, 44, 0.35);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.shop-hero-arrow:hover {
  background: rgba(8, 36, 44, 0.55);
  border-color: rgba(255,255,255,0.55);
}
.shop-hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.shop-hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.shop-hero-dot.is-active {
  width: 1.45rem;
  background: #fff;
}
.shop-hero.is-paused .shop-hero-slide.is-active {
  transition-duration: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .shop-hero-slide,
  .shop-hero-title,
  .shop-hero-lead,
  .shop-hero-dot,
  .shop-hero-cover {
    transition: none !important;
  }
  .shop-hero-slide { transform: none !important; }
  .shop-hero-cover { transform: none !important; }
}

@media (max-width: 720px) {
  .shop-hero { min-height: 62vh; }
  .shop-hero-controls { bottom: 0.85rem; }
  .shop-hero-inner {
    padding-bottom: 4rem;
    padding-right: 1.25rem;
  }
  .shop-hero-cover-wrap {
    right: 0.85rem;
    top: auto;
    bottom: 3.6rem;
    transform: none;
    height: min(42vh, 280px);
    max-height: 280px;
    max-width: min(42vw, 160px);
    opacity: 0.95;
  }
  .shop-hero-cover { transform: rotate(1.5deg); }
}

.btn-ghost-dark {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.18); }

.shop-block {
  margin-top: 2.25rem;
  animation: shopFade 0.7s ease 0.12s both;
}
.shop-block-head { margin-bottom: 1rem; }
.shop-block-head h3 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.shop-mag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.shop-mag {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform 0.25s ease;
}
.shop-mag:hover { transform: translateY(-6px); }
.shop-mag:hover .shop-mag-cover { box-shadow: 0 18px 40px rgba(15, 76, 92, 0.22); }
.shop-mag-cover {
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(160deg, #d6e4e8, #f3efe6);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.12);
  margin-bottom: 0.75rem;
  transition: box-shadow 0.25s ease;
}
.shop-mag-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-mag-cover.fallback {
  display: grid;
  place-items: center;
  padding: 1rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  text-align: center;
}
.shop-mag strong { display: block; font-size: 1.02rem; margin-bottom: 0.2rem; }
.shop-mag .hint { font-size: 0.84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-mag-cta {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.shop-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.shop-plan {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.15rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.shop-plan:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
}
.shop-plan .price {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--brand);
  margin: 0.5rem 0 0.35rem;
}
.shop-plan .plan-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(15, 76, 92, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.logo-upload { display: grid; gap: 0.45rem; }
.logo-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem;
}
.logo-upload input[type="file"] {
  font: inherit;
  font-size: 0.88rem;
}

.shop-company {
  margin-top: 2.75rem;
  padding: 1.75rem 0 0.5rem;
  border-top: 1px solid var(--line);
}
.shop-company-inner {
  display: grid;
  gap: 0.85rem;
}
.shop-company-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
.shop-company-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.shop-company-brand strong {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.shop-company-about {
  color: var(--muted);
  max-width: 48rem;
  font-size: 0.95rem;
}
.shop-company-meta {
  font-size: 0.86rem;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
}
.shop-company-meta a { color: var(--brand); font-weight: 600; }

.header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; gap: 0.85rem; align-items: center; }
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}
.brand.has-logo .brand-mark { display: none; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: #fff; color: var(--brand);
  font-weight: 800; letter-spacing: 0.02em;
  flex-shrink: 0;
}
.brand-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.brand-sub { opacity: 0.85; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; }

.nav { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nav-public { flex: 1 1 auto; justify-content: center; }
.nav-btn, .subnav-btn {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-btn:hover, .subnav-btn:hover { background: rgba(255,255,255,0.16); }
.nav-btn.active {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}

.staff-panel-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.staff-panel-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0.95;
}
.nav-staff { flex: 1 1 auto; }
.nav-staff .nav-btn {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
}

.subnav {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.subnav-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}
.subnav-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}
.header-admin-btn {
  font-size: 0.8rem;
  padding: 0.38rem 0.7rem;
}
.header-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.header-actions .btn-ghost:hover {
  background: rgba(255,255,255,0.14);
}

@media (max-width: 900px) {
  .nav-public { justify-content: flex-start; order: 3; flex: 1 1 100%; }
  .header-actions { margin-left: 0; }
  .staff-panel-bar { align-items: flex-start; }
}

.main { display: block; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.hero h2, .card h2, .card h3, .card h4 {
  font-family: var(--display);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.card-head {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start;
  margin-bottom: 0.5rem;
}
.hint { color: var(--muted); font-size: 0.92rem; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 800px) {
  .grid-2, .row-2, .product-grid, .stats-grid, .charts-grid { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; gap: 0.7rem; }
.stack label, .modal-card label {
  display: flex; flex-direction: column; gap: 0.28rem;
  font-size: 0.86rem; font-weight: 600; color: #44403c;
}
input, select, textarea {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }

.btn {
  border: none; border-radius: 10px;
  padding: 0.6rem 1rem;
  font: inherit; font-weight: 700;
  cursor: pointer;
}
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.84rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.form-error { color: var(--danger); font-size: 0.88rem; }
.success-msg { color: var(--ok); font-size: 0.88rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: var(--brand); }
.product-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.2);
}
.product-card strong { display: block; font-size: 1.05rem; }
.product-card .price {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--accent);
}

.list { display: flex; flex-direction: column; gap: 0.65rem; }
.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.list-item h4 { font-size: 1rem; margin-bottom: 0.2rem; }

.sub-card-body { flex: 1; min-width: 220px; }
.sub-mag-title {
  font-family: var(--display);
  font-size: 1.25rem !important;
  margin-bottom: 0.35rem !important;
  color: var(--ink);
}
.sub-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.sub-date-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sub-dates strong {
  font-size: 0.95rem;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e7e5e4;
  color: #44403c;
}
.badge-aktif, .badge-yolda { background: #dcfce7; color: #166534; }
.badge-hazirlaniyor, .badge-beklemede, .badge-odeme_bekliyor { background: #ffedd5; color: #9a3412; }
.badge-iptal, .badge-teslim_edildi, .badge-suresi_doldu { background: #e2e8f0; color: #334155; }

.payment-box {
  padding: 0.85rem;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.payment-box h4 { margin-bottom: 0.35rem; }
.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}
body:not(.full-admin) .full-admin-only { display: none !important; }
body.mintika-user .mintika-only { display: block !important; }
body:not(.mintika-user) .mintika-only { display: none !important; }
.check-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  font-weight: 600;
}
.check-row input { width: auto; }
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
}
.stat-card span { display: block; color: var(--muted); font-size: 0.8rem; }
.stat-card strong { font-family: var(--display); font-size: 1.45rem; }

.bar-chart { display: flex; flex-direction: column; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 36px; gap: 0.4rem; align-items: center; font-size: 0.82rem; }
.bar-track { height: 10px; background: #f5f5f4; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 999px; }

.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(28,25,23,0.45); }
.modal-card {
  position: relative;
  width: min(420px, calc(100% - 2rem));
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  box-shadow: var(--shadow);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.35rem; }
.modal-card-wide { width: min(560px, calc(100% - 2rem)); }

.filter-input {
  min-width: min(220px, 100%);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.card-head-wrap {
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.table-wrap {
  overflow: auto;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  max-height: min(70vh, 720px);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 980px;
}
.data-table-compact td {
  font-size: 0.84rem;
}
.data-table th.mag-col,
.data-table td.mag-col {
  text-align: left;
  white-space: normal;
  min-width: 6.5rem;
  max-width: 9.5rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}
.mag-names {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  font-size: 0.8rem;
}
.mag-empty {
  color: #d6d3d1;
  font-weight: 600;
}
.data-table th,
.data-table td {
  padding: 0.55rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table th {
  position: sticky;
  top: 0;
  background: #f8f5ef;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--muted);
  z-index: 2;
  white-space: nowrap;
  font-weight: 700;
}
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.data-table th.sortable:hover {
  color: var(--ink);
  background: #f0ebe3;
}
.data-table th.sortable.sort-active {
  color: var(--ink);
}
.data-table th.sortable .sort-ind {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 700;
}
.data-table thead tr.filter-row th {
  top: 2.35rem;
  background: #fffdf8;
  padding: 0.35rem;
  vertical-align: middle;
  font-weight: 400;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}
.col-filter {
  width: 100%;
  min-width: 0;
  max-width: 9rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.75rem;
  background: #fff;
  color: var(--ink);
}
.mag-col .col-filter {
  max-width: 5.5rem;
  padding: 0.25rem 0.2rem;
  text-align: left;
}
.data-table td.cell-date,
.data-table td.cell-postal {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}
.data-table td.cell-addr {
  max-width: 10rem;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: normal;
}
.data-table tbody tr:hover { background: rgba(15, 76, 92, 0.04); }
.data-table .hint { margin-top: 0.15rem; font-size: 0.78rem; }
.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem 0.75rem !important;
}
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}
.badge-type {
  display: inline-block;
  background: rgba(15, 76, 92, 0.1);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid rgba(185, 28, 28, 0.35);
}
.btn-danger:hover {
  background: rgba(185, 28, 28, 0.08);
}

/* —— Etiketleme —— */
.label-sub-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.label-sub-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.label-sub-item:last-child { border-bottom: none; }
.label-sub-item input { margin-top: 0.2rem; }
.label-sub-item strong { display: block; }
.label-preview-sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
  max-height: 70vh;
  padding: 0.25rem;
}
.label-a4-page {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  box-sizing: border-box;
  transform-origin: top center;
}
.label-sticker {
  position: absolute;
  box-sizing: border-box;
  border: 1px dashed #d6d3d1;
  padding: 5mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.8mm;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.2;
}
.label-sender {
  flex: 0 0 auto;
  font-size: 6.5pt;
  color: #444;
  border-bottom: 0.5pt solid #ccc;
  padding-bottom: 1.2mm;
  margin-bottom: 0.8mm;
  line-height: 1.15;
  max-height: 5mm;
  overflow: hidden;
}
.label-recipient {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  font-size: 8.5pt;
  padding-left: 4.5mm;
  margin-left: 0.5mm;
  border-left: 0.6pt solid #d6d3d1;
}
.label-recipient .name {
  font-weight: 700;
  font-size: 9.5pt;
  margin-bottom: 0.4mm;
}
.label-end {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 1.4mm;
  margin-bottom: 1mm;
  border-top: 0.4pt solid #ddd;
  font-size: 7pt;
  color: #111;
  font-weight: 700;
  white-space: nowrap;
}
.label-logo {
  position: absolute;
  z-index: 0;
  object-fit: contain;
  pointer-events: none;
  opacity: 1;
  top: 3.5mm;
  right: 4mm;
  left: auto;
  bottom: auto;
}
.label-logo.pos-top-left,
.label-logo.pos-bottom-left {
  top: 3.5mm;
  left: 4mm;
  right: auto;
  bottom: auto;
}
.label-logo.pos-top-right,
.label-logo.pos-bottom-right {
  top: 3.5mm;
  right: 4mm;
  left: auto;
  bottom: auto;
}
.label-sender,
.label-recipient,
.label-end,
.label-extra-text {
  position: relative;
  z-index: 1;
}
.label-extra-text {
  flex: 0 0 auto;
  font-weight: 700;
  color: #1c1917;
  line-height: 1.2;
  word-break: break-word;
  margin-top: 1.5mm;
  margin-bottom: 0.8mm;
  padding-top: 0.6mm;
}
.label-extra-text.pos-after-sender { margin-top: 1.8mm; }
.label-extra-text.pos-after-address,
.label-extra-text.pos-bottom {
  margin-top: 1.6mm;
  margin-bottom: 1.2mm;
}
.label-logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.label-logo-preview-img {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

.label-country-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.label-country-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 8.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.label-country-tab:hover { border-color: var(--brand); }
.label-country-tab.is-active {
  border-color: var(--brand);
  background: #eef7f8;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.label-country-tab .tab-code {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.label-country-tab .tab-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #166534;
}
.label-country-tab .tab-badge.is-empty {
  color: var(--muted);
  font-weight: 500;
}
#labelSenderCountryHint {
  font-weight: 500;
  font-size: 0.9rem;
}

.label-templates-modal-card { width: min(720px, calc(100% - 2rem)); }
.label-templates-gallery {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  max-height: min(60vh, 480px);
  overflow: auto;
}
.label-template-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefb;
}
.label-template-card.is-empty {
  opacity: 0.72;
  background: #f8fafc;
}
.label-template-thumb {
  width: 72px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
}
.label-template-thumb.placeholder {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--muted);
}
.label-template-card h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.label-template-card .tpl-lines {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: pre-line;
}
.label-template-card .tpl-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .label-template-card { grid-template-columns: 1fr; }
}

@media print {
  body * { visibility: hidden !important; }
  #labelPrintRoot, #labelPrintRoot * { visibility: visible !important; }
  #labelPrintRoot {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .label-a4-page {
    box-shadow: none;
    border: none;
    page-break-after: always;
    margin: 0;
  }
  .label-sticker { border-color: transparent; }
}

body:not(.staff-auth) .staff-only { display: none !important; }
body.staff-auth #staffLoginBtn { display: none; }
body.customer-auth .customer-guest-only { display: none !important; }
body:not(.customer-auth) .customer-auth-only { display: none !important; }
body.customer-auth #subscribeCard { display: block; }
body:not(.customer-auth) #subscribeCard { display: none; }
body.customer-auth #customerDashWrap { display: block; }

.empty { color: var(--muted); font-size: 0.92rem; padding: 0.5rem 0; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.banner-slides-admin {
  display: grid;
  gap: 0.75rem;
}
.banner-slide-admin {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefb;
}
.banner-slide-admin img {
  width: 120px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8eef0;
}
.banner-slide-admin .stack {
  gap: 0.4rem;
}
.banner-slide-admin .stack label {
  margin: 0;
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .banner-slide-admin {
    grid-template-columns: 1fr;
  }
  .banner-slide-admin img {
    width: 100%;
    height: 120px;
  }
}
