/* ============================================================
   MOBILE-ONLY STYLES  (max-width: 767px)
   Loaded AFTER style.css — only adds mobile overrides.
   Desktop (>= 768px) sees NONE of these rules.
   ============================================================ */

/* ---- helpers (always present, but only visible on mobile) ---- */
#mobile-licitaciones-list { display: none; }
#mobile-bottom-nav { display: none; }

@media (max-width: 767px) {

/* ----------------------------------------------------------
   0. ROOT OVERRIDES
   ---------------------------------------------------------- */
.app-container {
    width: calc(100% - 20px) !important;
    padding: 0 !important;
}

.dashboard-main {
    padding: .75rem 0 5rem !important;
}

body.app-shell {
    overflow-x: hidden;
}

/* ----------------------------------------------------------
   1. NAVBAR — compact, repositioned controls
   ---------------------------------------------------------- */
.app-navbar {
    padding: .5rem .75rem !important;
}
.app-navbar .container-fluid {
    flex-wrap: wrap;
}
.app-navbar .app-brand-title {
    font-size: 1rem;
}
.app-navbar .app-brand-logo {
    width: 32px !important;
    height: 32px !important;
}
#dark-mode-toggle {
    order: -1;
    margin-left: 0 !important;
    margin-right: 8px !important;
}
.navbar-toggler {
    order: 10;
    margin-left: auto !important;
}

/* Hide AI chat on mobile */
.assistant-chat__fab,
.assistant-chat__panel,
.assistant-chat__backdrop {
    display: none !important;
}

/* Hide team chat on mobile (mismo criterio que asistente) */
.team-chat__fab,
.team-chat__panel {
    display: none !important;
}

/* ----------------------------------------------------------
   2. HIDE DESKTOP TABLE / SHOW MOBILE CARDS
   ---------------------------------------------------------- */
.dashboard-table-wrap,
.table-pagination-bar {
    display: none !important;
}

#mobile-licitaciones-list {
    display: block !important;
}

/* ----------------------------------------------------------
   3. FILTERS — compact, collapsible
   ---------------------------------------------------------- */
.section-card.filters-card {
    padding: .75rem !important;
    margin-bottom: .75rem !important;
    border-radius: 14px !important;
}

.filters-card .section-header {
    display: none !important;
}

.section-kicker {
    font-size: .75rem !important;
}

.filters-layout {
    gap: .5rem !important;
}

.filters-layout .form-control,
.filters-layout .form-select,
.filters-layout .multiselect-slim__control {
    min-height: 44px;
    font-size: .95rem;
    border-radius: 10px !important;
}

/* Collapsible filter fields */
.filters-layout .filter-field:not(.filter-field-search) {
    display: none;
}
.filters-layout.mob-filters-expanded .filter-field:not(.filter-field-search) {
    display: block;
}
.filter-actions {
    display: none !important;
}
.filters-layout.mob-filters-expanded .filter-actions {
    display: flex !important;
    gap: .4rem !important;
}
.filter-actions .btn {
    min-height: 42px;
    border-radius: 10px !important;
    font-size: .85rem;
}

/* Toggle filters button */
.mob-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: none;
    background: none;
    color: #3b5bdb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mob-filters-toggle i {
    font-size: 10px;
    transition: transform .2s;
}
.mob-filters-expanded + .mob-filters-toggle i {
    transform: rotate(180deg);
}

/* ----------------------------------------------------------
   4. TABLE-CARD section — minimal padding
   ---------------------------------------------------------- */
.section-card.table-card {
    padding: .75rem !important;
    margin-bottom: .75rem !important;
    border-radius: 14px !important;
}

.table-card .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
}

.table-card .section-header .section-kicker {
    display: none !important;
}

.table-toolbar {
    width: 100%;
}
.table-toolbar .btn {
    min-height: 42px;
    border-radius: 10px !important;
}
#refresh-btn,
#sync-emails-btn {
    display: none !important;
}

/* ----------------------------------------------------------
   5. ESTADO CHIPS — horizontal scroll
   ---------------------------------------------------------- */
#estado-filter-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .35rem;
    padding-bottom: .3rem;
    scrollbar-width: none;
}
#estado-filter-chips::-webkit-scrollbar { display: none; }

.estado-filter-chip {
    flex-shrink: 0;
    font-size: .8rem;
    padding: .3rem .65rem;
    border-radius: 20px !important;
}

/* ----------------------------------------------------------
   6. RECEPTION SUMMARY — hide on mobile
   ---------------------------------------------------------- */
