:root{
  --bg: #0b1020;
  --bg2:#0a152e;
  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --shadow: 0 16.2px 36px rgba(0,0,0,.35);
  --shadow2: 0 9px 21.6px rgba(0,0,0,.28);
  --r: 14.4px;
  --r2: 19.8px;
}


html,body{height:100%;}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(810px 540px at 8% 0%, rgba(120,130,255,.22), transparent 55%),
    radial-gradient(810px 540px at 92% 10%, rgba(0,220,255,.14), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

/*
  Kullanıcı isteği:
  - Satış ekranı (page-sale) ve Admin Dashboard (page-dashboard) haricindeki her yer
    bu "glow" arka planı kullanır.
  - Satış ve Dashboard'da daha sade (glow'suz) arka plan.
*/
body.page-sale,
body.page-dashboard{
  background: linear-gradient(180deg, var(--bg), var(--bg2));
}

.container{max-width:1062px;}


.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12.6px);
  -webkit-backdrop-filter: blur(12.6px);
  background: linear-gradient(180deg, rgba(10,18,40,.78), rgba(10,18,40,.40));
  border-bottom: 0.9px solid rgba(255,255,255,.10);
  box-shadow: 0 9px 27px rgba(0,0,0,.20);
}
.brand{
  letter-spacing: 0.18px;
  font-weight: 750;
  display:flex;
  align-items:center;
  gap:9px;
}
.brand .logo{
  width:25.2px;
  height:25.2px;
  border-radius: 9px;
  padding: 5.4px;
  background: rgba(255,255,255,.08);
  border: 0.9px solid rgba(255,255,255,.10);
}


.pill, button.pill, a.pill{
  border-radius: 899.1px;
  padding: 9px 12.6px;
  border: 0.9px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  box-shadow: 0 9px 21.6px rgba(0,0,0,.14);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.pill:hover{transform: translateY(-3.6px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18);} 
.pill:active{transform: translateY(0px) scale(.99);} 

.icon-btn{
  border-radius: 12.6px;
  border: 0.9px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  box-shadow: var(--shadow2);
}


.card, .panel{
  border-radius: var(--r2);
  border: 0.9px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
}


input[type="text"], input[type="number"], input[type="password"], input[type="date"], select, textarea{
  border-radius: 12.6px;
  border: 0.9px solid rgba(255,255,255,.14);
  background: rgba(10,18,40,.55);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 0.9px 0 rgba(255,255,255,.08);
}
input::placeholder, textarea::placeholder{color: rgba(120, 130, 150, .75);} 
input:focus, select:focus, textarea:focus{border-color: rgba(120,130,255,.45); box-shadow: 0 0 0 3.6px rgba(120,130,255,.18);} 


table{
  border-collapse: separate;
  border-spacing: 0 9px;
}
table thead th{
  color: rgba(255,255,255,.78);
  font-weight: 700;
}
table tbody tr{
  background: rgba(255,255,255,.06);
  border: 0.9px solid rgba(255,255,255,.10);
}
table tbody td{
  background: transparent;
}


.user-dropdown, .notif-panel{
  border-radius: 16.2px;
  border: 0.9px solid rgba(255,255,255,.14);
  background: rgba(10,18,40,.88);
  backdrop-filter: blur(12.6px);
  -webkit-backdrop-filter: blur(12.6px);
  box-shadow: var(--shadow);
}





.page-sale .sale-title{font-weight: 800; letter-spacing: 0.18px;}
.page-sale .scan-panel{border-radius: 23.4px;}


.page-admin h2{font-weight: 850; letter-spacing: 0.18px;}
.page-admin .dashboard-grid{gap: 14.4px;}


hr, .user-dd-sep{border-color: rgba(255,255,255,.12) !important;}


@media (max-width: 648px){
  .container{padding-left: 10.8px; padding-right: 10.8px;}
  .topbar{position: static;}
}



.auth-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:25.2px 14.4px;
  background:
    radial-gradient(720px 378px at 20% 20%, rgba(108,140,255,.22), transparent 60%),
    radial-gradient(630px 378px at 85% 30%, rgba(255,140,105,.18), transparent 60%),
    radial-gradient(540px 342px at 55% 85%, rgba(70,255,210,.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

.auth-shell{
  width:min(468px, 100%);
}

.auth-card{
  padding:19.8px 19.8px 16.2px;
  border-radius:16.2px;
  background: rgba(255,255,255,.07);
  border:0.9px solid rgba(255,255,255,.12);
  box-shadow: 0 16.2px 63px rgba(0,0,0,.45);
  backdrop-filter: blur(9px);
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:10.8px;
  margin-bottom:14.4px;
}

.auth-icon{
  width:39.6px; height:39.6px;
  border-radius:12.6px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.10);
  border:0.9px solid rgba(255,255,255,.14);
  font-size:18px;
}

.auth-title{
  margin:0;
  font-size:18px;
  line-height:1.2;
}

.auth-subtitle{
  margin:1.8px 0 0;
  opacity:.8;
  font-size:11.7px;
}

.auth-form{
  display:grid;
  gap:9px;
}

.auth-field label{
  display:block;
  font-size:10.8px;
  opacity:.85;
  margin:0 0 5.4px;
}

.auth-field input{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:9.9px 10.8px;
  border-radius:10.8px;
  background: rgba(255,255,255,.06);
  border:0.9px solid rgba(255,255,255,.14);
  color: inherit;
  outline:none;
}

.auth-field input:focus{
  border-color: rgba(130,160,255,.55);
  box-shadow: 0 0 0 3.6px rgba(130,160,255,.12);
}

.auth-actions{
  margin-top:5.4px;
  display:grid;
  gap:7.2px;
}

.auth-actions .btn{
  width:100%;
  box-sizing:border-box;
  padding:10.8px 10.8px;
  border-radius:10.8px;
}

.auth-error{
  margin:7.2px 0 0;
  padding:9px 10.8px;
  border-radius:10.8px;
  background: rgba(255,80,80,.12);
  border: 0.9px solid rgba(255,80,80,.25);
  color:#ffd7d7;
  font-size:11.7px;
}

.auth-foot{
  margin-top:12.6px;
  text-align:center;
  font-size:10.8px;
  opacity:.7;
}

@media (max-width:378px){
  .auth-card{ padding:16.2px 14.4px 12.6px; border-radius:14.4px; }
  .auth-title{ font-size:16.2px; }
}



#partialModal input{
  width: 81px;
  text-align: center;
  padding: 5.4px 7.2px;
  margin-right: 5.4px;
}

#partialModal label{
  display: block;
  text-align: center;
}

