/* ELVENSONG_EXACT_ADMIN_THEME_1_0_6
   Exact visual mapping from the current Elvensong admin source.
   CSS only: no JavaScript, API, database, Nginx or PM2 changes. */

#esw-overlay{
  --esw-bg:#020617;
  --esw-sidebar:#0f172a;
  --esw-card:#0f172a;
  --esw-slate-800:#1e293b;
  --esw-slate-700:#334155;
  --esw-slate-600:#475569;
  --esw-slate-500:#64748b;
  --esw-slate-400:#94a3b8;
  --esw-slate-300:#cbd5e1;
  --esw-blue-600:#2563eb;
  --esw-blue-700:#1d4ed8;
  background:var(--esw-bg)!important;
  color:#fff!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  -webkit-font-smoothing:antialiased;
}

/* Layout exactly follows AdminLayout.tsx: w-56, slate-900, slate-800 border. */
#esw-overlay .esw-sidebar{
  width:224px!important;
  flex:0 0 224px!important;
  box-sizing:border-box!important;
  padding:0!important;
  gap:0!important;
  overflow:hidden!important;
  background:var(--esw-sidebar)!important;
  border-right:1px solid var(--esw-slate-800)!important;
}

#esw-overlay .esw-brand{
  box-sizing:border-box!important;
  min-height:76px!important;
  padding:20px 16px!important;
  border-bottom:1px solid var(--esw-slate-800)!important;
  color:#fff!important;
  font-size:0!important;
  font-weight:700!important;
  line-height:1!important;
}
#esw-overlay .esw-brand::before{
  content:"Elvensong";
  display:block;
  color:#fff;
  font-size:16px;
  font-weight:700;
  line-height:16px;
}
#esw-overlay .esw-brand small{
  display:block!important;
  margin-top:4px!important;
  color:var(--esw-slate-500)!important;
  font-size:0!important;
  font-weight:400!important;
  line-height:16px!important;
}
#esw-overlay .esw-brand small::after{
  content:"Панель управления · Склад PRO";
  font-size:12px;
}

/* Sidebar nav mirrors p-3 space-y-1 and NavItem classes. */
#esw-overlay .esw-nav:first-of-type{margin-top:12px!important}
#esw-overlay .esw-nav{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:calc(100% - 24px)!important;
  min-height:40px!important;
  box-sizing:border-box!important;
  margin:0 12px 4px!important;
  padding:10px 12px!important;
  gap:12px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--esw-slate-400)!important;
  font-size:14px!important;
  font-weight:500!important;
  line-height:20px!important;
  text-align:left!important;
  transition:background-color .15s,color .15s!important;
}
#esw-overlay .esw-nav:hover{
  background:var(--esw-slate-800)!important;
  color:#fff!important;
  filter:none!important;
}
#esw-overlay .esw-nav.active{
  background:var(--esw-blue-600)!important;
  color:#fff!important;
}
#esw-overlay .esw-nav.active:hover{background:var(--esw-blue-600)!important}