.reception-summary-card {
    display: none !important;
}

/* ----------------------------------------------------------
   7. MOBILE LICITACION CARDS — match mockup
   ---------------------------------------------------------- */
.mob-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    padding: 0;
    margin-bottom: .6rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    transition: transform .1s;
}
.mob-card:active {
    transform: scale(.985);
}

.mob-card--important {
    border-left: 3px solid #3b5bdb;
}

/* card header row */
.mob-card__header {
    padding: .75rem .85rem .45rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.mob-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.mob-card__subject {
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.3;
    color: #1a1a2e;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mob-card__arrow {
    flex-shrink: 0;
    color: #8492a6;
    font-size: .8rem;
}

.mob-card__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: #6b7280;
}

.mob-card__meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c5cad3;
    flex-shrink: 0;
}

/* vehicle row */
.mob-card__vehicle {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .85rem .5rem;
}

.mob-card__vehicle-icon {
    width: 44px;
    height: 32px;
    border-radius: 6px;
    background: #f0f2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .75rem;
    color: #8492a6;
    overflow: hidden;
}

.mob-card__vehicle-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mob-card__vehicle-info {
    flex: 1;
    min-width: 0;
}

.mob-card__vehicle-brand {
    font-weight: 700;
    font-size: .88rem;
    color: #1a1a2e;
}

.mob-card__vehicle-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: .1rem .35rem;
    border-radius: 4px;
    background: #eef1f6;
    color: #6b7280;
    margin-left: .3rem;
    vertical-align: middle;
}

.mob-card__vehicle-model {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* urgency badge */
.mob-card__urgency {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 6px;
}
.mob-card__urgency--danger {
    background: #fde8e8;
    color: #dc3545;
}
.mob-card__urgency--warning {
    background: #fff3e0;
    color: #e67e22;
}
.mob-card__urgency--ok {
    background: #e8f5e9;
    color: #27ae60;
}
.mob-card__urgency--expired {
    background: #f5f5f5;
    color: #95a5a6;
}

/* CTA row */
.mob-card__cta-row {
    padding: .4rem .85rem .7rem;
}

.mob-card__cta {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #3b5bdb;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: .4rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
}
.mob-card__cta i {
    font-size: .7rem;
}

/* mobile pagination */
.mob-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .6rem;
    padding: .75rem 0 1rem;
}
.mob-pagination__btn {
    min-height: 44px;
    min-width: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.1);
    background: #fff;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .75rem;
    color: #1a1a2e;
}
.mob-pagination__btn:disabled {
    opacity: .35;
    cursor: default;
}
.mob-pagination__info {
    font-size: .82rem;
    color: #6b7280;
}

.mob-list-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6b7280;
    font-size: .9rem;
}

/* ----------------------------------------------------------
   8. BOTTOM TAB BAR
   ---------------------------------------------------------- */
#mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
    padding: .3rem 0 env(safe-area-inset-bottom, .25rem);
    justify-content: space-around;
}

.mob-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .35rem .5rem;
    border: none;
    background: none;
    font-size: .68rem;
    color: #8492a6;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mob-tab i {
    font-size: 1.15rem;
}
.mob-tab--active {
    color: #3b5bdb;
    font-weight: 600;
}

/* ----------------------------------------------------------
   9. MODALS → FULL-SCREEN SHEET
   ---------------------------------------------------------- */
.app-modal .modal-dialog,
#licitarModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
}

.app-modal .modal-content,
#licitarModal .modal-content {
    border-radius: 0 !important;
    border: none !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
    display: flex;
    flex-direction: column;
}

/* ----------------------------------------------------------
   10. LICITAR MODAL — clean mobile app
   ---------------------------------------------------------- */

/* Header */
#licitarModal .modal-header,
#licitarModal .licitar-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    padding: 12px 16px !important;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

#licitarModal .licitar-modal-brand-strip { display: none !important; }
#licitarModal .btn-close { display: none !important; }
#licitarModal .licitar-modal-header .modal-kicker { display: none !important; }
#licitarModal .licitar-modal-header .modal-title i { display: none !important; }

#licitarModal .licitar-modal-header .modal-title-wrap {
    flex: 1;
    min-width: 0;
}

#licitarModal .licitar-modal-header .modal-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1a1a2e;
    margin: 0 !important;
}

#licitarModal .mob-licitar-back {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f0f2f7;
    color: #3b5bdb;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
#licitarModal .mob-licitar-back:active { background: #e4e7ef; }

