/* ===================================================================
   MODAL DE VISUALIZAÇÃO DE COMANDA - ESTILO PREMIUM (Extracted from Atendimento)
   =================================================================== */

#visualizarComandaModal .modal-dialog {
    max-width: 900px;
}

#visualizarComandaModal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#visualizarComandaModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, var(--primary-dark, #ea580c) 100%);
    color: white;
    padding: 24px 32px;
    border: none;
    position: relative;
    overflow: hidden;
}

#visualizarComandaModal .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

#visualizarComandaModal .modal-title {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

#visualizarComandaModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
    position: relative;
    z-index: 1;
}

#visualizarComandaModal .modal-body {
    padding: 32px;
    background: var(--theme-card-bg, #fff);
}

#visualizarComandaModal .modal-footer {
    padding: 20px 32px;
    border-top: 2px solid var(--theme-border-color, #e5e7eb);
    background: var(--theme-bg-secondary, #f9fafb);
}

/* Seção de Informações da Comanda */
.comanda-info-section {
    background: linear-gradient(135deg,
            rgba(var(--primary-r, 59), var(--primary-g, 130), var(--primary-b, 246), 0.08) 0%,
            rgba(var(--primary-r, 59), var(--primary-g, 130), var(--primary-b, 246), 0.15) 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--primary-color, #3b82f6);
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(var(--primary-r, 59), var(--primary-g, 130), var(--primary-b, 246), 0.1);
}

.comanda-info-section h6 {
    font-weight: 700;
    color: var(--theme-text-color, #1f2937);
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comanda-info-section h6 i {
    color: var(--primary-color, #3b82f6);
    font-size: 1.2rem;
}

.comanda-info-table {
    width: 100%;
    margin-bottom: 0;
}

.comanda-info-table td {
    padding: 10px 0;
    border: none;
    color: var(--theme-text-muted, #6b7280);
}

.comanda-info-table td:first-child {
    font-weight: 600;
    width: 140px;
}

.comanda-info-table td:last-child {
    color: var(--theme-text-color, #1f2937);
}

/* Cards de Conteúdo */
.comanda-content-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid var(--theme-border-color, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.comanda-content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.comanda-content-card h6 {
    font-weight: 700;
    color: var(--theme-text-color, #1f2937);
    margin-bottom: 16px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comanda-content-card h6 i {
    color: var(--primary-color, #3b82f6);
    font-size: 1.15rem;
}

.comanda-content-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comanda-content-card ul li {
    padding: 12px 16px;
    background: var(--theme-bg-secondary, #f9fafb);
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color, #3b82f6);
    transition: all 0.2s ease;
}

.comanda-content-card ul li:hover {
    background: rgba(var(--primary-r, 59), var(--primary-g, 130), var(--primary-b, 246), 0.1);
    transform: translateX(4px);
    border-left-width: 6px;
}

.comanda-content-card ul li:last-child {
    margin-bottom: 0;
}

/* Resumo Financeiro */
.resumo-financeiro-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #6ee7b7;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.resumo-financeiro-card h6 {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resumo-financeiro-card h6 i {
    color: #10b981;
    font-size: 1.2rem;
}

.resumo-financeiro-card table {
    width: 100%;
    margin-bottom: 0;
}

.resumo-financeiro-card table tr {
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.resumo-financeiro-card table tr:last-child {
    border-bottom: none;
}

.resumo-financeiro-card table td {
    padding: 12px 8px;
    color: #065f46;
}

.resumo-financeiro-card table td:last-child {
    text-align: right;
}

.resumo-financeiro-card .table-active {
    background: rgba(16, 185, 129, 0.1) !important;
}

.resumo-financeiro-card .table-active td {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    font-size: 1.1rem;
}

.resumo-financeiro-card .text-danger {
    color: #dc2626 !important;
}

.resumo-financeiro-card .text-success {
    color: #059669 !important;
}

/* Pagamentos Card */
.pagamentos-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.pagamentos-card h6 {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagamentos-card h6 i {
    color: #3b82f6;
    font-size: 1.2rem;
}

.pagamentos-card ul li {
    background: rgba(255, 255, 255, 0.7);
    border-left-color: #3b82f6;
}

/* Produtos Adicionais Card */
.produtos-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.produtos-card h6 {
    font-weight: 700;
    color: var(--theme-text-color, #1f2937);
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.produtos-card h6 i {
    color: #f59e0b;
    font-size: 1.2rem;
}

.produtos-card ul li {
    background: rgba(255, 255, 255, 0.7);
    border-left-color: #f59e0b;
}

/* Helpers */
.badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px solid #7dd3fc;
    border-radius: 12px;
    color: #075985;
    padding: 16px 20px;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comanda-info-section,
.comanda-content-card,
.resumo-financeiro-card,
.pagamentos-card,
.produtos-card {
    animation: fadeInUp 0.4s ease-out;
}

.comanda-info-section {
    animation-delay: 0.1s;
}

.comanda-content-card:nth-child(2) {
    animation-delay: 0.2s;
}

.comanda-content-card:nth-child(3) {
    animation-delay: 0.3s;
}