/* Main Styles for Compliance Management System */

/* Base Styles */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --sidebar-width: 250px;
    --header-height: 60px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Risk colors */
    --risk-high: #dc3545;
    --risk-medium: #ffc107;
    --risk-low: #28a745;
    
    /* Framework colors */
    --nist-color: #4a6cf7;
    --iso-color: #6610f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fb;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Ocultar todas as imagens com alt contendo "Avatar" */
img[alt*="Avatar"] {
  display: none !important;
}

/* Ocultar imagens de perfil de stakeholders específicos */
img[alt="John Smith"],
img[alt="Sarah Johnson"],
img[alt="Michael Chen"],
img[alt="Lisa Rodriguez"],
img[alt="David Wilson"],
img[alt*="User"] {
  display: none !important;
}

/* Ocultar qualquer imagem que possa ser um avatar baseado no URL */
img[src*="avatars"],
img[src*="placeholder.com"] {
  display: none !important;
}

/* Adicionar espaço onde as imagens estavam para manter o layout */
.sidebar-footer, .header-user {
  padding: 8px !important;
}

/* Container */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.logo {
    padding: 0 20px;
    margin-bottom: 30px;
}

.logo h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    margin-bottom: 30px;
}

.nav-links li {
    padding: 10px 20px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-links li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links li.active {
    background-color: var(--primary-color);
}

.nav-links li a {
    display: flex;
    align-items: center;
}

.nav-links li a i {
    margin-right: 10px;
    font-size: 18px;
    width: 20px; /* Garantir largura fixa para todos os ícones */
    text-align: center; /* Centralizar ícones */
    display: inline-block; /* Garantir que o ícone seja exibido como bloco inline */
}

/* Correção específica para o ícone do Dashboard */
.nav-links li a i.fa-tachometer-alt {
    width: 20px;
    text-align: center;
    display: inline-block;
    overflow: visible; /* Garantir que o ícone não seja cortado */
}

.user-info {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    position: relative;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.toggle-menu {
    display: none;
    cursor: pointer;
}

.toggle-menu i {
    font-size: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    border-radius: 20px;
    padding: 5px 15px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    padding: 5px;
}

.search-bar i {
    color: var(--secondary-color);
}

.user-actions {
    display: flex;
    align-items: center;
}

.notifications {
    position: relative;
    margin-right: 20px;
    cursor: pointer;
}

.notifications i {
    font-size: 18px;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: var(--white-color);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-profile img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-profile i {
    margin-left: 5px;
    font-size: 12px;
}

/* Dashboard Content */
.dashboard-content {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    background-color: var(--white-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn:hover {
    background-color: #f5f5f5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Overview Cards */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    align-items: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.card-icon i {
    font-size: 24px;
    color: var(--white-color);
}

.card-icon.nist {
    background-color: var(--nist-color);
}

.card-icon.iso {
    background-color: var(--iso-color);
}

.card-icon.tasks {
    background-color: var(--warning-color);
}

.card-icon.audits {
    background-color: var(--info-color);
}

.card-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.card-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 12px;
    color: var(--secondary-color);
}

.up {
    color: var(--success-color);
}

.down {
    color: var(--danger-color);
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.widget {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.widget.large {
    grid-column: span 2;
    grid-row: span 2;
}

.widget.medium {
    grid-column: span 2;
}

.widget.small {
    grid-column: span 1;
    grid-row: span 2;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.widget-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.widget-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-actions select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    outline: none;
}

.widget-actions i {
    cursor: pointer;
    color: var(--secondary-color);
}

.widget-content {
    padding: 20px;
    height: calc(100% - 51px);
    overflow: auto;
}

/* Heatmap */
.heatmap-container {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.heatmap-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.heatmap-cell {
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    color: var(--white-color);
}

.heatmap-cell.high {
    background-color: var(--risk-high);
}

.heatmap-cell.medium {
    background-color: var(--risk-medium);
    color: #333;
}

.heatmap-cell.low {
    background-color: var(--risk-low);
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-color.high {
    background-color: var(--risk-high);
}

.legend-color.medium {
    background-color: var(--risk-medium);
}

.legend-color.low {
    background-color: var(--risk-low);
}

/* Issues List */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.issue {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.issue.critical {
    border-left: 4px solid #dc3545;
}

.issue.high {
    border-left: 4px solid #fd7e14;
}

.issue.medium {
    border-left: 4px solid #ffc107;
}

.issue.low {
    border-left: 4px solid #28a745;
}

.issue-icon {
    margin-right: 15px;
}

.issue-icon i {
    font-size: 20px;
}

.issue.critical .issue-icon i {
    color: #dc3545;
}

.issue.high .issue-icon i {
    color: #fd7e14;
}

.issue.medium .issue-icon i {
    color: #ffc107;
}

.issue.low .issue-icon i {
    color: #28a745;
}

.issue-details {
    flex: 1;
}

.issue-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.issue-details p {
    font-size: 12px;
    color: var(--secondary-color);
}

.issue-actions {
    margin-left: 10px;
}

/* Audit List */
.audit-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audit {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.audit-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 4px;
    margin-right: 15px;
}

.audit-date .month {
    font-size: 12px;
    text-transform: uppercase;
}

.audit-date .day {
    font-size: 18px;
    font-weight: 700;
}

.audit-details {
    flex: 1;
}

.audit-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.audit-details p {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.activity-icon i {
    font-size: 16px;
    color: var(--primary-color);
}

.activity-details {
    flex: 1;
}

.activity-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.activity-details p {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .widget.small {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        padding: 15px 0;
    }
    
    .logo {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .logo h2 {
        display: none;
    }
    
    .nav-links li {
        padding: 10px;
        text-align: center;
    }
    
    .nav-links li a span {
        display: none;
    }
    
    .nav-links li a i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .user-info span {
        display: none;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .user-info img {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-menu {
        display: block;
    }
    
    .search-bar {
        width: 200px;
    }
    
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .widget.large, .widget.medium, .widget.small {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        display: none;
    }
}
