/* =========================================================
   TECNOSTREAMING V15.4 - CAPA DE MEJORA VISUAL
   No depende de librerías nuevas. Compatible con V15.3.
   ========================================================= */
:root{--ts-purple:#a855f7;--ts-purple-2:#7c3aed;--ts-pink:#ec4899;--ts-bg:#080912;--ts-panel:#111426;--ts-line:rgba(168,85,247,.18);--ts-text:#f8fafc;--ts-muted:#94a3b8}
html{scroll-behavior:smooth}
button,input,select,textarea{font-family:inherit}
button{touch-action:manipulation}

/* ---------- ADMIN: acabado premium ---------- */
body{background:#070812!important}
body::before{background:radial-gradient(circle at 15% 10%,rgba(168,85,247,.13),transparent 34%),radial-gradient(circle at 85% 25%,rgba(236,72,153,.09),transparent 30%),linear-gradient(135deg,#080912,#0d1020 55%,#090a13)!important;animation:none!important}
body::after{background-image:linear-gradient(rgba(168,85,247,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(168,85,247,.035) 1px,transparent 1px)!important;background-size:44px 44px!important;animation:none!important}
.sidebar{background:rgba(8,9,20,.94)!important;border-right:1px solid rgba(168,85,247,.18)!important;box-shadow:12px 0 40px rgba(0,0,0,.28)!important}
.sidebar-header h2,.top-header h1{background:linear-gradient(90deg,#e9d5ff,#c084fc,#f0abfc)!important;-webkit-background-clip:text!important;background-clip:text!important}
.sidebar-header p{color:#c4b5fd!important}
.nav-item:hover,.nav-item.active{background:linear-gradient(90deg,rgba(168,85,247,.18),rgba(124,58,237,.04))!important;color:#e9d5ff!important;border-left-color:#a855f7!important}
.nav-item::before{background:linear-gradient(90deg,#a855f7,transparent)!important}
.mobile-menu-btn{background:linear-gradient(135deg,#a855f7,#7c3aed)!important;color:#fff!important;box-shadow:0 8px 25px rgba(124,58,237,.3)!important}
.top-header{background:rgba(8,9,20,.82)!important;border-bottom-color:rgba(168,85,247,.14)!important}
.content-wrapper{max-width:1500px;margin:0 auto;padding:28px 34px 45px}
.section-header,.page-head{background:rgba(17,20,38,.72);border:1px solid rgba(168,85,247,.12);border-radius:18px;padding:20px 22px;box-shadow:0 16px 45px rgba(0,0,0,.16);backdrop-filter:blur(12px)}
.section-header h2,.page-head h2{color:#fff!important}
.section-header p,.page-head p{color:#a5b4fc!important}
.btn-primary{background:linear-gradient(135deg,#a855f7,#7c3aed)!important;color:#fff!important;box-shadow:0 8px 24px rgba(124,58,237,.22)}
.btn-primary:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn-secondary{background:rgba(255,255,255,.06)!important;color:#e2e8f0!important;border:1px solid rgba(255,255,255,.10)!important}
.table-container,.category-table-wrap{border:1px solid rgba(168,85,247,.13)!important;box-shadow:0 18px 50px rgba(0,0,0,.20)!important}
.data-table th,.category-table th{background:#f8fafc!important;color:#64748b!important}
.data-table td{background:#fff!important;color:#334155!important}
.data-table tbody tr:hover td{background:#faf7ff!important}
.badge-info{background:#f3e8ff!important;color:#6d28d9!important}
.search-box input,.category-toolbar input{box-shadow:0 8px 22px rgba(0,0,0,.08);transition:.2s}
.search-box input:focus,.category-toolbar input:focus{outline:0;border-color:#a855f7!important;box-shadow:0 0 0 4px rgba(168,85,247,.12),0 8px 22px rgba(0,0,0,.08)!important}
.alert{border-radius:13px!important;box-shadow:0 10px 30px rgba(0,0,0,.12)}

/* Categorías: contraste corregido y tabla más clara */
.category-page{max-width:none!important}
.category-table th,.category-table td{color:#334155!important}
.category-table td strong{color:#111827!important}
.category-table code{color:#475569!important}
.category-table tbody tr:hover td{color:#111827!important;background:#faf7ff!important}
.category-icon{color:#7c3aed!important;background:#f3e8ff!important}
.status.active{background:#dcfce7!important;color:#166534!important}.status.inactive{background:#e2e8f0!important;color:#475569!important}
.actions button{background:#fff!important;color:#475569!important}.actions button:hover{color:#7c3aed!important;border-color:#a855f7!important;background:#faf5ff!important}

/* Modal y formularios */
.modal-content,.category-dialog{border:1px solid rgba(168,85,247,.16)!important;box-shadow:0 30px 90px rgba(0,0,0,.35)!important}
.form-group label,.category-dialog label{color:#334155!important}
.form-group input,.form-group select,.form-group textarea,.category-dialog label input{background:#fff!important;color:#1e293b!important;border-color:#dbe1e8!important}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus,.category-dialog label input:focus{border-color:#a855f7!important;box-shadow:0 0 0 4px rgba(168,85,247,.10)!important;outline:0}

/* Personalización */
.template-selector{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.template-card{position:relative}
.template-option input:checked+.template-card::after{content:'✓ ACTIVO';position:absolute;top:10px;right:10px;background:#a855f7;color:#fff;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;letter-spacing:.5px}
.color-control{background:#fbfaff!important;border-color:#eadcff!important}
.color-control:hover{border-color:#c084fc!important;box-shadow:0 8px 25px rgba(124,58,237,.08)}
.customize-actions{position:sticky;bottom:12px;z-index:20;padding:12px;background:rgba(8,9,20,.84);border:1px solid rgba(168,85,247,.16);border-radius:16px;backdrop-filter:blur(12px);box-shadow:0 15px 40px rgba(0,0,0,.25)}

/* ---------- CATÁLOGO: más limpio, estable y responsive ---------- */
.catalog-product-card,.product-card{will-change:transform}
.product-card{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important}
.product-card:hover{transform:translateY(-5px)!important}
.products-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:20px!important}
.product-image img{transition:transform .35s ease!important}
.product-card:hover .product-image img{transform:scale(1.035)!important}
.product-info{padding:15px!important}
.product-name{letter-spacing:-.15px}
.product-actions{gap:8px!important}
.btn-buy,.btn-add-cart,.btn-primary-catalog{box-shadow:0 8px 22px rgba(var(--brand-primary-rgb,168,85,247),.14)!important}
.btn-view-details{border:1px solid rgba(255,255,255,.12)!important;color:rgba(255,255,255,.9)!important;background:rgba(255,255,255,.035)!important}
.btn-view-details:hover{background:rgba(255,255,255,.08)!important}
.catalog-search{backdrop-filter:blur(12px)}
.category-chip{transition:transform .18s ease,background .18s ease,border-color .18s ease!important}

/* Carrito más integrado */
.cart-floating{right:22px!important;bottom:24px!important;box-shadow:0 14px 40px rgba(0,0,0,.30),0 0 0 1px rgba(255,255,255,.08)!important}
.cart-panel{border-left:1px solid rgba(168,85,247,.12)!important}
.cart-checkout{box-shadow:0 10px 25px rgba(22,163,74,.18)!important}

/* Evita saltos visuales al redimensionar */
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

@media(max-width:1100px){.template-selector{grid-template-columns:repeat(2,minmax(0,1fr))!important}.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:768px){
 .content-wrapper{padding:18px 14px 30px}
 .top-header{padding:18px 18px 18px 72px!important}
 .section-header,.page-head{padding:16px;border-radius:15px}
 .section-header .btn-primary,.page-head .btn-primary{width:100%;justify-content:center}
 .template-selector{grid-template-columns:1fr!important}
 .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important}
 .product-info{padding:11px!important;gap:7px!important}
 .product-name{font-size:13px!important}
 .product-description{font-size:11px!important;line-height:1.35!important}
 .product-price{font-size:17px!important}
 .product-actions{grid-template-columns:1fr 1fr!important;gap:5px!important}
 .btn-buy,.btn-whatsapp-small{min-height:34px!important;padding:7px 5px!important;font-size:11px!important}
 .cart-floating{right:12px!important;bottom:14px!important;padding:11px 13px!important}
 .cart-floating-text{display:none!important}
 .cart-toast{bottom:68px!important;max-width:calc(100vw - 30px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media(max-width:430px){.products-grid{gap:8px!important}.product-image{aspect-ratio:1/1.05!important}.product-name{font-size:12px!important}.product-price{font-size:16px!important}.btn-buy,.btn-whatsapp-small{font-size:10px!important}.content-wrapper{padding-left:10px;padding-right:10px}}
.product-results-count{display:inline-flex;vertical-align:middle;margin-left:8px;padding:5px 9px;border-radius:999px;background:#f3e8ff;color:#6d28d9;font:700 11px Poppins,sans-serif;letter-spacing:.1px}
.empty-images{grid-column:1/-1;margin:0;padding:18px;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b;text-align:center}
.admin-modal-open{overflow:hidden}
.modal{z-index:4000!important}
@media(max-width:480px){.product-results-count{display:block;width:max-content;margin:6px 0 0}.content-wrapper{padding-bottom:80px}}
/* Login */
.auth-container .auth-card,.login-container .login-card{border:1px solid rgba(168,85,247,.18)!important;box-shadow:0 25px 70px rgba(0,0,0,.30)!important}
