:root{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:#fff1f5;
  color:#3b0a1a;
}
body{margin:0}
a{color:#9d174d}
.wrap{max-width:920px;margin:24px auto;padding:0 16px}
.card{
  background:#ffffffcc;
  border:1px solid #fecdd3;
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.08)
}
.logo-row{display:flex;justify-content:center;align-items:center;margin-bottom:10px}
.logo{max-width:180px;max-height:80px;object-fit:contain}
.brand{font-weight:900;opacity:.95;text-align:center}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  background:#be185d;
  color:#fff;
  border-bottom:1px solid #fecdd3;

  /* ✅ mobile fix */
  position:sticky;
  top:0;
  z-index:50;
  gap:10px;
  flex-wrap:wrap;
}
.topbar .brand{color:#fff;font-weight:900;text-align:left;min-width:220px}
.topbar .nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
.nav a{margin-left:0;color:#fff;text-decoration:none;opacity:.95;white-space:nowrap}

h1{margin:10px 0 6px 0;font-size:22px}
h3{margin:10px 0 6px 0}
.sub{opacity:.85;font-size:14px}
.hint{margin-top:10px;opacity:.9;font-size:13px}
.err{background:#ffe4e6;border:1px solid #fb7185;color:#9f1239;padding:10px;border-radius:12px;margin:10px 0}
.ok{background:#fce7f3;border:1px solid #f9a8d4;padding:10px;border-radius:12px;margin:10px 0}
hr{border:0;border-top:1px solid #fecdd3;margin:16px 0}
.divider{height:1px;background:#fecdd3;margin:14px 0}

.form{display:flex;flex-direction:column;gap:8px;margin-top:12px}
label{display:block;margin-top:6px;margin-bottom:2px;font-size:13px;opacity:.95}
input,select{
  width:100%;
  padding:11px 12px;border-radius:12px;border:1px solid #fda4af;background:#fff;
  font-size:15px;outline:none;box-sizing:border-box
}
input:focus,select:focus{border-color:#ec4899;box-shadow:0 0 0 3px rgba(236,72,153,.15)}
button,.btn{
  display:inline-flex;justify-content:center;align-items:center;
  padding:11px 14px;border-radius:14px;
  border:1px solid #be185d;background:#be185d;color:#fff;
  text-decoration:none;font-weight:900;cursor:pointer;
}
button:disabled{opacity:.6;cursor:not-allowed}
.btn:hover,button:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent;color:#9d174d;border-color:#f9a8d4}
.btn.small{padding:10px 12px;border-radius:12px;font-size:14px}
.smalllink{display:inline-block;margin-top:10px;font-size:13px;text-decoration:none;opacity:.9}

.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap} /* ✅ mobilde taşmasın */
.row input{flex:1;min-width:220px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr auto auto;gap:10px;align-items:center}

.stamps{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:14px 0}
.stamp{
  border:1px dashed #fda4af;border-radius:14px;padding:14px 0;text-align:center;
  background:#fff;color:#9d174d;font-weight:900;opacity:.95
}
.stamp.on{border-style:solid;background:#f472b6;border-color:#ec4899;color:#fff;opacity:1}

.rewards{display:grid;gap:10px;margin-top:12px}
.reward{display:flex;justify-content:space-between;gap:10px;border:1px solid #fecdd3;border-radius:14px;padding:12px;background:#fff}
.rt{font-weight:900}
.rs{opacity:.9;margin-top:4px}

.table{margin-top:12px}
.thead,.trow{
  display:grid;
  grid-template-columns:2fr 1.3fr .7fr .6fr .6fr;
  gap:10px;
  padding:10px;
  border-bottom:1px solid #fecdd3;
  align-items:center; /* ✅ butonlar ortalı dursun */
}
.thead{opacity:.85;font-weight:900}
.trow a{color:#9d174d}
.logrow{padding:8px 0;border-bottom:1px solid #fecdd3;opacity:.9;font-size:13px}

.badge{display:inline-block;padding:2px 8px;border-radius:999px;background:#fce7f3;border:1px solid #f9a8d4;font-size:12px}

@media (max-width:720px){
  .grid2{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}

  /* ✅ mobilde tablo kolonlarını daha dengeli yap */
  .thead,.trow{grid-template-columns:1.4fr 1fr .8fr .6fr 1.2fr}

  /* ✅ head uzun kelimeleri kırabilsin */
  .thead div{word-break:break-word}
}
@media (min-width:720px){
  .stamps{grid-template-columns:repeat(12,1fr)}
  .rewards{grid-template-columns:1fr 1fr}
}

/* customer center + qr */
.customer-info{ text-align:center; margin: 6px 0 10px; }
.customer-name{ margin: 6px 0 4px; font-size:22px; }
.customer-phone{ opacity:.85; font-size:14px; }

.brand-header{
  display:flex;justify-content:center;align-items:center;
  padding:14px 16px;background:#ffffffcc;border-bottom:1px solid #fecdd3
}
.brand-header img{width:100%;max-width:520px;height:auto}

.qr-area{ text-align:center; margin: 14px 0 6px; }
.qr-title{ font-size:13px; opacity:.9; margin-bottom:8px; }
.qr-area img{ width:220px; max-width:100%; border-radius:14px; border:1px solid #fecdd3; background:#fff; }
.qr-sub{ display:none; } /* ✅ artık link görünmesin */

/* Customer list action buttons nicer */
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-start;
}
.actions .btn{padding:10px 12px;border-radius:12px;font-size:14px}
/* Admin customers mobile: table -> card rows */
@media (max-width:720px){

  /* Başlık satırını gizle (mobilde gereksiz ve kırılıyor) */
  .table .thead{ display:none; }

  /* Her satırı kart gibi yap */
  .table .trow{
    display:grid !important;
    grid-template-columns: 1fr !important;
    gap:8px;
    padding:12px;
    border:1px solid #fecdd3;
    border-radius:14px;
    margin-bottom:10px;
    background:#fff;
  }

  /* Telefon/e-posta blokta düzgün taşsın */
  .table .trow .sub{
    word-break: break-word;
  }

  /* İşlem butonları: yan yana */
  .actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-start;
  }
  .actions .btn, .actions button{
    flex: 1 1 auto;
    min-width: 92px; /* Aç/Düzenle/Sil butonları okunur */
  }
}
/* === Pembe butonlarda yazı okunurluğu fix === */
.btn {
  color: #fff !important;   /* yazı beyaz */
}

/* Ghost butonlar (Pasif Yap gibi) beyaz olmasın */
.btn.ghost {
  color: inherit !important;
}

