:root{
  --kh-font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --kh-radius: 14px;
  --kh-shadow: 0 10px 30px rgba(16,24,40,.08);
  --kh-bg: #ffffff;                
  --kh-fg: #111827;                
  --kh-border: #e5e7eb;            
  --kh-success: #16a34a;
  --kh-error:   #dc2626;
  --kh-warning: #f59e0b;
  --kh-info:    #2563eb;
  --kh-brand:   #bc9c22;           
}

.kh-toast{
  background: var(--kh-bg) !important;
  color: var(--kh-fg) !important;
  border: 1px solid var(--kh-border);
  box-shadow: var(--kh-shadow);
  position: relative;
}

.kh-toast::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0; width:4px;
  background: var(--kh-accent, var(--kh-brand));
  border-radius: 4px 0 0 4px;
}

.kh-toast-success,
.kh-toast-error,
.kh-toast-warning,
.kh-toast-info,
.kh-toast-loading { --kh-bg:#fff !important; }

/* Tip -> vurgu rengi (metin rengi DEĞİL; sadece ikon/çubuk için) */
.kh-toast-success{ --kh-accent: var(--kh-success); }
.kh-toast-error  { --kh-accent: var(--kh-error); }
.kh-toast-warning{ --kh-accent: var(--kh-warning); }
.kh-toast-info   { --kh-accent: var(--kh-info); }
.kh-toast-loading{ --kh-accent: var(--kh-brand); }

/* İkonu renklendir, metinler koyu kalsın */
.kh-toasts .kh-icon{ color: var(--kh-accent, var(--kh-brand)); }
.kh-toasts .kh-icon svg{ width:22px; height:22px; display:block; }
.kh-toasts .kh-title{ font-weight:700; font-size:14px; line-height:1.2; color:var(--kh-fg); }
.kh-toasts .kh-msg{ font-size:13px; line-height:1.35; color:#334155; }

/* Kapat butonu hover */
.kh-toasts .kh-close:hover{ background:#f3f4f6; }

/* Progress bar: açık zemin, vurgu renkte dolum */
.kh-toasts .kh-progress{ background:#f1f5f9; }
.kh-toasts .kh-progress > span{ background: var(--kh-accent, var(--kh-brand)) !important; }

/* CONFIRM MODAL — light */
.kh-toasts .kh-confirm-backdrop{ background: rgba(17,24,39,.32); }
.kh-toasts .kh-confirm{
  background:#fff; color: var(--kh-fg);
  box-shadow: var(--kh-shadow);
  border: 1px solid var(--kh-border);
}
.kh-toasts .kh-c-head .kh-c-icon{ color: var(--kh-brand); }
.kh-toasts .kh-c-title{ color: var(--kh-fg); }
.kh-toasts .kh-c-msg{ color:#475569; }
.kh-toasts .kh-c-actions{
  background:#f8fafc; border-top:1px solid var(--kh-border);
}
.kh-toasts .kh-btn{
  appearance:none; border:1px solid var(--kh-border);
  background:#fff; color:var(--kh-fg);
  font-weight:600; font-size:14px; border-radius:12px; padding:10px 14px; cursor:pointer;
}
.kh-toasts .kh-btn:hover{ background:#f3f4f6; }
.kh-toasts .kh-btn-primary{
  background: var(--kh-brand); border-color:#a68819; color:#111;
}
.kh-toasts .kh-btn-primary:hover{ filter: brightness(.98); }
.kh-toasts .kh-btn-danger{ background:#dc2626; border-color:#b91c1c; color:#fff; }

/* Mobil küçük rötuş */
@media (max-width:520px){
  .kh-toast{ grid-template-columns:24px 1fr auto; }
  .kh-toasts .kh-title{ font-size:13.5px; }
  .kh-toasts .kh-msg{ font-size:12.5px; }
}

.kh-toasts{
  position: fixed; z-index: 9999; pointer-events: none;
  inset: auto; padding: 12px; gap: 10px; display: flex; flex-direction: column;
}
.kh-pos-top-right   { top: 12px;  right: 12px; align-items: flex-end; }
.kh-pos-top-left    { top: 12px;  left: 12px;  align-items: flex-start; }
.kh-pos-bottom-right{ bottom: 12px; right: 12px; align-items: flex-end; }
.kh-pos-bottom-left { bottom: 12px; left: 12px;  align-items: flex-start; }
.kh-pos-top-center  { top: 12px; left: 50%; transform: translateX(-50%); }
.kh-pos-bottom-center{ bottom: 12px; left: 50%; transform: translateX(-50%); }

.kh-toast{
  width: min(92vw, 360px);
  background: var(--kh-bg); color: var(--kh-fg);
  border-radius: var(--kh-radius); box-shadow: var(--kh-shadow);
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px;
  padding: 12px 12px 10px 12px; pointer-events: auto; overflow: hidden;
  transform: translateY(12px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
  font-family: var(--kh-font);
}
.kh-toast.kh-in{ transform: translateY(0); opacity: 1; }

.kh-toasts .kh-icon{ display:flex; align-items: center; justify-content:center; margin-top: 2px; }
.kh-toasts .kh-icon svg{ width:22px; height:22px; display:block; }

.kh-toasts .kh-body{ display:flex; flex-direction: column; gap: 2px; }
.kh-toasts .kh-title{ font-weight: 700; font-size: 14px; line-height: 1.2; }
.kh-toasts .kh-msg{ font-size: 13px; opacity: .95; line-height: 1.35; }

.kh-toasts .kh-close{
  border: 0; background: transparent; color: inherit; opacity: .7; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; display:flex; align-items:center; justify-content:center;
}
.kh-toasts .kh-close:hover{ opacity: 1; background: rgba(255,255,255,.06); }

.kh-toasts .kh-toast-success{ --kh-bg: #0f172a; } /* slate bg with colored bar */
.kh-toasts .kh-toast-error  { --kh-bg: #1f2937; }
.kh-toasts .kh-toast-warning{ --kh-bg: #1f2937; }
.kh-toasts .kh-toast-info   { --kh-bg: #0f172a; }
.kh-toasts .kh-toast-loading{ --kh-bg: #111827; }

.kh-toasts .kh-progress{
  position: relative; height: 3px; grid-column: 1 / -1; border-radius: 2px; overflow: hidden;
  background: rgba(255,255,255,.12); margin-top: 8px;
}
.kh-toasts .kh-progress > span{
  display:block; height: 100%; width:0%;
  background: currentColor; transition: width linear;
}

.kh-toasts .kh-toast-success{ color: var(--kh-success); }
.kh-toasts .kh-toast-error  { color: var(--kh-error); }
.kh-toasts .kh-toast-warning{ color: var(--kh-warning); }
.kh-toasts .kh-toast-info   { color: var(--kh-info); }
.kh-toasts .kh-toast-loading{ color: var(--kh-brand); }

/* Confirm modal */
.kh-toasts .kh-confirm-backdrop{
  position: fixed; inset:0; background: rgba(0,0,0,.45); z-index: 9998;
  opacity: 0; transition: opacity .2s ease;
}
.kh-toasts .kh-confirm-backdrop.kh-in{ opacity:1; }

.kh-toasts .kh-confirm{
  position: fixed; z-index: 9999; left: 50%; top: 50%;
  transform: translate(-50%, -44%) scale(.96);
  background:#fff; color:#0f172a; width: min(92vw, 440px);
  border-radius: 16px; box-shadow: var(--kh-shadow); opacity:0; transition: transform .2s ease, opacity .2s ease;
  font-family: var(--kh-font); overflow: hidden;
}
.kh-toasts .kh-confirm.kh-in{ opacity:1; transform: translate(-50%, -50%) scale(1); }

.kh-toasts .kh-c-head{ display:flex; gap:12px; padding: 16px 16px 8px 16px; }
.kh-toasts .kh-c-icon{ width: 28px; height: 28px; margin-top: 2px; }
.kh-toasts .kh-c-title{ font-weight: 800; font-size: 16px; }

.kh-toasts .kh-c-msg{ padding: 0 16px 14px 56px; font-size: 14px; color:#334155; }

.kh-toasts .kh-c-actions{
  display:flex; justify-content: flex-end; gap: 10px; padding: 12px 16px 16px 16px; background:#f8fafc;
}
.kh-toasts .kh-btn{
  appearance: none; border: 1px solid #e5e7eb; background:#fff; color:#111827;
  font-weight: 600; font-size: 14px; border-radius: 12px; padding: 10px 14px; cursor: pointer;
}
.kh-toasts .kh-btn:hover{ background:#f1f5f9; }
.kh-toasts .kh-btn-primary{
  background: var(--kh-brand); border-color: #a68819; color:#111; 
}
.kh-toasts .kh-btn-primary:hover{ filter: brightness(.98); }
.kh-toasts .kh-btn-danger{ background:#dc2626; border-color:#b91c1c; color:#fff; }
.kh-toasts .kh-btn-danger:hover{ filter: brightness(.98); }

@media (max-width: 520px){
  .kh-toast{ grid-template-columns: 24px 1fr auto; }
  .kh-title{ font-size: 13.5px; }
  .kh-msg{ font-size: 12.5px; }
}
