/* ============================================================================
   ESTILOS DEL PANEL DE ADMINISTRACIÓN — Soluciones KRG
   Archivo propio del panel. No afecta al sitio público.
   ============================================================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f7;
    color: #1f2937;
    line-height: 1.55;
}

/* ============================ PANTALLA DE ENTRADA ========================= */
.acceso {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1d4ed8 100%);
}

.acceso-caja {
    background: #ffffff;
    border-radius: 16px;
    padding: 38px 34px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .35);
}

.acceso-caja .marca { text-align: center; margin-bottom: 26px; }
.acceso-caja .marca h1 { font-size: 1.45rem; color: #0f172a; }
.acceso-caja .marca p { font-size: 0.85rem; color: #6b7280; margin-top: 4px; }
.acceso-caja .candado { font-size: 2rem; }

.campo { margin-bottom: 16px; }
.campo label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.campo input,
.campo textarea,
.campo select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
    color: #1f2937;
}
.campo input:focus,
.campo textarea:focus,
.campo select:focus { outline: none; border-color: #1d4ed8; }
.campo textarea { resize: vertical; }
.campo .ayuda { font-size: 0.75rem; color: #9ca3af; margin-top: 4px; }

.btn-entrar {
    width: 100%;
    background: #1d4ed8;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.btn-entrar:hover { background: #1e40af; }

.error-acceso {
    display: none;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 0.85rem;
    padding: 11px 13px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.nota-acceso {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}
.nota-acceso a { color: #1d4ed8; text-decoration: none; font-weight: 600; }

/* ================================ PANEL ================================== */
.barra-superior {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.barra-superior .izquierda { display: flex; align-items: center; gap: 12px; }
.barra-superior .punto {
    width: 10px; height: 10px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2);
}
.barra-superior h1 { font-size: 1.05rem; font-weight: 700; }
.barra-superior .derecha { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.enlace-barra {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #334155;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    background: none;
    font-family: inherit;
}
.enlace-barra:hover { background: #1e293b; color: #ffffff; }
.enlace-barra.peligro { border-color: #7f1d1d; color: #fca5a5; }
.enlace-barra.peligro:hover { background: #7f1d1d; color: #ffffff; }

.contenido {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 22px 80px;
}

.aviso-modo {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: 10px;
    padding: 15px 18px;
    font-size: 0.85rem;
    color: #78350f;
    margin-bottom: 26px;
}
.aviso-modo strong { color: #92400e; }

.pestanas {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #dbe2ea;
    flex-wrap: wrap;
}
.pestana {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    padding: 11px 18px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.pestana:hover { color: #1d4ed8; }
.pestana.activa { color: #1d4ed8; border-bottom-color: #1d4ed8; }

.seccion { display: none; }
.seccion.activa { display: block; }

.tarjeta {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
}
.tarjeta > h2 {
    font-size: 1.15rem;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tarjeta > .descripcion { font-size: 0.85rem; color: #6b7280; margin-bottom: 20px; }

.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .fila { grid-template-columns: 1fr; } }

.interruptor {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}
.interruptor input { width: 17px; height: 17px; accent-color: #1d4ed8; }

.vista-previa-cartel {
    background: #1d4ed8;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.88rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.vista-previa-cartel strong { font-weight: 800; }
.vista-previa-cartel a { color: #ffd166; text-decoration: underline; font-weight: 700; }

.imagen-fila { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.imagen-vista {
    width: 160px;
    height: 105px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    flex: 0 0 160px;
}
.imagen-controles { flex: 1 1 240px; }
.imagen-controles .campo { margin-bottom: 12px; }

input[type="file"] { font-size: 0.82rem; }

.acciones-panel {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.96);
    border-top: 1px solid #e2e8f0;
    padding: 16px 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(6px);
    margin: 0 -22px -80px;
}
.btn-guardar {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 9px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.btn-guardar:hover { background: #15803d; }
.btn-guardar:disabled { background: #9ca3af; cursor: not-allowed; }

.estado { font-size: 0.88rem; font-weight: 600; }
.estado.ok { color: #16a34a; }
.estado.malo { color: #dc2626; }
.estado.info { color: #6b7280; }

.lista-incluye { list-style: none; }
.lista-incluye li {
    font-size: 0.88rem;
    padding: 5px 0;
    color: #4b5563;
}
.lista-incluye li::before { content: '✔ '; color: #16a34a; font-weight: 700; }
