/* ===============================
   Variables
================================= */
:root {
    /* Colores por fletero (fallback si no viene de Firestore) */
    --color-matias: #db3545;
    --color-cristian: #FFC006;
    --color-juan: #80BCFF;
    --color-alejandro: #135322;
    --color-ricardo: #fd7e14;

    /* UI */
    --card-radius: 14px;
    --icon-btn: 34px;
    /* tamaño botón-ícono en cards */
    --icon-size: 18px;
    /* tamaño del ícono en cards  */
}

/* ===============================
   Utilidades de color por fletero
================================= */
.matias {
    color: var(--color-matias) !important;
}

.cristian {
    color: var(--color-cristian) !important;
}

.juan {
    color: var(--color-juan) !important;
}

.alejandro {
    color: var(--color-alejandro) !important;
}

.ricardo {
    color: var(--color-ricardo) !important;
}

.bkg-matias {
    background: var(--color-matias) !important;
}

.bkg-cristian {
    background: var(--color-cristian) !important;
}

.bkg-juan {
    background: var(--color-juan) !important;
}

.bkg-alejandro {
    background: var(--color-alejandro) !important;
}

.bkg-ricardo {
    background: var(--color-ricardo) !important;
}

/* ===============================
   Global
================================= */
body {
    background: #f8f9fa;
    font-family: 'Archivo', sans-serif;
}

.container-tiny {
    max-width: 768px;
}

.texto-blanco {
    color: #fff !important;
}

/* ===============================
   Navbar
================================= */
.navbar {
    background: #000;
}

.navbar-brand,
.navbar-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.navbar .btn-icon-nav {
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: none;
    color: rgba(255, 255, 255, .65);
    transition: transform .12s, background-color .12s, color .12s;
}

.navbar .btn-icon-nav:hover,
.navbar .btn-icon-nav:focus-visible {
    color: #fff;
    background: transparent;
    transform: translateY(-1px);
}

/* ===============================
   Login
================================= */
.login-card {
    margin: 3rem;
}

.btn-success {
    width: 100%;
}

#login-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-control,
.form-label {
    font-size: 1rem;
}

#login-error {
    color: #dc3545;
    font-size: .9rem;
    text-align: center;
}

.support {
    font-size: .9rem;
    color: #333;
    margin-top: 18px;
}

.support a {
    color: #1b71d7;
    text-decoration: underline;
}

.logo-enki {
    margin: 0 auto 16px;
    display: block;
}

/* ===============================
   Offcanvas / lista de agendas
================================= */
.agendas-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.agendas-list {
    overflow: auto;
}

.agendas-list .list-group-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .75rem;
    margin: .15rem 0;
    border: 0;
    border-radius: .75rem;
    background: #fff;
    cursor: pointer;
}

.agendas-list .list-group-item:hover {
    background: #f6f7f9;
}

.agendas-list .list-group-item.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.agendas-list .list-group-item.disabled {
    pointer-events: none;
    opacity: .7;
    cursor: default;
}

.ag-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .75rem;
    background: #e9ecef;
    color: #495057;
    flex: 0 0 28px;
}

.ag-name {
    font-weight: 600;
}

.ag-sub {
    font-size: .8rem;
    color: #6c757d;
}

#offcanvasMenu .btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

/* ===============================
   Navegación por días (schedule)
================================= */
.day-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.day-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    line-height: 1.1;
    border-radius: .75rem;
    background: #fff;
    border: 1px solid #dee2e6;
}

.day-chip.btn {
    flex-direction: column;
    padding: .45rem .6rem;
    transition: background-color .15s, border-color .15s, transform .15s;
}

.day-chip .dow {
    font-weight: 600;
}

.day-chip .dom {
    font-size: .82rem;
}

.day-chip.btn-outline-secondary {
    color: #6c757d;
    border-color: #dee2e6;
}

.day-chip.btn-outline-secondary:hover,
.day-chip.btn-outline-secondary:focus-visible {
    color: #fff;
    background: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .25);
    transform: translateY(-1px);
}

.day-current {
    flex: 1 1 auto;
    text-align: center;
    padding: .6rem 1rem;
    border-radius: .75rem;
    background: var(--color-primario, #198754);
    color: #fff;
    font-weight: 600;
    user-select: none;
    pointer-events: none;
}

/* ===============================
   Card de viaje (schedule)
================================= */
.viaje {
    border: 1px solid var(--color-primario, #135322);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px #0001;
}

.viaje .barra-lateral {
    flex: 0 0 92px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-right: 1px solid rgba(0, 0, 0, .06);
}

.hora-badge {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.15rem;
    padding: .45em .9em;
    min-width: 64px;
    text-align: center;
}

.precio-badge {
    background: #1f1f1f;
    color: #fff;
    padding: .6rem .9rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    align-items: flex-end;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: var(--card-radius);
}

.precio-badge small {
    opacity: .9;
}

.precio-badge h3 {
    margin: 0;
    line-height: 1;
}

.link-whats {
    text-decoration: none;
}

.link-whats:hover {
    text-decoration: underline;
}

/* ===============================
   Botones de icono en cards
================================= */
.btn-icon {
    width: var(--icon-btn);
    height: var(--icon-btn);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: transparent;
    color: var(--bs-body-color);
    transition: transform .16s, background-color .16s, border-color .16s, color .16s;
}

.btn-icon .bi {
    font-size: var(--icon-size);
}

.btn-icon:hover {
    background: rgba(13, 110, 253, .10);
    border-color: rgba(13, 110, 253, .35);
    color: #0d6efd;
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0);
}

.copy-btn {
    border: 1px solid rgba(13, 110, 253, .35);
    background: rgba(13, 110, 253, .06);
    color: #0d6efd;
}

.copy-btn:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, .12);
}

