*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #002E5F;
  --accent:    #0066CC;
  --bg:        #f1f5f9;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --muted:     #64748b;
  --danger:    #dc2626;
  --sidebar-w: 260px;
  --topbar-h:  52px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.auth-locked .topbar,
body.auth-locked .tab-content,
body.auth-locked .modal-overlay {
  display: none !important;
}

.login-screen {
  display: none;
  position: relative;
  min-height: 100vh;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(180px, 27vh, 290px) 24px 48px;
  background:
    radial-gradient(ellipse 60% 50% at 18% 12%, rgba(0,102,204,.10) 0%, rgba(0,102,204,0) 60%),
    radial-gradient(ellipse 55% 45% at 82% 18%, rgba(245,158,11,.09) 0%, rgba(245,158,11,0) 60%),
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(0,46,95,.06) 0%, rgba(0,46,95,0) 65%),
    linear-gradient(180deg, #eaf2fa 0%, #f7fbfe 55%, #fdfefe 100%);
  overflow-y: auto;
  isolation: isolate;
}
.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
  animation: login-bg-drift 22s ease-in-out infinite alternate;
}
.login-screen::before {
  width: 360px; height: 360px;
  top: -80px; left: -120px;
  background: radial-gradient(circle, rgba(0,102,204,.22), rgba(0,102,204,0) 70%);
}
.login-screen::after {
  width: 420px; height: 420px;
  bottom: -140px; right: -140px;
  background: radial-gradient(circle, rgba(245,158,11,.18), rgba(245,158,11,0) 70%);
  animation-delay: -8s;
}
@keyframes login-bg-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(28px, -22px, 0) scale(1.08); }
}
.login-firms-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-firm-bubble {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 17px 9px 11px;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 63, 114, 0.08);
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(15, 63, 114, 0.08);
  font: 600 13.5px/1 -apple-system, "Segoe UI", system-ui, sans-serif;
  color: #0f3f72;
  opacity: 0;
  white-space: nowrap;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation-name: login-firm-float;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}
.login-firm-bubble img {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  object-fit: contain;
}
.login-firm-bubble span {
  display: block;
}
@keyframes login-firm-float {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(.86); }
  18%  { opacity: .82; }
  82%  { opacity: .82; }
  100% { opacity: 0; transform: translate3d(var(--dx, 80px), var(--dy, -60px), 0) scale(1.04); }
}
body.auth-locked .login-screen { display: flex; }
.login-shell {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.login-avatar-stage {
  position: relative;
  z-index: 2;
  width: 156px;
  height: 156px;
  margin-bottom: -26px;
}
.login-avatar {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.avatar-ring {
  fill: #fff;
  stroke: #dbe7f3;
  stroke-width: 1.5;
  filter: url(#loginAvatarShadow);
}
.avatar-bg { fill: url(#loginAvatarBg); }
.avatar-face,
.avatar-neck,
.avatar-ear,
.avatar-hand {
  fill: #f2b58f;
}
.avatar-hand {
  stroke: #bd7358;
  stroke-width: 2;
}
.avatar-shoulders { fill: #0f3f72; }
.avatar-shirt { fill: #f59e0b; }
.avatar-hair-back,
.avatar-hair-front {
  fill: #17324d;
}
.avatar-beard {
  fill: #17324d;
  opacity: .9;
}
.avatar-eye { fill: #172554; transition: transform .22s ease, opacity .22s ease; }
.avatar-eye-shine { fill: #fff; transition: transform .22s ease, opacity .22s ease; }
.avatar-eyes {
  transition: transform .22s ease, opacity .22s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.avatar-brow,
.avatar-nose,
.avatar-smile,
.avatar-arm > path,
.avatar-finger {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar-brow {
  stroke: #17324d;
  stroke-width: 4.5;
  transition: transform .22s ease, opacity .22s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.avatar-nose {
  stroke: #c27e62;
  stroke-width: 3;
  transition: opacity .18s ease;
}
.avatar-smile {
  stroke: #8f4f3e;
  stroke-width: 4;
  transition: transform .22s ease, opacity .22s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.avatar-arm {
  opacity: 1;
  transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .16s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.avatar-arm > path {
  stroke: #f2b58f;
  stroke-width: 12;
}
.avatar-finger {
  stroke: #c77d61;
  stroke-width: 2.2;
}
.avatar-cover-hand {
  opacity: 0;
  transform: translateY(18px) scale(.94);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .18s ease, transform .32s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.avatar-cover-palm {
  fill: #eeaa82;
  stroke: #8f4b38;
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.avatar-cover-fingers {
  fill: none;
  stroke: #7f3f2f;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar-ear-left { transform: rotate(-5deg); transform-origin: 49px 85px; }
.avatar-ear-right { transform: rotate(5deg); transform-origin: 131px 85px; }
#login-screen.avatar-awake:not(.avatar-covering) .avatar-eyes {
  transform: translateY(2px);
}
#login-screen.avatar-awake:not(.avatar-covering) .avatar-brow-left {
  transform: translate(-1px, -2px) rotate(-4deg);
}
#login-screen.avatar-awake:not(.avatar-covering) .avatar-brow-right {
  transform: translate(1px, -2px) rotate(4deg);
}
#login-screen.avatar-covering .avatar-arm-left {
  transform: translate(37px, -55px) rotate(12deg);
}
#login-screen.avatar-covering .avatar-arm-right {
  transform: translate(-37px, -55px) rotate(-12deg);
}
#login-screen.avatar-covering .avatar-arm {
  opacity: 0;
}
#login-screen.avatar-covering .avatar-cover-hand {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#login-screen.avatar-covering .avatar-eyes {
  transform: translateY(5px) scaleY(.45);
  opacity: .18;
}
#login-screen.avatar-covering .avatar-eye-shine,
#login-screen.avatar-covering .avatar-brow {
  opacity: 0;
}
#login-screen.avatar-covering .avatar-smile {
  transform: translateY(5px) scaleX(.7);
  opacity: .7;
}
#login-screen.avatar-covering .avatar-nose {
  opacity: .35;
}
#login-screen.avatar-covering .avatar-finger {
  stroke: #9b543f;
  stroke-width: 2.4;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 46px 32px 28px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(226,232,240,.85);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 24px 60px -20px rgba(0,46,95,.28),
    0 8px 24px -8px rgba(15,23,42,.10),
    0 0 0 1px rgba(255,255,255,.6) inset;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-head {
  text-align: center;
  margin-bottom: 8px;
}
.login-brand {
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.15;
  background: linear-gradient(180deg, #0f3f72 0%, #002E5F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-subtitle {
  margin-top: 6px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .1px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-field .field-label {
  margin-bottom: 0;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .35px;
  text-transform: uppercase;
}
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color .18s ease;
  z-index: 1;
}
.login-card .login-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 42px;
  background: #fbfdff;
  border: 1px solid #d8e2ed;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s, box-shadow .18s, background .15s;
}
.login-card .login-input::placeholder {
  color: #b6c4d4;
  font-weight: 400;
}
.login-card .login-input:hover:not(:focus) {
  border-color: #c2d2e3;
}
.login-card .login-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(0,102,204,.14),
    0 2px 8px rgba(0,102,204,.08);
  outline: none;
}
.login-input-wrap:focus-within .login-input-icon {
  color: var(--accent);
}
.login-field-error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  padding-left: 2px;
  color: #b91c1c;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .1px;
  animation: login-field-error-in .2s ease both;
}
.login-field-error:not(:empty) { display: flex; }
.login-field-error::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  background:
    #dc2626 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'><path d='M12 7v6'/><circle cx='12' cy='17' r='.6' fill='white'/></svg>") center/10px no-repeat;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.login-field.has-error .login-input {
  border-color: #fca5a5;
  background: #fffafa;
}
.login-field.has-error .login-input:focus {
  border-color: #dc2626;
  box-shadow:
    0 0 0 4px rgba(220,38,38,.13),
    0 2px 8px rgba(220,38,38,.10);
}
.login-field.has-error .login-input-icon {
  color: #f87171;
}
.login-capslock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 4px 9px;
  align-self: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  animation: login-field-error-in .18s ease both;
}
.login-capslock[hidden] { display: none; }
.login-capslock svg { color: #ea580c; }
.login-error {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(254,242,242,.98), rgba(255,247,237,.95));
  color: #991b1b;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow:
    0 8px 22px rgba(220,38,38,.10),
    inset 0 1px 0 rgba(255,255,255,.82);
}
.login-error:not(:empty) {
  display: flex;
  animation: login-alert-in .22s ease both;
}
.login-error::before {
  content: "!";
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 0 5px rgba(220,38,38,.10);
}
.security-form-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 12px;
}
.login-submit {
  position: relative;
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #0066CC 0%, #00407f 50%, #002E5F 100%);
  background-size: 100% 200%;
  background-position: 0% 0%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: background-position .35s ease, transform .12s ease, box-shadow .25s ease, filter .2s ease;
  box-shadow:
    0 10px 22px -8px rgba(0,46,95,.50),
    0 2px 4px rgba(0,46,95,.18),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.login-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.22) 50%, transparent 100%);
  transform: translateX(-110%);
  transition: transform .55s ease;
  pointer-events: none;
}
.login-submit:hover:not(:disabled) {
  background-position: 0% 100%;
  box-shadow:
    0 14px 28px -10px rgba(0,46,95,.55),
    0 2px 4px rgba(0,46,95,.18),
    inset 0 1px 0 rgba(255,255,255,.30);
}
.login-submit:hover:not(:disabled)::after {
  transform: translateX(110%);
}
.login-submit:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    0 6px 16px -6px rgba(0,46,95,.45),
    inset 0 1px 0 rgba(255,255,255,.20);
}
.login-submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
  box-shadow:
    0 0 0 4px rgba(0,102,204,.32),
    0 10px 22px -8px rgba(0,46,95,.50);
}
.login-submit:disabled {
  cursor: progress;
  filter: saturate(.7) brightness(.95);
}
.login-submit-label {
  position: relative;
  z-index: 1;
}
.login-submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  vertical-align: -3px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}
.login-submit.is-loading .login-submit-spinner {
  display: inline-block;
}
.login-foot {
  margin-top: 6px;
  text-align: center;
  color: #94a3b8;
  font-size: 11.5px;
  letter-spacing: .1px;
}
.login-foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.login-foot a:hover { color: var(--primary); text-decoration: underline; }
.login-screen.login-has-error .login-card {
  border-color: #fecaca;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 24px 60px -20px rgba(220,38,38,.30),
    0 8px 24px -8px rgba(220,38,38,.16),
    0 0 0 3px rgba(220,38,38,.08);
}
.login-screen.login-has-error .avatar-ring {
  stroke: #fecaca;
  animation: login-avatar-alert .7s ease both;
}
.login-card-shake {
  animation: login-card-shake .34s ease both;
}
@keyframes login-alert-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes login-field-error-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes login-card-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@keyframes login-avatar-alert {
  0% { filter: url(#loginAvatarShadow); }
  45% { filter: drop-shadow(0 0 12px rgba(220,38,38,.35)); }
  100% { filter: url(#loginAvatarShadow); }
}
@keyframes login-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .login-screen::before,
  .login-screen::after { animation: none; }
  .login-submit::after { display: none; }
  .login-firms-stage { display: none; }
}
@media (max-width: 560px) {
  .login-screen {
    padding: 126px 16px 32px;
  }
  .login-avatar-stage {
    width: 136px;
    height: 136px;
    margin-bottom: -22px;
  }
  .login-card {
    padding: 40px 22px 24px;
    border-radius: 16px;
  }
}
@media (max-height: 720px) {
  .login-screen {
    padding-top: 92px;
  }
  .login-avatar-stage {
    width: 132px;
    height: 132px;
    margin-bottom: -22px;
  }
}
/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0,102,204,.30) 0%, rgba(0,102,204,0) 55%),
    radial-gradient(ellipse at 100% 100%, rgba(29,140,255,.18) 0%, rgba(29,140,255,0) 60%),
    linear-gradient(135deg, #001a3d 0%, #002E5F 48%, #003a78 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
  position: relative;
  z-index: 5;
  box-shadow:
    0 1px 0 rgba(0,0,0,.18),
    0 8px 24px -10px rgba(0,30,80,.55);
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(0,102,204,0) 0%,
    rgba(0,102,204,.55) 18%,
    rgba(255,255,255,.40) 50%,
    rgba(0,102,204,.55) 82%,
    rgba(0,102,204,0) 100%);
  pointer-events: none;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  margin-right: 6px;
  letter-spacing: .2px;
}
.topbar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #0066CC 0%, #1d8cff 60%, #4aa8ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -2px 0 rgba(0,0,0,.18),
    0 4px 14px rgba(0,102,204,.45);
}
.topbar-brand-text {
  background: linear-gradient(180deg, #ffffff 0%, #cfe2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-tabs  {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}
.topbar-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,.68);
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tab-btn:hover  {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.tab-btn.active {
  background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.08) 100%);
  color: #fff;
  font-weight: 600;
  border-color: rgba(255,255,255,.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,.18) inset,
    0 -1px 0 rgba(0,0,0,.20) inset,
    0 4px 14px -6px rgba(0,102,204,.6);
}
/* Talepler bildirim rozeti — okunmamış admin yanıtı / yeni talep sayısı.
   Kırmızı pill, buton metninin sağında inline. JS display:none ile gizler. */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18), 0 2px 5px -1px rgba(239,68,68,.6);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }

/* ---- Animated Door Logout Button ---- */
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px 0 5px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .25px;
  position: relative;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn-logout:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.06) 100%);
  border-color: rgba(255,255,255,.30);
  box-shadow: 0 4px 14px -6px rgba(255,255,255,.25);
}
.btn-logout:hover .logout-door {
  transform: rotateY(15deg);
}
.btn-logout:active { transform: translateY(1px); }
.btn-logout:disabled,
.btn-logout.is-leaving { cursor: default; }

.logout-doorway {
  position: relative;
  width: 36px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 5px 5px 2px 2px;
  background: #04102a;
  perspective: 140px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 -2px 0 rgba(0,0,0,.35),
    0 1px 2px rgba(0,0,0,.25);
}
.logout-doorway-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    inset 0 0 6px rgba(0,0,0,.45);
  z-index: 4;
}
.logout-room {
  position: absolute;
  inset: 1px;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(180deg, #07172e 0%, #0e2c5a 60%, #143a72 100%);
  overflow: hidden;
}
.logout-room-glow {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -20%;
  height: 90%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,210,120,.65) 0%, rgba(255,210,120,.22) 35%, rgba(255,210,120,0) 70%);
  opacity: 0;
  transition: opacity .25s ease;
}
.btn-logout.is-leaving .logout-room-glow { opacity: 1; }
.logout-room::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 90% 50%, rgba(255,240,200,.95) 0%, rgba(255,200,120,.4) 35%, rgba(255,200,120,0) 70%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.btn-logout.is-leaving .logout-room::after {
  animation: room-flash 2800ms ease both;
}

.logout-runner {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 22px;
  height: 24px;
  margin-left: -11px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-28px);
  z-index: 5;
  will-change: transform, opacity;
}
.logout-runner-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  /* base forward lean + bob origin (bob animation overrides this transform) */
  transform: translateY(0) rotate(8deg);
  transform-origin: 50% 78%;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.6));
  user-select: none;
}
.rn-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rn-leg,
.rn-arm {
  transform-box: fill-box;
  transform-origin: 50% 0;   /* hip / shoulder = top-center of limb's bbox */
}

.logout-door {
  position: absolute;
  inset: 1px;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(180deg, #d57d2c 0%, #b65a14 50%, #8a3f08 100%);
  transform-origin: 0% 50%;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  transition: transform .25s ease;
  z-index: 3;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.40),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 2px 0 0 rgba(0,0,0,.20);
}
.logout-door::before,
.logout-door::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 4px;
  height: 8px;
  border-radius: 1.5px;
  border: 1px solid rgba(0,0,0,.40);
  background:
    linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(0,0,0,.22) 100%);
}
.logout-door::before { top: 4px; }
.logout-door::after  { bottom: 4px; }

.logout-door-knob {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe28a 0%, #c98e1a 75%);
  transform: translateY(-50%);
  box-shadow: 0 0 1px rgba(0,0,0,.7);
}

.logout-label {
  font-size: 12px;
  color: rgba(255,255,255,.94);
}

/* === Animation: door opens, runner sprints out, door closes === */
.btn-logout.is-leaving .logout-door {
  animation: door-cycle 2800ms cubic-bezier(.45,.05,.25,.95) forwards;
  transition: none;
}
.btn-logout.is-leaving .logout-runner {
  animation: runner-go 2800ms cubic-bezier(.42,.02,.38,1) forwards;
}
.btn-logout.is-leaving .logout-runner-inner {
  animation: runner-bob 280ms ease-in-out infinite;
}
.btn-logout.is-leaving .rn-leg-a { animation: leg-swing 280ms cubic-bezier(.4,0,.6,1) infinite; }
.btn-logout.is-leaving .rn-leg-b { animation: leg-swing 280ms cubic-bezier(.4,0,.6,1) infinite; animation-delay: -140ms; }
.btn-logout.is-leaving .rn-arm-a { animation: arm-swing 280ms cubic-bezier(.4,0,.6,1) infinite; animation-delay: -140ms; }
.btn-logout.is-leaving .rn-arm-b { animation: arm-swing 280ms cubic-bezier(.4,0,.6,1) infinite; }
.btn-logout.is-leaving .logout-label {
  animation: label-fade 2800ms ease both;
}

@keyframes door-cycle {
  0%   { transform: rotateY(0deg); }
  6%   { transform: rotateY(8deg); }     /* tiny pre-crack — door creaks */
  14%  { transform: rotateY(-95deg); }   /* slams open with overshoot */
  20%  { transform: rotateY(-82deg); }   /* settles open */
  78%  { transform: rotateY(-82deg); }   /* held open while runner exits */
  88%  { transform: rotateY(6deg); }     /* slams shut — overshoots past zero */
  94%  { transform: rotateY(-3deg); }    /* small rebound */
  100% { transform: rotateY(0deg); }
}
@keyframes runner-go {
  0%   { opacity: 0; transform: translateX(-28px); }
  14%  { opacity: 0; transform: translateX(-28px); }
  20%  { opacity: 1; transform: translateX(-20px); }
  35%  { opacity: 1; transform: translateX(-10px); }
  50%  { opacity: 1; transform: translateX(0px); }
  65%  { opacity: 1; transform: translateX(10px); }
  80%  { opacity: 1; transform: translateX(20px); }
  88%  { opacity: 0; transform: translateX(28px); }
  100% { opacity: 0; transform: translateX(28px); }
}
@keyframes runner-bob {
  0%, 100% { transform: translateY(0)    rotate(8deg); }
  25%      { transform: translateY(-2.5px) rotate(12deg); }
  50%      { transform: translateY(0)    rotate(8deg); }
  75%      { transform: translateY(-2.5px) rotate(4deg); }
}
@keyframes leg-swing {
  0%, 100% { transform: rotate(-44deg); }   /* leg forward */
  50%      { transform: rotate(44deg); }    /* leg back */
}
@keyframes arm-swing {
  0%, 100% { transform: rotate(-38deg); }   /* arm forward */
  50%      { transform: rotate(38deg); }    /* arm back */
}
@keyframes room-flash {
  0%, 14% { opacity: 0; }
  18%     { opacity: .35; }   /* light bleeds in as door cracks */
  60%     { opacity: .50; }   /* steady glow while runner crosses */
  78%     { opacity: .80; }   /* peak as runner reaches the doorway */
  84%     { opacity: 0; }     /* cuts as door slams shut */
  100%    { opacity: 0; }
}
@keyframes label-fade {
  0%   { opacity: 1; letter-spacing: .25px; }
  65%  { opacity: .55; letter-spacing: .9px; }
  100% { opacity: .30; letter-spacing: 1.2px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-logout.is-leaving .logout-door,
  .btn-logout.is-leaving .logout-runner,
  .btn-logout.is-leaving .logout-runner-inner,
  .btn-logout.is-leaving .logout-label,
  .btn-logout.is-leaving .logout-room::after,
  .btn-logout.is-leaving .rn-leg-a,
  .btn-logout.is-leaving .rn-leg-b,
  .btn-logout.is-leaving .rn-arm-a,
  .btn-logout.is-leaving .rn-arm-b { animation: none; }
}

/* ---- Tarama Tetikleyici ---- */
.scan-trigger-wrap {
  position: relative;
}

.btn-scan-trigger {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  height: 28px; padding: 0 12px;
  border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: inherit; white-space: nowrap;
  transition: background .15s;
}
.btn-scan-trigger:hover { background: rgba(255,255,255,.25); }
.btn-scan-trigger.active { background: rgba(255,200,0,.3); }
.btn-scan-trigger:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: rgba(255,255,255,.10);
}
.btn-scan-trigger:disabled:hover { background: rgba(255,255,255,.10); }

.scan-trigger-badge {
  color: #fbbf24; font-size: 10px; animation: pulse-badge 1.2s infinite;
}
@keyframes pulse-badge { 0%,100% { opacity:1; } 50% { opacity:.3; } }

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 10px;
  }
  .topbar-brand {
    flex: 1 1 auto;
    margin-right: 0;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .topbar-tabs {
    order: 3;
    flex: 0 0 100%;
    padding: 2px;
    scrollbar-width: none;
  }
  .tab-btn {
    padding: 6px 10px;
  }
  .btn-scan-trigger {
    height: 30px;
  }
  .auth-user-label {
    max-width: 150px;
  }
  .btn-logout {
    height: 38px;
    padding: 0 12px 0 5px;
  }
}

