/* =========================================================
   FUELMATIC — Identidad global de modales
   Se carga en TODAS las páginas (via head.blade.php), afecta
   a cualquier modal que use Frontend.Layouts.modal: Setup,
   agregar dispositivo, geocercas, choferes, etc.
   Solo colores/tipografía/radios — cero cambios estructurales.
   ========================================================= */

:root {
    --fm-blue: #2f7de1;
    --fm-blue-dark: #1c5fc0;
    --fm-blue-soft: rgba(47, 125, 225, .10);
    --fm-text: #1b2436;
    --fm-text-muted: #6b7686;
    --fm-bg-soft: #f5f6f8;
    --fm-border: #e5e8ee;
}

/* ---------- Header del modal ---------- */

.modal-content {
    border-radius: 12px;
    border: 0;
    overflow: hidden;
}

.modal-header {
    background: #fff;
    border-bottom: 1px solid var(--fm-border);
    padding: 18px 24px;
}

.modal-title {
    color: var(--fm-text);
    font-weight: 700;
    font-size: 17px;
}

.modal-title .icon {
    color: var(--fm-blue);
    margin-right: 6px;
}

.modal-header .close {
    color: var(--fm-text-muted);
    opacity: 1;
    text-shadow: none;
}

.modal-header .close:hover {
    color: var(--fm-blue);
}

/* ---------- Tabs dentro del modal ---------- */

.modal-content .nav-tabs {
    background: #fff;
    border-bottom: 1px solid var(--fm-border);
    padding: 0 24px;
}

.modal-content .nav-tabs > li > a {
    color: var(--fm-text-muted);
    font-weight: 600;
    font-size: 13px;
    border: 0;
    background: transparent;
}

.modal-content .nav-tabs > li > a:hover,
.modal-content .nav-tabs > li > a:focus {
    color: var(--fm-blue);
    background: var(--fm-bg-soft);
}

.modal-content .nav-tabs > li.active > a,
.modal-content .nav-tabs > li.active > a:hover,
.modal-content .nav-tabs > li.active > a:focus {
    color: var(--fm-blue);
    background: transparent;
    border: 0;
    box-shadow: inset 0 -2px 0 var(--fm-blue);
}

/* ---------- Body: labels, inputs, selects ---------- */

.modal-body {
    background: #fff;
    padding: 22px 24px;
}

.modal-body label {
    color: var(--fm-text);
    font-weight: 600;
    font-size: 13px;
}

.modal-body .form-control {
    background: var(--fm-bg-soft);
    border: 1px solid var(--fm-border);
    color: var(--fm-text);
    border-radius: 8px;
    box-shadow: none;
    height: 40px;
}

.modal-body textarea.form-control {
    height: auto;
}

.modal-body .form-control:focus {
    border-color: var(--fm-blue);
    background: #fff;
    box-shadow: 0 0 0 3px var(--fm-blue-soft);
}

.modal-body .bootstrap-select > .dropdown-toggle {
    background: var(--fm-bg-soft) !important;
    border: 1px solid var(--fm-border) !important;
    color: var(--fm-text) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    height: 40px;
    display: flex;
    align-items: center;
}

.modal-body .bootstrap-select.open > .dropdown-toggle,
.modal-body .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--fm-blue) !important;
}

.modal-body hr {
    border-color: var(--fm-border);
}

/* Checkboxes dentro de modales — mismo check moderno del sidebar */

.modal-body .checkbox input[type=checkbox] + label::before,
.modal-body .checkbox input[type=checkbox] + span::before {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 5px;
    border: 1.6px solid #c9cfd9 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.modal-body .checkbox input[type=checkbox] + label::after,
.modal-body .checkbox input[type=checkbox] + span::after {
    display: none !important;
}

.modal-body .checkbox input[type=checkbox]:checked + label::before,
.modal-body .checkbox input[type=checkbox]:checked + span::before {
    font-family: 'FontAwesome';
    content: "\f00c";
    color: #fff;
    font-size: 11px;
    background: var(--fm-blue) !important;
    border-color: var(--fm-blue) !important;
}

/* ---------- Footer: botones Save / Cancel ---------- */

.modal-footer {
    background: #fff;
    border-top: 1px solid var(--fm-border);
    padding: 16px 24px;
}

.modal-footer .btn-action {
    background: var(--fm-blue);
    border-color: var(--fm-blue);
    border-radius: 8px;
    font-weight: 600;
    padding: 9px 22px;
}

.modal-footer .btn-action:hover,
.modal-footer .btn-action:focus {
    background: var(--fm-blue-dark);
    border-color: var(--fm-blue-dark);
}

.modal-footer .btn-default {
    background: #fff;
    border: 1px solid var(--fm-border);
    color: var(--fm-text-muted);
    border-radius: 8px;
    font-weight: 600;
    padding: 9px 22px;
}

.modal-footer .btn-default:hover {
    border-color: var(--fm-blue);
    color: var(--fm-blue);
}