.copy-btn.copied {
    border-color: #198754;
    background: rgba(25, 135, 84, .1);
    color: #198754;
}

.btn-trash {
    color: #dc3545;
    border-color: rgba(220, 53, 69, .25);
}

.btn-trash:hover {
    background: rgba(220, 53, 69, .10);
    border-color: rgba(220, 53, 69, .45);
    color: #dc3545;
}

.btn-trash:focus-visible {
    outline: 3px solid rgba(220, 53, 69, .35);
    outline-offset: 2px;
    border-radius: 10px;
}

/* ===============================
   Chips por tipo de servicio
================================= */
.badge-chip {
    padding: .35rem .6rem;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
}

.badge-carga {
    background: #0d6efd;
}

.badge-mudanza {
    background: #fd7e14;
}

.badge-traslado {
    background: #20c997;
}

/* ===============================
   SUMMARY – Tabs de fleteros (estilo “píldora”)
================================= */
#fleterosTabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: .25rem .5rem;
    scrollbar-width: thin;
}

#fleterosTabs .pill-btn {
    border: 1px solid #e7eaf0;
    background: #fff;
    color: var(--tab-color, var(--bs-primary));
    border-radius: .9rem;
    padding: .5rem 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    box-shadow: 0 2px 10px #0000;
    transition: transform .15s, box-shadow .15s, background-color .15s, color .15s, border-color .15s;
}

#fleterosTabs .pill-btn::before {
    content: "";
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--tab-color, var(--bs-primary));
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06);
}

#fleterosTabs .pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

#fleterosTabs .pill-btn.active {
    background: var(--tab-color, var(--bs-primary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

#fleterosTabs .pill-btn.active::before {
    background: #fff;
    opacity: .9;
}

/* “General” gris */
#fleterosTabs .pill-btn[data-dni="__general"] {
    --tab-color: #6c757d;
    background: #f1f3f5;
    color: #495057;
    border-color: #e9ecef;
}

#fleterosTabs .pill-btn[data-dni="__general"].active {
    background: #343a40;
    color: #fff;
    border-color: #343a40;
}

/* ===============================
   SUMMARY – Cards y encabezados
================================= */
.summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px #0001;
    border: 1px solid #eef0f2;
}

.card-subtitle {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #f3f4f6;
    border-radius: .75rem;
    padding: .6rem .8rem;
}

.card-subtitle .bar {
    width: 8px;
    height: 20px;
    border-radius: 8px;
    background: var(--card-accent, var(--bs-primary));
}

.card-subtitle .text {
    font-weight: 700;
    color: #222;
}

/* ===============================
   SUMMARY – Estados de montos y conceptos
================================= */
.sd-amount {
    font-size: clamp(1.35rem, 2.2vw + 1rem, 2rem);
    font-weight: 800;
}

.sd-amount.pos {
    color: #198754;
}

.sd-amount.neg {
    color: #dc3545;
}

.sd-amount.zero {
    color: #111;
}

.concept-list {
    display: grid;
    gap: .35rem;
}

.concept-item {
    display: flex;
    gap: .5rem;
    align-items: baseline;
}

.concept-item .amt {
    font-weight: 700;
}

.concept-item.neg .amt {
    color: #dc3545;
}

/* Acciones iguales */
.sd-actions {
    display: flex;
    gap: .75rem;
}

.sd-actions .btn {
    flex: 1 1 0;
}

/* ===============================
   Loading
================================= */
.loading-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    gap: .6rem;
}

.sd-loading {
    position: fixed;
    inset: 56px 0 0 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .55);
    z-index: 1050;
}

/* ===== HOTFIX: Tabs de fleteros (colores + una sola línea) ===== */
#fleterosTabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: .25rem .5rem;
}

/* usamos .pill-btn (lo que genera tu JS) */
#fleterosTabs .pill-btn {
    appearance: none;
    -webkit-appearance: none;
    /* quita estilos nativos */
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .9rem;
    line-height: 1;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid #e9ecef;
    background: #fff;
    color: var(--tab-color, #0d6efd);
    box-shadow: none;
    outline: 0;
    transition: .15s;
}

#fleterosTabs .pill-btn::before {
    content: "";
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: currentColor;
    opacity: .95;
}

/* estado activo: chip lleno con el color del fletero */
#fleterosTabs .pill-btn.active {
    background: var(--tab-color, #0d6efd);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

#fleterosTabs .pill-btn.active::before {
    background: #fff;
    opacity: .85;
}

/* “General” en gris */
#fleterosTabs .pill-btn[data-dni="__general"] {
    color: #495057;
    background: #f1f3f5;
    border-color: #e9ecef;
}

#fleterosTabs .pill-btn[data-dni="__general"].active {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

/* opcional: pequeño “lift” al hover */
#fleterosTabs .pill-btn:hover {
    transform: translateY(-1px);
}

