/* =====================================================================
   MYCARS biz - HOJA DE ESTILOS PRINCIPAL
   activos.css
   Paleta: negro #1a1a1a / blanco #ffffff / granate #8b0000
   Tipografias: Syne (headings) + DM Mono (data)
   ===================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'DM Mono', monospace;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 13px;
    line-height: 1.5;
}

a { color: #8b0000; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: 'Syne', sans-serif;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ---------- CABECERA SUPERIOR ---------- */
.cabecera {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 2px solid #8b0000;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 20px;
}

.cab-logo { display: flex; align-items: center; }

.cab-div {
    width: 1px;
    height: 44px;
    background: #e0e0e0;
    margin: 0 8px;
}

.cab-coleccion { flex: 1; }

.cab-coleccion-nombre {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12em;
    color: #1a1a1a;
}

.cab-coleccion-sub {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #666;
    letter-spacing: .06em;
    margin-top: 2px;
}

.cab-coleccion-pagina {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #8b0000;
    letter-spacing: .05em;
    margin-top: 4px;
}

.cab-acciones {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cab-supervisor {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #8b0000;
    border-radius: 6px;
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #8b0000 !important;
    background: #ffffff;
    transition: all .18s;
}

.cab-supervisor:hover {
    background: #8b0000;
    color: #ffffff !important;
    text-decoration: none;
}

.cab-supervisor-punto {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #8b0000;
}

.cab-supervisor:hover .cab-supervisor-punto { background: #ffffff; }

.cab-avatar {
    width: 36px; height: 36px;
    background: #8b0000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}

.cab-salir {
    padding: 6px 14px;
    background: transparent;
    color: #8b0000;
    border: 1px solid #8b0000;
    border-radius: 6px;
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .18s;
}

.cab-salir:hover {
    background: #8b0000;
    color: #ffffff;
}

/* ---------- LAYOUT SIDEBAR ---------- */
.cl-layout {
    display: flex;
    min-height: calc(100vh - 140px);
}

.cl-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 20px 16px 16px;
    position: fixed;
    top: 78px;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cl-nav { flex: 1; }

.cl-nav-seccion {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #8b0000;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 6px;
}

.cl-nav-item {
    display: block;
    padding: 9px 12px;
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #1a1a1a !important;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all .14s;
    text-decoration: none;
}

.cl-nav-item:hover {
    background: rgba(139,0,0,.08);
    color: #8b0000 !important;
    text-decoration: none;
}

.cl-nav-item.activo {
    background: #8b0000;
    color: #ffffff !important;
}

.cl-nav-texto { font-size: 12px; }

.cl-sidebar-foot {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 9px;
    color: #888;
    letter-spacing: .08em;
    text-align: center;
}

.cl-sidebar-foot-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    padding: 0 4px;
}

.cl-sidebar-avatar {
    width: 24px; height: 24px;
    background: #8b0000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 9px;
    font-weight: 700;
}

/* ---------- MAIN ---------- */
.cl-main {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    background: #ffffff;
    min-height: calc(100vh - 140px);
}

/* ---------- BIENVENIDA ---------- */
.cl-bienvenida {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 20px;
}

.cl-bienvenida-sym {
    font-size: 28px;
    color: #8b0000;
    margin-bottom: 12px;
}

.cl-bienvenida h2 {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.cl-bienvenida p {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #666;
    letter-spacing: .06em;
}

/* ---------- LISTADOS ---------- */
.listado-contenedor {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.listado-barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #8b0000;
}

.listado-barra-superior h2 {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    letter-spacing: .08em;
    margin: 0;
}

.tabla-listado {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Mono', monospace;
}

.tabla-listado thead th {
    background: #1a1a1a;
    color: #ffffff;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #8b0000;
}

.tabla-listado tbody td {
    padding: 10px 12px;
    font-size: 12px;
    color: #1a1a1a;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-listado tbody tr:hover td { background: #fafafa; }

.columna-acciones {
    width: 140px;
    text-align: right;
}

.sin-resultados {
    text-align: center;
    padding: 32px !important;
    color: #888;
    font-style: italic;
    font-size: 11px;
}

/* ---------- ICONOS SVG ---------- */
.bloque-iconos,
.bloque-iconos-superior {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}

.icono-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 6px;
    color: #666;
    transition: all .14s;
}

.icono-accion:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.icono-ver:hover     { color: #8b0000; background: rgba(139,0,0,.08); }
.icono-insertar      { color: #8b0000; background: rgba(139,0,0,.08); }
.icono-insertar:hover{ color: #ffffff; background: #8b0000; }
.icono-modificar:hover { color: #8b0000; background: rgba(139,0,0,.08); }
.icono-borrar:hover    { color: #ffffff; background: #8b0000; }

/* ---------- FORMULARIOS ---------- */
.formulario-contenedor {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.formulario-contenedor h2 {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    letter-spacing: .08em;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #8b0000;
}

.grilla-formulario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 18px;
}

.grupo-campo {
    display: flex;
    flex-direction: column;
}

.grupo-campo label {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.campo,
.formulario-contenedor input[type="text"],
.formulario-contenedor input[type="number"],
.formulario-contenedor input[type="date"],
.formulario-contenedor input[type="email"],
.formulario-contenedor input[type="password"],
.formulario-contenedor input[type="file"],
.formulario-contenedor select,
.formulario-contenedor textarea {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #1a1a1a;
    background: #ffffff;
    outline: none;
    transition: border-color .18s;
}

.formulario-contenedor textarea {
    resize: vertical;
    min-height: 72px;
}

.campo:focus,
.formulario-contenedor input:focus,
.formulario-contenedor select:focus,
.formulario-contenedor textarea:focus {
    border-color: #8b0000;
}

.campo-ancho-completo {
    grid-column: 1 / -1;
}

.barra-botones {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.boton {
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all .18s;
}

.boton-guardar {
    background: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
}

.boton-guardar:hover {
    background: #6b0000;
    border-color: #6b0000;
    text-decoration: none;
}

.boton-cancelar {
    background: #ffffff;
    color: #666;
    border-color: #e0e0e0;
}

.boton-cancelar:hover {
    background: #fafafa;
    color: #1a1a1a;
    text-decoration: none;
}

/* ---------- MENSAJES ---------- */
.mensaje-verde,
.mensaje-rojo,
.mensaje-azul {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: .04em;
}

.mensaje-verde { background: #eafaf1; color: #1e8449; border-left: 3px solid #27ae60; }
.mensaje-rojo  { background: #fdecea; color: #8b0000; border-left: 3px solid #8b0000; }
.mensaje-azul  { background: #eef4fc; color: #1e4d8b; border-left: 3px solid #3498db; }

/* ---------- VISTA DETALLE ---------- */
.detalle-contenedor {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.grilla-detalle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.item-detalle {
    padding: 10px 12px;
    background: #fafafa;
    border-left: 3px solid #8b0000;
    border-radius: 0 6px 6px 0;
}

.item-detalle .etiqueta {
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: .12em;
}

.item-detalle .valor {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: #1a1a1a;
    margin-top: 3px;
}

/* ---------- BARRA DE FILTROS ---------- */
.barra-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 14px;
}

.barra-filtros .grupo-campo { min-width: 160px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .cl-sidebar { width: 200px; }
    .cl-main { margin-left: 200px; padding: 16px; }
    .pie { margin-left: 200px !important; }
    .grilla-formulario { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .cabecera { flex-wrap: wrap; gap: 10px; }
    .cl-sidebar { position: static; width: 100%; height: auto; min-height: 0; }
    .cl-main { margin-left: 0; }
    .pie { margin-left: 0 !important; }
}
