/* ===========================
   QUALITY ELEJA - CUSTOM STYLES
   =========================== */

/* === CORES E VARIÁVEIS === */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004c99;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --secondary-color: #6b7280;
    --bg-gradient: linear-gradient(135deg, #1a77b5 0%, #1a77b5 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* === GLOBAL === */
body {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* === NAVBAR === */
.navbar {
    background: var(--bg-gradient) !important;
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    margin-bottom: 2.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: var(--transition);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* === CARDS === */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #1a77b5 0%, #1a77b5 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-weight: 600;
    color: #1f2937;
}

/* === BADGES === */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* === BUTTONS === */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, #1a77b5 0%, #1a77b5 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a77b5 0%, #1a77b5 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #e5e7eb;
    color: #6b7280;
    background: white;
}

.btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #4b5563;
}

/* === DEMAND CARDS === */
.demand-card {
    background: white;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
}

.demand-card:hover {
    border-left-color: var(--primary-dark);
    box-shadow: var(--shadow-xl);
}

.demand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.demand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.demand-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #6b7280;
}

.demand-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demand-meta-item i {
    color: var(--primary-color);
}

/* === CHECKLIST === */
.checklist-category-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.checklist-category-header {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-bottom: 3px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
}

.checklist-category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-item-row {
    transition: var(--transition);
    border-bottom: 1px solid #f3f4f6;
}

.checklist-item-row:hover {
    background-color: #f9fafb;
}

.checklist-item-description {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.checklist-item-subcategory {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* === STATUS TOGGLE BUTTONS === */
.btn-group .btn-check:checked + .btn {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-outline-success {
    border: 2px solid #10b981;
    color: #10b981;
}

.btn-outline-success:hover,
.btn-check:checked + .btn-outline-success {
    background: #10b981;
    color: white;
}

.btn-outline-danger {
    border: 2px solid #ef4444;
    color: #ef4444;
}

.btn-outline-danger:hover,
.btn-check:checked + .btn-outline-danger {
    background: #ef4444;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6b7280;
    color: #6b7280;
}

.btn-outline-secondary:hover,
.btn-check:checked + .btn-outline-secondary {
    background: #6b7280;
    color: white;
}

/* === EVIDENCE CONTAINER === */
.evidence-container {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.evidence-card {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1rem;
}

.evidence-input {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: var(--transition);
}

.evidence-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* === ALERTS === */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* === TABLE === */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: #f9fafb;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table-success-light {
    background-color: rgba(16, 185, 129, 0.05);
    border-left: 3px solid #10b981;
}

.table-danger-light {
    background-color: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
}

/* === DASHBOARD === */
.dashboard-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === FORMS === */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* === UTILITY === */
.text-gradient {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2rem 0;
    border: none;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .demand-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* === LOADING INDICATOR === */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* === STATUS TABS === */
.status-tabs {
    border-bottom: none;
    background: linear-gradient(to right, #f8f9fa, #fff, #f8f9fa);
    padding: 1rem 1.5rem 0;
}

.status-tabs .nav-link {
    border: none;
    color: #6b7280;
    padding: 0.875rem 1.5rem;
    margin-right: 0.5rem;
    border-radius: 12px 12px 0 0;
    transition: var(--transition);
    position: relative;
    text-transform: none;
    letter-spacing: 0;
}

.status-tabs .nav-link:hover {
    background: rgba(102, 126, 234, 0.05);
    color: var(--primary-color);
    transform: translateY(0);
}

.status-tabs .nav-link.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: 700;
}

.status-tabs .nav-link i {
    font-size: 1.1rem;
}

.status-tabs .badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 24px;
}

/* === COMPACT DEMAND CARDS === */
.demand-card-compact {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: white;
    overflow: visible;
}

.demand-card-compact:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(26, 119, 181, 0.15);
    transform: translateY(-5px);
}

.demand-status-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    z-index: 10;
}

.demand-status-badge .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    box-shadow: var(--shadow-md);
    font-weight: 700;
}

.demand-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.demand-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

.info-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
    transition: var(--transition);
}

.info-item:hover {
    background: #f3f4f6;
}

.info-item i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-content small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-content strong {
    font-size: 0.875rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demand-card-compact .card-footer {
    transition: var(--transition);
    opacity: 0;
}

.demand-card-compact:hover .card-footer {
    opacity: 1;
}

.hover-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === EMPTY STATE === */
.empty-state-icon {
    font-size: 5rem;
    color: #d1d5db;
    opacity: 0.5;
}

/* === RESPONSIVE TABS === */
@media (max-width: 992px) {
    .status-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }
    
    .status-tabs .nav-item {
        flex-shrink: 0;
    }
    
    .status-tabs .nav-link {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .status-tabs .nav-link span.fw-bold {
        display: none;
    }
    
    .demand-card-compact {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .status-tabs .nav-link .badge {
        position: absolute;
        top: 5px;
        right: 5px;
        min-width: 18px;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
}

/* === TIMELINE (LOGS DE AUDITORIA) === */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, #e5e7eb 0%, #e5e7eb 100%);
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 60px;
    min-height: 60px;
}

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

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.timeline-content {
    background: #f9fafb;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.timeline-content strong {
    font-size: 1rem;
    color: #1f2937;
}

.timeline-content p {
    margin: 0;
    line-height: 1.5;
}

