*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial, sans-serif;
    background:#f3f6fb;
    color:#0f172a;
}

/* CABECERA */

.topbar{
/*    background:linear-gradient(135deg,#0f172a,#1e293b);   */
    background:linear-gradient(135deg,#0069FF,#0069FF); 
	color:white;
    padding:22px 32px;
    box-shadow:0 8px 24px rgba(15,23,42,.25);
}

.topbar-inner{
    max-width:1400px;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.logo h1{
    margin:0;
    font-size:30px;
    font-weight:800;
    color:white;
}

.logo h1::first-letter{
    /* color:#3b82f6;*/
	color:#030000;
}

.logo span{
    color:white;
}

.logo p{
    margin:6px 0 0;
    color:#cbd5e1;
}

.menu-admin,
.acciones{
    display:flex;
    gap:12px;
    align-items:center;
}

/* BOTONES */

.btn{
    background:#2563eb;
    color:white !important;
    text-decoration:none;
    padding:12px 18px;
    border-radius:10px;
    font-weight:700;
    border:none;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.btn:hover{
    background:#1d4ed8;
}

.btn-home,
.btn-dark{
    background:#334155;
}

.btn-home:hover,
.btn-dark:hover{
	
	/* background:#2563eb;*/
    background:#00D2B2;
}

.btn-green{
    background:#16a34a;
}

.btn-green:hover{
    background:#15803d;
}

.btn-red,
.btn-danger{
    background:#dc2626;
}

.btn-red:hover,
.btn-danger:hover{
    background:#b91c1c;
}

.btn-light{
    background:white;
    color:#0f172a !important;
    border:1px solid #cbd5e1;
}

.btn-small{
    padding:8px 12px;
    font-size:13px;
    border-radius:8px;
}

/* ESTRUCTURA */

.contenedor{
    max-width:1400px;
    margin:35px auto;
    padding:0 24px;
}

.panel,
.bloque-categoria{
    background:white;
    border-radius:18px;
    padding:28px;
    margin-bottom:30px;
    box-shadow:0 10px 28px rgba(15,23,42,.08);
}

.hero{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white;
    padding:38px;
    border-radius:18px;
    text-align:center;
    margin-bottom:25px;
}

.hero h2{
    margin:0 0 10px;
    font-size:32px;
}

.hero p{
    margin:0;
    color:#dbeafe;
}

.info{
    background:#f8fafc;
    border-left:5px solid #2563eb;
    padding:14px 18px;
    border-radius:10px;
    margin:16px 0 22px;
    color:#334155;
}

/* FILTROS INDEX */

.filtros{
    background:white;
    border-radius:18px;
    padding:22px;
    margin-bottom:25px;
    box-shadow:0 10px 28px rgba(15,23,42,.08);
}

.filtros form{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

.filtros input,
.filtros select{
    flex:1;
    min-width:220px;
    height:46px;
    padding:0 14px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    font-size:15px;
    background:white;
}

.acciones-filtros{
    width:100%;
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:8px;
}

.resultados-info{
    font-size:18px;
    margin:22px 0;
}

.resultados-info strong{
    color:#2563eb;
}

/* CATEGORÍAS INDEX */

.titulo-categoria{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
    padding-bottom:14px;
    border-bottom:1px solid #e5e7eb;
}

.titulo-categoria h2{
    margin:0;
    font-size:26px;
    color:#2563eb;
}

.titulo-categoria span{
    background:#dbeafe;
    color:#1d4ed8;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

/* CARDS */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
    gap:22px;
}

.card{
    background:white;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:22px;
    box-shadow:0 4px 12px rgba(15,23,42,.05);
}

.card h3{
    margin:16px 0 10px;
    font-size:20px;
}

.card p{
    color:#475569;
    line-height:1.5;
}

.card-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-top:20px;
}

.fecha{
    color:#64748b;
    font-size:14px;
}

.card-privado{
    border:2px solid #dc2626;
}

/* BADGES */

.badges{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

.badge{
    display:inline-flex;
    align-items:center;
    padding:6px 11px;
    border-radius:8px;
    font-size:13px;
    font-weight:700;
    background:#e2e8f0;
    color:#334155;
}

.badge-subcategoria{
    background:#e0f2fe;
    color:#075985;
}

.badge-publico{
    background:#dcfce7;
    color:#166534;
}

.badge-privado{
    background:#fee2e2;
    color:#991b1b;
}

.diff-baja{
    background:#dcfce7;
    color:#166534;
}

.diff-media{
    background:#ffedd5;
    color:#c2410c;
}

.diff-alta{
    background:#fee2e2;
    color:#991b1b;
}

/* COLORES CATEGORÍAS */

.cat-windows{background:#2563eb;color:white;}
.cat-redes{background:#14b8a6;color:white;}
.cat-tpv{background:#9333ea;color:white;}
.cat-office{background:#ea580c;color:white;}
.cat-impresoras{background:#64748b;color:white;}
.cat-servidores{background:#0f172a;color:white;}
.cat-gmail{background:#dc2626;color:white;}
.cat-portatiles{background:#0891b2;color:white;}
.cat-nas{background:#16a34a;color:white;}
.cat-otros{background:#6b7280;color:white;}

/* FORMULARIOS */

label{
    display:block;
    margin:18px 0 7px;
    font-weight:700;
}

input,
select,
textarea{
    width:100%;
    padding:13px 14px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    font-size:15px;
    background:white;
}

textarea{
    min-height:130px;
    resize:vertical;
}

.acciones{
    margin-top:22px;
}

/* VER ARTÍCULO */

.contenido{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:18px;
    line-height:1.6;
    color:#334155;
}

.codigo{
    background:#0f172a;
    color:#e5e7eb;
    padding:18px;
    border-radius:12px;
    overflow:auto;
}

.notas-internas{
    background:#fff7ed;
    border:1px solid #fed7aa;
    padding:18px;
    border-radius:12px;
}

/* GALERÍA */

.galeria-admin{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:18px;
    margin-top:18px;
}

.foto-admin{
    border:1px solid #e2e8f0;
    border-radius:14px;
    padding:10px;
    background:white;
}

.foto-admin img{
    width:100%;
    border-radius:10px;
    display:block;
}

/* ADMIN CATEGORÍAS */

.form-admin-categorias{
    display:grid;
    grid-template-columns:1fr 190px;
    gap:14px;
    margin:20px 0 26px;
}

.form-admin-categorias:has(select){
    grid-template-columns:280px 1fr 210px;
}

.form-admin-categorias input,
.form-admin-categorias select{
    height:46px;
}

.tabla-responsive{
    width:100%;
    overflow-x:auto;
}

.tabla-admin{
    width:100%;
    border-collapse:collapse;
    background:white;
    border:1px solid #e2e8f0;
    border-radius:14px;
    overflow:hidden;
}

.tabla-admin thead{
    background:#f1f5f9;
}

.tabla-admin th{
    color:#0f172a;
    font-size:13px;
    font-weight:800;
    text-transform:uppercase;
    padding:13px 18px;
    border-bottom:1px solid #e2e8f0;
    text-align:left;
}

.tabla-admin td{
    padding:12px 18px;
    border-bottom:1px solid #e5e7eb;
    color:#0f172a;
    background:white;
}

.tabla-admin tbody tr:hover td{
    background:#f8fafc;
}

.tabla-admin th:nth-child(2),
.tabla-admin td:nth-child(2){
    text-align:center;
    width:160px;
}

.col-acciones{
    text-align:right !important;
    width:160px;
}

.estado{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    min-width:105px;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:800;
}

.estado-activo{
    background:#dcfce7;
    color:#166534;
    border:1px solid #86efac;
}

.estado-oculto{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fca5a5;
}

.bloque-subcategoria-admin{
    margin-top:20px;
    border:1px solid #e2e8f0;
    border-radius:16px;
    overflow:hidden;
    background:white;
}

.cabecera-subcategoria-admin{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    background:#2563eb;
    color:white;
}

.cabecera-subcategoria-admin h3{
    margin:0;
    font-size:17px;
    color:white;
}

.cabecera-subcategoria-admin span{
    background:rgba(255,255,255,.20);
    padding:5px 11px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

/* RESPONSIVE */

@media(max-width:800px){

    .topbar-inner{
        flex-direction:column;
        align-items:flex-start;
    }

    .form-admin-categorias,
    .form-admin-categorias:has(select){
        grid-template-columns:1fr;
    }

    .acciones-filtros{
        justify-content:stretch;
    }

    .acciones-filtros .btn{
        flex:1;
    }

    .grid{
        grid-template-columns:1fr;
    }
}

/* LOGIN ADMIN */

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:linear-gradient(135deg,#0f172a,#1e293b);
}

.login-box{
    width:100%;
    max-width:430px;
    background:white;
    padding:34px;
    border-radius:20px;
    box-shadow:0 20px 45px rgba(0,0,0,.25);
}

.login-box h1{
    margin:0;
    font-size:30px;
    color:#0f172a;
}

.login-box h1 span{
    color:#2563eb;
}

.login-box p{
    margin:8px 0 26px;
    color:#64748b;
}

.login-box label{
    margin-top:16px;
}

.login-box input{
    height:48px;
}

.login-actions{
    display:flex;
    gap:12px;
    margin-top:24px;
}

.login-actions .btn{
    flex:1;
}

/* ================= LOGIN CORRECTO ================= */

body.login-page{
    margin:0 !important;
    min-height:100vh !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:24px !important;
    background:linear-gradient(135deg,#0f172a,#1e293b) !important;
    font-family:Arial, sans-serif !important;
}

body.login-page .login-box{
    width:100% !important;
    max-width:430px !important;
    background:#ffffff !important;
    padding:36px !important;
    border-radius:22px !important;
    box-shadow:0 22px 55px rgba(0,0,0,.30) !important;
}

body.login-page .login-box h1{
    margin:0 !important;
    font-size:32px !important;
    font-weight:800 !important;
    color:#0f172a !important;
}

body.login-page .login-box h1 span{
    color:#2563eb !important;
}

body.login-page .login-box p{
    margin:8px 0 28px !important;
    color:#64748b !important;
    font-size:15px !important;
}

body.login-page label{
    display:block !important;
    margin:16px 0 7px !important;
    font-weight:700 !important;
    color:#0f172a !important;
}

body.login-page input{
    width:100% !important;
    height:48px !important;
    padding:0 14px !important;
    border:1px solid #cbd5e1 !important;
    border-radius:12px !important;
    font-size:15px !important;
    background:white !important;
}

body.login-page input:focus{
    border-color:#2563eb !important;
    outline:none !important;
    box-shadow:0 0 0 3px rgba(37,99,235,.15) !important;
}

body.login-page .login-actions{
    display:flex !important;
    gap:12px !important;
    margin-top:26px !important;
}

body.login-page .login-actions .btn{
    flex:1 !important;
    height:46px !important;
    padding:0 16px !important;
    border-radius:12px !important;
}

body.login-page .error-login{
    background:#fee2e2 !important;
    border:1px solid #fca5a5 !important;
    color:#991b1b !important;
    padding:12px !important;
    border-radius:10px !important;
    margin-bottom:15px !important;
    font-weight:700 !important;
}

.enlaces-box{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.enlace-recurso{
    margin:0;
}

.enlace-recurso a{
    display:flex;
    align-items:center;
    gap:8px;
    padding:12px 14px;
    background:#eff6ff;
    border:1px solid #bfdbfe;
    border-radius:10px;
    color:#1d4ed8;
    text-decoration:none;
    font-weight:700;
}

.enlace-recurso a:hover{
    background:#dbeafe;
}
/* ================= ARCHIVOS ADJUNTOS ================= */

.ayuda-campo{
    display:block;
    margin-top:7px;
    color:#64748b;
    font-size:13px;
    line-height:1.4;
}

.archivos-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:18px;
    margin-top:18px;
}

.archivo-card{
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:12px;
    background:white;
    box-shadow:0 4px 12px rgba(15,23,42,.05);
}

.archivo-card img{
    width:100%;
    height:170px;
    object-fit:cover;
    border-radius:12px;
    display:block;
}

.archivo-card video{
    width:100%;
    max-height:240px;
    border-radius:12px;
    background:#0f172a;
    display:block;
}

.archivo-card small{
    display:block;
    margin-top:8px;
    color:#64748b;
    word-break:break-word;
}

.archivo-card .btn{
    width:100%;
    margin-top:10px;
}

.archivo-link{
    min-height:170px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    text-align:center;
    padding:18px;
    border-radius:12px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    color:#1d4ed8;
    text-decoration:none;
}

.archivo-link:hover{
    background:#eff6ff;
    border-color:#bfdbfe;
}

.archivo-icono{
    font-size:42px;
}
