/* ===== CARDS DE MOTOS INDIVIDUAIS - LISTAGEM VISUAL ===== */

/* CSS Custom Properties para Cards de Motos */
:root {
    /* Cores dos Cards de Moto */
    --card-moto-bg: #ffffff;
    --card-moto-border: #e2e8f0;
    --card-moto-hover: #f8fafc;
    --card-moto-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --card-moto-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Dimensões */
    --card-moto-border-radius: 16px;
    --card-moto-padding: 20px;
    --card-moto-image-height: 200px;
}

/* Container da Listagem de Motos */
.motos-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Card Individual de Moto */
.card-moto-modern {
    background: var(--card-moto-bg);
    border: 2px solid var(--card-moto-border);
    border-radius: var(--card-moto-border-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--card-moto-shadow);
    position: relative;
}

.card-moto-modern:hover,
.card-moto-modern.hovered {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--card-moto-shadow-hover);
    border-color: #3b82f6;
}

.card-moto-modern:active,
.card-moto-modern.clicked {
    transform: translateY(-4px) scale(1.01);
}

/* Header do Card (Imagem e Status) */
.card-moto-header {
    position: relative;
    height: var(--card-moto-image-height);
    overflow: hidden;
}

.card-moto-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-moto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.card-moto-modern:hover .card-moto-image img {
    transform: scale(1.1);
}

/* Placeholder para Motos sem Foto */
.card-moto-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.card-moto-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    color: #94a3b8;
}

/* Overlay com Botões de Ação */
.card-moto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.card-moto-modern:hover .card-moto-overlay {
    opacity: 1;
}

.card-moto-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #374151;
}

.card-moto-btn:hover {
    background: white;
    transform: scale(1.1);
}

.card-moto-btn.view {
    color: #3b82f6;
}

.card-moto-btn.edit {
    color: #059669;
}

/* Badge de Status */
.card-moto-status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-badge-modern.disponivel {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.status-badge-modern.alugada {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.status-badge-modern.manutencao {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.status-badge-modern.vendida {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

/* Conteúdo do Card */
.card-moto-content {
    padding: var(--card-moto-padding);
}

/* Título e Subtítulo */
.card-moto-title {
    margin-bottom: 16px;
}

.card-moto-title h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.card-moto-subtitle {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

/* Grid de Informações */
.card-moto-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.card-moto-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-moto-info-item .label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-moto-info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.card-moto-info-item .value.currency {
    color: #059669;
}

/* Alerta de Próxima Revisão */
.card-moto-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-moto-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.card-moto-alert.overdue {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.card-moto-alert i {
    font-size: 14px;
}

/* Informações de Locação Ativa */
.card-moto-locacao {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.locacao-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locacao-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.locacao-cliente {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.locacao-vencimento {
    font-size: 12px;
    color: #3730a3;
    font-weight: 500;
}

/* Footer com Ações */
.card-moto-footer {
    padding: 0 var(--card-moto-padding) var(--card-moto-padding);
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
    padding-top: 16px;
}

.card-moto-actions {
    display: flex;
    gap: 8px;
}

.btn-card-action {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-card-action.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-card-action.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-card-action.secondary {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #e2e8f0;
}

.btn-card-action.secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Tooltip Personalizado */
.card-moto-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 12px;
    max-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.card-moto-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.card-moto-tooltip.bottom::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1f2937;
}

.card-moto-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.tooltip-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.tooltip-value {
    font-weight: 600;
    text-align: right;
}

/* Responsividade */
@media (max-width: 768px) {
    .motos-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .card-moto-modern {
        --card-moto-padding: 16px;
        --card-moto-image-height: 160px;
    }
    
    .card-moto-info {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .card-moto-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .motos-grid-container {
        grid-template-columns: 1fr;
    }
    
    .card-moto-modern {
        --card-moto-image-height: 140px;
    }
}

/* Animações */
@keyframes cardMotoAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-moto-modern {
    animation: cardMotoAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Estados de Loading */
.card-moto-modern.loading {
    pointer-events: none;
    opacity: 0.7;
}

.card-moto-modern.loading .card-moto-content {
    position: relative;
}

.card-moto-modern.loading .card-moto-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modo Compacto (Opcional) */
.motos-grid-container.compact .card-moto-modern {
    --card-moto-image-height: 120px;
    --card-moto-padding: 12px;
}

.motos-grid-container.compact .card-moto-title h3 {
    font-size: 16px;
}

.motos-grid-container.compact .card-moto-info {
    margin-bottom: 12px;
}