/* ===== FIX PASTILLAS (summary tabs) ===== */
#fleterosTabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: .25rem .5rem;
}

#fleterosTabs::-webkit-scrollbar {
    display: none;
}

#fleterosTabs .nav-item {
    flex: 0 0 auto;
}

/* reseteo fuerte de botones dentro de nav */
#fleterosTabs .nav-link {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 999px !important;
    padding: .45rem .9rem !important;
    font-weight: 600;
    line-height: 1;
    background: #fff !important;
    border: 1px solid var(--bs-border-color) !important;
    color: var(--tab-color, #0d6efd) !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* puntito de color antes del texto */
#fleterosTabs .nav-link::before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    width: .6rem;
    height: .6rem;
    margin-right: .45rem;
    border-radius: 50%;
    background: var(--tab-color, #0d6efd);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06);
}

/* activo */
#fleterosTabs .nav-link.active {
    background: var(--tab-color, #0d6efd) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

#fleterosTabs .nav-link.active::before {
    background: #fff;
    opacity: .9;
}

/* estados */
#fleterosTabs .nav-link:hover {
    transform: translateY(-1px);
    transition: .15s;
}

#fleterosTabs .nav-link:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15) !important;
}

/* Pastillas (personas) */
.pill-nav {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: .25rem .5rem;
    scrollbar-width: none;
}

.pill-nav::-webkit-scrollbar {
    display: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid #e7eaf0;
    background: #fff;
    color: #0d6efd;
    font-weight: 600;
    line-height: 1;
    transition: .15s;
}

.pill .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06);
}

.pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px #0001;
}

.pill.active {
    background: #0d6efd;
    color: #fff;
    border-color: transparent;
}

.pill--general {
    color: #495057;
    background: #f1f3f5;
    border-color: #e9ecef;
}

.pill--general.active {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

/* Barra superior de fecha */
.date-toolbar {
    row-gap: .5rem;
}

/* Igual altura y padding que los day-chip */
.date-chip {
    padding: .45rem .9rem;
    /* coherente con chips */
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

/* Iconito más prolijo */
.date-chip .bi {
    opacity: .8;
}

/* Oculta visualmente pero accesible (si ya tenés .visually-hidden de BS, sirve igual) */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Barra superior de rango */
.range-toolbar {
    row-gap: .5rem;
}

.date-chip {
    border-radius: 999px;
    padding: .45rem .9rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.range-sep {
    opacity: .6;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— chip de fecha como los day-chip de schedule ——— */
.date-chip {
    border-radius: 999px;
    padding: .45rem .9rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

.date-chip .bi {
    opacity: .85;
}

/* input nativo oculto pero accesible */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— chip de fecha como los day-chip de schedule ——— */
.date-chip {
    border-radius: 999px;
    padding: .45rem .9rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

.date-chip .bi {
    opacity: .85;
}

/* input nativo oculto pero accesible */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Asegura que el chip y su área acepten taps */
#rangeBar,
#rangeBar * {
    pointer-events: auto;
}


#dateModal .flatpickr-calendar {
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

#dateModal .flatpickr-calendar svg {
    width: 18px;
    height: 18px;
}

/* por si hay reglas globales que agrandan svg dentro de modales */
#dateModal svg {
    width: auto;
    height: auto;
}

.range-wrap {
    position: relative;
    display: inline-block;
}

.range-wrap #rangeChip {
    position: relative;
    z-index: 1;
}

#rangeBar,
#rangeBar * {
    pointer-events: auto;
}

/* Si tenías .day-current con pointer-events:none, anulalo acá para la barra */
#rangeBar .day-current {
    pointer-events: auto !important;
}

.range-wrap {
    position: relative;
    display: inline-block;
}

.range-wrap #rangeChip {
    position: relative;
    z-index: 1;
}

/* Forzar eventos habilitados en la barra */
#rangeBar,
#rangeBar * {
    pointer-events: auto;
}

/* Si existía .day-current con pointer-events:none, no afecte acá */
#rangeBar .day-current {
    pointer-events: auto !important;
}

/* Estilos para que el input quede por encima del botón en iOS */
.ios-date-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* cubre todo el botón */
    opacity: 0;
    /* invisible pero clickeable */
    border: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* El wrapper posiciona el pop-up contra el chip */
.range-wrap {
    position: relative;
    display: inline-block;
}

/* El calendario por encima de todo (navbars, offcanvas, etc.) */
.flatpickr-calendar {
    z-index: 4000 !important;
}

/* ===== Loading overlay (shared) ===== */
.app-loading {
    position: fixed;
    inset: 56px 0 0 0;
    /* deja la navbar */
    display: none;
    place-items: center;
    background: rgba(255, 255, 255, .55);
    z-index: 2000;
}

.app-loading.show {
    display: grid;
}

