/* ==========================================================================
   AGRO-TALLER PRO — Tema Visual para Mantenimiento y Maquinaria Agrícola
   ========================================================================== */
:root {
    --agro-forest:      #1b3b2b;
    --agro-forest-dark: #11261c;
    --agro-leaf:        #2d6a4f;
    --agro-amber:       #eab308;
    --agro-amber-dark:  #ca8a04;
    --agro-iron:        #1f2933;
    --agro-canvas:      #f2f4f0;
    --agro-surface:     #ffffff;
    --agro-border:      #d5ddd2;
}

body.agro-body {
    background-color: var(--agro-canvas);
    color: var(--agro-iron);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-bottom: 68px; /* espacio para barra inferior móvil */
}

@media (min-width: 992px) {
    body.agro-body {
        padding-bottom: 18px;
    }
}

/* Barra superior estilo consola de taller agrícola */
.navbar-agro {
    background: linear-gradient(180deg, var(--agro-forest) 0%, var(--agro-forest-dark) 100%);
    border-bottom: 4px solid var(--agro-amber);
}

.navbar-agro .navbar-brand {
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--agro-amber);
    color: var(--agro-forest-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
}

.navbar-agro .nav-link {
    color: rgba(255,255,255,.88);
    border-radius: 6px;
    padding: .45rem .7rem;
    transition: background-color .15s ease, color .15s ease;
}

.navbar-agro .nav-link:hover,
.navbar-agro .nav-link.active {
    background-color: rgba(255,255,255,.12);
    color: #fff;
}

.navbar-agro .nav-link.nav-cta-report {
    background-color: var(--agro-amber);
    color: #111827 !important;
    font-weight: 700;
    border-radius: 7px;
    padding: .42rem .8rem;
}

.navbar-agro .nav-link.nav-cta-report:hover {
    background-color: #facc15;
}

/* Encabezado de módulo / barra de estado */
.agro-page-banner {
    background: var(--agro-surface);
    border: 1px solid var(--agro-border);
    border-left: 5px solid var(--agro-leaf);
    border-radius: 10px;
    padding: .85rem 1.1rem;
    box-shadow: 0 2px 6px rgba(17, 38, 28, 0.05);
}

/* Tarjetas tipo orden de trabajo (OT) */
.card {
    border-color: var(--agro-border);
    border-radius: 10px;
}

.card-header.bg-dark {
    background: linear-gradient(90deg, var(--agro-forest) 0%, #244836 100%) !important;
    border-bottom: 2px solid var(--agro-amber);
}

.ot-card {
    border: 1px solid var(--agro-border);
    border-top: 4px solid var(--agro-leaf);
    border-radius: 10px;
    transition: transform .12s ease, box-shadow .12s ease;
}

.ot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(17, 38, 28, 0.1) !important;
}

.ot-card.ot-urgente { border-top-color: #dc2626; }
.ot-card.ot-alta    { border-top-color: #ea580c; }
.ot-card.ot-media   { border-top-color: #0284c7; }
.ot-card.ot-baja    { border-top-color: #64748b; }

.ot-ticket-pill {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #eef3ee;
    color: var(--agro-forest-dark);
    border: 1px solid #cbd7cb;
    padding: .2rem .55rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .86rem;
}

.machine-plate-tag {
    display: inline-block;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .76rem;
    font-weight: 700;
    padding: .08rem .42rem;
    border-radius: 4px;
}

/* KPI Strip de Taller */
.agro-kpi {
    background: var(--agro-surface);
    border: 1px solid var(--agro-border);
    border-radius: 10px;
    padding: .65rem .85rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.agro-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Botones táctiles para uso en campo/taller */
.btn-touch {
    min-height: 46px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: 8px;
}

.btn-agro {
    background-color: var(--agro-leaf);
    border-color: var(--agro-leaf);
    color: #fff;
}
.btn-agro:hover {
    background-color: var(--agro-forest);
    border-color: var(--agro-forest);
    color: #fff;
}

.btn-amber {
    background-color: var(--agro-amber);
    border-color: var(--agro-amber-dark);
    color: #111827;
    font-weight: 700;
}
.btn-amber:hover {
    background-color: #facc15;
    border-color: var(--agro-amber-dark);
    color: #111827;
}

.card-averia {
    border-left: 5px solid var(--agro-amber);
}

.badge-prioridad-URGENTE { background-color: #dc2626; color: #fff; }
.badge-prioridad-ALTA    { background-color: #ea580c; color: #fff; }
.badge-prioridad-MEDIA   { background-color: #0284c7; color: #fff; }
.badge-prioridad-BAJA    { background-color: #64748b; color: #fff; }

/* Barra de navegación rápida inferior para tablets/celulares en finca y taller */
.agro-mobile-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--agro-forest-dark);
    border-top: 2px solid var(--agro-amber);
    display: flex;
    justify-content: space-around;
    padding: .35rem .25rem;
    box-shadow: 0 -3px 10px rgba(0,0,0,.22);
}

.agro-mobile-dock a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: .72rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: .2rem .5rem;
    border-radius: 6px;
}

.agro-mobile-dock a i {
    font-size: 1.15rem;
}

.agro-mobile-dock a.dock-highlight {
    color: var(--agro-amber);
    font-weight: 700;
}

/* Pantalla de acceso agro-industrial */
body.agro-login-bg {
    background:
        radial-gradient(circle at top right, rgba(234, 179, 8, 0.16), transparent 42%),
        linear-gradient(135deg, #11261c 0%, #1b3b2b 55%, #0f1f17 100%);
}

.agro-login-card {
    border: 1px solid rgba(255,255,255,.12);
    border-top: 5px solid var(--agro-amber);
    border-radius: 14px;
    overflow: hidden;
}

.agro-hazard-stripe {
    height: 6px;
    background: repeating-linear-gradient(
        -45deg,
        #eab308,
        #eab308 10px,
        #1f2933 10px,
        #1f2933 20px
    );
}


/* Fondo panorámico agrícola sutil en las pantallas internas */
body.agro-body {
    background-image:
        linear-gradient(180deg, rgba(242, 245, 240, 0.84) 0%, rgba(242, 245, 240, 0.90) 55%, rgba(235, 240, 232, 0.93) 100%),
        url('../img/fondo-agricola.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Contenedor blanco limpio para el logo Keeling's en la barra superior */
.navbar-logo-pill {
    background: #ffffff;
    padding: 4px 11px;
    border-radius: 8px;
    border-bottom: 3px solid var(--agro-amber);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.navbar-logo-pill img {
    height: 30px;
    width: auto;
    display: block;
}

/* Fondo agrícola con contraste para pantalla de Login */
body.agro-login-bg {
    background-image:
        linear-gradient(135deg, rgba(17, 38, 28, 0.72) 0%, rgba(27, 59, 43, 0.62) 55%, rgba(15, 31, 23, 0.80) 100%),
        url('../img/fondo-agricola.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.login-logo-box img {
    max-height: 76px;
    width: auto;
    display: inline-block;
}

/* ==========================================================================
   CONVERSIÓN VISUAL A MAYÚSCULAS (100% UPPERCASE EN CAMPOS EDITABLES)
   ========================================================================== */
input[type="text"],
input[type="search"],
input[type="tel"],
input:not([type]),
textarea {
    text-transform: uppercase !important;
}

input::placeholder,
textarea::placeholder {
    text-transform: uppercase !important;
}
