

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    --menard-rojo: #C3262F;
    --menard-oscuro: #313234;
    --menard-blanco: #FFFFFF;
    --gris-fondo: #f4f4f2;
}

* { box-sizing: border-box; }
body {
    font-family: 'Poppins', -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--gris-fondo);
    margin: 0;
    color: #2a2a28;
}

.topbar {
    background: var(--menard-oscuro);
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.topbar .marca {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.1em;
}
.topbar .marca .cuadro-rojo {
    background: var(--menard-rojo);
    width: 14px;
    height: 14px;
    display: inline-block;
}
.topbar nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.topbar nav a {
    color: #ddd;
    text-decoration: none;
    padding: 16px 14px;
    font-weight: 600;
    font-size: 0.92em;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
}
.topbar nav a:hover {
    color: white;
    background: rgba(255,255,255,0.06);
}
.topbar nav a.activo {
    color: white;
    border-bottom: 3px solid var(--menard-rojo);
}
.topbar .usuario-info {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9em;
    color: #ccc;
}
.topbar .usuario-info a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
}
.topbar .usuario-info a:hover { color: white; }

.caja {
    max-width: 1000px;
    margin: 24px auto;
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
h1, h2 { font-weight: 700; color: var(--menard-oscuro); }
h1 { margin-top: 0; border-bottom: 3px solid var(--menard-rojo); padding-bottom: 10px; display: inline-block; }
label { display: block; margin-top: 12px; font-size: 0.9em; color: #555; font-weight: 600; }
input, select {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
}
button {
    margin-top: 16px;
    padding: 10px 18px;
    background: var(--menard-rojo);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
}
button:hover { background: #a31f27; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th {
    text-align: left;
    padding: 8px;
    background: var(--menard-oscuro);
    color: white;
    font-weight: 600;
}
td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; font-size: 0.9em; }
.error { color: #b3261e; font-weight: 600; }
.aviso { color: #1b6b1b; font-weight: 600; }
.estado-pendiente { color: #b8860b; font-weight: 700; }
.estado-aprobada { color: #1b6b1b; font-weight: 700; }
.estado-rechazada { color: #b3261e; font-weight: 700; }


.topbar nav { position: relative; align-items: stretch; }
.menu-desplegable { position: relative; }
.menu-titulo {
    cursor: pointer; padding: 16px 14px; display: inline-block; color: #ddd;
    font-weight: 600; font-size: 0.92em; border-bottom: 3px solid transparent;
}
.menu-desplegable:hover .menu-titulo, .menu-titulo.activo { color: white; }
.menu-titulo.activo { border-bottom: 3px solid var(--menard-rojo); }
.menu-opciones {
    display: none; position: absolute; top: 100%; left: 0; background: var(--menard-oscuro);
    min-width: 230px; box-shadow: 0 6px 14px rgba(0,0,0,0.35); z-index: 50; flex-direction: column;
    border-top: 3px solid var(--menard-rojo);
}
.menu-desplegable:hover .menu-opciones { display: flex; }
.menu-opciones a { padding: 11px 16px; color: #ddd; text-decoration: none; font-size: 0.88em; white-space: nowrap; }
.menu-opciones a:hover { background: rgba(255,255,255,0.08); color: white; }
.orden-insumos { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; font-size: 0.9em; }
.orden-insumos a { color: #555; text-decoration: none; padding: 4px 10px; border-radius: 4px; border: 1px solid #ccc; }
.orden-insumos a.activo { background: var(--menard-oscuro); color: white; border-color: var(--menard-oscuro); }


.usuario-info { display: flex; align-items: center; gap: 14px; }
.menu-hamburguesa { position: relative; }
.boton-hamburguesa {
    background: none; border: none; color: white; font-size: 1.5em; cursor: pointer;
    padding: 2px 6px; line-height: 1;
}
.boton-hamburguesa:hover { color: var(--menard-rojo); }
.panel-menu {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 10px;
    background: var(--menard-oscuro); min-width: 240px; box-shadow: 0 6px 14px rgba(0,0,0,0.35);
    z-index: 100; flex-direction: column; border-top: 3px solid var(--menard-rojo);
}
.panel-menu.abierto { display: flex; }
.panel-menu a { padding: 12px 18px; color: #ddd; text-decoration: none; font-size: 0.9em; }
.panel-menu a:hover { background: rgba(255,255,255,0.08); color: white; }
.panel-menu .separador-menu { border-top: 1px solid rgba(255,255,255,0.15); margin: 4px 0; }


.usuario-info { display: flex; align-items: center; gap: 14px; }
.menu-hamburguesa { position: relative; }
.boton-hamburguesa {
    background: none; border: none; color: white; font-size: 1.5em; cursor: pointer;
    padding: 2px 6px; line-height: 1;
}
.boton-hamburguesa:hover { color: var(--menard-rojo); }
.panel-menu {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 10px;
    background: var(--menard-oscuro); min-width: 240px; box-shadow: 0 6px 14px rgba(0,0,0,0.35);
    z-index: 100; flex-direction: column; border-top: 3px solid var(--menard-rojo);
}
.panel-menu.abierto { display: flex; }
.panel-menu a { padding: 12px 18px; color: #ddd; text-decoration: none; font-size: 0.9em; }
.panel-menu a:hover { background: rgba(255,255,255,0.08); color: white; }
.panel-menu .separador-menu { border-top: 1px solid rgba(255,255,255,0.15); margin: 4px 0; }


.btn-eliminar {
    display: inline-block; background: #8a1c22; color: #fff; text-decoration: none;
    padding: 6px 12px; border-radius: 4px; font-size: 0.85em; font-weight: 600;
}
.btn-eliminar:hover { background: #6e161b; }


.btn-eliminar {
    display: inline-block; background: var(--menard-rojo); color: #fff; text-decoration: none;
    padding: 10px 18px; border-radius: 4px; font-weight: 700; font-size: 1em;
}
.btn-eliminar:hover { background: #a31f27; }

.btn-imprimir {
    display: inline-block; background: var(--menard-rojo); color: #fff; text-decoration: none;
    padding: 10px 18px; border-radius: 4px; font-weight: 700; font-size: 1em; margin-right: 6px;
}
.btn-imprimir:hover { background: #a31f27; }



.topbar { position: relative; min-height: 60px; }
.marca { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.logo-menard { height: 34px; width: auto; display: block; }


.usuario-info { margin-left: auto; }

.barra-volver { padding: 14px 24px 0; }
.link-volver {
    display: inline-flex; align-items: center; gap: 6px;
    color: #333; background: #e9e9e9; text-decoration: none;
    font-size: 0.85em; font-weight: 600; padding: 7px 14px; border-radius: 6px;
}
.link-volver:hover { background: #dcdcdc; color: #111; }
.link-volver:visited { color: #333; }
