/* nService — sistema de diseño de la familia nSuite (nTrack / nBiz): "Institucional Editorial".
   Tinta profunda + cobalto eléctrico sobre papel frío. Se carga al final de los layouts para sobrescribir Bootstrap. */
:root {
  --ns-ink-950: #070d20; --ns-ink-900: #0b1430; --ns-ink-800: #111e47; --ns-ink-700: #1a2b62;
  --ns-brand-50: #eef3ff; --ns-brand-100: #dce7ff; --ns-brand-200: #b9cdff; --ns-brand-300: #8caeff; --ns-brand-400: #5d86ff;
  --ns-brand-500: #3a63fb; --ns-brand-600: #2347ec; --ns-brand-700: #1b36c4;
  --ns-night: #070d20; --ns-night-2: #050a18; --ns-ink: #111e4f; --ns-blue: #3a63fb; --ns-blue-deep: #2347ec; --ns-accent: #8caeff; --ns-bg: #f3f5fa;
  --ns-surface: #f3f5fa; --ns-paper: #fff; --ns-line: rgba(11, 20, 48, .13); --ns-line-soft: rgba(11, 20, 48, .07);
  --ns-shadow-card: 0 1px 2px rgb(11 20 48 / .05), 0 10px 28px -16px rgb(11 20 48 / .14);
  --ns-shadow-glow: 0 10px 26px -10px rgb(35 71 236 / .55);
  --bs-primary: #3a63fb; --bs-primary-rgb: 58, 99, 251; --bs-body-color: #0b1430;
  --bs-link-color: #2347ec; --bs-link-hover-color: #1b36c4;
  --bs-body-font-family: "Figtree", ui-sans-serif, system-ui, sans-serif;
}
body { font-family: "Figtree", ui-sans-serif, system-ui, sans-serif !important; background: var(--ns-surface) !important; color: var(--ns-ink-900); -webkit-font-smoothing: antialiased; }
::selection { background: var(--ns-brand-200); color: var(--ns-ink-900); }
h1, h2, h3, h4, h5, h6 { font-family: "Bricolage Grotesque", "Figtree", sans-serif; color: var(--ns-ink-900); letter-spacing: -.015em; }
h4.fw-bold, h5.fw-bold { font-weight: 700 !important; }
a { color: var(--ns-brand-600); }
.text-muted { color: rgba(11, 20, 48, .55) !important; }

/* Etiqueta superior y título de página (uso opcional en las vistas) */
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ns-brand-600); }
.page-title { font-family: "Bricolage Grotesque", "Figtree", sans-serif; font-size: 1.65rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }

