/* Oportunidades Premium Design System (Individual) */
:root {
    --samsung-blue: #003B91;
    --samsung-navy: #0a1c2b;
    --accent-blue: #0074E4;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
}

@font-face {
    font-family: 'SamsungSharpSans';
    src: url('fonts/SamsungSharpSans-Regular.otf') format('opentype');
    font-weight: normal;
}
@font-face {
    font-family: 'SamsungSharpSans';
    src: url('fonts/SamsungSharpSans-Bold.otf') format('opentype');
    font-weight: bold;
}

body.oportunidades-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    color: #1d1d1f;
    font-family: 'SamsungSharpSans', 'Inter', sans-serif !important;
}

.glass-panel, .glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .fw-bold {
    font-family: 'SamsungSharpSans', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.text-navy { color: var(--samsung-navy); }
.text-primary { color: var(--samsung-blue) !important; }

/* Form Controls Premium */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e1e1e1;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 116, 228, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
#rowCamposDinamicos .form-label { 
    height: 18px; 
    margin-bottom: 0.4rem !important; 
    display: flex; 
    align-items: center; 
}
#rowCamposDinamicos .form-select, 
#rowCamposDinamicos .form-control {
    height: 45px !important;
}

/* Premium Buttons */
.btn-primary {
    background-color: var(--samsung-blue);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}
.btn-primary:hover { background-color: var(--samsung-navy); transform: scale(1.02); }

.oportunidades-page .product-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

/* Admin Specific Buttons & Inputs */
.oportunidades-page .btn-glass-secondary {
    background: #ffffff;
    color: var(--samsung-blue);
    border: 1px solid #d1d1d1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.oportunidades-page .btn-glass-secondary:hover {
    background: #f8f9fa;
    border-color: #bbbbbb;
    color: var(--samsung-navy);
}

.oportunidades-page .btn-glass-success {
    background: #28a745;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}
.oportunidades-page .btn-glass-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.oportunidades-page .btn-glass-danger {
    background: #ffffff;
    color: #dc3545;
    border: 1px solid #dc3545;
}
.oportunidades-page .btn-glass-danger:hover {
    background: #dc3545;
    color: white;
}


.oportunidades-page .bg-glass-input {
    background: #ffffff !important;
    border: 1px solid #e1e1e1 !important;
    color: #1d1d1f !important;
    border-radius: 10px;
}
.oportunidades-page .bg-glass-input:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 116, 228, 0.1) !important;
    outline: none !important;
}

/* DataTables & Table Premium Styles */
.oportunidades-page .table-premium thead th {
    background: #f8f9fa !important;
    color: var(--samsung-blue) !important;
    border-bottom: 2px solid #eef0f2;
    font-weight: 700;
}

.oportunidades-page .table-premium, 
.oportunidades-page .table-premium tr, 
.oportunidades-page .table-premium td {
    background-color: #ffffff !important;
}

.oportunidades-page .table-premium tbody tr {
    transition: all 0.2s;
    border-bottom: 1px solid #e9ecef !important;
}

.oportunidades-page .table-premium tbody tr:hover {
    background: #f1f4f9 !important;
}

.oportunidades-page .table-premium td {
    color: #333 !important;
    border: none;
    padding: 0.5rem 0.4rem !important; 
    vertical-align: middle;
    white-space: normal !important; /* Force wrap */
    word-break: break-word;
}

.oportunidades-page .table-premium th {
    white-space: nowrap;
    padding: 0.75rem 0.4rem !important;
}