.app-loading .spinner {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 3px solid #d0d5dd;
    border-top-color: var(--color-primario, #198754);
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-selected {
    min-width: 100px
}

.form-actions-sticky {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: .75rem;
    z-index: 5;
    border-bottom-left-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, .04);
}

/* Grupos de opciones con estilo “pastilla” */
.choice-group .btn {
    border-radius: 999px;
    padding: .45rem .9rem;
    font-weight: 600;
}

.choice-group .btn i {
    opacity: .9;
    margin-right: .35rem;
}

/* Inputs con prefijos cortos */
.input-group-text.min {
    min-width: 42px;
    justify-content: center;
}

/* Área de texto más compacta por defecto */
textarea.form-control {
    min-height: 80px;
}

/* Cartas de sección reutilizando el lenguaje visual del sitio */
.section-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 10px #0001;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Micro ayudas bajo campos */
.hint {
    font-size: .875rem;
    color: #6c757d;
}

/* Fix desktop: radio-pills en una sola fila y sin cortes raros */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.choice-group .btn {
    white-space: nowrap;
    padding: .35rem .75rem;
    flex: 0 0 auto;
}

@media (min-width: 992px) {
    .choice-group {
        flex-wrap: nowrap !important;
    }
}

/* Alineación vertical prolija en la fila de “Datos de servicio” */
.row-service {
    align-items: flex-start !important;
}

@media (max-width: 400px) {
    .choice-group .btn {
        padding: .3rem .55rem;
        font-size: .9rem;
    }

    .input-group-text.min {
        min-width: 36px;
    }
}

/* XS safeguards (≤360px) */
@media (max-width: 360px) {
    .section-card {
        padding: .75rem;
    }

    .choice-group {
        gap: .4rem;
    }

    .choice-group .btn {
        padding: .28rem .5rem;
        font-size: .9rem;
    }

    .input-group-text.min {
        min-width: 32px;
        padding-left: .25rem;
        padding-right: .25rem;
    }

    .navbar-title {
        font-size: 1rem;
    }
}

.sum-table thead th {
    font-weight: 600;
    color: #6c757d;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.sum-table tbody tr {
    border-radius: 12px;
    overflow: hidden;
}

.sum-table tbody tr td {
    vertical-align: middle;
    border-top: 6px solid #fff;
    /* separador “air” entre filas */
}

.sum-total-row td {
    border-top: 1px solid rgba(0, 0, 0, .1) !important;
    background: #f8f9fa;
}

.sd-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
}

.sd-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

@media (min-width: 420px) {
    .sd-actions {
        grid-template-columns: 1fr 1fr auto;
    }
}

.btn-outline-danger {
    --bs-btn-color: #c0392b;
    --bs-btn-border-color: #c0392b;
}

.btn-outline-danger:hover {
    background: #c0392b;
    color: #fff;
}

.sd-notes .note-item {
    background: #f6f7f9;
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 12px;
    padding: .5rem .75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.sd-notes .note-meta {
    font-size: .8rem;
    color: #6c757d;
}

.sd-notes .note-text {
    white-space: pre-wrap;
}

.sd-notes .note-actions button {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: .25rem .4rem;
}

.sd-notes .notes-composer textarea {
    resize: vertical;
}

/* ---- Color Select ---- */
.color-select {
    width: 100%;
}

.color-select .form-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 2.25rem;
    cursor: pointer;
}

.color-select .cs-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow: hidden;
}

.color-select .cs-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.dropdown-menu .cs-dot {
    width: 10px;
    height: 10px;
}

/* Offcanvas dot más visible */
.ag-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-left: .5rem;
}

/* Puntito grande para el offcanvas */
.ag-lead-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06);
    flex: 0 0 14px;
}

.day-totals.sd-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
}

.day-totals .line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.day-totals .display-total {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primario, #135322);
}

.day-totals .muted {
    color: #6c757d;
}

/* styles.css */
.precio-badge .ayudantes-info {
    margin-top: .25rem;
}

.precio-badge .small {
    line-height: 1.2;
}

/* Dot de la tabla */
.sum-table .cs-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 10px;
}

/* Celda de nombre: una sola línea, con el dot al lado */
.sum-table .name-cell {
    white-space: nowrap;
}

.sum-table .name-content {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    /* para elipsis */
}

.sum-table .name-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Encabezado de tarjetas de resumen */
.sd-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .02));
    border: 1px solid rgba(0, 0, 0, .06);
}

.sd-ico {
    padding: .5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--color-primario, #198754);
    color: #fff;
    font-size: 16px;
}

.sd-heading-text {
    font-weight: 600;
}

/* =========================
   DatePicker en MODAL (Flatpickr inline)
   ========================= */

/* Variables de tamaño */
:root {
    --cal-cell: 2.8rem;
    /* tamaño base de cada día */
    --dot: 14px;
    /* tamaño del contador */
    --gap-inside: 4px;
    /* espacio número ↔ dot */
}

/* ---- Modal ---- */
.modal-calendar .modal-dialog {
    max-width: 900px;
}

@media (max-width:576px) {
    .modal-calendar .modal-dialog {
        max-width: 92vw;
    }
}

#dateModal .modal-content {
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .18);
}

#dateModal .modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}

#dateModal .modal-title {
    font-weight: 800;
    letter-spacing: .2px;
}

/* Footer: solo “Hoy” a la derecha */
#dateModal .modal-footer {
    border-top: 1px solid #eef2f6;
    padding: 12px 14px;
    justify-content: flex-end;
}

#dateModal .modal-footer [data-bs-dismiss="modal"] {
    display: none !important;
}

