/*
 * Estilos globales del dashboard de Martinsa. Bootstrap 5 se carga desde
 * CDN (ver resources/views/layouts/app.blade.php y layouts/guest.blade.php);
 * este fichero solo contiene las personalizaciones propias del proyecto.
 * Nada de Tailwind/Vite aquí: el proyecto usa exclusivamente Bootstrap.
 */

:root {
    --mt-lime: #BAE233;
    --mt-olive: #70881F;
    --mt-gold: #EABD34;
    --mt-dark: #191919;
    --mt-sidebar: #16181a;
    --mt-sidebar-hover: #23262a;
}

body {
    font-family: "PT Sans", system-ui, -apple-system, sans-serif;
    background: #f5f6f4;
}

/* Botones primarios con los colores de marca en vez del azul de Bootstrap */
.btn-primary {
    background-color: var(--mt-olive);
    border-color: var(--mt-olive);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #5c7018;
    border-color: #5c7018;
}

/* --- Sidebar --- */
.mt-sidebar {
    width: 264px;
    background-color: var(--mt-sidebar) !important;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}
/* Bootstrap's responsive offcanvas fuerza background-color: transparent
   !important a partir del breakpoint "up" (está pensado para convertirse
   en contenido de flujo normal en desktop) — la regla anterior lo
   sobrescribe para que el sidebar sea siempre oscuro, a cualquier ancho. */

/* En desktop el sidebar se queda fijo en pantalla aunque el contenido
   central (p.ej. el dashboard con muchas gráficas) sea más alto que la
   ventana y haya que hacer scroll — así el bloque de usuario/perfil de
   abajo siempre está visible sin necesidad de bajar. En móvil no aplica:
   ahí el sidebar es el offcanvas de Bootstrap, que ya gestiona su propio
   scroll interno. */
@media (min-width: 992px) {
    .mt-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
}
.mt-sidebar .brand { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mt-sidebar .brand img { max-width: 170px; height: auto; display: block; }
.mt-sidebar .brand .fallback-logo { font-weight: 700; font-size: 20px; color: var(--mt-lime); letter-spacing: .5px; }
.mt-sidebar .brand .tagline { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 4px; }
.mt-sidebar .nav-section-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: rgba(255,255,255,.45); padding: 18px 20px 6px;
}
.mt-sidebar .nav-link {
    color: #ffffff; padding: 9px 20px; font-size: 14.5px; border-radius: 0;
    display: flex; align-items: center; gap: 12px;
    border-left: 3px solid transparent;
}
.mt-sidebar .nav-link i { width: 18px; text-align: center; opacity: .85; }
.mt-sidebar .nav-link:hover { background: var(--mt-sidebar-hover); color: #fff; }
.mt-sidebar .nav-link.active {
    background: var(--mt-sidebar-hover); color: #fff;
    border-left-color: var(--mt-lime);
    font-weight: 600;
}
.mt-sidebar .nav-link.active i { opacity: 1; color: var(--mt-lime); }
.mt-sidebar-user {
    border-top: 1px solid rgba(255,255,255,.08); padding: 14px 20px;
    display: flex; align-items: center; gap: 10px; margin-top: auto;
}
.mt-sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--mt-olive);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.mt-sidebar-user .name { font-size: 13.5px; color: #ffffff; font-weight: 600; line-height: 1.2; }
.mt-sidebar-user .role { font-size: 11.5px; color: rgba(255,255,255,.55); text-transform: capitalize; }
.mt-sidebar-user form button {
    background: none; border: none; color: rgba(255,255,255,.6); padding: 0;
    font-size: 12.5px; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.mt-sidebar-user form button:hover { color: var(--mt-lime); }

/* --- Mobile top bar --- */
.mt-topbar {
    display: none;
    background: var(--mt-sidebar); color: #fff;
    padding: 10px 14px; align-items: center; gap: 12px;
}
.mt-topbar img { max-width: 130px; }
.mt-topbar .btn-toggle {
    background: none; border: none; color: #fff; font-size: 20px; line-height: 1; padding: 2px 6px;
}
@media (max-width: 991.98px) {
    .mt-topbar { display: flex; }
}

.mt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-page-header {
    background: #fff; border-bottom: 1px solid #e6e6e2; padding: 18px 28px;
}
.mt-page-header h2 { font-size: 19px; margin: 0; color: var(--mt-dark); }

/* --- Pantallas de login / auth (layouts/guest.blade.php) --- */
.mt-guest-page {
    background: var(--mt-sidebar);
    min-height: 100vh;
}
.mt-guest-page .mt-guest-logo img { max-width: 190px; }
