:root {
  --noyan-orange: #FF6B00;
  --noyan-orange-dark: #E55A00;
  --noyan-orange-light: #FF8A33;
  --noyan-dark: #0F172A;
}

* { font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif; }
body { direction: rtl; background: #F8FAFC; color: #1E293B; }

/* ============ BUTTONS ============ */
.btn-noyan {
  background: linear-gradient(135deg, #FF6B00, #FF8A33);
  color: white; padding: 12px 28px; border-radius: 12px;
  font-weight: 600; transition: all .3s;
  box-shadow: 0 4px 15px rgba(255,107,0,.3);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: none;
}
.btn-noyan:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,107,0,.45);
}
.btn-noyan:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline-noyan {
  border: 2px solid #FF6B00; color: #FF6B00;
  padding: 10px 26px; border-radius: 12px;
  font-weight: 600; transition: all .3s;
  background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-outline-noyan:hover { background: #FF6B00; color: white; }

.btn-ghost {
  padding: 10px 20px; border-radius: 10px;
  background: transparent; color: #475569;
  font-weight: 500; transition: all .2s;
  border: none; cursor: pointer;
}
.btn-ghost:hover { background: #F1F5F9; color: #FF6B00; }

/* ============ CARDS ============ */
.card-hover { transition: all .3s; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.08); }

.gradient-text {
  background: linear-gradient(135deg, #FF6B00, #FFB347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ MAP ============ */
.map-preview {
  background:
    radial-gradient(circle at 30% 40%, rgba(255,107,0,.15), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255,107,0,.1), transparent 50%),
    linear-gradient(135deg, #ff872d, #f4f5f6);
  position: relative; overflow: hidden;
}
.map-preview::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Leaflet Map */
#noyanMap { width: 100%; height: 100%; z-index: 1; border-radius: 24px; }
.leaflet-container { font-family: 'Vazirmatn', sans-serif !important; border-radius: 24px; }
.leaflet-control-attribution { font-size: 10px !important; }

/* Pin ثابت وسط نقشه */
.center-pin {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  z-index: 500; pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(255,107,0,.5));
  animation: pin-drop 2s ease-in-out infinite;
}
@keyframes pin-drop {
  0%, 100% { transform: translate(-50%, -100%) translateY(0); }
  50% { transform: translate(-50%, -100%) translateY(-6px); }
}

/* ============ CODE ============ */
.code-block {
  background: #0F172A; color: #E2E8F0;
  border-radius: 12px; padding: 20px;
  font-family: 'Courier New', monospace;
  direction: ltr; text-align: left;
  overflow-x: auto; font-size: 13px; line-height: 1.7;
}
.code-block .key { color: #FF8A33; }
.code-block .str { color: #7DD3FC; }
.code-block .cmt { color: #64748B; }

/* ============ ANIMATIONS ============ */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .7; }
}
.pulse-dot {
  width: 10px; height: 10px; background: #22C55E;
  border-radius: 50%; animation: pulse-dot 2s infinite;
}

/* ============ SIDEBAR ============ */
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  color: #475569; font-weight: 500; transition: all .2s;
  text-decoration: none; font-size: 14px;
}
.sidebar-link:hover { background: #FFF7ED; color: #FF6B00; }
.sidebar-link.active {
  background: linear-gradient(135deg, #FF6B00, #FF8A33);
  color: white !important;
  box-shadow: 0 4px 15px rgba(255,107,0,.3);
}
.sidebar-link.active svg { color: white !important; }

/* ============ MODAL ============ */
.nm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
.nm-modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.nm-modal {
  background: white; border-radius: 24px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,.25);
  animation: slideUp .3s ease;
  position: relative;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ PASSWORD TOGGLE ============ */
.pwd-toggle {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  cursor: pointer; color: #94A3B8;
  transition: color .2s;
}
.pwd-toggle:hover { color: #FF6B00; }

/* ============ FORM ============ */
.nm-input {
  width: 100%; padding: 12px 16px;
  border-radius: 12px; border: 2px solid #E2E8F0;
  outline: none; transition: all .2s;
  font-family: inherit; font-size: 14px;
  background: white;
}
.nm-input:focus { border-color: #FF6B00; box-shadow: 0 0 0 4px rgba(255,107,0,.1); }
.nm-input:disabled { background: #F1F5F9; cursor: not-allowed; }

/* ============ TOAST ============ */
.nm-toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #0F172A; color: white;
  padding: 14px 24px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  z-index: 9999;
  transition: transform .3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 10px;
}
.nm-toast.show { transform: translateX(-50%) translateY(0); }
.nm-toast.success { background: #16A34A; }
.nm-toast.error { background: #DC2626; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #FF6B00; }

/* ============ RESPONSIVE PANEL ============ */
@media (max-width: 1023px) {
  .sidebar-mobile {
    position: fixed; top: 0; bottom: 0; right: 0;
    width: 280px; background: white;
    z-index: 60;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,.1);
    overflow-y: auto;
  }
  .sidebar-mobile.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 55;
    display: none;
  }
  .sidebar-overlay.active { display: block; }
}

/* ============ VIRTUAL KEYBOARD FRIENDLY INPUT ============ */
input[type="tel"], input[type="number"] { direction: ltr; text-align: left; }
input[type="tel"]::placeholder { text-align: right; }

/* ============ OTP INPUT ============ */
.otp-container {
  display: flex; gap: 8px; direction: ltr;
  justify-content: center;
}
.otp-input {
  width: 48px; height: 56px;
  border-radius: 12px;
  border: 2px solid #E2E8F0;
  text-align: center;
  font-size: 22px; font-weight: 700;
  outline: none;
  transition: all .2s;
  font-family: 'Courier New', monospace;
}
.otp-input:focus {
  border-color: #FF6B00;
  box-shadow: 0 0 0 4px rgba(255,107,0,.1);
  transform: scale(1.05);
}
.otp-input.filled { border-color: #FF6B00; background: #FFF7ED; }

@media (max-width: 400px) {
  .otp-input { width: 40px; height: 48px; font-size: 18px; }
}

/* ============ SIDEBAR SCROLL FIX ============ */
.sidebar-fixed {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid #F1F5F9;
  z-index: 40;
}
.sidebar-nav { flex: 1; padding: 16px; overflow-y: auto; }

@media (min-width: 1024px) {
  .main-with-sidebar { margin-right: 260px; }
}





















/* بهبود ظاهر بلوک کد */
.code-block {
  background: #0F172A;
  color: #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  font-family: 'Courier New', Consolas, monospace;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid #1E293B;
  position: relative;
  max-width: 100%;
}

.code-block code {
  font-family: inherit;
  color: inherit;
  white-space: pre;
  display: block;
}

/* اسکرول‌بار زیبا برای بلوک کد */
.code-block::-webkit-scrollbar {
  height: 8px;
}
.code-block::-webkit-scrollbar-track {
  background: #1E293B;
  border-radius: 4px;
}
.code-block::-webkit-scrollbar-thumb {
  background: #FF6B00;
  border-radius: 4px;
}
.code-block::-webkit-scrollbar-thumb:hover {
  background: #FF8A33;
}

/* موبایل: فونت کوچک‌تر */
@media (max-width: 640px) {
  .code-block {
    font-size: 11px;
    padding: 14px;
  }
}