/* Botón Hoy (pill) */
#btnModalToday {
    --btn-bg: color-mix(in srgb, var(--color-primario, #198754) 10%, #fff);
    --btn-bd: color-mix(in srgb, var(--color-primario, #198754) 25%, #d1e7dd);
    background: var(--btn-bg);
    color: var(--color-primario, #198754);
    border: 1px solid var(--btn-bd);
    border-radius: 999px;
    padding: .45rem .9rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

#btnModalToday:hover {
    background: color-mix(in srgb, var(--color-primario, #198754) 14%, #fff);
    box-shadow: 0 3px 10px rgba(16, 24, 40, .08);
}

/* ---- Calendario inline ---- */
#dateModal .flatpickr-calendar.inline {
    max-width: 860px;
    margin-inline: auto;
    border: 0;
    box-shadow: none;
}

#dateModal .flatpickr-innerContainer {
    display: block;
}

#dateModal .flatpickr-days {
    width: 100% !important;
}

#dateModal .dayContainer {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(7, minmax(var(--cal-cell), 1fr));
    gap: 8px;
}

/* Ocultar días de meses adyacentes */
#dateModal .flatpickr-day.prevMonthDay,
#dateModal .flatpickr-day.nextMonthDay {
    display: none;
    pointer-events: none;
}

/* Celda día = “card” con número arriba y dot abajo */
#dateModal .flatpickr-day {
    display: grid;
    grid-template-rows: 1fr var(--dot);
    align-items: center;
    justify-items: center;
    row-gap: var(--gap-inside);
    width: 100% !important;
    height: calc(var(--cal-cell) + var(--gap-inside));
    line-height: 1;
    padding: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e9eef4;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: transform .08s, box-shadow .12s, border-color .12s, background-color .12s;
}

#dateModal .flatpickr-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 24, 40, .08);
    border-color: #dfe6ee;
}

#dateModal .flatpickr-day.today:not(.selected) {
    border-color: var(--color-primario, #198754);
}

#dateModal .flatpickr-day.selected {
    background: #2d6cdf;
    color: #fff;
    border-color: transparent;
    box-shadow:
        0 0 0 3px rgba(45, 108, 223, .14),
        0 10px 24px rgba(45, 108, 223, .28);
}

/* Dot/contador centrado en la fila inferior (nunca tapa el número) */
#dateModal .flatpickr-day.has-trips .trip-badge {
    grid-row: 2;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--dot);
    height: var(--dot);
    line-height: var(--dot);
    padding: 0 4px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 10px;
    color: #fff;
    pointer-events: none;
    box-shadow: 0 0 0 2px #fff;
}

#dateModal .flatpickr-day.has-trips .trip-badge.badge-2d {
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
}

#dateModal .flatpickr-day.has-trips .trip-badge.badge-3d {
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 9px;
}

/* sin flechas up/down en año */
#dateModal .numInputWrapper span.arrowUp,
#dateModal .numInputWrapper span.arrowDown {
    display: none !important;
}

/* por si algún theme agrega caret al mes */
#dateModal .flatpickr-current-month .cur-month::after {
    content: none !important;
}

/* Encabezados de días de semana */
#dateModal .flatpickr-weekdays {
    margin: 4px 0 2px;
}

#dateModal .flatpickr-weekday {
    color: #64748b;
    font-weight: 700;
    letter-spacing: .2px;
}

#dateModal .flatpickr-current-month {
    display: flex !important;
    gap: .35rem;
    align-items: center;
    justify-content: center;
    padding: .25rem 0;
    font-weight: 800;
    color: #1f2937;
}

/* sin flechas up/down en el año */
#dateModal .numInputWrapper span.arrowUp,
#dateModal .numInputWrapper span.arrowDown {
    display: none !important;
}

/* por si algún theme agrega caret al mes */
#dateModal .flatpickr-current-month .cur-month::after {
    content: none !important;
}

/* ——— Días: recuperar padding/espaciado del número y el dot ——— */
:root {
    --gap-inside: 6px;
}

/* un poco más de aire */

#dateModal .flatpickr-day {
    display: grid;
    grid-template-rows: 1fr var(--dot);
    /* número arriba, dot abajo */
    row-gap: var(--gap-inside);
    align-items: center;
    justify-items: center;
    line-height: 1;
    /* que el número no se estire */
    padding: .15rem 0 .35rem;
    /* separa del borde inferior */
    border-radius: 12px;
}

#dateModal .flatpickr-day.has-trips .trip-badge {
    grid-row: 2;
    position: static;
    /* nunca tapa el número */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--dot);
    height: var(--dot);
    line-height: var(--dot);
    padding: 0 4px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 10px;
    color: #fff;
    pointer-events: none;
    box-shadow: 0 0 0 2px #fff;
}

#dateModal .flatpickr-current-month {
    display: flex !important;
    gap: .35rem;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #1f2937;
    padding: 0;
}


/* Semana: deja un pequeño aire con el header */
#dateModal .flatpickr-weekdays {
    margin: 6px 0 2px;
}

/* ===== Días: número arriba y dot abajo (alineado), con aire ===== */
:root {
    --gap-inside: 6px;
}

/* compacta/expande separación número ↔ dot */

#dateModal .flatpickr-day {
    display: grid;
    grid-template-rows: 1fr var(--dot);
    row-gap: var(--gap-inside);
    align-items: center;
    justify-items: center;
    line-height: 1;
    /* el número no “estira” la celda */
    padding: .15rem 0 .40rem;
    /* extra aire abajo para que el dot no toque el borde */
    border-radius: 12px;
}