/* Specific Column Widths to prevent horizontal overflow */
.oportunidades-page .table-premium td:nth-child(2) { width: 90px; }  /* Data */
.oportunidades-page .table-premium td:nth-child(3) { width: 140px; } /* Promotor */
.oportunidades-page .table-premium td:nth-child(4) { width: 140px; } /* Cliente */
.oportunidades-page .table-premium td:nth-child(5) { width: 160px; } /* CNPJ/Razao */
.oportunidades-page .table-premium td:nth-child(6) { width: 160px; } /* Contato */
.oportunidades-page .table-premium td:nth-child(7) { width: 60px; }  /* Itens */
.oportunidades-page .table-premium td:nth-child(8) { width: 120px; } /* Valores */
.oportunidades-page .table-premium td:nth-child(9) { width: 80px; }  /* Tipo */
.oportunidades-page .table-premium td:nth-child(10) { width: 90px; } /* Previsao */
.oportunidades-page .table-premium td:nth-child(11) { width: 160px; } /* Status */


/* Fix for expanded detail table background */
.oportunidades-page .table-premium tr.expanded-detail,
.oportunidades-page .table-premium tr.expanded-detail td,
.oportunidades-page .table-premium .detail-table,
.oportunidades-page .table-premium .detail-table tr,
.oportunidades-page .table-premium .detail-table td {
    background: #fafafa !important;
    color: #666;
}

.oportunidades-page .dataTables_wrapper {
    padding: 20px;
    color: var(--text-secondary) !important;
}

.oportunidades-page .dataTables_wrapper .dataTables_length,
.oportunidades-page .dataTables_wrapper .dataTables_filter,
.oportunidades-page .dataTables_wrapper .dataTables_info,
.oportunidades-page .dataTables_wrapper .dataTables_processing,
.oportunidades-page .dataTables_wrapper .dataTables_paginate {
    font-size: 0.8rem;
    margin-top: 10px;
}

.oportunidades-page .table-premium tbody tr {
    transition: all 0.2s;
    border-bottom: 1.5px solid #dee2e6 !important; /* Made more visible */
}

.oportunidades-page .dataTables_wrapper .dataTables_filter input {
    background: #ffffff !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 8px;
    color: #2d3748 !important;
    margin-left: 10px;
    padding: 5px 12px;
    outline: none;
}

.oportunidades-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #003B91 !important;
    font-weight: 600;
}

.oportunidades-page .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--samsung-blue) !important;
    color: white !important;
    border: none;
    border-radius: 6px;
}


.oportunidades-page .dataTables_empty {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.oportunidades-page .page-link {
    background: #ffffff;
    border-color: #dee2e6;
    color: var(--samsung-blue);
}

.oportunidades-page .page-item.active .page-link {
    background: var(--samsung-blue) !important;
    border-color: var(--samsung-blue) !important;
    color: white !important;
}

.oportunidades-page .page-item.disabled .page-link {
    background: #f8f9fa;
    border-color: #eee;
    color: #ccc;
}

/* Scrollbar for Glass table */
.oportunidades-page .table-responsive::-webkit-scrollbar {
    height: 8px;
}
.oportunidades-page .table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.oportunidades-page .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    border-radius: 10px;
}

/* Product Card List */
.product-item {
    border-bottom: 1px solid #eee;
    padding: 0.85rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-item:last-child { border-bottom: none; }

/* Extra Utilities */
.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropdowns Autocomplete */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    z-index: 2000; /* Garantir que fique sobre o painel de vidro */
}
#nome_dropdown {
    min-width: 450px !important;
}
.dropdown-item { 
    border-radius: 8px; 
    margin: 2px 8px; 
    font-size: 0.85rem;
    white-space: normal; /* Permitir quebra se ainda assim for muito longo */
}
.dropdown-item small {
    font-size: 0.7rem;
    display: block;
    color: var(--text-secondary);
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* Flatpickr Custom Styling */
.oportunidades-page .input-group-text.bg-glass-input {
    background: #f8f9fc !important;
    color: var(--samsung-blue) !important;
    border: 1px solid #cbd5e0 !important;
    border-right: none !important;
}

.oportunidades-page #filterRange {
    border-left: none !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--samsung-blue) !important;
    border-color: var(--samsung-blue) !important;
}

