/* ========================================================================= */
/* 🚀 DESIGN SYSTEM ULTRA PREMIUM: LABORATÓRIO (POINT TELECOM)               */
/* ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-app: #F3F4F6;
    --surface: #FFFFFF;
    --point-dark: #0B1121;
    --point-blue: #111827;
    --point-blue-light: #1F2937;
    --point-orange: #FF6B00;
    --point-orange-hover: #E66000;
    --point-orange-glow: rgba(255, 107, 0, 0.15);
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-light: #E5E7EB;
}

#rma {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* --- 1. HERO HEADER (Efeito Premium com Profundidade) --- */
.rma-header {
    background: linear-gradient(135deg, var(--point-dark) 0%, var(--point-blue-light) 100%);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.rma-header::before {
    content: '';
    position: absolute;
    right: -10%; top: -50%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, transparent 70%);
    filter: blur(40px);
}
.rma-header h2 { font-weight: 800; letter-spacing: -1px; font-size: 2rem; }
.rma-header .status-badge {
    background: rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.4);
    color: #FFB380;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

/* --- 2. CARDS DO DASHBOARD (Estilo SaaS Flutuante) --- */
.rma-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
}
.rma-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px;
    background: transparent; transition: all 0.3s;
}
.rma-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: #D1D5DB;
}
.rma-card.active {
    border-color: var(--point-orange);
    box-shadow: 0 0 0 4px var(--point-orange-glow);
}
.rma-card.active::after { background: var(--point-orange); }

.card-content-wrapper {
    display: flex; justify-content: space-between; align-items: flex-start;
}
.card-number {
    font-size: 2.2rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 0.5rem;
}
.card-label {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; transition: transform 0.3s;
}
.rma-card:hover .card-icon { transform: scale(1.1) rotate(5deg); }

/* Cores específicas dos ícones */
.icon-pending { background: #E0F2FE; color: #0284C7; }
.icon-processing { background: #FEF3C7; color: #D97706; }
.icon-warranty { background: #DCFCE7; color: #16A34A; }
.icon-parts { background: #FEE2E2; color: #DC2626; }
.rma-card.active .icon-pending, .rma-card.active .icon-processing, 
.rma-card.active .icon-warranty, .rma-card.active .icon-parts {
    background: var(--point-orange); color: white;
}

/* --- 3. MENU DE ABAS (Segmented Apple Style) --- */
.nav-pills-custom {
    background: #E5E7EB;
    padding: 6px;
    border-radius: 16px;
    display: inline-flex;
    gap: 4px;
    margin-bottom: 2rem;
}
.nav-pills-custom .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: none;
}
.nav-pills-custom .nav-link:hover:not(.active) { color: var(--text-main); }
.nav-pills-custom .nav-link.active {
    background: var(--surface);
    color: var(--point-blue);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

/* --- 4. ÁREA DA TABELA (Floating Rows Premium) --- */
.table-header-panel {
    background: var(--surface);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.table-custom-lab {
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
}
.table-custom-lab thead th {
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 1.5rem 0.5rem 1.5rem;
}
.table-custom-lab tbody tr {
    background: var(--surface);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border-radius: 16px;
    transition: all 0.2s ease;
}
.table-custom-lab tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.table-custom-lab tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 500;
}
.table-custom-lab tbody td:first-child {
    border-left: 1px solid var(--border-light);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    font-weight: 700;
}
.table-custom-lab tbody td:last-child {
    border-right: 1px solid var(--border-light);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Badges e Botões da Tabela */
.badge-custom {
    padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.3px;
}
.btn-action-premium {
    background: var(--point-orange); color: white; border-radius: 10px; font-weight: 600;
    padding: 8px 16px; transition: all 0.2s; border: none; box-shadow: 0 4px 6px rgba(255, 107, 0, 0.2);
}
.btn-action-premium:hover {
    background: var(--point-orange-hover); color: white; transform: translateY(-1px); box-shadow: 0 6px 10px rgba(255, 107, 0, 0.3);
}
.btn-secondary-premium {
    background: #F3F4F6; color: var(--text-main); border-radius: 10px; font-weight: 600;
    padding: 8px 16px; transition: all 0.2s; border: 1px solid #E5E7EB;
}
.btn-secondary-premium:hover { background: #E5E7EB; }

/* Search Input Estilo Mac */
.search-widget {
    background: var(--bg-app);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 4px;
    display: flex; align-items: center;
    width: 300px;
}
.search-widget input {
    border: none; background: transparent; padding: 8px 12px; width: 100%; font-size: 0.85rem; outline: none;
}
.search-widget i { color: var(--text-muted); padding-left: 12px; }
.search-widget:focus-within { border-color: var(--point-orange); box-shadow: 0 0 0 3px var(--point-orange-glow); }

/* --- 5. WIZARD E MODAIS (Triagem e Bancada) --- */
.wizard-step { 
    display: none; 
    animation: slideFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}
.wizard-step.active { 
    display: block; 
}

/* Caixa de Upload de Fotos Premium */
.photo-box {
    border: 2px dashed var(--border-light); 
    border-radius: 16px; 
    background: var(--bg-app); 
    cursor: pointer;
    height: 140px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-muted);
}
.photo-box:hover { 
    border-color: var(--point-orange); 
    background: var(--surface);
    color: var(--point-orange);
    box-shadow: 0 10px 15px -3px var(--point-orange-glow);
    transform: translateY(-2px);
}
.photo-box i {
    transition: transform 0.3s ease;
}
.photo-box:hover i {
    transform: scale(1.1);
}

/* Animação de entrada dos passos */
@keyframes slideFadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* Correção do Botão "X" de Fechar Modais */
.modal-content {
    overflow: visible !important;
}
.modal-header .btn-close, 
.modal-content > .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 9999;
    background-color: #F8FAFC;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    opacity: 1;
    transition: all 0.2s;
}
.modal-header .btn-close:hover,
.modal-content > .btn-close:hover {
    background-color: var(--point-orange);
    filter: invert(1); /* Deixa o X branco */
    transform: scale(1.1);
}