:root {
    --bg-dark: #080c14;
    --card-bg: #111827;
    --card-border: rgba(255, 255, 255, 0.12);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --honda: #ff4b4b;
    --hero: #ffb703;
    --cyan: #00f2fe;
    --primary: #6366f1;
    --purple: #a855f7;
}

* { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding: 0; }
body { background-color: var(--bg-dark); color: var(--text-main); padding: 24px; min-height: 100vh; }
.container { max-width: 1450px; margin: 0 auto; }

/* LOGIN STYLES */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-card { background: var(--card-bg); padding: 36px; border-radius: 24px; border: 1px solid var(--cyan); width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.login-card h2 { font-size: 1.6rem; color: #fff; margin-top: 10px; }
.login-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.w-100 { width: 100%; margin-top: 10px; }

/* HEADER & USER INFO */
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 15px; }
.brand-title h1 { font-size: 2rem; font-weight: 800; color: #ffffff; }
.brand-title p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.user-info { display: flex; align-items: center; gap: 16px; background: var(--card-bg); padding: 10px 18px; border-radius: 14px; border: 1px solid var(--card-border); }
.btn-logout { background: rgba(255, 75, 75, 0.2); color: var(--honda); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; border: 1px solid rgba(255, 75, 75, 0.3); }

.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 800; color: var(--cyan); background: rgba(0, 242, 254, 0.1); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(0, 242, 254, 0.3); text-transform: uppercase; }
.pulse-dot { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 8px var(--cyan); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* BARRA DE FILTROS HORIZONTAL */
.filter-bar-horizontal { display: flex; align-items: center; gap: 16px; background: var(--card-bg); padding: 14px 20px; border-radius: 16px; border: 1px solid var(--card-border); margin-bottom: 24px; overflow-x: auto; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.5px; }

select, .pill-select { background-color: #111827 !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.2); padding: 9px 16px; border-radius: 12px; font-size: 0.85rem; font-weight: 600; cursor: pointer; outline: none; }
select option { background-color: #111827 !important; color: #ffffff !important; padding: 10px; }

/* FIX DEL ICONO DEL CALENDARIO EN BLANCO */
input[type="date"].white-calendar::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100%);
    cursor: pointer;
}

/* KPI GRID */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 28px; }
.kpi-card { background: var(--card-bg); padding: 20px; border-radius: 18px; border: 1px solid var(--card-border); transition: transform 0.3s ease; }
.kpi-card:hover { transform: translateY(-4px); }
.glow-blue:hover { border-color: var(--primary); }
.glow-red:hover { border-color: var(--honda); }
.glow-amber:hover { border-color: var(--hero); }
.glow-cyan:hover { border-color: var(--cyan); }
.kpi-card p { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.kpi-card h2 { font-size: 1.5rem; margin-top: 6px; font-weight: 800; color: #ffffff; }
.text-honda { color: var(--honda) !important; }
.text-hero { color: var(--hero) !important; }
.text-accent { color: var(--cyan) !important; }

/* DASHBOARD GRÁFICOS */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 960px) { .dashboard-grid { grid-template-columns: 1fr; } }
.card { background: var(--card-bg); padding: 22px; border-radius: 20px; border: 1px solid var(--card-border); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-header h3 { font-size: 1.05rem; font-weight: 700; color: #ffffff; }
.badge-live { font-size: 0.7rem; font-weight: 700; color: var(--purple); background: rgba(168, 85, 247, 0.15); padding: 4px 10px; border-radius: 12px; }
.chart-container { position: relative; height: 280px; width: 100%; }

/* LAYOUT Y FORMULARIO */
.content-layout { display: grid; grid-template-columns: 420px 1fr; gap: 20px; }
@media (max-width: 1024px) { .content-layout { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.label-with-btn { display: flex; justify-content: space-between; align-items: center; }
.btn-new-cat { background: rgba(0, 242, 254, 0.15); color: var(--cyan); border: 1px solid rgba(0, 242, 254, 0.3); font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 4px 10px; border-radius: 8px; }

input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], input[type="file"] {
    background: #111827 !important; color: #ffffff !important; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.82rem; width: 100%; outline: none;
}
input[type="file"] { padding: 8px; cursor: pointer; }

.attachment-box { background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(255, 255, 255, 0.15); padding: 12px; border-radius: 14px; }
.toggle-mode { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn { flex: 1; background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid transparent; padding: 6px 8px; font-size: 0.72rem; font-weight: 700; border-radius: 8px; cursor: pointer; }
.tab-btn.active { background: rgba(0, 242, 254, 0.15); color: var(--cyan); border-color: rgba(0, 242, 254, 0.4); }

.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-primary { flex: 1; padding: 12px; background: linear-gradient(135deg, var(--primary), var(--purple)); color: white; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-cancel { padding: 12px; background: rgba(255, 255, 255, 0.08); color: var(--text-muted); border: none; border-radius: 12px; font-weight: 600; cursor: pointer; }
.hidden { display: none !important; }

/* TABLA E HISTORIAL */
.subtitle { font-size: 0.75rem; color: var(--cyan); font-weight: 600; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--card-border); font-size: 0.85rem; color: #ffffff; }
th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; }
.badge { padding: 4px 10px; border-radius: 20px; font-weight: 800; font-size: 0.72rem; }
.badge-honda { background: rgba(255, 75, 75, 0.2); color: var(--honda); border: 1px solid rgba(255, 75, 75, 0.3); }
.badge-hero { background: rgba(255, 183, 3, 0.2); color: var(--hero); border: 1px solid rgba(255, 183, 3, 0.3); }

.attach-preview-container { display: flex; gap: 6px; align-items: center; }
.img-thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; border: 1px solid var(--cyan); cursor: pointer; }
.file-link-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: rgba(255, 255, 255, 0.1); color: var(--cyan); border-radius: 6px; font-size: 0.72rem; text-decoration: none; font-weight: 700; }

.btn-action { padding: 6px 10px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.75rem; font-weight: 700; margin-right: 4px; }
.btn-edit { background: rgba(99, 102, 241, 0.25); color: #a5b4fc; }
.btn-delete { background: rgba(255, 75, 75, 0.25); color: #fca5a5; }

/* MODAL DE CATEGORÍA */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.modal-content { background: #111827; padding: 28px; border-radius: 20px; border: 1px solid var(--cyan); width: 90%; max-width: 420px; }
.modal-content h3 { font-size: 1.2rem; color: #ffffff; margin-bottom: 8px; }
.modal-content p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; }