/* Tarjetas */
.card { background: var(--ns-paper); border: 1px solid var(--ns-line-soft) !important; border-radius: 1rem !important; box-shadow: var(--ns-shadow-card) !important; animation: ns-rise .45s cubic-bezier(.22, 1, .36, 1) both; }
.card.shadow-sm, .card.shadow-lg { box-shadow: var(--ns-shadow-card) !important; }
.card-header { background: transparent !important; color: var(--ns-ink-900); border-bottom: 1px solid rgba(11, 20, 48, .06); padding: .8rem 1.25rem; font-weight: 600; }
.card-header.bg-primary, .card-header.bg-danger, .card-header.bg-dark, .card-header.bg-success { color: var(--ns-ink-900) !important; background: var(--ns-brand-50) !important; }
.card-header.bg-danger { background: #fff1f2 !important; color: #9f1239 !important; }
@keyframes ns-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

/* Campos */
.form-control, .form-select { border-radius: .75rem; border: 1px solid var(--ns-line); color: var(--ns-ink-900); background-color: var(--ns-paper); font-size: .875rem; }
.form-control::placeholder { color: rgba(11, 20, 48, .32); }
.form-control:focus, .form-select:focus { border-color: var(--ns-brand-500); box-shadow: 0 0 0 3px rgba(58, 99, 251, .18); }
.form-label, label.form-label { font-size: .72rem; font-weight: 600; color: rgba(11, 20, 48, .55); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--ns-brand-500); border-color: var(--ns-brand-500); }
.input-group-text { background: #f8f9fd; border-color: var(--ns-line); border-radius: .75rem; }

/* Botones */
.btn { border-radius: .75rem; font-weight: 600; font-size: .875rem; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-sm { font-size: .8rem; border-radius: .65rem; }
.btn-primary { background-image: linear-gradient(180deg, var(--ns-brand-500), var(--ns-brand-600)) !important; background-color: var(--ns-brand-500) !important; border: 0 !important; color: #fff !important; box-shadow: var(--ns-shadow-glow); }
.btn-primary:hover, .btn-primary:focus { background-image: linear-gradient(180deg, var(--ns-brand-600), var(--ns-brand-700)) !important; }
.btn-outline-primary { color: var(--ns-brand-600) !important; border-color: var(--ns-brand-300) !important; background: var(--ns-paper); }
.btn-outline-primary:hover { background: var(--ns-brand-50) !important; border-color: var(--ns-brand-400) !important; color: var(--ns-brand-700) !important; }
.btn-secondary, .btn-outline-secondary, .btn-light { background: var(--ns-paper) !important; color: var(--ns-ink-800) !important; border: 1px solid rgba(11, 20, 48, .14) !important; }
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-light:hover { background: var(--ns-brand-50) !important; border-color: var(--ns-brand-300) !important; color: var(--ns-brand-700) !important; }
.btn-success { background: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-success:hover { background: #047857 !important; }
.btn-danger { background: #e11d48 !important; border-color: #e11d48 !important; color: #fff !important; }
.btn-danger:hover { background: #be123c !important; }
.btn-outline-danger { color: #be123c !important; border-color: rgba(225, 29, 72, .35) !important; background: var(--ns-paper); }
.btn-outline-danger:hover { background: rgba(225, 29, 72, .06) !important; }
.text-primary { color: var(--ns-brand-600) !important; }
.bg-primary { background-color: var(--ns-brand-500) !important; }
.border-primary { border-color: var(--ns-brand-500) !important; }
.nav-pills .nav-link.active, .page-item.active .page-link { background-color: var(--ns-brand-500); border-color: var(--ns-brand-500); }

/* Chips (badges) y estados */
.badge, .chip { display: inline-flex; align-items: center; gap: .25rem; padding: .18rem .6rem; font-size: .7rem; font-weight: 600; border-radius: 999px; white-space: nowrap; }
.chip-brand, .badge.bg-primary { background: var(--ns-brand-50) !important; color: var(--ns-brand-700) !important; }
.badge.bg-success { background: #ecfdf5 !important; color: #047857 !important; }
.badge.bg-danger { background: #fff1f2 !important; color: #be123c !important; }
.badge.bg-warning { background: #fffbeb !important; color: #b45309 !important; }
.badge.bg-info { background: #f0f9ff !important; color: #0369a1 !important; }
.badge.bg-secondary, .badge.bg-light, .badge.bg-dark { background: rgba(11, 20, 48, .06) !important; color: rgba(11, 20, 48, .65) !important; }
.badge.bg-light { border: 0 !important; }
.badge-estado { border-radius: 999px; }

/* Tablas */
.table { --bs-table-border-color: rgba(11, 20, 48, .06); color: var(--ns-ink-900); }
.table thead th, .table > thead > tr > th { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(11, 20, 48, .45); background: #f8f9fd !important; white-space: nowrap; border-bottom: 1px solid rgba(11, 20, 48, .07); }
.table thead th a { color: inherit; text-decoration: none; }
.table-hover > tbody > tr:hover > * { background-color: rgba(238, 243, 255, .65); }
.table-light, .table-light > :not(caption) > * > * { background-color: #f8f9fd !important; }
.table-bordered > :not(caption) > * > * { border-color: rgba(11, 20, 48, .06); }
.alert { border-radius: .85rem; border: 0; }

/* Menú lateral (igual que nTrack: tinta con textura y brillo) */
.sidebar { width: 256px !important; display: flex; flex-direction: column; background-color: var(--ns-ink-950) !important;
  background-image: radial-gradient(rgba(255, 255, 255, .11) 1px, transparent 1px), radial-gradient(circle at -8% -4%, rgba(58, 99, 251, .30), transparent 42%);
  background-size: 22px 22px, 100% 100%; }
.sidebar.collapsed { width: 0 !important; }
.main-content { margin-left: 256px; }
.sidebar.collapsed + .main-content { margin-left: 0; }
.sidebar > .pt-2 { flex: 1; padding: 6px 4px 12px; }
.sidebar .brand { height: 64px; padding: 0 20px !important; display: flex; align-items: center; background: transparent !important; border: 0 !important; }
.sidebar .nav-section { font-size: 10px !important; font-weight: 700; letter-spacing: .16em !important; color: rgba(255, 255, 255, .30) !important; padding: 16px 20px 6px !important; }
.sidebar .nav-link { position: relative; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .58) !important; padding: 8px 12px !important; margin: 1px 12px !important; border-radius: 8px !important; gap: 12px !important; }
.sidebar .nav-link i { font-size: 15px; color: rgba(255, 255, 255, .40); width: 18px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
.sidebar .nav-link.active { background: rgba(58, 99, 251, .17) !important; color: #fff !important; box-shadow: none; }
.sidebar .nav-link.active i { color: var(--ns-brand-300); }
.sidebar .nav-link.active::before { content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; border-radius: 3px; background: var(--ns-brand-400); }
.sidebar .nav-link .text-danger, .sidebar .nav-link .text-primary { color: inherit !important; }
.ns-sidebar-user { position: sticky; bottom: 0; background: var(--ns-ink-950); border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 16px 16px; }
.ns-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--ns-brand-500), #8b5cf6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.ns-user-nombre { font-size: 14px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.ns-user-rol { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(140, 174, 255, .8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.ns-btn-salir { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; text-decoration: none; }
.ns-btn-salir:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.topbar { background: var(--ns-paper) !important; border-bottom: 1px solid rgba(11, 20, 48, .06) !important; padding: 10px 28px !important; }
.topbar h6 { font-family: "Bricolage Grotesque", "Figtree", sans-serif; font-weight: 700 !important; font-size: 1rem; letter-spacing: -.01em; }
.page-content { padding: 28px 32px; }
@media (max-width: 768px) { .main-content { margin-left: 0 !important; } .page-content { padding: 16px; } .topbar { padding: 10px 14px !important; } }

/* Pantallas móviles de técnicos y supervisores */
.ns-movil .topbar { background: var(--ns-ink-950) !important; color: #fff; border: 0 !important; }
.ns-movil .topbar h6 { color: #fff; }
.info-row i { color: var(--ns-brand-500) !important; }

/* Portada de ingreso */
.ns-login { min-height: 100vh; display: flex; background: var(--ns-bg); }
.ns-login-panel { position: relative; overflow: hidden; width: 46%; max-width: 620px; background: var(--ns-night); color: #fff; display: none; flex-direction: column; justify-content: space-between; padding: 40px 48px; }
@media (min-width: 992px) { .ns-login-panel { display: flex; } }
.ns-login-panel .ns-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 22px 22px; }
.ns-login-panel .ns-glow-1 { position: absolute; top: -160px; right: -160px; width: 540px; height: 540px; background: radial-gradient(circle, #3a63fb 0%, transparent 70%); opacity: .55; }
.ns-login-panel .ns-glow-2 { position: absolute; bottom: -190px; left: -100px; width: 450px; height: 450px; background: radial-gradient(circle, #8b5cf6 0%, transparent 70%); opacity: .4; }
.ns-login-panel > * { position: relative; }
.ns-login-panel .ns-eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ns-accent); font-weight: 600; }
.ns-login-panel h2 { color: #fff; font-size: 2.7rem; line-height: 1.12; font-weight: 700; margin: 14px 0 28px; letter-spacing: -.02em; }
.ns-login-panel h2 .ns-acento { color: var(--ns-accent); }
.ns-punto { display: flex; gap: 14px; margin-bottom: 18px; }
.ns-punto .ns-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; color: var(--ns-accent); font-size: 17px; }
.ns-punto strong { display: block; font-size: 14px; font-weight: 600; }
.ns-punto span { display: block; font-size: 13px; color: rgba(255, 255, 255, .62); line-height: 1.45; }
.ns-login-pie { font-size: 11px; color: rgba(255, 255, 255, .42); }
.ns-login-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.ns-login-caja { width: 100%; max-width: 400px; }
.ns-login-caja .ns-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ns-blue); font-weight: 700; }
.ns-login-caja h1 { font-size: 1.7rem; font-weight: 700; color: var(--ns-ink); margin: 6px 0 4px; letter-spacing: -.01em; }
.ns-login-caja .ns-sub { color: #64709a; font-size: 14px; margin-bottom: 22px; }
.ns-login-caja label { font-size: 12px; font-weight: 600; color: #4b5578; margin-bottom: 5px; }
.ns-login-caja .form-control { padding: 11px 14px; background: #fff; }
.ns-login-caja .ns-pass { position: relative; }
.ns-login-caja .ns-pass button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a93b2; font-size: 17px; }
.ns-login-caja .btn-primary { padding: 11px; font-weight: 600; border-radius: 12px; }
.ns-login-ayuda { text-align: center; font-size: 12px; color: #8a93b2; margin-top: 22px; }
.ns-login-logo-movil { text-align: center; margin-bottom: 26px; }
@media (min-width: 992px) { .ns-login-logo-movil { display: none; } }
