.nex-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.55;
  animation: nex-alert-in 0.22s ease both;
}

.nex-alert-out {
  animation: nex-alert-out 0.18s ease forwards;
}

@keyframes nex-alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nex-alert-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

.nex-alert-icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.nex-alert-msg {
  flex: 1;
  min-width: 0;
}

.nex-alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 4px;
  opacity: 0.55;
  transition: opacity 0.15s;
  margin-top: 1px;
  line-height: 1;
}

.nex-alert-close:hover { opacity: 1; }

.nex-alert-success {
  background: rgba(21, 128, 61, 0.1);
  border-color: rgba(22, 163, 74, 0.28);
  color: #4ade80;
}

.nex-alert-success .nex-alert-close { color: #4ade80; }

.nex-alert-error {
  background: rgba(185, 28, 28, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

.nex-alert-error .nex-alert-close { color: #f87171; }

.nex-alert-warning {
  background: rgba(180, 83, 9, 0.1);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.nex-alert-warning .nex-alert-close { color: #fbbf24; }

.nex-alert-info {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(96, 165, 250, 0.28);
  color: #93c5fd;
}

.nex-alert-info .nex-alert-close { color: #93c5fd; }

body.nex-confirm-open {
  overflow: hidden;
}

.nex-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(4px);
}

.nex-confirm-overlay.nex-confirm-visible {
  opacity: 1;
}

.nex-confirm-overlay.nex-confirm-out {
  animation: nex-confirm-overlay-out 0.2s ease forwards;
}

@keyframes nex-confirm-overlay-out {
  to { opacity: 0; }
}

.nex-confirm-box {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: nex-confirm-box-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

@keyframes nex-confirm-box-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.nex-confirm-header {
  padding: 24px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.nex-confirm-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.nex-confirm-danger .nex-confirm-icon-wrap {
  background: rgba(185, 28, 28, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.nex-confirm-warning .nex-confirm-icon-wrap {
  background: rgba(180, 83, 9, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.nex-confirm-info .nex-confirm-icon-wrap {
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.nex-confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1.3;
}

.nex-confirm-msg {
  padding: 14px 24px 0;
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  text-align: center;
  margin: 0;
}

.nex-confirm-actions {
  display: flex;
  gap: 10px;
  padding: 20px 24px 24px;
  justify-content: flex-end;
}

.nex-confirm-btn-cancel,
.nex-confirm-btn-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.nex-confirm-btn-cancel {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.nex-confirm-btn-cancel:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

.nex-confirm-btn-ok-danger {
  background: rgba(185, 28, 28, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.nex-confirm-btn-ok-danger:hover {
  background: rgba(185, 28, 28, 0.28);
  border-color: #ef4444;
  color: #fca5a5;
}

.nex-confirm-btn-ok-warning {
  background: rgba(180, 83, 9, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.nex-confirm-btn-ok-warning:hover {
  background: rgba(180, 83, 9, 0.28);
  border-color: #f59e0b;
  color: #fde68a;
}

.nex-confirm-btn-ok-info {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}

.nex-confirm-btn-ok-info:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: #60a5fa;
  color: #bfdbfe;
}

.nex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  vertical-align: middle;
  user-select: none;
}

.nex-btn:disabled,
.nex-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.nex-btn-icon-only {
  padding: 8px;
  gap: 0;
}

.nex-btn-icon-only .nex-btn-text {
  display: none;
}

.nex-btn-text-only .nex-btn-icon {
  display: none;
}

.nex-btn-blue {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.nex-btn-blue:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: #60a5fa;
  color: #bfdbfe;
}

.nex-btn-red {
  background: rgba(185, 28, 28, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.nex-btn-red i { color: #fff; }

.nex-btn-red:hover {
  background: rgba(185, 28, 28, 0.28);
  border-color: #ef4444;
  color: #fca5a5;
}

.nex-btn-yellow {
  background: rgba(161, 98, 7, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.nex-btn-yellow:hover {
  background: rgba(161, 98, 7, 0.28);
  border-color: #eab308;
  color: #fef08a;
}

.nex-btn-orange {
  background: rgba(180, 83, 9, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fb923c;
}

.nex-btn-orange:hover {
  background: rgba(180, 83, 9, 0.28);
  border-color: #f97316;
  color: #fdba74;
}

.nex-btn-password {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
  padding: 6px 8px;
  border-radius: 6px;
}

.nex-btn-password:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

.nex-btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 6px;
}

.nex-btn-sm.nex-btn-icon-only {
  padding: 5px;
}

.nex-btn-lg {
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 10px;
}

.nex-btn-lg.nex-btn-icon-only {
  padding: 11px;
}

.nex-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-secondary);
}

.nex-btn-ghost:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

.Toastify__toast-container {
  z-index: 9999;
}

.Toastify__toast {
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  backdrop-filter: blur(8px);
  border: 1px solid transparent;
  padding: 13px 16px;
  min-height: unset;
}

.Toastify__toast--success {
  background: rgba(21, 128, 61, 0.14);
  border-color: rgba(22, 163, 74, 0.3);
  color: #4ade80;
}

.Toastify__toast--error {
  background: rgba(185, 28, 28, 0.14);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.Toastify__toast--warning {
  background: rgba(180, 83, 9, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.Toastify__toast--info {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.Toastify__toast-icon {
  color: inherit;
}

.Toastify__close-button {
  color: inherit;
  opacity: 0.55;
}

.Toastify__close-button:hover {
  opacity: 1;
}

.Toastify__progress-bar--success {
  background: #4ade80;
}

.Toastify__progress-bar--error {
  background: #f87171;
}

.Toastify__progress-bar--warning {
  background: #fbbf24;
}

.Toastify__progress-bar--info {
  background: #93c5fd;
}

@media (max-width: 480px) {
  .nex-confirm-actions {
    flex-direction: column-reverse;
  }

  .nex-confirm-btn-cancel,
  .nex-confirm-btn-ok {
    width: 100%;
    justify-content: center;
  }
}

.nex-pw-segs {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.nex-pw-seg-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.nex-pw-seg {
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: var(--nex-border);
  transition: background 0.22s ease;
}

.nex-pw-seg.is-active {
  background: currentColor;
}

.nex-pw-seg-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--nex-text-muted);
  letter-spacing: 0.01em;
  opacity: 0.45;
  transition: opacity 0.22s ease, color 0.22s ease;
  white-space: nowrap;
}

.nex-auth-strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.nex-auth-strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--nex-border);
  transition: background 0.25s ease;
}

.nex-auth-strength-seg.active-weak   { background: #ef4444; }
.nex-auth-strength-seg.active-fair   { background: #f59e0b; }
.nex-auth-strength-seg.active-good   { background: #3b82f6; }
.nex-auth-strength-seg.active-strong { background: #22c55e; }

.nex-auth-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--nex-text-muted);
  margin-top: 4px;
  min-height: 14px;
  transition: color 0.25s ease;
}

.nex-otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.nex-otp-box {
  width: 52px;
  height: 58px;
  background: var(--nex-bg-input);
  border: 1.5px solid var(--nex-border);
  border-radius: 12px;
  color: var(--nex-text-primary);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  caret-color: transparent;
}

.nex-otp-box:focus {
  border-color: var(--nex-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  background: var(--nex-bg-surface);
}

.nex-otp-box.is-filled {
  border-color: var(--nex-accent);
  background: var(--nex-bg-surface);
}

.nex-otp-box.is-error {
  border-color: var(--nex-red-light);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  background: var(--nex-red-subtle);
  animation: nex-otp-shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes nex-otp-shake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%  { transform: translateX(4px); }
}

/* ── Download Widget (sağ alt köşe global) ─────────────────── */
.ndw-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--nex-bg-overlay);
  border: 1px solid var(--nex-border);
  border-radius: var(--nex-radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9990;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}

.ndw-widget.ndw-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.ndw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--nex-bg-raised);
  border-bottom: 1px solid var(--nex-border);
  gap: 8px;
}

.ndw-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--nex-text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.2px;
}

.ndw-title i {
  color: var(--nex-accent-light);
  font-size: 13px;
}

.ndw-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ndw-toggle-btn,
.ndw-close-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--nex-text-muted);
  cursor: pointer;
  font-size: 11px;
  transition: background 0.1s, color 0.1s;
  padding: 0;
}

.ndw-toggle-btn:hover,
.ndw-close-btn:hover {
  background: var(--nex-bg-overlay);
  color: var(--nex-text-primary);
}

.ndw-body {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}

.ndw-body::-webkit-scrollbar { width: 3px; }
.ndw-body::-webkit-scrollbar-track { background: transparent; }
.ndw-body::-webkit-scrollbar-thumb { background: var(--nex-border); border-radius: 2px; }

.ndw-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ndw-item {
  padding: 8px 14px;
  border-bottom: 1px solid var(--nex-border-subtle, rgba(255,255,255,0.05));
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ndw-item:last-child {
  border-bottom: none;
}

.ndw-item-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ndw-item-icon {
  font-size: 12px;
  color: var(--nex-accent-light);
  flex-shrink: 0;
}

.ndw-item.ndw-item-done .ndw-item-icon {
  color: var(--nex-green-light, #4ade80);
}

.ndw-item.ndw-item-error .ndw-item-icon {
  color: var(--nex-red-light);
}

.ndw-item-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--nex-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ndw-item-cancel {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--nex-text-muted);
  cursor: pointer;
  font-size: 10px;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
  padding: 0;
}

.ndw-item-cancel:hover {
  background: var(--nex-red-subtle);
  color: var(--nex-red-light);
}

.ndw-progress-track {
  height: 4px;
  background: var(--nex-bg-subtle, rgba(255,255,255,0.08));
  border-radius: 99px;
  overflow: hidden;
}

.ndw-progress-fill {
  height: 100%;
  background: var(--nex-accent-light);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.ndw-progress-fill.ndw-progress-done {
  background: var(--nex-green-light, #4ade80);
}

.ndw-progress-fill.ndw-progress-error {
  background: var(--nex-red-light);
}

@keyframes ndw-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.ndw-progress-fill.ndw-progress-indeterminate {
  width: 30% !important;
  animation: ndw-indeterminate 1.4s linear infinite;
}

.ndw-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--nex-text-muted);
}

.ndw-item-percent {
  font-weight: 700;
  color: var(--nex-accent-light);
  min-width: 30px;
}

.ndw-item.ndw-item-done .ndw-item-percent {
  color: var(--nex-green-light, #4ade80);
}

.ndw-item.ndw-item-error .ndw-item-percent {
  color: var(--nex-red-light);
}

.ndw-item-speed {
  flex: 1;
}

.ndw-item-size {
  flex-shrink: 0;
}