/* Remove emoji glyphs and replace them with monochrome Lucide-like masks. */
#esw-overlay .esw-nav span{
  display:inline-flex!important;
  align-items:center!important;
  min-width:0!important;
  font-size:0!important;
  line-height:20px!important;
}
#esw-overlay .esw-nav span::after{
  color:inherit;
  font-size:14px;
  font-weight:500;
  white-space:nowrap;
}
#esw-overlay .esw-nav::before{
  content:""!important;
  display:block!important;
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
  background:currentColor!important;
  -webkit-mask-repeat:no-repeat!important;
  -webkit-mask-position:center!important;
  -webkit-mask-size:16px 16px!important;
  mask-repeat:no-repeat!important;
  mask-position:center!important;
  mask-size:16px 16px!important;
}
#esw-overlay .esw-nav.active::after{
  content:"";
  width:6px;
  height:6px;
  margin-left:auto;
  border-right:1.5px solid currentColor;
  border-top:1.5px solid currentColor;
  opacity:.6;
  transform:rotate(45deg);
}
#esw-overlay .esw-nav[data-tab="dashboard"] span::after{content:"Обзор"}
#esw-overlay .esw-nav[data-tab="stocks"] span::after{content:"Остатки"}
#esw-overlay .esw-nav[data-tab="orders"] span::after{content:"Поиск заказов"}
#esw-overlay .esw-nav[data-tab="reservations"] span::after{content:"Резервы"}
#esw-overlay .esw-nav[data-tab="inventory"] span::after{content:"Инвентаризация"}
#esw-overlay .esw-nav[data-tab="movements"] span::after{content:"Движения"}
#esw-overlay .esw-nav[data-tab="replenishment"] span::after{content:"Закупки"}
#esw-overlay .esw-nav[data-tab="settings"] span::after{content:"Настройки"}
#esw-overlay .esw-nav[data-tab="service"] span::after{content:"Сервис"}

/* Masks use inline SVGs; visual only. */
#esw-overlay .esw-nav[data-tab="dashboard"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="stocks"]::before,#esw-overlay .esw-nav[data-tab="inventory"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z M3.3 7 12 12l8.7-5 M12 22V12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z M3.3 7 12 12l8.7-5 M12 22V12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="orders"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m20 20-3.5-3.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m20 20-3.5-3.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="reservations"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="movements"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9h14 M15 5l4 4-4 4 M19 15H5 M9 19l-4-4 4-4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9h14 M15 5l4 4-4 4 M19 15H5 M9 19l-4-4 4-4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="replenishment"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='19' cy='20' r='1'/%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 8H7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='19' cy='20' r='1'/%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 8H7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
#esw-overlay .esw-nav[data-tab="settings"]::before,#esw-overlay .esw-nav[data-tab="service"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.83 2.83-.06-.06a1.7 1.7 0 0 0-1.88-.34 1.7 1.7 0 0 0-1.03 1.56V21h-4v-.08A1.7 1.7 0 0 0 9 19.37a1.7 1.7 0 0 0-1.88.34l-.06.06-2.83-2.83.06-.06A1.7 1.7 0 0 0 4.63 15 1.7 1.7 0 0 0 3.08 14H3v-4h.08A1.7 1.7 0 0 0 4.63 9a1.7 1.7 0 0 0-.34-1.88l-.06-.06 2.83-2.83.06.06A1.7 1.7 0 0 0 9 4.63 1.7 1.7 0 0 0 10 3.08V3h4v.08A1.7 1.7 0 0 0 15 4.63a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.83 2.83-.06.06A1.7 1.7 0 0 0 19.37 9 1.7 1.7 0 0 0 20.92 10H21v4h-.08A1.7 1.7 0 0 0 19.4 15Z' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.83 2.83-.06-.06a1.7 1.7 0 0 0-1.88-.34 1.7 1.7 0 0 0-1.03 1.56V21h-4v-.08A1.7 1.7 0 0 0 9 19.37a1.7 1.7 0 0 0-1.88.34l-.06.06-2.83-2.83.06-.06A1.7 1.7 0 0 0 4.63 15 1.7 1.7 0 0 0 3.08 14H3v-4h.08A1.7 1.7 0 0 0 4.63 9a1.7 1.7 0 0 0-.34-1.88l-.06-.06 2.83-2.83.06.06A1.7 1.7 0 0 0 9 4.63 1.7 1.7 0 0 0 10 3.08V3h4v.08A1.7 1.7 0 0 0 15 4.63a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.83 2.83-.06.06A1.7 1.7 0 0 0 19.37 9 1.7 1.7 0 0 0 20.92 10H21v4h-.08A1.7 1.7 0 0 0 19.4 15Z' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E")}