#partialModal > div{
  gap: 7.2px;
}



#partialModal .partial-grid input#pcredit{
  height:34.2px !important;
  font-size:13.5px !important;
}

#partialModal #pcustWrap input#pcust{
  width:100% !important;
  height:34.2px !important;
  font-size:13.5px !important;
  padding:8.1px 9px !important;
  box-sizing:border-box !important;
}

#partialModal #pcustWrap label,
#partialModal #pcustWrap small{
  text-align:center;
  display:block;
}



.page-sale .scan-panel{ position: relative; z-index: 200; }
.page-sale .scan-panel.has-sug{ margin-bottom: var(--sug-space, 0px); }

.page-sale .scan-panel .scan-input-wrap{
  position: relative;
}

.page-sale .scan-panel #suggestions.sug{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7.2px);
  z-index: 999;
  display: none;

  max-height: 234px;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 5.4px;
  border-radius: 16.2px;
  border: 0.9px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(15,22,45,.98), rgba(10,16,34,.95));
  box-shadow: 0 16.2px 36px rgba(0,0,0,.45);
  backdrop-filter: blur(12.6px);
  -webkit-backdrop-filter: blur(12.6px);
}


.page-sale .scan-panel #suggestions.sug::-webkit-scrollbar{ width: 9px; }
.page-sale .scan-panel #suggestions.sug::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 10.8px; }
.page-sale .scan-panel #suggestions.sug::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.18); border-radius: 10.8px; border: 1.8px solid rgba(0,0,0,0); background-clip: padding-box; }
.page-sale .scan-panel #suggestions.sug::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.26); border: 1.8px solid rgba(0,0,0,0); background-clip: padding-box; }


.page-sale .scan-panel #suggestions.sug{ scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) rgba(255,255,255,.06); }