#licitarModal .mob-licitar-header-spacer {
    width: 36px;
    flex: 0 0 36px;
}

/* Body */
#licitarModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px !important;
    padding-bottom: 100px !important;
    background: #f6f7fb;
}

/* Mobile header center block (title + vehicle) */
.mob-licitar-header-center {
    flex: 1;
    min-width: 0;
    text-align: center;
}
.mob-licitar-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mob-vehicle-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: #8492a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.mob-vehicle-subtitle:empty {
    display: none;
}

/* Vehiculo block */
#licitarModal .quote-panel--licitar-vehiculo {
    padding: 14px !important;
    border: none !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    margin-bottom: 12px !important;
}

.licitar-vehiculo-grid {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
}

/* Vencimiento banner */
#licitarModal .licitar-vencimiento-banner {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Photos carousel */
#licitarModal .quote-panel--licitar-photos {
    border-radius: 16px !important;
    overflow: hidden;
    padding: 8px !important;
    margin-bottom: 12px !important;
    background: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.protected-images-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}
.protected-images-grid .protected-img-thumb {
    flex: 0 0 85vw;
    max-width: 85vw;
    scroll-snap-align: center;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    object-fit: cover;
}

/* ----------------------------------------------------------
   11. REPUESTO CARDS
   ---------------------------------------------------------- */
#licitarModal .quote-panel--licitar-table {
    overflow-x: visible !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#licitarModal .quote-panel--licitar-table::before {
    content: "Repuestos a cotizar";
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

#licitarModal .licitar-subsection-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e;
}

#licitarModal .licitar-subsection-hint {
    font-size: 13px !important;
    color: #888 !important;
}

/* Ocultar título + hint del bloque Excel (solo este panel; fotos conservan los suyos) */
#licitarModal .quote-panel--licitar-table > .d-flex.mb-3:first-child {
    display: none !important;
}

/* Totals — compacto; default o SURA según .app-hidden en JS */
#licitarModal #licitar-repuestos-totals-default:not(.app-hidden),
#licitarModal #licitar-repuestos-totals-sura:not(.app-hidden) {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    margin-bottom: 10px !important;
    padding: 0 !important;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
}

#licitarModal #licitar-repuestos-totals-default .parts-summary-total-item,
#licitarModal #licitar-repuestos-totals-sura .parts-summary-total-item {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    flex: 1 1 100%;
    padding: 8px 14px;
    font-size: 12px;
    color: #888;
    border-bottom: 1px solid #f3f3f3;
}

#licitarModal #licitar-repuestos-totals-default .parts-summary-total-item:last-child,
#licitarModal #licitar-repuestos-totals-sura .parts-summary-total-item:last-child {
    border-bottom: none;
}

#licitarModal #licitar-repuestos-totals-default #licitar-total-legit-wrap {
    display: flex !important;
}

#licitarModal #licitar-repuestos-totals-default strong,
#licitarModal #licitar-repuestos-totals-sura strong {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Table reset */
#licitarModal .quote-table {
    display: block !important;
    border: none !important;
}

#licitarModal .quote-table thead {
    display: none !important;
}

#licitarModal .quote-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Each repuesto = a card ---- */
#licitarModal .quote-table tbody tr,
#licitarModal .quote-table tbody tr:nth-child(odd),
#licitarModal .quote-table tbody tr:nth-child(even) {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 14px !important;
    background: #fff !important;
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

#licitarModal .quote-table tbody tr td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    --bs-table-bg-type: transparent !important;
    --bs-table-striped-bg: transparent !important;
    display: block !important;
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
}

/* -- Checkbox cell: inline with name -- */
#licitarModal .quote-table tbody tr .mob-licitar-cell--check {
    display: none !important;
}

/* -- Name cell: has checkbox pulled in via CSS -- */
#licitarModal .quote-table tbody tr .mob-licitar-cell--name {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px !important;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0 !important;
}

#licitarModal .quote-table tbody tr .mob-licitar-cell--name .form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 6px;
    accent-color: #3b5bdb;
    flex-shrink: 0;
}

#licitarModal .quote-table tbody tr .mob-licitar-cell--name strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    word-break: break-word;
}

/* -- Ref cell -- */
#licitarModal .quote-table tbody tr .mob-licitar-cell--ref {
    font-size: 12px !important;
    color: #999 !important;
    margin-bottom: 8px;
}
#licitarModal .quote-table tbody tr .mob-licitar-cell--ref span,
#licitarModal .quote-table tbody tr .mob-licitar-cell--ref div {
    font-size: 12px !important;
    color: #999 !important;
}