#esw-overlay .esw-close{
  position:relative!important;
  width:calc(100% - 24px)!important;
  min-height:36px!important;
  box-sizing:border-box!important;
  margin:auto 12px 12px!important;
  padding:8px 12px 8px 40px!important;
  border:1px solid transparent!important;
  border-top:0!important;
  border-radius:6px!important;
  background:transparent!important;
  color:var(--esw-slate-500)!important;
  font-size:12px!important;
  font-weight:500!important;
  text-align:left!important;
}
#esw-overlay .esw-close:hover{background:#450a0a4d!important;color:#f87171!important}
#esw-overlay .esw-close::before{content:"↪";position:absolute;left:13px;font-size:16px;transform:rotate(180deg)}

#esw-overlay .esw-main{background:var(--esw-bg)!important}
/* Main admin has no separate sticky toolbar: title belongs to page content. */
#esw-overlay .esw-head{
  position:static!important;
  width:100%!important;
  max-width:1024px!important;
  min-height:auto!important;
  box-sizing:border-box!important;
  margin:0 auto!important;
  padding:24px 24px 0!important;
  background:transparent!important;
  border:0!important;
  backdrop-filter:none!important;
}
#esw-overlay .esw-title{color:#fff!important;font-size:20px!important;font-weight:700!important;line-height:28px!important}
#esw-overlay .esw-sub{margin-top:2px!important;color:var(--esw-slate-400)!important;font-size:14px!important;line-height:20px!important}
#esw-overlay .esw-content{width:100%!important;max-width:1024px!important;box-sizing:border-box!important;margin:0 auto!important;padding:24px!important}

#esw-overlay .esw-grid{gap:16px!important}
#esw-overlay .esw-card,#esw-overlay .esw-panel{background:var(--esw-card)!important;border:1px solid var(--esw-slate-800)!important;border-radius:12px!important;box-shadow:none!important}
#esw-overlay .esw-card{padding:16px!important;min-height:unset!important}
#esw-overlay .esw-card b{margin-top:4px!important;color:#fff!important;font-size:24px!important;font-weight:700!important;line-height:32px!important}
#esw-overlay .esw-card span{color:var(--esw-slate-400)!important;font-size:12px!important;line-height:16px!important}
#esw-overlay .esw-panel{margin-top:16px!important;padding:16px!important}
#esw-overlay .esw-panel h3{margin:0 0 12px!important;color:var(--esw-slate-300)!important;font-size:14px!important;font-weight:600!important;line-height:20px!important}

#esw-overlay .esw-toolbar{gap:12px!important;margin-bottom:16px!important}
#esw-overlay .esw-field label{margin-bottom:4px!important;color:var(--esw-slate-400)!important;font-size:12px!important;line-height:16px!important}
#esw-overlay .esw-input,#esw-overlay .esw-select,#esw-overlay .esw-textarea{
  min-height:36px!important;
  box-sizing:border-box!important;
  padding:8px 12px!important;
  border:1px solid var(--esw-slate-600)!important;
  border-radius:8px!important;
  background:var(--esw-slate-800)!important;
  color:#fff!important;
  font-family:inherit!important;
  font-size:14px!important;
  line-height:20px!important;
  box-shadow:none!important;
}
#esw-overlay .esw-input::placeholder,#esw-overlay .esw-textarea::placeholder{color:var(--esw-slate-500)!important}
#esw-overlay .esw-input:focus,#esw-overlay .esw-select:focus,#esw-overlay .esw-textarea:focus{outline:none!important;border-color:#3b82f6!important;box-shadow:0 0 0 1px #3b82f6!important}

#esw-overlay .esw-btn{
  min-height:36px!important;
  padding:8px 16px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:var(--esw-blue-600)!important;
  color:#fff!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:500!important;
  line-height:20px!important;
  box-shadow:none!important;
  transition:background-color .15s,border-color .15s,color .15s!important;
}
#esw-overlay .esw-btn:hover{background:var(--esw-blue-700)!important;filter:none!important}
#esw-overlay .esw-btn.secondary{background:transparent!important;border-color:var(--esw-slate-600)!important;color:var(--esw-slate-400)!important}
#esw-overlay .esw-btn.secondary:hover{background:var(--esw-slate-700)!important;color:#fff!important}
#esw-overlay .esw-btn.good{background:#16a34a!important}.esw-btn.good:hover{background:#15803d!important}
#esw-overlay .esw-btn.warn{background:#f97316!important}.esw-btn.warn:hover{background:#ea580c!important}
#esw-overlay .esw-btn.danger{background:#dc2626!important}.esw-btn.danger:hover{background:#b91c1c!important}