/* ---- Scan Panel Dropdown ---- */
.scan-panel {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 300;
  max-height: calc(100vh - var(--topbar-h) - 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.scan-panel.open { display: block; }

.scan-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--primary); color: #fff;
}
.scan-panel-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
}
.scan-panel-close {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 22px; height: 22px; border-radius: 5px;
  cursor: pointer; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.scan-panel-close:hover { background: rgba(255,255,255,.28); }

/* İlerleme bölümü */
.scan-progress-section {
  padding: 12px 14px;
  background: #f0f7ff; border-bottom: 1px solid var(--border);
}
.scan-progress-label {
  font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 8px;
}
.scan-progress-bar-wrap {
  height: 7px; background: #dbeafe; border-radius: 99px; overflow: hidden;
}
.scan-progress-bar {
  height: 100%; background: var(--accent);
  border-radius: 99px; transition: width .4s ease;
}
.scan-progress-stats {
  margin-top: 7px; font-size: 11px; color: var(--muted);
  display: flex; gap: 12px; flex-wrap: wrap;
}
.scan-progress-stats span { display: flex; align-items: center; gap: 4px; }

.scan-stop-btn {
  width: 100%; margin-top: 10px;
  padding: 7px 0;
  background: #fff0f0; color: var(--danger);
  border: 1.5px solid #fca5a5; border-radius: 7px;
  cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: inherit; transition: background .15s, border-color .15s;
}
.scan-stop-btn:hover   { background: #fee2e2; border-color: var(--danger); }
.scan-stop-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Aksiyon bölümü */
.scan-actions-section { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

.scan-btn-all {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 14px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .15s;
}
.scan-btn-all:hover   { background: var(--accent); }
.scan-btn-all:disabled { opacity: .55; cursor: not-allowed; }

.scan-divider {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11px;
}
.scan-divider::before, .scan-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.scan-product-search-wrap {
  position: relative;
}
.scan-product-search-icon {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.scan-product-search-input {
  width: 100%; padding: 7px 10px 7px 28px;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 12px; font-family: inherit;
  background: var(--bg); color: var(--text); outline: none;
}
.scan-product-search-input:focus { border-color: var(--accent); }
.scan-product-search-input::placeholder { color: var(--muted); }

.scan-product-list {
  max-height: clamp(108px, 17vh, 142px);
  overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px;
}
.scan-product-empty { padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }

.scan-product-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; cursor: pointer;
  border-bottom: 1px solid var(--bg);
  transition: background .1s;
  user-select: none;
}
.scan-product-item:last-child { border-bottom: none; }
.scan-product-item:hover { background: var(--bg); }
.scan-product-item.selected { background: #eff6ff; }

.scan-product-check {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; transition: background .1s, border-color .1s;
}
.scan-product-item.selected .scan-product-check {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.scan-product-name {
  font-size: 12px; color: var(--text); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.scan-btn-selected {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 8px 14px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.scan-btn-selected:not(:disabled):hover { background: #e8f0fe; border-color: var(--accent); color: var(--accent); }
.scan-btn-selected:disabled { opacity: .5; cursor: not-allowed; }

.scan-selected-count {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}
.scan-group-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: stretch;
}
.scan-group-select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.scan-group-select:focus { border-color: var(--accent); }
.scan-btn-group {
  padding: 0 12px;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
}
.scan-btn-group:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
.scan-btn-group:disabled { opacity: .48; cursor: not-allowed; }

/* ---- Tab content ---- */
.tab-content { display: none; flex: 1; overflow: hidden; }
.tab-content.active { display: flex; }

/* ---- Dashboard layout ---- */
#tab-dashboard { flex-direction: column; overflow: hidden; }

/* ---- Filter Bar (Filtre) ---- */
.fa-panel {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}
.fa-panel-toggle { display: none; }

.fa-panel-body {
  display: none;
  padding: 13px 20px 12px;
}
.fa-panel-body.open {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
}

.fa-fb-sep {
  width: 1px; height: 20px; background: var(--border); flex-shrink: 0; align-self: center;
}

.fa-filter-separator {
  width: 1px;
  height: 34px;
  background: #edf1f7;
  flex-shrink: 0;
}

.fa-search-wrap {
  position: relative;
  flex: 0 0 290px;
  min-width: 220px;
}
.fa-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.fa-search-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  font-family: inherit;
  background: #fff;
  color: #24304f;
  outline: none;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .14s, box-shadow .14s;
}
.fa-search-input:focus {
  border-color: #9bbcf0;
  box-shadow: 0 0 0 3px rgba(0,102,204,.10), 0 2px 8px rgba(15,23,42,.04);
}
.fa-search-input::placeholder { color: var(--muted); }

.fa-category-wrap {
  position: relative;
  flex-shrink: 0;
}
.fa-category-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7886a6;
  border-bottom: 2px solid #7886a6;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.fa-category-select {
  appearance: none;
  height: 42px;
  /* Sabit genişlik — native select varsayılan olarak EN UZUN option'a göre büyür;
     uzun grup/kategori adı barı şişirmesin. Kapalı halde taşan metin "…" ile kesilir,
     tüm seçenekler açılınca zaten tam görünür. */
  width: 190px;
  max-width: 190px;
  padding: 0 44px 0 18px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #fff;
  color: #415071;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  font-family: inherit;
  outline: none;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .14s, box-shadow .14s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fa-category-select:focus {
  border-color: #9bbcf0;
  box-shadow: 0 0 0 3px rgba(0,102,204,.10), 0 2px 8px rgba(15,23,42,.04);
}
/* Alt kategori / işlemci / inç — kategoriden dar (kısa değerler, satırı şişirmesin) */
.fa-category-select.compact {
  width: 150px;
  max-width: 150px;
}
@media (max-width: 900px) {
  .fa-category-select.compact { width: 130px; max-width: 130px; }
}

.fa-select {
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 12px; font-family: inherit; background: var(--bg); color: var(--text);
  outline: none; cursor: pointer; flex-shrink: 0;
}
.fa-select:focus { border-color: var(--accent); }
.fa-select:disabled { opacity: .5; cursor: not-allowed; }

.fa-firms-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: #ccd6e5 transparent;
}
.fa-firms-wrap::-webkit-scrollbar { height: 5px; }
.fa-firms-wrap::-webkit-scrollbar-thumb { background: #ccd6e5; border-radius: 999px; }
.fa-firm-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  background: #fff;
  color: #334060;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .12s, background .12s, box-shadow .12s, color .12s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.fa-firm-check input { display: none; }
.fa-firm-check:hover {
  border-color: #c7d4e5;
  box-shadow: 0 4px 12px rgba(15,23,42,.07);
}
.fa-firm-active {
  background: #f5f9ff;
  border-color: #8fb8ef;
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,.08), 0 4px 12px rgba(15,23,42,.07);
}
.fa-firm-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.fa-firm-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.fa-firm-icon-fallback {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #e8eef7;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fa-firm-name {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fa-firm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.fa-fb-checks { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.fa-fb-check-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; cursor: pointer; color: var(--text);
  padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s;
}
.fa-fb-check-label input { margin: 0; cursor: pointer; accent-color: var(--accent); }
.fa-fb-check-label:hover { background: #e8f0fe; border-color: var(--accent); }

.fa-fb-count-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.fa-fb-count-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

.fa-active-badge {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}
.fa-reset-btn {
  padding: 5px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; cursor: pointer; white-space: nowrap;
  font-family: inherit; color: var(--text); flex-shrink: 0;
}
.fa-reset-btn:hover { background: #fee2e2; border-color: #fca5a5; color: var(--danger); }

@media (max-width: 900px) {
  .fa-panel-body.open {
    gap: 10px;
    padding: 10px 12px 9px;
  }
  .fa-search-wrap {
    flex-basis: 240px;
  }
  .fa-category-select {
    width: 160px;
    max-width: 160px;
  }
  .fa-firm-check {
    padding: 0 13px;
  }
}

@media (max-width: 640px) {
  .fa-panel-body.open {
    flex-wrap: wrap;
  }
  .fa-search-wrap {
    flex: 1 1 100%;
  }
  .fa-filter-separator {
    display: none;
  }
  .fa-firms-wrap {
    flex-basis: 100%;
  }
}

/* ====================================================
   DASHBOARD — İÇERİK ALANI
   ==================================================== */
.fa-content {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: #e8eef6;
}
.fa-table-header { display: none; }

.fa-list {
  flex: 1; overflow-y: auto;
  padding: 12px 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}

/* ---- Satır kartı (wrapper) ---- */
.fa-card {
  background: #dce5f0;
  border-radius: 13px;
  border: 1px solid #c8d6e8;
  overflow: hidden;
  flex-shrink: 0;
  transition: box-shadow .18s;
}
.fa-card:hover { box-shadow: 0 4px 18px rgba(0,46,95,.16); }

/* Yatay kaydırma alanı */
.fa-row-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 9px 10px;
  scrollbar-width: thin;
  scrollbar-color: #b0c4d8 transparent;
}
.fa-row-scroll::-webkit-scrollbar { height: 4px; }
.fa-row-scroll::-webkit-scrollbar-thumb { background: #b0c4d8; border-radius: 4px; }

.fa-row-inner {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.fa-no-data { font-size: 12px; color: #94a3b8; padding: 8px 4px; align-self: center; }

/* ====================================================
   ÜRÜN KARTI (solda) — kompakt modern beyaz kart
   ==================================================== */
.fa-prod-card {
  width: 282px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 8px 12px;
  /* Yatay scroll sırasında ürün kartı sol tarafa yapışır (PT kartıyla birlikte
     hep görünür kalsın). Sticky scroll container'ın padding-box'una göre
     hesaplanır — left:0 burada padding-left (10px) sonrasında. */
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow .18s, border-color .18s;
}
.fa-prod-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
  border-color: #e2e8f0;
}

.fa-prod-info-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1.2px solid #e5e7eb;
  color: #94a3b8;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 1;
}
.fa-prod-info-btn:hover {
  border-color: #0066CC;
  color: #0066CC;
  background: #eff6ff;
}

.fa-prod-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  padding-right: 26px; /* sağ üstteki i butonuna yer aç */
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* PT ürün görseli — kart başlığında küçük thumbnail (isim ile yan yana). */
.fa-prod-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.fa-prod-card-head .fa-prod-card-name { flex: 1; min-width: 0; }
.fa-prod-thumb {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #eef0f3;
}

.fa-prod-meta-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.fa-prod-card-sku {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.3;
}

/* Ürün özel not etiketi — SKU yanında renkli chip.
   Renk inline style ile (productNoteColors hash → palette). Border + bg + fg
   üçü beraber gelir; aynı not metni = aynı renk → kullanıcı tek bakışta
   "aynı kampanya" ürünlerini ayırt eder. */
.fa-prod-card-note {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  line-height: 1.3;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.15px;
  position: relative;
}
.fa-prod-card-note::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* Maliyet satırı — ürün kartında SKU altında 4 sütun yan yana.
   Kutu yok, sade label/değer; kart yüksekliğini eskiye yakın tutar.
   Sıra: EDU + E.Kar (çift), Kurumsal + K.Kar (çift). */
.fa-prod-cost-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 4px;
  margin: 2px 0 0 0;
}
.fa-prod-cost-cell {
  min-width: 0;
  text-align: left;
}
.fa-prod-cost-label {
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
  white-space: nowrap;
}
.fa-prod-cost-val {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.fa-prod-cost-val.is-pos { color: #15803d; }
.fa-prod-cost-val.is-neg { color: #b91c1c; }
/* Uzun değer (6+ haneli) dar 4-hücre modunda sığsın diye font küçültülür —
   kısa değerler 11.5px normalde kalır, ellipsis kırpması önlenir. */
.fa-prod-cost-val.is-sm { font-size: 10px; }
.fa-prod-cost-val.is-xs { font-size: 8.5px; letter-spacing: -0.2px; }

/* Tek-oran modu: 2 hücre yan yana, font biraz büyütülür (yer var). */
.fa-prod-cost-row.is-half {
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
}
.fa-prod-cost-row.is-half .fa-prod-cost-label {
  font-size: 10.5px;
}
.fa-prod-cost-row.is-half .fa-prod-cost-val {
  font-size: 13.5px;
}

/* Ürün kartı içindeki tarama butonu sarmalayıcısı (PT kartı ayrıldığından
   margin-top: auto ile kartın en altına itilir) */
.fa-prod-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Tarama butonu — kompakt yuvarlak köşeli mavi */
.fa-prod-scan-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #2563eb;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 0;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}
.fa-prod-scan-btn:hover  { background: #1d4ed8; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35); }
.fa-prod-scan-btn:active { transform: scale(.94); }
.fa-prod-scan-btn.scanning {
  background: #93c5fd;
  cursor: default;
  animation: scan-pulse 1.2s ease-in-out infinite;
}
@keyframes scan-pulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(37, 99, 235, 0.30); }
  50%      { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15); }
}

/* ====================================================
   FİRMA KARTI — BLOCK LAYOUT
   ==================================================== */
.fa-site-cell {
  width: 220px;
  flex-shrink: 0;
  border: 2px solid #cbd5e1;
  border-radius: 11px;
  background: #f1f5f9;
  transition: box-shadow .15s, border-color .15s, background .15s;
  overflow: hidden;
}
.fa-site-cell:hover {
  box-shadow: 0 6px 16px rgba(15,23,42,.12);
}

.fa-site-cell--higher { background: #ecfdf3; border-color: #86efac; }
.fa-site-cell--lower  { background: #fff1f2; border-color: #fda4af; }
.fa-site-cell--equal  { background: #fff7ed; border-color: #fdba74; }
.fa-site-cell--neutral { background: #f1f5f9; border-color: #cbd5e1; }
.fa-site-cell--error { opacity: 1; }

/* PT kartı — ürün kartının hemen sağında yatay scroll'da sabit. Diğer firma
   kartlarıyla aynı boyut/yapı ama kart background daima beyaz (bizim firmamız
   olduğunun görsel ipucu). Apple referansına göre %/trend renkleri yine
   yeşil/kırmızı — sadece kart bg'si nötr beyaz. */
.fa-pt-cell {
  position: sticky;
  left: 290px; /* 282px ürün kartı + 8px gap */
  z-index: 2;
  background: #fff;
  border-color: #0066CC;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}
.fa-pt-cell .fa-site-name { color: #0066CC; font-weight: 800; }
.fa-pt-cell-price { color: #0f172a; }

/* Önerilen fiyat chip'i — ürün kartında ürün kodunun (SKU) yanında, SKU/not
   rozetleriyle aynı boyut dilinde (.fa-prod-meta-badges içinde). Önceden PT
   kartının altındaydı (.fa-pt-reco bloğu, yer kaplıyordu) → ürün koduna taşındı.
   Ürüne özel NOT varsa hiç render edilmez (renderFaList not'a öncelik verir). */
.fa-prod-card-reco {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  line-height: 1.3;
  white-space: nowrap;
}
.fa-prod-card-reco-label {
  color: #047857;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 8.5px;
}
.fa-prod-card-reco-price {
  color: #065f46;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fa-site-card-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  height: 100%;
}

.fa-site-favicon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(148,163,184,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fa-site-favicon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.fa-site-favicon-fallback {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fa-site-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fa-site-head-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.fa-site-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 14px;
}
.fa-site-name {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.fa-site-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.fa-site-price {
  display: block;
  min-width: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fa-site-price--higher { color: #15803d; }
.fa-site-price--lower  { color: #dc2626; }
.fa-site-price--equal  { color: #ea580c; }
.fa-site-price--neutral { color: #64748b; }
.fa-site-trend {
  flex: 0 0 13px;
  width: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.fa-site-trend--none {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.fa-site-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fa-site-pct { font-size: 10px; font-weight: 700; }
.fa-site-pct.down { color: #16a34a; }
.fa-site-pct.up   { color: #dc2626; }
.fa-site-pct.same { color: #94a3b8; }
.fa-site-date { display: block; font-size: 10px; color: #64748b; }
/* Beymen kartı altında Visa kampanya fiyatı satırı (auto-derived beymen-visa
   virtual site'tan okunur; sadece kampanya ürünlerinde render edilir). */
.fa-site-visa-row {
  font-size: 11px;
  color: #1a4dbe;
  margin: 1px 0 2px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 600;
}
.fa-visa-label { opacity: 0.75; font-weight: 500; }
.fa-visa-price { color: #1a4dbe; }

/* Vatan kartı altında "App'e özel sepette indirim" fiyatı satırı (auto-derived
   vatan-app virtual site'tan okunur; sadece kampanyalı ürünlerde render edilir).
   fa-site-visa-row ile aynı yapı; App teması yeşil (#059669, vatan-app sitesinin
   rengiyle uyumlu). Fiyat UI'da türetilmez — scraper'ın #priceSpecial DOM
   elementinden çektiği gerçek fiyat kendi virtual id'sine kaydedilir. */
.fa-site-app-row {
  font-size: 11px;
  color: #059669;
  margin: 1px 0 2px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 600;
}
.fa-app-label { opacity: 0.75; font-weight: 500; }
.fa-app-price { color: #059669; }

/* EDU eğitim/kurumsal fiyat satırı — ana firma kartının altında (troy/pasaj/gurgencler).
   fa-site-visa-row ile aynı yapı; EDU teması cyan (#0891b2, gurgencler-edu chart rengiyle
   uyumlu). Fiyat UI'da türetilmez — kendi virtual id'sine kaydedilen gerçek fiyat. */
.fa-site-edu-row {
  font-size: 11px;
  color: #0891b2;
  margin: 1px 0 2px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 600;
}
.fa-edu-label { opacity: 0.75; font-weight: 500; }
.fa-edu-price { color: #0891b2; }

/* Özel (Visa/App/EDU) fiyat normalden ucuzsa BÜYÜK üst satıra çıkar: başına temalı
   etiket gelir (renk tema), fiyatın kendisi PT-kıyas tonunda (.fa-site-price).
   align-self:center: satır baseline hizalı olduğu için 12px etiket 20px fiyata göre
   alta "asılı" kalmasın diye dikeyde ortalanır (orantısızlık fix'i). 12px büyütülmedi —
   5 haneli fiyatın bile kesilmediği tek boyut; yer için üst satırda trend oku gizlenir. */
.fa-site-price-label {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.fa-site-price-label--visa { color: #1a4dbe; }
.fa-site-price-label--app  { color: #059669; }
.fa-site-price-label--edu  { color: #0891b2; }
/* Özel fiyat üste çıkınca normal (liste) fiyatı alta düşer: küçük, soluk gri, etiketsiz
   (kullanıcı tercihi — sade rakam). Temalı alt-satırlarla (fa-site-visa-row vb.) aynı
   dikey ritim. */
.fa-site-listprice-row {
  font-size: 11px;
  color: #64748b;
  margin: 1px 0 2px 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* Havale/EFT indirim satırı — PT kartının altında. fa-site-visa-row'un PT karşılığı.
   Fiyat UI'da türetilir (normal PT fiyatı × 0.98), DB'ye yazılmaz. */
.fa-pt-havale-row {
  font-size: 11px;
  color: #0066CC;
  margin: 1px 0 2px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 600;
}
.fa-havale-label { opacity: 0.75; font-weight: 500; }
.fa-havale-price { color: #0066CC; }

.fa-site-info {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  border: 1px solid #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  font-family: Georgia, serif;
  font-style: italic;
  transition: background .12s, color .12s, border-color .12s;
  flex-shrink: 0;
  margin-left: 2px;
  align-self: flex-start;
}
.fa-site-info:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.fa-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 98px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fa-stock-badge.in-stock      { background: #dcfce7; color: #15803d; }
.fa-stock-badge.out-of-stock  { background: #fee2e2; color: #b91c1c; }
.fa-stock-badge.error         { background: #f1f5f9; color: #475569; }
.fa-stock-badge.redirect-warn { background: #fef9c3; color: #92400e; }
.fa-stock-badge.store-display { background: #fee2e2; color: #b91c1c; }
.fa-stock-badge.store-new     { background: #fef3c7; color: #b45309; }
.fa-stock-badge.store-mixed   { background: #ffedd5; color: #c2410c; }
.fa-stock-badge.second-hand   { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
/* Hata kategorisi renkleri — scan log'daki err-badge paletiyle birebir.
   Aynı hata Dashboard'da ve İşlem Geçmişi'nde aynı renk görünsün. */
.fa-stock-badge.timeout       { background: #fee2e2; color: #b91c1c; }
.fa-stock-badge.blocked       { background: #fee2e2; color: #b91c1c; }
.fa-stock-badge.rate-limited  { background: #ffedd5; color: #c2410c; }
.fa-stock-badge.captcha       { background: #ede9fe; color: #6d28d9; }
.fa-stock-badge.cf-challenge  { background: #ede9fe; color: #6d28d9; }
.fa-stock-badge.server-error  { background: #ffedd5; color: #c2410c; }
.fa-stock-badge.network       { background: #fef2f2; color: #991b1b; }
.fa-stock-badge.not-found     { background: #f1f5f9; color: #475569; }
.fa-stock-badge.stale-url     { background: #fae8ff; color: #86198f; }
.fa-stock-badge.script        { background: #f1f5f9; color: #475569; }
.fa-stock-badge.empty-page    { background: #f1f5f9; color: #475569; }
.fa-stock-badge.color-name    { background: #fce7f3; color: #9d174d; }
.fa-stock-badge.selector      { background: #e0e7ff; color: #3730a3; }
.fa-stock-badge.no-link       { background: #e2e8f0; color: #64748b; }

/* "Link girili değil" gri kart — link girilebilen ama bu üründe linki olmayan
   rakipler. Kesik kenarlık + soluk arka plan ile "eksik" olduğu görsel olarak
   ayrışır. Kart altındaki "Düzenle" ile hızlı link girişi yapılır. */
.fa-site-cell--nolink {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-style: dashed;
}
.fa-site-cell--nolink .fa-site-name { color: #64748b; }
.fa-site-cell--nolink:hover { box-shadow: 0 4px 12px rgba(15,23,42,.08); }

/* Kartın sağ üst kolonu — "i" (fiyat geçmişi) butonunun ALTINA dizilen hızlı-link
   ikon butonları: "Linke git" (link yoksa pasif) + "Düzenle". Sadece link
   girilebilen rakip kartlarında (PT/Gürgençler/EDU türevlerinde yok). */
.fa-site-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  flex-shrink: 0;
  margin-left: 2px;
}
.fa-site-aside .fa-site-info { margin-left: 0; align-self: center; }
.fa-site-act {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s, color .12s, border-color .12s;
}
.fa-site-act svg { width: 11px; height: 11px; }
.fa-site-act:not(:disabled):hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.fa-site-act:disabled {
  opacity: .4;
  cursor: not-allowed;
  background: #f1f5f9;
  color: #94a3b8;
}

/* PT normal fiyatı ↔ en ucuz stoklu rakip farkı (PT kartı, stok rozetinin yanında).
   --better = PT daha ucuz (yeşil), --worse = PT daha pahalı (kırmızı), --equal = eşit. */
.fa-pt-vs-cmp {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 1;   /* dar alanda küçül — stok rozetinin yanında tek satırda kalsın */
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
}
/* Rakip adı yer yetmezse "…" ile kısalır; tutar (fa-pt-vs-amt) asla kırpılmaz. */
.fa-pt-vs-cmp .fa-pt-vs-name {
  font-weight: 600;
  opacity: 0.75;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fa-pt-vs-cmp .fa-pt-vs-amt { font-weight: 800; flex-shrink: 0; }
/* PT kartı: kıyas etiketi alta sarmasın → kart yüksekliği büyümesin. */
.fa-pt-cell .fa-site-status-row { flex-wrap: nowrap; }
.fa-pt-vs-cmp--better { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.fa-pt-vs-cmp--worse  { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.fa-pt-vs-cmp--equal  { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* ---- PDP (Fiyat Geçmişi) Popup ---- */
.pdp-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: center; justify-content: center;
}
.pdp-overlay.open { display: flex; }

.pdp-modal {
  background: var(--surface); border-radius: 14px;
  width: 460px; max-width: 96vw; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  overflow: hidden;
}
.pdp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pdp-header-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: #e8f0fe; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pdp-title { font-size: 15px; font-weight: 700; flex: 1; }
.pdp-close {
  background: none; border: none; font-size: 16px;
  cursor: pointer; color: var(--muted); line-height: 1;
}

.pdp-body { overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }

/* PDP modalı — PT ürün görseli (varsa) ürün adının SOLUNda, dashboard kartları gibi. */
.pdp-head-row { display: flex; align-items: center; gap: 14px; }
.pdp-head-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef0f3;
}
.pdp-head-row .pdp-info-row { flex: 1; min-width: 0; }
.pdp-info-row { display: flex; flex-direction: column; gap: 4px; }
.pdp-info-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.pdp-info-item span { color: var(--text); font-weight: 500; }

.pdp-update-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg); border-radius: 8px;
  font-size: 13px; color: var(--muted);
}
.pdp-update-row strong { color: var(--text); }

.pdp-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.pdp-section-label {
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 0;
}
.pdp-links-title {
  justify-content: space-between;
  gap: 10px;
}
.pdp-link-scan-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex-shrink: 0; min-height: 30px;
  padding: 6px 10px; border: 1px solid #0066CC;
  border-radius: 7px; background: #0066CC; color: #fff;
  font: 700 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer; box-shadow: 0 5px 14px rgba(0, 102, 204, .18);
  transition: background .12s, border-color .12s, box-shadow .12s, opacity .12s;
}
.pdp-link-scan-btn:hover:not(:disabled) {
  background: #004fa3; border-color: #004fa3;
  box-shadow: 0 7px 18px rgba(0, 102, 204, .24);
}
.pdp-link-scan-btn:disabled {
  opacity: .68; cursor: default; box-shadow: none;
}
.pdp-link-scan-btn.scanning svg {
  animation: pdpScanSpin 1s linear infinite;
}
@keyframes pdpScanSpin {
  to { transform: rotate(360deg); }
}

.pdp-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; background: var(--bg); border-radius: 10px; padding: 14px;
}
.pdp-stats-grid--single { grid-template-columns: 1fr; }
.pdp-stat {}
.pdp-stat-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.pdp-stat-val   { font-size: 16px; font-weight: 700; color: var(--text); }
.pdp-down { color: #16a34a; }
.pdp-up   { color: var(--danger); }
.pdp-low  { color: #16a34a; }
.pdp-high { color: var(--danger); }

.pdp-days-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pdp-day-btn {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; font-family: inherit; cursor: pointer;
  background: var(--bg); color: var(--text); transition: background .12s;
}
.pdp-day-btn:hover  { background: #e8f0fe; border-color: var(--accent); }
.pdp-day-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.pdp-chart-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; position: relative; }
.pdp-chart-wrap canvas { display: block; width: 100%; cursor: crosshair; }
.pdp-chart-wrap--tall { background: #fff; }

/* ============================================================
   MULTI-FİRMA ANALİZ PANELİ (ürün kartı "i" butonu)
   ============================================================ */

/* Geniş modal — multi modunda klasik 460px yerine 1180px (analiz tablosu için) */
.pdp-modal--wide {
  width: min(1180px, 96vw);
  max-height: 92vh;
}

/* --- Header satırı --- */
.pdp-multi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 8px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pdp-multi-header-info { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.pdp-multi-prod-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}
.pdp-multi-prod-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}
.pdp-multi-prod-meta strong { color: #0f172a; font-weight: 600; }
.pdp-multi-meta-sep { color: #cbd5e1; }
.pdp-multi-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.pdp-multi-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  font-size: 12px; font-weight: 600;
  background: #0066CC; color: #fff;
  border: 1px solid #0066CC;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.pdp-multi-action-btn:hover:not(:disabled) {
  background: #0052a3;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}
.pdp-multi-action-btn:active:not(:disabled) { transform: scale(.97); }
.pdp-multi-action-btn:disabled { opacity: .65; cursor: default; }
.pdp-multi-action-btn--ghost {
  background: #fff;
  color: #475569;
  border-color: #cbd5e1;
}
.pdp-multi-action-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
  color: #0f172a;
  border-color: #0066CC;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

/* --- KPI bandı --- */
.pdp-multi-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.pdp-multi-kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pdp-multi-kpi-card--scenario {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.pdp-multi-kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdp-multi-kpi-value {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdp-multi-kpi-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 14px;
}
.pdp-multi-kpi-sub .pdp-up { color: #16a34a; font-weight: 600; }
.pdp-multi-kpi-sub .pdp-down { color: #dc2626; font-weight: 600; }
.pdp-multi-scenario-input-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  background: #fff;
  border: 1px solid #93c5fd;
  border-radius: 7px;
  padding: 5px 8px;
}
.pdp-multi-scenario-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: #0066CC;
  font-variant-numeric: tabular-nums;
  padding: 0;
  -moz-appearance: textfield;
}
.pdp-multi-scenario-input::-webkit-outer-spin-button,
.pdp-multi-scenario-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.pdp-multi-scenario-currency {
  font-size: 12px;
  font-weight: 600;
  color: #0066CC;
  flex-shrink: 0;
}

/* --- Toolbar (range + presets) --- */
.pdp-multi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.pdp-multi-toolbar-right { display: flex; gap: 6px; }
.pdp-multi-preset-btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #475569;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pdp-multi-preset-btn:hover {
  background: #f1f5f9;
  border-color: #0066CC;
  color: #0066CC;
}

/* --- 2-kolon grid: chart + legend --- */
.pdp-multi-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  margin-top: 2px;
}
.pdp-multi-chart-col { min-width: 0; position: relative; }
.pdp-multi-legend-col { min-width: 0; }

/* --- Dikey legend (PT merkez sıralı) --- */
.pdp-multi-legend--vertical {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.pdp-multi-legend--vertical .pdp-multi-legend-item {
  display: grid;
  grid-template-columns: 22px 22px 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "rank icon name price"
    "rank icon ts   diff";
  align-items: center;
  gap: 2px 8px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, opacity .12s;
  user-select: none;
}
.pdp-multi-legend--vertical .pdp-multi-legend-item:hover { background: rgba(15, 23, 42, 0.04); }
.pdp-multi-legend--vertical .pdp-multi-legend-item.is-hidden { opacity: .38; }
.pdp-multi-legend--vertical .pdp-multi-legend-item.is-hidden .pdp-multi-legend-name { text-decoration: line-through; }
.pdp-multi-legend--vertical .pdp-multi-legend-item.is-pt {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}
.pdp-multi-legend--vertical .pdp-multi-legend-item.is-apple { opacity: .75; }
.pdp-multi-legend-rank {
  grid-area: rank;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pdp-multi-legend-rank--pt {
  color: #0066CC;
  font-size: 10px;
  letter-spacing: .5px;
}
.pdp-multi-legend--vertical .pdp-multi-firm-icon {
  grid-area: icon;
}
.pdp-multi-legend--vertical .pdp-multi-legend-name {
  grid-area: name;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pdp-multi-legend--vertical .pdp-multi-legend-item.is-pt .pdp-multi-legend-name { color: #0066CC; }
.pdp-multi-legend--vertical .pdp-multi-legend-price {
  grid-area: price;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12.5px;
  color: #0f172a;
  text-align: right;
}
.pdp-multi-legend-ts {
  grid-area: ts;
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
.pdp-multi-legend-diff {
  grid-area: diff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.pdp-multi-legend-diff.pdp-up { color: #dc2626; }
.pdp-multi-legend-diff.pdp-down { color: #16a34a; }
.pdp-multi-legend-divider {
  margin: 6px 4px 2px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 6px;
}

/* --- Tooltip (chart hover) --- */
.pdp-multi-tooltip {
  position: absolute;
  z-index: 10;
  background: #0f172a;
  color: #f1f5f9;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
  min-width: 220px;
  max-width: 290px;
  pointer-events: none;
}
.pdp-multi-tt-date {
  font-weight: 700;
  font-size: 11px;
  color: #93c5fd;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.pdp-multi-tt-rows { display: flex; flex-direction: column; gap: 3px; }
.pdp-multi-tt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pdp-multi-tt-row.is-pt {
  font-weight: 700;
  color: #fff;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px dashed rgba(255,255,255,.18);
}
.pdp-multi-tt-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.pdp-multi-tt-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdp-multi-tt-val { font-weight: 700; }
.pdp-multi-tt-row .pdp-up { color: #f87171; }
.pdp-multi-tt-row .pdp-down { color: #4ade80; }
.pdp-multi-tt-self {
  font-size: 9px;
  background: #0066CC;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .4px;
}

/* --- Recent moves listesi --- */
.pdp-multi-section {
  margin-top: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pdp-multi-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}
.pdp-multi-moves { display: flex; flex-direction: column; gap: 4px; }
.pdp-multi-move {
  display: grid;
  grid-template-columns: 60px 22px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  background: #fff;
}
.pdp-multi-move.is-pt { background: #eff6ff; border: 1px solid #bfdbfe; }
.pdp-multi-move-date {
  font-weight: 600;
  color: #64748b;
  font-size: 11.5px;
}
.pdp-multi-move-firm {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdp-multi-move-self {
  font-size: 9px;
  background: #0066CC;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .4px;
  font-weight: 700;
}
.pdp-multi-move-prices {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #475569;
}
.pdp-multi-move-prices strong { color: #0f172a; font-weight: 700; }
.pdp-multi-move-delta {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  min-width: 60px;
}
.pdp-multi-move-delta.pdp-up { color: #dc2626; }
.pdp-multi-move-delta.pdp-down { color: #16a34a; }

/* --- Insight chip'ler --- */
.pdp-multi-insights {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pdp-multi-insight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 12px;
  color: #334155;
  font-weight: 500;
}

/* --- Multi-firma kompakt favicon (legend / moves / insights / chart overlay) ---
   renderMultiFirmIcon helper'ı bu kuralları üretir. Default 20x20, --md
   modifier 24x24 (chart overlay için). img yüklenmezse koyu kutu içinde firma
   adının ilk harfi (fallback). */
/* Stack-layered: fallback (firma adının baş harfi) hep arka katmanda (z:1) ve
   her zaman görünür; img üst katmanda (z:2) merkez hizalı. Img blokeli ise
   (Brave shield, uBlock) fallback yine okunur — boş kutu olmaz. */
.pdp-multi-firm-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
}
.pdp-multi-firm-icon--md {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.pdp-multi-firm-icon-fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #334155;
  background: #e2e8f0;
  letter-spacing: -.3px;
  z-index: 1;
}
.pdp-multi-firm-icon--md .pdp-multi-firm-icon-fb {
  font-size: 11px;
}
.pdp-multi-firm-icon-img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  object-fit: contain;
  background: #fff;
  z-index: 2;
}
.pdp-multi-firm-icon--md .pdp-multi-firm-icon-img {
  width: 16px;
  height: 16px;
}

/* --- Chart sol kenarındaki firma favicon overlay'i (canvas üstüne abs pos) ---
   Y konumu firmanın line başlangıç fiyatına göre, JS collision avoidance ile
   min 24px ayrık. PT için border vurgu. */
.pdp-multi-chart-icon {
  position: absolute;
  z-index: 5;
  cursor: pointer;
  transition: transform .12s;
}
.pdp-multi-chart-icon:hover { transform: scale(1.12); }
.pdp-multi-chart-icon.is-pt .pdp-multi-firm-icon--md {
  border: 2px solid #0066CC;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.30);
}

/* --- Mobil (dar viewport) → tek kolon, KPI 2 sütun --- */
@media (max-width: 860px) {
  .pdp-multi-grid { grid-template-columns: 1fr; }
  .pdp-multi-legend--vertical { max-height: 260px; }
  .pdp-multi-kpi { grid-template-columns: repeat(2, 1fr); }
  .pdp-multi-kpi-card--scenario { grid-column: 1 / -1; }
  .pdp-multi-move { grid-template-columns: 55px 22px 1fr auto; }
  .pdp-multi-move-prices { display: none; }
}

.pdp-hist-list { display: flex; flex-direction: column; gap: 4px; }
.pdp-hist-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; background: var(--bg); border-radius: 7px;
  font-size: 13px;
}
.pdp-hist-date  { color: var(--muted); }
.pdp-hist-time  { color: #cbd5e1; font-size: 11px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.pdp-hist-price { font-weight: 700; color: var(--text); }
.pdp-hist-price--visa { color: #1a4dbe; }
.pdp-hist-price--app { color: #059669; }
.pdp-hist-price--edu { color: #0891b2; }
.pdp-hist-qty   { font-weight: 700; color: #0d9488; font-variant-numeric: tabular-nums; }
.pdp-hist-qty--zero { color: var(--danger); }
.pdp-hist-avail {
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; letter-spacing: 0.2px;
}
.pdp-hist-avail--in  { background: #dcfce7; color: #166534; }
.pdp-hist-avail--out { background: #fee2e2; color: #991b1b; }
.pdp-hist-avail--secondhand { background: #e0e7ff; color: #3730a3; }
.pdp-secondhand { color: #4338ca; }

/* Mode switcher (Fiyat / Stok) */
.pdp-mode-tabs {
  display: inline-flex; align-self: flex-start;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 3px; gap: 2px;
}
.pdp-mode-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: none; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--muted);
  border-radius: 7px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pdp-mode-tab svg { flex-shrink: 0; }
.pdp-mode-tab:not(.active):not(.disabled):hover {
  background: #fff; color: var(--text);
}
.pdp-mode-tab.active {
  background: #fff; color: var(--primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
/* EDU tab'ları (EDU Fiyat / EDU Stok) — aktifken cyan tema, normal tab'lardan ayrışsın. */
.pdp-mode-tab--edu.active { color: #0891b2; }
.pdp-mode-tab.disabled,
.pdp-mode-tab[disabled] {
  opacity: 0.45; cursor: not-allowed;
}

.pdp-hist-hidden { display: block; }
.pdp-hist-hidden .pdp-hist-row { margin-top: 4px; }

/* Linkler için ayrı hidden — parent .pdp-links-list flex column gap:6px olduğu için
   hidden div'in kendisi de aynı flex+gap kullanmalı ki açıldığında item'lar arası
   görsel mesafe görünür olanlarla aynı kalsın. JS toggle style.display = '' (boşalt)
   ile bu default davranışa döner; 'none' ile gizler. */
.pdp-links-hidden { display: flex; flex-direction: column; gap: 6px; }

.pdp-hist-expand-btn,
.pdp-links-expand-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; padding: 8px 14px; margin-top: 2px;
  background: none; border: 1px dashed var(--border); border-radius: 7px;
  font-size: 12px; color: var(--muted); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pdp-hist-expand-btn:hover,
.pdp-links-expand-btn:hover {
  background: #e8f0fe; border-color: var(--accent); color: var(--accent);
}
.pdp-hist-expand-icon,
.pdp-links-expand-icon { transition: transform 0.2s; flex-shrink: 0; }

.pdp-links-list { display: flex; flex-direction: column; gap: 6px; }
.pdp-link-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg);
  text-decoration: none; color: var(--text);
  transition: border-color .12s, background .12s;
  overflow: hidden;
}
.pdp-link-item:hover { background: #e8f0fe; border-color: var(--accent); }
.pdp-link-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: var(--primary); color: #fff;
}
.pdp-link-url {
  flex: 1; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Ürünler yönetim sekmesi ---- */
#tab-products { flex-direction: column; overflow: hidden; background: #faf9f6; }

.mgmt-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mgmt-toolbar-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgmt-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.mgmt-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.mgmt-stat-sep { opacity: .55; }
.mgmt-search-center { display: flex; justify-content: center; }
.mgmt-search-wrap   { position: relative; width: 280px; }
.mgmt-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.mgmt-search-input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit;
  background: var(--bg); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.mgmt-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}
.mgmt-search-input::placeholder { color: var(--muted); }

.products-mgmt-list {
  flex: 1; overflow-y: auto; padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.products-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.products-stat-card {
  min-height: 108px;
  padding: 22px 24px;
  background: #f7f5ef;
  border: 1px solid #d9d6ce;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 12px;
  row-gap: 8px;
}
.products-stat-card span {
  grid-column: 1 / -1;
  color: #74716b;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.products-stat-card strong {
  color: #0b0b0f;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .02em;
}
.products-stat-card em {
  align-self: end;
  color: #242424;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
}
.products-filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
}
.products-result-count {
  color: #74716b;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  margin-left: auto;
}

/* ====== Ürünler sekmesi — filtre dropdownları ====== */
.pm-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.pm-dropdown {
  position: relative;
}
.pm-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  background: #fff;
  color: #1f2a37;
  border: 1px solid #dedede;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}
.pm-dropdown-toggle:hover {
  border-color: #b9c5d2;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.pm-dropdown-toggle.has-value {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pm-dropdown.open .pm-dropdown-toggle {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .15);
}
.pm-dropdown-toggle svg { transition: transform .12s; flex-shrink: 0; }
.pm-dropdown.open .pm-dropdown-toggle svg { transform: rotate(180deg); }
/* Uzun grup/kategori adı pill'i şişirmesin — metni "…" ile kes (dashboard select mantığı) */
.pm-dropdown-toggle > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.pm-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15,23,42,.16);
  z-index: 30;
  padding: 6px;
}
.pm-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #1f2a37;
  font-family: inherit;
  text-align: left;
}
.pm-dropdown-option:hover { background: #f1f5f9; }
.pm-dropdown-all { color: var(--primary); font-weight: 700; }
.pm-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}
.pm-dropdown-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.pm-dropdown-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 28px;
  text-align: center;
}
.pm-dropdown-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pm-check, .pm-radio {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #cbd5e1;
  background: #fff;
  transition: background .12s, border-color .12s;
  position: relative;
}
.pm-check { border-radius: 4px; }
.pm-radio { border-radius: 50%; }
.pm-check.on {
  background: var(--primary);
  border-color: var(--primary);
}
.pm-check.on::after {
  content: '';
  position: absolute;
  left: 4px; top: 0;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pm-radio.on {
  border-color: var(--primary);
  background: #fff;
}
.pm-radio.on::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.pm-filter-reset {
  background: transparent;
  border: 1px solid transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
}
.pm-filter-reset:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

/* ====== Ürünler sekmesi — admin sıralama paneli ====== */
.pm-sort-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 14px;
}
.pm-sort-panel-collapsed {
  padding: 0;
  background: transparent;
  border: none;
}
.pm-sort-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: background .12s, border-color .12s;
}
.pm-sort-toggle:hover {
  background: #f8fafc;
  border-color: var(--accent);
  color: var(--primary);
}
.pm-sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.pm-sort-summary { flex: 1; text-align: left; color: var(--text); }
.pm-sort-hint { color: var(--accent); font-size: 13px; font-weight: 800; }

.pm-sort-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.pm-sort-header strong { font-size: 16px; color: var(--text); }
.pm-sort-badge {
  font-size: 11px;
  font-weight: 800;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pm-sort-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  font-family: inherit;
}
.pm-sort-close:hover { background: #fff; color: var(--text); border-color: var(--border); }

.pm-sort-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.pm-sort-cat-row { align-items: flex-start; flex-direction: column; gap: 8px; }
.pm-sort-label { color: var(--muted); font-size: 14px; font-weight: 700; }
.pm-sort-radio, .pm-sort-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.pm-sort-radio input, .pm-sort-check input { accent-color: var(--primary); width: 16px; height: 16px; }

.pm-sort-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.pm-sort-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  user-select: none;
}
.pm-sort-cat-chip:active { cursor: grabbing; }
.pm-sort-cat-chip.dragging { opacity: .4; }
.pm-sort-cat-chip.drag-over { border-color: var(--accent); background: #eff6ff; }
.pm-sort-cat-handle { color: #94a3b8; font-size: 12px; letter-spacing: -2px; }
.pm-sort-cat-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}

.pm-sort-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  margin-top: 8px;
}
.pm-sort-status { flex: 1; color: var(--muted); font-size: 13px; font-style: italic; }
.pm-sort-btn {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s, color .12s;
}
.pm-sort-btn-cancel {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.pm-sort-btn-cancel:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; }
.pm-sort-btn-save {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}
.pm-sort-btn-save:hover:not(:disabled) { background: #001f42; }
.pm-sort-btn:disabled { opacity: .5; cursor: not-allowed; }
.products-list-header {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 1fr) minmax(130px, .75fr) minmax(110px, .6fr) minmax(80px, .4fr) minmax(110px, .55fr) minmax(170px, .7fr);
  align-items: center;
  gap: 14px;
  padding: 10px 34px 0;
  color: #74716b;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.products-table-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-mgmt-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 1fr) minmax(130px, .75fr) minmax(110px, .6fr) minmax(80px, .4fr) minmax(110px, .55fr) minmax(170px, .7fr);
  align-items: center;
  gap: 14px;
  min-height: 98px;
  padding: 20px 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.prod-mgmt-brand {
  min-width: 0;
}
.prod-mgmt-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
}
/* Ürünler yönetim tablosu — ilk hücre: PT görseli (varsa) + isim/ID/kod sütunu. */
.prod-mgmt-firstcell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.prod-mgmt-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.prod-mgmt-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.prod-mgmt-name {
  min-width: 0;
  max-width: 100%;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: #050505;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.prod-mgmt-code {
  max-width: 220px;
  padding: 4px 10px;
  border-radius: 5px;
  background: #f7f6f3;
  color: #3f3f46;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Ürün ID — sadece admin görür. Monospace, dim, kopyalanabilir. */
.prod-mgmt-id {
  max-width: 260px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: all;
}
.prod-mgmt-id:hover { background: #e2e8f0; color: #475569; }
.prod-mgmt-category,
.prod-mgmt-link-count,
.prod-mgmt-pt-status,
.prod-mgmt-actions {
  min-width: 0;
}
.prod-category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 7px;
  background: #edf2f7;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-category-ipad { background: #e6f2ff; color: #075a9f; }
.prod-category-beats { background: #faebe7; color: #a34016; }
.prod-category-imac { background: #edf7e4; color: #356c16; }
.prod-category-mac { background: #eef2ff; color: #4338ca; }
.prod-category-iphone { background: #f1f5f9; color: #0f172a; }
.prod-category-airpods { background: #fef3c7; color: #92400e; }
.prod-category-apple-tv { background: #f3e8ff; color: #6b21a8; }
.prod-category-diger { background: #f4f4f5; color: #52525b; }
.prod-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 7px;
  background: #edf2f7;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-brand-apple { background: #1a1a1a; color: #ffffff; }
.prod-brand-beats-electronics { background: #fbe6f1; color: #b91858; }
.prod-brand-other { background: #f4f4f5; color: #52525b; }
.prod-brand-empty { background: #fff7ed; color: #c2410c; border: 1px dashed #fdba74; }
.prod-mgmt-pg {
  min-width: 0;
}
.prod-pg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 7px;
  background: #ecfeff;
  color: #155e75;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-pg-empty {
  background: #f0fdf4;
  color: #15803d;
  border: 1px dashed #86efac;
  font-style: italic;
  font-weight: 600;
  font-size: 13px;
}
.prod-mgmt-link-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #242424;
  font-size: 18px;
  white-space: nowrap;
}
.prod-mgmt-link-count strong {
  font-weight: 800;
}
.prod-link-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9ee7d3;
  flex-shrink: 0;
}
.prod-link-dot.empty { background: #d9d9d9; }
.prod-pt-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.prod-pt-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.prod-pt-status.active {
  background: #e8f4db;
  color: #356c16;
}
.prod-pt-status.active span { background: #397b0f; }
.prod-pt-status.missing {
  background: #fff0d9;
  color: #9a5608;
}
.prod-pt-status.missing span { background: #a7630a; }
.prod-edit-btn {
  min-width: 120px;
  min-height: 48px;
  padding: 0 22px;
  background: #fff;
  color: #111;
  border: 1px solid #c9c9c9;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.prod-edit-btn:hover {
  border-color: #9aa4af;
  box-shadow: 0 2px 10px rgba(15,23,42,.08);
}
.prod-delete-btn {
  min-height: 36px;
  padding: 0 12px;
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
}
.prod-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}
.prod-mgmt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.products-empty-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
@media (max-width: 1100px) {
  .products-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .products-list-header {
    display: none;
  }
  .prod-mgmt-card {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .prod-mgmt-main {
    grid-column: 1 / -1;
  }
  .prod-mgmt-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .products-summary-grid {
    grid-template-columns: 1fr;
  }
  .prod-mgmt-card {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }
  .pm-dropdown-toggle {
    min-height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }
  .pm-dropdown-panel { min-width: 220px; }
  .prod-mgmt-actions {
    justify-content: stretch;
  }
  .prod-edit-btn {
    flex: 1;
    min-width: 0;
  }
}

.site-url-input {
  width: 100%; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 12px; font-family: inherit; outline: none;
}
.site-url-input:focus { border-color: var(--accent); }

.mp-urls-wrap { display: flex; flex-direction: column; gap: 4px; }
.mp-url-row   { display: flex; gap: 4px; }
.mp-url-remove {
  padding: 4px 7px; background: #fee2e2; color: var(--danger);
  border: none; border-radius: 5px; cursor: pointer; font-size: 12px;
}
.mp-url-add {
  padding: 3px 8px; background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; cursor: pointer; font-size: 11px;
  margin-top: 2px; align-self: flex-start;
}

/* ---- Import önizleme ---- */
.import-preview-wrap {
  margin: 0 20px; padding: 12px 14px;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: 8px; flex-shrink: 0;
}
.import-preview-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.warn-badge { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.preview-table-wrap { max-height: 180px; overflow-y: auto; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-table th { padding: 5px 8px; background: #f8fafc; border-bottom: 1px solid var(--border); text-align: left; }
.preview-table td { padding: 4px 8px; border-bottom: 1px solid var(--bg); }
.td-warn { color: #92400e; font-weight: 600; }

/* ---- Selectorlar ---- */
.selector-list { margin-top: 12px; }
.selector-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.selector-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(59,130,246,.07);
}
.selector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  background: #fff;
  transition: background .12s;
  user-select: none;
}
.selector-header:hover { background: #f0f6ff; }
.selector-firm {
  font-size: 13px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.selector-css {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}
.selector-arrow {
  font-size: 10px;
  color: #94a3b8;
  transition: transform .2s;
  flex-shrink: 0;
}
.selector-item.open .selector-arrow { transform: rotate(90deg); }
.selector-body {
  display: none;
  padding: 14px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.selector-item.open .selector-body { display: block; }

.sel-add-row { display: none; }
.mp-label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }

/* ---- Ayarlar ---- */
#tab-settings { overflow: hidden; }

/* Eski layout sınıfları — artık kullanılmıyor, kaldırıldı */
.settings-wrap, .settings-grid, .settings-col-main,
.settings-col-side, .settings-mini-row, .settings-log-row { }

/* Yeni shell */
.settings-shell {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Sol Sidebar */
.settings-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 22px 0 20px;
}

.settings-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px 18px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.settings-nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.settings-nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: 6px 10px 4px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}

.settings-nav-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.settings-nav-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.settings-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #64748b;
  transition: background .12s, color .12s;
}

.settings-nav-item:hover .settings-nav-icon,
.settings-nav-item.active .settings-nav-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.settings-nav-item[data-sec="sec-users"].active { color: #047857; background: #f0fdf4; }
.settings-nav-item[data-sec="sec-users"].active .settings-nav-icon { background: #d1fae5; color: #047857; }
.settings-nav-item[data-sec="sec-users"]:hover { color: #047857; background: #f0fdf4; }
.settings-nav-item[data-sec="sec-users"]:hover .settings-nav-icon { background: #d1fae5; color: #047857; }

.settings-nav-item[data-sec="sec-roles"].active { color: #4338ca; background: #eef2ff; }
.settings-nav-item[data-sec="sec-roles"].active .settings-nav-icon { background: #e0e7ff; color: #4338ca; }
.settings-nav-item[data-sec="sec-roles"]:hover { color: #4338ca; background: #eef2ff; }
.settings-nav-item[data-sec="sec-roles"]:hover .settings-nav-icon { background: #e0e7ff; color: #4338ca; }

.settings-nav-item[data-sec="sec-colors"].active { color: #7c3aed; background: #faf5ff; }
.settings-nav-item[data-sec="sec-colors"].active .settings-nav-icon { background: #f3e8ff; color: #7c3aed; }
.settings-nav-item[data-sec="sec-colors"]:hover { color: #7c3aed; background: #faf5ff; }
.settings-nav-item[data-sec="sec-colors"]:hover .settings-nav-icon { background: #f3e8ff; color: #7c3aed; }

/* Ana İçerik */
.settings-main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
}

/* Bölüm Paneli */
.settings-sec {
  display: none;
  max-width: 820px;
}

/* Üretici Grup Oranları + Gürgençler EDU veri tabloları form genişliğine
   sığmıyor (6 sütun) — bu iki bölüm geniş alanı kullansın, yoksa tablo
   taşıp yatay scroll'a düşer ve sol sütun kırpılır. */
#sec-producer-rates,
#sec-gurgencler-edu {
  max-width: 1180px;
}

.settings-sec.active {
  display: block;
}

.settings-sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.settings-sec-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-sec-icon-blue   { background: #dbeafe; color: #1d4ed8; }
.settings-sec-icon-purple { background: #f3e8ff; color: #7c3aed; }
.settings-sec-icon-green  { background: #d1fae5; color: #047857; }
.settings-sec-icon-slate  { background: #e0e7ff; color: #4338ca; }
.settings-sec-icon-amber  { background: #fef3c7; color: #b45309; }
.settings-sec-icon-emerald{ background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); color: #047857; }

/* ===========================================================
   Üretici Grup Oranları (Ayarlar > Maliyet) — premium tasarım
   =========================================================== */

/* --- KPI bandı --- */
.pg-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pg-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s, box-shadow 0.18s;
}
.pg-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}
.pg-stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pg-stat-total   .pg-stat-icon { background: #dbeafe; color: #1d4ed8; }
.pg-stat-done    .pg-stat-icon { background: #d1fae5; color: #047857; }
.pg-stat-missing .pg-stat-icon { background: #fee2e2; color: #b91c1c; }
.pg-stat-body { min-width: 0; }
.pg-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pg-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* --- Toolbar (arama + hint) --- */
.pg-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pg-search-wrap {
  position: relative;
  flex: 0 0 280px;
  max-width: 280px;
}
.pg-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.pg-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.pg-toolbar-hint {
  font-size: 12px;
  color: #64748b;
  flex: 1;
}
.pg-toolbar-hint strong { color: #334155; font-weight: 600; }

/* --- Ana kart --- */
.pg-rates-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* --- Empty state --- */
.pg-rates-empty {
  padding: 48px 24px;
  text-align: center;
}
.pg-empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
}
.pg-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.pg-empty-text {
  font-size: 13px;
  color: #64748b;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.5;
}

/* --- Tablo --- */
.pg-rates-table-wrap {
  overflow-x: auto;
}
.pg-rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed; /* th width'leri otoriter olsun — uzun grup adı oran sütunlarını sıkıştırmasın */
}
.pg-th-group { width: auto; } /* kalan alanı al; uzun adlar .pg-row-name ile ellipsis olur */
.pg-rates-table thead th {
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.pg-th-count { width: 90px; text-align: center !important; }
.pg-th-rate { width: 170px; }
.pg-th-undercut { width: 200px; }
.pg-th-meta { width: 150px; }
.pg-rates-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s;
  position: relative;
}
.pg-rates-table tbody tr:last-child { border-bottom: none; }
.pg-rates-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}
.pg-row { border-left: 3px solid transparent; }
.pg-row:hover { background: #f8fafc; }
.pg-row.is-dirty {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.pg-row.is-dirty:hover { background: #fef3c7; }

/* Saved row glow animasyonu */
@keyframes pgRowSavedGlow {
  0%   { background: #bbf7d0; }
  60%  { background: #dcfce7; }
  100% { background: transparent; }
}
.pg-row.is-just-saved {
  animation: pgRowSavedGlow 1.8s ease-out;
  border-left-color: #10b981 !important;
}

/* Grup adı hücresi */
.pg-rates-name {
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pg-row-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.pg-row-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ürün sayısı badge */
.pg-rates-count { text-align: center; }
.pg-count-badge {
  display: inline-block;
  min-width: 32px;
  padding: 3px 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* Input — % suffix'li */
.pg-input-wrap {
  position: relative;
  min-width: 96px; /* auto-layout'ta min-content'e çökmesin — yazılan değer + % suffix her zaman görünür */
  max-width: 150px;
}
.pg-input-suffix {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.pg-rates-input {
  width: 100%;
  padding: 7px 28px 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.pg-rates-input:hover { border-color: #94a3b8; }
.pg-rates-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.pg-rates-input::-webkit-outer-spin-button,
.pg-rates-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pg-rates-input { -moz-appearance: textfield; }

/* Öneri farkı sütunu — değer input'u + birim seçici (₺ / %) yan yana. */
.pg-undercut-wrap {
  display: flex;
  align-items: stretch;
  gap: 7px;
  max-width: 180px;
}
.pg-undercut-input {
  flex: 1 1 auto;
  min-width: 90px; /* min-content'e çökmesin — yazılan değer her zaman görünür */
  padding-right: 12px; /* suffix yok, sağ boşluğu küçült */
}
.pg-undercut-unit {
  flex: 0 0 auto;
  width: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  padding: 0 4px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-undercut-unit:hover { border-color: #94a3b8; }
.pg-undercut-unit:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* Meta sütunu */
.pg-rates-meta {
  font-size: 12px;
  color: #64748b;
}
.pg-meta-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.pg-meta-dot.is-set   { background: #10b981; }
.pg-meta-dot.is-empty { background: #cbd5e1; }

.pg-rates-no-match {
  text-align: center !important;
  padding: 32px 16px !important;
  color: #94a3b8;
  font-size: 13px;
}

/* --- Save bar (sticky bottom) --- */
.pg-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: sticky;
  bottom: 12px;
  z-index: 2;
}
.pg-save-status {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.pg-save-status.is-show { opacity: 1; transform: translateY(0); }
.pg-save-status.is-ok    { color: #047857; font-weight: 600; }
.pg-save-status.is-err   { color: #b91c1c; font-weight: 600; }
.pg-save-status.is-info  { color: #64748b; }
.pg-save-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-dirty-count {
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Save button — neutral → active (dirty var) → loading → success */
.pg-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #e2e8f0;
  color: #94a3b8;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: not-allowed;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}
.pg-save-btn.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.pg-save-btn.is-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.pg-save-btn.is-loading {
  background: #1d4ed8;
  color: #fff;
  cursor: progress;
}
.pg-save-btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  animation: pgBtnSheen 1.1s linear infinite;
}
@keyframes pgBtnSheen {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.pg-save-btn.is-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  cursor: default;
  animation: pgBtnSuccessPulse 0.6s ease-out;
}
@keyframes pgBtnSuccessPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  60%  { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pg-save-btn svg {
  flex-shrink: 0;
}

/* ---- Gürgençler EDU oran paneli ---- */
.gedu-form-card {
  margin-top: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.gedu-form-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.gedu-form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.gedu-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gedu-field-grow { flex: 1 1 240px; }
.gedu-field-rate { width: 120px; }
.gedu-field-action { align-self: flex-end; }
.gedu-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.gedu-select, .gedu-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.gedu-select:focus, .gedu-input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}
.gedu-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
}
.gedu-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(8, 145, 178, 0.38); }
.gedu-add-btn svg { flex-shrink: 0; }
.gedu-form-hint { margin-top: 10px; font-size: 12px; color: #94a3b8; }

/* Çakışma uyarısı */
.gedu-conflict {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
}
.gedu-conflict-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 10px;
}
.gedu-conflict-head svg { flex-shrink: 0; color: #d97706; }
.gedu-conflict-list { display: flex; flex-direction: column; gap: 8px; }
.gedu-conflict-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fde68a;
  border-radius: 9px;
}
.gedu-conflict-prod { display: flex; flex-direction: column; min-width: 160px; flex: 1 1 200px; }
.gedu-conflict-sku { font-size: 11px; font-weight: 700; color: #b45309; font-family: ui-monospace, monospace; }
.gedu-conflict-name { font-size: 12.5px; color: #334155; }
.gedu-conflict-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gedu-conflict-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
}
.gedu-conflict-tag.is-winner { color: #047857; background: #d1fae5; border-color: #6ee7b7; }
.gedu-conflict-win { font-size: 12px; color: #92400e; }
.gedu-conflict-win strong { color: #b45309; }

/* Kural tablosu */
.gedu-rules-table td { vertical-align: middle; }
.gedu-td-value { font-size: 13px; color: #334155; }
.gedu-td-rate { font-weight: 700; color: #0e7490; }
.gedu-td-count { color: #64748b; font-variant-numeric: tabular-nums; }
.gedu-td-del { text-align: right; }
.gedu-scope-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.gedu-scope-product { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.gedu-scope-category { background: #cffafe; color: #0e7490; border-color: #a5f3fc; }
.gedu-scope-subCategory { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.gedu-scope-producerGroup { background: #dcfce7; color: #047857; border-color: #bbf7d0; }
.gedu-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.16s;
}
.gedu-del-btn:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

/* Mobil */
@media (max-width: 720px) {
  .pg-stats { grid-template-columns: 1fr; }
  .pg-toolbar { flex-direction: column; align-items: stretch; }
  .pg-search-wrap { flex: 1 1 auto; max-width: 100%; }
  .pg-th-meta, .pg-rates-meta { display: none; }
  .gedu-form-row { flex-direction: column; align-items: stretch; }
  .gedu-field-rate, .gedu-field-action { width: 100%; }
  .gedu-add-btn { width: 100%; justify-content: center; }
}

.settings-sec-head-text { flex: 1; min-width: 0; }

.settings-sec-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.settings-sec-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.settings-sec-action-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

/* Yeni Firma Ekle Kartı */
.settings-add-card {
  background: #f8faff;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.settings-add-card-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.settings-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.settings-add-row .field-input {
  flex: 1;
  min-width: 130px;
}

/* Renk Kartı */
.settings-color-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

/* Settings Card */
.settings-card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
}

.settings-card-pt-scanlog {
  border: 2px solid #d97706 !important;
  background: var(--surface) !important;
  box-shadow: 0 2px 14px rgba(217,119,6,.2) !important;
}

/* Renkli kart başlığı */
.s-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}

.s-head-blue   { background: linear-gradient(135deg, #002E5F 0%, #1565c0 100%); }
.s-head-green  { background: linear-gradient(135deg, #065f46 0%, #059669 100%); }
.s-head-red    { background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%); }
.s-head-slate  { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); }
.s-head-gold   { background: linear-gradient(135deg, #78350f 0%, #d97706 100%); }
.s-head-purple { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }

/* Firma Renkleri */
.bc-empty {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 10px 0 4px;
}
.bc-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.bc-row:last-child { border-bottom: none; }
.bc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,.1);
  transition: background .15s;
}
.bc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-presets {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.bc-preset {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,.12);
  transition: transform .1s, box-shadow .1s;
}
.bc-preset:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}
.bc-color-inp {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 1px 2px;
  background: var(--bg);
  flex-shrink: 0;
}

.s-head-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: .06em;
}

/* Kart içeriği */
.s-card-body { padding: 16px 18px; }

.s-btn-full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Yardımcı */
.settings-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }

.settings-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.security-card-head {
  justify-content: space-between;
  flex-wrap: wrap;
}
.security-head-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.security-head-btn {
  margin-left: auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  transition: background .15s, border-color .15s, transform .15s;
}
.security-head-btn:hover {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.42);
  transform: translateY(-1px);
}
.security-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.security-form-title {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}
.security-fields {
  display: grid;
  gap: 8px;
}
.security-check,
.permission-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 12px;
}
.security-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.security-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.security-list-full {
  padding: 0;
}
.security-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.security-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15,23,42,.07);
  transform: translateY(-1px);
}
.security-row-main {
  min-width: 0;
}
.security-row-main strong,
.security-row-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.security-row-main strong {
  color: var(--text);
  font-size: 13px;
}
.security-row-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.security-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.security-status,
.security-system {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.security-status.active {
  color: #166534;
  background: #dcfce7;
}
.security-status.passive {
  color: #991b1b;
  background: #fee2e2;
}
.security-system {
  color: #334155;
  background: #e2e8f0;
}
.security-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.security-modal-overlay {
  background: rgba(15,23,42,.48);
  backdrop-filter: blur(8px);
}
.security-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(15,23,42,.28);
}
.security-modal-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #e8edf4;
  background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(248,250,252,.98) 100%);
}
.security-modal-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
}
.security-modal-icon-green {
  color: #047857;
  background: #d1fae5;
}
.security-modal-icon-blue {
  color: #1d4ed8;
  background: #dbeafe;
}
.security-modal-title {
  flex: 1;
  min-width: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
}
.security-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.security-modal-close:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
}
.security-modal-form {
  gap: 16px;
  padding: 20px 22px 18px;
  border: none;
  border-radius: 0;
  background: #fff;
}
.security-modal-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.security-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}
.security-field .field-input {
  min-height: 40px;
  border-radius: 8px;
  background: #fbfdff;
}
.security-field .field-input:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(96,165,250,.16);
  outline: none;
}
.security-switch {
  position: relative;
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding: 4px 0;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
}
.security-switch input {
  position: absolute;
  z-index: 2;
  width: 42px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.security-switch-ui {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .16s;
}
.security-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.25);
  transition: transform .16s;
}
.security-switch input:checked + .security-switch-ui {
  background: #10b981;
}
.security-switch input:checked + .security-switch-ui::after {
  transform: translateX(18px);
}
.security-permission-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.security-permission-grid .permission-check {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fbfdff;
  font-weight: 700;
  transition: border-color .15s, background .15s, color .15s;
}
.security-permission-grid .permission-check:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.security-permission-grid input,
.security-check input {
  accent-color: #2563eb;
}
.security-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid #e8edf4;
}
.security-modal-action-spacer {
  flex: 1;
  min-width: 16px;
}
.security-form-error:not(:empty) {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

/* Ayar satırları */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 13px; font-weight: 600; }
.setting-hint  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.setting-interval-wrap { display: flex; align-items: center; gap: 6px; }
.setting-interval-input { width: 70px; }

/* Toggle switch */
.toggle-switch  { position: relative; display: inline-block; width: 40px; height: 23px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider  {
  position: absolute; inset: 0; background: #cbd5e1;
  border-radius: 23px; cursor: pointer; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 17px; width: 17px;
  left: 3px; bottom: 3px; background: #fff;
  border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
input:checked + .toggle-slider { background: #059669; }
input:checked + .toggle-slider::before { transform: translateX(17px); }

/* ---- Pasaj ---- */
#tab-pasaj { flex-direction: column; overflow: hidden; }
.pasaj-toolbar { padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pasaj-list {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px; align-content: start;
}
.pasaj-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pasaj-card-header {
  padding: 12px 14px; cursor: pointer; user-select: none;
  display: flex; align-items: flex-start; gap: 8px; transition: background .12s;
}
.pasaj-card-header:hover { background: var(--bg); }
.pasaj-card-arrow { font-size: 11px; color: var(--muted); margin-top: 1px; flex-shrink: 0; transition: transform .2s; }
.pasaj-card.open .pasaj-card-arrow { transform: rotate(90deg); }
.pasaj-card-info { flex: 1; min-width: 0; }
.pasaj-card-name { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pasaj-card-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pasaj-card-prices { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.price-badge { font-size: 12px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.price-badge.normal { background: #e8f0fe; color: var(--primary); }
.price-badge.edu    { background: #e8f5e9; color: #1a7a1a; }
.pasaj-card-body { display: none; border-top: 1px solid var(--border); padding: 10px 14px; }
.pasaj-card.open .pasaj-card-body { display: block; }
.color-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.color-table td { padding: 4px 0; vertical-align: middle; }
.color-table td:last-child { text-align: right; }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); margin-right: 5px; vertical-align: middle; }
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 8px 0 4px; }
.section-label:first-child { margin-top: 0; }

/* ---- Modal ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 12px;
  width: 520px; max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-header span { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); }
.modal-sites { margin-top: 8px; }
.modal-site-row { display: grid; grid-template-columns: 120px 1fr; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bg); }
.modal-site-row:last-child { border-bottom: none; }
.modal-site-name { font-size: 12px; font-weight: 600; padding-top: 6px; }

/* =============================================
   Ürün Modal v2 — iki panelli düzen
   ============================================= */

#product-modal .pm-modal {
  width: min(1300px, 96vw);
  max-width: 1300px;
  height: min(760px, 94vh);
  max-height: 94vh;
  border-radius: 14px;
  overflow: hidden;
}
#product-modal .pm-header {
  padding: 14px 18px 12px;
  align-items: flex-start;
  gap: 16px;
}
.pm-header-left { flex: 1; min-width: 0; }
.pm-breadcrumb {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pm-title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#product-modal .pm-title-row #modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.pm-meta {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pm-meta b { color: var(--text); font-weight: 600; }

#product-modal .pm-body {
  padding: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* ---- Sol panel ---- */
.pm-side {
  width: 460px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pm-side-scroll {
  padding: 16px 18px 14px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}
@media (max-width: 1280px) {
  #product-modal .pm-modal { width: 96vw; max-width: 96vw; }
  .pm-side { width: 400px; }
}
@media (max-width: 1024px) {
  .pm-side { width: 360px; }
}
.pm-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.pm-label-opt {
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 10.5px;
  opacity: .8;
}
.pm-input {
  width: 100%;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.pm-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.pm-input + .pm-label,
.pm-grid-2 + .pm-pt-card,
.pm-input + .pm-grid-2 { margin-top: 12px; }

.pm-mfr-price-wrap { margin-top: 12px; }
.pm-mfr-price-wrap + .pm-pt-card { margin-top: 12px; }
.pm-mfr-price-hint {
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 10.5px;
  margin-left: 6px;
  opacity: .9;
}
.pm-input:disabled,
.pm-input[disabled] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
.pm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.pm-grid-2.pm-single { grid-template-columns: 1fr; }
/* İki kolonlu grid'de label uzunlukları farklı olabiliyor (örn. üretici fiyatı
 * "Apple linki olduğundan ..." hint metniyle 2-3 satıra çıkıyor, MARKA tek satır).
 * Hücreleri flex column yapıp input/select'leri dipten hizalıyoruz — input'lar
 * aynı baseline'da kalır. */
.pm-grid-2 > .pm-grid-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pm-grid-2 > .pm-grid-cell > .pm-input:first-of-type {
  margin-top: auto;
}
/* Grid içindeyken mfr-price wrap'ın eski tek satırlık margin-top'u devre dışı. */
.pm-grid-2 > .pm-mfr-price-wrap { margin-top: 0; }
.pm-cat-select { padding-right: 28px; }

#product-modal .pm-pt-card { margin-top: 14px; }

.pm-search-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  align-items: stretch;
}
.pm-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
}
.pm-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.pm-search-icon { color: var(--muted); flex-shrink: 0; }
.pm-search-input {
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 8px;
  font-size: 12.5px;
  font-family: inherit;
  flex: 1;
  width: 100%;
  color: var(--text);
}
.pm-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.pm-filter-pill:hover { background: var(--bg); }
.pm-filter-pill.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.pm-pill-count {
  background: rgba(255,255,255,.18);
  color: inherit;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pm-filter-pill:not(.is-active) .pm-pill-count {
  background: var(--bg);
  color: var(--muted);
}

.pm-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.pm-filter-chip:hover { background: var(--bg); }
.pm-filter-chip.is-active {
  border-color: #0f172a;
  box-shadow: 0 0 0 1px #0f172a inset;
}
.pm-chip-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
}
.pm-filter-chip.is-active .pm-chip-count { color: var(--text); }
.pm-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.pm-dot-green { background: #16a34a; }
.pm-dot-amber { background: #d97706; }

/* ---- Section Card (Sınıflandırma / Etiketler / Referans) ---- */
.pm-section-card {
  margin-top: 14px;
  padding: 12px 13px 13px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02), 0 1px 3px rgba(15, 23, 42, .03);
  transition: box-shadow .15s, border-color .15s;
}
.pm-section-card:focus-within {
  border-color: rgba(99, 102, 241, .35);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02), 0 4px 12px rgba(99, 102, 241, .08);
}
.pm-section-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #475569;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}
.pm-section-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  color: #6366f1;
  background: #eef2ff;
  flex-shrink: 0;
}
.pm-section-card-badge {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
/* "admin" badge'inden farklı — uppercase olmayan, sade hint metni. */
.pm-section-card-hint {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: #94a3b8;
  text-transform: none;
}
#modal-reference-card .pm-mfr-price-wrap { margin-top: 0; }
#modal-reference-card .pm-mfr-price-wrap + .pm-pt-card { margin-top: 0; }

/* Özel Not kartı — admin-gated DEĞİL; herkese görünür. Hafif renkli vurgu
   (sarı/kehribar) — kullanıcının dikkatini çeksin ki kampanya/önemli notu
   girilebilsin. */
.pm-note-card {
  background: linear-gradient(180deg, #fffbeb 0%, #fffdf5 100%);
  border-color: #fde68a;
}
.pm-note-card .pm-section-card-ico {
  color: #b45309;
  background: #fef3c7;
}
.pm-note-preview {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .6);
  border: 1px dashed #fcd34d;
  border-radius: 7px;
}
.pm-note-preview[hidden] { display: none; }
.pm-note-preview-label {
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Modal önizleme chip'i — dashboard kartındaki .fa-prod-card-note ile aynı görünür. */
.pm-note-preview-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid;
  line-height: 1.3;
  letter-spacing: 0.15px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-note-preview-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* ---- Tools tray (arama + filtre) — SİTELER üst banı ---- */
.pm-tools-tray {
  margin-top: 18px;
  padding: 10px 11px 8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .025) 0%, rgba(15, 23, 42, .015) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pm-tools-tray .pm-search-row { margin: 0; }
.pm-tools-tray .pm-filter-chips { margin: 0; }

.pm-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 16px 4px 8px;
}
.pm-section-label--strong {
  position: relative;
  margin-top: 14px;
  padding-top: 14px;
  color: var(--text);
  letter-spacing: .14em;
}
.pm-section-label--strong::before {
  content: '';
  position: absolute;
  top: 0; left: 4px; right: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #cbd5e1 50%, transparent 100%);
}
.pm-site-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pm-site-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.pm-site-row:hover { background: var(--surface); border-color: var(--border); }
.pm-site-row.is-active {
  background: #fff;
  border-color: #0f172a;
  box-shadow: 0 0 0 1px #0f172a;
}
.pm-site-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.pm-site-icon-wrap img { width: 18px; height: 18px; object-fit: contain; }
.pm-site-icon-fallback {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-site-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-site-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pm-site-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-mp-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.pm-site-status {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.pm-site-status.is-filled { color: #16a34a; font-weight: 600; }
.pm-site-status .pm-status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pm-site-tail {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}
.pm-site-tail.is-check {
  color: #16a34a;
  font-size: 14px;
}
.pm-site-tail.is-count {
  background: #0f172a;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.pm-site-row.is-active .pm-site-tail.is-count { background: #0f172a; }
.pm-site-row.is-empty .pm-site-tail { opacity: .5; }

/* ---- Sağ panel ---- */
.pm-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.pm-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  padding: 40px;
  text-align: center;
}
.pm-empty-icon { font-size: 38px; opacity: .35; }
.pm-empty-title { font-size: 14px; font-weight: 600; color: var(--text); }
.pm-empty-desc { font-size: 12.5px; max-width: 280px; line-height: 1.5; }

.pm-detail {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pm-detail-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.pm-detail-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.pm-detail-icon-wrap img { width: 26px; height: 26px; object-fit: contain; }
.pm-detail-info { flex: 1; min-width: 0; }
.pm-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pm-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.pm-detail-mp-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
}
.pm-detail-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.pm-detail-sub a { color: var(--accent); text-decoration: none; }
.pm-detail-sub a:hover { text-decoration: underline; }
.pm-detail-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.pm-detail-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.pm-detail-actions button:hover { background: var(--bg); border-color: #94a3b8; }

.pm-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pm-mp-banner {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  font-size: 12.5px;
  color: #1e40af;
  line-height: 1.5;
  margin-bottom: 4px;
}
.pm-mp-banner-icon { flex-shrink: 0; font-size: 14px; line-height: 1.2; }
.pm-mp-banner b { color: #1e3a8a; font-weight: 700; }

.pm-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-url-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.pm-url-input {
  flex: 1;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  outline: none;
  color: var(--text);
  min-width: 0;
}
.pm-url-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.pm-url-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s, color .12s, border-color .12s;
}
.pm-url-icon-btn:hover { background: var(--bg); color: var(--text); }
.pm-url-icon-btn.is-danger:hover { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }
.pm-url-icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.pm-url-icon-btn[disabled]:hover { background: #fff; color: var(--muted); border-color: var(--border); }

.pm-add-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: background .12s, border-color .12s, color .12s;
}
.pm-add-link:hover { background: #f8fafc; border-color: #94a3b8; }
.pm-add-link-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.pm-add-link-count { font-size: 11px; color: var(--muted); }

/* ---- Validation Banner ---- */
.pm-validation-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1.5px solid var(--danger);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
  flex-shrink: 0;
  animation: pm-banner-slide 0.22s ease-out;
}
.pm-validation-banner[hidden] { display: none !important; }
@keyframes pm-banner-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pm-validation-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.pm-validation-content {
  flex: 1;
  min-width: 0;
}
.pm-validation-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.pm-validation-body {
  font-size: 12.5px;
  color: #7f1d1d;
  line-height: 1.55;
}
.pm-validation-body .pm-vb-row {
  display: flex;
  gap: 6px;
  margin-top: 3px;
  align-items: baseline;
}
.pm-validation-body .pm-vb-label {
  font-weight: 600;
  color: #991b1b;
  flex-shrink: 0;
  min-width: 110px;
}
.pm-validation-body code {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, Menlo, Monaco, monospace;
  font-size: 11.5px;
  color: #1e293b;
  word-break: break-all;
}
.pm-validation-body code.pm-vb-good {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
.pm-validation-body .pm-vb-example {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #fecaca;
  color: #991b1b;
}
.pm-validation-body .pm-vb-example .pm-vb-label { min-width: auto; }
.pm-validation-close {
  background: transparent;
  border: none;
  color: #991b1b;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.pm-validation-close:hover { background: rgba(153, 27, 27, 0.08); }

/* Zorunlu alan eksik/hatalıysa input kırmızı çerçeve — ad & SKU (.pm-input) +
   PT linki (.field-input). pmShowValidationBanner focusEl'e .pm-input-invalid ekler. */
#product-modal .pm-input.pm-input-invalid,
#product-modal .field-input.pm-input-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* ---- Footer ---- */
#product-modal .pm-footer {
  padding: 12px 18px;
  align-items: center;
  flex-shrink: 0;
}
.pm-footer-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text);
}
.pm-footer-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pm-footer-counter b {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pm-footer-right { display: flex; gap: 8px; }
#product-modal .pm-footer .btn-primary {
  padding: 9px 18px;
  font-weight: 600;
  border-radius: 8px;
}
#product-modal .pm-footer .btn-secondary {
  padding: 9px 16px;
  border-radius: 8px;
}

/* PT card kompaktlaştırma (sol panel için) */
#product-modal .pm-pt-card.pt-modal-field-wrap {
  padding: 10px 12px 12px;
  border-radius: 9px;
}
#product-modal .pm-pt-card .pt-modal-label {
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#product-modal .pm-pt-card .pt-modal-input {
  padding: 8px 11px;
  font-size: 12.5px;
  border-radius: 7px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---- Butonlar ---- */
.btn-primary {
  padding: 7px 14px; background: var(--primary); color: #fff;
  border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
  font-family: inherit; white-space: nowrap; transition: background .15s;
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  padding: 7px 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  font-size: 13px; font-family: inherit; white-space: nowrap;
}
.btn-secondary:hover { background: var(--bg); }
.btn-export-products {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 13px; background: #f0fdf4; color: #166534;
  border: 1px solid #86efac; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 0 rgba(22,101,52,.06);
}
.btn-export-products:hover {
  background: #dcfce7; border-color: #22c55e; color: #14532d;
  box-shadow: 0 2px 8px rgba(22,101,52,.10);
}
.btn-export-products:disabled {
  opacity: .58; cursor: not-allowed; box-shadow: none;
}
.btn-export-products svg { flex-shrink: 0; }
.btn-export-prices {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 13px; background: #eff6ff; color: #1e40af;
  border: 1px solid #93c5fd; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 0 rgba(30,64,175,.06);
}
.btn-export-prices:hover {
  background: #dbeafe; border-color: #3b82f6; color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30,64,175,.10);
}
.btn-export-prices:disabled {
  opacity: .58; cursor: not-allowed; box-shadow: none;
}
.btn-export-prices svg { flex-shrink: 0; }
.btn-danger {
  padding: 7px 14px; background: #fee2e2; color: var(--danger);
  border: 1px solid #fca5a5; border-radius: 6px; cursor: pointer; font-size: 13px;
  font-family: inherit;
}
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.file-label { cursor: pointer; }

/* ---- Alanlar ---- */
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field-hint  { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.field-input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
}
.field-input:focus { border-color: var(--accent); }
select.field-input { background: var(--surface); color: var(--text); cursor: pointer; }
select.field-input:focus { border-color: var(--accent); outline: none; }

/* ---- Shared ---- */
.empty-state { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 16px; line-height: 1.6; }
.empty-state.centered { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ---- Scan Log ---- */
.scan-log-list    { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.scan-log-empty   { font-size: 12px; color: var(--muted); padding: 12px 0; }
.scan-log-entry   { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.pt-scan-log-entry { border-color: #f59e0b55 !important; background: rgba(255,255,255,.7) !important; }
.pt-scan-log-entry.has-errors .scan-log-header:hover { background: #fef9c3 !important; }
.scan-log-header  { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12px; flex-wrap: wrap; }
.scan-log-entry.has-errors .scan-log-header { cursor: pointer; }
.scan-log-entry.has-errors .scan-log-header:hover { background: #f1f5f9; }
.scan-log-date    { font-weight: 600; color: var(--text); white-space: nowrap; }
.scan-log-meta    { color: var(--muted); flex: 1; }
.scan-log-status  { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.scan-log-status.ok      { background: #dcfce7; color: #15803d; }
.scan-log-status.warn    { background: #fef9c3; color: #92400e; }
.scan-log-status.running { background: #e0f2fe; color: #0369a1; }
.scan-log-arrow   { font-size: 10px; color: var(--muted); transition: transform .2s; }
.scan-log-entry.open .scan-log-arrow { transform: rotate(90deg); }
.scan-log-body    { display: none; border-top: 1px solid var(--border); padding: 8px 12px; }
.scan-log-entry.open .scan-log-body { display: block; }
.scan-log-table   { width: 100%; border-collapse: collapse; font-size: 11px; }
.scan-log-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.scan-log-table td { padding: 4px 6px; color: var(--text); vertical-align: top; word-break: break-all; }
.scan-log-table tr:nth-child(even) td { background: #f8fafc; }
.scan-log-link    { color: var(--accent); text-decoration: none; }
.scan-log-link:hover { text-decoration: underline; }
.err-badge         { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.err-badge.timeout  { background: #fee2e2; color: #b91c1c; }
.err-badge.redirect { background: #fef3c7; color: #92400e; }
.err-badge.selector { background: #e0e7ff; color: #3730a3; }
.err-badge.script       { background: #f1f5f9; color: #475569; }
.err-badge.out-of-stock { background: #fce7f3; color: #9d174d; }
.err-badge.blocked      { background: #fee2e2; color: #b91c1c; }
.err-badge.cf-challenge { background: #ede9fe; color: #6d28d9; }
.err-badge.server-error { background: #ffedd5; color: #c2410c; }
.err-badge.network      { background: #fef2f2; color: #991b1b; }
.err-badge.not-found    { background: #f1f5f9; color: #475569; }
.err-badge.stale-url    { background: #fae8ff; color: #86198f; }

/* Gürgençler bulk feed kaynağı — scan-log link hücresinde fake URL yerine EAN gösterimi */
.scan-bulk-source { color: #475569; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-bulk-source em { color: #94a3b8; font-style: normal; font-weight: 500; margin-left: 4px; }

/* --- Tarama hata satırı: expand-able detay paneli --- */
/* Hem basit liste (.scan-log-table) hem detay modal (.sd-table) için */
.scan-log-table tr.err-row.has-detail,
.sd-table tr.err-row.has-detail { cursor: pointer; }
.scan-log-table tr.err-row.has-detail:hover td,
.sd-table tr.err-row.has-detail:hover td { background: #eef2ff; }
.scan-log-table tr.err-row.has-detail.open td,
.sd-table tr.err-row.has-detail.open td { background: #e0e7ff; }
.err-arrow { display: inline-block; font-size: 10px; color: var(--muted); margin-right: 4px; transition: transform .15s; }
.scan-log-table tr.err-row.open .err-arrow,
.sd-table tr.err-row.open .err-arrow { transform: rotate(90deg); }

.scan-log-table tr.err-detail-row td,
.sd-table tr.err-detail-row td { background: #f8fafc !important; padding: 8px 10px; }
.err-detail-panel {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: var(--text);
  border-left: 3px solid #c7d2fe; padding: 4px 10px;
  background: #fff;
}
.err-detail-row-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.err-detail-key {
  flex: 0 0 80px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em; font-size: 10px;
}
.err-detail-val { flex: 1; word-break: break-word; }
.err-detail-val.err-http {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace; font-weight: 700;
}
.err-http.err-http-ok   { background: #dcfce7; color: #166534; }
.err-http.err-http-warn { background: #fef3c7; color: #92400e; }
.err-http.err-http-err  { background: #fee2e2; color: #b91c1c; }
.err-final-url {
  color: var(--accent); text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px;
}
.err-final-url:hover { text-decoration: underline; }
.err-snippet {
  display: block; max-height: 90px; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px;
  background: #f1f5f9; padding: 4px 6px; border-radius: 4px;
  color: #334155; white-space: pre-wrap;
}
.err-raw {
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px;
  color: #b91c1c; word-break: break-all;
}

/* "Muhtemel Sebep" — selector hatasının alt-tipini gösterir, en üstte dikkat çekici */
.err-detail-reason-line {
  background: #fff7ed; border-left: 3px solid #f59e0b;
  margin: -4px -10px 6px; padding: 6px 10px;
  border-radius: 0 4px 4px 0;
}
.err-detail-reason-line .err-detail-key { color: #b45309; }
.err-reason { font-weight: 500; color: #92400e; font-size: 11px; }
/* Code-spesifik renkler — kullanıcı tek bakışta kategori ayırt etsin */
.err-reason-silent_bot       { color: #6d28d9; }
.err-detail-reason-line:has(.err-reason-silent_bot) { background: #f5f3ff; border-left-color: #8b5cf6; }
.err-detail-reason-line:has(.err-reason-silent_bot) .err-detail-key { color: #6d28d9; }

.err-reason-empty            { color: #475569; }
.err-detail-reason-line:has(.err-reason-empty) { background: #f8fafc; border-left-color: #94a3b8; }
.err-detail-reason-line:has(.err-reason-empty) .err-detail-key { color: #475569; }

.err-reason-soft_oos         { color: #9d174d; }
.err-detail-reason-line:has(.err-reason-soft_oos) { background: #fdf2f8; border-left-color: #ec4899; }
.err-detail-reason-line:has(.err-reason-soft_oos) .err-detail-key { color: #9d174d; }

.err-reason-page_404         { color: #475569; }
.err-detail-reason-line:has(.err-reason-page_404) { background: #f1f5f9; border-left-color: #64748b; }
.err-detail-reason-line:has(.err-reason-page_404) .err-detail-key { color: #475569; }

.err-reason-http_abnormal    { color: #b91c1c; }
.err-detail-reason-line:has(.err-reason-http_abnormal) { background: #fef2f2; border-left-color: #ef4444; }
.err-detail-reason-line:has(.err-reason-http_abnormal) .err-detail-key { color: #b91c1c; }

/* =============================================
   PT.com.tr — Selector Listesi (Ayarlar)
   ============================================= */

.pt-selector-item {
  border: 2px solid #C8A400 !important;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
  box-shadow: 0 0 0 1px #f59e0b22, 0 2px 8px #C8A40018;
  margin-bottom: 10px;
  overflow: hidden;
}
.pt-selector-crown-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}
.pt-sel-crown {
  font-size: 18px;
  color: #C8A400;
  line-height: 1;
  flex-shrink: 0;
}
.pt-sel-brand-name {
  font-size: 14px;
  font-weight: 800;
  color: #92400e;
}
.pt-sel-special-badge {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(90deg, #C8A400, #f59e0b);
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: .04em;
}
.pt-sel-sub {
  font-size: 11px;
  color: #92400e;
  opacity: .75;
}

/* =============================================
   PT.com.tr — Ürün Modal URL Alanı
   ============================================= */

.pt-modal-field-wrap {
  margin-top: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
  border: 2px solid #C8A400;
  border-radius: 10px;
  padding: 12px 14px 14px;
  box-shadow: 0 0 0 1px #f59e0b18;
}
.pt-modal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px !important;
}
.pt-modal-crown {
  font-size: 16px;
  color: #C8A400;
  line-height: 1;
}
.pt-modal-required {
  font-size: 10px;
  font-weight: 700;
  background: #C8A400;
  color: #fff;
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: .03em;
}
.pt-modal-input {
  border-color: #C8A400 !important;
  background: #fff !important;
}
.pt-modal-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px #C8A40030 !important;
  border-color: #b8940a !important;
}

/* =============================================
   PT.com.tr — Scan Panel Alt Sayfası
   ============================================= */

/* Navigasyon butonu (Ana → PT) */
.scan-pt-divider {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11px; margin-top: 2px;
}
.scan-pt-divider::before, .scan-pt-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.scan-pt-nav-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #C8A400;
  color: #92400e;
  font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-family: inherit;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 1px 4px #C8A40018;
}
.scan-pt-nav-btn:hover { background: linear-gradient(135deg, #fef3c7, #fde68a); box-shadow: 0 2px 8px #C8A40030; }
.scan-pt-nav-crown { font-size: 14px; color: #C8A400; }
.scan-pt-nav-arrow { font-size: 16px; color: #C8A400; margin-left: auto; font-weight: 400; }

/* PT Alt Sayfa Container */
.scan-pt-view {
  display: flex; flex-direction: column; gap: 8px;
}

/* PT Başlık Satırı */
.scan-pt-view-header {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 0 6px;
  border-bottom: 1.5px solid #f59e0b44;
  margin-bottom: 2px;
}
.scan-pt-back-btn {
  background: rgba(200,164,0,.15); border: 1px solid #C8A40040;
  color: #92400e; font-size: 13px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.scan-pt-back-btn:hover { background: rgba(200,164,0,.28); }
.scan-pt-view-title {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 800; color: #92400e; flex: 1;
}
.scan-pt-view-crown { font-size: 15px; color: #C8A400; }
.scan-pt-view-badge {
  font-size: 9px; font-weight: 800;
  background: linear-gradient(90deg, #C8A400, #f59e0b);
  color: #fff; padding: 2px 6px; border-radius: 7px; letter-spacing: .05em;
}

/* PT Aksiyonlar */
.scan-pt-actions { display: flex; flex-direction: column; gap: 8px; }

/* PT "görselleri de güncelle" opt-in — PT-altın aksanlı toggle pill (manuel +
   ana Hızlı Tarama + planlı tarama ortak). Bare checkbox yerine uygulamanın
   toggle-switch bileşeniyle entegre, panele yakışan opsiyon kartı. */
.scan-img-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  max-width: 460px;
  padding: 10px 14px 10px 11px;
  border-radius: 12px;
  border: 1px solid #eee2bd;
  background: linear-gradient(180deg, #fffefb 0%, #fdf9ee 100%);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.scan-img-toggle:hover {
  border-color: #e0cd86;
  box-shadow: 0 3px 10px rgba(200, 164, 0, .10);
}
.scan-img-toggle:active { transform: translateY(1px); }
.scan-img-toggle-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fbefc6;
  color: #a9871b;
}
.scan-img-toggle-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.scan-img-toggle-text strong {
  font-size: 13px;
  font-weight: 650;
  color: #4f4218;
  letter-spacing: -.1px;
  white-space: nowrap;
}
.scan-img-toggle-text small {
  font-size: 11px;
  color: #a08d57;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Toggle her zaman sağ kenara yaslı — dar formu (planlı tarama) düzgün doldurur. */
.scan-img-toggle .scan-img-toggle-switch { margin-left: auto; }
/* PT temalı: checked'te global yeşil yerine PT-altın. */
.scan-img-toggle .scan-img-toggle-switch input:checked + .toggle-slider { background: #C8A400; }
.scan-job-images-row { margin-top: 10px; }

.scan-pt-btn-all {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #C8A400, #f59e0b);
  border: none; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 9px 14px; border-radius: 8px;
  cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 2px 8px #C8A40030;
}
.scan-pt-btn-all:hover   { opacity: .9; }
.scan-pt-btn-all:active  { transform: scale(.98); }
.scan-pt-btn-all:disabled { opacity: .55; cursor: not-allowed; }

.scan-pt-sep {
  display: flex; align-items: center; gap: 8px;
  color: #92400e; font-size: 11px; opacity: .6;
}
.scan-pt-sep::before, .scan-pt-sep::after {
  content: ''; flex: 1; height: 1px; background: #C8A40050;
}

.scan-pt-search-wrap {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #C8A40060;
  border-radius: 7px; padding: 0 8px;
}
.scan-pt-search-wrap svg { color: #92400e; flex-shrink: 0; }
.scan-pt-search-input {
  border: none; outline: none; background: transparent;
  font-size: 12px; color: var(--text);
  padding: 6px 0; width: 100%; font-family: inherit;
}

.scan-pt-product-list {
  max-height: 130px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}

.scan-pt-btn-sel {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #92400e; border: none; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: opacity .15s;
}
.scan-pt-btn-sel:hover    { opacity: .88; }
.scan-pt-btn-sel:disabled { opacity: .4; cursor: not-allowed; }
.scan-pt-sel-count {
  background: rgba(255,255,255,.25);
  border-radius: 10px; padding: 1px 7px; font-size: 11px;
}
.scan-group-box-pt {
  grid-template-columns: 1fr auto;
}
.scan-pt-group-select {
  border-color: #C8A40060;
}
.scan-pt-group-select:focus { border-color: #C8A400; }
.scan-pt-btn-group {
  padding: 0 12px;
  border: 1px solid #C8A40080;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  white-space: nowrap;
}
.scan-pt-btn-group:not(:disabled):hover { background: #fef3c7; border-color: #C8A400; }
.scan-pt-btn-group:disabled { opacity: .45; cursor: not-allowed; }

/* PT İlerleme */
.scan-pt-progress { display: flex; flex-direction: column; gap: 6px; }
.scan-pt-progress-label { font-size: 12px; font-weight: 700; color: #92400e; }
.scan-pt-progress-bar-wrap {
  height: 6px; background: rgba(200,164,0,.2); border-radius: 10px; overflow: hidden;
}
.scan-pt-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #C8A400, #f59e0b);
  border-radius: 10px; transition: width .4s ease;
}
.scan-pt-progress-stats { font-size: 11px; color: #92400e; opacity: .8; }
.scan-pt-stop-btn {
  align-self: flex-start; background: #92400e; border: none; color: #fff;
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border-radius: 6px; cursor: pointer; font-family: inherit; transition: opacity .15s;
}
.scan-pt-stop-btn:hover    { opacity: .85; }
.scan-pt-stop-btn:disabled { opacity: .5; cursor: not-allowed; }
.err-badge.out-of-stock { background: #ffedd5; color: #c2410c; }

/* ============================================
   Tarama Sayfası
   ============================================ */

#tab-scan {
  flex-direction: column;
  overflow: hidden;
  background: #f2f4f8;
}
.scan-page-shell {
  flex: 1;
  overflow-y: auto;
  padding: 28px 38px 40px;
}
.scan-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.scan-page-head h1 {
  color: #202124;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}
.scan-page-head p {
  margin-top: 14px;
  color: #858995;
  font-size: 19px;
  line-height: 1.35;
}
.scan-page-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.scan-stat-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #536174;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.scan-stat-pill span {
  color: #172033;
  font-weight: 850;
}
.scan-stat-pt {
  border-color: #f4cf6a;
  background: #fffbeb;
  color: #92400e;
}
.scan-page-card {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15,23,42,.06);
  padding: 26px 30px;
  margin-bottom: 24px;
}
.scan-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.scan-section-head h2,
.scan-tool-head h2 {
  color: #202124;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}
.scan-section-head p {
  margin-top: 6px;
  color: #818895;
  font-size: 14px;
  line-height: 1.45;
}
.scan-kind-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef2f7;
  border: 1px solid #dce4ef;
  border-radius: 8px;
}
.scan-kind-btn {
  min-width: 86px;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
}
.scan-kind-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 5px rgba(15,23,42,.12);
}
.scan-page-progress {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.scan-page-progress-top,
.scan-page-progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.scan-page-progress-top {
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}
.scan-page-progress-type {
  border-radius: 99px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 10px;
  font-size: 11px;
}
.scan-page-progress-bar-wrap {
  height: 8px;
  margin-top: 10px;
  background: #dbeafe;
  border-radius: 99px;
  overflow: hidden;
}
.scan-page-progress-bar {
  height: 100%;
  background: #2563eb;
  border-radius: 99px;
  transition: width .35s ease;
}
.scan-page-progress-stats {
  justify-content: flex-start;
  margin-top: 9px;
  color: #536174;
  font-size: 12px;
}
.scan-page-stop-btn {
  margin-top: 12px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
}
.scan-page-stop-btn:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.scan-quick-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(320px, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: start;
}
.scan-quick-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.scan-primary-action,
.scan-picker-panel,
.scan-group-panel,
.scan-repeat-panel,
.scan-job-form {
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: #fbfcfe;
}
.scan-primary-action {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-color: #bdd4f8;
  background: #f5f9ff;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}
.scan-primary-action span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}
.scan-primary-action strong {
  font-size: 17px;
  line-height: 1.25;
  text-align: center;
}
.scan-primary-action:hover {
  border-color: #7fb0f0;
  background: #edf5ff;
}
.scan-quick-left .scan-primary-action {
  min-height: 168px;
  flex: 0 0 auto;
}
.scan-repeat-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}
.scan-repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #273244;
  font-size: 14px;
  font-weight: 850;
}
.scan-repeat-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scan-repeat-fields label > span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.scan-repeat-group-box {
  display: block;
}
.scan-repeat-start {
  min-height: 38px;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdd4f8;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
}
.scan-repeat-start:hover {
  border-color: #7fb0f0;
  background: #edf5ff;
}
.scan-repeat-start:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.scan-picker-panel,
.scan-group-panel,
.scan-category-panel {
  padding: 16px;
  width: 100%;
}
.scan-quick-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.scan-category-panel {
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: #fbfcfe;
}
.scan-quick-right .scan-group-panel,
.scan-quick-right .scan-category-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 18px;
}
.scan-quick-right .scan-group-panel::before,
.scan-quick-right .scan-category-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}
.scan-quick-right .scan-group-panel::before { background: #a78bfa; }
.scan-quick-right .scan-category-panel::before { background: #22d3ee; }
.scan-quick-right .scan-page-product-list,
.scan-quick-right .scan-page-group-product-list {
  height: 150px;
  flex: none;
}
.scan-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.scan-panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.scan-panel-dot-group { background: #a78bfa; }
.scan-panel-dot-category { background: #22d3ee; }
.scan-quick-right .scan-product-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 14px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}
.scan-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #273244;
  font-size: 14px;
  font-weight: 850;
}
.scan-clear-selection {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}
.scan-clear-selection:hover {
  color: var(--danger);
}
.scan-page-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
}
.scan-page-search input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  background: transparent;
}
.scan-page-product-list {
  height: 260px;
  margin-top: 10px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #fff;
  overflow-y: auto;
}
.scan-page-product-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  user-select: none;
}
.scan-page-product-row:last-child { border-bottom: none; }
.scan-page-product-row:hover { background: #f8fafc; }
.scan-page-product-row.selected { background: #eff6ff; }
.scan-page-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.scan-page-product-row.selected .scan-page-check {
  border-color: #2563eb;
  background: #2563eb;
}
.scan-page-group-product-list {
  height: 220px;
}
.scan-page-group-product-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  cursor: default;
}
.scan-page-group-product-row:hover {
  background: #fff;
}
.scan-page-group-index {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}
.scan-page-product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #263244;
  font-size: 13px;
  font-weight: 700;
}
.scan-page-product-meta {
  color: #8a94a6;
  font-size: 11px;
  white-space: nowrap;
}
.scan-secondary-action {
  min-height: 38px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #bdd4f8;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
}
.scan-secondary-action span {
  min-width: 22px;
  border-radius: 99px;
  background: #2563eb;
  color: #fff;
  padding: 2px 7px;
  font-size: 11px;
}
.scan-secondary-action:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.scan-page-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.scan-page-group-row .scan-secondary-action {
  margin-top: 0;
}
.scan-page-select {
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.scan-job-layout {
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.scan-job-form {
  padding: 18px;
}
.scan-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.scan-job-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.scan-job-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #fff;
}
.scan-job-active-row > span {
  margin: 0 !important;
  color: #263244 !important;
}
.scan-job-target-box {
  margin-bottom: 14px;
}
.scan-job-product-list {
  height: 190px;
}
.scan-job-selected-hint {
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.scan-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.scan-weekdays label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.scan-weekdays input {
  accent-color: var(--accent);
}
.scan-job-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.scan-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scan-empty-card {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 24px 16px;
  color: #7b8494;
  background: #f8fafc;
  text-align: center;
  font-size: 13px;
}
.scan-job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
}
.scan-job-card.inactive {
  opacity: .7;
}
.scan-job-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.scan-job-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0ecff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 900;
}
.scan-job-main h3 {
  color: #202124;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}
.scan-job-main p,
.scan-job-times {
  margin-top: 4px;
  color: #7b8494;
  font-size: 12px;
  line-height: 1.4;
}
.scan-job-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.scan-job-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.scan-type-badge,
.scan-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 850;
}
.scan-type-badge.normal {
  background: #e8f0fe;
  color: #1d4ed8;
}
.scan-type-badge.pt {
  background: #fef3c7;
  color: #92400e;
}
.scan-status-badge.active {
  background: #dcfce7;
  color: #15803d;
}
.scan-status-badge.passive {
  background: #f1f5f9;
  color: #64748b;
}
.scan-job-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.scan-job-buttons button,
.scan-detail-btn,
.scan-refresh-btn,
.scan-clear-log-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}
.scan-job-buttons button:hover,
.scan-detail-btn:hover,
.scan-refresh-btn:hover {
  border-color: #9bbcf0;
  color: var(--accent);
  background: #f5f9ff;
}
.scan-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.scan-clear-log-btn {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.scan-clear-log-pt {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}
.scan-history-table {
  overflow-x: auto;
}
.scan-history-head,
.scan-history-row {
  display: grid;
  grid-template-columns: 172px 172px minmax(130px, 1.05fr) minmax(126px, .95fr) 82px 112px 92px 56px 78px;
  gap: 12px;
  align-items: center;
}
.scan-history-head {
  min-height: 44px;
  padding: 0 18px;
  background: #f8fafc;
  color: #9aa3b2;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.scan-history-row {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid #eef2f7;
  color: #273244;
  font-size: 13px;
}
.scan-history-scope,
.scan-history-user {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scan-history-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.scan-history-pill.scope-all {
  background: #e0f2fe;
  color: #0369a1;
}
.scan-history-pill.scope-group {
  background: #ede9fe;
  color: #6d28d9;
}
.scan-history-pill.scope-category {
  background: #cffafe;
  color: #0e7490;
}
.scan-history-pill.scope-selected {
  background: #fef3c7;
  color: #92400e;
}
.scan-history-pill.scope-scheduled {
  background: #dcfce7;
  color: #15803d;
}
.scan-history-pill.scope-retry {
  background: #ffe4e6;
  color: #be123c;
}
.scan-history-pill.scope-unknown,
.scan-history-pill.starter-unknown {
  background: #f1f5f9;
  color: #64748b;
}
.scan-history-pill.starter-scheduled {
  background: #dcfce7;
  color: #166534;
}
.scan-history-pill.starter-extension {
  background: #e0f2fe;
  color: #075985;
}
.scan-history-pill.starter-scraper {
  background: #fae8ff;
  color: #86198f;
}
.scan-history-pill.starter-tone-0 { background: #dbeafe; color: #1d4ed8; }
.scan-history-pill.starter-tone-1 { background: #ccfbf1; color: #0f766e; }
.scan-history-pill.starter-tone-2 { background: #fce7f3; color: #be185d; }
.scan-history-pill.starter-tone-3 { background: #ffedd5; color: #c2410c; }
.scan-history-pill.starter-tone-4 { background: #e0e7ff; color: #4338ca; }
.scan-history-pill.starter-tone-5 { background: #dcfce7; color: #15803d; }
.scan-history-pill.starter-tone-6 { background: #fef9c3; color: #854d0e; }
.scan-history-pill.starter-tone-7 { background: #f3e8ff; color: #7e22ce; }
.scan-history-row:last-child {
  border-bottom: none;
}

/* ============================================
   Tarama Detay Modal
   ============================================ */
#scan-detail-modal .sd-modal {
  width: min(1180px, 96vw);
  max-width: 1180px;
  height: min(760px, 92vh);
  max-height: 92vh;
  border-radius: 14px;
  overflow: hidden;
}
.sd-header {
  align-items: flex-start;
  padding: 16px 20px 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.sd-header-left { min-width: 0; flex: 1; }
.sd-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* "Hataları Tekrarla" (2. deneme) butonu — header sağ üst, kırmızımsı vurgu. */
.sd-retry-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9px; cursor: pointer;
  background: #e11d48; color: #fff; border: 1px solid #be123c;
  font-size: 12.5px; font-weight: 700; font-family: inherit; white-space: nowrap;
  box-shadow: 0 2px 8px -2px rgba(225,29,72,.55);
  transition: background .15s ease, opacity .15s ease;
}
.sd-retry-btn:hover { background: #be123c; }
.sd-retry-btn:disabled { opacity: .6; cursor: default; }
/* 2. deneme bilgi şeridi (geri-link / bu bir retry taramasıdır) */
.sd-retry-banner {
  margin-top: 10px; padding: 8px 12px; border-radius: 9px;
  background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239;
  font-size: 12.5px; line-height: 1.5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
/* [hidden] attribute'u flex/inline-flex display'i ile override olur (CLAUDE.md gotcha)
   → explicit gizleme. Aksi halde retry taramasında buton, 0-retryable / retry-olmayan
   taramada boş banner kutusu görünür kalır. */
.sd-retry-btn[hidden], .sd-retry-banner[hidden] { display: none; }
.sd-retry-tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: #e11d48; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em;
}
.sd-retry-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #be123c; font-weight: 700; font-size: 12.5px; font-family: inherit; text-decoration: underline;
}
.sd-retry-link:hover { color: #9f1239; }
.sd-breadcrumb {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  color: #94a3b8;
  text-transform: uppercase;
}
.sd-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.sd-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}
.sd-type-badge,
.sd-status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.sd-type-badge.normal { background: #e0f2fe; color: #075985; }
.sd-type-badge.pt { background: #fef3c7; color: #92400e; }
.sd-status-badge.ok { background: #dcfce7; color: #15803d; }
.sd-status-badge.warn { background: #fef3c7; color: #92400e; }
.sd-status-badge.running { background: #dbeafe; color: #1d4ed8; }
.sd-meta-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: #64748b;
}
.sd-meta-row .sd-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.sd-meta-row .sd-meta-item b { color: #334155; font-weight: 700; }

.sd-body {
  padding: 0;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  background: #f8fafc;
  overflow: hidden;
}
.sd-side {
  padding: 16px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sd-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.sd-stat {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sd-stat-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: .04em;
}
.sd-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}
.sd-stat.is-ok .sd-stat-value { color: #15803d; }
.sd-stat.is-err .sd-stat-value { color: #b91c1c; }

.sd-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 14px;
}
.sd-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sd-chart-title {
  font-size: 12px;
  font-weight: 850;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sd-chart-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.sd-chart-body { display: flex; flex-direction: column; gap: 8px; }
.sd-chart-empty {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 14px 0;
}
.sd-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 38px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background .12s;
}
.sd-bar-row:hover { background: #f1f5f9; }
.sd-bar-row.is-active { background: #eff6ff; }
.sd-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-bar-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.sd-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 99px;
  transition: width .35s ease;
}
.sd-bar-fill.tone-0 { background: linear-gradient(90deg, #fb7185, #ef4444); }
.sd-bar-fill.tone-1 { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.sd-bar-fill.tone-2 { background: linear-gradient(90deg, #818cf8, #6366f1); }
.sd-bar-fill.tone-3 { background: linear-gradient(90deg, #34d399, #10b981); }
.sd-bar-fill.tone-4 { background: linear-gradient(90deg, #f472b6, #ec4899); }
.sd-bar-fill.tone-5 { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.sd-bar-fill.tone-6 { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.sd-bar-fill.tone-7 { background: linear-gradient(90deg, #fb923c, #f97316); }
.sd-bar-value {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-align: right;
}

.sd-main {
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.sd-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sd-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 200px;
}
.sd-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #94a3b8;
}
.sd-search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  transition: border-color .12s, background .12s;
}
.sd-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}
.sd-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: #e2e8f0;
  border-radius: 99px;
  color: #475569;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.sd-search-clear:hover { background: #cbd5e1; }
.sd-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sd-site-select {
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}
.sd-site-select:focus { outline: none; border-color: var(--accent); }
.sd-reset-btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sd-reset-btn:hover { background: #fee2e2; }

.sd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  background: #ffffff;
  color: #475569;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s;
}
.sd-chip:hover { border-color: #cbd5e1; }
.sd-chip.is-active {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}
.sd-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: #f1f5f9;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
}
.sd-chip.is-active .sd-chip-count {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.sd-result-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}
.sd-result-bar #sd-result-count { font-weight: 800; color: #334155; }
.sd-result-total { font-size: 11px; color: #94a3b8; }

.sd-table-wrap {
  flex: 1 1 0;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.sd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.sd-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}
.sd-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.sd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.sd-table tbody tr:hover td { background: #f8fafc; }
.sd-table tbody tr:last-child td { border-bottom: none; }
.sd-table .sd-product-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.sd-table .sd-link-cell a {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}
.sd-table .sd-link-cell a:hover { text-decoration: underline; }
.sd-empty {
  padding: 40px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

#scan-detail-modal[data-scan-kind="pt"] #sd-chart-sites-card,
#scan-detail-modal[data-scan-kind="pt"] #sd-site-filter,
#scan-detail-modal[data-scan-kind="pt"] .sd-table .sd-site-cell,
#scan-detail-modal[data-scan-kind="pt"] .sd-table .sd-site-th { display: none; }

@media (max-width: 980px) {
  #scan-detail-modal .sd-modal {
    width: 96vw;
    height: 94vh;
    max-height: 94vh;
  }
  .sd-body {
    grid-template-columns: 1fr;
  }
  .sd-side {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    max-height: 40vh;
  }
}

/* #tab-settings layout artık settings-shell/sidebar/main tarafından yönetiliyor */

@media (max-width: 1180px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
  .scan-quick-grid,
  .scan-job-layout {
    grid-template-columns: 1fr;
  }
  .scan-primary-action {
    min-height: 120px;
  }
}

@media (max-width: 760px) {
  .security-card-head {
    align-items: stretch;
  }
  .security-head-title,
  .security-head-btn {
    width: 100%;
  }
  .security-head-btn {
    margin-left: 0;
  }
  .security-row {
    grid-template-columns: 1fr;
  }
  .security-row-actions {
    justify-content: flex-start;
  }
  .security-modal {
    width: calc(100vw - 24px);
  }
  .security-modal-fields,
  .security-permission-grid {
    grid-template-columns: 1fr;
  }
  .security-modal-actions {
    align-items: stretch;
  }
  .security-modal-actions > button {
    flex: 1 1 120px;
  }
  .security-modal-action-spacer {
    display: none;
  }
  .scan-page-shell {
    padding: 18px 16px 28px;
  }
  .scan-page-head,
  .scan-section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .scan-page-head h1 {
    font-size: 30px;
  }
  .scan-page-head p {
    font-size: 16px;
  }
  .scan-page-stats,
  .scan-history-actions {
    justify-content: flex-start;
  }
  .scan-page-card {
    padding: 20px 18px;
  }
  .scan-form-row,
  .scan-page-group-row {
    grid-template-columns: 1fr;
  }
  .scan-history-head {
    display: none;
  }
  .scan-history-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px;
  }
  .scan-history-spacer {
    display: none;
  }
  .scan-history-row > span:first-child,
  .scan-history-row > span:last-of-type {
    grid-column: 1 / -1;
  }
  .scan-job-card {
    grid-template-columns: 1fr;
  }
  .scan-job-side {
    justify-content: flex-start;
  }
}

/* ============================================
   Link Bulma
   ============================================ */

#tab-link-bulma { flex-direction: row; overflow: hidden; }

.lb-layout { display: flex; flex: 1; overflow: hidden; gap: 0; }

/* Sidebar */
.lb-sidebar {
  width: 280px; flex-shrink: 0;
  padding: 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}

.lb-card {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.lb-option-card {
  margin-top: 10px;
  padding: 8px 10px;
}
.lb-card-head {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--primary);
}
.lb-card-body { padding: 12px; }

/* Site checkboxes */
.lb-sites-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: clamp(165px, 20vh, 210px);
  max-height: none;
  min-height: 0;
  padding: 10px 9px 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #c4d1e2 transparent;
}
.lb-sites-list::-webkit-scrollbar { width: 6px; }
.lb-sites-list::-webkit-scrollbar-thumb { background: #c4d1e2; border-radius: 999px; }
.lb-sites-list::-webkit-scrollbar-track { background: transparent; }
.lb-sites-toggle-all {
  position: sticky;
  top: -10px;
  z-index: 2;
  margin: -10px -9px 4px -10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px dashed #b9cde9;
  border-radius: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
  user-select: none;
  width: calc(100% + 19px);
}
.lb-sites-toggle-all:hover {
  border-color: #8fb8ef;
  background: #eef5ff;
  box-shadow: 0 2px 8px rgba(0,102,204,.10);
}
.lb-sites-toggle-all:focus-visible {
  outline: 2px solid rgba(0,102,204,.35);
  outline-offset: 1px;
}
.lb-sites-toggle-all[aria-pressed="false"] {
  background: #fff;
  color: #475569;
  border-style: dashed;
  border-color: #d6dde8;
}
.lb-sites-toggle-all[aria-pressed="false"] .lb-sites-toggle-icon {
  background: #eef2f7;
  border-color: #d6dde8;
  color: #94a3b8;
}
.lb-sites-toggle-all:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}
.lb-sites-toggle-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e3f0ff;
  border: 1px solid #b9cde9;
  color: var(--primary);
  flex-shrink: 0;
}
.lb-site-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  flex: 0 0 auto;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #fff;
  color: #334060;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .12s, background .12s, box-shadow .12s, color .12s, opacity .12s;
  user-select: none;
}
.lb-site-row:hover {
  border-color: #c7d4e5;
  box-shadow: 0 4px 12px rgba(15,23,42,.07);
}
.lb-site-row:has(.lb-site-check:checked) {
  background: #f5f9ff;
  border-color: #8fb8ef;
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,.08), 0 4px 12px rgba(15,23,42,.07);
}
.lb-site-row:has(.lb-site-check:not(:checked)) {
  opacity: .58;
}
.lb-site-row:has(.lb-site-check:not(:checked)):hover {
  opacity: .86;
}
.lb-site-row input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lb-site-icon-wrap {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.lb-site-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.lb-site-icon-fallback {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #e8eef7;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  align-items: center;
  justify-content: center;
}
.lb-site-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-site-dot { display: none; }

.lb-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
}
.lb-option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lb-option-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid #b6c2d1;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}
.lb-option-row input:checked + .lb-option-check {
  background: var(--accent);
  border-color: var(--accent);
}
.lb-option-row input:checked + .lb-option-check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lb-option-row:has(input:disabled) {
  opacity: .55;
  cursor: not-allowed;
}
.lb-option-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lb-option-text strong {
  font-size: 12px;
  line-height: 1.2;
  color: var(--primary);
}

/* Product list in sidebar */
.lb-btn-all {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 14px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .15s; margin-bottom: 10px;
}
.lb-btn-all:hover { background: var(--accent); }
.lb-btn-all:disabled { opacity: .55; cursor: not-allowed; }

.lb-divider {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11px; margin-bottom: 10px;
}
.lb-divider::before, .lb-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.lb-search-wrap { position: relative; margin-bottom: 8px; }
.lb-search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.lb-search-input {
  width: 100%; padding: 7px 10px 7px 28px;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 12px; font-family: inherit; background: var(--bg); color: var(--text); outline: none;
}
.lb-search-input:focus { border-color: var(--accent); }
.lb-search-input::placeholder { color: var(--muted); }

.lb-product-list {
  max-height: clamp(118px, 17vh, 155px);
  overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 10px;
}
.lb-product-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; cursor: pointer;
  border-bottom: 1px solid var(--bg);
  transition: background .1s; user-select: none;
}
.lb-product-item:last-child { border-bottom: none; }
.lb-product-item:hover { background: var(--bg); }
.lb-product-item.selected { background: #eff6ff; }
.lb-product-check {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; transition: background .1s, border-color .1s; color: #fff;
}
.lb-product-item.selected .lb-product-check { background: var(--accent); border-color: var(--accent); }
.lb-product-name { font-size: 12px; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lb-btn-sel {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 8px 14px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.lb-btn-sel:not(:disabled):hover { background: #e8f0fe; border-color: var(--accent); color: var(--accent); }
.lb-btn-sel:disabled { opacity: .5; cursor: not-allowed; }
.lb-sel-count {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

/* Progress card */
.lb-progress-card {
  margin-top: 12px; padding: 11px 13px;
  background: #f0f7ff; border: 1px solid #bfdbfe; border-radius: 10px;
}
.lb-progress-card.is-complete { background: #f0fdf4; border-color: #bbf7d0; }
.lb-progress-card.is-error { background: #fef2f2; border-color: #fecaca; }
.lb-progress-card.is-stopping { background: #fffbeb; border-color: #fde68a; }
.lb-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lb-progress-label { font-size: 12px; font-weight: 600; color: var(--primary); }
.lb-progress-card.is-complete .lb-progress-label { color: #15803d; }
.lb-progress-card.is-error .lb-progress-label { color: #b91c1c; }
.lb-progress-card.is-stopping .lb-progress-label { color: #b45309; }
.lb-progress-bar-wrap { height: 7px; background: #dbeafe; border-radius: 99px; overflow: hidden; }
.lb-progress-card.is-complete .lb-progress-bar-wrap { background: #dcfce7; }
.lb-progress-card.is-error .lb-progress-bar-wrap { background: #fee2e2; }
.lb-progress-card.is-stopping .lb-progress-bar-wrap { background: #fef3c7; }
.lb-progress-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.lb-progress-card.is-stopping .lb-progress-bar { background: #d97706; }
.lb-progress-stats { margin-top: 7px; font-size: 11px; color: var(--muted); }

/* Durdur butonu */
.lb-stop-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 4px 10px; border-radius: 7px; cursor: pointer;
  font-size: 11px; font-weight: 700;
  background: #fff; color: #b91c1c; border: 1px solid #fecaca;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.lb-stop-btn:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; color: #fff; }
.lb-stop-btn:disabled { opacity: .6; cursor: default; color: #b45309; border-color: #fde68a; background: #fffbeb; }
.lb-stop-btn svg { display: block; }

/* Main content area */
.lb-main {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 24px;
}

.lb-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.lb-section-title { font-size: 14px; font-weight: 700; color: var(--primary); }
.lb-results-summary { font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 10px; border-radius: 99px; }

.lb-clear-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 3px 10px; border-radius: 6px; font-size: 11px; cursor: pointer;
  font-family: inherit; transition: border-color .15s, color .15s;
}
.lb-clear-btn:hover { border-color: var(--danger); color: var(--danger); }

/* Product block */
.lb-prod-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin-bottom: 12px;
}
.lb-prod-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--primary);
}

/* Site block */
.lb-prod-sites { padding: 0; }
.lb-site-block { border-bottom: 1px solid var(--border); }
.lb-site-block:last-child { border-bottom: none; }
.lb-site-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #fafafa; font-size: 12px; font-weight: 600;
}
.lb-site-color-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.lb-site-name { color: var(--text); flex: 1; }

.lb-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; white-space: nowrap;
}
.lb-badge-gray  { background: #f1f5f9; color: var(--muted); }
.lb-badge-red   { background: #fef2f2; color: #b91c1c; }
.lb-badge-green { background: #f0fdf4; color: #16a34a; }

/* Link rows */
.lb-site-links { padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.lb-link-row {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.lb-link-meta { display: flex; align-items: center; gap: 8px; }
.lb-link-type {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; background: #eff6ff; color: var(--accent);
}
.lb-link-type-main { background: #fef3c7; color: #b45309; }
.lb-link-kind {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 99px; border: 1px solid transparent;
}
.lb-link-kind.hb { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.lb-link-kind.market { background: #f8fafc; color: #475569; border-color: var(--border); }
.lb-link-price {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 99px; background: #ecfdf5; color: #047857;
}
.lb-existing-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; background: #fff7ed; color: #c2410c;
  border: 1px solid #fed7aa;
}
.lb-link-url {
  font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'SF Mono', 'Fira Mono', monospace;
}
.lb-link-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lb-open-btn {
  padding: 5px 12px; background: #fff; color: var(--primary);
  border: 1px solid #bfdbfe; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.lb-open-btn:hover { border-color: var(--accent); color: var(--accent); background: #eff6ff; }

.lb-save-btn {
  padding: 5px 14px; background: var(--accent); color: #fff;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit;
  transition: background .15s;
}
.lb-save-btn:hover { background: var(--primary); }

.lb-skip-btn {
  padding: 5px 12px; background: none; color: #92400e;
  border: 1px solid #fcd34d; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-family: inherit; transition: border-color .15s, color .15s, background .15s;
}
.lb-skip-btn:hover { border-color: #f59e0b; background: #fffbeb; }

.lb-dismiss-btn {
  padding: 5px 12px; background: none; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  font-size: 12px; font-family: inherit; transition: border-color .15s, color .15s;
}
.lb-dismiss-btn:hover { border-color: #94a3b8; color: var(--text); }

/* Yoksayılan linkler paneli */
.lb-dismissed-search-wrap { padding: 8px 12px 0; }
.lb-dismissed-search {
  width: 100%; box-sizing: border-box;
  padding: 5px 10px; font-size: 12px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); outline: none;
  transition: border-color .15s;
}
.lb-dismissed-search:focus { border-color: var(--accent); }
.lb-dismissed-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.lb-dismissed-item {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.lb-dismissed-item:last-child { border-bottom: none; padding-bottom: 0; }
.lb-dismissed-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lb-dismissed-product { font-size: 11px; font-weight: 700; color: var(--text); }
.lb-dismissed-site {
  font-size: 10px; background: #f1f5f9; color: var(--muted);
  border-radius: 4px; padding: 1px 6px;
}
.lb-dismissed-url {
  font-size: 11px; color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
.lb-dismissed-url:hover { text-decoration: underline; }
.lb-undismiss-btn {
  align-self: flex-start;
  padding: 3px 10px; background: none; color: #16a34a;
  border: 1px solid #86efac; border-radius: 5px; cursor: pointer;
  font-size: 11px; font-family: inherit; transition: border-color .15s, background .15s;
}
.lb-undismiss-btn:hover { border-color: #4ade80; background: #f0fdf4; }
.lb-undismiss-btn:disabled { opacity: .5; cursor: not-allowed; }

.lb-saved-badge {
  font-size: 12px; font-weight: 600; color: #16a34a;
}

/* Confirm box */
.lb-confirm-box {
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 7px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.lb-confirm-msg { font-size: 12px; color: #c2410c; font-weight: 500; }
.lb-confirm-btns { display: flex; gap: 8px; }
.lb-confirm-yes {
  padding: 5px 14px; background: #dc2626; color: #fff;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit; transition: opacity .15s;
}
.lb-confirm-yes:hover { opacity: .85; }
.lb-confirm-no {
  padding: 5px 12px; background: none; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  font-size: 12px; font-family: inherit; transition: border-color .15s;
}
.lb-confirm-no:hover { border-color: #94a3b8; }

/* History — premium kartlar (tıklanınca detay modalı açılır) */
.lb-history-list { display: flex; flex-direction: column; gap: 8px; }
.lb-hist-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; position: relative;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.lb-hist-card::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--border);
}
.lb-hist--ok::before   { background: #22c55e; }
.lb-hist--run::before  { background: #3b82f6; }
.lb-hist--stop::before { background: #f59e0b; }
.lb-hist--err::before  { background: #ef4444; }
.lb-hist-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.lb-hist-card:active { transform: scale(.995); }
.lb-hist-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lb-hist-status {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.lb-hist-ok   { background: #f0fdf4; color: #16a34a; }
.lb-hist-run  { background: #eff6ff; color: var(--accent); }
.lb-hist-stop { background: #fffbeb; color: #d97706; }
.lb-hist-err  { background: #fef2f2; color: #b91c1c; }
.lb-hist-info { flex: 1; min-width: 0; }
.lb-hist-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.lb-hist-date { font-size: 12.5px; font-weight: 700; color: var(--text); }
.lb-hist-badge { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .02em; }
.lb-hist-badge-ok   { background: #dcfce7; color: #15803d; }
.lb-hist-badge-run  { background: #dbeafe; color: #1d4ed8; }
.lb-hist-badge-stop { background: #fef3c7; color: #b45309; }
.lb-hist-badge-err  { background: #fee2e2; color: #b91c1c; }
.lb-hist-metrics { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); }
.lb-hist-metric b { color: var(--text); font-weight: 700; }
.lb-hist-metric-link b { color: #2563eb; }
.lb-hist-chevron { color: #cbd5e1; flex-shrink: 0; transition: color .15s, transform .15s; }
.lb-hist-card:hover .lb-hist-chevron { color: var(--accent); transform: translateX(2px); }

/* =============================================
   Link Bulma — Tarama Detay Modalı (ld-)
   ============================================= */
#lb-detail-modal .ld-modal {
  width: min(1080px, 96vw); max-width: 1080px;
  height: min(740px, 92vh); max-height: 92vh;
  border-radius: 14px; overflow: hidden;
}
.ld-header { align-items: flex-start; padding: 16px 20px 14px; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); }
.ld-header-left { min-width: 0; flex: 1; }
.ld-breadcrumb { font-size: 11px; font-weight: 850; letter-spacing: .08em; color: #94a3b8; text-transform: uppercase; }
.ld-title-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.ld-title { font-size: 18px; font-weight: 800; color: #1e293b; }
.ld-status-badge { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.ld-status-badge.ok   { background: #dcfce7; color: #15803d; }
.ld-status-badge.run  { background: #dbeafe; color: #1d4ed8; }
.ld-status-badge.stop { background: #fef3c7; color: #b45309; }
.ld-status-badge.err  { background: #fee2e2; color: #b91c1c; }
.ld-meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: #64748b; }
.ld-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.ld-meta-item b { color: #334155; font-weight: 700; }

.ld-body { display: flex; gap: 0; padding: 0; overflow: hidden; }
.ld-side { width: 290px; flex-shrink: 0; padding: 16px; border-right: 1px solid var(--border); overflow-y: auto; background: #fafbfc; display: flex; flex-direction: column; gap: 14px; }
.ld-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 14px 16px; }

.ld-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ld-stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 8px; text-align: center; }
.ld-stat-label { display: block; font-size: 10px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .02em; }
.ld-stat-value { display: block; font-size: 20px; font-weight: 800; color: #334155; margin-top: 2px; }
.ld-stat.is-found .ld-stat-value { color: #16a34a; }
.ld-stat.is-err .ld-stat-value { color: #b91c1c; }

.ld-card { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; }
.ld-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.ld-card-title { font-size: 12px; font-weight: 750; color: #334155; }
.ld-card-sub { font-size: 11px; color: #94a3b8; font-weight: 600; }
.ld-chart-body { display: flex; flex-direction: column; gap: 7px; }
.ld-chart-empty { font-size: 11.5px; color: #94a3b8; text-align: center; padding: 6px 0; }
.ld-bar-row { display: flex; align-items: center; gap: 8px; }
.ld-bar-label { width: 78px; flex-shrink: 0; font-size: 11px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-bar-track { flex: 1; height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.ld-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 99px; }
.ld-bar-val { width: 22px; flex-shrink: 0; text-align: right; font-size: 11px; font-weight: 700; color: #2563eb; }

.ld-firm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ld-firm-chip { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.ld-firm-chip.has-found { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ld-firm-chip.has-err { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.ld-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ld-search { position: relative; flex: 1; min-width: 160px; }
.ld-search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.ld-search-input { width: 100%; padding: 7px 28px 7px 30px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.ld-search-input:focus { outline: none; border-color: var(--accent); }
.ld-search-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; }
.ld-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ld-chip { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: #fff; color: #64748b; border: 1px solid var(--border); cursor: pointer; transition: all .12s; }
.ld-chip:hover { border-color: #cbd5e1; }
.ld-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.ld-result-bar { font-size: 11px; color: #94a3b8; font-weight: 600; margin-bottom: 8px; }
.ld-product-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding-right: 2px; }
/* Kartlar flex-column'da ezilmesin (30+ ürün listeyi taşırınca flex-shrink default
   1 ile 7px'e çöküyordu) → flex-shrink:0, liste overflow ile kayar. */
.ld-product { flex-shrink: 0; }
.ld-empty { padding: 28px 12px; text-align: center; font-size: 12.5px; color: #94a3b8; }
.ld-product { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.ld-product-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.ld-product-name { font-size: 12.5px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-product-summary { display: flex; gap: 6px; flex-shrink: 0; }
.ld-ps-found, .ld-ps-err, .ld-ps-none { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.ld-ps-found { background: #dcfce7; color: #15803d; }
.ld-ps-err { background: #fee2e2; color: #b91c1c; }
.ld-ps-none { background: #f1f5f9; color: #94a3b8; }
.ld-site-results { display: flex; flex-direction: column; }
.ld-sr { display: flex; align-items: flex-start; gap: 10px; padding: 7px 12px; border-top: 1px solid #f1f5f9; }
.ld-sr:first-child { border-top: none; }
.ld-sr-firm { width: 110px; flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: #475569; position: relative; padding-left: 12px; }
.ld-sr-firm::before { content: ''; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; }
.ld-sr-found .ld-sr-firm::before { background: #22c55e; }
.ld-sr-error .ld-sr-firm::before { background: #ef4444; }
.ld-sr-nf .ld-sr-firm::before { background: #cbd5e1; }
.ld-sr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ld-sr-link { font-size: 11.5px; color: #2563eb; text-decoration: none; word-break: break-all; }
.ld-sr-link:hover { text-decoration: underline; }
.ld-sr-seller { font-size: 10px; color: #94a3b8; font-weight: 600; }
.ld-sr-muted { font-size: 11.5px; color: #94a3b8; }
.ld-sr-errbadge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #fef2f2; color: #b91c1c; }

@media (max-width: 720px) {
  .ld-body { flex-direction: column; }
  .ld-side { width: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

.lb-empty { padding: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.lb-history-empty { padding: 20px; }

.lb-group-divider { margin: 10px 0; }
.lb-group-scan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}
.lb-group-select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.lb-group-select:focus { border-color: var(--accent); }
.lb-btn-group {
  padding: 0 12px;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
}
.lb-btn-group:not(:disabled):hover { border-color: var(--accent); color: var(--accent); background: #e8f0fe; }
.lb-btn-group:disabled { opacity: .48; cursor: not-allowed; }

/* ============================================
   Gruplar
   ============================================ */

#tab-groups {
  flex-direction: column;
  overflow: hidden;
  background: #f2f3f8;
}
.groups-shell {
  flex: 1;
  overflow-y: auto;
  padding: 28px 34px 40px;
}
.groups-view {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}
.groups-toolbar,
.group-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.groups-heading h1,
.group-detail-heading h1 {
  color: #202124;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}
.groups-heading p,
.group-detail-heading p {
  margin-top: 14px;
  color: #8b8e96;
  font-size: 20px;
  line-height: 1.35;
}
.groups-create-btn,
.group-add-product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 650;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(22,163,74,.18);
}
.groups-create-btn:hover,
.group-add-product-btn:hover { background: #15803d; }
.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 32px;
}
.group-card {
  position: relative;
  min-height: 248px;
  padding: 42px 40px 40px;
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.group-card-actions {
  position: absolute;
  top: 34px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.group-icon-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #b8bbc4;
  cursor: pointer;
  padding: 0;
}
.group-icon-btn:not(:disabled):hover { color: var(--primary); }
.group-icon-btn:disabled { cursor: not-allowed; opacity: .42; }
.group-share-btn:not(:disabled) { color: #64748b; }
.group-share-btn:not(:disabled):hover { color: #2563eb; }
.group-delete-card:not(:disabled):hover { color: var(--danger); }
.group-card h2 {
  max-width: calc(100% - 120px);
  color: #202124;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}
.group-owner-badge,
.group-owner-line {
  margin-top: 10px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
}
.group-share-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}
.group-card p {
  min-height: 64px;
  margin-top: 16px;
  color: #a3a6ad;
  font-size: 20px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.group-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
  color: #a7aab2;
  font-size: 18px;
  font-weight: 650;
}
.group-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.group-view-btn {
  width: 100%;
  min-height: 66px;
  margin-top: 28px;
  border: none;
  border-radius: 10px;
  background: #2f66e8;
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  font-weight: 500;
  font-family: inherit;
}
.group-view-btn:hover { background: #2458d6; }
.groups-empty {
  padding: 28px;
  color: #8b8e96;
  font-size: 16px;
  text-align: center;
}
.groups-empty strong,
.groups-empty span {
  display: block;
}
.groups-empty strong {
  margin-bottom: 8px;
  color: #202124;
  font-size: 20px;
}
.groups-empty-large {
  grid-column: 1 / -1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
}

.group-detail-top {
  align-items: center;
  margin-bottom: 44px;
}
.group-back-btn {
  width: 34px;
  height: 44px;
  border: none;
  background: transparent;
  color: #b2b5bd;
  cursor: pointer;
  font-size: 48px;
  line-height: 1;
  font-family: inherit;
}
.group-back-btn:hover { color: #202124; }
.group-detail-heading {
  flex: 1;
  min-width: 0;
}
.group-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.group-delete-selected-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
}
.group-delete-selected-btn:hover { background: #dc2626; }
.group-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 44px;
}
.group-stat-card {
  min-height: 132px;
  padding: 34px 34px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,.07);
}
.group-stat-icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.group-stat-card span {
  display: block;
  color: #a0a3aa;
  font-size: 22px;
  font-weight: 650;
  margin-bottom: 8px;
}
.group-stat-card strong {
  color: #202124;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}
.group-stat-blue .group-stat-icon { background: #dbeafe; color: #2563eb; }
.group-stat-green .group-stat-icon { background: #dcfce7; color: #16a34a; }
.group-stat-purple .group-stat-icon { background: #f3e8ff; color: #9333ea; }

.group-products-panel {
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.07);
}
.group-products-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
  border-bottom: 1px solid #dfe3eb;
}
.group-products-head h2 {
  color: #202124;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
}
.group-products-head span {
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
}
.group-products-list {
  display: flex;
  flex-direction: column;
}
.group-product-row {
  min-height: 160px;
  display: grid;
  grid-template-columns: 24px 18px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 28px 34px;
  border-bottom: 1px solid #e6e9ef;
  cursor: pointer;
  transition: background .12s;
}
.group-product-row:last-child { border-bottom: none; }
.group-product-row:hover,
.group-product-row.selected { background: #f8fbff; }
.group-product-row.readonly {
  cursor: default;
}
.group-product-row.readonly:hover {
  background: #fff;
}
.group-product-row.readonly .group-product-check {
  opacity: .38;
  cursor: not-allowed;
}
.group-product-row.readonly .group-product-drag {
  visibility: hidden;
}
.group-product-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid #a9adb5;
  border-radius: 4px;
  background: #fff;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.group-product-row.selected .group-product-check {
  background: #2f66e8;
  border-color: #2f66e8;
}
.group-product-drag {
  color: #c0c3cb;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-2px);
}
.group-product-index {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.group-product-info {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
/* PT ürün görseli — grup/sıralama satırlarında ismin SOLUNda küçük thumbnail. */
.group-product-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6e9ef;
}
.group-product-info-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.group-product-info strong {
  color: #202124;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-product-info span {
  color: #a5a8af;
  font-size: 20px;
  font-weight: 500;
}
.group-product-price {
  color: #16a34a;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}
.group-products-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.group-desc-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}
.group-form-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}
.group-share-modal-card {
  width: min(560px, calc(100vw - 28px));
}
.group-share-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}
.group-share-note strong,
.group-share-note span {
  display: block;
}
.group-share-note span {
  margin-top: 4px;
  color: #64748b;
}
.group-share-user-list {
  max-height: 48vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.group-share-user {
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.group-share-user:hover,
.group-share-user.selected {
  border-color: #93c5fd;
  background: #eff6ff;
}
.group-share-user input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.group-share-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.group-share-user.selected .group-share-check {
  border-color: #2563eb;
  background: #2563eb;
}
.group-share-user-main {
  min-width: 0;
}
.group-share-user-main strong,
.group-share-user-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-share-user-main strong {
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
}
.group-share-user-main small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}
.group-product-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.group-product-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.group-product-search-wrap input {
  padding-left: 38px;
}
.group-product-picker-list {
  max-height: 52vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.group-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg);
  cursor: pointer;
  transition: background .12s;
}
.group-picker-row > div { flex: 1; }
/* "Gruba Ürün Ekle" seçicisinde checkbox ile isim arasında küçük thumbnail. */
.group-picker-thumb {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.group-picker-row:last-child { border-bottom: none; }
.group-picker-row:hover,
.group-picker-row.selected { background: #eff6ff; }
.group-picker-check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.group-picker-row.selected .group-picker-check {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.25 4.5 6.75 11 3.5 7.75' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.group-picker-row > div {
  min-width: 0;
}
.group-picker-row > div > strong,
.group-picker-row > div > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-picker-row > div > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.group-picker-row > div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
#group-products-modal-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#group-products-add-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .groups-grid,
  .group-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .group-stat-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .groups-shell {
    padding: 18px 16px 28px;
  }
  .groups-toolbar,
  .group-detail-top {
    flex-direction: column;
    align-items: stretch;
  }
  .groups-grid,
  .group-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .group-stat-card:last-child {
    grid-column: auto;
  }
  .group-card {
    padding: 34px 24px 28px;
  }
  .group-card-actions {
    right: 22px;
    top: 26px;
    gap: 14px;
  }
  .group-card h2 {
    max-width: calc(100% - 100px);
    font-size: 24px;
  }
  .group-card p,
  .groups-heading p,
  .group-detail-heading p {
    font-size: 16px;
  }
  .group-view-btn {
    min-height: 54px;
    font-size: 20px;
  }
  .group-product-row {
    grid-template-columns: 24px 38px minmax(0, 1fr);
    gap: 14px;
    min-height: 118px;
    padding: 22px 20px;
  }
  .group-product-drag {
    display: none;
  }
  .group-product-price {
    grid-column: 3;
    justify-self: start;
    font-size: 16px;
  }
  .group-product-info strong {
    font-size: 18px;
    white-space: normal;
  }
  .group-product-info span {
    font-size: 15px;
  }
}

/* ===== Audit Log Panel ===== */
.btn-danger-outline {
  padding: 6px 12px; background: none; color: var(--danger);
  border: 1px solid #fca5a5; border-radius: 6px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: background 0.15s;
}
.btn-danger-outline:hover { background: #fee2e2; }
.audit-panel-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1100;
}
.audit-panel {
  position: fixed; top: 0; right: 0; width: min(680px, 100vw); height: 100vh;
  background: var(--surface, #fff); border-left: 1px solid var(--border, #e2e8f0);
  z-index: 1101; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15); animation: auditSlideIn 0.25s ease;
}
@keyframes auditSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
.audit-panel-header {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border, #e2e8f0);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
}
.audit-panel-title { display: flex; align-items: center; gap: 12px; }
.audit-panel-icon { font-size: 28px; line-height: 1; }
.audit-panel-title h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text, #111); }
.audit-panel-title p  { margin: 2px 0 0; font-size: 13px; color: var(--muted, #64748b); }
.audit-panel-actions  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audit-filter-group   { display: flex; gap: 8px; }
.audit-filter-select,
.audit-filter-input {
  padding: 6px 10px; border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px; font-size: 13px; background: var(--surface, #fff);
  color: var(--text, #111); font-family: inherit;
}
.audit-filter-input { width: 160px; }
.audit-close-btn {
  background: none; border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
  padding: 6px 10px; cursor: pointer; font-size: 16px; color: var(--muted, #64748b);
  transition: all 0.15s;
}
.audit-close-btn:hover { background: var(--bg, #f1f5f9); color: var(--text, #111); }
.audit-panel-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.audit-log-list   { display: flex; flex-direction: column; gap: 10px; }
.audit-loading,
.audit-empty {
  text-align: center; padding: 48px 24px; color: var(--muted, #64748b); font-size: 14px;
}
.audit-entry {
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  padding: 14px 16px; background: var(--surface, #fff); transition: box-shadow 0.15s;
}
.audit-entry:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.audit-entry.is-restored { opacity: 0.65; border-style: dashed; }
.audit-entry-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.audit-entry-left { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.audit-action-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.audit-action-badge.action-create_product { background: #dcfce7; color: #166534; }
.audit-action-badge.action-delete_product { background: #fee2e2; color: #991b1b; }
.audit-action-badge.action-update_product { background: #dbeafe; color: #1e40af; }
.audit-action-badge.action-delete_link    { background: #fef3c7; color: #92400e; }
.audit-action-badge.action-add_link       { background: #ede9fe; color: #5b21b6; }
.audit-entry-info { min-width: 0; }
.audit-product-name {
  font-weight: 600; font-size: 14px; color: var(--text, #111);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
}
.audit-entry-detail { font-size: 12px; color: var(--muted, #64748b); margin-top: 2px; }
.audit-entry-detail a { color: var(--accent, #0066CC); text-decoration: none; word-break: break-all; }
.audit-entry-detail em { color: #94a3b8; font-style: italic; }
.audit-bulk-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  vertical-align: middle;
}
.audit-bulk-detail {
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  border: 1px solid #ede9fe;
  border-radius: 7px;
  padding: 8px 10px;
  margin-top: 4px;
}
.audit-bulk-headline { font-size: 12.5px; color: #1f2937; }
.audit-bulk-count {
  display: inline-block;
  padding: 1px 8px;
  background: #ede9fe; color: #5b21b6;
  font-weight: 700;
  border-radius: 10px;
}
.audit-bulk-dist {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 5px;
  font-size: 11px; color: #64748b;
}
.audit-bulk-dist-chip {
  padding: 1px 7px;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 10.5px; color: #475569;
}
.audit-bulk-dist-chip b { color: #1e293b; font-weight: 700; }
.audit-bulk-samples {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-top: 4px;
  font-size: 11px; color: #64748b;
}
.audit-bulk-samples-label { font-weight: 700; color: #94a3b8; font-size: 10px; letter-spacing: .4px; }
.audit-bulk-sample-chip {
  padding: 1px 7px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  color: #475569; font-size: 10.5px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audit-bulk-more {
  font-size: 10.5px; font-weight: 600; color: #8b5cf6;
}
.audit-entry-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.audit-user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg, #f1f5f9); border-radius: 20px;
  padding: 2px 8px; font-size: 11px; color: var(--text, #374151);
}
.audit-user-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent, #0066CC); color: #fff;
  font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.audit-role-chip {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 20px; font-size: 11px; background: #e0f2fe; color: #0369a1;
}
.audit-time { font-size: 11px; color: var(--muted, #64748b); margin-left: auto; }
.audit-entry-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.audit-btn-restore {
  padding: 5px 12px; background: #10b981; color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600;
  transition: background 0.15s; font-family: inherit;
}
.audit-btn-restore:hover { background: #059669; }
.audit-btn-delete {
  padding: 5px 10px; background: none; color: var(--muted, #64748b);
  border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
  cursor: pointer; font-size: 12px; transition: all 0.15s; font-family: inherit;
}
.audit-btn-delete:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.audit-restored-tag {
  font-size: 11px; color: #10b981; display: flex; align-items: center; gap: 4px;
}

/* ---- Dashboard Sıralama Kartı ---- */
.group-card.dashboard-order-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
}
.group-card.dashboard-order-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(99,102,241,.18) 0%, transparent 65%);
  pointer-events: none;
}
.group-card.dashboard-order-card h2 {
  color: #f1f5f9;
  max-width: calc(100% - 20px);
}
.group-card.dashboard-order-card p {
  color: #94a3b8;
}
.dashboard-order-card-icon {
  margin-bottom: 20px;
  color: #818cf8;
}
.dashboard-order-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99,102,241,.18);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  width: max-content;
}
.group-card.dashboard-order-card .group-view-btn.dashboard-order-view-btn {
  background: #4f46e5;
}
.group-card.dashboard-order-card .group-view-btn.dashboard-order-view-btn:hover {
  background: #4338ca;
}

/* ---- Sıralamayı Kaydet Butonu ---- */
.group-save-order-btn {
  padding: 0 24px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition: background .15s;
  white-space: nowrap;
}
.group-save-order-btn:hover:not(:disabled) { background: #4338ca; }
.group-save-order-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Dashboard Sıralama Drag-and-Drop ---- */
.dashboard-order-row {
  grid-template-columns: 18px 46px minmax(0, 1fr) auto;
  cursor: grab;
  user-select: none;
}
.dashboard-order-row:active { cursor: grabbing; }
.dashboard-order-drag-handle {
  color: #9ca3af;
  font-size: 28px;
  line-height: 1;
  cursor: grab;
}
.dashboard-order-row.dd-dragging {
  opacity: .35;
  background: #f0f4ff;
}
.dashboard-order-row.dd-over-before {
  border-top: 2px solid #4f46e5;
}
.dashboard-order-row.dd-over-after {
  border-bottom: 2px solid #4f46e5;
}

.dashboard-order-row {
  min-height: 68px;
}

/* ---- Dashboard Order: Çoklu Seçim ---- */
.dashboard-order-row {
  transition: background .12s, box-shadow .12s;
  position: relative;
}
.dashboard-order-row.dd-selected {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5, 0 0 0 1px #c7d2fe inset;
}
.dashboard-order-row.dd-selected .group-product-index {
  background: #4f46e5;
  color: #fff;
  transition: background .12s, color .12s;
}
.dashboard-order-row.dd-selected .group-product-drag {
  color: #6366f1;
}
.dashboard-order-row.dd-selected strong {
  color: #3730a3;
}

/* Ghost badge: birden fazla öğe sürüklenirken gösterilir */
.dd-ghost-badge {
  position: fixed;
  top: -200px;
  left: 0;
  padding: 10px 22px;
  background: #4f46e5;
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .45);
  pointer-events: none;
  z-index: 9999;
}

/* ---- Dashboard Order: Oto Sıralama Select ---- */
.dashboard-sort-select {
  display: block;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1.5px solid #ddd6fe;
  border-radius: 8px;
  background: #faf5ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  width: 100%;
  max-width: 220px;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c3aed' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.dashboard-sort-select:focus { border-color: #7c3aed; background-color: #f3e8ff; }
#group-stat-sort-card .group-stat-icon { align-self: flex-start; margin-top: 2px; }

/* ---- Kaydet Butonu Animasyonları ---- */
.group-save-order-btn.save-order-loading {
  background: #6366f1;
  cursor: wait;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.group-save-order-btn.save-order-success {
  background: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: save-btn-pop .3s cubic-bezier(.34,1.56,.64,1);
}
.group-save-order-btn.save-order-success:hover { background: #059669; }
@keyframes save-btn-pop {
  0%   { transform: scale(.94); }
  100% { transform: scale(1); }
}
.save-order-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Sıralama Kaydedildi Toast ---- */
.order-save-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(16,185,129,.15), 0 2px 8px rgba(0,0,0,.08);
  z-index: 9999;
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  min-width: 300px;
}
.order-save-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.order-save-toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-save-toast-body strong {
  display: block;
  color: #065f46;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.order-save-toast-body span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-top: 2px;
}

/* ---- Grup sıralama drag handle ---- */
.grp-drag-handle {
  cursor: grab;
  color: #9ca3af;
  transition: color .12s;
}
.grp-draggable:hover .grp-drag-handle { color: #6366f1; }
.grp-draggable { cursor: grab; transition: background .12s, box-shadow .12s; }
.grp-draggable:active { cursor: grabbing; }
.grp-draggable.dd-dragging { opacity: .35; background: #f0f4ff; }

/* Seçim vurgusu — dashboard order ile aynı mor tema */
.grp-draggable.dd-selected {
  background: #eef2ff !important;
  box-shadow: inset 3px 0 0 #4f46e5, 0 0 0 1px #c7d2fe inset;
}
.grp-draggable.dd-selected .group-product-index {
  background: #4f46e5;
  color: #fff;
  transition: background .12s, color .12s;
}
.grp-draggable.dd-selected .group-product-drag { color: #6366f1; }
.grp-draggable.dd-selected strong { color: #3730a3; }

/* Bırakma noktası göstergesi */
.grp-draggable.dd-over-before { border-top: 2px solid #4f46e5; }
.grp-draggable.dd-over-after  { border-bottom: 2px solid #4f46e5; }

/* ============================================================ */
/* ---- FİYAT UYARILARI (Price Alerts) ---- */
/* ============================================================ */
.pa-shell {
  flex: 1;
  overflow-y: auto;
  padding: 28px 34px 40px;
}
.pa-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 28px;
  max-width: 1680px;
}
.pa-heading h1 {
  color: #202124;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
}
.pa-heading p {
  margin-top: 10px;
  max-width: 700px;
  color: #8b8e96;
  font-size: 15px;
  line-height: 1.45;
}
.pa-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37,99,235,.18);
}
.pa-create-btn:hover { background: #1d4ed8; }
.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  max-width: 1680px;
  margin: 0 auto;
}
.pa-empty {
  grid-column: 1 / -1;
  padding: 40px 28px;
  background: #fff;
  border: 1px dashed #dfe3eb;
  border-radius: 12px;
  color: #6b7280;
  font-size: 15px;
  text-align: center;
}
.pa-empty-icon { font-size: 36px; margin-bottom: 10px; }
.pa-empty-title { font-size: 17px; font-weight: 700; color: #202124; }
.pa-empty-desc  { margin-top: 4px; }
.pa-card {
  background: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .15s, border-color .15s;
}
.pa-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 14px rgba(37,99,235,.08);
}
.pa-card-inactive { opacity: .6; }
.pa-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pa-card-title {
  flex: 1;
  font-size: 18px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.25;
}
.pa-card-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  letter-spacing: .3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pa-card-status--active { background: #dcfce7; color: #166534; }
.pa-card-status--active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74,.5);
  animation: pa-status-pulse 1.8s ease-out infinite;
}
.pa-card-status--inactive {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.pa-card-status--inactive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
}
@keyframes pa-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70%  { box-shadow: 0 0 0 5px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
/* Pasif kart soluksallaştırması — ama "Pasif" rozeti net görünür kalsın */
.pa-card-inactive { opacity: .72; }
.pa-card-inactive .pa-card-status--inactive { opacity: 1; }

/* Tip rozeti (Fiyat / Stok) — title row üstünde küçük chip */
.pa-card-title-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pa-card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .25px;
  align-self: flex-start;
  border: 1px solid transparent;
}
.pa-card-type--price {
  background: linear-gradient(135deg,#eef2ff 0%,#e0e7ff 100%);
  color: #4338ca;
  border-color: #c7d2fe;
}
.pa-card-type--stock {
  background: linear-gradient(135deg,#fff7ed 0%,#ffedd5 100%);
  color: #9a3412;
  border-color: #fed7aa;
}
.pa-card-type--opportunity {
  background: linear-gradient(135deg,#ecfdf5 0%,#d1fae5 100%);
  color: #065f46;
  border-color: #a7f3d0;
}
.pa-card-threshold--stock {
  color: #9a3412;
  font-weight: 600;
}
.pa-card-threshold--opportunity {
  color: #065f46;
  font-weight: 600;
}

/* Toggle butonu — hover'da pasifleştir kırmızı, aktifleştir yeşil */
.pa-btn-toggle {
  position: relative;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.pa-btn-toggle:hover { transform: translateY(-1px); }
.pa-btn-toggle:active { transform: translateY(0); }
.pa-btn-toggle--deactivate:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 4px 12px rgba(220,38,38,.18);
}
.pa-btn-toggle--activate {
  color: #15803d !important;
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
}
.pa-btn-toggle--activate:hover {
  background: #dcfce7 !important;
  color: #14532d !important;
  border-color: #86efac !important;
  box-shadow: 0 4px 12px rgba(22,163,74,.18);
}
.pa-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}
.pa-card-meta strong { color: #0f172a; }
.pa-card-owner {
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  padding: 4px 9px;
  border-radius: 999px;
  align-self: flex-start;
}
.pa-card-products {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}
.pa-card-products-count {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 650;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.pa-card-products-sample {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pa-card-products-sample li {
  font-size: 13px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.pa-card-products-sample li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* Fiyat uyarı kartında ürün örneği — minik thumbnail. */
.pa-sample-thumb {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e6e9ef;
}
.pa-card-products-more { color: #6366f1 !important; font-weight: 600; }
.pa-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.pa-card-actions button {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
}
.pa-btn-delete { color: #dc2626 !important; }
.pa-btn-delete:hover { background: #fef2f2 !important; }

/* Manuel "Var Olan Bilgilerle Tetikle" satırı — diğer aksiyonların altında ince ayrı satır */
.pa-card-trigger-row {
  display: flex;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.pa-btn-trigger {
  flex: 1;
  appearance: none;
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.pa-btn-trigger:hover:not(:disabled) {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fcd34d;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px -2px rgba(217, 119, 6, .25);
}
.pa-btn-trigger:active:not(:disabled) { transform: translateY(0); }
.pa-btn-trigger:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}
.pa-btn-trigger-icon { font-size: 14px; line-height: 1; }

/* ============================================================ */
/* PA Modal — Modern redesign                                   */
/* ============================================================ */
.pa-modal-card {
  width: min(720px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 56px -16px rgba(15,23,42,.30), 0 4px 12px rgba(15,23,42,.08);
  background: #fff;
  border: 1px solid #e6ebf3;
}
/* Geniş mod — ürün seçici + facet filtreleri ferah dursun */
.pa-modal-card--wide {
  width: min(880px, 96vw);
}
.pa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}
.pa-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.pa-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
  color: #1d4ed8;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}
.pa-modal-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pa-modal-title {
  font-size: 17px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.pa-modal-subtitle {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.3;
}
.pa-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #94a3b8;
  background: #fff;
  border: 1px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.pa-modal-close:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}
.pa-modal-body {
  padding: 18px 22px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fbfcfe;
}
.pa-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.pa-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pa-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.005em;
}
.pa-section-title svg { color: #475569; flex-shrink: 0; }
.pa-section-tag {
  font-size: 11px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  letter-spacing: .2px;
  white-space: nowrap;
}
.pa-section-tag--accent {
  background: #eff6ff;
  color: #1d4ed8;
}
.pa-section-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 12px;
  align-items: end;
}
.pa-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pa-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  /* TL/% toggle 22px yüksekliğinde — basit label'lı alanlarla aynı satıra geldiğinde
     input'lar baseline'da hizalansın diye min-height. */
  min-height: 22px;
  letter-spacing: .01em;
}
.pa-field-suffix {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: .04em;
}
/* Eşik birimi (TL/%) segmented toggle — label içinde kompakt */
.pa-tt-segment {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px;
  margin-left: 2px;
  height: 22px;
}
.pa-tt-opt {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: .04em;
  line-height: 1;
  height: 18px;
  display: inline-flex;
  align-items: center;
  transition: background .15s, color .15s, box-shadow .15s;
}
.pa-tt-opt:hover:not(.is-active) { color: #475569; }
.pa-tt-opt.is-active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.pa-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d6dde7;
  border-radius: 9px;
  background: #fff;
  font-size: 13.5px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pa-input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.pa-input::placeholder { color: #a8b1bf; }
select.pa-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
.pa-section-hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

/* Uyarı tipi segment control (Fiyat / Stok) */
.pa-type-section { gap: 12px; }
.pa-type-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .pa-type-segment { grid-template-columns: 1fr; }
}
.pa-type-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
  position: relative;
}
.pa-type-option:hover:not(.is-active) {
  border-color: #c7d2fe;
  background: #f8fafc;
  transform: translateY(-1px);
}
.pa-type-option.is-active {
  border-color: #2563eb;
  background: linear-gradient(135deg,#eff6ff 0%,#fff 100%);
  box-shadow: 0 4px 12px rgba(37,99,235,.12);
}
.pa-type-option[data-alert-type="stock"].is-active {
  border-color: #ea580c;
  background: linear-gradient(135deg,#fff7ed 0%,#fff 100%);
  box-shadow: 0 4px 12px rgba(234,88,12,.14);
}
.pa-type-option[data-alert-type="opportunity"].is-active {
  border-color: #059669;
  background: linear-gradient(135deg,#ecfdf5 0%,#fff 100%);
  box-shadow: 0 4px 12px rgba(5,150,105,.14);
}
.pa-type-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  flex-shrink: 0;
}
.pa-type-option.is-active .pa-type-icon { background: #dbeafe; }
.pa-type-option[data-alert-type="stock"].is-active .pa-type-icon { background: #ffedd5; }
.pa-type-option[data-alert-type="opportunity"].is-active .pa-type-icon { background: #d1fae5; }
.pa-type-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pa-type-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.005em;
}
.pa-type-text small {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.3;
}

/* Stok modunda eşik gizli olduğunda grid tek kolon */
.pa-basic-grid--single { grid-template-columns: 1fr !important; }

/* Group picker section */
.pa-group-snapshot-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #4c1d95;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}
.pa-group-snapshot-note svg {
  margin-top: 1px;
  flex-shrink: 0;
  color: #7c3aed;
}
.pa-group-snapshot-note strong { color: #5b21b6; font-weight: 700; }
.pa-group-applied-hint {
  font-size: 12px;
  font-weight: 650;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .25s ease, padding .25s ease, opacity .2s ease;
}
.pa-group-applied-hint--show {
  max-height: 60px;
  padding: 9px 12px;
  opacity: 1;
}

/* Picker toolbar */
.pa-picker-toolbar {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pa-product-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pa-product-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.pa-product-search-wrap .pa-input { padding-left: 36px; }
.pa-select-all-btn {
  white-space: nowrap;
  padding: 0 14px;
  height: 38px;
  font-size: 12.5px;
  font-weight: 650;
  font-family: inherit;
  background: #fff;
  border: 1px solid #d6dde7;
  border-radius: 9px;
  color: #334155;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pa-select-all-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* ---- Facet filtre pill'leri (Kategori / Alt Kategori / İşlemci / İnç) ---- */
.pa-facet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pa-facet {
  position: relative;
}
.pa-facet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: #334155;
  background: #fff;
  border: 1px solid #d6dde7;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.pa-facet-pill:hover {
  background: #f8fafc;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.pa-facet.has-active .pa-facet-pill {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.pa-facet-pill:active { transform: translateY(1px); }
.pa-facet.is-open .pa-facet-pill {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.pa-facet-pill-text {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pa-facet-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 750;
  color: #fff;
  background: #2563eb;
  border-radius: 999px;
}
.pa-facet-caret {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform .18s;
}
.pa-facet.is-open .pa-facet-caret { transform: rotate(180deg); }
.pa-facet-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 268px;
  max-width: 80vw;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(15,23,42,.28), 0 4px 10px rgba(15,23,42,.08);
  overflow: hidden;
}
.pa-facet.is-open .pa-facet-panel {
  display: block;
  transform-origin: top left;
  animation: paFacetPop .16s cubic-bezier(.16, .84, .44, 1);
}
@keyframes paFacetPop {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .pa-facet.is-open .pa-facet-panel { animation: none; }
  .pa-facet-caret { transition: none; }
}
.pa-facet-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}
.pa-facet-clear-one {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.pa-facet-clear-one:hover { text-decoration: underline; }
.pa-facet-opts {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}
.pa-facet-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  font-size: 13px;
  color: #1f2937;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
}
.pa-facet-opt:hover { background: #eff6ff; }
.pa-facet-opt input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}
.pa-facet-opt-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pa-facet-opt-count {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 650;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 1px 7px;
}
.pa-facet-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #94a3b8;
}
.pa-facet-clear-all {
  height: 36px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  color: #b91c1c;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.pa-facet-clear-all:hover { background: #fef2f2; border-color: #f87171; }

/* Picker list */
.pa-product-picker-list {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  background: #fbfcfe;
}
.pa-picker-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1f2937;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  transition: background .12s;
}
.pa-picker-item:last-child { border-bottom: none; }
.pa-picker-item:hover { background: #eff6ff; }
.pa-picker-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}
.pa-picker-name { flex: 1; min-width: 0; }
/* Fiyat uyarı ürün seçicide checkbox ile isim arasında küçük thumbnail. */
.pa-picker-thumb {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e6ebf3;
}
.pa-picker-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* Form error */
.pa-form-error {
  margin: 4px 2px 0;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 600;
  min-height: 18px;
}

/* Footer & buttons */
.pa-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}
.pa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.pa-btn:active { transform: translateY(1px); }
.pa-btn-secondary {
  background: #fff;
  border: 1px solid #d6dde7;
  color: #334155;
}
.pa-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.pa-btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.pa-btn-primary:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 12px rgba(37,99,235,.32);
}

/* Mobile / responsive */
@media (max-width: 560px) {
  .pa-modal-card { width: min(720px, 96vw); border-radius: 14px; }
  .pa-modal-body { padding: 14px 14px 6px; gap: 12px; }
  .pa-modal-header { padding: 14px 16px; }
  .pa-modal-footer { padding: 12px 14px; }
  .pa-section { padding: 13px 13px 12px; }
  .pa-section-grid { grid-template-columns: 1fr; gap: 10px; }
  .pa-modal-icon { width: 36px; height: 36px; }
}

/* ============================================================ */
/* ---- MAİL AYARLARI (Settings sekmesi) ---- */
/* ============================================================ */
.mail-settings-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 8px;
}
.mail-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.mail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}
.mail-field input[type=text],
.mail-field input[type=email],
.mail-field input[type=password],
.mail-field input[type=number] {
  padding: 9px 12px;
}
.mail-field-hint {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.4;
}
.mail-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: max-content;
}
.mail-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mail-switch-ui {
  width: 38px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background .15s;
}
.mail-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.mail-switch input:checked + .mail-switch-ui { background: #2563eb; }
.mail-switch input:checked + .mail-switch-ui::after { transform: translateX(16px); }

.mail-settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.mail-test-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.mail-test-row input { min-width: 240px; padding: 9px 12px; }
.mail-settings-status {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  min-height: 20px;
}
.mail-settings-status-ok { color: #16a34a; }
.mail-settings-status-error { color: #dc2626; }

/* ---- Mail Geçmişi Tablo ---- */
.mail-log-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
}
.mail-log-table-wrap { overflow-x: auto; }
.mail-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mail-log-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.mail-log-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1f2937;
  vertical-align: top;
}
.mail-log-table tbody tr:last-child td { border-bottom: none; }
.mail-log-table .ml-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.mail-log-table .ml-center { text-align: center; font-weight: 700; }
.mail-log-empty {
  text-align: center !important;
  color: #94a3b8 !important;
  padding: 28px !important;
}
.ml-status {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}
.ml-status-ok   { background: #dcfce7; color: #166534; }
.ml-status-fail { background: #fee2e2; color: #991b1b; cursor: help; }
.ml-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .2px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ml-type--price {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.ml-type--stock {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.ml-type--opportunity {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.ml-type--support {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.ml-preview-btn,
.ml-resend-btn,
.ml-talep-btn { padding: 5px 10px !important; font-size: 12px !important; }
.ml-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 6px;
}
.ml-resend-btn {
  color: #2563eb !important;
  border-color: #c7d2fe !important;
}
.ml-resend-btn:hover:not(:disabled) {
  background: #eef2ff !important;
}
.ml-resend-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.ml-resent-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  vertical-align: 1px;
}

/* Mail Önizleme Modal — geniş layout, ferah görünüm */
.mail-preview-card {
  width: min(1280px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.mail-preview-card .modal-body {
  overflow-y: auto;
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mail-preview-meta {
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 24px;
}
.mail-preview-meta > div { min-width: 0; }
.mail-preview-meta strong { color: #0f172a; margin-right: 6px; }
.mail-preview-meta .ml-error-line {
  grid-column: 1 / -1;
  color: #dc2626;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #fecaca;
}
.mail-preview-frame {
  flex: 1;
  width: 100%;
  min-height: 640px;
  height: 70vh;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 900px) {
  .pa-grid { grid-template-columns: 1fr; }
  .mail-settings-grid { grid-template-columns: 1fr; }
  .mail-test-row { margin-left: 0; width: 100%; }
  .mail-test-row input { min-width: 0; flex: 1; }
}

/* ====== Rol Yetkileri (Roles Overview Matrix) ====== */
.roles-overview-card {
  margin-top: 28px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.roles-overview-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.roles-overview-icon-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
}
.roles-overview-head-text h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.roles-overview-head-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.roles-overview-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.roles-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 720px;
}
.roles-overview-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}
.roles-overview-table thead th.roles-overview-role-cell,
.roles-overview-table tbody td.roles-overview-role-cell {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 180px;
  max-width: 240px;
  border-right: 1px solid var(--border);
}
.roles-overview-table thead th.roles-overview-role-cell {
  background: #f8fafc;
}
.roles-overview-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}
.roles-overview-table tbody tr:last-child td {
  border-bottom: none;
}
.roles-overview-table tbody tr:hover td {
  background: #fafafa;
}
.roles-overview-table tbody tr:hover td.roles-overview-role-cell {
  background: #f5f7fb;
}
.roles-overview-role-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.roles-overview-role-id {
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.roles-overview-sys-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  letter-spacing: 0.2px;
}
.roles-overview-cell.on {
  color: #047857;
}
.roles-overview-cell.off {
  color: #cbd5e1;
}
.roles-overview-tick {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d1fae5;
  color: #047857;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.roles-overview-dash {
  display: inline-block;
  font-size: 16px;
  color: #cbd5e1;
  line-height: 1;
}
.roles-overview-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ====== Toast ====== */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #fff;
  color: #0f172a;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  font-weight: 500;
  min-width: 240px;
  max-width: 380px;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}
.toast.toast-in {
  transform: translateX(0);
  opacity: 1;
}
.toast.toast-out {
  transform: translateX(120%);
  opacity: 0;
}
.toast.toast-success { border-left-color: #10b981; }
.toast.toast-error   { border-left-color: #ef4444; }
.toast.toast-warning { border-left-color: #f59e0b; }
.toast.toast-info    { border-left-color: #3b82f6; }

/* Self badge & lock hint */
.security-row-self-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}
.security-row-hint {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #94a3b8;
  cursor: help;
  padding: 0 4px;
}
.user-role-hint {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: #92400e;
  background: #fef3c7;
  padding: 5px 8px;
  border-radius: 6px;
}

/* Hide role-id by default in matrix (show as title tooltip) */
.roles-overview-role-id {
  display: none;
}

/* ====== Confirm Modal ====== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}
.confirm-overlay.open {
  display: flex;
  animation: confirm-fade 0.15s ease-out;
}
.confirm-modal {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px 20px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.confirm-msg {
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 18px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.confirm-actions button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
@keyframes confirm-fade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   ===== TOPBAR USER CHIP + DROPDOWN MENU =====================
   ============================================================ */
.user-chip-wrap {
  position: relative;
  display: inline-flex;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  max-width: 240px;
  font-family: inherit;
}
.user-chip:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}
.user-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,.55);
}
.user-chip[aria-expanded="true"] {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.22);
}

.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(135deg, #1d8cff 0%, #0066CC 50%, #00408a 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18);
  flex-shrink: 0;
  text-transform: uppercase;
}
.user-chip-avatar[data-role="admin"] {
  background: linear-gradient(135deg, #ffd24a 0%, #f5b800 45%, #e87b00 100%);
  color: #422300;
}

.user-chip-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
}
.user-chip-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip-role {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 2px;
}

.user-chip-caret {
  color: rgba(255,255,255,.6);
  transition: transform .22s ease;
  flex-shrink: 0;
}
.user-chip[aria-expanded="true"] .user-chip-caret { transform: rotate(180deg); }

/* Dropdown */
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.06);
  padding: 6px;
  z-index: 1500;
  transform-origin: top right;
  animation: user-menu-in .14s cubic-bezier(.18,.9,.32,1.1);
}
.user-menu[hidden] { display: none; }
@keyframes user-menu-in {
  from { opacity: 0; transform: scale(.94) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.user-menu-head {
  padding: 10px 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu-head-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-head-email {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .14s ease, color .14s ease;
}
.user-menu-item svg { color: var(--muted); flex-shrink: 0; }
.user-menu-item:hover { background: var(--bg); }
.user-menu-item:hover svg { color: var(--accent); }
.user-menu-item:focus-visible {
  outline: none;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px rgba(0,102,204,.4);
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.user-menu-logout:hover {
  background: rgba(220,38,38,.08);
  color: var(--danger);
}
.user-menu-logout:hover svg { color: var(--danger); }

/* ============================================================
   ===== HESAP AYARLARIM (tab-account) ========================
   ============================================================ */
.account-page {
  max-width: 920px;
  margin: 28px auto;
  padding: 0 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header card */
.account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0,102,204,.08) 0%, rgba(0,102,204,0) 55%),
    radial-gradient(ellipse at 100% 100%, rgba(29,140,255,.06) 0%, rgba(29,140,255,0) 50%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 16px rgba(15,23,42,.05);
}

.account-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1d8cff 0%, #0066CC 50%, #00408a 100%);
  box-shadow: 0 6px 18px rgba(0,102,204,.30), inset 0 2px 0 rgba(255,255,255,.18);
  flex-shrink: 0;
}
.account-avatar-lg[data-role="admin"] {
  background: linear-gradient(135deg, #ffd24a 0%, #f5b800 45%, #e87b00 100%);
  color: #4a2700;
  box-shadow: 0 6px 18px rgba(245,184,0,.32), inset 0 2px 0 rgba(255,255,255,.22);
}

.account-header-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.account-header-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.account-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.account-role-badge[data-role="admin"] {
  background: linear-gradient(135deg, #fff4cc, #ffe28a);
  color: #6b3a00;
  border-color: #f5cf66;
}
.account-email {
  font-size: 13px;
  color: var(--muted);
}
.account-header-since {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Grid */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

/* Cards */
.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px 18px;
  box-shadow: 0 2px 10px rgba(15,23,42,.04);
  display: flex;
  flex-direction: column;
}
.account-card-head {
  margin-bottom: 16px;
}
.account-card-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}
.account-card-head p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.account-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.account-field input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.account-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}
.account-field-locked input {
  background: var(--bg);
  cursor: not-allowed;
  color: var(--muted);
}
.account-lock {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.account-hint {
  font-size: 11px;
  color: var(--muted);
}

.account-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.account-form-msg {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  border-radius: 999px;
  border: 1px solid transparent;
}
.account-form-msg:empty { display: none; }
.account-form-msg.is-show { opacity: 1; transform: translateY(0) scale(1); }
.account-form-msg svg { flex-shrink: 0; }
.account-form-msg .account-form-msg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.account-form-msg.is-success {
  color: #166534;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
  padding: 5px 12px 5px 5px;
  box-shadow: 0 2px 10px rgba(34,197,94,.18);
}
.account-form-msg.is-success .account-form-msg-icon {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  box-shadow: 0 2px 6px rgba(21,128,61,.35);
}
.account-form-msg.is-show.is-success {
  animation: msg-pop-in .38s cubic-bezier(.18,.9,.32,1.1);
}

.account-form-msg.is-error {
  color: #991b1b;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #fca5a5;
  padding: 5px 12px 5px 5px;
  box-shadow: 0 2px 10px rgba(220,38,38,.18);
}
.account-form-msg.is-error .account-form-msg-icon {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 2px 6px rgba(185,28,28,.35);
}
.account-form-msg.is-show.is-error {
  animation:
    msg-pop-in .32s cubic-bezier(.18,.9,.32,1.1),
    msg-shake .42s cubic-bezier(.36,.07,.19,.97) .30s;
}

@keyframes msg-pop-in {
  0%   { opacity: 0; transform: translateY(8px) scale(.85); }
  55%  { transform: translateY(-2px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes msg-shake {
  0%, 100% { transform: translateX(0); }
  18%      { transform: translateX(-4px); }
  36%      { transform: translateX(4px); }
  54%      { transform: translateX(-3px); }
  72%      { transform: translateX(3px); }
  86%      { transform: translateX(-1px); }
}

/* Başarılı kayıt sonrası kart sınırı bir an yeşil pulse */
@keyframes card-success-pulse {
  0%   { box-shadow: 0 2px 10px rgba(15,23,42,.04), 0 0 0 0   rgba(34,197,94,0); }
  30%  { box-shadow: 0 2px 10px rgba(15,23,42,.04), 0 0 0 5px rgba(34,197,94,.20); }
  100% { box-shadow: 0 2px 10px rgba(15,23,42,.04), 0 0 0 0   rgba(34,197,94,0); }
}
.account-card.is-success-flash { animation: card-success-pulse 1.1s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .account-form-msg,
  .account-form-msg.is-show.is-success,
  .account-form-msg.is-show.is-error,
  .account-card.is-success-flash {
    animation: none !important;
    transition: opacity .15s ease !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .account-page { padding: 0 14px 30px; margin-top: 18px; gap: 16px; }
  .account-header {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
  }
  .account-header-info { align-items: center; }
  .account-header-meta { justify-content: center; }
  .account-grid { grid-template-columns: 1fr; }
  .user-chip-name { max-width: 90px; }
}

/* ============================================================
   ===== HESAP AYARLARI — SUB-NAV (Profil/Güvenlik/Tercihler) =
   ============================================================ */
.account-subnav {
  display: inline-flex;
  align-self: center;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
}
.account-subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.account-subnav-item svg { color: currentColor; flex-shrink: 0; }
.account-subnav-item:hover { color: var(--text); }
.account-subnav-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,.4);
}
.account-subnav-item.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,102,204,.18), 0 0 0 1px rgba(0,102,204,.10);
}

/* Section panel */
.account-section { display: none; }
.account-section.active { display: block; animation: account-section-in .26s ease-out; }
@keyframes account-section-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);  }
}

/* ============================================================
   ===== ŞİFRE INPUT WRAPPER + GÖZ TOGGLE =====================
   ============================================================ */
.pw-input-wrap {
  position: relative;
  display: block;
}
.pw-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color .18s ease;
}
.pw-input-wrap input {
  width: 100%;
  padding: 10px 42px 10px 36px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  letter-spacing: .04em;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pw-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,102,204,.10);
  background: #fafdff;
}
.pw-input-wrap input:focus + .pw-toggle ~ .pw-input-icon,
.pw-input-wrap:focus-within .pw-input-icon { color: var(--accent); }

.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
  font-family: inherit;
}
.pw-toggle:hover { background: rgba(0,102,204,.06); color: var(--accent); }
.pw-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,.45);
}
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.is-shown .pw-eye { display: none; }
.pw-toggle.is-shown .pw-eye-off { display: inline; }

/* ============================================================
   ===== ŞİFRE GÜÇ GÖSTERGESİ =================================
   ============================================================ */
.pw-strength {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.pw-strength-seg {
  height: 4px;
  border-radius: 4px;
  background: #e5e7eb;
  transition: background .25s ease, box-shadow .25s ease;
}
.pw-strength[data-score="0"] .pw-strength-seg { background: #e5e7eb; }
.pw-strength[data-score="1"] .pw-strength-seg:nth-child(-n+1) { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 6px rgba(239,68,68,.30); }
.pw-strength[data-score="2"] .pw-strength-seg:nth-child(-n+2) { background: linear-gradient(90deg, #f97316, #fb923c); box-shadow: 0 0 6px rgba(249,115,22,.30); }
.pw-strength[data-score="3"] .pw-strength-seg:nth-child(-n+3) { background: linear-gradient(90deg, #eab308, #facc15); box-shadow: 0 0 6px rgba(234,179,8,.30); }
.pw-strength[data-score="4"] .pw-strength-seg                  { background: linear-gradient(90deg, #16a34a, #22c55e); box-shadow: 0 0 6px rgba(34,197,94,.32); }

.pw-strength-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.pw-strength-label[data-score="1"] { color: #b91c1c; }
.pw-strength-label[data-score="2"] { color: #c2410c; }
.pw-strength-label[data-score="3"] { color: #a16207; }
.pw-strength-label[data-score="4"] { color: #15803d; }

/* ============================================================
   ===== TERCİHLER — SELECT + TOGGLE SWITCH ===================
   ============================================================ */
.account-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")
    no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.account-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,102,204,.10);
}

/* ============================================================
   ===== TERCİHLER — VARSAYILAN FİRMA SEÇİCİ =================
   ============================================================ */
.prefs-firms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
  padding: 4px 0 2px;
}
.prefs-firm-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  user-select: none;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
}
.prefs-firm-chip:hover {
  border-color: #c7d4e5;
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.prefs-firm-chip:active {
  transform: scale(.98);
}
.prefs-firm-chip:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,.18);
}
.prefs-firm-chip.is-selected {
  background: #f5f9ff;
  border-color: #8fb8ef;
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,.10), 0 4px 12px rgba(15,23,42,.06);
}
.prefs-firm-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #eef2f7;
}
.prefs-firm-chip.is-selected .prefs-firm-icon-wrap {
  background: #fff;
  border-color: #d6e4f7;
}
.prefs-firm-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.prefs-firm-icon-fallback {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #e8eef7;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prefs-firm-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prefs-firm-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid #cdd6e3;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.prefs-firm-chip.is-selected .prefs-firm-check {
  background: var(--primary, #0066cc);
  border-color: var(--primary, #0066cc);
  color: #fff;
}

.prefs-firms-clear {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .12s ease;
}
.prefs-firms-clear:hover {
  color: var(--primary, #0066cc);
}
.prefs-firms-clear[hidden] { display: none; }

.prefs-firms-loading {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  background: var(--bg);
}

/* Mobile düzenleme */
@media (max-width: 640px) {
  .account-subnav {
    align-self: stretch;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .account-subnav-item span { display: none; }
  .account-subnav-item { padding: 8px 12px; }
  .prefs-firms-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 6px;
  }
  .prefs-firm-chip {
    padding: 9px 12px;
    font-size: 12.5px;
  }
}

/* ============================================================
   ANASAYFA — Claude Design uyarlaması
   ============================================================ */

#tab-home {
  flex-direction: column;
  overflow: hidden;
  background: #fafbfd;
}
.home-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 32px;
  scroll-behavior: smooth;
}

/* Anasayfa veri yükleme hatası banner'ı */
.home-error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
}
.home-error-banner[hidden] { display: none; }
.home-error-icon { font-size: 18px; }
.home-error-text { flex: 1; }
.home-error-retry {
  background: #664d03;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.home-error-retry:hover { background: #553f02; }
.home-scroll > section + section,
.home-scroll > section + .home-row,
.home-scroll > .home-row + section,
.home-scroll > .home-row + .home-row {
  margin-top: 14px;
}
.home-scroll::-webkit-scrollbar { width: 10px; }
.home-scroll::-webkit-scrollbar-thumb {
  background: #d8dfe9; border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box;
}
.home-scroll::-webkit-scrollbar-thumb:hover { background: #c1cbd9; background-clip: padding-box; }

@keyframes home-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#tab-home.home-rendered .home-scroll > section,
#tab-home.home-rendered .home-scroll > .home-row {
  animation: home-fade-in .38s cubic-bezier(.2,.8,.2,1) both;
}
#tab-home.home-rendered .home-scroll > *:nth-child(1) { animation-delay: .00s; }
#tab-home.home-rendered .home-scroll > *:nth-child(2) { animation-delay: .04s; }
#tab-home.home-rendered .home-scroll > *:nth-child(3) { animation-delay: .08s; }
#tab-home.home-rendered .home-scroll > *:nth-child(4) { animation-delay: .12s; }
#tab-home.home-rendered .home-scroll > *:nth-child(5) { animation-delay: .16s; }
#tab-home.home-rendered .home-scroll > *:nth-child(6) { animation-delay: .20s; }

/* ---- Hero (italic serif, çok sade) ---- */
.home-hero {
  padding: 6px 4px 4px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.home-hero-title {
  font-size: 22px;
  font-weight: 400;
  color: #1f2937;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.home-hero-prefix {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: #1f2937;
  margin-right: 8px;
}
.home-hero-name {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
  color: #0f172a;
}

/* ---- KPI grid ---- */
.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.home-kpi {
  background: var(--surface);
  border: 1px solid #e7edf6;
  border-radius: 12px;
  padding: 14px 16px 14px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 4px 12px -8px rgba(15,23,42,.10);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.home-kpi:hover {
  transform: translateY(-2px);
  border-color: #d6e0ee;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 14px 26px -16px rgba(15,23,42,.20);
}
/* Conditional tint: avantaj %50+ ise yeşil, %50- ise kırmızı arka plan */
.home-kpi-advantage.is-good {
  background: linear-gradient(180deg, #effaf2 0%, #fafefb 70%);
  border-color: #c8e9d4;
}
.home-kpi-advantage.is-bad {
  background: linear-gradient(180deg, #fef2f0 0%, #fffafa 70%);
  border-color: #f0c7c0;
}
.home-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.home-kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b7e96;
  letter-spacing: .04em;
}
.home-kpi-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
}
.home-kpi-pill.is-pos { background: #e6f7ee; color: #0a8a4a; }
.home-kpi-pill.is-neg { background: #fde6e2; color: #c4351a; }
.home-kpi-pill.is-warn { background: #fff3df; color: #c97a00; }
.home-kpi-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.home-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.home-kpi-advantage.is-good .home-kpi-value { color: #0a8a4a; }
.home-kpi-advantage.is-bad .home-kpi-value { color: #c4351a; }
.home-kpi-unit {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.home-kpi-foot {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  color: #64748b;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-kpi-foot b { color: #0f172a; font-weight: 700; }
.home-kpi-spark {
  margin-top: 8px;
  height: 28px;
}
.home-kpi-spark svg { width: 100%; height: 100%; display: block; }

/* ---- Genel kart ---- */
.home-card {
  background: var(--surface);
  border: 1px solid #e7edf6;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 4px 12px -10px rgba(15,23,42,.10);
}
.home-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.home-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: .005em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: none;
}
.home-card-title-icon { color: #94a3b8; }
.home-card-title-icon-good { color: #16a34a; }
.home-card-title-icon-bad  { color: #ef4444; }
.home-position-card .home-card-title,
.home-kpi-label {
  letter-spacing: .04em;
  text-transform: uppercase;
}
.home-card-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 550;
}
.home-card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-link-btn {
  background: transparent;
  border: none;
  color: #0066cc;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: inherit;
  transition: background-color .15s ease, transform .12s ease;
}
.home-link-btn:hover { background: #eaf2fc; }
.home-link-btn:active { transform: scale(.96); }

/* Pill */
.home-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.home-pill:hover { color: #0f172a; background: #f1f5f9; }
.home-pill:active { transform: scale(.96); }
.home-pill.active {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.home-empty {
  padding: 18px 12px;
  color: #94a3b8;
  text-align: center;
  font-size: 11.5px;
  font-weight: 550;
}

/* ---- Row layouts ---- */
.home-row { display: grid; gap: 12px; }
.home-row-2col { grid-template-columns: 1.6fr 1fr; }
.home-movers-row { grid-template-columns: 1fr 1fr; }

/* ---- Pricing position bar (text inside) ---- */
.home-position-card { padding: 14px 18px 14px; }
.home-position-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #eef2f8;
  border: 1px solid #e2e8f0;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
}
.home-position-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.home-position-seg-cheapest    { background: linear-gradient(180deg, #20a663, #16a34a); }
.home-position-seg-competitive { background: linear-gradient(180deg, #f59e0b, #d97706); }
.home-position-seg-behind      { background: linear-gradient(180deg, #ef4444, #dc2626); }
.home-position-seg + .home-position-seg { box-shadow: inset 1px 0 0 rgba(255,255,255,.35); }
.home-position-seg-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  padding: 0 10px;
}
.home-position-seg-label-sm { font-size: 10.5px; }

.home-position-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.home-position-legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: #475569;
  font-weight: 600;
}
.home-position-legend-item b {
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.home-position-pct { color: #94a3b8; font-weight: 550; }
.home-position-swatch {
  width: 9px; height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.home-position-swatch-cheapest    { background: #16a34a; }
.home-position-swatch-competitive { background: #d97706; }
.home-position-swatch-behind      { background: #dc2626; }

/* ---- Recent changes (favicons + product + delta TL pill) ---- */
.home-changes-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.home-change-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f8;
  border-radius: 6px;
  transition: background-color .15s ease;
}
.home-change-item:last-child { border-bottom: none; }
.home-change-item:hover { background: #f8fbff; }
.home-change-tri {
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
}
.home-change-tri-down { color: #16a34a; }
.home-change-tri-up   { color: #ef4444; }
.home-change-info { min-width: 0; padding-left: 2px; }
.home-change-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-change-mpn {
  color: #94a3b8;
  font-weight: 500;
  margin-left: 6px;
  font-size: 11px;
}
.home-change-meta {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 5px;
}
.home-change-meta-favicon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
}
.home-change-delta {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 7px;
}
.home-change-delta-down { background: #e6f7ee; color: #0a8a4a; }
.home-change-delta-up   { background: #fde6e2; color: #c4351a; }

/* Filter dropdown */
.home-filter-wrap { position: relative; }
.home-filter-btn { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.home-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 6px 20px -8px rgba(15,23,42,.20);
  padding: 4px;
  min-width: 160px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* `hidden` attribute'u display: flex ile override oluyordu — explicit override */
.home-filter-menu[hidden] { display: none; }
.home-filter-opt {
  background: transparent;
  border: none;
  color: #475569;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.home-filter-opt:hover { background: #f1f5f9; color: #0f172a; }
.home-filter-opt.active { background: #eaf2fc; color: #0066cc; }

/* ---- Sistem Durumu (2x2 grid + 7-day error chart) ---- */
.home-pulse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.home-pulse-cell {
  background: #f8fbfe;
  border: 1px solid #eef2f8;
  border-radius: 9px;
  padding: 9px 11px;
}
.home-pulse-cell-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.home-pulse-cell-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #6b7e96;
}
.home-pulse-cell-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.home-pulse-cell-foot {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 550;
  margin-top: 1px;
}
.home-pulse-cell-foot b { color: #0f172a; font-weight: 700; }
.home-pulse-cell-foot .is-good { color: #0a8a4a; font-weight: 700; }
.home-pulse-cell-foot .is-bad  { color: #c4351a; font-weight: 700; }
.home-pulse-cell-foot .is-warn { color: #c97a00; font-weight: 700; }

.home-pulse-cell-ring-row { display: flex; align-items: center; gap: 10px; }
.home-pulse-ring { width: 38px; height: 38px; flex-shrink: 0; }
.home-pulse-ring svg { width: 100%; height: 100%; }
.home-pulse-cell-ring-info { flex: 1; min-width: 0; }

.home-pulse-error-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  background: #f8fbfe;
  border: 1px solid #eef2f8;
  border-radius: 9px;
}
.home-pulse-error-info { flex: 1; min-width: 0; }
.home-pulse-error-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #6b7e96;
  margin-bottom: 2px;
}
.home-pulse-error-meta {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}
.home-pulse-error-meta b { color: #0f172a; font-weight: 700; }
.home-pulse-error-bars {
  display: flex;
  gap: 3px;
  height: 28px;
  align-items: flex-end;
}
.home-pulse-error-bar {
  width: 14px;
  border-radius: 3px;
  background: #c8e9d4;
  transition: background-color .2s ease;
}
.home-pulse-error-bar.is-warn { background: #f7d8a3; }
.home-pulse-error-bar.is-bad  { background: #f5b7ae; }
.home-pulse-error-bar.is-empty { background: #e8edf3; height: 6px !important; }

.home-pulse-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff6e2 100%);
  border: 1px solid #f5e6c2;
  border-radius: 9px;
}
.home-pulse-tip-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #f0dba1;
  color: #b97f00;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-pulse-tip-body { flex: 1; min-width: 0; }
.home-pulse-tip-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #b97f00;
  margin-bottom: 2px;
}
.home-pulse-tip-text {
  font-size: 12px;
  line-height: 1.4;
  color: #4b3a13;
  font-weight: 550;
}
.home-pulse-tip-text b { color: #2a1f08; font-weight: 700; }

/* ---- Rakip kartları (6 sütun grid, mini horizontal bar) ---- */
.home-competitors-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.home-competitor {
  background: #fff;
  border: 1px solid #e7edf6;
  border-radius: 10px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .18s ease, box-shadow .22s ease;
  animation: home-fade-in .35s cubic-bezier(.2,.8,.2,1) both;
  min-width: 0;
}
.home-competitor:hover {
  transform: translateY(-2px);
  border-color: #d6e0ee;
  box-shadow: 0 12px 22px -16px rgba(15,23,42,.22);
}
.home-competitor-head {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 7px;
}
.home-competitor-mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e7edf6;
  padding: 3px;
}
.home-competitor-mark img { width: 100%; height: 100%; object-fit: contain; }
.home-competitor-mark-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0066cc, #0a3d7a);
  color: #fff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.home-competitor-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.home-competitor-pct {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #64748b;
}
.home-competitor-pct.is-pos { color: #0a8a4a; }
.home-competitor-pct.is-neg { color: #c4351a; }
.home-competitor-bar {
  display: flex;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f8;
}
.home-competitor-bar-pos { background: #16a34a; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.home-competitor-bar-neg { background: #ef4444; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.home-competitor-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}
.home-competitor-stats b { color: #0f172a; font-weight: 700; }
.home-competitor-stats .is-pos { color: #0a8a4a; }
.home-competitor-stats .is-neg { color: #c4351a; }

/* ---- Top movers (ranked + sparkline) ---- */
.home-mover-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 4px;
}
.home-mover-tag-pos { background: #e6f7ee; color: #0a8a4a; }
.home-mover-tag-neg { background: #fde6e2; color: #c4351a; }

.home-mover-list { display: flex; flex-direction: column; }
.home-mover-row {
  display: grid;
  grid-template-columns: 22px 1fr 60px auto;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f8;
  border-radius: 6px;
  transition: background-color .15s ease;
}
.home-mover-row:last-child { border-bottom: none; }
.home-mover-row:hover { background: #f8fbff; }
.home-mover-rank {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.home-mover-rank-1 { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #78350f; box-shadow: inset 0 -1px 1px rgba(0,0,0,.08); }
.home-mover-rank-2 { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #334155; }
.home-mover-rank-3 { background: linear-gradient(135deg, #fde68a, #d97706); color: #7c2d12; }
.home-mover-info { min-width: 0; }
.home-mover-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-mover-meta {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 550;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.home-mover-meta b { color: #475569; font-weight: 700; }
.home-mover-spark {
  height: 22px;
  width: 60px;
}
.home-mover-spark svg { width: 100%; height: 100%; display: block; }
.home-mover-pct {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: 7px;
  white-space: nowrap;
  text-align: center;
}
.home-mover-pct.is-pos { background: #e6f7ee; color: #0a8a4a; }
.home-mover-pct.is-neg { background: #fde6e2; color: #c4351a; }

.home-footer-spacer { height: 8px; }

/* ---- Responsive ---- */
@media (max-width: 1300px) {
  .home-competitors-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .home-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .home-row-2col, .home-movers-row { grid-template-columns: 1fr; }
  .home-competitors-grid { grid-template-columns: repeat(3, 1fr); }
  .home-position-legend { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 700px) {
  .home-scroll { padding: 14px 12px 24px; }
  .home-kpi-grid { grid-template-columns: 1fr; }
  .home-competitors-grid { grid-template-columns: repeat(2, 1fr); }
  .home-pulse-grid { grid-template-columns: 1fr; }
  .home-hero-title { font-size: 19px; }
  .home-mover-row { grid-template-columns: 22px 1fr auto; }
  .home-mover-spark { display: none; }
}

/* ========================================================
 * GÜVENLİK GEÇMİŞİ (Audit Log)
 * ======================================================== */

.audit-clear-btn { color: #b91c1c; }
.audit-clear-btn:hover { background: #fee2e2; border-color: #fecaca; }

.audit-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.audit-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.audit-stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: .85;
}

.audit-stat-total::before    { background: #6366f1; }
.audit-stat-today::before    { background: #0ea5e9; }
.audit-stat-week::before     { background: #14b8a6; }
.audit-stat-failed::before   { background: #dc2626; }
.audit-stat-sensitive::before { background: #d97706; }

.audit-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.audit-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.audit-stat-failed .audit-stat-value[data-warn="1"] { color: #dc2626; }
.audit-stat-sensitive .audit-stat-value[data-warn="1"] { color: #d97706; }

.audit-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.audit-toolbar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.audit-chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.audit-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
}

.audit-chip:hover { background: var(--bg); }

.audit-chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.audit-toolbar-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 10px;
}

.audit-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.audit-field-grow { min-width: 0; }

.audit-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.audit-select,
.audit-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .12s ease;
}

.audit-select:focus,
.audit-input:focus { border-color: var(--accent); }

.audit-summary {
  font-size: 12px;
  color: var(--muted);
  padding: 0 4px 8px;
}

.audit-summary b { color: var(--text); }

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.audit-day-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 14px 4px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-day-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.audit-event {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: start;
  position: relative;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.audit-event:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.audit-event-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.audit-event--auth-success .audit-event-icon { background: #d1fae5; color: #047857; }
.audit-event--auth-failed  .audit-event-icon { background: #fee2e2; color: #b91c1c; }
.audit-event--auth-logout  .audit-event-icon { background: #e0f2fe; color: #0369a1; }
.audit-event--auth-pwchange { }
.audit-event--auth-pwchange .audit-event-icon { background: #fef3c7; color: #b45309; }
.audit-event--user-create  .audit-event-icon { background: #dbeafe; color: #1d4ed8; }
.audit-event--user-update  .audit-event-icon { background: #ede9fe; color: #6d28d9; }
.audit-event--user-delete  .audit-event-icon { background: #fee2e2; color: #b91c1c; }
.audit-event--user-pwreset .audit-event-icon { background: #fef3c7; color: #b45309; }
.audit-event--role-create  .audit-event-icon { background: #d1fae5; color: #047857; }
.audit-event--role-update  .audit-event-icon { background: #f3e8ff; color: #7c3aed; }
.audit-event--role-delete  .audit-event-icon { background: #fee2e2; color: #b91c1c; }
.audit-event--system-proxy        .audit-event-icon { background: #e0e7ff; color: #3730a3; }
.audit-event--system-proxy-delete .audit-event-icon { background: #fee2e2; color: #b91c1c; }
.audit-event--system-rates        .audit-event-icon { background: #ccfbf1; color: #0f766e; }
.audit-event--system-mail         .audit-event-icon { background: #dbeafe; color: #1d4ed8; }
.audit-event--system-mail-delete  .audit-event-icon { background: #fee2e2; color: #b91c1c; }
.audit-event--system-config       .audit-event-icon { background: #f1f5f9; color: #334155; }
.audit-event--system-clear        .audit-event-icon { background: #fee2e2; color: #b91c1c; }

.audit-event--auth-failed { border-left: 3px solid #dc2626; }
.audit-event--user-delete,
.audit-event--role-delete,
.audit-event--system-proxy-delete,
.audit-event--system-mail-delete,
.audit-event--system-clear { border-left: 3px solid #dc2626; }
.audit-event--user-create,
.audit-event--user-update,
.audit-event--user-pwreset,
.audit-event--role-create,
.audit-event--role-update,
.audit-event--system-proxy,
.audit-event--system-rates,
.audit-event--system-mail,
.audit-event--system-config { border-left: 3px solid #d97706; }

.audit-event-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-event-headline {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
  word-break: break-word;
}

.audit-event-headline .audit-actor,
.audit-event-headline .audit-target {
  font-weight: 700;
  color: var(--text);
}

.audit-event-headline .audit-action-verb {
  color: var(--muted);
  font-weight: 500;
}

.audit-event-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

.audit-event-meta .audit-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: var(--bg);
  border-radius: 6px;
  font-weight: 500;
  font-size: 11px;
  color: var(--text);
}

.audit-event-meta .audit-tag-warn {
  background: #fef3c7;
  color: #92400e;
}

.audit-event-meta .audit-tag-danger {
  background: #fee2e2;
  color: #991b1b;
}

.audit-event-changes {
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.audit-change-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.audit-change-key {
  color: var(--muted);
  font-weight: 600;
  min-width: 70px;
}

.audit-change-before {
  text-decoration: line-through;
  color: #b91c1c;
  background: #fee2e2;
  padding: 1px 6px;
  border-radius: 4px;
}

.audit-change-after {
  color: #047857;
  background: #d1fae5;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.audit-change-arrow {
  color: var(--muted);
  font-size: 11px;
}

.audit-perm-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 3px;
}

.audit-perm-pill.added   { background: #d1fae5; color: #047857; }
.audit-perm-pill.removed { background: #fee2e2; color: #b91c1c; text-decoration: line-through; }

.audit-event-time {
  flex-shrink: 0;
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.audit-event-time-rel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.audit-event-toggle {
  margin-top: 4px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 24px;
  height: 22px;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, background .12s ease, color .12s ease;
}
.audit-event-toggle:hover { background: var(--bg); color: var(--text); }
.audit-event.is-expanded .audit-event-toggle { transform: rotate(180deg); color: var(--text); }

.audit-event[data-expandable="1"] { cursor: pointer; }
.audit-event.is-expanded {
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.audit-event-details {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
  color: var(--text);
}
.audit-detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 12px;
}
.audit-detail-row {
  display: contents;
}
.audit-detail-key {
  color: var(--muted);
  font-weight: 600;
}
.audit-detail-val {
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--text);
}

.audit-pager {
  display: flex;
  justify-content: center;
  padding: 16px;
}

@media (max-width: 980px) {
  .audit-stats { grid-template-columns: repeat(3, 1fr); }
  .audit-stat-sensitive { grid-column: span 3; }
  .audit-toolbar-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .audit-stats { grid-template-columns: 1fr 1fr; }
  .audit-stat-sensitive { grid-column: span 2; }
  .audit-toolbar-row { grid-template-columns: 1fr; }
  .audit-event { grid-template-columns: 32px 1fr; }
  .audit-event-time { grid-column: 1 / -1; text-align: left; padding-left: 44px; }
}

/* ====== Default Dashboard Düzeni — kategoriye-göre-grupla paneli ====== */
.dashboard-cat-group-panel {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-radius: 12px;
}
.dashboard-cat-group-panel .pm-sort-row { padding: 4px 0; }
.dashboard-cat-group-panel .pm-sort-badge { margin-left: auto; }

/* =============================================
   Çoklu Kategori/Marka Modalı (admin-only)
   ============================================= */
.btn-bulk-cb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  color: #4338ca;
  border: 1px solid #c7d2fe;
  border-radius: 7px;
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 1px 0 rgba(67,56,202,.06);
  margin-right: 10px;
}
.btn-bulk-cb:hover {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  border-color: #a5b4fc;
  box-shadow: 0 2px 6px rgba(67,56,202,.12);
}
.btn-bulk-cb:active { transform: translateY(1px); }
.btn-bulk-cb svg { color: #4f46e5; }

.bulk-cb-modal-card {
  width: min(1180px, 96vw);
  height: 92vh;
  max-height: 92vh;
  display: flex; flex-direction: column;
}
.bulk-cb-header {
  padding: 14px 20px;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.bulk-cb-header-left { display: flex; flex-direction: column; gap: 4px; }
.bulk-cb-breadcrumb {
  font-size: 10.5px; font-weight: 700; letter-spacing: .8px;
  color: #6366f1;
}
.bulk-cb-title-row { display: flex; align-items: baseline; gap: 10px; }
.bulk-cb-title-row > span:first-child { font-size: 16px; font-weight: 700; color: var(--text); }
.bulk-cb-meta { font-size: 12px; color: var(--muted); }

.bulk-cb-body {
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0;
}

/* Mod toggle */
.bulk-cb-mode-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}
.bulk-cb-mode-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
  color: var(--muted);
}
.bulk-cb-mode-toggle {
  display: inline-flex; gap: 0;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 3px;
}
.bulk-cb-mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: transparent; color: var(--muted);
  border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, color .15s;
}
.bulk-cb-mode-btn:hover { background: #f1f5f9; color: var(--text); }
.bulk-cb-mode-btn.is-active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,.25);
}
.bulk-cb-mode-btn.is-active:hover { color: #fff; }
.bulk-cb-mode-ico { font-size: 14px; }

/* İki panelli grid */
.bulk-cb-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.bulk-cb-pane {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 0;
}
.bulk-cb-pane-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--text);
  padding-bottom: 4px; border-bottom: 1px dashed #e2e8f0;
}
.bulk-cb-selcount {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 9px;
  background: #ede9fe; color: #5b21b6;
  border-radius: 12px;
}

/* Sol panel — arama, filtre, liste */
.bulk-cb-search-wrap {
  position: relative;
}
.bulk-cb-search-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.bulk-cb-search-wrap .field-input {
  padding-left: 32px;
  height: 34px;
}
.bulk-cb-filter-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.bulk-cb-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); font-weight: 600;
}
.bulk-cb-filter-sel {
  font-size: 12px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-family: inherit;
  cursor: pointer;
}
.bulk-cb-bulk-actions {
  margin-left: auto;
  display: inline-flex; gap: 6px;
}
.bulk-cb-mini {
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  background: #f1f5f9; color: var(--text);
  border: 1px solid #e2e8f0; border-radius: 6px;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.bulk-cb-mini:hover { background: #e2e8f0; }

.bulk-cb-list {
  flex: 1; min-height: 240px;
  overflow-y: auto;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px;
}
.bulk-cb-list-empty {
  padding: 30px 12px; text-align: center; color: var(--muted);
  font-size: 12.5px;
}
.bulk-cb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s;
}
.bulk-cb-item:hover { background: #fff; box-shadow: 0 0 0 1px #e2e8f0; }
.bulk-cb-item.is-checked { background: #f5f3ff; box-shadow: 0 0 0 1px #ddd6fe; }
.bulk-cb-item input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: #6366f1;
  flex-shrink: 0; cursor: pointer;
}
.bulk-cb-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bulk-cb-item-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bulk-cb-item-meta {
  font-size: 10.5px; color: var(--muted);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.bulk-cb-item-meta b { color: #475569; font-weight: 600; }

/* Sağ panel — hedef değer kartı */
.bulk-cb-target-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #fefce8 0%, #ffffff 80%);
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.bulk-cb-radio {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.bulk-cb-radio input[type="radio"] { accent-color: #6366f1; }
.bulk-cb-target-sel {
  height: 34px; font-size: 13px;
}
.bulk-cb-target-input {
  height: 34px; font-size: 13px;
}
.bulk-cb-target-input:disabled,
.bulk-cb-target-sel:disabled {
  background: #f1f5f9; color: #94a3b8; cursor: not-allowed;
}
.bulk-cb-target-sep {
  text-align: center; font-size: 10.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .6px;
  padding: 2px 0;
}
.bulk-cb-preview {
  margin-top: 6px; padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  display: flex; align-items: center; gap: 8px;
}
.bulk-cb-preview-label {
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .5px;
}
.bulk-cb-preview-chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600;
  background: #e0e7ff; color: #3730a3;
  border-radius: 12px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bulk-cb-preview-chip.is-empty {
  background: #fee2e2; color: #991b1b;
  font-style: italic;
}

.bulk-cb-warn {
  font-size: 12px; color: #b45309;
  background: #fef3c7; border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
  display: none;
}
.bulk-cb-warn.is-shown { display: block; }

.bulk-cb-footer {
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.bulk-cb-footer-hint {
  font-size: 12px; color: var(--muted);
}
.bulk-cb-footer-actions { display: inline-flex; gap: 8px; }

@media (max-width: 820px) {
  .bulk-cb-grid { grid-template-columns: 1fr; }
  .bulk-cb-modal-card { width: 96vw; }
}

/* ============================================================
   Toplu EAN (Excel paste) Modal
   bulk-cb tasarım dilinin paste/preview varyantı.
   ============================================================ */
.btn-bulk-ean { /* btn-bulk-cb tabanından gelir, sadece rengi farklı */ }
.btn-bulk-ean svg { color: #0891b2; }

.bulk-ean-modal-card {
  width: min(1240px, 96vw);
  height: auto;
  max-height: 90vh;
  min-height: 560px;
  display: flex; flex-direction: column;
}
.bulk-ean-body {
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0;
  flex: 1;
}
.bulk-ean-hint {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  font-size: 12.5px; line-height: 1.55; color: #0c4a6e;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border: 1px solid #bae6fd;
  border-radius: 9px;
}
.bulk-ean-hint-ico { font-size: 16px; flex-shrink: 0; line-height: 1.2; }
.bulk-ean-hint kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; padding: 1px 5px;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
  box-shadow: 0 1px 0 #cbd5e1;
}
.bulk-ean-hint-paste { display: inline; color: #0c4a6e; }

/* Sekme çubuğu — EAN / Üretici Grubu modu (switchBulkImportMode) */
.bulk-imp-tabs {
  display: flex; gap: 6px;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.bulk-imp-tab {
  flex: 1;
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s;
}
.bulk-imp-tab:hover { color: #0f172a; background: #e2e8f0; }
.bulk-imp-tab.is-active {
  color: #155e75;
  background: #fff;
  border-color: #bae6fd;
  box-shadow: 0 1px 2px rgba(8,145,178,.12);
}

.bulk-ean-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.bulk-ean-pane {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 0;
}
.bulk-ean-pane-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--text);
  padding-bottom: 4px; border-bottom: 1px dashed #e2e8f0;
}
.bulk-ean-linecount {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 9px;
  background: #cffafe; color: #155e75;
  border-radius: 12px;
}

.bulk-ean-textarea {
  flex: 0 1 auto;
  min-height: 240px;
  max-height: 400px;
  height: 320px;
  width: 100%;
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.55;
  color: var(--text);
  background: #fafbfc;
  border: 1px solid #e2e8f0; border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}
.bulk-ean-textarea:focus {
  border-color: #0891b2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8,145,178,.12);
}
.bulk-ean-textarea::placeholder {
  color: #94a3b8;
  font-style: normal;
}

.bulk-ean-actions {
  display: flex; align-items: center; gap: 10px;
}
.bulk-ean-actions-hint {
  font-size: 11px; color: var(--muted);
  margin-left: auto;
}
.bulk-ean-mini {
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  background: #f1f5f9; color: var(--text);
  border: 1px solid #e2e8f0; border-radius: 6px;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.bulk-ean-mini:hover { background: #e2e8f0; }

/* KPI strip — 5 chip */
.bulk-ean-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.bem-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  transition: background .15s;
}
.bem-chip b {
  font-size: 18px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.bem-chip span {
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .3px; text-transform: uppercase;
}
.bem-chip-ok { background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 70%); border-color: #86efac; }
.bem-chip-ok b { color: #047857; }
.bem-chip-info { background: linear-gradient(180deg, #eff6ff 0%, #ffffff 70%); border-color: #bfdbfe; }
.bem-chip-info b { color: #1e40af; }
.bem-chip-bad { background: linear-gradient(180deg, #fef2f2 0%, #ffffff 70%); border-color: #fca5a5; }
.bem-chip-bad b { color: #b91c1c; }
.bem-chip-warn { background: linear-gradient(180deg, #fefce8 0%, #ffffff 70%); border-color: #fde68a; }
.bem-chip-warn b { color: #b45309; }
/* Üretici Fiyatı modu: Apple linkli (atlandı) chip — indigo/slate ton */
.bem-chip-apple { background: linear-gradient(180deg, #eef2ff 0%, #ffffff 70%); border-color: #c7d2fe; }
.bem-chip-apple b { color: #4338ca; }
.bem-chip[hidden] { display: none; }

/* Preview tablosu */
.bulk-ean-tbl-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.bulk-ean-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bulk-ean-tbl thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .5px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 7px 10px;
}
.bulk-ean-tbl tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  white-space: nowrap;
}
.bulk-ean-tbl tbody tr:last-child td { border-bottom: none; }
.bem-row-change { background: #f0fdf4; }
.bem-row-noop { background: #f8fafc; }
.bem-row-unknown { background: #fef2f2; }
.bem-row-missing { background: #fefce8; }
.bem-row-apple-skip { background: #eef2ff; }
.bem-row-invalid { background: #fef2f2; }
.bem-empty td {
  text-align: center;
  padding: 30px 12px !important;
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}
.bem-prod-cell {
  max-width: 280px;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap !important;
}

.bem-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  padding: 2px 6px;
  background: #fff;
  border: 1px solid #e2e8f0; border-radius: 5px;
  color: #334155;
}
.bem-code-strong { font-weight: 700; color: #0f172a; }
.bem-muted { color: #94a3b8; font-size: 11.5px; }

.bem-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  border: 1.5px solid;
}
.bem-badge.bem-ok   { background: #d1fae5; color: #047857; border-color: #6ee7b7; }
.bem-badge.bem-info { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.bem-badge.bem-bad  { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.bem-badge.bem-warn { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.bem-badge.bem-apple { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; font-size: 11px; }

.bem-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px; font-weight: 700;
  border-radius: 9px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.bem-tag-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.bem-tag-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.bem-tag-apple { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* Üretici Fiyatı empty-state: Apple linkli ürün bilgi satırı */
.bem-apple-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 10px 0 0;
  padding: 9px 12px;
  font-size: 12px; line-height: 1.5; color: #3730a3;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px;
}
.bem-apple-note b { color: #312e81; }
.bem-apple-note-ico { font-size: 13px; line-height: 1.4; flex: 0 0 auto; }

.bulk-ean-warn {
  font-size: 12px; color: #b45309;
  background: #fef3c7; border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
  display: none;
}
.bulk-ean-warn.is-shown { display: block; }

.bulk-ean-pane-mode {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 9px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 11px;
}
.bulk-ean-pane-mode[data-mode="preview"] {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}
.bulk-ean-pane-mode[data-mode="zero"] {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
}
.bulk-ean-preview-mode {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.bulk-ean-preview-mode[hidden] { display: none; }

/* ============================================================
   Empty State (preview boş) — DB'de EAN'ı eksik ürünler
   ============================================================ */
.bem-empty-state {
  display: flex; flex-direction: column;
  gap: 14px;
  flex: 1; min-height: 0;
}
.bem-empty-state-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 60%, #ffffff 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(180, 83, 9, .06);
}
.bem-empty-state-hero.is-zero {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 60%, #ffffff 100%);
  border-color: #6ee7b7;
  box-shadow: 0 2px 6px rgba(4, 120, 87, .06);
}
.bem-empty-state-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 92px; padding: 8px 10px;
  background: rgba(255, 255, 255, .85);
  border-radius: 10px;
  border: 1px solid rgba(180, 83, 9, .15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.bem-empty-state-hero.is-zero .bem-empty-state-num {
  border-color: rgba(4, 120, 87, .18);
}
.bem-empty-state-num b {
  font-size: 32px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1; color: #92400e;
  letter-spacing: -.02em;
}
.bem-empty-state-hero.is-zero .bem-empty-state-num b { color: #047857; }
.bem-empty-state-num small {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #92400e; opacity: .75;
  margin-top: 3px;
}
.bem-empty-state-hero.is-zero .bem-empty-state-num small { color: #047857; }
.bem-empty-state-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.bem-empty-state-info-title {
  font-size: 14px; font-weight: 700; color: #1f2937;
  letter-spacing: -.005em;
}
.bem-empty-state-info-desc {
  font-size: 12px; color: #475569;
  line-height: 1.5;
}
.bem-empty-state-info-desc kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px; padding: 1px 5px;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
}

.bem-missing-wrap {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0; border-radius: 10px;
  overflow: hidden;
}
.bem-missing-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
}
.bem-missing-head-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #475569;
}
.bem-missing-head-hint {
  font-size: 11px; color: var(--muted);
}
.bem-missing-search {
  position: relative;
  padding: 8px 12px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}
.bem-missing-search input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  font-size: 12.5px; font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #e2e8f0; border-radius: 7px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.bem-missing-search input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, .12);
}
.bem-missing-search-ico {
  position: absolute;
  left: 22px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.bem-missing-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 4px;
}
.bem-missing-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.bem-missing-row:hover {
  background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 60%);
  border-color: #bae6fd;
}
.bem-missing-row.is-added {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.bem-missing-row-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 600;
  color: #1e293b;
  padding: 2px 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bem-missing-row-name {
  font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}
.bem-missing-row-action {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em;
  color: #0891b2;
  background: rgba(8, 145, 178, .08);
  border: 1px solid rgba(8, 145, 178, .25);
  border-radius: 12px;
  opacity: 0; transition: opacity .12s;
}
.bem-missing-row:hover .bem-missing-row-action { opacity: 1; }
.bem-missing-row.is-added .bem-missing-row-action {
  opacity: 1;
  color: #047857;
  background: rgba(4, 120, 87, .12);
  border-color: rgba(4, 120, 87, .35);
}
.bem-missing-empty-msg {
  padding: 40px 20px; text-align: center;
  color: var(--muted);
  font-size: 12.5px; font-style: italic;
}

@media (max-width: 980px) {
  .bulk-ean-grid { grid-template-columns: 1fr; }
  .bulk-ean-modal-card { width: 96vw; }
  .bulk-ean-kpi { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Liste sayfalama (Dashboard + Ürünler) ---- */
.list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 12px 8px;
  margin-top: 6px;
}
.list-pagination .pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  user-select: none;
}
.list-pagination .pg-btn:not(:disabled):hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.list-pagination .pg-btn:not(:disabled):active {
  transform: translateY(1px);
}
.list-pagination .pg-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.list-pagination .pg-info {
  font-size: 13px;
  color: #475569;
  letter-spacing: .01em;
  padding: 0 4px;
}
.list-pagination .pg-info strong {
  color: #0f172a;
  font-weight: 600;
}

/* ============================================================
   Grup → Yeni Ürün Ekle modal — kategori/marka filtre + Excel kod paste
   bulk-ean-modal-card pattern'inden esinlenmiş 2-pane yapı.
   ============================================================ */
.group-products-modal-card {
  width: min(1080px, 96vw);
  max-height: 90vh;
  min-height: 540px;
  display: flex; flex-direction: column;
}
.group-products-body {
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
  flex: 1;
}

.gpp-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}
.gpp-search-wrap { margin-bottom: 0; }
.gpp-filter-sel {
  font-size: 13px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
}

.gpp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.gpp-pane {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 0;
}
.gpp-pane-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--text);
  padding-bottom: 4px; border-bottom: 1px dashed #e2e8f0;
}
.gpp-pane-meta {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 9px;
  background: #e0f2fe; color: #075985;
  border-radius: 12px;
}

/* Sol pane — liste yüksekliği modal flex'inden taşmasın */
.gpp-pane-left .group-product-picker-list {
  flex: 1;
  min-height: 280px;
  max-height: 100%;
}
.group-picker-truncated {
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  border-top: 1px dashed #e2e8f0;
}

/* Sağ pane — paste alanı */
.gpp-paste-hint {
  font-size: 11.5px; line-height: 1.5; color: #475569;
  padding: 8px 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}
.gpp-paste-hint kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px; padding: 1px 5px;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
  box-shadow: 0 1px 0 #cbd5e1;
}
.gpp-paste-textarea {
  flex: 0 0 auto;
  min-height: 130px;
  max-height: 220px;
  height: 150px;
  width: 100%;
  padding: 9px 11px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.55;
  color: var(--text);
  background: #fafbfc;
  border: 1px solid #e2e8f0; border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  white-space: pre;
  overflow: auto;
}
.gpp-paste-textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.gpp-paste-textarea::placeholder {
  color: #94a3b8;
}
.gpp-paste-actions {
  display: flex; align-items: center; gap: 10px;
}
.gpp-paste-actions-hint {
  font-size: 11px; color: var(--muted);
  margin-left: auto;
}
.gpp-paste-mini {
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  background: #f1f5f9; color: var(--text);
  border: 1px solid #e2e8f0; border-radius: 6px;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.gpp-paste-mini:hover { background: #e2e8f0; }

.gpp-paste-result {
  display: flex; flex-direction: column; gap: 9px;
  flex: 1;
  min-height: 0;
}
.gpp-paste-result[hidden] { display: none; }

.gpp-paste-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.gpp-paste-kpi .bem-chip {
  padding: 7px 4px;
}
.gpp-paste-kpi .bem-chip b {
  font-size: 16px;
}

.gpp-paste-add-btn {
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
  justify-content: center;
}
.gpp-paste-add-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.gpp-paste-unknown {
  min-height: 0;
  overflow-y: auto;
}
.gpp-paste-unknown:empty { display: none; }
.gpp-paste-unknown-title {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 11px;
  font-size: 11.5px; line-height: 1.5;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%);
  border: 1px solid #fecaca;
  border-radius: 7px;
  margin-bottom: 7px;
}
.gpp-paste-unknown-title strong { color: #b91c1c; font-weight: 700; }
.gpp-paste-unknown-title span { color: #7f1d1d; }
.gpp-paste-unknown-list {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.gpp-unknown-chip {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 8px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}
.gpp-unknown-chip.gpp-unknown-more {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

@media (max-width: 880px) {
  .gpp-filter-bar { grid-template-columns: 1fr; }
  .gpp-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Kullanıcı Yönetimi — Premium Cards
   ============================================================ */
.user-mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.user-mgmt-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px 14px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #e7ebf1;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 1px 1px rgba(15,23,42,.02);
  transition:
    transform .22s cubic-bezier(.4,0,.2,1),
    box-shadow .22s cubic-bezier(.4,0,.2,1),
    border-color .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.user-mgmt-card::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-from, #6366f1), var(--accent-to, #8b5cf6));
  opacity: 0;
  transition: opacity .22s ease;
}

.user-mgmt-card:hover {
  border-color: #d6dcea;
  box-shadow:
    0 12px 28px -14px rgba(15,23,42,.16),
    0 4px 10px rgba(15,23,42,.04);
  transform: translateY(-1px);
}

.user-mgmt-card:hover::before { opacity: 1; }

/* Role-based accent strip */
.user-mgmt-card[data-tone="admin"]  { --accent-from: #7c3aed; --accent-to: #4f46e5; }
.user-mgmt-card[data-tone="dept"]   { --accent-from: #0ea5e9; --accent-to: #0284c7; }
.user-mgmt-card[data-tone="basic"]  { --accent-from: #14b8a6; --accent-to: #0d9488; }
.user-mgmt-card[data-tone="custom"] { --accent-from: #64748b; --accent-to: #475569; }
.user-mgmt-card[data-tone="prod"]   { --accent-from: #f59e0b; --accent-to: #d97706; }

/* Self card */
.user-mgmt-card.is-self {
  background:
    linear-gradient(135deg, rgba(255,251,235,.65) 0%, rgba(254,243,199,.35) 100%),
    #ffffff;
  border-color: #fde68a;
}
.user-mgmt-card.is-self::before {
  opacity: 1;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

/* Inactive card */
.user-mgmt-card.is-inactive {
  opacity: .72;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.user-mgmt-card.is-inactive .user-mgmt-avatar {
  filter: grayscale(.6) brightness(.95);
}
.user-mgmt-card.is-inactive .user-mgmt-name {
  text-decoration: line-through;
  text-decoration-color: rgba(100,116,139,.4);
  text-decoration-thickness: 1px;
}

/* Avatar */
.user-mgmt-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: .4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow:
    0 6px 14px -4px rgba(99,102,241,.45),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
  flex-shrink: 0;
  user-select: none;
}
.user-mgmt-avatar[data-tone="admin"] {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow:
    0 6px 14px -4px rgba(124,58,237,.45),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.user-mgmt-avatar[data-tone="dept"] {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow:
    0 6px 14px -4px rgba(14,165,233,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.user-mgmt-avatar[data-tone="basic"] {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow:
    0 6px 14px -4px rgba(20,184,166,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.user-mgmt-avatar[data-tone="custom"] {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow:
    0 6px 14px -4px rgba(100,116,139,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.user-mgmt-avatar[data-tone="prod"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow:
    0 6px 14px -4px rgba(245,158,11,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}

/* Crown overlay for admin */
.user-mgmt-avatar-crown {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 6px rgba(245,158,11,.45),
    inset 0 1px 0 rgba(255,255,255,.4);
  border: 2px solid #fff;
}
.user-mgmt-avatar-crown svg {
  width: 9px;
  height: 9px;
  color: #78350f;
}

/* Main info */
.user-mgmt-main {
  min-width: 0;
}
.user-mgmt-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.user-mgmt-name {
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -.1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  line-height: 1.2;
}
.user-mgmt-self-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 7px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,.3);
  box-shadow: 0 1px 2px rgba(245,158,11,.15);
}
.user-mgmt-self-pill::before {
  content: '★';
  font-size: 10px;
  line-height: 1;
}
.user-mgmt-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: .1px;
  white-space: nowrap;
  line-height: 1.4;
}
.user-mgmt-role-chip svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}
.user-mgmt-role-chip[data-tone="admin"] {
  color: #5b21b6;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 1px solid rgba(124,58,237,.22);
}
.user-mgmt-role-chip[data-tone="dept"] {
  color: #075985;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 1px solid rgba(14,165,233,.22);
}
.user-mgmt-role-chip[data-tone="basic"] {
  color: #115e59;
  background: linear-gradient(135deg, #ccfbf1, #99f6e4);
  border: 1px solid rgba(20,184,166,.22);
}
.user-mgmt-role-chip[data-tone="custom"] {
  color: #334155;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border: 1px solid rgba(100,116,139,.22);
}
.user-mgmt-role-chip[data-tone="prod"] {
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid rgba(245,158,11,.22);
}

/* Meta (email) */
.user-mgmt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  min-width: 0;
}
.user-mgmt-meta svg {
  width: 12px;
  height: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}
.user-mgmt-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Status pill */
.user-mgmt-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .2px;
  white-space: nowrap;
}
.user-mgmt-status[data-status="active"] {
  color: #047857;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1px solid rgba(16,185,129,.22);
}
.user-mgmt-status[data-status="passive"] {
  color: #991b1b;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 1px solid rgba(239,68,68,.22);
}
.user-mgmt-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.user-mgmt-status[data-status="active"] .user-mgmt-status-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.55);
  animation: userMgmtPulse 2.2s infinite;
}
.user-mgmt-status[data-status="passive"] .user-mgmt-status-dot {
  background: #ef4444;
}
@keyframes userMgmtPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Action buttons */
.user-mgmt-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.user-mgmt-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  padding: 0;
}
.user-mgmt-action svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.user-mgmt-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(15,23,42,.12);
}
.user-mgmt-action:active {
  transform: translateY(0);
}
.user-mgmt-action[data-variant="edit"]:hover {
  color: #1d4ed8;
  border-color: #93c5fd;
  background: #eff6ff;
}
.user-mgmt-action[data-variant="activate"] {
  color: #047857;
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}
.user-mgmt-action[data-variant="activate"]:hover {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #059669;
}
.user-mgmt-action[data-variant="delete"]:hover {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fef2f2;
}

.user-mgmt-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #94a3b8;
  cursor: help;
}
.user-mgmt-lock svg {
  width: 14px;
  height: 14px;
}

/* Empty state */
.user-mgmt-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(135deg, #fafbfc, #f1f5f9);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 720px) {
  .user-mgmt-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 10px 14px;
    padding: 12px 14px 12px 16px;
  }
  .user-mgmt-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .user-mgmt-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .user-mgmt-name { max-width: none; }
}

/* ============================================================
   Roller — Premium Cards
   (paylaşılan: .user-mgmt-action + .user-mgmt-lock + ton paleti)
   ============================================================ */
.role-mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.role-mgmt-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 18px 16px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #e7ebf1;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 1px 1px rgba(15,23,42,.02);
  transition:
    transform .22s cubic-bezier(.4,0,.2,1),
    box-shadow .22s cubic-bezier(.4,0,.2,1),
    border-color .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.role-mgmt-card::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-from, #6366f1), var(--accent-to, #8b5cf6));
  opacity: 0;
  transition: opacity .22s ease;
}

.role-mgmt-card:hover {
  border-color: #d6dcea;
  box-shadow:
    0 12px 28px -14px rgba(15,23,42,.16),
    0 4px 10px rgba(15,23,42,.04);
  transform: translateY(-1px);
}
.role-mgmt-card:hover::before { opacity: 1; }

.role-mgmt-card[data-tone="admin"]  { --accent-from: #7c3aed; --accent-to: #4f46e5; }
.role-mgmt-card[data-tone="dept"]   { --accent-from: #0ea5e9; --accent-to: #0284c7; }
.role-mgmt-card[data-tone="basic"]  { --accent-from: #14b8a6; --accent-to: #0d9488; }
.role-mgmt-card[data-tone="custom"] { --accent-from: #64748b; --accent-to: #475569; }
.role-mgmt-card[data-tone="prod"]   { --accent-from: #f59e0b; --accent-to: #d97706; }

/* System role — sürekli accent + altın system badge */
.role-mgmt-card.is-system::before { opacity: 1; }

/* Avatar (shield icon) */
.role-mgmt-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow:
    0 6px 14px -4px rgba(99,102,241,.45),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
  flex-shrink: 0;
}
.role-mgmt-avatar svg {
  width: 22px;
  height: 22px;
}
.role-mgmt-avatar[data-tone="admin"] {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow:
    0 6px 14px -4px rgba(124,58,237,.45),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.role-mgmt-avatar[data-tone="dept"] {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow:
    0 6px 14px -4px rgba(14,165,233,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.role-mgmt-avatar[data-tone="basic"] {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow:
    0 6px 14px -4px rgba(20,184,166,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.role-mgmt-avatar[data-tone="custom"] {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow:
    0 6px 14px -4px rgba(100,116,139,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.role-mgmt-avatar[data-tone="prod"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow:
    0 6px 14px -4px rgba(245,158,11,.4),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.08);
}

.role-mgmt-avatar-crown {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 6px rgba(245,158,11,.45),
    inset 0 1px 0 rgba(255,255,255,.4);
  border: 2px solid #fff;
}
.role-mgmt-avatar-crown svg {
  width: 9px;
  height: 9px;
  color: #78350f;
}

/* Main */
.role-mgmt-main {
  min-width: 0;
  padding-top: 3px;
}

.role-mgmt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.role-mgmt-name {
  color: #0f172a;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.1px;
  line-height: 1.2;
}

.role-mgmt-system-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 7px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #5b21b6;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,.28);
  box-shadow: 0 1px 2px rgba(124,58,237,.12);
}
.role-mgmt-system-pill svg {
  width: 10px;
  height: 10px;
}

.role-mgmt-perm-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  letter-spacing: .1px;
}
.role-mgmt-perm-count svg {
  width: 10px;
  height: 10px;
  color: #64748b;
}

/* Permission chip cluster */
.role-mgmt-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
}

.role-perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 550;
  border-radius: 7px;
  letter-spacing: .05px;
  line-height: 1.4;
  white-space: nowrap;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.role-perm-chip svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: .85;
}
.role-perm-chip[data-tone="admin"] {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #5b21b6;
  border-color: rgba(124,58,237,.18);
}
.role-perm-chip[data-tone="dept"] {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #075985;
  border-color: rgba(14,165,233,.18);
}
.role-perm-chip[data-tone="basic"] {
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  color: #115e59;
  border-color: rgba(20,184,166,.18);
}
.role-perm-chip[data-tone="custom"] {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  color: #334155;
  border-color: rgba(100,116,139,.2);
}
.role-perm-chip[data-tone="prod"] {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e;
  border-color: rgba(245,158,11,.2);
}

.role-mgmt-empty-perm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
}

/* Actions column */
.role-mgmt-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 3px;
}

/* Disabled / system action button */
.role-mgmt-actions .user-mgmt-action[disabled],
.role-mgmt-actions .user-mgmt-action[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
}

/* Empty state */
.role-mgmt-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(135deg, #fafbfc, #f1f5f9);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 720px) {
  .role-mgmt-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px 14px;
    padding: 14px 14px 14px 16px;
  }
  .role-mgmt-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* =============================================
   Piyasa Fiyatları Aktarım Popup'ı (#market-export-modal)
   Rafine/premium iki panel: sol facet filtreleri, sağ canlı ürün listesi
   ============================================= */
.mx-overlay { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.mx-modal {
  --mx-accent-soft: rgba(0, 102, 204, .09);
  --mx-accent-hair: rgba(0, 102, 204, .22);
  width: min(1100px, 96vw);
  height: min(740px, 92vh);
  max-height: 92vh;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0, 46, 95, .35), 0 4px 14px rgba(0, 0, 0, .12);
  animation: mxPop .28s cubic-bezier(.16, 1, .3, 1);
}
@keyframes mxPop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Başlık — accent hairline ile */
.mx-header {
  align-items: flex-start; gap: 14px;
  padding: 16px 18px 15px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(0, 102, 204, .035), transparent),
    var(--surface);
  position: relative;
}
.mx-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
}
.mx-header-left { display: flex; gap: 13px; align-items: center; min-width: 0; }
.mx-header-icon {
  width: 42px; height: 42px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 6px 16px -4px rgba(0, 102, 204, .55);
}
.mx-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mx-title { font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; color: var(--text); }
.mx-subtitle { font-size: 12px; color: var(--muted); line-height: 1.45; }
.mx-close { font-size: 20px; transition: color .15s, transform .15s; }
.mx-close:hover { color: var(--text); transform: rotate(90deg); }
.mx-body { padding: 0; overflow: hidden; display: flex; }
.mx-layout { display: grid; grid-template-columns: 296px 1fr; width: 100%; min-height: 0; }

/* İnce, zarif scrollbar (her iki panel) */
.mx-facets-body, .mx-product-list { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.mx-facets-body::-webkit-scrollbar, .mx-product-list::-webkit-scrollbar { width: 9px; }
.mx-facets-body::-webkit-scrollbar-thumb, .mx-product-list::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 99px; border: 3px solid transparent; background-clip: content-box;
}
.mx-facets-body::-webkit-scrollbar-thumb:hover, .mx-product-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }

/* Özel checkbox — accent, yuvarlak, crisp */
.mx-facet-opt input[type=checkbox], .mx-list-item input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; flex: none; margin: 0; cursor: pointer;
  border: 1.8px solid #cbd5e1; border-radius: 5px; background: var(--surface);
  position: relative; transition: background .15s, border-color .15s;
}
.mx-facet-opt input[type=checkbox]:hover, .mx-list-item input[type=checkbox]:hover { border-color: var(--accent); }
.mx-facet-opt input[type=checkbox]:checked, .mx-list-item input[type=checkbox]:checked {
  background: var(--accent); border-color: var(--accent);
}
.mx-facet-opt input[type=checkbox]:checked::after, .mx-list-item input[type=checkbox]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1.5px;
  width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(43deg);
}

/* Sol panel — facet filtreleri */
.mx-facets {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfcfe, var(--bg));
  display: flex; flex-direction: column; min-height: 0;
}
.mx-facets-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.mx-facets-title {
  font-size: 11px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  display: flex; align-items: center; gap: 7px;
}
.mx-facets-title::before {
  content: ''; width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 5h18l-7 8v6l-4-2v-4z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 5h18l-7 8v6l-4-2v-4z'/></svg>") center/contain no-repeat;
}
.mx-clear-filters {
  font-size: 12px; font-weight: 650; cursor: pointer;
  background: none; border: none; color: var(--accent); padding: 4px 8px; border-radius: 7px;
  transition: background .15s, color .15s;
}
.mx-clear-filters:hover:not(:disabled) { background: var(--mx-accent-soft); }
.mx-clear-filters:disabled { color: #cbd5e1; cursor: default; }
.mx-facets-body { overflow-y: auto; padding: 12px 11px 16px; flex: 1; }
.mx-facet { margin-bottom: 18px; }
.mx-facet:last-child { margin-bottom: 4px; }
.mx-facet-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 0 6px 7px;
}
.mx-facet-name { line-height: 1; }
.mx-facet-active {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 99px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 2px 6px -1px rgba(0, 102, 204, .5);
}
.mx-facet-opts { display: flex; flex-direction: column; gap: 2px; }
.mx-facet-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: 9px; cursor: pointer;
  font-size: 13px; color: var(--text);
  transition: background .14s, box-shadow .14s;
}
.mx-facet-opt:hover { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.mx-facet-opt:has(input:checked) {
  background: var(--mx-accent-soft);
  box-shadow: inset 0 0 0 1px var(--mx-accent-hair);
}
.mx-facet-opt:has(input:checked) .mx-facet-opt-label { color: var(--accent); font-weight: 650; }
.mx-facet-opt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-facet-opt-count {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600;
  background: rgba(100, 116, 139, .1); padding: 1px 7px; border-radius: 99px;
}
.mx-facet-opt:has(input:checked) .mx-facet-opt-count { background: rgba(0, 102, 204, .14); color: var(--accent); }
.mx-facet-empty, .mx-list-empty {
  padding: 32px 18px; text-align: center; color: var(--muted); font-size: 13px;
}

/* Sağ panel — ürün listesi */
.mx-products { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
.mx-products-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.mx-search-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.mx-search-wrap svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.mx-search-input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text); background: var(--bg);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.mx-search-input::placeholder { color: #94a3b8; }
.mx-search-input:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--mx-accent-soft);
}
.mx-select-all-btn {
  flex: none; font-size: 12px; font-weight: 650; cursor: pointer;
  padding: 9px 14px; border-radius: 10px;
  border: 1.5px solid var(--mx-accent-hair); background: var(--mx-accent-soft); color: var(--accent);
  transition: background .15s, box-shadow .15s;
}
.mx-select-all-btn:hover { background: rgba(0, 102, 204, .15); box-shadow: 0 2px 8px -2px rgba(0, 102, 204, .35); }
.mx-product-list { overflow-y: auto; padding: 8px 10px 12px; flex: 1; }
.mx-list-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--text);
  transition: background .14s;
}
.mx-list-item:hover { background: var(--bg); }
/* Hariç tutulan (seçili olmayan) satır soluk — neyin dışarıda olduğu net görünür */
.mx-list-item:has(input:not(:checked)) { opacity: .48; }
.mx-list-item:has(input:not(:checked)) .mx-list-name { text-decoration: line-through; text-decoration-color: #cbd5e1; }
.mx-list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-list-code {
  flex: none; font-size: 11px; color: #64748b;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  background: var(--bg); padding: 3px 8px; border-radius: 6px; letter-spacing: -.02em;
}

/* Footer */
.mx-footer {
  justify-content: space-between; align-items: center;
  padding: 13px 18px;
  background: linear-gradient(180deg, transparent, rgba(0, 102, 204, .03));
}
.mx-count-info {
  font-size: 13px; font-weight: 600; color: var(--muted);
  display: flex; align-items: baseline; gap: 6px;
}
.mx-count-info strong, .mx-count-info b {
  color: var(--accent); font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mx-footer-actions { display: flex; gap: 10px; }
.mx-footer .pa-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 6px 16px -5px rgba(0, 102, 204, .6);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.mx-footer .pa-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 9px 22px -6px rgba(0, 102, 204, .7); filter: brightness(1.05); }
.mx-footer .pa-btn-primary:disabled { background: #cbd5e1; box-shadow: none; cursor: default; }

@media (max-width: 720px) {
  .mx-layout { grid-template-columns: 1fr; }
  .mx-facets { max-height: 38%; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RAPORLAR — Firma Fiyat Hareketi Analizi (seasonality)
   Modern, app tasarım diliyle (navy/blue, yumuşak gölge). renderRaporlarPage().
   ═══════════════════════════════════════════════════════════════════════════ */
#tab-raporlar.active { display: flex; }
.rapor-shell {
  flex: 1; display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto; padding: 20px 24px 48px; background: var(--bg);
}

/* Başlık */
.rapor-head { display: flex; align-items: center; gap: 14px; }
.rapor-head-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 8px 20px -8px rgba(0, 102, 204, .55);
}
.rapor-title { margin: 0; font-size: 19px; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.rapor-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); max-width: 760px; line-height: 1.5; }
.rapor-sub b { color: #334155; }

/* Layout: sol rapor navigasyonu + ana içerik */
.rapor-layout { display: grid; grid-template-columns: 232px 1fr; gap: 18px; align-items: start; }
.rapor-nav { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; }
.rapor-nav-item {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 12px 13px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid #e7edf6; font-family: inherit;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 6px 16px -12px rgba(15,23,42,.18);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.rapor-nav-item:hover { transform: translateY(-1px); border-color: #cfe0f6; }
.rapor-nav-item.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,102,204,.14), 0 8px 18px -12px rgba(0,102,204,.5); }
.rapor-nav-ico { font-size: 18px; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #eef4fe; }
.rapor-nav-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rapor-nav-txt b { font-size: 13px; color: #0f172a; font-weight: 750; }
.rapor-nav-txt small { font-size: 11px; color: var(--muted); }
.rapor-nav-soon { font-size: 11px; color: #aab4c4; padding: 8px 6px; text-align: center; font-style: italic; }

.rapor-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Filtre çubuğu */
.rapor-filterbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  background: var(--surface); border: 1px solid #e7edf6; border-radius: 13px;
  padding: 13px 15px; box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 5px 14px -12px rgba(15,23,42,.16);
}
.rapor-fgroup { display: flex; flex-direction: column; gap: 5px; }
.rapor-fgroup > label { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; padding-left: 2px; }
.rapor-select {
  appearance: none; height: 38px; min-width: 140px; padding: 0 30px 0 12px;
  border: 1px solid #e6ebf3; border-radius: 9px; font-size: 12.5px; font-weight: 650;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237886a6' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: #24304f; cursor: pointer; transition: border-color .14s, box-shadow .14s;
}
.rapor-select:focus { outline: none; border-color: #9bbcf0; box-shadow: 0 0 0 3px rgba(0,102,204,.10); }
.rapor-toggle { display: inline-flex; background: #eef2f8; border-radius: 9px; padding: 3px; gap: 2px; }
.rapor-toggle button {
  border: none; background: transparent; font-family: inherit; cursor: pointer;
  height: 32px; padding: 0 13px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #64748b;
  transition: background .15s, color .15s, box-shadow .15s;
}
.rapor-toggle button.is-active { background: #fff; color: var(--accent); box-shadow: 0 2px 6px -2px rgba(15,23,42,.2); }

/* Firma chip'leri */
.rapor-firms { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.rapor-firms-label { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-right: 2px; }
.rapor-firm-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 8px;
  border: 1px solid #e2e8f0; border-radius: 999px; background: var(--surface); cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 650; color: #475569; transition: all .14s;
}
.rapor-firm-chip:hover { border-color: #cbd5e1; }
.rapor-firm-chip.is-active { border-color: var(--accent); background: #eef4fe; color: var(--primary); box-shadow: 0 0 0 1px rgba(0,102,204,.18); }
.rapor-firm-chip[data-firm="__all__"] { padding: 0 13px; font-weight: 750; }

/* Sonuç kartları */
.rapor-result { display: flex; flex-direction: column; gap: 14px; }
.rapor-card {
  background: var(--surface); border: 1px solid #e7edf6; border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 6px 16px -12px rgba(15,23,42,.18);
}
.rapor-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rapor-card-head h3 { margin: 0; font-size: 14px; font-weight: 750; color: #0f172a; }
.rapor-card-head h3 small { font-weight: 600; color: var(--muted); font-size: 12px; }
.rapor-card-hint { margin-left: auto; font-size: 11.5px; color: #94a3b8; }

/* Insight chip'leri */
.rapor-insights { display: flex; flex-wrap: wrap; gap: 10px; }
.rapor-chip {
  display: flex; flex-direction: column; gap: 2px; min-width: 150px;
  background: var(--surface); border: 1px solid #e7edf6; border-radius: 12px; padding: 11px 14px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 5px 14px -12px rgba(15,23,42,.16);
}
.rapor-chip-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.rapor-chip-v { font-size: 13px; color: #334155; font-weight: 600; }
.rapor-chip-v b { color: var(--primary); font-weight: 800; }
.rapor-chip-meta { background: #f8fafc; }

/* Isı haritası */
.rapor-heatmap-scroll { overflow: auto; max-height: 560px; border-radius: 8px; }
.rapor-heatmap { border-collapse: separate; border-spacing: 3px; width: 100%; }
.rapor-heatmap th, .rapor-heatmap td { font-size: 11.5px; }
.rapor-colhead {
  position: sticky; top: 0; z-index: 2; background: #f1f5f9; color: #475569;
  font-weight: 750; text-align: center; padding: 7px 4px; border-radius: 7px; cursor: pointer;
  min-width: 46px; transition: background .14s;
}
.rapor-colhead:hover { background: #e2e8f0; }
.rapor-colhead.is-selected { background: var(--accent); color: #fff; }
.rapor-rowhead {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; min-width: 156px; max-width: 200px;
  font-weight: 650; color: #334155; text-align: left; border-radius: 7px;
}
.rapor-rowhead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rapor-corner { z-index: 3; background: #f1f5f9; color: #94a3b8; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; justify-content: flex-start; }
.rapor-cell {
  text-align: center; font-weight: 700; padding: 7px 6px; border-radius: 7px; cursor: pointer;
  min-width: 46px; transition: filter .12s, box-shadow .12s; user-select: none;
}
.rapor-cell:hover { filter: brightness(.94); box-shadow: 0 0 0 2px rgba(15,23,42,.18) inset; }
.rapor-cell.is-selected { box-shadow: 0 0 0 2px var(--primary) inset; }

/* Zaman çizelgesi */
.rapor-chart-wrap { width: 100%; }
.rapor-chart-wrap canvas { display: block; width: 100%; }
.rapor-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.rapor-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #64748b; font-weight: 600; }
.rapor-legend-item.is-pt { color: var(--primary); font-weight: 800; }
.rapor-legend-item i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.rapor-legend-item.is-pt i { height: 4px; }

/* Tek-ay detay */
.rapor-btn-ghost { margin-left: auto; border: 1px solid #e2e8f0; background: var(--surface); color: #64748b; font-family: inherit; font-size: 12px; font-weight: 650; padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: all .14s; }
.rapor-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.rapor-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rapor-detail-firm { border: 1px solid #eef2f7; border-radius: 11px; padding: 12px; background: #fcfdff; }
.rapor-detail-firm-head { display: flex; align-items: center; gap: 8px; }
.rapor-detail-badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 8px; }
.rapor-detail-fname { font-size: 13px; color: #0f172a; }
.rapor-detail-firm-head small { color: var(--muted); font-size: 11px; margin-left: auto; }
.rapor-years { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 4px; }
.rapor-yearpill { font-size: 10.5px; background: #eef2f8; color: #64748b; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.rapor-yearpill b { color: #334155; }
.rapor-detail-prods { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rapor-detail-prods li { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #475569; }
.rapor-detail-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rapor-detail-prods li b { margin-left: auto; color: var(--primary); font-weight: 750; flex-shrink: 0; }

/* Boş / yükleniyor / hata durumları */
.rapor-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.rapor-empty.rapor-error { color: var(--danger); }
.rapor-spinner { width: 18px; height: 18px; border: 2.5px solid #dbe3ef; border-top-color: var(--accent); border-radius: 50%; animation: rapor-spin .8s linear infinite; }
@keyframes rapor-spin { to { transform: rotate(360deg); } }

@media (max-width: 880px) {
  .rapor-layout { grid-template-columns: 1fr; }
  .rapor-nav { flex-direction: row; position: static; overflow-x: auto; }
  .rapor-shell { padding: 16px 14px 40px; }
}

/* Zaman çizelgesi — hover tooltip + etkileşimli legend + Son Hareketler */
.rapor-chart-wrap { position: relative; }
.rapor-chart-wrap canvas { cursor: crosshair; }
.rapor-tooltip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; max-width: 230px;
  background: rgba(15,23,42,.96); color: #fff; border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 10px 26px -8px rgba(0,0,0,.5); font-size: 11.5px;
}
.rapor-tooltip[hidden] { display: none; }
.rapor-tt-head { font-weight: 800; font-size: 11px; color: #cbd5e1; margin-bottom: 5px; letter-spacing: .02em; }
.rapor-tt-row { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; }
.rapor-tt-row i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.rapor-tt-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rapor-tt-row b { font-weight: 800; }

.rapor-legend-item {
  border: 1px solid transparent; background: transparent; font-family: inherit; cursor: pointer;
  padding: 2px 7px; border-radius: 999px; transition: background .12s, opacity .12s;
}
.rapor-legend-item:hover { background: #f1f5f9; }
.rapor-legend-item.is-off { opacity: .38; text-decoration: line-through; }
.rapor-legend-item.is-off i { filter: grayscale(1); }

.rapor-moves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rapor-move {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px; font-size: 12.5px;
  border-bottom: 1px solid #f1f5f9;
}
.rapor-move:last-child { border-bottom: none; }
.rapor-move-when { width: 78px; flex-shrink: 0; color: #94a3b8; font-size: 11.5px; font-weight: 650; }
.rapor-move-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.rapor-move-firm { font-weight: 700; color: #1e293b; min-width: 96px; }
.rapor-move-act { color: #64748b; flex: 1; }
.rapor-move-delta { font-weight: 800; flex-shrink: 0; }
.rapor-move.is-down .rapor-move-delta, .rapor-move.is-down .rapor-move-act { color: #16a34a; }
.rapor-move.is-up .rapor-move-delta, .rapor-move.is-up .rapor-move-act { color: #dc2626; }

/* Tarih aralığı seçici (Dönem preset'inin yerine) — hafif native date input */
.rapor-date {
  height: 38px; min-width: 148px; padding: 0 10px;
  border: 1px solid #e6ebf3; border-radius: 9px; font-size: 12.5px; font-weight: 650;
  background: #fff; color: #24304f; font-family: inherit; cursor: pointer;
}
.rapor-date:focus { outline: none; border-color: #9bbcf0; box-shadow: 0 0 0 3px rgba(0,102,204,.10); }
/* İlk açılışta tarih alanlarını vurgula (henüz seçim yokken) */
.rapor-date-hl { border-color: var(--accent); animation: rapor-pulse 1.6s ease-in-out infinite; }
@keyframes rapor-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,102,204,.0); border-color: var(--accent); }
  50%      { box-shadow: 0 0 0 4px rgba(0,102,204,.18); border-color: #2f7ad6; }
}

/* Açılış yönlendirmesi (veri yokken) */
.rapor-prompt {
  display: flex; align-items: center; gap: 16px; justify-content: center;
  padding: 48px 24px; margin: 4px auto; max-width: 560px; text-align: left;
  background: var(--surface); border: 1px dashed #c7d6ec; border-radius: 14px; color: var(--text);
}
.rapor-prompt-ico { font-size: 34px; flex-shrink: 0; }
.rapor-prompt-txt { display: flex; flex-direction: column; gap: 4px; }
.rapor-prompt-txt b { font-size: 15px; color: var(--primary); }
.rapor-prompt-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rapor-prompt-txt em { font-style: normal; font-weight: 700; color: #334155; }

/* ============================================================
   TALEPLER (Sorun Bildirme) — sekme, kartlar, modallar, yazışma
   Mevcut slate paleti (--primary/--accent/--border/--muted) ile uyumlu.
   ============================================================ */
/* Geniş premium pano — sağ/sol boşluğu kullanır (pa-shell deseni: shell flex:1
   tam genişlik, iç satırlar max-width:1680 + margin auto ile ortalanır). */
.tlp-shell { flex: 1; overflow-y: auto; padding: 26px 32px 48px; }
.tlp-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 auto 22px; max-width: 1680px; }
.tlp-heading h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -.4px; }
.tlp-heading p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 820px; }

/* KPI özet şeridi — glance (görsel). Renk-aksanlı premium tile'lar. */
.tlp-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0 auto 20px; max-width: 1680px; }
.tlp-kpi {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.tlp-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #cbd5e1; }
.tlp-kpi--total::before    { background: var(--primary); }
.tlp-kpi--open::before     { background: #f59e0b; }
.tlp-kpi--in_review::before{ background: #3b82f6; }
.tlp-kpi--resolved::before { background: #22c55e; }
.tlp-kpi--closed::before   { background: #94a3b8; }
.tlp-kpi-val { font-size: 28px; font-weight: 800; color: #0f172a; line-height: 1; font-variant-numeric: tabular-nums; }
.tlp-kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }

/* Filtre barı — dropdown pill'ler (Ürünler .pm-dropdown deseni) + arama */
.tlp-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 auto 20px; max-width: 1680px; }
.tlp-filter-pills { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tlp-search-wrap { position: relative; display: flex; align-items: center; }
.tlp-search-wrap svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.tlp-search {
  width: 280px; max-width: 60vw; height: 40px; padding: 0 14px 0 38px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-family: inherit; color: var(--text); outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.tlp-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,102,204,.12); }

/* Filtre barı sağ blok — sonuç sayacı + arama tek hizada */
.tlp-filterbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tlp-result-count { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tlp-result-count strong { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }

/* "Sadece benimkiler" toggle pill — pm-dropdown-toggle ile aynı tasarım dili */
.tlp-toggle-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 16px;
  background: #fff; color: #1f2a37;
  border: 1px solid #dedede; border-radius: 999px;
  cursor: pointer; font-size: 15px; font-weight: 700; font-family: inherit;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}
.tlp-toggle-pill svg { flex-shrink: 0; }
.tlp-toggle-pill:hover { border-color: #b9c5d2; box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.tlp-toggle-pill.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Cascade'de 0 sonuç veren (seçili olmayan) seçenek — gri/pasif: çıkmaz kombinasyon kurulamaz */
.pm-dropdown-option--disabled { opacity: .42; cursor: not-allowed; pointer-events: none; }

/* Boş-durum: filtre sonuçsuz kaldığında doğrudan sıfırlama butonu */
.tlp-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tlp-empty-title { font-weight: 600; }
.tlp-empty .pm-filter-reset { border: 1px solid #fecaca; background: #fff5f5; }
.tlp-empty .pm-filter-reset:hover { background: #fee2e2; border-color: #fca5a5; }

/* Talep kartları grid — geniş ekranda 4-5 kolon */
.tlp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 0 auto; max-width: 1680px; }
.tlp-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
  padding: 16px 18px 14px 20px; cursor: pointer;
  transition: box-shadow .16s ease, transform .12s ease, border-color .16s ease;
  display: flex; flex-direction: column; gap: 11px;
}
/* Sol durum-aksan şeridi */
.tlp-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #cbd5e1; }
.tlp-card--open::before     { background: #f59e0b; }
.tlp-card--in_review::before{ background: #3b82f6; }
.tlp-card--resolved::before { background: #22c55e; }
.tlp-card--closed::before   { background: #94a3b8; }
.tlp-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.10); transform: translateY(-3px); border-color: #cbd5e1; }
.tlp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tlp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tlp-card-top-left { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
/* Kart okunmamış mesaj rozeti — tip chip'inin solunda kırmızı pill. */
.tlp-card-unread {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 6px;
  border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1; flex: 0 0 auto;
  box-shadow: 0 2px 6px -1px rgba(239,68,68,.6);
}
/* Okunmamışı olan kartı hafifçe vurgula (kırmızı kenar ipucu) */
.tlp-card--unread { border-color: #fecaca; }
.tlp-type-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: #475569;
  background: #f1f5f9; border-radius: 7px; padding: 4px 9px;
}
.tlp-card-title { font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.35; }
.tlp-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tlp-meta-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: #475569; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tlp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid #f1f5f9; font-size: 11.5px; color: var(--muted); }
.tlp-card-user { font-weight: 600; color: #475569; }

@media (max-width: 1100px) { .tlp-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tlp-kpis { grid-template-columns: 1fr 1fr; } .tlp-shell { padding: 18px 16px 40px; } }

/* Durum rozetleri (kart + detay ortak) */
.tlp-status {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 4px 11px; letter-spacing: .2px; white-space: nowrap;
}
.tlp-status-open      { background: #fef3c7; color: #92400e; }
.tlp-status-in_review { background: #dbeafe; color: #1e40af; }
.tlp-status-resolved  { background: #dcfce7; color: #166534; }
.tlp-status-closed    { background: #e2e8f0; color: #475569; }

/* Dashboard kartındaki "Sorun bildir" (⚠) ikonu — .fa-site-info ile aynı boyut */
.fa-site-report {
  background: none; border: none; cursor: pointer; padding: 0;
  width: 22px; height: 22px; border-radius: 6px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #b45309; opacity: .55; transition: all .14s ease;
}
.fa-site-report:hover { opacity: 1; background: #fef3c7; color: #92400e; }
.fa-card--capturing { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* ---- Yeni Talep / Sorun Bildir modalı (iki panel "rapor konsolu") ---- */
/* position:relative → içlerindeki bildirim/hata overlay'lerinin (absolute) çapası.
   Detay kartı SABİT yükseklik (sohbet görünümü): bildirim çıkıp kaybolunca dış kutu
   asla zıplamaz; thread flex:1 ile boşluğu doldurur (boş alan kalmaz). */
.tlp-modal-card { width: 880px; max-width: 95vw; position: relative; }
.tlp-detail-card { width: 780px; max-width: 94vw; height: min(84vh, 720px); position: relative; }

/* Navy header bandı — marka vurgusu (--primary). Beyaz başlık + ikon badge. */
.tlp-modal-head {
  padding: 17px 22px; gap: 14px; border-bottom: none;
  background: linear-gradient(135deg, var(--primary) 0%, #013f80 58%, var(--accent) 165%);
}
.tlp-head-badge {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
}
.tlp-modal-titles { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tlp-modal-title { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.2px; }
.tlp-modal-head .tlp-modal-title { color: #fff; }
.modal-header .tlp-modal-subtitle { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tlp-modal-head .tlp-modal-subtitle { color: rgba(255,255,255,.82); }
.modal-header.tlp-modal-head .modal-close { color: rgba(255,255,255,.72); font-size: 20px; }
.modal-header.tlp-modal-head .modal-close:hover { color: #fff; }

/* İki panel gövde — sol rail (tip seçimi) + sağ form. Padding panellerde. */
.tlp-modal-body { display: grid; grid-template-columns: 290px 1fr; gap: 0; padding: 0; align-items: stretch; }
.tlp-pane { display: flex; flex-direction: column; gap: 15px; padding: 20px 22px; min-width: 0; }
.tlp-pane-left { background: #f8fafc; border-right: 1px solid var(--border); gap: 13px; }

.tlp-field { display: flex; flex-direction: column; gap: 7px; }
.tlp-field[hidden] { display: none; }  /* [hidden] flex'i override etmesin (CSS gotcha) */
.tlp-label { font-size: 12.5px; font-weight: 700; color: #334155; }
.tlp-opt, .tlp-label-sfx.tlp-opt { font-weight: 500; color: var(--muted); }
.tlp-label-sfx { font-weight: 500; }
.tlp-req { color: var(--danger); font-weight: 800; }
.tlp-textarea { resize: vertical; min-height: 88px; font-family: inherit; }
/* Eksik (zorunlu) alan vurgusu */
.tlp-field--invalid .pa-input { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.12); border-radius: 10px; }
.tlp-field--invalid .tlp-type-grid { outline: 2px solid rgba(220,38,38,.45); outline-offset: 4px; border-radius: 12px; }
.tlp-field--invalid .tlp-label { color: var(--danger); }

/* Tip seçici — sol raile dikey liste (satır: ikon + etiket + aktif tik). */
.tlp-type-grid { display: flex; flex-direction: column; gap: 7px; }
.tlp-type-opt {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 11px;
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; color: #475569;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; line-height: 1.2;
}
.tlp-type-opt:hover { border-color: var(--accent); background: #fff; }
.tlp-type-opt.is-active { border-color: var(--accent); background: #eff6ff; color: var(--accent); box-shadow: 0 0 0 3px rgba(0,102,204,.1); }
.tlp-type-opt-ic { font-size: 17px; flex-shrink: 0; width: 22px; text-align: center; }
.tlp-type-opt-label { flex: 1; min-width: 0; }
.tlp-type-opt-check {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--accent); opacity: 0; transform: scale(.5);
  transition: opacity .14s ease, transform .14s ease;
}
.tlp-type-opt.is-active .tlp-type-opt-check { opacity: 1; transform: scale(1); }

/* Bağlam (dashboard'dan gelen ürün/firma) — sol rail altı */
.tlp-context {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  padding: 11px 12px; background: #eef5ff; border: 1px solid #bfdbfe; border-radius: 11px;
}
.tlp-context[hidden] { display: none; }  /* boş mavi kutu bug fix ([hidden] flex'i override etmesin) */
.tlp-ctx-label { display: block; width: 100%; font-size: 10.5px; font-weight: 700; color: #1e40af; text-transform: uppercase; letter-spacing: .5px; }

/* Görsel / ek alanı (sağ panel altı) */
.tlp-shot-heading { margin-bottom: 1px; }
.tlp-checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.tlp-checkbox[hidden] { display: none; }  /* Bug A: [hidden] inline-flex'i override etmesin → "Yeni Talep"te gizli, yalnız dashboard ⚠ akışında görünür */
.tlp-checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.tlp-shot-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tlp-file-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  border: 1px dashed var(--accent); border-radius: 8px; padding: 7px 13px; transition: background .14s ease;
}
.tlp-file-btn:hover { background: #eff6ff; }
.tlp-shot-clear { background: none; border: none; color: var(--danger); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tlp-shot-preview { margin-top: 4px; }
.tlp-shot-preview img { max-width: 100%; max-height: 200px; border: 1px solid var(--border); border-radius: 8px; display: block; }
/* Premium validasyon/hata kutusu */
/* Validasyon kutusu — footer'ın hemen ÜSTÜNde yüzen overlay (absolute). Akışta
   yer kaplamaz → görünüp gizlenince modal boyutu DEĞİŞMEZ (zıplama yok). */
.tlp-modal-error {
  /* Sadece SAĞ panele hizalı (sol rail = 290px + 22px padding) → soldaki talep
     türü seçimi banner'ın altında kalmaz. Mobilde (tek kolon) tam genişliğe döner. */
  position: absolute; left: 312px; right: 22px; bottom: 88px; z-index: 8;
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(180deg, #fff1f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca; border-left: 4px solid var(--danger);
  border-radius: 12px; padding: 13px 15px;
  box-shadow: 0 10px 26px rgba(220,38,38,.22);
  animation: tlpBarIn .18s ease;
}
.tlp-modal-error[hidden] { display: none; }
@keyframes tlpBarIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tlp-alert-ic {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #fee2e2; color: var(--danger);
}
.tlp-alert-body { flex: 1; min-width: 0; }
.tlp-alert-title { font-size: 13.5px; font-weight: 700; color: #991b1b; line-height: 1.35; }
.tlp-alert-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tlp-alert-chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700;
  color: #b91c1c; background: #fff; border: 1px solid #fecaca;
  border-radius: 999px; padding: 3px 11px;
}
@keyframes tlpShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(3px); }
}
.tlp-shake { animation: tlpShake .4s ease; }

/* ---- Detay / yazışma modalı ---- */
.tlp-detail-body { display: flex; flex-direction: column; gap: 15px; }
.tlp-d-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tlp-d-status-wrap { display: flex; align-items: center; gap: 9px; }
.tlp-d-status-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.tlp-status-select { width: auto; min-width: 150px; padding: 7px 10px; }
/* Durum kaydet butonu — select değişince belirir. Kompakt: satır yüksekliğine uy
   (pa-create-btn min-height:44px fazla iri). [hidden] explicit override ZORUNLU:
   .pa-create-btn display:inline-flex, UA [hidden]{display:none}'ı ezer → gizlenmezdi. */
.tlp-status-save { min-height: 34px; padding: 0 14px; font-size: 13px; box-shadow: none; }
.tlp-status-save[hidden] { display: none; }
.tlp-d-delete { background: none; border: 1px solid #fecaca; color: var(--danger); font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 11px; cursor: pointer; transition: background .14s ease; }
.tlp-d-delete:hover { background: #fef2f2; }
.tlp-d-meta { display: flex; flex-direction: column; gap: 0; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px; }
.tlp-d-meta-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef2f6; }
.tlp-d-meta-row:last-child { border-bottom: none; }
.tlp-d-meta-k { flex: 0 0 130px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tlp-d-meta-v { flex: 1; font-size: 13px; color: var(--text); word-break: break-word; }
.tlp-d-desc { font-size: 13.5px; color: var(--text); line-height: 1.6; white-space: pre-wrap; padding: 12px 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; }
.tlp-d-shot { display: inline-block; position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; text-decoration: none; }
.tlp-d-shot img { max-width: 100%; max-height: 320px; display: block; }
.tlp-d-shot-hint { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15,23,42,.7); color: #fff; font-size: 11px; text-align: center; padding: 4px; }

/* Yazışma thread'i */
.tlp-thread { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.tlp-thread-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 10px; }
.tlp-msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; }
.tlp-msg--user { align-self: flex-start; background: #f1f5f9; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.tlp-msg--admin { align-self: flex-end; background: #eff6ff; border: 1px solid #bfdbfe; border-bottom-right-radius: 4px; }
.tlp-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.tlp-msg-author { font-size: 12px; font-weight: 700; color: #334155; }
.tlp-msg-role { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: #94a3b8; color: #fff; }
.tlp-msg-role.is-admin { background: var(--accent); }
.tlp-msg-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.tlp-msg-body { font-size: 13.5px; color: var(--text); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* Yanıt kutusu */
.tlp-composer { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 13px; }
.tlp-composer-input { flex: 1; resize: vertical; min-height: 42px; font-family: inherit; }
.tlp-composer .pa-create-btn { flex-shrink: 0; }
.tlp-composer-side { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.tlp-composer-hint { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* Sabit yükseklikli detay kartında thread esner ve kalan boşluğu doldurur (boş alan
   kalmaz); composer altta sabit kalır, thread kendi içinde kaydırılır (yeni mesaja
   oto-kayar). min-height:0 → flex çocuğun küçülebilmesi için şart. */
.tlp-detail-body { min-height: 0; }
.tlp-thread { flex: 1 1 auto; min-height: 140px; overflow-y: auto; }

/* Durum değişimi → soluk, ortalanmış sistem aktivite satırı (normal balon DEĞİL). */
.tlp-sysline { align-self: center; max-width: 100%; padding: 2px 0; text-align: center; }
.tlp-sysline-text {
  display: inline-block; font-size: 11.5px; color: var(--muted);
  background: #f1f5f9; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 12px; line-height: 1.4;
}

/* Modal içi bildirim — başlık bandının hemen altında YÜZEN toast (absolute, akış
   dışı). Görünüp kaybolunca modal boyutu/sırası DEĞİŞMEZ (zıplama yok). */
.tlp-d-notice {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 8; max-width: calc(100% - 48px); text-align: center;
  font-size: 13px; font-weight: 600; border-radius: 10px; padding: 9px 15px;
  box-shadow: 0 8px 22px rgba(15,23,42,.18); animation: tlpNoticeIn .18s ease;
}
.tlp-d-notice--ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.tlp-d-notice--error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.tlp-d-notice[hidden] { display: none; }
@keyframes tlpNoticeIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Mail Ayarları — yeni talep bildirimi alıcı seçici */
.mail-notify-section { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.mail-notify-head { margin-bottom: 10px; }
.mail-notify-title { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.mail-notify-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.mail-notify-empty { font-size: 13px; color: var(--muted); padding: 10px 0; }
.mail-notify-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
  max-height: 230px; overflow-y: auto; padding: 2px;
}
.mail-notify-item {
  display: flex; align-items: center; gap: 9px; cursor: pointer; position: relative;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; transition: border-color .12s, background .12s;
}
.mail-notify-item:hover { border-color: #b9c5d2; }
.mail-notify-item.is-on { border-color: var(--accent); background: #eff6ff; }
.mail-notify-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.mail-notify-check {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px;
  border: 2px solid #cbd5e1; background: #fff; position: relative; transition: background .12s, border-color .12s;
}
.mail-notify-item.is-on .mail-notify-check { background: var(--accent); border-color: var(--accent); }
.mail-notify-item.is-on .mail-notify-check::after {
  content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.mail-notify-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-notify-email { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.mail-notify-count { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 9px; }

/* Dar ekran: iki panel tek kolona iner (sol rail üste). */
@media (max-width: 760px) {
  .tlp-modal-body { grid-template-columns: 1fr; }
  .tlp-pane-left { border-right: none; border-bottom: 1px solid var(--border); }
  /* Tek kolon: tür seçimi en üstte → banner alttan tam genişlik olabilir, kapatmaz. */
  .tlp-modal-error { left: 16px; right: 16px; }
}
@media (max-width: 560px) {
  .tlp-modal-card, .tlp-detail-card { width: 96vw; }
  .tlp-modal-error { margin-left: 16px; margin-right: 16px; }
  .tlp-pane { padding: 16px; }
}