#licitarModal .quote-table tbody tr .part-item-meta,
#licitarModal .quote-table tbody tr .licitar-parte-subline {
    font-size: 12px !important;
    color: #999 !important;
}

/* -- Field cells: label above input -- */
#licitarModal .quote-table tbody tr .mob-licitar-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 10px;
}

#licitarModal .quote-table tbody tr .mob-licitar-field::before {
    display: block !important;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0;
}

#licitarModal .quote-table tbody tr .mob-licitar-cell--stock::before { content: "Disponibilidad"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--quality::before { content: "Calidad"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--price-single::before { content: "Precio"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--comment::before { content: "Obs"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--price-original::before { content: "Original"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--price-legitimo::before { content: "Legítimo"; }
#licitarModal .quote-table tbody tr .mob-licitar-cell--price-alt::before { content: "Paralelo"; }

/* -- Inputs -- */
#licitarModal .quote-table tbody tr input:not([type="checkbox"]),
#licitarModal .quote-table tbody tr select {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    padding: 8px 12px !important;
    color: #1a1a2e;
    box-shadow: none !important;
    -webkit-appearance: none;
}

#licitarModal .quote-table tbody tr select {
    color: #3b5bdb;
    font-weight: 600;
}

#licitarModal .quote-table tbody tr input:focus,
#licitarModal .quote-table tbody tr select:focus {
    border-color: #3b5bdb !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,91,219,0.1) !important;
}

#licitarModal .quote-table tbody tr input.text-end {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

#licitarModal .quote-table tbody tr .mob-licitar-cell--comment input {
    text-align: left !important;
}

#licitarModal .quote-table tbody tr input::placeholder {
    color: #bbb;
}

/* -- Last field in card: no bottom margin -- */
#licitarModal .quote-table tbody tr .mob-licitar-field:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------
   12. LICITAR FOOTER — fixed bottom bar
   ---------------------------------------------------------- */
#licitarModal .modal-footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 12px 16px calc(env(safe-area-inset-bottom, 8px) + 4px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

#licitarModal .modal-footer #licitar-send-btn,
#licitarModal .modal-footer #licitar-automation-btn {
    order: -1;
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: #3b5bdb !important;
    border-color: #3b5bdb !important;
    color: #fff !important;
}

/* Hide all secondary buttons */
#licitarModal .modal-footer > button[data-bs-dismiss="modal"],
#licitarModal .modal-footer #licitar-save-btn,
#licitarModal .modal-footer #licitar-archive-btn,
#licitarModal .modal-footer #licitar-download-btn,
#licitarModal .modal-footer #licitar-open-manual-btn {
    display: none !important;
}

#licitarModal #automation-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#licitarModal #automation-actions #automation-cancel-btn,
#licitarModal #automation-actions #automation-manual-btn {
    display: none !important;
}

#licitarModal #automation-actions #automation-confirm-btn,
#licitarModal #automation-actions #automation-retry-btn {
    height: 48px;
    border-radius: 12px;
    width: 100%;
}

/* (chat hidden globally on mobile — see navbar section) */

/* PDF viewer: iframe doesn't work on mobile */
#licitarModal .automation-pdf-iframe {
    display: none !important;
}

.mob-pdf-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: #3b5bdb;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    margin: 12px 0;
}
.mob-pdf-open-btn:active {
    background: #2f4ab8;
}

#licitarModal .automation-pdf-preview {
    border-radius: 16px !important;
    padding: 14px !important;
}

#licitarModal .automation-repuestos-verify {
    border-radius: 16px;
    overflow-x: auto;
}

#licitarModal .automation-status-panel {
    padding: 0 !important;
}

#licitarModal .automation-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

#licitarModal .automation-actions .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}

/* ----------------------------------------------------------
   13. FICHA MODAL (detail) — full screen
   ---------------------------------------------------------- */
.app-modal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100dvh !important;
}
.app-modal .modal-content {
    border-radius: 0 !important;
    border: none !important;
    min-height: 100dvh !important;
    display: flex;
    flex-direction: column;
}
.app-modal .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    padding: .6rem .85rem !important;
}
.app-modal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .85rem !important;
}
.app-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-shrink: 0;
    padding: .5rem .85rem !important;
    flex-wrap: wrap;
    gap: .35rem;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
}
.app-modal .modal-footer .btn {
    min-height: 44px;
    font-size: .88rem;
}
.app-modal .btn-close {
    width: 2rem;
    height: 2rem;
}