#esw-overlay .esw-table-wrap{overflow:hidden auto!important;border:1px solid var(--esw-slate-800)!important;border-radius:12px!important;background:var(--esw-slate-900)!important}
#esw-overlay .esw-table{font-size:14px!important}
#esw-overlay .esw-table th{position:static!important;padding:12px 16px!important;background:transparent!important;border-bottom:1px solid var(--esw-slate-800)!important;color:var(--esw-slate-400)!important;font-size:12px!important;font-weight:500!important;text-transform:none!important;letter-spacing:0!important}
#esw-overlay .esw-table td{padding:12px 16px!important;border-top:1px solid #1e293b80!important;color:var(--esw-slate-300)!important;font-size:12px!important;line-height:18px!important}
#esw-overlay .esw-table tbody tr:hover td{background:#1e293b66!important}
#esw-overlay .esw-badge{padding:4px 10px!important;border:1px solid var(--esw-slate-700)!important;border-radius:9999px!important;background:transparent!important;font-size:12px!important;font-weight:500!important}
#esw-overlay .esw-badge.good{border-color:#166534!important;background:#052e164d!important;color:#4ade80!important}
#esw-overlay .esw-badge.warn{border-color:#92400e!important;background:#451a034d!important;color:#fbbf24!important}
#esw-overlay .esw-badge.bad{border-color:#991b1b!important;background:#450a0a4d!important;color:#f87171!important}
#esw-overlay .esw-note,#esw-overlay .esw-empty,#esw-overlay .esw-loading{color:var(--esw-slate-500)!important;font-size:12px!important}
#esw-overlay .esw-search-results{background:var(--esw-slate-800)!important;border:1px solid var(--esw-slate-600)!important;border-radius:8px!important;box-shadow:0 20px 25px -5px #0006!important}
#esw-overlay .esw-search-item{padding:8px 12px!important;border-bottom:1px solid var(--esw-slate-700)!important;font-size:14px!important}
#esw-overlay .esw-search-item:hover{background:var(--esw-slate-700)!important}
#esw-overlay .esw-danger-note{border:1px solid #7f1d1d80!important;border-radius:8px!important;background:#450a0a4d!important;color:#fca5a5!important}
#esw-overlay .esw-toast{border-radius:8px!important;font-size:14px!important}

#esw-overlay *{scrollbar-width:thin;scrollbar-color:var(--esw-slate-700) var(--esw-sidebar)}

@media(max-width:800px){
  #esw-overlay .esw-sidebar{width:64px!important;flex-basis:64px!important;padding:0!important}
  #esw-overlay .esw-brand{min-height:52px!important;padding:16px 8px!important;text-align:center!important}
  #esw-overlay .esw-brand::before{content:"ES";font-size:16px}
  #esw-overlay .esw-brand small{display:none!important}
  #esw-overlay .esw-nav{width:48px!important;margin:0 8px 4px!important;padding:10px!important;justify-content:center!important}
  #esw-overlay .esw-nav span,#esw-overlay .esw-nav.active::after{display:none!important}
  #esw-overlay .esw-close{width:48px!important;margin:auto 8px 8px!important;padding:8px!important;font-size:0!important;text-align:center!important}
  #esw-overlay .esw-close::before{position:static;display:block;transform:rotate(180deg)}
  #esw-overlay .esw-head{padding:16px 12px 0!important}
  #esw-overlay .esw-content{padding:16px 12px!important}
}
