/* ===============================================
   UTILITIES ADICIONAIS PARA RESPONSIVIDADE
   FreteSeguro - Arquivo complementar ao site.css
   =============================================== */

/* Text utilities responsivos */
@media (max-width: 575.98px) {
    .fs-1 { font-size: 1.75rem !important; }
    .fs-2 { font-size: 1.5rem !important; }
    .fs-3 { font-size: 1.25rem !important; }
    
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
}

/* Spacing utilities responsivos */
.p-responsive {
    padding: 2rem;
}

@media (max-width: 767.98px) {
    .p-responsive {
        padding: 1rem;
    }
}

/* Card melhorias para texto não quebrar */
.text-nowrap-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Financial items */
.financial-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.financial-item:last-child {
    border-bottom: none;
}

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

.btn-icon i {
    margin: 0 !important;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Timeline (para histórico de operações) */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 3px var(--border);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.success { background: var(--accent-green); }
.status-dot.warning { background: var(--accent-yellow); }
.status-dot.danger { background: var(--accent-red); }
.status-dot.info { background: var(--accent); }

/* Dark mode adjustments para novos elementos */
[data-theme="dark"] .financial-item {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline::before {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .timeline-item::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Smooth transitions para elementos interativos */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-shadow {
    transition: box-shadow 0.2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Grid auto-responsive */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .auto-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Melhorias para forms responsivos */
@media (max-width: 767.98px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Print styles */
@media print {
    .app-sidebar,
    .app-topbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .app-content {
        margin-left: 0 !important;
    }
    
    .app-main {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===================================================================
   LIST CARDS - Cards modernos para substituir tabelas
   =================================================================== */

.list-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.list-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15, 60, 115, 0.1) 0%, rgba(91, 209, 255, 0.05) 100%);
    color: var(--primary);
}

.list-card-body {
    flex: 1;
    min-width: 0;
}

.list-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.list-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.list-card-meta-item i {
    color: var(--text-muted);
}

.list-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Empty state para cards */
.list-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.list-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.list-empty-state h4 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.list-empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Search and filter bar */
.filter-bar {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-input {
    padding-left: 3rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    height: 48px;
    font-size: 0.95rem;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 60, 115, 0.1);
}

.filter-select {
    border-radius: 10px;
    border: 1px solid var(--border);
    height: 48px;
    font-size: 0.95rem;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 60, 115, 0.1);
}

/* Responsive cards */
@media (max-width: 767.98px) {
    .list-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    
    .list-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .list-card-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .list-card-actions .btn {
        flex: 1;
    }
}

/* Variants de cores para icons */
.list-card-icon.primary {
    background: linear-gradient(135deg, rgba(15, 60, 115, 0.15) 0%, rgba(29, 96, 179, 0.1) 100%);
    color: var(--primary);
}

.list-card-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--accent-green);
}

.list-card-icon.warning {
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.15) 0%, rgba(245, 197, 66, 0.05) 100%);
    color: var(--accent-yellow);
}

.list-card-icon.info {
    background: linear-gradient(135deg, rgba(91, 209, 255, 0.15) 0%, rgba(91, 209, 255, 0.05) 100%);
    color: var(--accent);
}
