/* Estilos compartilhados para páginas do Panthera Web */

/* Container principal */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #FBFBFB;
}

/* Header das páginas */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #455A64;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #FFFFFF;
}

/* Botões com ícone */
.btn-icon {
    background: #FBFBFB;
    border: none;
    color: #000000;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-icon:hover {
    background: #EFEFEF;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-filter {
    background: #27ae60;
}

.btn-filter:hover {
    background: #229954;
}

/* Conteúdo da página */
.page-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .page-header {
        padding: 0.75rem;
    }

    .page-header h2 {
        font-size: 1.2rem;
    }

    .header-left {
        gap: 0.5rem;
    }

    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .page-content {
        padding: 0.5rem;
    }

    /* Containers full width em mobile */
    .form-container,
    .estoque-info,
    .search-box,
    .produtos-grid,
    .pessoas-grid,
    .marcas-grid {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Remove bordas e sombras em mobile */
    .form-container {
        border-radius: 0;
        box-shadow: none;
    }
}

/* iPhone 11 e similares (375px) */
@media (max-width: 375px) {
    .page-header {
        padding: 0.5rem;
    }

    .page-header h2 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .page-content {
        padding: 0.25rem;
    }

    /* Cards compactos */
    .produto-card,
    .pessoa-card,
    .marca-card,
    .deposito-card,
    .cliente-card {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Texto menor em cards */
    .produto-card h4,
    .pessoa-card h4,
    .marca-card h4 {
        font-size: 0.95rem !important;
    }

    .produto-info p,
    .pessoa-info p {
        font-size: 0.85rem !important;
    }

    /* Badges menores */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    /* Search box compacta */
    .search-box {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .search-box input {
        font-size: 0.9rem !important;
    }

    /* Botões menores */
    .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
    }

    /* Grid 1 coluna */
    .produtos-grid,
    .pessoas-grid,
    .marcas-grid,
    .depositos-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    /* Formulários compactos */
    .form-group {
        margin-bottom: 0.75rem !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
    }

    .form-control {
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-header h2 {
        font-size: 1.4rem;
    }
}

/* Estilos específicos para página EntradaDfe */
.filtros-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Camera overlay e container */
.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.camera-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .camera-header h3 {
        margin: 0;
        color: #2c3e50;
    }

.camera-body {
    text-align: center;
}

    .camera-body p {
        margin: 1rem 0;
        color: #666;
    }

#videoPreview {
    width: 100%;
    max-width: 480px;
    height: auto;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: #000;
    position: relative;
}

.barcode-scan-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(255, 0, 0, 0) 0%, 
        rgba(255, 0, 0, 1) 20%, 
        rgba(255, 0, 0, 1) 80%, 
        rgba(255, 0, 0, 0) 100%);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    pointer-events: none;
    z-index: 10;
}

.video-container {
    position: relative;
    display: inline-block;
    max-width: 480px;
    margin: 0 auto;
}

    .video-container::before {
        content: "Alinhe o código de barras com a linha vermelha";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        font-size: 0.85rem;
        z-index: 11;
        white-space: nowrap;
    }

.camera-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.camera-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 500;
}

.barcode-manual {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
}

    .barcode-manual h5 {
        margin-bottom: 1rem;
        color: #2c3e50;
    }

    .barcode-manual input {
        text-align: center;
        letter-spacing: 2px;
    }

.dfes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.dfe-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dfe-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-color: #3498db;
}

.dfe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.dfe-info-principal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dfe-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================= */
/* CARDS PADRONIZADOS - LISTAGENS */
/* ============================= */

