/* nc-polish.css — NodoCargo UI Polish System */
/* © 2026 NodoCargo. TODOS LOS DERECHOS RESERVADOS. DNDA en trámite. */

/* -- ANIMACIONES BASE -------------------------------------------------------- */
@keyframes nc-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nc-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes nc-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes nc-pulse-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234,88,12,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(234,88,12,0); }
}
@keyframes nc-spin {
  to { transform: rotate(360deg); }
}
@keyframes nc-toast-in {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* -- ENTRADA DE PAGINA ------------------------------------------------------- */
body > *:not(#nc-nav-bar):not(script):not(style) {
  animation: nc-fade-up 0.3s ease-out both;
}

/* -- BOTONES PRIMARIOS ------------------------------------------------------- */
button[class*="primary"],
.btn-primary,
button[style*="EA580C"],
input[type="submit"] {
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
button[class*="primary"]:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234,88,12,0.35);
}
button[class*="primary"]:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(234,88,12,0.2);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Ripple effect en click */
button::after {
  content: '';
  position: absolute; border-radius: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.15);
  transform: translate(-50%,-50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}
button:active::after {
  width: 200px; height: 200px; opacity: 0;
}

/* -- INPUTS Y SELECTS -------------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
select,
textarea {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus:not([type="checkbox"]):not([type="radio"]),
select:focus,
textarea:focus {
  outline: none;
  border-color: #EA580C !important;
  box-shadow: 0 0 0 3px rgba(234,88,12,0.15);
}

/* -- CARDS / PANELS ---------------------------------------------------------- */
[class*="card"],
[class*="panel"],
[class*="widget"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
[class*="card"]:hover,
[class*="panel"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(234,88,12,0.1);
}

/* -- SKELETON LOADER --------------------------------------------------------- */
.nc-skeleton {
  background: linear-gradient(90deg, #0F2340 25%, #1a3565 50%, #0F2340 75%);
  background-size: 400px 100%;
  animation: nc-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.nc-skeleton-text  { height: 14px; margin-bottom: 8px; }
.nc-skeleton-title { height: 22px; margin-bottom: 12px; width: 60%; }
.nc-skeleton-btn   { height: 36px; width: 120px; border-radius: 8px; }

/* -- SPINNER ----------------------------------------------------------------- */
.nc-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(234,88,12,0.2);
  border-top-color: #EA580C;
  border-radius: 50%;
  animation: nc-spin 0.7s linear infinite;
  display: inline-block;
}

/* -- TOAST NOTIFICATIONS ----------------------------------------------------- */
#nc-toast-container {
  position: fixed; top: 68px; right: 16px;
  z-index: 99999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.nc-toast {
  background: #0D1525;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  color: #F2EDE4; min-width: 260px; max-width: 360px;
  animation: nc-toast-in 0.25s ease-out both;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nc-toast-success { border-left: 3px solid #22C55E; }
.nc-toast-error   { border-left: 3px solid #EF4444; }
.nc-toast-info    { border-left: 3px solid #3B82F6; }
.nc-toast-warning { border-left: 3px solid #EA580C; }
.nc-toast-icon    { font-size: 16px; flex-shrink: 0; }
.nc-toast-progress {
  position: absolute; bottom: 0; left: 0;
  height: 2px; background: #EA580C;
  border-radius: 0 0 10px 10px;
  animation: nc-toast-progress var(--duration, 4s) linear forwards;
}
@keyframes nc-toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* -- MODAL ANIMATIONS -------------------------------------------------------- */
[class*="modal"]:not(.nc-modal-hidden) {
  animation: nc-scale-in 0.18s ease-out both;
}

/* -- TABLA ROWS -------------------------------------------------------------- */
tr { transition: background 0.1s ease; }
tbody tr:hover { background: rgba(255,255,255,0.03) !important; }

/* -- LINKS / NAV ITEMS ------------------------------------------------------- */
a { transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { opacity: 0.85; }

/* -- FOCUS VISIBLE (accesibilidad) ------------------------------------------ */
:focus-visible {
  outline: 2px solid #EA580C;
  outline-offset: 2px;
  border-radius: 4px;
}

/* -- SCROLLBAR CUSTOM -------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #060B14; }
::-webkit-scrollbar-thumb { background: #1E3050; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #EA580C; }

/* -- SELECCION DE TEXTO ------------------------------------------------------ */
::selection {
  background: rgba(234,88,12,0.25);
  color: #F2EDE4;
}

/* -- MOBILE ------------------------------------------------------------------ */
@media (max-width: 768px) {
  [class*="card"]:hover,
  [class*="panel"]:hover {
    transform: none;
  }
  button[class*="primary"]:hover:not(:disabled) {
    transform: none;
  }
}