.page-sale .scan-panel .sug-item{
  border-radius: 12.6px;
  padding: 9px 10.8px;
  cursor: pointer;
  user-select: none;
  border: 0.9px solid transparent;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.page-sale .scan-panel .sug-item:hover{ transform: translateY(-3.6px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.page-sale .scan-panel .sug-item.active{ background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }

.page-sale .scan-panel .sug-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10.8px;
}

.page-sale .scan-panel .sug-name{
  font-weight: 750;
  letter-spacing: 0.09px;
  line-height: 1.15;
}

.page-sale .scan-panel .sug-price{
  white-space: nowrap;
  font-weight: 800;
  opacity: .95;
}

.page-sale .scan-panel .sug-meta{
  margin-top: 3.6px;
  font-size: 10.8px;
  opacity: .75;
}

.page-sale .scan-panel .sug-empty{
  padding: 10.8px;
  opacity: .75;
  text-align: center;
}


.brand{display:flex;align-items:center;gap:7.2px;white-space:nowrap}

.brand-pos{font-weight:800;letter-spacing:0.9px
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}


body.page-admin, body.page-sale{min-height:100vh;display:flex;flex-direction:column}
body.page-admin>.container, body.page-admin>.wrap,
body.page-sale>.container{flex:1 0 auto}

.site-footer{margin:16.2px 0 0 0;padding:14.4px 10.8px;border-top:0.9px solid rgba(255,255,255,.10);background:rgba(0,0,0,.14)}
.site-footer-inner{max-width:1080px;margin:0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:12.6px;flex-wrap:wrap}
.footer-left{display:flex;align-items:flex-start;gap:12.6px;flex-wrap:wrap}
.footer-brand{font-weight:900;letter-spacing:0.54px}

.footer-support{display:flex;flex-direction:column;gap:1.8px;padding-left:10.8px;border-left:0.9px solid rgba(255,255,255,.12)}
.support-title{font-weight:800;opacity:.95;font-size:11.7px}
.support-email{font-size:11.7px;opacity:.9}
.footer-mail{opacity:.95;text-decoration:none;border-bottom:0.9px dashed rgba(255,255,255,.28)}
.footer-mail:hover{opacity:1;border-bottom-color:rgba(255,255,255,.55)}

.footer-right{opacity:.85;font-size:11.7px;line-height:1.35}
.footer-muted{opacity:.95;font-weight:700}


.pos-input{padding:9px 10.8px;border-radius:10.8px;border:0.9px solid rgba(255,255,255,.12);background:transparent;color:inherit;outline:none}
.pos-input:focus{border-color:rgba(255,255,255,.35)}


.check-row{display:flex;align-items:center;justify-content:space-between;gap:10.8px}
.check-row input[type="checkbox"]{width:16.2px;height:16.2px}
.check-block{display:flex;align-items:flex-start;justify-content:space-between;gap:10.8px}
.check-block input[type="checkbox"]{width:16.2px;height:16.2px;margin-top:1.8px}
.check-desc{opacity:.75;margin-top:3.6px;font-size:11.7px;line-height:1.25}



.sale-title{position:relative; top:0.9px !important;}


/* === Sale left panels micro alignment fix ===
   Soldaki iki panel (scan + sepet) 0.9px yukarı alınır.
   Layout'u bozmamak için margin yerine translate kullanılır. */
.sale-main .scan-panel,
.sale-main .cart-panel{
  margin-top:0 !important;
  transform: translateY(-3.6px);
}

/* === Input error micro-shake (discount etc.) === */
@keyframes inputShake{
  0%{ transform: translateX(0); }
  20%{ transform: translateX(-2.7px); }
  40%{ transform: translateX(2.7px); }
  60%{ transform: translateX(-1.8px); }
  80%{ transform: translateX(1.8px); }
  100%{ transform: translateX(0); }
}
.input-error{
  animation: inputShake 0.32s ease-in-out 0s 1;
  border-color: rgba(255, 80, 80, 0.85) !important;
  box-shadow: 0 0 0 1.8px rgba(255, 80, 80, 0.18) !important;
}
/* === End input error === */

/* === Sticky footer fix (avoid floating footer on short pages) === */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
footer { margin-top: auto; }
/* === End sticky footer fix === */

/* --- Total panel discount line --- */
.checkout-total .total-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:6px;
  opacity:0.9;
  font-size:12px;
}
.checkout-total .total-sub .sub-lbl{ letter-spacing:0.3px; }
.checkout-total .total-sub .sub-val{ font-variant-numeric: tabular-nums; }
/* --- End total panel discount line --- */

/* MOBILE DESKTOP-FALLBACK (force left aligned desktop layout instead of centered blank slice) */
html.is-mobile body{overflow-x:auto; -webkit-overflow-scrolling:touch;}
html.is-mobile body.page-sale .container,
html.is-mobile body.page-sale .wrap{max-width:none !important; width:1152px !important; margin-left:0 !important; margin-right:0 !important;}
html.is-mobile body.page-admin .container,
html.is-mobile body.page-admin .wrap{max-width:none !important; width:1062px !important; margin-left:0 !important; margin-right:0 !important;}


/* Only-admin onboarding warning modal (admin panel) */
.only-admin-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:9999}
.only-admin-box{background:rgba(15,23,42,.92);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(10px);padding:18px 18px 14px;border-radius:16px;max-width:360px;width:calc(100% - 28px);box-shadow:0 20px 60px rgba(0,0,0,.35);text-align:center}
.only-admin-title{font-size:16px;font-weight:700;margin-bottom:8px}
.only-admin-text{font-size:13px;opacity:.92;line-height:1.4}
.only-admin-actions{display:flex;gap:10px;justify-content:center;margin-top:12px;flex-wrap:wrap}


