/* SoftMK - Celeste theme overrides */

/* 1) Variables (si la plantilla usa variables CSS, esto ya cambia casi todo) */
:root{
  --primary: #38BDF8;        /* celeste */
  --primary-2: #0EA5E9;      /* sky-500 */
  --accent: #22D3EE;         /* cyan */
  --accent-2: #60A5FA;       /* blue */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger:  #EF4444;
}

/* 2) Botones principales */
.btn-primary{
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #60A5FA 100%) !important;
  border-color: rgba(56,189,248,.35) !important;
  box-shadow: 0 10px 25px rgba(56,189,248,.20) !important;
}
.btn-primary:hover,
.softmk-btn-primary:hover{
  filter: brightness(1.05);
}

/* 3) Links/estado activo del menú */
.nav-link.active{
  background: rgba(56,189,248,.18) !important;
  border-color: rgba(56,189,248,.35) !important;
  color: #e6f7ff !important;
}

/* 4) Orbes/fondos (si la plantilla usa estas clases) */
.orb-1{ background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.55), transparent 60%) !important; }
.orb-2{ background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.45), transparent 60%) !important; }
.orb-3{ background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.35), transparent 60%) !important; }

/* SoftMK buttons (consistent pills) */
.softmk-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.softmk-btn{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  padding: .48rem .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  text-decoration: none;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  min-height: 38px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}

.softmk-btn:hover,
.sidebar-toggle:hover,
.mobile-menu-toggle-inline:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}

.softmk-btn-primary{
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #60A5FA 100%);
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 10px 25px rgba(56,189,248,.18);
}

.softmk-btn-danger{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.35);
  color: rgba(255,220,220,.95);
}

.softmk-btn-danger:hover{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.5);
}

/* Para botones dentro de <button> también */
button.softmk-btn{ cursor:pointer; }

.softmk-btn[disabled],
.softmk-btn:disabled{
  cursor: not-allowed;
  opacity: .68;
  transform: none !important;
  filter: saturate(.82);
}

.softmk-progress-btn{
  position: relative;
}

.softmk-btn-spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: rgba(255,255,255,.95);
  display: none;
  flex: 0 0 auto;
  animation: softmk-spin .85s linear infinite;
}

.softmk-progress-btn.is-loading .softmk-btn-spinner{
  display: inline-flex;
}

.softmk-page-busy{
  overflow: hidden;
}

.softmk-action-progress-overlay{
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.softmk-action-progress-overlay[hidden]{
  display: none !important;
}

.softmk-action-progress-card{
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 52px rgba(15, 23, 42, .18);
  color: rgba(255,255,255,.94);
}

.softmk-action-progress-title{
  margin: 0;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.2;
  font-weight: 700;
}

.softmk-action-progress-message{
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: .94rem;
  line-height: 1.45;
}

.softmk-action-progress-bar{
  position: relative;
  width: 100%;
  height: 6px;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}

.softmk-action-progress-bar-fill{
  position: absolute;
  top: 0;
  left: -32%;
  width: 32%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #60A5FA 100%);
  animation: softmk-progress-slide 1.2s ease-in-out infinite;
}

@keyframes softmk-spin{
  to{
    transform: rotate(360deg);
  }
}

@keyframes softmk-progress-slide{
  0%{
    left: -35%;
  }
  100%{
    left: 100%;
  }
}

@media (max-width: 900px){
  .softmk-action-progress-overlay{
    padding: 18px;
  }

  .softmk-action-progress-card{
    width: min(360px, 100%);
    padding: 20px 18px;
    border-radius: 22px;
  }

  .softmk-action-progress-title{
    font-size: 1.05rem;
  }

  .softmk-action-progress-message{
    font-size: .9rem;
  }
}

.softmk-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; }

/* Mejor layout para lista de MikroTiks */
.softmk-list{
  max-width: 920px;
}
/* Glass table improved */
.softmk-table-card{
  padding: .35rem .35rem;
}

.softmk-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
}

.softmk-table thead th{
  text-align: left;
  font-weight: 800;
  padding: 1rem .95rem;
  border-bottom: 1px solid rgba(255,255,255,.14);
  opacity: .95;
}

.softmk-table tbody td{
  padding: .95rem .95rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: middle;
}

.softmk-table tbody tr:hover{
  background: rgba(255,255,255,.035);
}

.softmk-td-muted{ opacity:.82; }

.softmk-actions-cell{
  text-align: right;
  white-space: nowrap;
}

.softmk-actions-inline{
  display:inline-flex;
  gap:.55rem;
  flex-wrap:nowrap;       /* clave: NO apilar */
  align-items:center;
  justify-content:flex-end;
}

.softmk-actions-inline form{ margin:0; }

.badge{
  padding:.38rem .65rem !important;
  font-weight:700 !important;
}

.badge.bg-primary{
  background: rgba(59,130,246,.22) !important;
  color: #dbeafe !important;
  border: 1px solid rgba(96,165,250,.38) !important;
}

.badge.bg-success{ background-color:#0EA5E9 !important; } /* celeste para “UP/Activo” */

.badge.bg-warning{
  background: rgba(255, 193, 7, .18) !important;
  color: #ffe08a !important;
  border: 1px solid rgba(255, 193, 7, .45) !important;
}

.badge.bg-danger{
  background: rgba(220, 53, 69, .18) !important;
  color: #ffb3bd !important;
  border: 1px solid rgba(220, 53, 69, .45) !important;
}

.badge.bg-secondary{
  background: rgba(108, 117, 125, .18) !important;
  color: #d3d7db !important;
  border: 1px solid rgba(108, 117, 125, .45) !important;
}

.badge.softmk-log-ok-cut{
  background: rgba(245,158,11,.18) !important;
  color: #ffe08a !important;
  border: 1px solid rgba(245,158,11,.42) !important;
}

.badge.softmk-log-ok-activate{
  background: rgba(34,197,94,.18) !important;
  color: #b7f7cf !important;
  border: 1px solid rgba(34,197,94,.40) !important;
}

.softmk-text-warning{
  color: #ffe08a;
}

.softmk-text-success{
  color: #9ff0c3;
}

.softmk-text-secondary{
  color: #d3d7db;
}

/* SoftMK toast (mensaje pequeño tipo viñeta) */
.softmk-toast-wrap{
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 48px);
}

.softmk-toast{
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255,255,255,.14);
  padding: .85rem .9rem;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.softmk-toast ul{
  margin: 0;
  padding-left: 1.15rem;
}

.softmk-toast li{
  margin: .15rem 0;
  opacity: .92;
}

.softmk-toast-icon{
  font-size: 1.15rem;
  line-height: 1;
  margin-top: .1rem;
}

.softmk-toast-close{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.9);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---- SoftMK: Inputs estilo glass (evita inputs blancos) ---- */
.main-content input[type="text"],
.main-content input[type="number"],
.main-content input[type="password"],
.main-content input[type="email"],
.main-content input[type="tel"],
.main-content input[type="url"],
.main-content select,
.main-content textarea {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  border-radius: 16px !important;
  padding: .75rem .95rem !important;
  outline: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) !important;
}

.main-content input::placeholder,
.main-content textarea::placeholder {
  color: rgba(255,255,255,.55) !important;
}

/* checkbox acorde */
.main-content input[type="checkbox"]{
  accent-color: #31c3ff;
}

/* Quitar spinners en inputs number (Chrome/Edge/Safari) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Quitar spinners en Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
/* --- Fix: opciones de <select> legibles (dropdown) --- */
select option,
select optgroup {
  background-color: #0f1a17 !important;
  color: #e8f3ef !important;
}

/* En algunos navegadores, el dropdown usa el <select> mismo */
select {
  color-scheme: dark;
}

html[data-theme="light"] select option,
html[data-theme="light"] select optgroup {
  background-color: #ffffff !important;
  color: #111827 !important;
}

html[data-theme="light"] select {
  color-scheme: light;
}

.login-brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  margin-bottom:1.25rem;
}

.login-logo-img{
  width:96px;
  height:96px;
  object-fit:contain;
  display:block;
  margin:0 auto .85rem auto;
  padding:10px;
  background:rgba(255,255,255,.06);
}

.login-title{
  margin:0;
  font-size:2rem;
  font-weight:800;
  line-height:1.1;
}

.login-subtitle{
  margin:.45rem 0 0 0;
  opacity:.8;
}

.sidebar-logo-img{
  width:36px;
  height:36px;
  object-fit:contain;
  display:block;
  border-radius:12px;
}

.theme-toggle-inline{
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.75);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.theme-toggle-inline:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}

.theme-toggle-inline svg{
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* =========================
   MODO CLARO: MEJOR CONTRASTE
   ========================= */

html[data-theme="light"] body{
  color:#1f2937;
}

/* Sidebar / menú lateral */
html[data-theme="light"] .sidebar,
html[data-theme="light"] aside{
  background: rgba(255,255,255,.72) !important;
  border-right: 1px solid rgba(15,23,42,.08) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .sidebar a,
html[data-theme="light"] .sidebar .nav-link{
  color:#334155 !important;
}

html[data-theme="light"] .sidebar a:hover,
html[data-theme="light"] .sidebar .nav-link:hover{
  background: rgba(59,130,246,.10) !important;
  color:#0f172a !important;
}

html[data-theme="light"] .sidebar .active,
html[data-theme="light"] .sidebar a.active,
html[data-theme="light"] .sidebar .nav-link.active{
  background: rgba(59,130,246,.18) !important;
  color:#0f172a !important;
  border: 1px solid rgba(59,130,246,.18) !important;
}

/* Paneles / tarjetas */
html[data-theme="light"] .glass-card,
html[data-theme="light"] .card{
  background: rgba(255,255,255,.58) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.06) !important;
  color:#111827 !important;
}

/* Formularios */
html[data-theme="light"] .tm-form-control,
html[data-theme="light"] .form-control,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  color:#111827 !important;
  box-shadow: 0 6px 18px rgba(15,23,42,.04) !important;
}

html[data-theme="light"] .tm-form-control::placeholder,
html[data-theme="light"] .form-control::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#6b7280 !important;
  opacity:1 !important;
}

html[data-theme="light"] .tm-form-control:focus,
html[data-theme="light"] .form-control:focus,
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus{
  background:#ffffff !important;
  border-color: rgba(56,189,248,.75) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,.18) !important;
  color:#111827 !important;
  outline:none !important;
}

/* Labels */
html[data-theme="light"] label,
html[data-theme="light"] .form-label{
  color:#111827 !important;
}

/* Texto secundario */
html[data-theme="light"] .softmk-td-muted,
html[data-theme="light"] .muted{
  color:#6b7280 !important;
  opacity:1 !important;
}

/* Switch de tema */
html[data-theme="light"] .theme-toggle-inline{
  background: rgba(255,255,255,.88) !important;
  color:#111827 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.10) !important;
}

/* Tablas */
html[data-theme="light"] table,
html[data-theme="light"] .table{
  color:#111827 !important;
}

html[data-theme="light"] .table thead th,
html[data-theme="light"] table thead th{
  color:#475569 !important;
}

html[data-theme="light"] .table tbody tr,
html[data-theme="light"] table tbody tr{
  border-color: rgba(15,23,42,.08) !important;
}

/* =========================
   MODO CLARO: ETIQUETAS Y CHIPS
   ========================= */

html[data-theme="light"] .badge{
  border-radius: 999px !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .badge.bg-primary{
  background: rgba(59,130,246,.14) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(59,130,246,.24) !important;
}

/* Estado Activo */
html[data-theme="light"] .badge.bg-success{
  background: rgba(14,165,233,.18) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(14,165,233,.28) !important;
}

html[data-theme="light"] .softmk-action-progress-overlay{
  background: rgba(148, 163, 184, .18);
}

html[data-theme="light"] .softmk-action-progress-card{
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 20px 42px rgba(15,23,42,.10);
  color: #0f172a;
}

html[data-theme="light"] .softmk-action-progress-message{
  color: rgba(15,23,42,.72);
}

html[data-theme="light"] .softmk-action-progress-bar{
  background: rgba(15,23,42,.08);
}

/* Estado Corte / advertencia */
html[data-theme="light"] .badge.bg-warning{
  background: rgba(245,158,11,.16) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245,158,11,.28) !important;
}

/* Suspendido / pendiente / peligro */
html[data-theme="light"] .badge.bg-danger{
  background: rgba(239,68,68,.14) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239,68,68,.26) !important;
}

/* Baja / neutro */
html[data-theme="light"] .badge.bg-secondary{
  background: rgba(100,116,139,.14) !important;
  color: #475569 !important;
  border: 1px solid rgba(100,116,139,.24) !important;
}

html[data-theme="light"] .badge.softmk-log-ok-cut{
  background: rgba(245,158,11,.16) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245,158,11,.28) !important;
}

html[data-theme="light"] .badge.softmk-log-ok-activate{
  background: rgba(22,163,74,.14) !important;
  color: #166534 !important;
  border: 1px solid rgba(22,163,74,.26) !important;
}

html[data-theme="light"] .softmk-text-warning{
  color: #b45309;
}

html[data-theme="light"] .softmk-text-success{
  color: #0369a1;
}

html[data-theme="light"] .softmk-text-secondary{
  color: #475569;
}

/* Filtro activo */
html[data-theme="light"] .btn-primary{
  color: #ffffff !important;
}

/* Texto de chips deshabilitados o poco visibles */
html[data-theme="light"] .btn:disabled,
html[data-theme="light"] .btn.disabled{
  opacity: .72 !important;
}

/* =========================
   MODO CLARO: BOTONES SOFTMK
   ========================= */

html[data-theme="light"] .softmk-btn{
  background: rgba(255,255,255,.92) !important;
  color: #334155 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 6px 18px rgba(15,23,42,.06) !important;
}

html[data-theme="light"] .softmk-btn:hover{
  background: rgba(255,255,255,1) !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.18) !important;
}

/* Primarios: mantener azul fuerte */
html[data-theme="light"] .softmk-btn-primary{
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #60A5FA 100%) !important;
  color: #ffffff !important;
  border-color: rgba(56,189,248,.30) !important;
  box-shadow: 0 10px 25px rgba(56,189,248,.16) !important;
}

html[data-theme="light"] .softmk-btn-primary:hover{
  filter: brightness(1.03);
  color: #ffffff !important;
}

/* Danger: rojo visible en claro */
html[data-theme="light"] .softmk-btn-danger{
  background: rgba(239,68,68,.10) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239,68,68,.24) !important;
}

html[data-theme="light"] .softmk-btn-danger:hover{
  background: rgba(239,68,68,.16) !important;
  color: #991b1b !important;
  border-color: rgba(239,68,68,.32) !important;
}

/* Botones deshabilitados o muy tenues */
html[data-theme="light"] .softmk-btn[disabled],
html[data-theme="light"] .softmk-btn.disabled{
  opacity: .75 !important;
  color: #94a3b8 !important;
}

/* =========================
   MODO CLARO: TABLA CLIENTES
   ========================= */

html[data-theme="light"] .softmk-table thead th{
  color: #475569 !important;
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
}

html[data-theme="light"] .softmk-table tbody td{
  border-bottom: 1px solid rgba(15,23,42,.06) !important;
}

html[data-theme="light"] .softmk-table tbody tr:hover{
  background: rgba(59,130,246,.04) !important;
}

html[data-theme="light"] .softmk-td-muted{
  color: #64748b !important;
  opacity: 1 !important;
}

/* =========================
   BADGES DETALLE CLIENTE
   Usa clases específicas para no pisar los badges globales
   ========================= */

/* Base dark mode (mantiene buen contraste) */
.badge-fact-success{
  background: rgba(25,135,84,.18) !important;
  color: #9ff0c3 !important;
  border: 1px solid rgba(25,135,84,.45) !important;
}