/* Dot centrado (nunca tapa el número) */
#dateModal .flatpickr-day.has-trips .trip-badge {
    grid-row: 2;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--dot);
    height: var(--dot);
    line-height: var(--dot);
    padding: 0 4px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 10px;
    color: #fff;
    pointer-events: none;
    box-shadow: 0 0 0 2px #fff;
}

/* Seleccionado: mantiene la separación inferior igual (no se “pega” el dot) */
#dateModal .flatpickr-day.selected {
    padding-bottom: .40rem;
}

#dateModal .modal-footer {
    border-top: 1px solid #eef2f6;
    padding: 12px 14px;
    justify-content: flex-end;
}

#dateModal .modal-footer [data-bs-dismiss="modal"] {
    display: none !important;
}

/* ======= Header Mes/Año ======= */
#dateModal .flatpickr-current-month {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}



/* Mes (select) y Año (input) comparten mismo “chip” */
#dateModal .flatpickr-monthDropdown-months,
#dateModal .flatpickr-current-month .cur-year {
    height: 36px !important;
    line-height: 36px;
    border-radius: 12px;
    border: 1px solid #E0E3E7;
    background: #fff;
    font-size: 16px;
    color: #0B1F26;
    padding: 0 36px 0 12px;
    /* espacio para el chevrón a la derecha */
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* Mes (select): reset nativo + chevrón */
#dateModal .flatpickr-monthDropdown-months {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

/* Año (input number): ancho fijo y centrado */
#dateModal .flatpickr-current-month .cur-year {
    width: 92px;
    text-align: center;
    padding-right: 12px;
    /* no necesita chevrón */
}

/* Hover / Focus */
#dateModal .flatpickr-monthDropdown-months:hover,
#dateModal .flatpickr-current-month .cur-year:hover {
    border-color: #CBD5E1;
}

#dateModal .flatpickr-monthDropdown-months:focus,
#dateModal .flatpickr-current-month .cur-year:focus {
    outline: none;
    border-color: #135322;
    /* tu color */
    box-shadow: 0 0 0 3px rgba(19, 83, 34, .15);
}

/* Desactivar flechas “up/down” de flatpickr y spinners nativos */
#dateModal .flatpickr-current-month .numInputWrapper .arrowUp,
#dateModal .flatpickr-current-month .numInputWrapper .arrowDown {
    display: none !important;
}

#dateModal .flatpickr-current-month .cur-year::-webkit-outer-spin-button,
#dateModal .flatpickr-current-month .cur-year::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#dateModal .flatpickr-current-month .cur-year {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ====== Contenedor general ====== */
#dateModal .flatpickr-calendar,
#dateModal .flatpickr-wrapper {
    box-sizing: border-box;
}

#dateModal .flatpickr-calendar.inline {
    width: auto;
    /* evita recortes horizontales */
    padding: 8px 12px 12px;
    /* respiración interna */
}

/* Grilla de días con aire */
#dateModal .flatpickr-days {
    padding: 2px 6px 0;
    overflow: visible;
}

#dateModal .dayContainer {
    gap: 6px 6px;
}

/* requiere flatpickr >=4.6, si no, usar margin en .flatpickr-day */
#dateModal .flatpickr-day {
    margin: 3px;
    /* fallback por si ‘gap’ no aplica */
    border-radius: 12px;
}

/* Estado seleccionado (y foco) */
#dateModal .flatpickr-day.selected,
#dateModal .flatpickr-day.selected:focus,
#dateModal .flatpickr-day.startRange,
#dateModal .flatpickr-day.endRange {
    background: #135322;
    /* tu verde */
    border-color: #135322;
    color: #fff;
    box-shadow: 0 2px 8px rgba(19, 83, 34, .25);
}

/* Hover */
#dateModal .flatpickr-day:hover {
    border-color: #13532233;
    /* sutil */
}

/* Hoy sin pelearse con seleccionado */
#dateModal .flatpickr-day.today:not(.selected) {
    border-color: #135322;
    color: #135322;
}

/* Mismo look "pill" que el mes */
#dateModal .fp-yearSelect,
#dateModal .flatpickr-monthDropdown-months {
    height: 36px !important;
    line-height: 36px;
    border-radius: 12px;
    border: 1px solid #E0E3E7;
    background: #fff;
    font-size: 16px;
    color: #0B1F26;
    padding: 0 36px 0 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

#dateModal .fp-yearSelect:hover,
#dateModal .flatpickr-monthDropdown-months:hover {
    border-color: #CBD5E1;
}

#dateModal .fp-yearSelect:focus,
#dateModal .flatpickr-monthDropdown-months:focus {
    outline: none;
    border-color: #135322;
    box-shadow: 0 0 0 3px rgba(19, 83, 34, .15);
}

/* Compacto en móviles */
@media (max-width: 560px) {

    #dateModal .fp-yearSelect,
    #dateModal .flatpickr-monthDropdown-months {
        height: 32px;
        line-height: 32px;
        border-radius: 10px;
        font-size: 15px;
    }
}

/* Evitar clipping del header (mes/año) y su dropdown */
#dateModal .flatpickr-calendar,
#dateModal .flatpickr-months,
#dateModal .flatpickr-month {
    overflow: visible !important;
}

/* Alinear encabezados de semana con la grilla de días */
#dateModal .flatpickr-weekdays {
    padding: 0 6px;
}

/* que coincida con .flatpickr-days */
#dateModal .flatpickr-days {
    padding: 0 6px;
}

