.dropi-dashboard-wrap {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
}

.dropi-dashboard-wrap * {
    box-sizing: border-box;
}

.dropi-dashboard-wrap button,
.dropi-dashboard-wrap input,
.dropi-dashboard-wrap select,
.dropi-dashboard-wrap textarea {
    font: inherit;
    color: inherit;
    margin: 0;
    text-transform: none;
    box-shadow: none;
}

.dropi-dashboard-wrap table {
    margin: 0;
}

.dropi-dashboard-wrap a {
    color: inherit;
    text-decoration: none;
}

.dropi-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.dropi-tab {
    background: #0f172a;
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.dropi-tab.ativo {
    background: #374151;
}

.dropi-tab:hover {
    background: #111827;
}

.dropi-dashboard {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
}

.dropi-topbar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dropi-title-main {
    font-size: 18px;
    font-weight: 700;
}

.dropi-title-sub {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.75;
}

.dropi-filtros {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dropi-filtro label {
    display: block;
    font-size: 11px;
    opacity: 0.75;
    margin-bottom: 4px;
}

.dropi-filtros input[type="date"],
.dropi-filtros input[type="number"] {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    min-width: 160px;
}

.dropi-taxa-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}

.dropi-atualizar-cotacao {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.dropi-atualizar-cotacao:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dropi-buscar {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: #1f2937;
    color: #fff;
    font-weight: 600;
}

.dropi-dashboard-wrap .dropi-buscar {
    color: #fff !important;
}

.dropi-toggle-moeda {
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}

.dropi-toggle-moeda.ativo {
    background: #111827;
    color: #fff;
}


.dropi-section {
    margin-top: 14px;
}

.dropi-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dropi-section-title {
    font-size: 14px;
    font-weight: 700;
}

.dropi-section-hint {
    font-size: 12px;
    opacity: 0.7;
}

.dropi-section-muted {
    opacity: 0.75;
}

.dropi-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px;
}

@media (max-width: 1100px) {
    .dropi-cards {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}
@media (max-width: 560px) {
    .dropi-cards {
        grid-template-columns: 1fr;
    }
}

.dropi-card {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.dropi-card-title {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 6px;
}

.dropi-card-value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.dropi-card-sub {
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.7;
}

.dropi-loading,
.dropi-error {
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #ccc;
}

.dropi-error {
    border-color: #ef4444;
}

.dropi-card-primary { border-left: 5px solid #111827; }
.dropi-card-success { border-left: 5px solid #10b981; }
.dropi-card-warning { border-left: 5px solid #f59e0b; }
.dropi-card-danger  { border-left: 5px solid #ef4444; }
.dropi-card-info    { border-left: 5px solid #3b82f6; }


/* =========================
   TABELA TRANSPORTADORAS
========================= */

.dropi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dropi-table th,
.dropi-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}





.dropi-table th {
    background: #f9fafb;
    font-weight: 700;
    font-size: 12px;
}

.dropi-table-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.dropi-table-wrap table {
    margin: 0;
}

.dropi-table-pedidos {
    border-collapse: separate;
    border-spacing: 0;
}

.dropi-table-pedidos thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.dropi-finalizados-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.dropi-finalizados-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .dropi-finalizados-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   COLUNAS FINANCEIRAS (TOTAL / FRETE / A RECEBER)
================================ */
.dropi-table-pedidos .col-financeira {
    min-width: 100px;
    white-space: nowrap;   /* R$ + valor na mesma linha */
    text-align: right;
}

/* REAL ativo → valores maiores */
.dropi-dashboard:has(.dropi-toggle-moeda.ativo)
.dropi-table-pedidos .col-financeira {
    min-width: 100px;
}


.dropi-table td.name {
    text-align: left;
    font-weight: 600;
}

.dropi-table td.rank {
    font-weight: 800;
}

.dropi-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.dropi-badge-neutral { background: #64748b; }
.dropi-badge-success { background: #10b981; }
.dropi-badge-warning { background: #f59e0b; }
.dropi-badge-danger  { background: #ef4444; }

.dropi-pedidos-count {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.dropi-pedidos-count .dropi-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.dropi-btn-detalhe {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.dropi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropi-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    padding: 14px;
}

.dropi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dropi-modal-body {
    font-size: 13px;
    line-height: 1.4;
}

.dropi-modal-close {
    border: 0;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
}


.dropi-empty {
    padding: 12px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    font-size: 13px;
    opacity: 0.7;
}


.dropi-painel pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}
