:root {
    --bg-main: #f0f4f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --purple: #8b5cf6;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-lg: 0 20px 30px -10px rgba(37, 99, 235, 0.12);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding-bottom: 50px;
}

/* Navbar Moderna con Gradiente */
.navbar {
    background: var(--primary-gradient);
    color: white;
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo i {
    width: 38px;
    height: 38px;
    color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 0.85rem;
    color: #93c5fd;
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* KPI Cards Vibrantes */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.blue { background: #dbeafe; color: #2563eb; }
.kpi-icon.green { background: #d1fae5; color: #10b981; }
.kpi-icon.orange { background: #fee2e2; color: #ef4444; }
.kpi-icon.purple { background: #f3e8ff; color: #8b5cf6; }

.kpi-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Barra de Filtros y Búsqueda */
.toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.search-box, .filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.search-box:focus-within, .filter-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.filter-box.highlight {
    background: var(--primary-light);
    border-color: #bfdbfe;
}

.filter-box.highlight select {
    color: var(--primary);
    font-weight: 700;
}

.search-box { flex: 2; min-width: 280px; }
.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-primary);
}

.filter-box select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grid de Tarjetas de Equipos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.img-wrapper {
    width: 100%;
    height: 170px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
}

.badge.ok { background-color: var(--success); }
.badge.low { background-color: var(--danger); }

.item-no {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-tag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.5;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--border-color);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Botones con Efecto Neón y Sombras */
.btn {
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary { 
    background: var(--primary-gradient); 
    color: white; 
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { 
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary { 
    background: #f1f5f9; 
    color: var(--text-primary); 
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { 
    background: #e2e8f0; 
}

.btn-danger { 
    background: var(--danger-light); 
    color: var(--danger); 
}
.btn-danger:hover { 
    background: var(--danger); 
    color: white; 
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.hidden { display: none; }

.modal {
    background: var(--bg-card);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
}