/* si ya lo tenías, dejalo igual */

/* Normalizar foco del select Mes y del Año dropdown */
#dateModal .flatpickr-monthDropdown-months:focus,
#dateModal .fp-yearSelect:focus {
    outline: none;
    border-color: #135322;
    box-shadow: 0 0 0 3px rgba(19, 83, 34, .15);
    background-color: #fff;
    /* evita background azul del UA */
}

/* NO ocultar: aseguramos que ocupen su celda */
#dateModal .flatpickr-day.prevMonthDay,
#dateModal .flatpickr-day.nextMonthDay {
    display: inline-block !important;
    /* recupera el layout */
    opacity: .35;
    color: #64748B;
    pointer-events: none;
    /* que no se puedan clickear */
}

/* Fallback */
#dateModal {
    --brand: #135322;
}

/* Día seleccionado del calendario con color del fletero */
#dateModal .flatpickr-day.selected,
#dateModal .flatpickr-day.selected:focus,
#dateModal .flatpickr-day.startRange,
#dateModal .flatpickr-day.endRange {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent);
}

/* Header “Dom 02 de Nov” (fuera del modal) */
#dayViewRoot .selected-day-pill {
    background: color-mix(in srgb, var(--brand) 18%, #ffffff);
    color: #0B1F26;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, #E6E8EB);
}

/* chip base (neutral, como selector de fecha) */
.chip {
    height: 36px;
    border-radius: 999px;
    padding: 0 14px;
    border: 1px solid #E0E3E7;
    background: #fff;
    color: #0B1F26;
    font-weight: 600;
}

/* chip activo (“estamos en hoy”) */
.chip--brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 1px 8px color-mix(in srgb, var(--brand) 30%, transparent);
}

/* Aspecto chip neutro (igual al selector de fecha) */
#btnHoy.day-chip,
#btnCargar.day-chip {
    border-radius: 999px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #E0E3E7 !important;
    font-weight: 600;
    box-shadow: none;
}


#btnHoy.day-chip:focus,
#btnCargar.day-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 83, 34, .15) !important;
    /* tu verde suave */
}

/* Alineado vertical con el date chip (por si el otro tiene 36px) */
#btnHoy.day-chip.btn-sm,
#btnCargar.day-chip.btn-sm {
    line-height: 36px;
}

.flatpickr-innerContainer {
    overflow: auto !important;
}

@media (max-width: 375px) {
    .flatpickr-monthDropdown-months {
        background-image: none !important;
        width: fit-content !important;
        padding: 0 0 0 .5rem !important;
    }

    .fp-yearSelect {
        background-image: none !important;
        width: fit-content !important;
        padding: 0 .5rem 0 .5rem !important;
    }
}

.flatpickr-prev-month {
    height: fit-content !important;
    padding: 0 !important;
    position: unset !important;
}

.flatpickr-next-month {
    height: fit-content !important;
    padding: 0 !important;
    position: unset !important;
}

.flatpickr-months {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--brand) !important;
}

/* FAB global “+” fijo */
.fab {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    z-index: 1061;
    /* por arriba del offcanvas (1060) y debajo de modal backdrop (1060-1065). Sube si hiciera falta */
    font-size: 1.25rem;
}

.fab:focus-visible {
    outline-offset: 2px;
}

.day-totals {
    margin-bottom: 10rem;
}

/* Bootstrap 5: modal-backdrop ≈ 1050, modal ≈ 1055, offcanvas-backdrop ≈ 1040 */
.fab {
    z-index: 1030;
    /* debajo de cualquier backdrop/modal */
}

/* Notas */
.container-tiny {
    max-width: 780px;
}

.section-title {
    font-size: .78rem;
    letter-spacing: .08em;
    color: #6c757d;
    text-transform: uppercase;
    margin: 0 0 .5rem 0;
}

.card.note {
    border: 1px solid #e6e6e6;
    border-radius: 14px;
}

.card.note .card-body {
    padding: 14px;
}

.card.note textarea.form-control {
    border-radius: 10px;
}

.btn-primary {
    background-color: #137c32;
    border-color: #137c32;
}

.btn-primary:hover {
    background-color: #189b3f;
    border-color: #189b3f;
}

.container-tiny {
    max-width: 920px;
}

.note-item {
    padding: .75rem 1rem;
}

/* compacidad */
.sd-card .note-item+.note-item {
    margin-top: .5rem;
}

.btn-icon-nav {
    padding: .375rem .5rem;
}

/* íconos navbar */

/* badge chico y legible en el toggler */
#navNotesBadge {
    font-size: .65rem;
    line-height: 1;
    padding: .25rem .35rem;
}

.container-tiny {
    max-width: 920px;
}

.btn-icon-nav {
    padding: .375rem .5rem;
}

.note-item {
    padding: .75rem 1rem;
}

/* badges circulares compactos */
.badge-circle {
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border-radius: 9999px;
    font-size: .65rem;
    line-height: 1.1rem;
    text-align: center;
}

.btn-icon {
    padding: .25rem .45rem;
    border-radius: .6rem;
}

.btn-icon i {
    font-size: 1rem;
    line-height: 1;
}

.btn-trash {
    color: #dc3545;
}

.note-item {
    background: #fff;
    border-radius: .75rem;
}

.container-tiny {
    max-width: 920px;
}