.detail-grid {
    grid-template-columns: 1fr !important;
}

/* ----------------------------------------------------------
   14. DARK MODE
   ---------------------------------------------------------- */
html[data-theme="dark"] .mob-card {
    background: #1e2030;
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
html[data-theme="dark"] .mob-card__subject { color: #e0e0e6; }
html[data-theme="dark"] .mob-card__meta { color: #8892a8; }
html[data-theme="dark"] .mob-card__vehicle-brand { color: #e0e0e6; }
html[data-theme="dark"] .mob-card__vehicle-model { color: #8892a8; }
html[data-theme="dark"] .mob-card__vehicle-icon { background: rgba(255,255,255,.06); color: #8892a8; }
html[data-theme="dark"] .mob-card__cta { background: #4c6ef5; }

html[data-theme="dark"] #mobile-bottom-nav {
    background: #1a1c2e;
    border-top-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .mob-tab { color: #8892a8; }
html[data-theme="dark"] .mob-tab--active { color: #6c8cff; }
html[data-theme="dark"] .mob-filters-toggle { color: #6c8cff; }

html[data-theme="dark"] .mob-pagination__btn {
    background: #1e2030;
    border-color: rgba(255,255,255,.08);
    color: #e0e0e6;
}

html[data-theme="dark"] #licitarModal .modal-header,
html[data-theme="dark"] #licitarModal .licitar-modal-header {
    background: #1a1c2e;
    border-bottom-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] #licitarModal .mob-licitar-back {
    background: rgba(255,255,255,.08);
    color: #9db5ff;
}
html[data-theme="dark"] #licitarModal .licitar-modal-header .modal-title { color: #e0e0e6; }
html[data-theme="dark"] .mob-licitar-title { color: #e0e0e6; }
html[data-theme="dark"] .mob-vehicle-subtitle { color: #8892a8; }

html[data-theme="dark"] #licitarModal .modal-body { background: #13151f; }

html[data-theme="dark"] #licitarModal .quote-panel--licitar-vehiculo {
    background: #1e2030 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.3) !important;
}

html[data-theme="dark"] #licitarModal .quote-panel--licitar-photos {
    background: #1e2030 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

html[data-theme="dark"] #licitarModal .quote-table tbody tr,
html[data-theme="dark"] #licitarModal .quote-table tbody tr:nth-child(odd),
html[data-theme="dark"] #licitarModal .quote-table tbody tr:nth-child(even) {
    background: #1e2030 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-cell--name strong { color: #e0e0e6; }
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-cell--name { border-bottom-color: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-cell--ref,
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-cell--ref span,
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-cell--ref div,
html[data-theme="dark"] #licitarModal .quote-table tbody tr .part-item-meta,
html[data-theme="dark"] #licitarModal .quote-table tbody tr .licitar-parte-subline,
html[data-theme="dark"] #licitarModal .quote-table tbody tr .mob-licitar-field::before { color: #8892a8 !important; }
html[data-theme="dark"] #licitarModal .quote-table tbody tr input:not([type="checkbox"]),
html[data-theme="dark"] #licitarModal .quote-table tbody tr select {
    background: #161825 !important;
    border-color: rgba(255,255,255,.1) !important;
    color: #e0e0e6 !important;
}
html[data-theme="dark"] #licitarModal .quote-table tbody tr input::placeholder { color: #666; }

html[data-theme="dark"] #licitarModal .modal-footer {
    background: #1a1c2e;
    border-top-color: rgba(255,255,255,.08);
    box-shadow: 0 -2px 10px rgba(0,0,0,.4);
}
html[data-theme="dark"] #licitarModal .quote-panel--licitar-table::before { color: #e0e0e6; }
html[data-theme="dark"] #licitarModal .licitar-subsection-title { color: #e0e0e6; }
html[data-theme="dark"] #licitarModal .licitar-subsection-hint { color: #8892a8 !important; }

html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-default:not(.app-hidden),
html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-sura:not(.app-hidden) {
    background: #1e2030;
    border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-default .parts-summary-total-item,
html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-sura .parts-summary-total-item {
    color: #8892a8;
    border-bottom-color: rgba(255,255,255,.06);
}
html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-default strong,
html[data-theme="dark"] #licitarModal #licitar-repuestos-totals-sura strong { color: #e0e0e6; }

/* Gold mode card accent */
html[data-reception-active-card="gold"] .mob-card--important {
    border-left-color: #d4a017;
}

} /* END @media (max-width: 767px) */
