/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fallback para variáveis CSS não suportadas */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #333;
    --bg-color: #f8fafc;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color, #333);
    background-color: var(--bg-color, #f8fafc);
    /* Fallback para Chrome */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page Styles */
.login-container {
    height: 100vh;
    height: -webkit-fill-available; /* Safari fix */
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Chrome fix */
    background-attachment: fixed; /* Fix background on scroll */
    background-size: cover; /* Ensure full coverage */
    background-repeat: no-repeat;
    padding: 20px;
    position: relative;
    overflow: hidden;
    /* Chrome-specific fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 20px;
}

.logo i {
    font-size: 28px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    pointer-events: none !important;
    background: transparent !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.input-icon i {
    color: #9ca3af !important;
    font-size: 16px !important;
    pointer-events: none !important;
}

/* Fallback para estrutura antiga */
.input-wrapper i {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: 16px !important;
    z-index: 10 !important;
    pointer-events: none !important;
    background: transparent !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.input-wrapper input {
    width: 100% !important;
    padding: 12px 16px 12px 56px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    -webkit-transition: all 0.3s ease !important; /* Chrome fix */
    background: #f9fafb !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    /* Chrome-specific fixes */
    -webkit-appearance: none !important;
    appearance: none !important;
}

.input-wrapper input:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Toggle password button removed */

/* Garantir que o texto não sobreponha os ícones */
.input-wrapper input::placeholder {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.input-wrapper input {
    text-indent: 0 !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    text-align: center;
}

.login-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-info i {
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.signup-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.signup-link:hover {
    text-decoration: underline;
}

/* Login Illustration */
.login-illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 18px;
}

.card-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.card-3 {
    top: 40%;
    right: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Dashboard Styles */
.dashboard-body {
    background: #f8fafc;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Logo no sidebar */
.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #6366f1;
    margin: 0;
}

.sidebar .logo i {
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 32px;
    padding: 0 24px;
}

.nav-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item a:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-item.active a {
    background: #6366f1;
    color: white;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Estilos para sidebar colapsável */
.sidebar.collapsed {
    width: 70px !important;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .nav-section h3,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-name,
.sidebar.collapsed .user-role {
    display: none;
}

.sidebar.collapsed .sidebar-nav {
    text-align: center;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 1rem 0;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 1rem 0;
}

.sidebar.collapsed .user-avatar {
    margin-right: 0;
}

.sidebar.collapsed .user-menu-btn {
    display: none;
}

/* Ajustes específicos para o header quando colapsado */
.sidebar.collapsed .sidebar-header {
    padding: 16px 8px;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.sidebar.collapsed .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.sidebar.collapsed .sidebar-toggle {
    position: relative;
    margin-top: 8px;
    padding: 6px;
    font-size: 14px;
}

/* Ajuste do conteúdo principal quando sidebar está colapsado */
.main-content.sidebar-collapsed {
    margin-left: 70px !important;
}

/* Estilo para links externos */
.nav-item a[target="_blank"] {
    position: relative;
}

.nav-item a[target="_blank"]::after {
    content: '\f08e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    opacity: 0.7;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.user-role {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.user-menu-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.header-title {
    flex: 1;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.header-left p {
    color: #6b7280;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}



.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-weight: 400;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.logout-btn i {
    font-size: 0.875rem;
}

.logout-btn span {
    font-weight: 400;
}

/* Content Area */

.page-content {
    display: none;
}

.page-content.active {
    display: block;
    padding: 32px;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-info h3 {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.stat-change.positive {
    background: #dcfce7;
    color: #166534;
}

.stat-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.stat-change.neutral {
    background: #f3f4f6;
    color: #374151;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.dashboard-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

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

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.activity-item:nth-child(1) .activity-icon {
    background: #10b981;
}

.activity-item:nth-child(2) .activity-icon {
    background: #6366f1;
}

.activity-item:nth-child(3) .activity-icon {
    background: #f59e0b;
}

.activity-content p {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #6b7280;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.project-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.project-progress span {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    min-width: 40px;
}

/* Best and Worst Answers Styles */
.best-answers-list,
.worst-answers-list,
.best-assignments-list,
.worst-assignments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.answer-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.answer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.answer-user {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}

.answer-score {
    font-size: 20px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.answer-score.high {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.answer-score.low {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.answer-question {
    font-size: 13px;
    font-weight: 500;
    color: #6366f1;
    margin-bottom: 8px;
}

.answer-assessment {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.answer-text {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #6366f1;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Assignment Items Styles */
.assignment-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.assignment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.assignment-user {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assignment-score {
    font-size: 24px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assignment-score.high {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.assignment-score.low {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.assignment-title {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 6px;
}

.assignment-description {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.4;
}

.assignment-stats {
    display: flex;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.assignment-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.assignment-stat i {
    color: #9ca3af;
}

.assignment-date {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Tasks Page */
.tasks-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.task-filters {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: none;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.task-list {
    padding: 24px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.task-checkbox {
    flex-shrink: 0;
}

.task-checkbox input[type="checkbox"] {
    display: none;
}

.task-checkbox label {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: block;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.task-checkbox input[type="checkbox"]:checked + label {
    background: #6366f1;
    border-color: #6366f1;
}

.task-checkbox input[type="checkbox"]:checked + label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.task-content {
    flex: 1;
}

.task-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.task-content p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    gap: 12px;
}

.task-priority {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.task-priority.high {
    background: #fee2e2;
    color: #991b1b;
}

.task-priority.medium {
    background: #fef3c7;
    color: #92400e;
}

.task-deadline {
    font-size: 12px;
    color: #6b7280;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: #6b7280;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Projects Page */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.project-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.project-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.project-status.active {
    background: #dcfce7;
    color: #166534;
}

.project-card p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.project-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.project-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-members {
    display: flex;
    gap: -8px;
}

.team-members img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

/* Calendar Page */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.calendar-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: #f3f4f6;
}

.day-number {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.day-events {
    margin-top: 4px;
}

.event-item {
    font-size: 10px;
    background: #6366f1;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}

/* Learning Report Page */
.learning-report-container {
    display: flex;
    gap: 1.5rem;
    min-height: calc(100vh - 200px);
    height: auto;
}

.groups-section {
    width: 300px;
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: auto;
    min-height: fit-content;
}

/* Manager profile removido */

.groups-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

.group-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-field label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.input-field .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field .input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.input-field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field select:hover {
    border-color: #9ca3af;
}

/* Estilos para autocomplete de grupo */
.input-field input[list] {
    cursor: pointer;
    background-image: none;
    padding-right: 0.75rem;
}

.input-field input[list]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field input[list]:hover {
    border-color: #9ca3af;
}

.add-group-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: none;
    overflow-y: visible;
}

.group-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.group-item:hover {
    background: #f9fafb;
}

.group-item.active {
    background: #6366f1;
    color: white;
    position: relative;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.group-info i {
    font-size: 1rem;
    color: #6b7280;
}

.group-item.active .group-info i {
    color: white;
}

.group-period {
    font-size: 0.70rem;
    color: #6b7280;
    margin-left: 1.75rem;
}

.group-item.active .group-period {
    color: rgba(255, 255, 255, 0.8);
}

.field-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.3rem 0;
    border-radius: 1px;
}

.remove-group-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.group-item:hover .remove-group-btn {
    opacity: 1;
}

.remove-group-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.group-item.active .remove-group-btn {
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
}

.group-item.active:hover .remove-group-btn {
    opacity: 1;
}

.group-item.active .remove-group-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.filters-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

.filter-row {
    margin-bottom: 1.5rem;
}

.date-filter {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.date-filter label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.date-inputs {
    display: flex;
    gap: 0.4rem;
}

.date-inputs .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    width: 125px;
    max-width: 125px;
}

.date-inputs .input-wrapper i {
    position: absolute;
    left: 0.4rem;
    color: #9ca3af;
    font-size: 0.65rem;
}

.date-inputs input {
    padding: 12px 16px 12px 30px !important;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 12px !important;
    width: 100%;
    max-width: 100%;
}

/* Botões de ação do período */
.periodo-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.btn-periodo-action {
    flex: 1;
    padding: 0.3rem 0.4rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-periodo-action:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-periodo-action i {
    font-size: 0.65rem;
}

.dropdown-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dropdown-filters .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.dropdown-filters .input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.dropdown-filters select {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.dropdown-filters select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dropdown-filters select:hover {
    border-color: #9ca3af;
}

.add-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Extra filter controls */
.apply-filters-btn,
.clear-filters-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.active-filters {
    margin-top: 1rem;
}

.active-filters label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    background: #6366f1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.filter-tag .remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    opacity: 0; /* só aparece no hover do chip */
}

.filter-tag:hover .remove-filter {
    opacity: 1;
}

.filter-tag .remove-filter:hover {
    transform: scale(1.05);
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    flex: 1;
}

.chart-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding-right: 0;
    position: relative;
}



.chart-bars {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    margin-right: 0;
    position: relative;
    z-index: 1;
}

/* Vertical guides overlay (responsive) */
.chart-guides {
    position: absolute;
    left: calc(180px + 1rem);
    right: 0;
    /* top and height are set via JS to span from top of first bar to axis line */
    pointer-events: none;
    z-index: 2; /* above bars */
}

.chart-guides .guide-line {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px dashed #9ca3af;
    opacity: 0.6;
}

/* Chart Bar Styles */
.chart-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.chart-bar-info {
    width: 180px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chart-bar-label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.chart-bar-period {
    font-size: 0.70rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.chart-bar-container {
    flex: 1;
    position: relative;
    height: 30px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: visible;
}

.chart-bar-container::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Gradiente de cores suaves: vermelho → laranja → amarelo → verde */
    background: linear-gradient(90deg,
        #ef4444 0%,       /* vermelho suave */
        #f97316 15%,      /* laranja */
        #fbbf24 35%,      /* amarelo */
        #fde047 50%,      /* amarelo claro */
        #a3e635 70%,      /* verde-amarelado */
        #22c55e 100%      /* verde */
    );
    /* Revela apenas a parte preenchida */
    clip-path: inset(0 var(--bar-right, 100%) 0 0);
    transition: clip-path 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    background: transparent;
}

.chart-bar-value {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 180px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    padding-left: 3.5rem;
    position: relative;
}

.bar-container {
    flex: 1;
    position: relative;
    height: 30px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0;
}

.bar-container::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Gradiente de cores suaves: vermelho → laranja → amarelo → verde */
    background: linear-gradient(90deg,
        #ef4444 0%,       /* vermelho suave */
        #f97316 15%,      /* laranja */
        #fbbf24 35%,      /* amarelo */
        #fde047 50%,      /* amarelo claro */
        #a3e635 70%,      /* verde-amarelado */
        #22c55e 100%      /* verde */
    );
    /* Revela apenas a parte preenchida: calcula quanto falta à direita (100% - score%) */
    clip-path: inset(0 var(--bar-right, 100%) 0 0);
    transition: clip-path 0.3s ease;
}

.bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    /* Remove background individual - usa apenas o gradiente */
    background: transparent;
}

.red-bar .bar {
    background: transparent;
}

.orange-bar .bar {
    background: transparent;
}

.blue-bar .bar {
    background: transparent;
}

.green-bar .bar {
    background: transparent;
}

.bar-value {
    position: absolute;
    left: -3.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #374151;
    font-size: 0.9rem;
    font-weight: 700;
    width: 3rem;
    text-align: right;
}

.chart-axis {
    position: relative;
    margin-top: 0.25rem; /* cola na última barra */
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    margin-left: calc(180px + 1rem);
    margin-right: 0;
    padding-right: 0;
    width: calc(100% - (180px + 1rem));
}

.axis-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.axis-markers {
    position: relative;
    height: 2rem;
}

.axis-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}

.axis-marker:first-child {
    transform: translateX(0);
    left: 0;
}

.axis-marker:last-child {
    transform: translateX(-100%);
    left: 100%;
}



.marker-value {
    font-size: 0.625rem;
    color: #6b7280;
    font-weight: 500;
}

.axis-labels {
    position: relative;
    height: 2rem;
    margin-top: 0.5rem;
}

.axis-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
}

/* Todos os rótulos ficam centralizados nos seus intervalos (12.5, 37.5, 62.5, 87.5) */

.axis-label span {
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
}

/* Removed old category styles - replaced with chart-axis */

/* Diagnostics Analytics Page */
.diagnostics-analytics {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.metrics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.metric-content h3 {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.metric-change.positive {
    background: #dcfce7;
    color: #166534;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 600;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.chart-content {
    min-height: 200px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-chart .bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-chart .bar-label {
    width: 100px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.bar-chart .bar-container {
    flex: 1;
    position: relative;
    height: 25px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.bar-chart .bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-chart .bar-value {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Pie Chart */
.pie-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pie-segment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--color);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.segment-value {
    font-weight: 700;
}

/* Problems List */
.problems-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.problem-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.problem-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.problem-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.problem-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.problem-details p {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.problem-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.problem-time {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.problem-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.problem-status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* Line Chart */
.line-chart {
    position: relative;
    height: 150px;
    margin-top: 2rem;
}

.chart-line {
    position: relative;
    height: 100%;
    border-bottom: 1px solid #e5e7eb;
}

.data-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Impact Metrics */
.impact-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.impact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.impact-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.impact-value {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
}

.impact-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Trend Chart */
.trend-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trend-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid;
}

.trend-line[data-trend="up"] {
    border-left-color: #10b981;
}

.trend-line[data-trend="down"] {
    border-left-color: #ef4444;
}

.trend-line[data-trend="stable"] {
    border-left-color: #6b7280;
}

.trend-label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.trend-value {
    font-size: 0.875rem;
    font-weight: 700;
}

.trend-line[data-trend="up"] .trend-value {
    color: #10b981;
}

.trend-line[data-trend="down"] .trend-value {
    color: #ef4444;
}

.trend-line[data-trend="stable"] .trend-value {
    color: #6b7280;
}

/* Empty state for chart cards */
.chart-card.empty-state {
    text-align: center;
    padding: 40px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #6b7280;
    font-size: 16px;
}

.chart-placeholder i {
    font-size: 48px;
    color: #d1d5db;
}

/* Reports Page */
.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.report-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.report-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.report-card p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Cycles Management Page */
.cycles-container {
    margin-top: 2rem;
}

.cycles-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cycles-list {
    display: grid;
    gap: 1.5rem;
}

.cycle-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cycle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cycle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cycle-header h4 {
    margin: 0;
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
}

.cycle-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.cycle-status.active {
    background: #d1fae5;
    color: #065f46;
}

.cycle-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.cycle-status.review {
    background: #fef3c7;
    color: #92400e;
}

.cycle-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.cycle-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.cycle-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.cycle-knowledge {
    margin-top: 1rem;
}

.knowledge-label {
    display: block;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.application-tags {
    margin-top: 1rem;
}

.tags-label {
    display: block;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.knowledge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.knowledge-tag {
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cycle-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* Applications Management Page */
.applications-container {
    margin-top: 2rem;
}

.applications-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.applications-list {
    display: grid;
    gap: 1.5rem;
}

.application-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.application-card.highlighted {
    border: 2px solid #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 16px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
    }
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.application-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.application-user .user-avatar:nth-child(1) {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.application-user .user-avatar:nth-child(2) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.application-user .user-avatar:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.application-user .user-info h4 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
}

.application-user .user-role {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.application-user .user-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.application-user .group-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.application-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.application-status.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.application-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.application-status.pending {
    background: #dbeafe;
    color: #1e40af;
}

.application-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.application-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.application-content {
    margin-bottom: 1rem;
}

.cycle-info h5 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
}

.cycle-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.application-progress {
    margin-top: 1rem;
}

.application-progress .progress-bar {
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.progress-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.application-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.application-stats .stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.application-stats .stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.application-stats .stat-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.application-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* Users Management Page */
.users-container {
    margin-top: 2rem;
}

.users-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-select:hover {
    border-color: #9ca3af;
}

/* Estilos para as opções dos selects */
select option {
    padding: 0.5rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
}

select option:hover {
    background: #f3f4f6;
}

select option:checked {
    background: #6366f1;
    color: white;
}

/* Estilo para select desabilitado */
select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Estilo para select com erro */
select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Estilo para select com sucesso */
select.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Estilos para selects em formulários de configurações */
.settings-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.settings-form select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.settings-form select:hover {
    border-color: #9ca3af;
}

.search-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.search-filter i {
    color: #6b7280;
}

.search-filter input {
    border: none;
    outline: none;
    font-size: 0.875rem;
    min-width: 200px;
}

.users-list {
    display: grid;
    gap: 1rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.team-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

/* Cores diferentes para cada usuário */
.user-card:nth-child(1) .user-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.user-card:nth-child(2) .user-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.user-card:nth-child(3) .user-avatar {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.user-card:nth-child(4) .user-avatar {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-weight: 600;
}

.user-info p {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.user-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.group-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.user-role.admin {
    background: #dbeafe;
    color: #1e40af;
}

.user-role.supervisor {
    background: #d1fae5;
    color: #065f46;
}

.user-role.mechanic {
    background: #fef3c7;
    color: #92400e;
}

.user-role.specialist {
    background: #fce7f3;
    color: #be185d;
}

.user-stats {
    display: flex;
    gap: 1.5rem;
    margin-right: 1rem;
}

.user-stats .stat {
    text-align: center;
}

.user-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.user-stats .stat-value {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.user-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-right: 1rem;
}

.user-status.active {
    background: #d1fae5;
    color: #065f46;
}

.user-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-actions .action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-actions .action-btn:hover {
    background: #6366f1;
    color: white;
}

/* Settings Page */
.settings-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-form .form-group {
    margin-bottom: 0;
}

.settings-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.settings-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Project Details */
.project-details {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.project-details p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.project-timeline h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.timeline-date {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    min-width: 80px;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Form Styles */
.ciclo-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #f9fafb;
}

.form-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #6366f1;
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Para formulários mais limpos, ajustar espaçamento */
.ciclo-form .form-section {
    padding: 24px;
}

.ciclo-form .form-group {
    margin-bottom: 16px;
}

.ciclo-form .form-group:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

.form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group select:hover {
    border-color: #9ca3af;
}

.form-group select[multiple] {
    min-height: 120px;
    background-image: none;
    padding-right: 12px;
}

.form-group input[type="date"] {
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Checkbox wrapper para perguntas aleatórias */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-wrapper .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    background: white;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-wrapper span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Estilos específicos para checkbox do modal */
.modal-content .checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-top: 8px;
}

.modal-content .checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.modal-content .checkbox-wrapper .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    background: white;
    flex-shrink: 0;
}

.modal-content .checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.modal-content .checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.modal-content .checkbox-wrapper label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    margin: 0;
}

/* Garantir que o checkbox seja visível */
#diasUteis {
    display: none !important;
}

#diasUteis + label {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #374151 !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

#diasUteis + label .checkmark {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    background: white !important;
    flex-shrink: 0 !important;
}

#diasUteis:checked + label .checkmark {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
}

#diasUteis:checked + label .checkmark::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
}

/* Conteúdos Grid */
.conteudos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.conteudo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conteudo-item:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

.conteudo-item input[type="checkbox"] {
    margin: 0;
}

.conteudo-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.conteudo-item i {
    color: #6366f1;
    font-size: 16px;
}

.conteudo-item span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Input Group para novo conteúdo */
.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
}

.input-group button {
    white-space: nowrap;
    padding: 10px 16px;
}

/* Tags Input */
.tags-input-container {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    background: white;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    
}

.tag-chip {
    background: #6366f1;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.6em;
}

.tag-chip .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-chip .remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tags-input-container input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    background: transparent;
    padding: 8px 0;
    line-height: 1.5;
    vertical-align: middle;
}

.tags-input-container input::placeholder {
    color: #9ca3af;
}

/* Perguntas Geradas - Estilos Modernos */
.perguntas-geradas {
    margin-top: 20px;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.perguntas-geradas h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.perguntas-geradas h4::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #6366f1;
    font-size: 16px;
}

.perguntas-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pergunta-item {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pergunta-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pergunta-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e5e7eb;
}

/* Perguntas Abertas - Verde */
.pergunta-item.pergunta-open {
    border-left-color: #10b981;
}

.pergunta-item.pergunta-open::before {
    background: #10b981;
}

.pergunta-item.pergunta-open:hover {
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

/* Removido ícone do header - agora está dentro do marcador de tipo */

.pergunta-item.pergunta-open .pergunta-tipo {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pergunta-item.pergunta-open .pergunta-tipo i {
    font-size: 12px;
}

/* Área de resposta para perguntas abertas */
.pergunta-item.pergunta-open .pergunta-answer-area {
    margin-top: 16px;
    padding: 16px;
    background: #f0fdf4;
    border: 2px dashed #10b981;
    border-radius: 8px;
    text-align: center;
    color: #059669;
    font-style: italic;
    font-size: 14px;
}

/* Perguntas Binárias - Azul */
.pergunta-item.pergunta-binary {
    border-left-color: #3b82f6;
}

.pergunta-item.pergunta-binary::before {
    background: #3b82f6;
}

.pergunta-item.pergunta-binary:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* Removido ícone do header - agora está dentro do marcador de tipo */

.pergunta-item.pergunta-binary .pergunta-tipo {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pergunta-item.pergunta-binary .pergunta-tipo i {
    font-size: 12px;
}

/* Botões para perguntas binárias */
.pergunta-item.pergunta-binary .binary-options {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.pergunta-item.pergunta-binary .binary-option {
    padding: 12px 24px;
    border: 2px solid #3b82f6;
    border-radius: 25px;
    background: white;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
}

.pergunta-item.pergunta-binary .binary-option:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

/* Perguntas Múltipla Escolha - Roxo */
.pergunta-item.pergunta-multiple_choice {
    border-left-color: #8b5cf6;
}

.pergunta-item.pergunta-multiple_choice::before {
    background: #8b5cf6;
}

.pergunta-item.pergunta-multiple_choice:hover {
    border-color: #8b5cf6;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

/* Removido ícone do header - agora está dentro do marcador de tipo */

.pergunta-item.pergunta-multiple_choice .pergunta-tipo {
    background: #8b5cf6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pergunta-item.pergunta-multiple_choice .pergunta-tipo i {
    font-size: 12px;
}

/* Opções para múltipla escolha */
.pergunta-item.pergunta-multiple_choice .choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.pergunta-item.pergunta-multiple_choice .choice-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pergunta-item.pergunta-multiple_choice .choice-option:hover {
    background: #f1f5f9;
    border-color: #8b5cf6;
    transform: translateX(4px);
}

.pergunta-item.pergunta-multiple_choice .choice-letter {
    background: #8b5cf6;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

/* Header comum */
.pergunta-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.pergunta-numero {
    background: #6366f1;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.pergunta-titulo {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.pergunta-texto {
    font-size: 14px;
    color: #4b5563;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .pergunta-item.pergunta-binary .binary-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .pergunta-item.pergunta-binary .binary-option {
        width: 100%;
    }
    
    .pergunta-item.pergunta-multiple_choice .choice-option:hover {
        transform: none;
    }
}

/* ========================================
   🎯 CICLOS DE AVALIAÇÃO - DESIGN MODERNO E INTUITIVO
   ======================================== */

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
}

.empty-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   🎨 NOVO DESIGN DOS CARDS
   ======================================== */

.cycle-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.cycle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.cycle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cycle-card:hover::before {
    opacity: 1;
}

/* Header do Card */
.cycle-card-header {
    padding: 24px 24px 0 24px;
    margin-bottom: 20px;
}

.cycle-title-section {
    width: 100%;
}

.cycle-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cycle-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cycle-date {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.cycle-date-full {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

/* Body do Card */
.cycle-card-body {
    padding: 0 24px 20px 24px;
}

/* Descrição */
.cycle-description {
    margin-bottom: 24px;
}

.cycle-description.empty p {
    color: #94a3b8;
    font-style: italic;
}

.cycle-description p {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Métricas */
.cycle-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.metric-item.empty {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.metric-item.empty .metric-icon {
    color: #94a3b8;
}

.metric-item.has-content {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.metric-item.has-content .metric-icon {
    color: #22c55e;
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    color: #64748b;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Knowledge Section */
.cycle-knowledge-section {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.cycle-knowledge-section.empty {
    background: #fef2f2;
    border-color: #fecaca;
}

.knowledge-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.cycle-knowledge-section.empty .knowledge-header {
    background: #fef2f2;
    border-bottom-color: #fecaca;
    color: #991b1b;
}

.knowledge-list {
    padding: 16px 20px;
    max-height: 120px;
    overflow-y: auto;
}

.knowledge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.knowledge-item:last-child {
    margin-bottom: 0;
}

.knowledge-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(4px);
}

.knowledge-item i {
    color: #6366f1;
    font-size: 14px;
    flex-shrink: 0;
}

.knowledge-name {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
}

/* Footer com Ações */
.cycle-card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px 24px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.action-btn.primary {
    background: #6366f1;
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.action-btn.primary:hover {
    background: #5b21b6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.action-btn.secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
}

.action-btn.tertiary {
    background: white;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 10px;
    min-width: 40px;
    justify-content: center;
}

.action-btn.tertiary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

.action-btn.danger {
    background: white;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.action-btn.danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 14px;
}

.action-btn span {
    font-size: 13px;
}

/* Responsividade */
@media (max-width: 1024px) {
    .cycle-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .cycle-card-header {
        padding: 20px 20px 0 20px;
    }
    
    .cycle-card-body {
        padding: 0 20px 16px 20px;
    }
    
    .cycle-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .metric-item {
        padding: 12px;
    }
    
    .cycle-card-footer {
        padding: 16px 20px;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .action-btn.tertiary {
        flex: 0 0 auto;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .cycle-title {
        font-size: 18px;
    }
    
    .metric-value {
        font-size: 16px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn {
        padding: 10px;
        min-width: 40px;
        justify-content: center;
    }
}

/* Estilos para o modal de Nova Aplicação */
.pessoas-table-container {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.pessoas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pessoas-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.pessoas-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.pessoas-table tbody tr:last-child td {
    border-bottom: none;
}

.pessoas-table tbody tr:hover {
    background-color: #f8fafc;
}

.pessoa-nome {
    font-weight: 500;
    color: #1f2937;
}

.pessoa-cargo {
    color: #6b7280;
    font-size: 0.875rem;
}

.pessoa-concessionaria {
    color: #6b7280;
    font-size: 0.875rem;
}

.pessoa-email {
    color: #6b7280;
    font-size: 0.875rem;
    font-family: monospace;
}

.pessoa-acoes {
    text-align: center;
    width: 80px;
}

.pessoa-nome {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pessoa-nome input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.pessoa-nome label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #1f2937;
}

.pessoa-nome label:hover {
    color: #6366f1;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group .checkbox-wrapper {
    margin-bottom: 0;
}

.resumo-aplicacao {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.resumo-item:last-child {
    border-bottom: none;
}

.resumo-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.resumo-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

/* Estilos para campos readonly */
.form-group textarea[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.form-group textarea[readonly]:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para telas grandes onde o botão de colapsar funciona */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    
    .login-card {
        padding: 24px;
    }
    
    .top-header {
        padding: 16px 20px;
        flex-direction: row;
        gap: 16px;
        align-items: center;
    }
    
    .header-left {
        gap: 12px;
    }
    
    .header-title h1 {
        font-size: 20px;
    }
    
    .header-title p {
        font-size: 14px;
    }
    
    .header-right {
        justify-content: flex-end;
    }
    
    .logout-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .logout-btn span {
        display: none;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
    
    .users-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .user-stats {
        justify-content: center;
        margin-right: 0;
    }
    
    .user-status {
        margin-right: 0;
    }
    
    .cycles-filters,
    .applications-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cycle-details,
    .application-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .knowledge-tags {
        flex-direction: column;
    }
    
    .application-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .application-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .application-actions {
        justify-content: center;
    }
    
    /* Modal responsivo */
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .conteudos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    /* Perguntas responsivas */
    .pergunta-imagem {
        max-width: 100%;
        height: 120px;
    }
    
    .pergunta-opcoes {
        gap: 6px;
    }
    
    .opcao-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Responsividade para tabela de pessoas */
    .pessoas-table-container {
        overflow-x: auto;
    }
    
    .pessoas-table {
        min-width: 600px;
    }
    
    .pessoas-table th,
    .pessoas-table td {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .pessoa-email {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Estado vazio responsivo */
    .pessoas-empty {
        padding: 2rem 1rem;
    }
    
    .empty-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .empty-icon i {
        font-size: 1.5rem;
    }
    
    .empty-state h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .empty-state p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .floating-card {
        display: none;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .top-header {
        padding: 12px 16px;
    }
    
    .logout-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .content-area {
        padding: 16px;
    }
} 

.bar-period {
    font-size: 0.625rem;
    color: #9ca3af;
    margin-top: 0.125rem;
    text-align: left;
    font-weight: 400;
    line-height: 1;
}

/* --- Enhancements for chart and filters --- */
.apply-filters-btn,
.clear-filters-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.chart-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.chart-tools .spacer { flex: 1; }

.toggle { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #374151; }

/* Colorblind-friendly palette */
.chart-container.colorblind .bar-container::before {
    background: linear-gradient(90deg,
        #0ea5e9 0%,
        #60a5fa 25%,
        #a78bfa 45%,
        #a78bfa 55%,
        #7c3aed 100%
    );
}

.chart-guides .guide-mean { border-left: 1px solid #6366f1; opacity: 0.9; }
.chart-guides .guide-target { border-left: 1px solid #059669; opacity: 0.9; }

.chart-legend { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; margin-left: calc(180px + 1rem); }
.gradient-swatch { height: 8px; width: 200px; border-radius: 999px; background: linear-gradient(90deg, #dc2626, #f59e0b 25%, #fde047 50%, #22c55e 100%); }
.legend-labels { display: flex; gap: 0.5rem; font-size: 0.75rem; color: #6b7280; }

.bar-item.active .bar-container { outline: 2px solid #6366f1; }
.group-item.highlight { outline: 2px solid #6366f1; background: #eef2ff; }

/* Estilos para o autocomplete de conteúdos */

.conteudo-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.conteudo-search-container .input-wrapper {
    position: relative;
}

.conteudo-search-container .input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 1;
}

.conteudo-search-container input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.conteudo-search-container input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.conteudo-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.conteudo-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.conteudo-suggestion-item:hover,
.conteudo-suggestion-item.selected {
    background-color: #f8fafc;
}

.conteudo-suggestion-item:last-child {
    border-bottom: none;
}

.conteudo-suggestion-item.more-results {
    background-color: #f8fafc;
    cursor: default;
    font-style: italic;
}

.conteudo-suggestion-item.more-results:hover {
    background-color: #f8fafc;
}

.conteudos-selecionados {
    min-height: 100px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #f9fafb;
}

.conteudo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.conteudo-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.conteudo-item:last-child {
    margin-bottom: 0;
}

.conteudo-info {
    flex: 1;
}

.conteudo-nome {
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.conteudo-descricao {
    font-size: 12px;
    color: #6b7280;
}

.conteudo-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.conteudo-remove:hover {
    background: #fee2e2;
    opacity: 1;
}

.conteudos-empty {
    text-align: center;
    padding: 2rem;
}

.conteudos-empty .empty-icon {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.conteudos-empty h4 {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.conteudos-empty p {
    color: #9ca3af;
    font-size: 14px;
}

/* Estilos para o autocomplete de pessoas */
.pessoa-search-container,
.grupo-search-container,
.ciclo-search-container {
    position: relative;
}

.pessoa-search-container .input-wrapper,
.grupo-search-container .input-wrapper,
.ciclo-search-container .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pessoa-search-container .input-wrapper i,
.grupo-search-container .input-wrapper i,
.ciclo-search-container .input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.pessoa-search-container input,
.grupo-search-container input,
.ciclo-search-container input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.pessoa-search-container input:focus,
.grupo-search-container input:focus,
.ciclo-search-container input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pessoa-suggestions,
.grupo-suggestions,
.ciclo-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
}

.pessoa-suggestion-item,
.grupo-suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.pessoa-suggestion-item:last-child,
.grupo-suggestion-item:last-child {
    border-bottom: none;
}

.pessoa-suggestion-item:hover,
.grupo-suggestion-item:hover {
    background-color: #f9fafb;
}

.pessoa-suggestion-item.selected,
.grupo-suggestion-item.selected {
    background-color: #eef2ff;
    border-left: 3px solid #6366f1;
}

.pessoa-suggestion-item .pessoa-nome,
.grupo-suggestion-item .grupo-nome {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.pessoa-suggestion-item .pessoa-detalhes,
.grupo-suggestion-item .grupo-detalhes {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Estilos para sugestões de ciclo */
.ciclo-suggestions .suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.ciclo-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.ciclo-suggestions .suggestion-item:hover {
    background-color: #f9fafb;
}

.ciclo-suggestions .suggestion-item.no-results {
    cursor: default;
    color: #6b7280;
    text-align: center;
}

.ciclo-suggestions .suggestion-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.ciclo-suggestions .suggestion-main strong {
    font-weight: 500;
    color: #1f2937;
}

.ciclo-suggestions .suggestion-meta {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.ciclo-suggestions .suggestion-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Estilos para o ciclo selecionado */
.selected-ciclo {
    margin-top: 0.5rem;
}

.ciclo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
}

.ciclo-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ciclo-info strong {
    color: #0c4a6e;
    font-weight: 500;
}

.ciclo-questions {
    font-size: 0.75rem;
    color: #0369a1;
}

.btn-remove-ciclo {
    background: transparent;
    border: none;
    color: #0369a1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-remove-ciclo:hover {
    background: #e0f2fe;
    color: #0c4a6e;
}

.btn-remove-ciclo i {
    font-size: 1rem;
}

/* Estado vazio da lista de pessoas */
.pessoas-empty {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.empty-icon i {
    font-size: 2rem;
    color: #6366f1;
}

.empty-state h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
}

/* Botão de remover pessoa */
.pessoa-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
}

.pessoa-item:hover .pessoa-remove {
    opacity: 1;
}

.pessoa-remove:hover {
    background-color: #fee2e2;
    transform: scale(1.1);
}

/* =====================================================
   GESTÃO DE USUÁRIOS
   ===================================================== */

.user-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.user-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.user-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

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

.user-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.user-email {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.user-phone {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #9ca3af;
}

.user-profile {
    margin-bottom: 0.5rem;
}

.profile-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.profile-admin {
    background-color: #fee2e2;
    color: #991b1b;
}

.profile-learner {
    background-color: #dbeafe;
    color: #1e40af;
}

.user-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.user-groups .tag {
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 4px;
    font-size: 0.75rem;
}

.no-groups {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: #f3f4f6;
    color: #6b7280;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-edit-user {
    background-color: #dbeafe;
    color: #1e40af;
}

.btn-edit-user:hover {
    background-color: #bfdbfe;
}

.btn-delete-user {
    background-color: #fee2e2;
    color: #991b1b;
}

.btn-delete-user:hover {
    background-color: #fecaca;
}

/* Tag system para grupos no modal */
.tags-input-container {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem;
    min-height: 60px;
    background-color: white;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tags-display .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
    font-size: 0.875rem;
}

.tags-display .tag-remove {
    background: none;
    border: none;
    color: #3730a3;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.tags-display .tag-remove:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

#userGroupsInput {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.25rem;
    font-size: 0.875rem;
}

/* Empty state para lista vazia */
.users-list .empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1rem;
}
/* =====================================================
   RESPONSIVE STYLES - Analytics Dashboard
   ===================================================== */

/* Fix text overflow in metric cards */
.metric-card .metric-content h3 {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-card .metric-value {
    font-size: 1.5rem;
    white-space: nowrap;
}

.metric-card .metric-change {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix bar chart labels */
.bar-chart .bar-label {
    min-width: 60px;
    max-width: 120px;
    font-size: 0.75rem;
    word-wrap: break-word;
    line-height: 1.2;
}

/* Fix pie chart segments */
.pie-segment .segment-label {
    font-size: 0.8rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chart card header */
.chart-header h3 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
}

.chart-header .chart-subtitle {
    font-size: 0.7rem;
}

/* Problems list */
.problems-list .problem-item .problem-details h4 {
    font-size: 0.85rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.problems-list .problem-item .problem-details p {
    font-size: 0.75rem;
}

/* Tablet breakpoint */
@media (max-width: 1200px) {
    .metrics-overview {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small tablet / large mobile */
@media (max-width: 992px) {
    .metrics-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-card .metric-icon {
        width: 40px;
        height: 40px;
    }
    
    .metric-card .metric-icon i {
        font-size: 1rem;
    }
    
    .metric-card .metric-value {
        font-size: 1.25rem;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .metrics-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .metric-card {
        padding: 0.75rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .metric-card .metric-icon {
        width: 36px;
        height: 36px;
    }
    
    .metric-card .metric-content h3 {
        font-size: 0.65rem;
    }
    
    .metric-card .metric-value {
        font-size: 1.1rem;
    }
    
    .metric-card .metric-change {
        font-size: 0.6rem;
    }
    
    .chart-card {
        padding: 1rem;
    }
    
    .chart-header h3 {
        font-size: 0.85rem;
    }
    
    .bar-chart .bar-label {
        min-width: 50px;
        max-width: 80px;
        font-size: 0.65rem;
    }
    
    .pie-segment {
        padding: 0.5rem;
    }
    
    .pie-segment .segment-label {
        font-size: 0.7rem;
    }
    
    .pie-segment .segment-value {
        font-size: 0.7rem;
    }
    
    .problems-list .problem-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .problems-list .problem-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Impact metrics */
    .impact-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    
    .impact-item {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
    
    .impact-item .impact-info h4 {
        font-size: 0.7rem;
    }
    
    .impact-item .impact-value {
        font-size: 1.1rem;
    }
    
    .impact-item .impact-desc {
        font-size: 0.6rem;
    }
    
    /* Trend chart */
    .trend-chart .trend-line {
        padding: 0.5rem;
    }
    
    .trend-chart .trend-label {
        font-size: 0.75rem;
    }
    
    .trend-chart .trend-value {
        font-size: 0.75rem;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .metrics-overview {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .metric-card {
        padding: 0.5rem;
    }
    
    .metric-card .metric-icon {
        width: 28px;
        height: 28px;
    }
    
    .metric-card .metric-icon i {
        font-size: 0.75rem;
    }
    
    .metric-card .metric-content h3 {
        font-size: 0.55rem;
    }
    
    .metric-card .metric-value {
        font-size: 0.95rem;
    }
    
    .metric-card .metric-change {
        font-size: 0.5rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .chart-legend {
        flex-wrap: wrap;
    }
    
    .bar-chart .bar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .bar-chart .bar-label {
        max-width: 100%;
        width: 100%;
    }
    
    .bar-chart .bar-container {
        width: 100%;
    }
    
    .impact-metrics {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Modal responsiveness */
@media (max-width: 600px) {
    .metric-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .metric-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .metric-modal-header h3 {
        font-size: 1rem;
    }
    
    .metric-modal-content {
        padding: 1rem;
    }
    
    .metric-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-value {
        font-size: 1.25rem;
    }
}

/* Single period efficiency display */
.efficiency-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.efficiency-value {
    font-size: 3rem;
    font-weight: 700;
    color: #10b981;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.efficiency-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.efficiency-bar {
    width: 100%;
    max-width: 200px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.efficiency-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

@media (max-width: 768px) {
    .efficiency-value {
        font-size: 2.5rem;
    }
    
    .efficiency-label {
        font-size: 0.75rem;
    }
}

/* =====================================================
   MODAL DETAILS - Enhanced Styles
   ===================================================== */

/* Stats Row */
.modal-stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-stat {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.modal-stat.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.modal-stat.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.modal-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.modal-stat.success .modal-stat-value {
    color: #059669;
}

.modal-stat.danger .modal-stat-value {
    color: #dc2626;
}

.modal-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Section */
.modal-section {
    margin-top: 1.5rem;
}

.modal-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Sessions List */
.sessions-list {
    max-height: 280px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

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

.session-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-meta {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.session-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.session-status.solved {
    background: #dcfce7;
    color: #166534;
}

.session-status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* Mini Chart */
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 120px;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.mini-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.mini-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 4px 4px 0 0;
    margin-top: auto;
    min-height: 4px;
}

.mini-bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.mini-bar-label {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Ranking List */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ranking-position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.ranking-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.ranking-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
    border-radius: 4px;
}

.ranking-value {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 70px;
    text-align: right;
}

/* Category Rates */
.category-rates {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-rate-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-name {
    font-size: 0.8rem;
    color: #374151;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-rate-bar {
    flex: 1;
    height: 8px;
    background: #fee2e2;
    border-radius: 4px;
    overflow: hidden;
}

.category-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
}

.category-rate-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #10b981;
    min-width: 40px;
    text-align: right;
}

/* Distribution Chart */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.distribution-label {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 70px;
}

.distribution-bar-container {
    flex: 1;
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 4px;
}

.distribution-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    min-width: 30px;
    text-align: right;
}

/* Totals Grid */
.totals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.total-item i {
    font-size: 1.5rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.total-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.total-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

/* No data */
.no-data {
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    padding: 1rem;
}

/* Responsive adjustments for modal */
@media (max-width: 480px) {
    .modal-stats-row {
        gap: 0.5rem;
    }
    
    .modal-stat {
        padding: 0.75rem 0.5rem;
    }
    
    .modal-stat-value {
        font-size: 1.25rem;
    }
    
    .session-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .session-status {
        margin-top: 0.5rem;
    }
    
    .category-name {
        min-width: 80px;
        font-size: 0.7rem;
    }
    
    .ranking-value {
        min-width: 60px;
        font-size: 0.7rem;
    }
}

/* Ranking name style */
.ranking-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    min-width: 100px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .ranking-name {
        min-width: 60px;
        max-width: 80px;
        font-size: 0.75rem;
    }
}

/* =====================================================
   GESTÃO DE CONTEÚDOS - Modal & Toast Styles
   ===================================================== */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-form {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-form .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-form .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.modal-form .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-form .modal-close:hover {
    color: #1e293b;
}

.modal-form .modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Advanced Options */
.advanced-options {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.advanced-options summary {
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    font-size: 0.875rem;
}

.advanced-options[open] summary {
    margin-bottom: 1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Project Card Actions */
.project-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon.btn-edit {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-icon.btn-edit:hover {
    background: #0284c7;
    color: white;
}

.btn-icon.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.btn-delete:hover {
    background: #dc2626;
    color: white;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
    text-align: center;
    grid-column: 1 / -1;
}

.loading-state i,
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Responsive adjustments for KB modal */
@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-form {
        margin: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Password input with toggle visibility */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--gray-500);
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: var(--primary-500);
}

.password-match-message {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
}

.password-match-message.success {
    color: var(--success-500, #22c55e);
}

.password-match-message.error {
    color: var(--error-500, #ef4444);
}