.badge-fact-danger{
  background: rgba(220,53,69,.18) !important;
  color: #ffb3bd !important;
  border: 1px solid rgba(220,53,69,.45) !important;
}

/* Solo modo claro */
html[data-theme="light"] .badge-fact-success{
  background: rgba(22,163,74,.14) !important;
  color: #166534 !important;
  border: 1px solid rgba(22,163,74,.26) !important;
}

html[data-theme="light"] .badge-fact-danger{
  background: rgba(239,68,68,.12) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239,68,68,.26) !important;
}

/* ===== SoftMK desktop auto-fit ===== */
:root {
  --sidebar-width: clamp(232px, 16vw, 268px);
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-width: 0;
}

.dashboard {
  display: block !important;
  min-height: 100vh;
  width: 100%;
  max-width: none !important;
}

.sidebar {
  width: var(--sidebar-width) !important;
  padding: 20px 16px 22px !important;
}

.main-content {
  box-sizing: border-box;
  margin-left: var(--sidebar-width) !important;
  width: calc(100vw - var(--sidebar-width)) !important;
  max-width: none !important;
  padding: 24px clamp(18px, 2vw, 30px) !important;
  min-width: 0;
  overflow-x: hidden;
}

.softmk-main-shell,
.softmk-page-shell,
.softmk-page-shell > *,
.softmk-table-wrap {
  width: 100%;
  max-width: none !important;
  min-width: 0;
}

.topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  position: relative;
  z-index: 30;
}

.topbar-left {
  flex: 1 1 320px;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex: 0 1 auto;
  flex-wrap: wrap;
  margin-left: auto;
  position: relative;
  z-index: 40;
}

.topbar .page-title {
  margin: 0;
  line-height: 1.1;
}

.topbar-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  opacity: .88;
  font-weight: 500;
  min-width: 0;
}

.topbar-username {
  line-height: 1;
}

.topbar-user-sub {
  font-size: .82rem;
  opacity: .72;
  line-height: 1.15;
}

.topbar-user-menu{
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  z-index: 60;
}

.topbar-user-trigger{
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: inherit;
  min-height: 44px;
  padding: .5rem .8rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: min(320px, 100%);
}

.topbar-user-trigger:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.24);
}

.topbar-user-trigger:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(56,189,248,.24);
}

.topbar-user-caret{
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: .72;
  flex: 0 0 auto;
  transition: transform .18s ease, opacity .18s ease;
}

.topbar-user-menu.is-open .topbar-user-caret{
  transform: rotate(-135deg) translateY(-1px);
  opacity: .95;
}

