 :root {
    --primary: #1a4b8c;
    --primary-dark: #0f3261;
    --primary-light: #2a6eba;
    --secondary: #f9b13e;
    --accent: #0cb25e;
    --text: #2d3748;
    --text-light: #718096;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --success: #48bb78;
    --warning: #ecc94b;
    --danger: #f56565;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}
        
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--primary-dark);
    color: white;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

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

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary);
    border-left: 4px solid var(--secondary);
}

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

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--bg-white);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

/* Filters */
.filters-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.filters-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 16px;
}

.filters-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

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

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.filter-input {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Source Sans Pro', sans-serif;
    transition: all 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.2);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

/* Table */
.table-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--primary);
    color: white;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background-color: var(--primary-light);
}

th i {
    margin-left: 8px;
    font-size: 12px;
    opacity: 0.7;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

tbody tr:hover {
    background-color: #f8fafd;
}

td {
    padding: 16px;
    color: var(--text);
}

.subtext {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-top: 4px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background-color: #e6f7ee;
    color: var(--success);
}

.status-pending {
    background-color: #fef6e7;
    color: var(--warning);
}

.status-completed {
    background-color: #e6f0ff;
    color: var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border);
}

.pagination-info {
    color: var(--text-light);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 12px;
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background-color: var(--bg-light);
}

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

/* Responsividade */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    
    .logo h1, .nav-text {
        display: none;
    }
    
    .logo {
        justify-content: center;
    }
    
    .nav-item {
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px;
    }
    
    .logo {
        padding: 10px;
        justify-content: flex-start;
    }
    
    .logo h1 {
        display: block;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        gap: 5px;
    }
    
    .nav-item {
        padding: 10px;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    
    .nav-item:hover, .nav-item.active {
        border-left: none;
        border-bottom: 4px solid var(--secondary);
    }
    
    .nav-text {
        display: none;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .user-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}
        
.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}
        
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Botão do Chatbot */
.chatbot-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #1e3a8a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  color: white;
}

.chatbot-button:hover {
  background: #1e40af;
  transform: scale(1.1);
}

.chatbot-button .tooltip {
  position: absolute;
  right: 70px;
  background: #374151;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chatbot-button:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.chatbot-button .tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #374151;
}

/* Janela do Chat */
.chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: #1e3a8a;
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.header-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.status {
  font-size: 12px;
  opacity: 0.8;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mensagens */
.chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 80%;
  animation: fadeIn 0.3s ease;
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.bot-message .message-content {
  background: #f3f4f6;
  color: #374151;
}

.user-message .message-content {
  background: #1e3a8a;
  color: white;
}

/* Input */
.chatbot-input {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
}

#message-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  outline: none;
  font-size: 14px;
}

#message-input:focus {
  border-color: #1e3a8a;
}

#send-button {
  width: 44px;
  height: 44px;
  background: #1e3a8a;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#send-button:hover {
  background: #1e40af;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsivo */
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    height: 70vh;
    bottom: 90px;
    right: 20px;
    left: 20px;
  }

  .chatbot-button .tooltip {
    display: none;
  }
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  min-width: 100px;
}

.status-badge.concluido {
  background-color: #f5f5ff;
  color: #1a3e80;
}

.status-badge.pendente {
  background-color: #fff6e0;
  color: #d4a017;
}

.status-badge.ativo {
  background-color: #e7f9f0;
  color: #2d9c5b;
}