/* Grid compartilhado para todas as listagens */
.produtos-grid,
.pessoas-grid,
.marcas-grid,
.depositos-grid,
.cidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Mobile: 1 coluna */
@media (max-width: 576px) {
    .produtos-grid,
    .pessoas-grid,
    .marcas-grid,
    .depositos-grid,
    .cidades-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet: 2 colunas */
@media (min-width: 577px) and (max-width: 992px) {
    .produtos-grid,
    .pessoas-grid,
    .marcas-grid,
    .depositos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Estilo base dos cards */
.produto-card,
.pessoa-card,
.marca-card,
.deposito-card,
.cidade-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.produto-card:hover,
.pessoa-card:hover,
.marca-card:hover,
.deposito-card:hover,
.cidade-card:hover{
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Header dos cards */
.produto-header,
.pessoa-header,
.marca-header,
.deposito-header,
.cidade-header{
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

    .produto-header h4,
    .pessoa-header h4,
    .marca-header h4,
    .deposito-header h4,
    .cidade-header h4 {
        margin: 0;
        color: #2c3e50;
        font-size: 1.1rem;
        flex: 1;
        margin-right: 0.5rem;
        word-break: break-word;
    }

/* Content clicável dos cards */
.produto-content,
.pessoa-content,
.marca-content,
.deposito-content,
.cidade-content{
    cursor: pointer;
    flex: 1;
}

/* Info dentro dos cards */
.produto-info,
.pessoa-info,
.marca-info,
.deposito-info,
.cidade-info{
    margin-bottom: 0.75rem;
}

.produto-info p,
.pessoa-info p,
.marca-info p,
.deposito-info p,
.cidade-info p{
    margin: 0.25rem 0;
    color: #555;
    font-size: 0.9rem;
}

.produto-info i,
.pessoa-info i,
.marca-info i,
.deposito-info i,
.cidade-info i{
    width: 20px;
    color: #7f8c8d;
    margin-right: 0.25rem;
}

/* Footer dos cards */
.produto-footer,
.pessoa-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* Status nos cards */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.ativo {
    background: #d4edda;
    color: #155724;
}

.status.inativo {
    background: #f8d7da;
    color: #721c24;
}

/* Badges nos cards */
.badge-primary {
    background-color: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-error {
    background-color: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-standby {
    background-color: #764ba2;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-transporte {
    background-color: #000000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Card especial para produtos já contados */
.produto-card.ja-contado {
    background-color: #d4edda;
    border-color: #28a745;
}

/* ============================= */
/* FIM DOS CARDS PADRONIZADOS */
/* ============================= */

/* ============================= */
/* COMBOS E DROPDOWNS - SEARCH SELECT */
/* ============================= */

.search-select-container {
    position: relative;
    width: 100%;
}

.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 999;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #3498db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: -1px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-item i {
    color: #3498db;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item span {
    flex: 1;
    color: #2c3e50;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #e3f2fd 0%, #f5f5f5 100%);
    padding-left: 1.25rem;
    font-weight: 500;
}

.dropdown-item:hover i {
    color: #2980b9;
    transform: scale(1.1);
}

.dropdown-item:active {
    background: #bbdefb;
}

/* Item selecionado */
.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: slideIn 0.3s ease-out;
}

.selected-item i:first-child {
    font-size: 1.1rem;
    color: white;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selected-item span {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: #f0f4ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-remove {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-remove:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.btn-remove:active {
    transform: scale(0.95);
}

/* Melhorias no input quando há dropdown */
.search-select-container input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    border-radius: 8px 8px 0 0;
}

/* Scrollbar customizada para dropdowns */
.dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Estilo para quando não há resultados */
.dropdown-list:empty::after {
    content: 'Nenhum resultado encontrado';
    display: block;
    padding: 1rem;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsividade Mobile */
@media (max-width: 576px) {
    .dropdown-list {
        max-height: 200px;
        font-size: 0.9rem;
    }

    .dropdown-item {
        padding: 0.6rem 0.8rem;
    }

    .selected-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .btn-remove {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

/* ============================= */
/* FIM COMBOS E DROPDOWNS */
/* ============================= */

/* ============================= */
/* CRM CARDS - LISTAGEM */
/* ============================= */

.crms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.crm-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Header do card */
.crm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.crm-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-title h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.crm-title .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 500;
}

.crm-title .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

.crm-title .badge.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

.crm-title .badge.bg-success {
    background-color: #28a745 !important;
    color: white;
}

.crm-title .badge.bg-danger {
    background-color: #dc3545 !important;
    color: white;
}

.crm-actions {
    display: flex;
    gap: 0.5rem;
}

.crm-actions .btn {
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.crm-actions .btn:hover {
    transform: scale(1.05);
}

.crm-actions .btn-info {
    background: #17a2b8;
    color: white;
}

.crm-actions .btn-warning {
    background: #ffc107;
    color: #000;
}

.crm-actions .btn-danger {
    background: #dc3545;
    color: white;
}

/* Content do card */
.crm-content {
    padding: 1rem;
    cursor: pointer;
}

.crm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-item i {
    color: #3498db;
    font-size: 1rem;
    margin-top: 0.25rem;
    width: 20px;
    text-align: center;
}

.info-item div {
    flex: 1;
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.info-item span {
    display: block;
    color: #2c3e50;
    font-size: 0.95rem;
}

/* Info blocks */
.info-block {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.info-block i {
    color: #3498db;
    font-size: 1.1rem;
    margin-top: 0.25rem;
    width: 24px;
    text-align: center;
}

.info-block div {
    flex: 1;
}

.info-block label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.info-block span {
    display: block;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
}

.info-block.description {
    background: #e8f4f8;
    border-left: 3px solid #3498db;
}

.info-block.description span {
    font-style: italic;
    color: #34495e;
}

/* Footer do card */
.crm-footer {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge-resultado {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-resultado.sucesso {
    background: #d4edda;
    color: #155724;
}

.badge-resultado.sem-sucesso {
    background: #f8d7da;
    color: #721c24;
}

.badge-resultado i {
    font-size: 1rem;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .crm-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .crm-title {
        width: 100%;
    }

    .crm-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .crm-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .info-block {
        padding: 0.6rem;
    }
}

@media (max-width: 576px) {
    .crm-card {
        border-radius: 6px;
    }

    .crm-header {
        padding: 0.75rem;
    }

    .crm-title h4 {
        font-size: 1rem;
    }

    .crm-content {
        padding: 0.75rem;
    }

    .crm-actions .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }

    .info-item,
    .info-block {
        font-size: 0.9rem;
    }
}

/* ============================= */
/* FIM CRM CARDS */
/* ============================= */

/* ============================= */
/* OBRA CARDS - LISTAGEM */
/* ============================= */

.obras-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.obra-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.obra-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Header do card */
.obra-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.obra-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.obra-title h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.obra-title .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 500;
}

.obra-actions {
    display: flex;
    gap: 0.5rem;
}

.obra-actions .btn {
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.obra-actions .btn:hover {
    transform: scale(1.05);
}

.obra-actions .btn-info {
    background: #17a2b8;
    color: white;
}

.obra-actions .btn-warning {
    background: #ffc107;
    color: #000;
}

.obra-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.obra-actions .btn-success {
    background: #28a745;
    color: white;
}

/* Content do card */
.obra-content {
    padding: 1rem;
    cursor: pointer;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .obra-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .obra-title {
        width: 100%;
    }

    .obra-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .obra-card {
        border-radius: 6px;
    }

    .obra-header {
        padding: 0.75rem;
    }

    .obra-title h4 {
        font-size: 1rem;
    }

    .obra-content {
        padding: 0.75rem;
    }

    .obra-actions .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* ============================= */
/* FIM OBRA CARDS */
/* ============================= */

.info-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.info-item label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.info-item span {
    color: #333;
}

.info-item.full-width {
    flex: 1 1 100%;
}

/* Modal para seleção de pessoas */
.pessoas-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pessoa-item {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pessoa-item:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.pessoa-nome {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pessoa-cnpj {
    font-size: 0.9rem;
    color: #666;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0.5rem 0;
}

/* Badges específicos */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.bg-info {
    background-color: #3498db;
    color: white;
}

.bg-secondary {
    background-color: #95a5a6;
    color: white;
}

/* Responsividade para EntradaDfe */
@media (max-width: 768px) {
    .filtros-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .dfe-card {
        padding: 0.75rem;
    }

    .dfe-info-principal {
        gap: 0.5rem;
    }

    .info-row {
        gap: 0.5rem;
    }

    .info-item {
        flex: 1 1 100%;
    }

    .info-item label {
        font-size: 0.85rem;
    }

    .info-item span {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Camera responsiva */
    .camera-container {
        padding: 1rem;
        max-width: 100%;
    }

    .video-container {
        max-width: 100%;
    }

    #videoPreview {
        max-width: 100%;
    }

    .barcode-scan-line {
        max-width: 90%;
    }

    .camera-header h3 {
        font-size: 1rem;
    }

    .camera-header .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .barcode-manual input {
        font-size: 0.9rem;
    }

    .video-container::before {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        white-space: normal;
        max-width: 90%;
        text-align: center;
    }
}

@media (max-width: 375px) {
    .filtros-section {
        padding: 0.75rem;
    }

    .dfe-card {
        padding: 0.5rem;
    }

    .dfe-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .info-item label {
        font-size: 0.8rem;
    }

    .info-item span {
        font-size: 0.8rem;
    }
}
