/* @import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&display=swap'); */

:root {
  --cafe:        #8B6343;
  --cafe-dark:   #6d4c32;
  --cafe-pale:   #f5ede3;
  --cafe-border: #e2cdb8;
  --cafe-muted:  #b8956e;
  --texto:       #3d2b1a;
}

body { font-family: 'Jost', sans-serif; background: #f7f0e8; }


.app {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--cafe-dark);
    color: var(--cafe-pale);
    display: flex;
    flex-direction: column;
    transition: margin-left .25s;
}

.app.sidebar-colapsado .app-sidebar {
    margin-left: -230px;
}

.sidebar-marca {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid rgba(245, 237, 227, .14);
    background: #fffdf9;
}
.sidebar-marca i { font-size: 19px; }

.marca-tit{
    font-family: "Bodoni Moda", serif;
    text-transform: uppercase;
}

.sidebar-marca a {
    text-decoration: none;
    display: block;
}

.logo-sidebar {
    max-width: 180px;
    height: auto;
    display: block;
    cursor: pointer;
    
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
}

.topbar-salir {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--cafe);
    text-decoration: none;
    font-size: .95rem;
    transition: background .15s ease;
}
.topbar-salir:hover {
    background: var(--cafe-pale); 
}


.menu-cab {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: var(--cafe-pale);
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    text-align: left;
}
.menu-cab span { flex: 1; }
.menu-cab:hover { background: rgba(245, 237, 227, .08); }
.menu-cab i:first-child { font-size: 17px; }

.menu-flecha { font-size: 12px; transition: transform .2s; }
.menu-item.abierto > .menu-cab { background: rgba(245, 237, 227, .10); }
.menu-item.abierto .menu-flecha { transform: rotate(180deg); }

.menu-cuerpo { display: none; padding: 4px 4px 6px 8px; }
.menu-item.abierto .menu-cuerpo { display: block; }

.menu-grupo {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cafe-muted);
    margin: 8px 8px 4px;
    font-weight: 500;
}

.menu-opcion {
    display: block;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--cafe-border);
    text-decoration: none;
    font-size: 12.5px;
}
.menu-opcion:hover { background: rgba(245, 237, 227, .10); color: #fff; }
.menu-opcion.activa { background: var(--cafe); color: #fff; }

.sidebar-pie {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(245, 237, 227, .14);
}
.sidebar-pie .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--cafe);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 500; color: #fff;
}
.sidebar-pie .datos { flex: 1; line-height: 1.2; }
.sidebar-pie .nombre { display: block; font-size: 11.5px; }
.sidebar-pie .correo { display: block; font-size: 8px; color: var(--cafe-muted); }
.sidebar-pie .salir { color: var(--cafe-muted); font-size: 17px; }
.sidebar-pie .salir:hover { color: #fff; }


.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    flex-shrink: 0;
    background: #fffdf9;
    border-bottom: .5px solid var(--cafe-border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
}
.topbar-toggle {
    display: block;
    background: transparent; border: none;
    font-size: 22px; color: var(--cafe); cursor: pointer;
}
.topbar-titulo { flex: 1; }
.topbar-titulo .ruta { font-size: 11px; color: var(--cafe-muted); }
.topbar-titulo h1 {
    font-size: 17px; font-weight: 500; color: var(--texto); margin: 0;
}
.topbar-buscar {
    display: flex; align-items: center; gap: 8px;
    background: #f7f0e8; border: .5px solid var(--cafe-border);
    border-radius: 8px; padding: 6px 10px;
}
.topbar-buscar i { color: var(--cafe-muted); font-size: 15px; }
.topbar-buscar input {
    border: none; background: transparent; outline: none;
    font-family: inherit; font-size: 13px; color: var(--texto); width: 150px;
}

.contenido {
    flex: 1;
    padding: 22px 24px;
    background: #f7f0e8;
    overflow-y: auto;
}


@media (max-width: 992px) {
    .app-sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 1040;
        transform: translateX(-100%); transition: transform .25s;
    }
    .app-sidebar.abierto { transform: translateX(0); }
    .topbar-toggle { display: block; }
}


.switch-estatus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    user-select: none;
}
/* Ocultamos el checkbox real, pero sigue funcionando */
.switch-estatus input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* La pista (el riel del switch) */
.switch-pista {
    position: relative;
    width: 40px;
    height: 22px;
    background: #c9bdae;          /* gris-café apagado = apagado */
    border-radius: 999px;
    transition: background .2s ease;
    flex-shrink: 0;
}
/* El círculo que se desliza */
.switch-pista::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
/* Encendido: pista verde + círculo a la derecha */
.switch-estatus input:checked + .switch-pista {
    background: #2e9e5b;
}
.switch-estatus input:checked + .switch-pista::before {
    transform: translateX(18px);
}
/* El texto al lado */
.switch-texto {
    font-size: 12px;
    font-weight: 600;
    color: var(--cafe-muted);
    min-width: 64px;             /* evita que la celda "salte" al cambiar texto */
    text-align: left;
}
.switch-estatus input:checked ~ .switch-texto {
    color: #2e9e5b;
}
/* Deshabilitado mientras va el AJAX */
.switch-estatus input:disabled ~ .switch-pista {
    opacity: .5;
}