/* Diagnostics callout + diagnostics screen */
.diag-callout{
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  padding:12px 12px; border:1px solid var(--border); background: var(--surface);
  border-radius:14px; margin:8px 0 2px 0;
}
.diag-callout-title{ font-weight:800; }
.diag-callout-desc{ color: var(--muted); font-size:13px; margin-top:2px; }
.diag-callout-actions .btn{ white-space:nowrap; }

.diag-actions{
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  border-top:1px dashed rgba(255,255,255,.12);
}
.diag-actions-right{ display:flex; gap:8px; flex-wrap:wrap; }

.diag-grid{
  display:grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 980px){
  .diag-grid{ grid-template-columns: 1fr; }
  .diag-actions{ flex-direction:column; align-items:stretch; }
  .diag-actions-right{ justify-content:flex-start; }
}
.diag-card{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius:16px;
  padding:12px 12px;
}
.diag-k{ color: var(--muted); font-size:12px; margin-bottom:6px; }
.diag-v{ font-size:14px; }
.diag-badge{
  display:inline-flex; align-items:center; justify-content:center;
  padding:2px 8px; border-radius:999px; font-size:12px; font-weight:800;
  border:1px solid rgba(255,255,255,.16); margin-right:6px;
}
.diag-badge.ok{ background: rgba(46, 204, 113, .12); }
.diag-badge.bad{ background: rgba(231, 76, 60, .12); }

.diag-fixlist{ display:grid; gap:10px; }
.diag-fix{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius:16px;
  padding:12px;
}
.diag-fix.good{ border-color: rgba(46, 204, 113, .25); }
.diag-fix-title{ font-weight:900; }
.diag-fix-desc{ color: var(--muted); font-size:13px; margin-top:4px; line-height:1.35; }
.diag-details summary{
  cursor:pointer; user-select:none; font-weight:800; color: rgba(255,255,255,.9);
}
.diag-raw{
  margin-top:10px; white-space:pre-wrap; word-break:break-word;
  background: rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.10);
  padding:10px; border-radius:14px; max-height:320px; overflow:auto;
}


/* FIX: admin background dark override (even when Canlı selected) */
body[data-only-admin="1"]{background:linear-gradient(135deg,#0b1220 0%, #1f2937 35%, #111827 100%) !important;color:#e5e7eb;}


/* Footer: keep identical across all pages (same as sale/index.php) */
.site-footer{
  margin:16.2px 0 0 0;
  padding:14.4px 10.8px;
  border-top:0.9px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
}
.site-footer-inner{max-width:1062px;margin:0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:14.4px}
.footer-brand{font-weight:800;letter-spacing:.2px}
.footer-support{font-size:12.6px;opacity:.92}
.footer-mail{color:inherit;text-decoration:underline;text-underline-offset:2px}

/* Login layout: keep footer full width like sale */
.auth-shell{flex:1;display:flex;align-items:center;justify-content:center;width:100%;}
body.auth-page .site-footer{width:100%;}