.topbar-user-dropdown{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: .45rem;
  border-radius: 20px;
  background: rgba(15,23,42,.86);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 42px rgba(15,23,42,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  gap: .22rem;
  z-index: 80;
}

.topbar-user-dropdown[hidden]{
  display: none !important;
}

.topbar-user-dropdown-item{
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .7rem .85rem;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}

.topbar-user-dropdown-item:hover{
  background: rgba(255,255,255,.10);
  color: #7dd3fc;
  transform: translateY(-1px);
}

.topbar-user-dropdown-item.is-active{
  background: rgba(56,189,248,.14);
  color: #dff6ff;
}

.topbar-user-dropdown-form {
  margin: 0;
}

.topbar-user-dropdown-submit{
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.topbar-user-dropdown-item-danger{
  color: #fecaca;
}

.topbar-user-dropdown-item-danger:hover{
  background: rgba(239,68,68,.12);
  color: #fecaca;
}

html[data-theme="light"] .topbar-user-trigger{
  background: rgba(255,255,255,.84);
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

html[data-theme="light"] .topbar-user-trigger:hover{
  background: rgba(255,255,255,.96);
  border-color: rgba(59,130,246,.20);
}

html[data-theme="light"] .topbar-user-dropdown{
  background: rgba(255,255,255,.94);
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 18px 36px rgba(15,23,42,.10);
}

html[data-theme="light"] .topbar-user-dropdown-item{
  color: #0f172a;
}

html[data-theme="light"] .topbar-user-dropdown-item:hover{
  background: rgba(59,130,246,.08);
  color: #075985;
}

html[data-theme="light"] .topbar-user-dropdown-item.is-active{
  background: rgba(59,130,246,.12);
  color: #0369a1;
}

html[data-theme="light"] .topbar-user-dropdown-item-danger{
  color: #b91c1c;
}

html[data-theme="light"] .topbar-user-dropdown-item-danger:hover{
  background: rgba(239,68,68,.10);
  color: #991b1b;
}

.softmk-account-page{
  display: grid;
  gap: 1rem;
}

.softmk-account-card{
  padding: 1.1rem;
}

.softmk-account-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.softmk-account-copy{
  min-width: 0;
}

.softmk-account-name{
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.softmk-account-subtle{
  opacity: .78;
  margin-top: .22rem;
}

.softmk-account-badges{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
}

.softmk-account-badges .badge{
  border-radius: 999px !important;
  padding: .35rem .7rem !important;
}

.softmk-account-actions{
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.softmk-account-section-title{
  font-weight: 800;
  margin-bottom: .9rem;
}

.softmk-account-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: .85rem;
}

.softmk-account-item{
  padding: .92rem .95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  min-width: 0;
}

.softmk-account-label{
  font-size: .92rem;
  opacity: .72;
}

.softmk-account-value{
  margin-top: .2rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.softmk-account-form{
  margin-top: 1rem;
}

.softmk-account-form-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.softmk-account-field{
  min-width: 0;
}

.softmk-account-form-label{
  display: block;
  margin-bottom: .4rem;
  font-weight: 700;
}

.softmk-account-help{
  margin-top: .4rem;
  opacity: .78;
  font-size: .92rem;
  line-height: 1.45;
}

.softmk-account-help ul{
  margin: .35rem 0 0 1rem;
  padding: 0;
}

.softmk-account-error{
  margin-top: .35rem;
  color: #ffb4b4;
  font-size: .92rem;
}

.softmk-account-error-card{
  padding: .95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  margin-bottom: 1rem;
}

html[data-theme="light"] .softmk-account-item{
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.48);
}

html[data-theme="light"] .softmk-account-help{
  color: #64748b;
  opacity: 1;
}

html[data-theme="light"] .softmk-account-error{
  color: #b91c1c;
}

html[data-theme="light"] .softmk-account-error-card{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.20);
}

@media (max-width: 1100px){
  .topbar-right{
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: .75rem;
  }

  .topbar-user-menu{
    width: 100%;
    min-width: 0;
  }

  .topbar-user-trigger{
    width: 100%;
    justify-content: space-between;
    max-width: none;
    min-height: 54px;
    padding: .7rem .95rem;
    border-radius: 22px;
  }

  .topbar-user-dropdown{
    left: 0;
    right: 0;
    min-width: 0;
    top: calc(100% + 12px);
    padding: .55rem;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(15,23,42,.20);
  }

  .topbar-user-dropdown-item{
    min-height: 48px;
    padding: .85rem .95rem;
    border-radius: 16px;
    font-size: 1rem;
  }
}

@media (max-width: 900px){
  .softmk-account-header{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-account-actions{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .softmk-account-actions .softmk-btn{
    width: 100%;
    justify-content: center;
  }

  .softmk-account-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .softmk-account-card{
    padding: .95rem;
  }

  .softmk-account-name{
    font-size: 1.15rem;
  }
}

.main-content .card,
.softmk-table-wrap .card,
.softmk-list {
  width: 100%;
  max-width: none !important;
}

.softmk-table-wrap .card {
  box-sizing: border-box;
}

.softmk-table-wrap > .card > div[style*="justify-content:space-between"] {
  width: 100%;
}

.softmk-table-wrap form[method="get"] {
  width: 100%;
}

.softmk-table-wrap form[method="get"] input[type="text"] {
  flex: 1 1 420px;
  max-width: 640px !important;
  min-width: 260px;
}

.softmk-table {
  width: 100%;
  min-width: 1120px;
}

.softmk-actions-cell {
  white-space: normal;
}

.softmk-actions-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
  max-width: 100%;
}

.softmk-actions-inline .softmk-btn {
  min-width: 0;
}

@media (max-width: 1450px) {
  :root {
    --sidebar-width: 246px;
  }

  .main-content {
    padding: 22px 18px !important;
  }

  .softmk-table {
    min-width: 1040px;
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 228px;
  }

  .sidebar {
    padding: 18px 14px 20px !important;
  }

  .nav-link {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .main-content {
    padding: 18px 16px !important;
  }

  .softmk-table {
    min-width: 980px;
  }
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 214px;
  }

  .main-content {
    padding: 16px 14px !important;
  }

  .softmk-table-wrap form[method="get"] input[type="text"] {
    max-width: none !important;
    flex-basis: 100%;
  }
}



/* ===== SoftMK sidebar colapsable (desktop) ===== */
:root{
  --sidebar-expanded-width: clamp(232px, 16vw, 268px);
  --sidebar-collapsed-width: 84px;
}

.dashboard{
  position: relative;
}

.sidebar{
  width: var(--sidebar-expanded-width) !important;
  transition: width .22s ease, padding .22s ease, transform .22s ease;
  overflow-x: hidden;
}

.main-content{
  margin-left: var(--sidebar-expanded-width) !important;
  width: calc(100vw - var(--sidebar-expanded-width)) !important;
  transition: margin-left .22s ease, width .22s ease, padding .22s ease;
}

.sidebar-header{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo-text{
  white-space: nowrap;
}

.sidebar-toggle,
.mobile-menu-toggle-inline{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  flex-direction: column;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.sidebar-toggle{
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
}

.sidebar-toggle-line,
.mobile-menu-toggle-line{
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display:block;
}

.sidebar-toggle-line{
  width: 16px;
}

.nav-short{
  display:none;
  width: 34px;
  min-width: 34px;
  height: 34px;
  align-items:center;
  justify-content:center;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .03em;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
}

.nav-full{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-width:0;
}

.nav-item.nav-item-single{
  margin-bottom: 6px;
}

.nav-section-toggle{
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 6px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.nav-section-toggle::after{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: .6;
  transition: transform .18s ease, opacity .18s ease;
}

.nav-section.is-open .nav-section-toggle::after{
  transform: rotate(45deg);
  opacity: .9;
}

.nav-section-body{
  max-height: 0;
  overflow: hidden;
  transition: max-height .22s ease;
}

.nav-section.is-open .nav-section-body{
  max-height: 720px;
}

html[data-theme="light"] .nav-section-toggle{
  color: #64748b;
}

body.sidebar-collapsed .sidebar{
  width: var(--sidebar-collapsed-width) !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body.sidebar-collapsed .main-content{
  margin-left: var(--sidebar-collapsed-width) !important;
  width: calc(100vw - var(--sidebar-collapsed-width)) !important;
}

body.sidebar-collapsed .sidebar-header{
  justify-content:center;
  gap:0;
  position: relative;
}

body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-full,
body.sidebar-collapsed .nav-section-title{
  display:none !important;
}

body.sidebar-collapsed .sidebar-logo-img{
  width: 32px;
  height: 32px;
}

body.sidebar-collapsed .sidebar-toggle{
  margin-left: 0;
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
}

body.sidebar-collapsed .sidebar-toggle:hover{
  transform: translateX(-50%) translateY(-1px);
}

body.sidebar-collapsed .nav-menu{
  margin-top: 56px;
}

body.sidebar-collapsed .nav-section{
  margin-bottom: 18px;
}

body.sidebar-collapsed .nav-section > ul{
  display:flex;
  flex-direction:column;
  gap:10px;
}

body.sidebar-collapsed .nav-section-toggle{
  display:none;
}

body.sidebar-collapsed .nav-section-body{
  max-height: none !important;
  overflow: visible;
}

body.sidebar-collapsed .nav-link{
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-height: 48px;
}

body.sidebar-collapsed .nav-short{
  display:inline-flex;
}

body.sidebar-collapsed .nav-link .badge{
  display:none !important;
}

body.sidebar-collapsed .nav-item{
  display:flex;
  justify-content:center;
}

body.sidebar-collapsed .nav-link.active .nav-short,
body.sidebar-collapsed .nav-link:hover .nav-short{
  background: rgba(56,189,248,.18);
  border-color: rgba(56,189,248,.28);
}

html[data-theme="light"] .sidebar-toggle,
html[data-theme="light"] .mobile-menu-toggle-inline{
  background: rgba(255,255,255,.86) !important;
  color:#334155 !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

html[data-theme="light"] .sidebar-toggle:hover,
html[data-theme="light"] .mobile-menu-toggle-inline:hover{
  background: #ffffff !important;
  border-color: rgba(59,130,246,.18) !important;
}

html[data-theme="light"] .nav-short{
  background: rgba(255,255,255,.82);
  color:#475569;
  border:1px solid rgba(15,23,42,.08);
}

html[data-theme="light"] body.sidebar-collapsed .nav-link.active .nav-short,
html[data-theme="light"] body.sidebar-collapsed .nav-link:hover .nav-short{
  background: rgba(59,130,246,.12) !important;
  color:#0f172a !important;
  border-color: rgba(59,130,246,.18) !important;
}

@media (max-width: 1450px) {
  :root{
    --sidebar-expanded-width: 236px;
    --sidebar-collapsed-width: 78px;
  }
}

@media (max-width: 1280px) {
  :root{
    --sidebar-expanded-width: 220px;
    --sidebar-collapsed-width: 74px;
  }

  body.sidebar-collapsed .main-content{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* ===== SoftMK clientes: adaptación mejor a escritorio ===== */
.softmk-table-scroll{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 2px;
}

.softmk-table-scroll::-webkit-scrollbar{
  height: 10px;
}

.softmk-table-scroll::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,.35);
  border-radius: 999px;
}

.softmk-clients-table{
  min-width: 1020px;
}

.softmk-clients-table .col-iua{
  min-width: 132px;
}

.softmk-clients-table .col-name{
  min-width: 230px;
}

.softmk-clients-table .col-mikrotik{
  min-width: 150px;
}

.softmk-clients-table .col-type{
  min-width: 120px;
}

.softmk-clients-table .col-status{
  min-width: 126px;
}

.softmk-clients-table .col-ip{
  min-width: 140px;
}

.softmk-clients-table .col-created{
  min-width: 185px;
}

.softmk-clients-table .col-actions{
  min-width: 212px;
}

.softmk-clients-table .col-name strong,
.softmk-clients-table .col-iua strong{
  display: inline-block;
  line-height: 1.35;
}

.softmk-client-actions{
  gap: .4rem;
}

.softmk-btn-compact{
  min-height: 34px;
  padding: .42rem .72rem;
  font-size: .92rem;
}

.softmk-client-search-form{
  align-items: center;
}

.softmk-client-search-input{
  flex: 1 1 560px;
  max-width: min(720px, 100%) !important;
}

.softmk-btn-search{
  flex: 0 0 auto;
}

@media (max-width: 1600px){
  .softmk-clients-table{
    min-width: 980px;
  }
}

@media (max-width: 1440px){
  .softmk-clients-table{
    min-width: 940px;
  }

  .softmk-clients-table thead th,
  .softmk-clients-table tbody td{
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .softmk-clients-table .col-name{
    min-width: 210px;
  }

  .softmk-clients-table .col-created{
    min-width: 172px;
  }

  .softmk-btn-compact{
    padding: .38rem .62rem;
    font-size: .89rem;
  }
}

@media (max-width: 1280px){
  .softmk-clients-table{
    min-width: 900px;
  }

  .softmk-clients-table .col-name{
    min-width: 196px;
  }

  .softmk-clients-table .col-mikrotik{
    min-width: 135px;
  }

  .softmk-clients-table .col-type{
    min-width: 108px;
  }

  .softmk-clients-table .col-created{
    min-width: 160px;
  }

  .softmk-client-actions{
    gap: .32rem;
  }

  .softmk-btn-compact{
    padding: .34rem .54rem;
    min-height: 32px;
    font-size: .86rem;
  }
}

@media (max-width: 1140px){
  .softmk-clients-table{
    min-width: 860px;
  }

  .softmk-clients-table .col-name{
    min-width: 182px;
  }

  .softmk-client-search-input{
    flex-basis: 100%;
    max-width: none !important;
  }
}

/* ===== SoftMK OLT: tabla adaptable ===== */
.softmk-olt-list-page{
  width: 100%;
  min-width: 0;
}

.softmk-olt-list-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-olt-list-page > .card,
.softmk-olt-list-page .softmk-page-header,
.softmk-olt-list-page .softmk-olt-list-toolbar,
.softmk-olt-list-page .softmk-table-card,
.softmk-olt-list-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-list-page > .card{
  overflow: hidden;
}

.softmk-olt-list-copy{
  min-width: 0;
}

.softmk-olt-list-page .softmk-olt-list-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-list-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-olt-table{
  min-width: 880px;
}

.softmk-olt-table .col-name{
  min-width: 184px;
}

.softmk-olt-table .col-operator{
  min-width: 164px;
}

.softmk-olt-table .col-host{
  min-width: 214px;
  overflow-wrap: anywhere;
}

.softmk-olt-table .col-equipment{
  min-width: 260px;
}

.softmk-olt-table .col-status{
  min-width: 96px;
}

.softmk-olt-table .col-created{
  min-width: 174px;
}

.softmk-olt-table .col-name strong{
  display: inline-block;
  line-height: 1.35;
}

.softmk-olt-equipment{
  display: flex;
  flex-direction: column;
  gap: .28rem;
}

.softmk-olt-equipment-main{
  font-weight: 700;
  color: inherit;
  line-height: 1.35;
}

.softmk-olt-equipment-meta{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  line-height: 1.35;
  opacity: .86;
}

.softmk-olt-equipment-meta span{
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1600px){
  .softmk-olt-table{
    min-width: 860px;
  }
}

@media (max-width: 1440px){
  .softmk-olt-table{
    min-width: 820px;
  }

  .softmk-olt-table thead th,
  .softmk-olt-table tbody td{
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .softmk-olt-table .col-host{
    min-width: 196px;
  }

  .softmk-olt-table .col-equipment{
    min-width: 236px;
  }

  .softmk-olt-table .col-created{
    min-width: 164px;
  }
}

@media (max-width: 1280px){
  .softmk-olt-table{
    min-width: 780px;
  }

  .softmk-olt-table .col-name{
    min-width: 172px;
  }

  .softmk-olt-table .col-operator,
  .softmk-olt-table .col-host{
    min-width: 176px;
  }

  .softmk-olt-table .col-equipment{
    min-width: 214px;
  }

  .softmk-olt-table .col-created{
    min-width: 154px;
  }
}

@media (max-width: 1140px){
  .softmk-olt-table{
    min-width: 720px;
  }

  .softmk-olt-list-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-olt-list-page .softmk-olt-list-actions{
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1024px){
  .softmk-olt-list-intro-card{
    padding-bottom: 1rem;
  }

  .softmk-olt-list-page .softmk-olt-list-actions{
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .softmk-olt-list-page .softmk-olt-list-actions .softmk-btn{
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .softmk-olt-list-page .softmk-table-card{
    padding: .5rem;
  }

  .softmk-olt-list-page .softmk-table-scroll{
    overflow-x: auto;
    overflow-y: hidden;
  }

  .softmk-olt-table{
    min-width: 680px;
    width: 100%;
  }
}

@media (max-width: 768px){
  .softmk-olt-table{
    min-width: 620px;
  }

  .softmk-olt-table thead th,
  .softmk-olt-table tbody td{
    padding-left: .72rem;
    padding-right: .72rem;
  }

  .softmk-olt-equipment-meta{
    gap: .28rem .5rem;
  }
}

@media (max-width: 640px){
  .softmk-olt-list-intro-card,
  .softmk-olt-list-page .softmk-table-card{
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .softmk-olt-table{
    min-width: 560px;
  }
}

/* ===== SoftMK ONTs home: selector de OLT adaptable ===== */
.softmk-onts-home-page{
  width: 100%;
  min-width: 0;
}

.softmk-onts-home-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-onts-home-page > .card,
.softmk-onts-home-page .softmk-onts-home-toolbar,
.softmk-onts-home-page .softmk-table-card,
.softmk-onts-home-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-onts-home-page > .card{
  overflow: hidden;
}

.softmk-onts-home-copy{
  min-width: 0;
}

.softmk-onts-home-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-onts-home-page .softmk-onts-home-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.softmk-onts-home-table{
  min-width: 860px;
}

.softmk-onts-home-table .col-olt{
  min-width: 200px;
}

.softmk-onts-home-table .col-operator{
  min-width: 176px;
}

.softmk-onts-home-table .col-host{
  min-width: 220px;
  overflow-wrap: anywhere;
}

.softmk-onts-home-table .col-technology{
  min-width: 122px;
}

.softmk-onts-home-table .col-ont{
  min-width: 96px;
}

.softmk-onts-home-table .col-discovery{
  min-width: 186px;
}

@media (max-width: 1440px){
  .softmk-onts-home-table{
    min-width: 820px;
  }

  .softmk-onts-home-table thead th,
  .softmk-onts-home-table tbody td{
    padding-left: .8rem;
    padding-right: .8rem;
  }
}

@media (max-width: 1280px){
  .softmk-onts-home-table{
    min-width: 780px;
  }

  .softmk-onts-home-table .col-olt{
    min-width: 184px;
  }

  .softmk-onts-home-table .col-operator,
  .softmk-onts-home-table .col-host{
    min-width: 176px;
  }

  .softmk-onts-home-table .col-discovery{
    min-width: 168px;
  }
}

@media (max-width: 1140px){
  .softmk-onts-home-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-onts-home-page .softmk-onts-home-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .softmk-onts-home-table{
    min-width: 720px;
  }
}

@media (max-width: 1024px){
  .softmk-onts-home-intro-card{
    padding-bottom: 1rem;
  }

  .softmk-onts-home-page .softmk-onts-home-actions{
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .softmk-onts-home-page .softmk-onts-home-actions .softmk-btn{
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .softmk-onts-home-page .softmk-table-card{
    padding: .5rem;
  }

  .softmk-onts-home-page .softmk-table-scroll{
    overflow-x: auto;
    overflow-y: hidden;
  }

  .softmk-onts-home-table{
    min-width: 680px;
    width: 100%;
  }
}

@media (max-width: 768px){
  .softmk-onts-home-table{
    min-width: 620px;
  }

  .softmk-onts-home-table thead th,
  .softmk-onts-home-table tbody td{
    padding-left: .72rem;
    padding-right: .72rem;
  }
}

@media (max-width: 640px){
  .softmk-onts-home-intro-card,
  .softmk-onts-home-page .softmk-table-card{
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .softmk-onts-home-table{
    min-width: 560px;
  }
}

/* ===== SoftMK OLT catalog: toolbar + tabla adaptable ===== */
.softmk-olt-catalog-page{
  width: 100%;
  min-width: 0;
}

.softmk-olt-catalog-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-olt-catalog-page > .card,
.softmk-olt-catalog-page .softmk-olt-catalog-toolbar,
.softmk-olt-catalog-page .softmk-table-card,
.softmk-olt-catalog-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-catalog-page > .card{
  overflow: hidden;
}

.softmk-olt-catalog-copy{
  min-width: 0;
}

.softmk-olt-catalog-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-olt-catalog-actions,
.softmk-olt-catalog-profile-cell,
.softmk-olt-catalog-row-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-catalog-actions{
  justify-content: flex-end;
}

.softmk-olt-catalog-table{
  min-width: 980px;
}

.softmk-olt-catalog-table .col-brand{
  min-width: 144px;
}

.softmk-olt-catalog-table .col-technology{
  min-width: 122px;
}

.softmk-olt-catalog-table .col-model{
  min-width: 168px;
}

.softmk-olt-catalog-table .col-version{
  min-width: 152px;
}

.softmk-olt-catalog-table .col-profile{
  min-width: 220px;
}

.softmk-olt-catalog-table .col-status{
  min-width: 96px;
}

.softmk-olt-catalog-table .col-created{
  min-width: 164px;
}

.softmk-olt-catalog-table .col-actions{
  min-width: 168px;
}

/* ===== SoftMK SNMP profile catalog: toolbar + tabla adaptable ===== */
.softmk-snmp-profile-page{
  width: 100%;
  min-width: 0;
}

.softmk-snmp-profile-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-snmp-profile-page > .card,
.softmk-snmp-profile-page .softmk-snmp-profile-toolbar,
.softmk-snmp-profile-page .softmk-table-card,
.softmk-snmp-profile-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-snmp-profile-page > .card{
  overflow: hidden;
}

.softmk-snmp-profile-copy{
  min-width: 0;
}

.softmk-snmp-profile-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-snmp-profile-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}

.softmk-snmp-profile-table{
  min-width: 940px;
}

.softmk-snmp-profile-table .col-catalog{
  min-width: 260px;
}

.softmk-snmp-profile-table .col-driver{
  min-width: 176px;
}

.softmk-snmp-profile-table .col-mode{
  min-width: 158px;
}

.softmk-snmp-profile-table .col-description{
  min-width: 154px;
}

.softmk-snmp-profile-table .col-candidates{
  min-width: 112px;
}

.softmk-snmp-profile-table .col-learned{
  min-width: 168px;
}

.softmk-snmp-profile-link{
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

/* ===== SoftMK SNMP profile detail ===== */
.softmk-snmp-profile-detail-page{
  width: 100%;
  min-width: 0;
}

.softmk-snmp-profile-detail-page > .card,
.softmk-snmp-profile-detail-page .softmk-detail-header,
.softmk-snmp-profile-detail-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-snmp-profile-detail-page > .card{
  overflow: hidden;
}

.softmk-snmp-profile-detail-page .softmk-detail-title,
.softmk-snmp-profile-detail-page .softmk-detail-subtitle,
.softmk-snmp-profile-detail-page .softmk-detail-value{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.softmk-snmp-profile-detail-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}

.softmk-snmp-profile-sample-table{
  min-width: 620px;
}

.softmk-snmp-profile-json{
  margin: 0;
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ===== SoftMK OLT catalog form ===== */
.softmk-olt-catalog-form-page{
  min-width: 0;
}

.softmk-olt-catalog-form-page > .card{
  min-width: 0;
  overflow: hidden;
}

.softmk-olt-catalog-form-page .softmk-page-subtitle,
.softmk-olt-catalog-form-page .softmk-detail-note{
  overflow-wrap: anywhere;
}

@media (max-width: 1440px){
  .softmk-olt-catalog-table,
  .softmk-snmp-profile-table{
    min-width: 900px;
  }

  .softmk-snmp-profile-sample-table{
    min-width: 600px;
  }
}

@media (max-width: 1280px){
  .softmk-olt-catalog-table{
    min-width: 860px;
  }

  .softmk-snmp-profile-table{
    min-width: 860px;
  }
}

@media (max-width: 1140px){
  .softmk-olt-catalog-toolbar,
  .softmk-snmp-profile-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-olt-catalog-actions,
  .softmk-snmp-profile-actions,
  .softmk-snmp-profile-detail-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .softmk-olt-catalog-table{
    min-width: 800px;
  }

  .softmk-snmp-profile-table{
    min-width: 800px;
  }
}

@media (max-width: 1024px){
  .softmk-olt-catalog-intro-card,
  .softmk-snmp-profile-intro-card{
    padding-bottom: 1rem;
  }

  .softmk-olt-catalog-page .softmk-olt-catalog-actions,
  .softmk-snmp-profile-page .softmk-snmp-profile-actions,
  .softmk-snmp-profile-detail-page .softmk-snmp-profile-detail-actions,
  .softmk-olt-catalog-row-actions{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .softmk-olt-catalog-page .softmk-olt-catalog-actions .softmk-btn,
  .softmk-snmp-profile-page .softmk-snmp-profile-actions .softmk-btn,
  .softmk-snmp-profile-detail-page .softmk-snmp-profile-detail-actions .softmk-btn,
  .softmk-olt-catalog-row-actions .softmk-btn{
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .softmk-olt-catalog-page .softmk-table-card,
  .softmk-snmp-profile-page .softmk-table-card,
  .softmk-snmp-profile-detail-page .softmk-table-card{
    padding: .5rem;
  }

  .softmk-olt-catalog-page .softmk-table-scroll,
  .softmk-snmp-profile-page .softmk-table-scroll,
  .softmk-snmp-profile-detail-page .softmk-table-scroll{
    overflow-x: auto;
    overflow-y: hidden;
  }

  .softmk-olt-catalog-table{
    min-width: 760px;
  }

  .softmk-snmp-profile-table{
    min-width: 760px;
  }
}

@media (max-width: 768px){
  .softmk-olt-catalog-table{
    min-width: 700px;
  }

  .softmk-snmp-profile-table{
    min-width: 720px;
  }

  .softmk-snmp-profile-sample-table{
    min-width: 560px;
  }

  .softmk-olt-catalog-table thead th,
  .softmk-olt-catalog-table tbody td,
  .softmk-snmp-profile-table thead th,
  .softmk-snmp-profile-table tbody td,
  .softmk-snmp-profile-sample-table thead th,
  .softmk-snmp-profile-sample-table tbody td{
    padding-left: .72rem;
    padding-right: .72rem;
  }
}

@media (max-width: 640px){
  .softmk-olt-catalog-intro-card,
  .softmk-snmp-profile-intro-card,
  .softmk-olt-catalog-page .softmk-table-card,
  .softmk-snmp-profile-page .softmk-table-card,
  .softmk-snmp-profile-detail-page .softmk-table-card{
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .softmk-olt-catalog-table{
    min-width: 660px;
  }

  .softmk-snmp-profile-table{
    min-width: 680px;
  }

  .softmk-snmp-profile-sample-table{
    min-width: 520px;
  }
}

/* ===== SoftMK OLT ONTs list: toolbar + filtros + tabla adaptable ===== */
.softmk-olt-onts-page{
  width: 100%;
  min-width: 0;
}

.softmk-olt-onts-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-olt-onts-page > .card,
.softmk-olt-onts-page .softmk-olt-onts-toolbar,
.softmk-olt-onts-page .softmk-table-card,
.softmk-olt-onts-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-onts-page > .card{
  overflow: hidden;
}

.softmk-olt-onts-copy{
  min-width: 0;
}

.softmk-olt-onts-status-row{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.softmk-olt-processing-badge{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, .18);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.softmk-olt-processing-badge.is-complete{
  background: rgba(22, 163, 74, .12);
  color: #15803d;
  border-color: rgba(22, 163, 74, .18);
}

.softmk-olt-processing-dot{
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, .3);
  animation: softmk-processing-pulse 1.6s ease-out infinite;
}

.softmk-olt-processing-badge.is-complete .softmk-olt-processing-dot{
  box-shadow: none;
  animation: none;
}

@keyframes softmk-processing-pulse{
  0%{
    transform: scale(.9);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, .35);
  }

  70%{
    transform: scale(1);
    box-shadow: 0 0 0 .45rem rgba(37, 99, 235, 0);
  }

  100%{
    transform: scale(.9);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.softmk-olt-onts-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-olt-onts-page .softmk-olt-onts-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-onts-page .softmk-olt-onts-actions form{
  margin: 0;
}

.softmk-olt-onts-kpi-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  width: 100%;
}

.softmk-olt-onts-kpis{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.softmk-olt-onts-filters{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  width: 100%;
  margin-top: .9rem;
}

.softmk-olt-onts-search{
  flex: 1 1 340px;
  max-width: 340px !important;
}

.softmk-olt-onts-select{
  flex: 0 1 180px;
  max-width: 180px !important;
}

.softmk-olt-onts-table{
  min-width: 980px;
}

.softmk-olt-onts-table .col-description{
  min-width: 220px;
}

.softmk-olt-onts-table .col-mac{
  min-width: 180px;
}

.softmk-ont-mac-link{
  color: inherit;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .12s ease, background .12s ease, border-color .12s ease, transform .12s ease;
}

.softmk-ont-mac-link:hover{
  color: #7dd3fc;
  border-bottom-color: rgba(125,211,252,.55);
}

.softmk-ont-mac-link:focus-visible{
  outline: 2px solid rgba(56,189,248,.45);
  outline-offset: 3px;
  border-radius: 8px;
}

.softmk-ont-mac-value{
  line-height: 1.35;
}

html[data-theme="light"] .softmk-ont-mac-link{
  color: #0f172a;
}

html[data-theme="light"] .softmk-ont-mac-link:hover{
  color: #075985;
  border-bottom-color: rgba(7,89,133,.28);
}

html[data-theme="light"] .softmk-ont-mac-hint{
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.14);
}

@media (max-width: 1024px){
  .softmk-ont-mac-link{
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 40px;
    padding: .4rem .72rem;
    border-radius: 14px;
    background: rgba(56,189,248,.10);
    border: 1px solid rgba(56,189,248,.16);
    border-bottom-color: rgba(56,189,248,.16);
  }

  .softmk-ont-mac-link:hover{
    transform: translateY(-1px);
    background: rgba(56,189,248,.16);
    border-bottom-color: rgba(56,189,248,.24);
  }

  .softmk-ont-mac-value{
    overflow-wrap: anywhere;
  }

  html[data-theme="light"] .softmk-ont-mac-link{
    background: rgba(59,130,246,.10);
    border-color: rgba(59,130,246,.14);
  }

  html[data-theme="light"] .softmk-ont-mac-link:hover{
    background: rgba(59,130,246,.14);
    border-bottom-color: rgba(59,130,246,.18);
  }
}

.softmk-olt-onts-table .col-technology{
  min-width: 120px;
}

.softmk-olt-onts-table .col-pon,
.softmk-olt-onts-table .col-ont{
  min-width: 90px;
}

.softmk-olt-onts-table .col-distance,
.softmk-olt-onts-table .col-power{
  min-width: 138px;
}

.softmk-olt-onts-table .col-status{
  min-width: 118px;
}

.softmk-olt-onts-pagination{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  flex-wrap: wrap;
}

.softmk-olt-onts-pagination-actions{
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

@media (max-width: 1440px){
  .softmk-olt-onts-table{
    min-width: 940px;
  }

  .softmk-olt-onts-table thead th,
  .softmk-olt-onts-table tbody td{
    padding-left: .82rem;
    padding-right: .82rem;
  }
}

@media (max-width: 1280px){
  .softmk-olt-onts-table{
    min-width: 900px;
  }

  .softmk-olt-onts-search{
    flex-basis: 100%;
    max-width: none !important;
  }
}

@media (max-width: 1140px){
  .softmk-olt-onts-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-olt-onts-page .softmk-olt-onts-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .softmk-olt-onts-table{
    min-width: 860px;
  }
}

@media (max-width: 1024px){
  .softmk-olt-onts-intro-card{
    padding-bottom: 1rem;
  }

  .softmk-olt-onts-page .softmk-olt-onts-actions{
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .softmk-olt-onts-page .softmk-olt-onts-actions .softmk-btn,
  .softmk-olt-onts-page .softmk-olt-onts-actions form,
  .softmk-olt-onts-page .softmk-olt-onts-actions button{
    width: 100%;
  }

  .softmk-olt-onts-page .softmk-olt-onts-actions .softmk-btn{
    justify-content: center;
    white-space: normal;
  }

  .softmk-olt-onts-page .softmk-table-card{
    padding: .5rem;
  }

  .softmk-olt-onts-page .softmk-table-scroll{
    overflow-x: auto;
    overflow-y: hidden;
  }

  .softmk-olt-onts-table{
    min-width: 820px;
    width: 100%;
  }
}

@media (max-width: 768px){
  .softmk-olt-onts-filters > *{
    width: 100%;
    max-width: 100% !important;
  }

  .softmk-olt-onts-table{
    min-width: 760px;
  }

  .softmk-olt-onts-table thead th,
  .softmk-olt-onts-table tbody td{
    padding-left: .72rem;
    padding-right: .72rem;
  }

  .softmk-olt-onts-pagination{
    padding-left: .8rem;
    padding-right: .8rem;
  }
}

@media (max-width: 640px){
  .softmk-olt-onts-intro-card,
  .softmk-olt-onts-summary-card,
  .softmk-olt-onts-page .softmk-table-card{
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .softmk-olt-onts-table{
    min-width: 720px;
  }

  .softmk-olt-onts-pagination-actions{
    width: 100%;
  }

  .softmk-olt-onts-pagination-actions .softmk-btn{
    flex: 1 1 0;
    justify-content: center;
  }
}


/* ===== SoftMK ONTs duplicadas: tabla adaptable ===== */
.softmk-olt-duplicates-page > .card,
.softmk-olt-duplicates-page .softmk-olt-duplicates-toolbar,
.softmk-olt-duplicates-page .softmk-olt-duplicates-table-toolbar,
.softmk-olt-duplicates-page .softmk-table-card,
.softmk-olt-duplicates-page .softmk-table-scroll{
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-duplicates-page > .card{
  overflow: hidden;
}

.softmk-olt-duplicates-toolbar,
.softmk-olt-duplicates-table-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.softmk-olt-duplicates-copy,
.softmk-olt-duplicates-table-copy{
  min-width: 0;
}

.softmk-olt-duplicates-page .softmk-page-subtitle{
  max-width: 100%;
  overflow-wrap: anywhere;
}

.softmk-olt-duplicates-page .softmk-olt-duplicates-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}

.softmk-olt-duplicates-form{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.softmk-olt-duplicates-table{
  min-width: 860px;
}

.softmk-olt-duplicates-table .col-check{
  min-width: 84px;
}

.softmk-olt-duplicates-table .col-identifier,
.softmk-olt-duplicates-table .col-description{
  min-width: 220px;
}

.softmk-olt-duplicates-table .col-pon,
.softmk-olt-duplicates-table .col-ont{
  min-width: 90px;
}

.softmk-olt-duplicates-table .col-status{
  min-width: 108px;
}

.softmk-olt-duplicates-table .col-action{
  min-width: 180px;
}

.softmk-duplicate-group-cell{
  font-weight: 800;
  letter-spacing: .01em;
  background: rgba(148,163,184,.10);
}

.softmk-duplicate-select-label{
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .28rem .72rem;
  border-radius: 14px;
  background: rgba(56,189,248,.10);
  border: 1px solid rgba(56,189,248,.16);
  cursor: pointer;
  font-weight: 800;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.softmk-duplicate-select-label:hover{
  transform: translateY(-1px);
  background: rgba(56,189,248,.16);
  border-color: rgba(56,189,248,.22);
}

.softmk-olt-duplicates-table input[type="checkbox"]{
  width: 18px;
  height: 18px;
}

.softmk-olt-duplicates-table .softmk-detail-note{
  margin-top: .5rem;
}

html[data-theme="light"] .softmk-duplicate-group-cell{
  background: rgba(59,130,246,.08);
}

html[data-theme="light"] .softmk-duplicate-select-label{
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.14);
}

html[data-theme="light"] .softmk-duplicate-select-label:hover{
  background: rgba(59,130,246,.14);
  border-color: rgba(59,130,246,.18);
}

@media (max-width: 1140px){
  .softmk-olt-duplicates-toolbar,
  .softmk-olt-duplicates-table-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-olt-duplicates-page .softmk-olt-duplicates-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .softmk-olt-duplicates-table{
    min-width: 800px;
  }
}

@media (max-width: 1024px){
  .softmk-olt-duplicates-intro-card,
  .softmk-olt-duplicates-note-card{
    padding-bottom: 1rem;
  }

  .softmk-olt-duplicates-page .softmk-olt-duplicates-actions,
  .softmk-olt-duplicates-page .softmk-olt-duplicates-actions form{
    width: 100%;
  }

  .softmk-olt-duplicates-page .softmk-olt-duplicates-actions .softmk-btn,
  .softmk-olt-duplicates-page .softmk-olt-duplicates-actions button{
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .softmk-olt-duplicates-page .softmk-table-card{
    padding: .5rem;
  }

  .softmk-olt-duplicates-page .softmk-table-scroll{
    overflow-x: auto;
    overflow-y: hidden;
  }

  .softmk-olt-duplicates-table{
    min-width: 760px;
    width: 100%;
  }
}

@media (max-width: 768px){
  .softmk-olt-duplicates-table{
    min-width: 700px;
  }

  .softmk-olt-duplicates-table thead th,
  .softmk-olt-duplicates-table tbody td{
    padding-left: .72rem;
    padding-right: .72rem;
  }
}

@media (max-width: 640px){
  .softmk-olt-duplicates-intro-card,
  .softmk-olt-duplicates-note-card,
  .softmk-olt-duplicates-page .softmk-table-card{
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .softmk-olt-duplicates-table{
    min-width: 640px;
  }
}


/* ===== SoftMK pagos home: toolbar + tabla adaptable ===== */
.softmk-payments-page .softmk-list-card{
  padding: 1rem 1rem 1.05rem;
}

.softmk-payments-page .softmk-list-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.9rem;
  margin-bottom:.8rem;
  width:100%;
}

.softmk-payments-page .softmk-list-toolbar-main{
  display:flex;
  flex-direction:column;
  gap:.7rem;
  width:100%;
  min-width:0;
}

.softmk-payments-page .softmk-list-intro{
  margin:0;
  font-weight:600;
  line-height:1.4;
}

.softmk-payments-page .softmk-kpi-row{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  align-items:center;
}

.softmk-payments-page .softmk-kpi-badge{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:.5rem .8rem !important;
}

.softmk-searchbar-payments{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  align-items:center;
  width:100%;
}

.softmk-searchbar-payments .softmk-search-input{
  flex:1 1 460px;
  max-width:min(760px,100%) !important;
  min-width:260px;
}

.softmk-searchbar-payments .softmk-btn{
  flex:0 0 auto;
}

.softmk-table-payments{
  min-width:1140px;
}

.softmk-table-payments .col-iua{min-width:130px;}
.softmk-table-payments .col-cliente{min-width:220px;}
.softmk-table-payments .col-mikrotik{min-width:140px;}
.softmk-table-payments .col-estado{min-width:110px;}
.softmk-table-payments .col-ip{min-width:120px;}
.softmk-table-payments .col-vencimiento{min-width:150px;}
.softmk-table-payments .col-corte{min-width:180px;}
.softmk-table-payments .col-acciones{min-width:232px;}

.softmk-table-payments .softmk-actions-inline-compact{
  gap:.38rem;
}

.softmk-table-payments .softmk-actions-inline-compact .softmk-btn{
  min-height:34px;
  padding:.42rem .72rem;
  font-size:.92rem;
}

.softmk-payments-page .softmk-cutoff-wrap{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex-wrap:wrap;
}

.softmk-payments-page .softmk-cell-primary{
  display:inline-block;
  line-height:1.35;
}

.softmk-payments-page .softmk-row-overdue{
  outline:1px solid rgba(255,80,80,.28);
  outline-offset:-1px;
}

html[data-theme="light"] .softmk-payments-page .softmk-list-card{
  background: rgba(255,255,255,.62) !important;
}

html[data-theme="light"] .softmk-payments-page .softmk-list-intro{
  color:#334155 !important;
}

html[data-theme="light"] .softmk-payments-page .softmk-kpi-badge{
  box-shadow: 0 6px 16px rgba(15,23,42,.04);
}

@media (max-width: 1440px){
  .softmk-table-payments{
    min-width:1080px;
  }

  .softmk-table-payments thead th,
  .softmk-table-payments tbody td{
    padding-left:.82rem;
    padding-right:.82rem;
  }

  .softmk-table-payments .col-cliente{min-width:205px;}
  .softmk-table-payments .col-corte{min-width:168px;}
  .softmk-table-payments .col-acciones{min-width:212px;}
}

@media (max-width: 1280px){
  .softmk-table-payments{
    min-width:1020px;
  }

  .softmk-searchbar-payments .softmk-search-input{
    flex-basis:100%;
    max-width:none !important;
  }

  .softmk-table-payments .col-cliente{min-width:190px;}
  .softmk-table-payments .col-mikrotik{min-width:128px;}
  .softmk-table-payments .col-vencimiento{min-width:142px;}
  .softmk-table-payments .col-corte{min-width:156px;}
  .softmk-table-payments .col-acciones{min-width:198px;}

  .softmk-table-payments .softmk-actions-inline-compact .softmk-btn{
    min-height:32px;
    padding:.36rem .58rem;
    font-size:.87rem;
  }
}


/* ===== SoftMK móvil overlay (añadido sobre la base actual, sin tocar escritorio) ===== */
.mobile-menu-toggle-inline{
  display:none;
  width:44px;
  height:44px;
  flex:0 0 auto;
}

.mobile-menu-toggle-line{
  width:18px;
}

.mobile-sidebar-overlay{
  display:none;
}

@media (max-width: 1100px){
  .mobile-menu-toggle-inline{
    display:inline-flex;
  }

  .sidebar-header{
    min-width: 0;
  }

  .sidebar-logo-img{
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .logo-text{
    min-width: 0;
    max-width: calc(100% - 48px);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.12rem;
    line-height: 1.1;
  }

  .topbar{
    position:relative;
    align-items:flex-start;
    gap:12px;
  }

  .topbar-left{
    display:flex;
    align-items:center;
    gap:12px;
    flex:1 1 100%;
    min-width:0;
  }

  .topbar-right{
    width:100%;
    justify-content:flex-start;
    gap:.65rem;
  }

  .topbar-user-meta{
    align-items:flex-start;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar{
    position:fixed !important;
    top:0;
    left:0;
    bottom:0;
    width:min(82vw, 296px) !important;
    max-width:296px;
    margin:0 !important;
    transform: translateX(-110%);
    z-index:1200;
    padding:18px 14px 22px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.28);
    overflow-y:auto;
  }

  .sidebar-header{
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }

  html[data-theme="light"] .sidebar-header{
    border-bottom-color: rgba(15,23,42,.08);
  }

  .sidebar-toggle{
    display:none !important;
  }

  body.mobile-sidebar-open .sidebar{
    transform: translateX(0);
  }

  .mobile-sidebar-overlay{
    position:fixed;
    inset:0;
    background: rgba(2,6,23,.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index:1100;
    opacity:0;
    pointer-events:none;
    transition: opacity .18s ease;
    display:block;
  }

  body.mobile-sidebar-open .mobile-sidebar-overlay{
    opacity:1;
    pointer-events:auto;
  }

  .main-content,
  body.sidebar-collapsed .main-content{
    margin-left:0 !important;
    width:100% !important;
    padding:18px 14px 22px !important;
  }

  .page-title{
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .topbar-logout-btn{
    min-height:40px;
  }

  /* En móvil, aunque el escritorio haya quedado colapsado, el menú overlay debe mostrarse expandido */
  body.sidebar-collapsed .sidebar-header{
    justify-content: space-between !important;
    gap: 12px !important;
    position: static !important;
  }

  body.sidebar-collapsed .logo-text,
  body.sidebar-collapsed .nav-full,
  body.sidebar-collapsed .nav-section-title{
    display: inline !important;
  }

  body.sidebar-collapsed .nav-section-title{
    display: block !important;
  }

  body.sidebar-collapsed .nav-short{
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-logo-img{
    width: 36px !important;
    height: 36px !important;
  }

  body.sidebar-collapsed .nav-menu{
    margin-top: 18px !important;
  }

  body.sidebar-collapsed .nav-section{
    margin-bottom: 24px !important;
  }

  body.sidebar-collapsed .nav-section-toggle{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.sidebar-collapsed .nav-section > ul{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  body.sidebar-collapsed .nav-section-body{
    max-height: 0 !important;
    overflow: hidden !important;
  }

  body.sidebar-collapsed .nav-section.is-open .nav-section-body{
    max-height: 720px !important;
  }

  body.sidebar-collapsed .nav-item{
    display: block !important;
  }

  body.sidebar-collapsed .nav-link{
    justify-content: flex-start !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    min-height: 46px !important;
  }

  body.sidebar-collapsed .nav-link .badge{
    display: inline-flex !important;
  }

}



/* Estado Corte específico */
.badge.badge-state-cut{
  background: rgba(239,68,68,.16) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239,68,68,.30) !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .badge.badge-state-cut{
  background: rgba(239,68,68,.14) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239,68,68,.28) !important;
}



/* ===== Confirmación eliminar perfil IP fija (solo esta vista) ===== */
.softmk-confirm-card{
  max-width: 820px;
  margin-top: .25rem;
  overflow: hidden;
}

.softmk-confirm-card .card-body{
  padding: 1.45rem 1.55rem !important;
}

.softmk-confirm-card h3{
  margin: 0 0 1.1rem 0 !important;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 800 !important;
}

.softmk-confirm-copy{
  max-width: 720px;
}

.softmk-confirm-copy p{
  margin: 0 0 .85rem 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}

.softmk-confirm-copy p:last-child{
  margin-bottom: 0;
}

.softmk-confirm-copy strong{
  font-weight: 800;
}

.softmk-confirm-card form{
  margin-top: 1.35rem;
}

.softmk-confirm-card .softmk-actions-inline{
  justify-content: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}

.softmk-confirm-card .softmk-btn{
  min-width: 180px;
}

html[data-theme="light"] .softmk-confirm-card{
  background: rgba(255,255,255,.68) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.06) !important;
}

html[data-theme="light"] .softmk-confirm-card h3{
  color: #0f172a !important;
}

html[data-theme="light"] .softmk-confirm-copy p{
  color: #334155 !important;
}

html[data-theme="light"] .softmk-confirm-copy p[style*="color:#ef4444"],
html[data-theme="light"] .softmk-confirm-copy p[style*="color: #ef4444"]{
  color: #ef4444 !important;
}

@media (max-width: 640px){
  .softmk-confirm-card .card-body{
    padding: 1.1rem 1rem !important;
  }

  .softmk-confirm-card h3{
    font-size: 1.3rem;
  }

  .softmk-confirm-copy p{
    font-size: .98rem;
  }

  .softmk-confirm-card .softmk-actions-inline{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-confirm-card .softmk-btn{
    width: 100%;
    min-width: 0;
  }
}

/* ===== Confirmaciones globales: warning visible en claro y oscuro ===== */
.softmk-confirm-copy .softmk-confirm-warning,
.softmk-confirm-card .softmk-confirm-warning,
.softmk-confirm-warning{
  color: #ef4444 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .softmk-confirm-copy .softmk-confirm-warning,
html[data-theme="light"] .softmk-confirm-card .softmk-confirm-warning,
html[data-theme="light"] .softmk-confirm-warning{
  color: #b91c1c !important;
}


/* ===== AJUSTES UI INTEGRADO ===== */

/* ===============================
   AJUSTES - INTEGRADO A LA PLANTILLA
   =============================== */

.ajustes-page{
  width:100%;
}

.ajustes-shell{
  padding: 1.35rem;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 18px 42px rgba(15,23,42,.06);
}

.ajustes-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:1.2rem;
}

.ajustes-eyebrow{
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:.35rem;
}

.ajustes-title{
  margin:0;
  color:#0f172a;
  font-size:clamp(1.7rem, 2vw, 2.2rem);
  line-height:1.08;
  font-weight:800;
}

.ajustes-subtitle{
  margin:.45rem 0 0;
  max-width:760px;
  color:#475569;
  font-size:1rem;
  line-height:1.6;
}

.ajustes-hero-actions{
  display:flex;
  align-items:center;
  gap:.7rem;
  flex-wrap:wrap;
}

.ajustes-operator-chip{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-height:42px;
  padding:.6rem .95rem;
  background:rgba(14,165,233,.10);
  border:1px solid rgba(14,165,233,.18);
  color:#0369a1;
  font-weight:800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.26);
}

.ajustes-empty-state{
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding:1.2rem;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(148,163,184,.18);
  box-shadow: 0 12px 28px rgba(15,23,42,.04);
}

.ajustes-empty-state--error{
  background:rgba(254,242,242,.9);
  border-color:rgba(239,68,68,.18);
}

.ajustes-empty-icon{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(14,165,233,.10);
  color:#0f172a;
  font-size:1.35rem;
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.12);
}

.ajustes-empty-state--error .ajustes-empty-icon{
  background:rgba(239,68,68,.10);
}

.ajustes-empty-state h3{
  margin:0 0 .15rem;
  color:#0f172a;
  font-size:1.15rem;
  font-weight:800;
}

.ajustes-empty-state p{
  margin:0;
  color:#475569;
  line-height:1.55;
}

.ajustes-select-form{
  display:flex;
  gap:.9rem;
  flex-wrap:wrap;
  align-items:end;
}

.ajustes-field{
  min-width:240px;
}

.ajustes-field-grow{
  flex:1 1 320px;
}

.ajustes-field label{
  display:block;
  margin-bottom:.38rem;
  color:#0f172a;
  font-weight:700;
}

.ajustes-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:1rem;
  margin-bottom:1rem;
}

.ajustes-summary-card{
  position:relative;
  overflow:hidden;
  padding:1rem 1.05rem;
  background:rgba(255,255,255,.8);
  border:1px solid rgba(148,163,184,.16);
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.ajustes-summary-card::after{
  content:"";
  position:absolute;
  right:-22px;
  top:-22px;
  width:82px;
  height:82px;
  border-radius:999px;
  background:rgba(14,165,233,.08);
}

.ajustes-summary-card--primary{
  background:linear-gradient(135deg, rgba(14,165,233,.12), rgba(255,255,255,.88));
  border-color:rgba(14,165,233,.20);
}

.ajustes-summary-label{
  position:relative;
  z-index:1;
  color:#64748b;
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ajustes-summary-value{
  position:relative;
  z-index:1;
  margin-top:.55rem;
  color:#0f172a;
  font-size:1.75rem;
  line-height:1.08;
  font-weight:800;
  word-break:break-word;
}

.ajustes-summary-value span{
  opacity:.4;
}

.ajustes-summary-value--compact{
  font-size:1.08rem;
  line-height:1.45;
}

.ajustes-summary-note{
  position:relative;
  z-index:1;
  margin-top:.55rem;
  color:#475569;
  font-size:.94rem;
  line-height:1.5;
}

.ajustes-content-grid,
.ajustes-form-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.4fr) minmax(320px, .9fr);
  gap:1rem;
}

.ajustes-side-stack{
  display:grid;
  gap:1rem;
}

.ajustes-panel{
  padding:1.1rem;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(148,163,184,.16);
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.ajustes-panel-form{
  min-width:0;
}

.ajustes-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:.8rem;
  flex-wrap:wrap;
  margin-bottom:.95rem;
}

.ajustes-panel-head h3{
  margin:0;
  color:#0f172a;
  font-size:1.18rem;
  font-weight:800;
}

.ajustes-panel-head p{
  margin:.35rem 0 0;
  color:#475569;
  line-height:1.55;
}

.ajustes-mini-badge{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:.4rem .75rem;
  background:rgba(14,165,233,.10);
  border:1px solid rgba(14,165,233,.18);
  color:#0f766e;
  font-size:.84rem;
  font-weight:800;
  white-space:nowrap;
}

.ajustes-info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.8rem;
}

.ajustes-info-item{
  padding:.95rem 1rem;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.15);
}

.ajustes-info-label{
  display:block;
  color:#64748b;
  font-size:.82rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.ajustes-info-value{
  display:block;
  margin-top:.45rem;
  color:#0f172a;
  font-size:1.08rem;
  line-height:1.45;
  font-weight:800;
}

.ajustes-break,
.ajustes-info-line--break strong{
  word-break:break-word;
}

.ajustes-days-card{
  margin-top:1rem;
  padding:1rem;
  background:linear-gradient(135deg, rgba(14,165,233,.08), rgba(255,255,255,.92));
  border:1px solid rgba(14,165,233,.18);
}

.ajustes-days-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:.8rem;
  flex-wrap:wrap;
}

.ajustes-days-head h4{
  margin:0;
  color:#0f172a;
  font-size:1rem;
  font-weight:800;
}

.ajustes-days-head span{
  color:#475569;
  font-size:.93rem;
}

.ajustes-days-chips{
  margin-top:.85rem;
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}

.ajustes-day-chip{
  min-width:52px;
  padding:.56rem .74rem;
  text-align:center;
  font-size:.92rem;
  font-weight:800;
  border:1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}

.ajustes-day-chip.is-active{
  background:#0ea5e9;
  color:#ffffff;
  box-shadow:0 10px 22px rgba(14,165,233,.22);
}

.ajustes-day-chip.is-off{
  background:#f1f5f9;
  border-color:#e2e8f0;
  color:#94a3b8;
}

.ajustes-days-fallback{
  margin-top:.8rem;
  color:#475569;
  font-size:.94rem;
  line-height:1.5;
}

.ajustes-spotlight{
  padding:1rem 1.05rem;
  background:linear-gradient(135deg, rgba(59,130,246,.10), rgba(255,255,255,.92));
  border:1px solid rgba(59,130,246,.18);
}

.ajustes-spotlight-label{
  color:#64748b;
  font-size:.82rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.ajustes-spotlight-value{
  margin-top:.5rem;
  color:#0f172a;
  font-size:2.15rem;
  line-height:1;
  font-weight:800;
}

.ajustes-info-list,
.ajustes-form-stack{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.ajustes-info-line{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  padding:.9rem 1rem;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.15);
}

.ajustes-info-line span{
  color:#64748b;
  font-weight:700;
}

.ajustes-info-line strong{
  color:#0f172a;
  font-weight:800;
  text-align:right;
}

/* Form */
.ajustes-alert{
  margin-bottom:1rem;
}

.ajustes-form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.9rem;
}

.ajustes-form-group{
  display:flex;
  flex-direction:column;
  gap:.38rem;
}

.ajustes-form-group-compact{
  max-width:280px;
}

.ajustes-form-group label{
  color:#0f172a;
  font-weight:700;
}

.ajustes-help{
  color:#64748b;
  font-size:.84rem;
  line-height:1.45;
}

.ajustes-field-errors ul,
.ajustes-form-group ul.errorlist{
  margin:.2rem 0 0;
  padding-left:1.1rem;
  color:#dc2626;
  font-size:.88rem;
}

.ajustes-days-card-form{
  margin-top:1rem;
}

.ajustes-form-checks{
  margin-top:.9rem;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:.75rem;
}

.ajustes-form-check{
  display:flex;
  align-items:center;
  gap:.6rem;
  min-height:48px;
  padding:.8rem .9rem;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(148,163,184,.18);
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
  cursor:pointer;
}

.ajustes-form-check:hover{
  transform: translateY(-1px);
  border-color: rgba(14,165,233,.24);
  box-shadow: 0 10px 20px rgba(15,23,42,.04);
}

.ajustes-form-check input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
}

.ajustes-form-check span{
  color:#0f172a;
  font-weight:700;
}

.ajustes-form-actions{
  margin-top:1rem;
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}

html[data-theme="light"] .ajustes-shell,
html[data-theme="light"] .ajustes-panel,
html[data-theme="light"] .ajustes-summary-card,
html[data-theme="light"] .ajustes-empty-state{
  background:rgba(255,255,255,.74) !important;
}

@media (max-width: 1180px){
  .ajustes-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .ajustes-content-grid,
  .ajustes-form-layout{
    grid-template-columns:1fr;
  }

  .ajustes-form-checks{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .ajustes-shell{
    padding:1rem;
  }

  .ajustes-summary-grid,
  .ajustes-info-grid,
  .ajustes-form-grid,
  .ajustes-form-checks{
    grid-template-columns:1fr;
  }

  .ajustes-summary-value{
    font-size:1.45rem;
  }

  .ajustes-info-line,
  .ajustes-panel-head,
  .ajustes-days-head,
  .ajustes-select-form{
    flex-direction:column;
    align-items:stretch;
  }

  .ajustes-info-line strong{
    text-align:left;
  }

  .ajustes-form-actions .softmk-btn{
    width:100%;
  }
}



/* =========================================================
   GLOBAL CORNER RADIUS TUNE
   Solo ajusta esquinas / border-radius en toda la plantilla
   ========================================================= */

:root{
  --softmk-radius-card: 24px;
  --softmk-radius-panel: 20px;
  --softmk-radius-control: 16px;
  --softmk-radius-chip: 999px;
}

/* Contenedores grandes */
.topbar,
.softmk-main-shell,
.softmk-page-shell,
.main-content .card,
.glass-card,
.softmk-list,
.softmk-list-card,
.softmk-table-wrap > .card,
.softmk-table-card,
.softmk-confirm-card,
.ajustes-shell,
.ajustes-panel,
.ajustes-summary-card,
.ajustes-days-card,
.ajustes-spotlight,
.ajustes-empty-state,
.ajustes-info-item,
.ajustes-info-line,
.ajustes-select-form,
.login-logo-img{
  border-radius: var(--softmk-radius-card) !important;
}

/* La sidebar usa bordes rectos */
.sidebar{
  border-radius: 0 !important;
}

/* Controles y botones */
.btn,
.softmk-btn,
.sidebar-toggle,
.mobile-menu-toggle-inline,
.theme-toggle-inline,
.topbar-logout-btn,
.main-content input[type="text"],
.main-content input[type="number"],
.main-content input[type="password"],
.main-content input[type="email"],
.main-content input[type="tel"],
.main-content input[type="url"],
.main-content input[type="date"],
.main-content input[type="time"],
.main-content select,
.main-content textarea,
.form-control,
.tm-form-control{
  border-radius: var(--softmk-radius-control) !important;
}

/* Navegación lateral */
.nav-link{
  border-radius: 18px !important;
}

.nav-short{
  border-radius: 14px !important;
}

/* Pills, badges y chips */
.badge,
.softmk-kpi-badge,
.ajustes-operator-chip,
.ajustes-mini-badge,
.ajustes-day-chip,
.softmk-toast-close{
  border-radius: var(--softmk-radius-chip) !important;
}

/* Tarjetas internas y bloques de datos */
.ajustes-info-item,
.ajustes-info-line,
.ajustes-days-card,
.ajustes-spotlight,
.softmk-confirm-copy,
.softmk-toast{
  border-radius: var(--softmk-radius-panel) !important;
}

/* Tabla y scroll wrappers */
.softmk-table-scroll{
  border-radius: 20px !important;
}

.softmk-table thead th:first-child{
  border-top-left-radius: 18px !important;
}

.softmk-table thead th:last-child{
  border-top-right-radius: 18px !important;
}

/* Overlay menú móvil */
.mobile-sidebar-overlay{
  border-radius: 0 !important;
}

/* Modo claro: radios adicionales para elementos fuera del layout principal */
html[data-theme="light"] .card{
  border-radius: var(--softmk-radius-card) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  border-radius: var(--softmk-radius-control) !important;
}


/* ===============================
   AJUSTES - MODO OSCURO
   Solo Ajustes, sin tocar otros módulos
   =============================== */

html[data-theme="dark"] .ajustes-shell{
  background: linear-gradient(180deg, rgba(15,23,42,.64), rgba(15,23,42,.54)) !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  box-shadow: 0 22px 50px rgba(2,6,23,.34) !important;
}

html[data-theme="dark"] .ajustes-eyebrow,
html[data-theme="dark"] .ajustes-summary-label,
html[data-theme="dark"] .ajustes-info-label,
html[data-theme="dark"] .ajustes-spotlight-label{
  color:#8fa6c1 !important;
}

html[data-theme="dark"] .ajustes-title,
html[data-theme="dark"] .ajustes-summary-value,
html[data-theme="dark"] .ajustes-info-value,
html[data-theme="dark"] .ajustes-panel-head h3,
html[data-theme="dark"] .ajustes-days-head h4,
html[data-theme="dark"] .ajustes-empty-state h3,
html[data-theme="dark"] .ajustes-field label,
html[data-theme="dark"] .ajustes-form-group label,
html[data-theme="dark"] .ajustes-form-check span,
html[data-theme="dark"] .ajustes-info-line strong,
html[data-theme="dark"] .ajustes-spotlight-value{
  color:#f5f9ff !important;
}

html[data-theme="dark"] .ajustes-subtitle,
html[data-theme="dark"] .ajustes-summary-note,
html[data-theme="dark"] .ajustes-panel-head p,
html[data-theme="dark"] .ajustes-days-head span,
html[data-theme="dark"] .ajustes-days-fallback,
html[data-theme="dark"] .ajustes-empty-state p,
html[data-theme="dark"] .ajustes-help,
html[data-theme="dark"] .ajustes-info-line span{
  color:#b6c5d8 !important;
}

html[data-theme="dark"] .ajustes-operator-chip{
  background: rgba(14,165,233,.14) !important;
  border-color: rgba(56,189,248,.28) !important;
  color:#c7ecff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04) !important;
}

html[data-theme="dark"] .ajustes-empty-state{
  background: linear-gradient(180deg, rgba(15,23,42,.62), rgba(15,23,42,.5)) !important;
  border-color: rgba(148,163,184,.18) !important;
  box-shadow: 0 18px 34px rgba(2,6,23,.24) !important;
}

html[data-theme="dark"] .ajustes-empty-state--error{
  background: linear-gradient(180deg, rgba(69,10,10,.46), rgba(15,23,42,.56)) !important;
  border-color: rgba(248,113,113,.22) !important;
}

html[data-theme="dark"] .ajustes-empty-icon{
  background: rgba(56,189,248,.12) !important;
  color:#d8f1ff !important;
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.14) !important;
}

html[data-theme="dark"] .ajustes-empty-state--error .ajustes-empty-icon{
  background: rgba(239,68,68,.14) !important;
  color:#ffd4d4 !important;
}

html[data-theme="dark"] .ajustes-summary-card{
  background: linear-gradient(180deg, rgba(15,23,42,.44), rgba(15,23,42,.36)) !important;
  border-color: rgba(148,163,184,.16) !important;
  box-shadow: 0 14px 28px rgba(2,6,23,.18) !important;
}

html[data-theme="dark"] .ajustes-summary-card::after{
  background: rgba(56,189,248,.08) !important;
}

html[data-theme="dark"] .ajustes-summary-card--primary{
  background: linear-gradient(135deg, rgba(14,165,233,.18), rgba(15,23,42,.42)) !important;
  border-color: rgba(56,189,248,.24) !important;
}

html[data-theme="dark"] .ajustes-summary-value span{
  opacity:.5 !important;
}

html[data-theme="dark"] .ajustes-panel{
  background: linear-gradient(180deg, rgba(15,23,42,.52), rgba(15,23,42,.44)) !important;
  border-color: rgba(148,163,184,.16) !important;
  box-shadow: 0 16px 30px rgba(2,6,23,.2) !important;
}

html[data-theme="dark"] .ajustes-mini-badge{
  background: rgba(14,165,233,.12) !important;
  border-color: rgba(56,189,248,.22) !important;
  color:#8ce5ee !important;
}

html[data-theme="dark"] .ajustes-info-item,
html[data-theme="dark"] .ajustes-info-line,
html[data-theme="dark"] .ajustes-form-check{
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(148,163,184,.14) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .ajustes-form-check:hover{
  border-color: rgba(56,189,248,.24) !important;
  background: rgba(56,189,248,.06) !important;
  box-shadow: 0 12px 24px rgba(2,6,23,.18) !important;
}

html[data-theme="dark"] .ajustes-days-card{
  background: linear-gradient(135deg, rgba(14,165,233,.10), rgba(15,23,42,.54)) !important;
  border-color: rgba(56,189,248,.18) !important;
}

html[data-theme="dark"] .ajustes-day-chip.is-active{
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 100%) !important;
  color:#ffffff !important;
  box-shadow: 0 12px 24px rgba(14,165,233,.26) !important;
}

html[data-theme="dark"] .ajustes-day-chip.is-off{
  background: rgba(255,255,255,.05) !important;
  border-color: rgba(148,163,184,.15) !important;
  color:#94a7bc !important;
}

html[data-theme="dark"] .ajustes-spotlight{
  background: linear-gradient(135deg, rgba(59,130,246,.14), rgba(15,23,42,.5)) !important;
  border-color: rgba(96,165,250,.22) !important;
}

html[data-theme="dark"] .ajustes-field-errors ul,
html[data-theme="dark"] .ajustes-form-group ul.errorlist{
  color:#fca5a5 !important;
}

html[data-theme="dark"] .ajustes-shell .form-control,
html[data-theme="dark"] .ajustes-shell .tm-form-control,
html[data-theme="dark"] .ajustes-shell input[type="text"],
html[data-theme="dark"] .ajustes-shell input[type="number"],
html[data-theme="dark"] .ajustes-shell input[type="email"],
html[data-theme="dark"] .ajustes-shell input[type="time"],
html[data-theme="dark"] .ajustes-shell select,
html[data-theme="dark"] .ajustes-shell textarea{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  color:#f5f9ff !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .ajustes-shell .form-control::placeholder,
html[data-theme="dark"] .ajustes-shell .tm-form-control::placeholder,
html[data-theme="dark"] .ajustes-shell input::placeholder,
html[data-theme="dark"] .ajustes-shell textarea::placeholder{
  color:#8fa6c1 !important;
  opacity:1 !important;
}

html[data-theme="dark"] .ajustes-shell .form-control:focus,
html[data-theme="dark"] .ajustes-shell .tm-form-control:focus,
html[data-theme="dark"] .ajustes-shell input:focus,
html[data-theme="dark"] .ajustes-shell select:focus,
html[data-theme="dark"] .ajustes-shell textarea:focus{
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(56,189,248,.42) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,.14) !important;
  color:#ffffff !important;
}

html[data-theme="dark"] .ajustes-shell select option,
html[data-theme="dark"] .ajustes-shell select optgroup{
  background:#0f172a !important;
  color:#f8fafc !important;
}

/* =========================
   SoftMK generic page helpers
   ========================= */

.softmk-page-max-lg{
  max-width: 960px;
}

.softmk-page-max-xl{
  max-width: 1200px;
}

.softmk-card-stack{
  display: grid;
  gap: 1rem;
}

.softmk-section-card{
  padding: 1rem 1.15rem;
}

.softmk-page-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.softmk-page-subtitle{
  opacity: .82;
  margin-top: .25rem;
}

.softmk-heading-reset{
  margin: 0 0 .25rem 0;
}

.softmk-space-top-md{
  margin-top: 1rem;
}

.softmk-space-top-lg{
  margin-top: 1.25rem;
}

.softmk-button-row{
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.softmk-inline-strong{
  margin: 0;
  font-weight: 700;
}

.softmk-col-90{ min-width: 90px; }
.softmk-col-120{ min-width: 120px; }
.softmk-col-140{ min-width: 140px; }
.softmk-col-160{ min-width: 160px; }
.softmk-col-170{ min-width: 170px; }
.softmk-col-190{ min-width: 190px; }

.softmk-table-scroll{
  overflow-x: auto;
}

.softmk-name-link{
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: color .12s ease, border-color .12s ease, transform .12s ease, background .12s ease;
  border-bottom: 1px solid transparent;
}

.softmk-name-link:hover{
  color: #7dd3fc;
  border-bottom-color: rgba(125,211,252,.55);
}

html[data-theme="light"] .softmk-name-link{
  color: #0f172a;
}

html[data-theme="light"] .softmk-name-link:hover{
  color: #075985;
  border-bottom-color: rgba(7,89,133,.28);
}

.softmk-form-shell{
  max-width: 960px;
}

.softmk-form-shell,
.softmk-form-shell *{
  box-sizing: border-box;
}

.softmk-form-shell .tm-form-control,
.softmk-form-shell .form-control,
.softmk-form-shell input[type="text"],
.softmk-form-shell input[type="number"],
.softmk-form-shell input[type="password"],
.softmk-form-shell input[type="email"],
.softmk-form-shell input[type="tel"],
.softmk-form-shell input[type="url"],
.softmk-form-shell input[type="date"],
.softmk-form-shell input[type="time"],
.softmk-form-shell select,
.softmk-form-shell textarea{
  width: 100%;
  max-width: 100%;
}

.softmk-form-shell textarea{
  display: block;
  resize: vertical;
}

.softmk-form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
}

.softmk-form-field-full{
  grid-column: 1 / -1;
}

.softmk-form-label{
  display: block;
  font-weight: 700;
  margin-bottom: .35rem;
}

.softmk-form-help{
  opacity: .75;
  font-size: .9rem;
  margin-top: .25rem;
}

.softmk-form-error{
  color: #ffb4b4;
  margin-top: .35rem;
}

html[data-theme="light"] .softmk-form-error{
  color: #b91c1c;
}

.softmk-form-errors{
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(127,29,29,.14);
  color: #fecaca;
}

html[data-theme="light"] .softmk-form-errors{
  background: rgba(254,226,226,.95);
  color: #991b1b;
  border-color: rgba(220,38,38,.16);
}

.softmk-checkbox-row{
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .25rem;
}

.softmk-detail-page{
  display: grid;
  gap: 1rem;
  max-width: 1100px;
}

.softmk-detail-card{
  padding: 1rem 1.15rem;
}

.softmk-detail-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.softmk-detail-title{
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.2;
}

.softmk-detail-subtitle{
  opacity: .82;
  margin-top: .25rem;
}

.softmk-detail-chip-row{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: .6rem;
}

.softmk-detail-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.softmk-detail-actions form{
  margin: 0;
}

.softmk-detail-note{
  margin-top: .9rem;
  font-weight: 600;
  color: #fca5a5;
}

html[data-theme="light"] .softmk-detail-note{
  color: #b91c1c;
}

.softmk-detail-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: .85rem;
}

.softmk-detail-item{
  padding: .9rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}

html[data-theme="light"] .softmk-detail-item{
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.38);
}

.softmk-detail-label{
  opacity: .72;
  font-size: .92rem;
}

.softmk-detail-value{
  margin-top: .2rem;
  font-weight: 700;
  word-break: break-word;
}

.softmk-action-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
}

.softmk-action-card{
  padding: .95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.softmk-action-title{
  font-weight: 700;
  margin-bottom: .25rem;
}

.softmk-action-copy{
  opacity: .82;
  margin-bottom: .8rem;
}

html[data-theme="light"] .softmk-action-card{
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.38);
}

.softmk-empty-state{
  padding: 1rem;
}

@media (max-width: 1024px){
  .softmk-name-link{
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: .35rem .7rem;
    border-radius: 14px;
    background: rgba(56,189,248,.10);
    border: 1px solid rgba(56,189,248,.16);
    border-bottom-color: rgba(56,189,248,.16);
  }

  .softmk-name-link:hover{
    transform: translateY(-1px);
    background: rgba(56,189,248,.16);
    border-bottom-color: rgba(56,189,248,.24);
  }

  html[data-theme="light"] .softmk-name-link{
    background: rgba(59,130,246,.10);
    border-color: rgba(59,130,246,.14);
  }

  html[data-theme="light"] .softmk-name-link:hover{
    background: rgba(59,130,246,.14);
    border-bottom-color: rgba(59,130,246,.18);
  }

  .softmk-form-grid,
  .softmk-detail-grid{
    grid-template-columns: 1fr;
  }

  .softmk-page-header,
  .softmk-detail-header{
    flex-direction: column;
    align-items: stretch;
  }

  .softmk-detail-actions{
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .softmk-detail-actions .softmk-btn,
  .softmk-detail-actions form,
  .softmk-detail-actions button{
    width: 100%;
  }
}
.cliente-detail-page{
  display:grid;
  gap:1rem;
}

.cliente-detail-card{
  padding:1rem;
}

.cliente-detail-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  flex-wrap:wrap;
}

.cliente-detail-name{
  font-weight:800;
  font-size:1.25rem;
  line-height:1.2;
}

.cliente-detail-subtle{
  opacity:.82;
  margin-top:.25rem;
}

.cliente-detail-chips{
  opacity:.82;
  margin-top:.35rem;
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  align-items:center;
}

.cliente-detail-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.cliente-detail-section-title{
  font-weight:700;
  margin-bottom:.85rem;
}

.cliente-detail-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.85rem;
}

.cliente-detail-grid-5{
  display:grid;
  grid-template-columns:repeat(5, minmax(140px, 1fr));
  gap:.75rem;
  margin-bottom:1rem;
}

.cliente-detail-span-full{
  grid-column:1 / -1;
}

.cliente-detail-label{
  opacity:.7;
}

.cliente-detail-badge{
  border-radius:999px;
  padding:.42rem .8rem;
  border:1px solid transparent;
  display:inline-flex;
  align-items:center;
  line-height:1.1;
}

.cliente-detail-badge-soft{
  background:rgba(108,117,125,.18);
  color:#d3d7db;
  border-color:rgba(108,117,125,.45);
}

.cliente-detail-badge-warn{
  background:rgba(255,193,7,.18);
  color:#ffe08a;
  border-color:rgba(255,193,7,.45);
}

.cliente-detail-badge-overdue{
  background:rgba(255,87,34,.18);
  color:#ffbe9f;
  border-color:rgba(255,87,34,.45);
}

.cliente-detail-metric{
  padding:.8rem;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
}

.cliente-detail-metric-title{
  opacity:.7;
  font-size:.92rem;
}

.cliente-detail-metric-value{
  font-weight:700;
  margin-top:.15rem;
}

.cliente-detail-action-row{
  display:flex;
  gap:.65rem;
  flex-wrap:wrap;
  margin-bottom:1rem;
}

.cliente-detail-panels{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}

.cliente-detail-panel{
  padding:1rem;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
}

.cliente-detail-panel-subtext{
  opacity:.78;
  margin:.25rem 0 .75rem 0;
}

.cliente-detail-inline-form{
  display:flex;
  gap:.6rem;
  align-items:center;
  flex-wrap:wrap;
}

.cliente-detail-input-sm{
  width:170px;
}

.cliente-detail-table-wrap{
  overflow-x:auto;
}

.cliente-detail-col-date{ min-width:180px; }
.cliente-detail-col-user{ min-width:140px; }
.cliente-detail-col-action{ min-width:140px; }
.cliente-detail-col-ok{ min-width:90px; }
.cliente-detail-title-tight{ margin-bottom:0; }
.cliente-detail-title-sm{ margin-bottom:.75rem; }
.cliente-detail-empty-cell{ padding:1rem; }

.cliente-detail-link{
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(56,189,248,.55);
  text-underline-offset: .18em;
  transition: color .12s ease, text-decoration-color .12s ease;
}

.cliente-detail-link:hover{
  color: #7dd3fc;
  text-decoration-color: rgba(125,211,252,.9);
}

.cliente-detail-billing-total{
  margin-bottom:1rem;
}

html[data-theme="light"] .cliente-detail-badge-soft{
  background:rgba(100,116,139,.12);
  color:#475569;
  border-color:rgba(100,116,139,.24);
}

html[data-theme="light"] .cliente-detail-badge-warn{
  background:rgba(245,158,11,.14);
  color:#b45309;
  border-color:rgba(245,158,11,.28);
}

html[data-theme="light"] .cliente-detail-badge-overdue{
  background:rgba(249,115,22,.12);
  color:#c2410c;
  border-color:rgba(249,115,22,.24);
}

html[data-theme="light"] .cliente-detail-metric,
html[data-theme="light"] .cliente-detail-panel{
  border-color:rgba(15,23,42,.08);
  background:rgba(255,255,255,.38);
}

html[data-theme="light"] .cliente-detail-link{
  color:#0369a1;
  text-decoration-color: rgba(3,105,161,.35);
}

html[data-theme="light"] .cliente-detail-link:hover{
  color:#075985;
  text-decoration-color: rgba(7,89,133,.55);
}

@media (max-width: 1180px){
  .cliente-detail-page{
    overflow-x:hidden;
  }

  .cliente-detail-card{
    max-width:100%;
    overflow:hidden;
    padding:1rem;
  }

  .cliente-detail-header{
    flex-direction:column;
    align-items:stretch;
    gap:.9rem;
  }

  .cliente-detail-header > div:first-child{
    width:100%;
    min-width:0;
  }

  .cliente-detail-subtle,
  .cliente-detail-grid-2 > div,
  .cliente-detail-grid-5 > div,
  .cliente-detail-panel,
  .cliente-detail-metric,
  .cliente-detail-actions,
  .cliente-detail-actions .softmk-btn{
    min-width:0;
    box-sizing:border-box;
  }

  .cliente-detail-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
    gap:.6rem;
    margin-top:.75rem;
  }

  .cliente-detail-actions .softmk-btn{
    width:100%;
    display:flex !important;
    justify-content:center;
    align-items:center;
    text-align:center;
    white-space:normal;
    line-height:1.2;
    padding:.72rem .9rem;
    min-height:44px;
    max-width:100%;
  }
}

@media (max-width: 1100px){
  .cliente-detail-grid-5{
    grid-template-columns:repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 980px){
  .cliente-detail-header{
    flex-direction:column;
    align-items:stretch;
  }

  .cliente-detail-header > div:first-child{
    width:100%;
    min-width:0;
  }

  .cliente-detail-chips > span:first-child{
    width:100%;
  }

  .cliente-detail-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
    margin-top:.75rem;
  }

  .cliente-detail-actions .softmk-btn{
    width:100%;
    min-width:0;
    display:flex !important;
    justify-content:center;
    align-items:center;
    text-align:center;
    white-space:normal;
    line-height:1.2;
    padding:.62rem .72rem;
    min-height:42px;
  }

  .cliente-detail-actions .softmk-btn:last-child:nth-child(odd){
    grid-column:1 / -1;
  }
}

@media (max-width: 860px){
  .cliente-detail-grid-2,
  .cliente-detail-panels{
    grid-template-columns:1fr;
  }
}

@media (max-width: 860px){
  .cliente-detail-card{
    padding:.9rem;
  }

  .cliente-detail-name{
    font-size:1.15rem;
  }

  .cliente-detail-chips{
    gap:.42rem;
  }

  .cliente-detail-chips > span:first-child{
    width:100%;
  }

  .cliente-detail-grid-2,
  .cliente-detail-panels{
    grid-template-columns:1fr;
  }

  .cliente-detail-grid-5{
    grid-template-columns:1fr;
  }

  .cliente-detail-action-row{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }

  .cliente-detail-action-row .softmk-btn{
    width:100%;
    min-width:0;
    justify-content:center;
    text-align:center;
    white-space:normal;
    padding:.58rem .72rem;
  }

  .cliente-detail-action-row .softmk-btn:last-child:nth-child(odd){
    grid-column:1 / -1;
  }

  .cliente-detail-input-sm{
    width:100%;
  }

  .cliente-detail-inline-form{
    align-items:stretch;
  }
}

@media (max-width: 640px){
  .cliente-detail-page{
    gap:.85rem;
    overflow-x:hidden;
  }

  .cliente-detail-card{
    padding:.85rem;
    overflow:hidden;
  }

  .cliente-detail-header{
    gap:.8rem;
  }

  .cliente-detail-header > div:first-child{
    width:100%;
    min-width:0;
  }

  .cliente-detail-subtle,
  .cliente-detail-grid-2 > div,
  .cliente-detail-grid-5 > div,
  .cliente-detail-panel,
  .cliente-detail-metric{
    min-width:0;
    word-break:break-word;
    overflow-wrap:anywhere;
  }

  .cliente-detail-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
    margin-top:.75rem;
  }

  .cliente-detail-actions .softmk-btn{
    width:100%;
    min-width:0;
    display:flex !important;
    justify-content:center;
    align-items:center;
    text-align:center;
    white-space:normal;
    line-height:1.2;
    padding:.62rem .72rem;
    min-height:42px;
  }

  .cliente-detail-actions .softmk-btn:last-child:nth-child(odd){
    grid-column:1 / -1;
  }

  .cliente-detail-inline-form{
    flex-direction:column;
    align-items:stretch;
  }

  .cliente-detail-inline-form .softmk-btn{
    width:100%;
    justify-content:center;
  }

  .cliente-detail-table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width: 390px){
  .cliente-detail-actions,
  .cliente-detail-action-row{
    grid-template-columns:1fr;
  }

  .cliente-detail-actions .softmk-btn:last-child:nth-child(odd),
  .cliente-detail-action-row .softmk-btn:last-child:nth-child(odd){
    grid-column:auto;
  }

  .cliente-detail-name{
    font-size:1.05rem;
  }

  .cliente-detail-badge{
    padding:.38rem .62rem;
  }
}

.clientes-page-max-1040{
  max-width:1040px;
}

.clientes-card-block{
  padding:1rem;
  margin-bottom:1rem;
}

.clientes-card-block-lg{
  padding:1.25rem;
}

.clientes-card-shell-sm{
  padding:.25rem 0;
}

.clientes-card-max-720{
  max-width:720px;
}

.clientes-card-max-860{
  max-width:860px;
}

.clientes-header-row{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
  flex-wrap:wrap;
}

.clientes-header-row-center{
  align-items:center;
}

.clientes-header-row-end{
  align-items:flex-end;
}

.clientes-muted-copy{
  opacity:.8;
}

.clientes-subtle-copy{
  opacity:.82;
  margin-bottom:1rem;
}

.clientes-subtle-copy-block{
  margin-bottom:1rem;
  opacity:.85;
}

.clientes-line-height-md{
  line-height:1.6;
}

.clientes-title-tight{
  margin:0 0 .35rem 0;
}

.clientes-title-spaced{
  margin-bottom:1rem;
}

.clientes-title-zero{
  margin:0;
}

.clientes-badge-row{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top:.6rem;
}

.clientes-filter-row{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top:.8rem;
}

.clientes-toolbar-actions{
  display:flex;
  gap:.6rem;
  flex-wrap:wrap;
  align-items:center;
}

.clientes-actions-inline{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.clientes-actions-inline-lg{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}

.clientes-search-row{
  margin-top:.9rem;
  display:flex;
  gap:.6rem;
  flex-wrap:wrap;
}

.clientes-search-input{
  max-width:520px;
}

.clientes-table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.clientes-pill-badge{
  border-radius:999px;
  padding:.35rem .7rem;
}

.clientes-pill-badge-sm{
  border-radius:999px;
  padding:.25rem .6rem;
}

.clientes-empty-cell{
  padding:1rem;
}

.clientes-pagination-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  padding:.75rem 1rem;
}

.clientes-pagination-actions{
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
}

.clientes-link-clean{
  text-decoration:none;
}

.clientes-row-alert{
  outline:1px solid rgba(255,80,80,.35);
}

.clientes-field-stack{
  margin-bottom:1rem;
}

.clientes-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}

.clientes-form-grid-auto-220{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:1rem;
}

.clientes-form-grid-auto-260{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:1rem;
  margin-top:1rem;
}

.clientes-field-full{
  grid-column:1 / -1;
}

.clientes-form-label{
  display:block;
  margin-bottom:.35rem;
  font-weight:700;
}

.clientes-form-label-lite{
  display:block;
  margin-bottom:.45rem;
  font-weight:600;
}

.clientes-form-label-block{
  display:block;
  margin-bottom:.35rem;
}

.clientes-form-help{
  opacity:.75;
  font-size:.9rem;
  margin-top:.25rem;
}

.clientes-form-help-sm{
  font-size:.9rem;
  margin-top:.35rem;
}

.clientes-form-help-xs{
  margin-top:.3rem;
}

.clientes-form-error{
  font-size:.92rem;
  margin-top:.25rem;
}

.clientes-form-checkbox-row-spaced{
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-top:1.9rem;
}

.clientes-form-checkbox-row-top{
  margin-top:1rem;
  display:flex;
  align-items:center;
  gap:.5rem;
}

.clientes-form-checkbox-label{
  margin:0;
  font-weight:700;
}

.clientes-form-actions{
  display:flex;
  gap:.75rem;
  margin-top:1.25rem;
  flex-wrap:wrap;
}

.clientes-section-title{
  font-weight:800;
  margin-bottom:.75rem;
}

.clientes-section-shell{
  display:none;
  margin-top:1.25rem;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.08);
}

.clientes-section-shell-static{
  margin-top:1rem;
}

.clientes-section-copy{
  opacity:.8;
  margin:.35rem 0 .75rem 0;
}

.clientes-form-error-card{
  padding:1rem;
  border:1px solid rgba(239,68,68,.35);
  margin-bottom:1rem;
}

.clientes-metric-card{
  padding:1rem;
  background:rgba(255,255,255,.02);
}

.clientes-metric-label{
  margin-bottom:.35rem;
}

.clientes-alert-block{
  margin-bottom:1rem;
}

.clientes-inline-note-warning{
  white-space:normal;
  line-height:1.35;
  font-weight:600;
}

.clientes-inline-note-secondary{
  white-space:normal;
  line-height:1.35;
}

.clientes-inline-note-success{
  font-weight:700;
}

.clientes-import-actions-between{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}

.clientes-import-actions-end{
  display:flex;
  justify-content:flex-end;
  gap:.6rem;
  margin-top:1rem;
}

.clientes-click-label{
  display:block;
  margin:0;
  cursor:pointer;
}

.clientes-margin-top-md{
  margin-top:1rem;
}

.clientes-margin-bottom-md{
  margin-bottom:1rem;
}

.clientes-margin-left-sm{
  margin-left:.45rem;
}

.clientes-records-title{
  font-weight:800;
  font-size:1.1rem;
}

.cliente-list-name-link{
  color:inherit;
  font-weight:800;
  text-decoration:none;
  transition:color .12s ease, background .12s ease, border-color .12s ease, transform .12s ease;
  border-bottom:1px solid transparent;
}

.cliente-list-name-link:hover{
  color:#7dd3fc;
  border-bottom-color:rgba(125,211,252,.55);
}

.cliente-list-ip-link{
  color:inherit;
  font-weight:700;
  text-decoration:underline;
  text-decoration-color:rgba(56,189,248,.55);
  text-underline-offset:.18em;
  transition:color .12s ease, text-decoration-color .12s ease;
}

.cliente-list-ip-link:hover{
  color:#7dd3fc;
  text-decoration-color:rgba(125,211,252,.9);
}

.cliente-baja-name-link{
  color:inherit;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .12s ease, background .12s ease, border-color .12s ease, transform .12s ease;
}

.cliente-baja-name-link:hover{
  color:#7dd3fc;
  border-bottom-color:rgba(125,211,252,.55);
}

.softmk-records-page .softmk-records-card{
  padding:1.05rem;
  margin-bottom:1rem;
}

.softmk-records-page .softmk-records-subtitle{
  opacity:.82;
  margin-top:.25rem;
}

.softmk-records-page .softmk-records-filter-shell{
  margin-top:.85rem;
  padding:.85rem;
  border-radius:20px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.softmk-records-page .softmk-records-filter-head{
  margin-bottom:.6rem;
}

.softmk-records-page .softmk-records-filter-title{
  font-weight:800;
  font-size:1rem;
  line-height:1.15;
}

.softmk-records-page .softmk-records-filter-copy{
  opacity:.72;
  font-size:.91rem;
  line-height:1.4;
  margin-top:.12rem;
  max-width:620px;
}

.softmk-records-page .softmk-records-filter-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:.65rem;
  align-items:end;
}

.softmk-records-page .softmk-records-field{
  min-width:0;
}

.softmk-records-page .softmk-records-field label{
  display:block;
  margin-bottom:.38rem;
  font-size:.94rem;
  font-weight:600;
  opacity:.8;
}

.softmk-records-page .softmk-records-span-2{
  grid-column:span 2;
}

.softmk-records-page .softmk-records-filter-actions{
  display:flex;
  justify-content:flex-start;
  gap:.65rem;
  flex-wrap:wrap;
  margin-top:.7rem;
}

.softmk-records-page .softmk-records-filter-actions .softmk-btn{
  min-width:128px;
}

.clientes-form-page input[type="text"],
.clientes-form-page input[type="password"],
.clientes-form-page input[type="number"],
.clientes-form-page input[type="email"],
.clientes-form-page select,
.clientes-form-page textarea,
.clientes-reactivar-page input[type="text"],
.clientes-reactivar-page input[type="password"],
.clientes-reactivar-page input[type="number"],
.clientes-reactivar-page input[type="email"],
.clientes-reactivar-page select,
.clientes-reactivar-page textarea,
.clientes-baja-page textarea,
.clientes-import-page input[type="text"],
.clientes-import-page input[type="password"],
.clientes-import-page input[type="number"],
.clientes-import-page input[type="email"],
.clientes-import-page input[type="date"],
.clientes-import-page select,
.clientes-import-page textarea{
  width:100%;
  padding:.65rem .8rem;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  outline:none;
  min-height:44px;
}

.clientes-form-page textarea,
.clientes-reactivar-page textarea,
.clientes-baja-page textarea,
.clientes-import-page textarea{
  min-height:120px;
}

.clientes-list-page .softmk-clients-table .col-iua{
  min-width:150px;
}

.clientes-list-page .softmk-clients-table .col-name{
  min-width:240px;
}

.clientes-list-page .softmk-clients-table .col-mikrotik{
  min-width:160px;
}

.clientes-list-page .softmk-clients-table .col-type{
  min-width:130px;
}

.clientes-list-page .softmk-clients-table .col-status{
  min-width:140px;
}

.clientes-list-page .softmk-clients-table .col-ip{
  min-width:150px;
}

.clientes-list-page .softmk-clients-table .col-ont{
  min-width:190px;
}

.clientes-list-page .softmk-clients-table .col-created{
  min-width:190px;
}

.clientes-baja-list-page .clientes-baja-table th:nth-child(1){
  min-width:150px;
}

.clientes-baja-list-page .clientes-baja-table th:nth-child(2){
  min-width:220px;
}

.clientes-baja-list-page .clientes-baja-table th:nth-child(3){
  min-width:160px;
}

.clientes-baja-list-page .clientes-baja-table th:nth-child(4){
  min-width:180px;
}

.softmk-records-page .clientes-records-table th:nth-child(1),
.clientes-records-client-page .clientes-records-client-table th:nth-child(1){
  min-width:180px;
}

.softmk-records-page .clientes-records-table th:nth-child(2),
.clientes-records-client-page .clientes-records-client-table th:nth-child(2){
  min-width:140px;
}

.softmk-records-page .clientes-records-table th:nth-child(3),
.clientes-records-client-page .clientes-records-client-table th:nth-child(3){
  min-width:140px;
}

.softmk-records-page .clientes-records-table th:nth-child(4),
.clientes-records-client-page .clientes-records-client-table th:nth-child(4){
  min-width:90px;
}

.softmk-records-page .clientes-records-table th:nth-child(3){
  min-width:240px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(1){
  min-width:90px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(2){
  min-width:220px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(3){
  min-width:150px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(4),
.clientes-import-page .clientes-import-ip-select-table th:nth-child(5){
  min-width:140px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(6){
  min-width:160px;
}

.clientes-import-page .clientes-import-ip-select-table th:nth-child(7){
  min-width:220px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(1){
  min-width:180px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(2){
  min-width:220px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(3){
  min-width:170px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(4){
  min-width:160px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(5),
.clientes-import-page .clientes-import-ip-apply-table th:nth-child(6){
  min-width:150px;
}

.clientes-import-page .clientes-import-ip-apply-table th:nth-child(7){
  min-width:170px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(1){
  min-width:70px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(2){
  min-width:220px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(3){
  min-width:180px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(4){
  min-width:150px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(5){
  min-width:160px;
}

.clientes-import-page .clientes-import-pppoe-select-table th:nth-child(6){
  min-width:220px;
}

.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(1){
  min-width:180px;
}

.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(2){
  min-width:220px;
}

.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(3),
.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(4),
.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(8){
  min-width:170px;
}

.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(5){
  min-width:140px;
}

.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(6),
.clientes-import-page .clientes-import-pppoe-confirm-table th:nth-child(7){
  min-width:150px;
}

html[data-theme="light"] .cliente-list-ip-link{
  color:#0369a1;
  text-decoration-color:rgba(3,105,161,.35);
}

html[data-theme="light"] .cliente-list-ip-link:hover{
  color:#075985;
  text-decoration-color:rgba(7,89,133,.55);
}

html[data-theme="light"] .cliente-list-name-link,
html[data-theme="light"] .cliente-baja-name-link{
  color:#0f172a;
}

html[data-theme="light"] .cliente-list-name-link:hover,
html[data-theme="light"] .cliente-baja-name-link:hover{
  color:#075985;
  border-bottom-color:rgba(7,89,133,.28);
}

html[data-theme="light"] .softmk-records-page .softmk-records-filter-shell{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 28px rgba(15,23,42,.04);
}

html[data-theme="light"] .softmk-records-page .softmk-records-filter-copy{
  color:#64748b;
  opacity:1;
}

html[data-theme="light"] .clientes-form-page input[type="text"],
html[data-theme="light"] .clientes-form-page input[type="password"],
html[data-theme="light"] .clientes-form-page input[type="number"],
html[data-theme="light"] .clientes-form-page input[type="email"],
html[data-theme="light"] .clientes-form-page select,
html[data-theme="light"] .clientes-form-page textarea,
html[data-theme="light"] .clientes-reactivar-page input[type="text"],
html[data-theme="light"] .clientes-reactivar-page input[type="password"],
html[data-theme="light"] .clientes-reactivar-page input[type="number"],
html[data-theme="light"] .clientes-reactivar-page input[type="email"],
html[data-theme="light"] .clientes-reactivar-page select,
html[data-theme="light"] .clientes-reactivar-page textarea,
html[data-theme="light"] .clientes-baja-page textarea,
html[data-theme="light"] .clientes-import-page input[type="text"],
html[data-theme="light"] .clientes-import-page input[type="password"],
html[data-theme="light"] .clientes-import-page input[type="number"],
html[data-theme="light"] .clientes-import-page input[type="email"],
html[data-theme="light"] .clientes-import-page input[type="date"],
html[data-theme="light"] .clientes-import-page select,
html[data-theme="light"] .clientes-import-page textarea{
  border-color:rgba(15,23,42,.12);
  background:rgba(255,255,255,.92);
  color:#0f172a;
}

html[data-theme="light"] .clientes-metric-card{
  background:rgba(255,255,255,.65);
}

@media (max-width: 1360px){
  .softmk-records-page .softmk-records-filter-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }

  .softmk-records-page .softmk-records-span-2{
    grid-column:span 2;
  }
}

@media (max-width: 1024px){
  .cliente-list-name-link,
  .cliente-baja-name-link{
    display:inline-flex;
    align-items:center;
    min-height:40px;
    padding:.35rem .7rem;
    border-radius:14px;
    background:rgba(56,189,248,.10);
    border:1px solid rgba(56,189,248,.16);
    border-bottom-color:rgba(56,189,248,.16);
  }

  .cliente-list-name-link:hover,
  .cliente-baja-name-link:hover{
    transform:translateY(-1px);
    background:rgba(56,189,248,.16);
    border-bottom-color:rgba(56,189,248,.24);
  }

  html[data-theme="light"] .cliente-list-name-link,
  html[data-theme="light"] .cliente-baja-name-link{
    background:rgba(59,130,246,.10);
    border-color:rgba(59,130,246,.14);
  }

  html[data-theme="light"] .cliente-list-name-link:hover,
  html[data-theme="light"] .cliente-baja-name-link:hover{
    background:rgba(59,130,246,.14);
    border-bottom-color:rgba(59,130,246,.18);
  }
}

@media (max-width: 900px){
  .softmk-records-page .softmk-records-filter-shell{
    padding:.95rem;
    border-radius:20px;
  }

  .softmk-records-page .softmk-records-filter-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.7rem;
  }

  .softmk-records-page .softmk-records-span-2{
    grid-column:span 2;
  }

  .clientes-form-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  .softmk-records-page .softmk-records-card{
    padding:.9rem;
  }

  .softmk-records-page .softmk-records-filter-shell{
    padding:.85rem;
  }

  .softmk-records-page .softmk-records-filter-grid{
    grid-template-columns:1fr;
  }

  .softmk-records-page .softmk-records-span-2{
    grid-column:span 1;
  }

  .softmk-records-page .softmk-records-filter-actions{
    justify-content:stretch;
  }

  .softmk-records-page .softmk-records-filter-actions .softmk-btn{
    width:100%;
    min-width:0;
  }

  .clientes-header-row,
  .clientes-pagination-row,
  .clientes-import-actions-between{
    flex-direction:column;
    align-items:stretch;
  }

  .clientes-toolbar-actions,
  .clientes-actions-inline,
  .clientes-actions-inline-lg,
  .clientes-pagination-actions,
  .clientes-import-actions-end,
  .clientes-filter-row{
    width:100%;
  }

  .clientes-toolbar-actions .softmk-btn,
  .clientes-actions-inline .softmk-btn,
  .clientes-actions-inline-lg .softmk-btn,
  .clientes-import-actions-end .softmk-btn,
  .clientes-pagination-actions .softmk-btn,
  .clientes-filter-row .softmk-btn{
    width:100%;
    justify-content:center;
  }

  .clientes-search-input{
    max-width:none;
  }
}

/* Navegación lateral: grupos compactos y estados visibles. */
.sidebar{
  padding:18px 14px 22px !important;
}

html[data-theme="light"] .sidebar{
  background:linear-gradient(180deg,rgba(250,253,255,.95),rgba(244,249,253,.9)) !important;
  box-shadow:12px 0 35px rgba(15,23,42,.035);
}

.sidebar .sidebar-header{
  padding-bottom:16px;
  margin-bottom:14px;
}

.sidebar .nav-menu{
  padding:0;
  margin-bottom:0;
}

.sidebar .nav-item.nav-item-single{
  margin-bottom:10px;
}

.sidebar .nav-item-single .nav-link{
  min-height:46px;
  padding:10px 13px;
  font-weight:700;
}

.sidebar .nav-link-config{
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.01em;
  line-height:1.25;
}

html[data-theme="light"] .sidebar .nav-link-config:not(.active){
  color:#64748b !important;
}

html[data-theme="light"] .sidebar .nav-link-config:not(.active):is(:hover,:focus-visible){
  color:#0f172a !important;
}

.sidebar .nav-group-icon{
  width:18px;
  height:18px;
  flex:none;
  color:#38bdf8;
  opacity:.83;
}

.sidebar .nav-section{
  margin-bottom:3px;
}

.sidebar .nav-section-toggle{
  min-height:44px;
  padding:10px 12px;
  gap:11px;
  border-radius:13px;
  color:var(--text-secondary);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.01em;
  text-transform:none;
  transition:background .16s ease,color .16s ease;
}

.sidebar .nav-section-title{
  flex:1;
  min-width:0;
  margin:0;
  padding:0;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
  text-transform:none;
  text-align:left;
}

.sidebar .nav-section-toggle::after{
  width:7px;
  height:7px;
  flex:none;
  margin-right:4px;
}

.sidebar .nav-section-toggle:hover,
.sidebar .nav-section-toggle:focus-visible{
  background:rgba(56,189,248,.1);
  color:var(--text-primary);
}

.sidebar .nav-section.is-open .nav-section-toggle,
.sidebar .nav-section:has(.nav-link.active) .nav-section-toggle{
  background:rgba(56,189,248,.12);
  color:var(--text-primary);
}

.sidebar .nav-section.is-open .nav-group-icon,
.sidebar .nav-section:has(.nav-link.active) .nav-group-icon{
  opacity:1;
}

.sidebar .nav-section-body{
  margin:2px 0 4px 20px !important;
  padding:0 0 0 10px !important;
  border-left:1px solid var(--glass-border);
}

.sidebar .nav-section-body .nav-item{
  margin-bottom:2px;
}

.sidebar .nav-section-body .nav-link{
  min-height:38px;
  padding:8px 10px;
  border-radius:11px !important;
  font-size:.88rem;
}

.sidebar .nav-link.active{
  box-shadow:inset 3px 0 #38bdf8;
}

.sidebar .nav-section-toggle:focus-visible,
.sidebar .nav-link:focus-visible{
  outline:2px solid #38bdf8;
  outline-offset:2px;
}

body.sidebar-collapsed .sidebar .nav-group-icon{
  display:none;
}

body.sidebar-collapsed .sidebar .nav-section{
  margin-bottom:13px;
}

body.sidebar-collapsed .sidebar .nav-section-body{
  margin:0 !important;
  padding:0 !important;
  border:0;
}

body.sidebar-collapsed .sidebar .nav-section > ul{
  gap:6px;
}

@media(max-width:1100px){
  body.sidebar-collapsed .sidebar .nav-group-icon{
    display:block;
  }
  body.sidebar-collapsed .sidebar .nav-section{
    margin-bottom:3px !important;
  }
  body.sidebar-collapsed .sidebar .nav-section-body{
    margin:2px 0 4px 20px !important;
    padding:0 0 0 10px !important;
    border-left:1px solid var(--glass-border);
  }
  body.sidebar-collapsed .sidebar .nav-section > ul{
    gap:0 !important;
  }
}

/* En escritorio, el menú colapsado muestra grupos y se despliega sobre el contenido al interactuar. */
@media(min-width:1101px){
  body.sidebar-collapsed .sidebar{
    z-index:120;
  }

  body.sidebar-collapsed .sidebar .nav-menu{
    min-height:calc(100vh - 80px);
  }

  body.sidebar-collapsed .sidebar .nav-item.nav-item-single{
    margin-bottom:8px;
  }

  body.sidebar-collapsed .sidebar .nav-item-single .nav-link,
  body.sidebar-collapsed .sidebar .nav-section-toggle{
    width:44px;
    min-height:44px;
    margin:0 auto;
    padding:0 !important;
    justify-content:center !important;
    border-radius:14px !important;
  }

  body.sidebar-collapsed .sidebar .nav-group-icon{
    display:block !important;
    width:20px;
    height:20px;
  }

  body.sidebar-collapsed .sidebar .nav-short{
    display:none !important;
  }

  body.sidebar-collapsed .sidebar .nav-section{
    margin-bottom:6px;
  }

  body.sidebar-collapsed .sidebar .nav-section-toggle{
    display:flex !important;
  }

  body.sidebar-collapsed .sidebar .nav-section-toggle::after{
    display:none;
  }

  body.sidebar-collapsed .sidebar .nav-section-body{
    display:none !important;
  }

  body.sidebar-collapsed .sidebar .nav-section.is-open .nav-section-toggle{
    background:transparent;
    color:var(--text-secondary);
  }

  body.sidebar-collapsed .sidebar .nav-section:has(.nav-link.active) .nav-section-toggle{
    background:rgba(56,189,248,.17);
    color:var(--text-primary);
    box-shadow:inset 3px 0 #38bdf8;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)){
    width:var(--sidebar-expanded-width) !important;
    padding-left:14px !important;
    padding-right:14px !important;
    box-shadow:12px 0 34px rgba(15,23,42,.14);
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .sidebar-header{
    justify-content:flex-start;
    gap:12px;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .logo-text,
  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-full{
    display:inline-flex !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .sidebar-toggle{
    position:static;
    width:40px;
    height:40px;
    margin-left:auto;
    transform:none;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .sidebar-toggle:hover{
    transform:translateY(-1px);
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-menu{
    margin-top:0;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-item.nav-item-single{
    margin-bottom:10px;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-item-single .nav-link{
    width:auto;
    min-height:46px;
    padding:10px 13px !important;
    justify-content:flex-start !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section{
    margin-bottom:3px;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section-toggle{
    width:100%;
    min-height:44px;
    padding:10px 12px !important;
    justify-content:flex-start !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section-title{
    display:block !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section-toggle::after{
    display:block;
    margin-left:auto;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section.is-open .nav-section-toggle{
    background:rgba(56,189,248,.12);
    color:var(--text-primary);
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section-body{
    display:block !important;
    max-height:0 !important;
    overflow:hidden !important;
    margin:2px 0 4px 20px !important;
    padding:0 0 0 10px !important;
    border-left:1px solid var(--glass-border);
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section.is-open .nav-section-body{
    max-height:720px !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section > ul{
    gap:0;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-item{
    display:block;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-section-body .nav-link{
    min-height:38px;
    padding:8px 10px !important;
    justify-content:flex-start !important;
  }

  body.sidebar-collapsed .sidebar:has(.nav-menu:is(:hover,:focus-within)) .nav-link .badge{
    display:inline-flex !important;
  }
}

/* Acceso principal de VPN de gestión. */
.sidebar .nav-item-vpn{
  margin-bottom:10px;
}

.sidebar .nav-link-vpn{
  min-height:56px;
  border:1px solid rgba(16,185,129,.3);
  background:linear-gradient(110deg,rgba(16,185,129,.15),rgba(56,189,248,.07));
}

.sidebar .nav-link-vpn .nav-full{
  display:flex;
}

.sidebar .nav-link-vpn .nav-group-icon{
  color:#059669;
  opacity:1;
}

.sidebar .nav-link-vpn .nav-full strong,
.sidebar .nav-link-vpn .nav-full small{
  display:block;
  line-height:1.15;
}

.sidebar .nav-link-vpn .nav-full strong{
  font-size:.88rem;
}

.sidebar .nav-link-vpn .nav-full small{
  margin-top:3px;
  color:#059669;
  font-size:.65rem;
  font-weight:700;
}

html[data-theme="dark"] .sidebar .nav-link-vpn .nav-full small,
html[data-theme="dark"] .sidebar .nav-link-vpn .nav-group-icon{
  color:#6ee7b7;
}