.sd-card {
    border: 1px solid #e9ecef;
    border-radius: .8rem;
    background: #fff;
}

.sd-card+.sd-card {
    margin-top: 1rem;
}

/* link centrado sin subrayado en dark navbar */
.navbar-title-link {
    color: #fff;
    text-decoration: none;
}

.navbar-title-link:hover {
    color: #fff;
    text-decoration: underline;
}


.badge-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border-radius: 9999px;
    font-size: .65rem;
    line-height: 1;
    text-align: center;
}

.offcanvas,
.offcanvas-backdrop {
    transition: none !important;
}

/* ---------- Tipografía y cortes largos ---------- */
.note-item .h6,
.note-item .text-body {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---------- Card look & feel ---------- */
.sd-card.note-item {
    background: #fff;
    border: 1px solid #eef0f3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    border-radius: 14px;
}

.note-item .meta {
    color: #6c757d;
    font-size: .9rem;
}

/* ---------- Botonera de acciones ---------- */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-icon i {
    font-size: 18px;
    line-height: 1;
}

/* Estados: Hecho / Editar / Borrar */
.btn-done {
    border: 1px solid #d1f2e3;
    background: #f3fbf7;
    color: #198754;
}

.btn-done:hover {
    border-color: #198754;
    background: #e9f7ef;
    color: #146c43;
}

.btn-edit {
    border: 1px solid #dfe7fb;
    background: #f6f8ff;
    color: #0d3b66;
}

.btn-edit:hover {
    border-color: #0d3b66;
    background: #eef3ff;
    color: #0a2f52;
}

.btn-trash {
    border: 1px solid #fde2e2;
    background: #fff7f7;
    color: #dc3545;
}

.btn-trash:hover {
    border-color: #dc3545;
    background: #ffe9ea;
    color: #a71d2a;
}

/* ---------- Responsive layout ---------- */
.note-item .row-head {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    justify-content: space-between;
}

.note-item .row-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .note-item .row-head {
        flex-direction: column;
    }

    .note-item .row-actions {
        align-self: flex-end;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
}

/* ---------- Título de sección ---------- */
.notes-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.note-item .text-body {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* tarjeta de nota */
.sd-card.note-item {
    position: relative;
    padding-bottom: 58px;
}


/* tipografía segura para cortes largos */
.note-item .h6,
.note-item .text-body {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* botones (se mantienen) */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-done {
    border: 1px solid #d1f2e3;
    background: #f3fbf7;
    color: #198754;
}

.btn-done:hover {
    border-color: #198754;
    background: #e9f7ef;
    color: #146c43;
}

.btn-edit {
    border: 1px solid #dfe7fb;
    background: #f6f8ff;
    color: #0d3b66;
}

.btn-edit:hover {
    border-color: #0d3b66;
    background: #eef3ff;
    color: #0a2f52;
}

.btn-trash {
    border: 1px solid #fde2e2;
    background: #fff7f7;
    color: #dc3545;
}

.btn-trash:hover {
    border-color: #dc3545;
    background: #ffe9ea;
    color: #a71d2a;
}

@media (max-width: 576px) {
    .btn-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .sd-card.note-item {
        padding-bottom: 54px;
    }
}

/* evita "rebote" inicial de los botones */
.note-item {
    min-height: 120px;
    /* altura base estable */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.15s ease;
}


/* placeholder de altura mientras se renderiza */
.note-item.loading {
    background: rgba(240, 240, 240, .4);
}

.btn-icon i {
    display: inline-block;
    width: 16px;
    text-align: center;
}

.note-actions {
    DISPLAY: FLEX !important;
    JUSTIFY-CONTENT: FLEX-END !important; 
    GAP: 12PX !important;
    padding-top: 1rem !important;
}

#quickSearchBox .dropdown-menu {
    transform: translate3d(0, 32px, 0);
}

#quickSearchBox .item {
    padding: .5rem .75rem;
    cursor: pointer;
}

#quickSearchBox .item:hover {
    background: #f5f7fa;
}

#quickSearchBox .more {
    border-top: 1px solid #eee;
    font-weight: 600;
}

/* resultados */
#qresults .list-group-item {
    cursor: pointer;
}

#qresults .meta {
    font-size: .85rem;
    color: #6c757d;
}

#qresults .arrow {
    opacity: .6;
}

/* Fleteros: chips responsive */
.fleteros-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 2px;
    scroll-snap-type: x mandatory;
}

.fletero-chip {
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 10px 14px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .03);
    white-space: nowrap;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease;
}

.fletero-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .07);
    border-color: #dee2e6;
}

.fletero-chip:focus-visible {
    outline: 3px solid rgba(25, 135, 84, .35);
    outline-offset: 2px;
}

.fletero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px #fff;
    flex: 0 0 12px;
}

.fletero-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.fletero-text strong {
    font-weight: 700;
    font-size: 15px;
    color: #212529;
}

.fletero-car {
    font-size: 12px;
    color: #6c757d;
}

.fletero-arrow {
    margin-left: 6px;
    opacity: .45;
}

/* Desktop → grid autosize */
@media (min-width: 768px) {
    .fleteros-scroll {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        overflow: visible;
        gap: 14px;
    }

    .fletero-chip {
        width: 100%;
        white-space: normal;
        height: auto;
        min-height: 64px;
    }
}