/* ==========================================================================
   1. Variáveis Globais (Root)
   ========================================================================== */
:root {
    --primary-purple: #460087;
    --primary-purple-rgb: 70, 0, 135;
    --accent-purple: #5C40E8;
    --light-purple: #A495FF;

    --background-main: #FFFFFF;
    --background-sidebar: #FDFBFF;
    --background-alt: #F0EDF7;
    --background-hero: linear-gradient(135deg, rgba(123, 97, 255, 0.05), rgba(164, 149, 255, 0.05));

    --text-primary: #2C2A4A;
    --text-secondary: #7A7899;
    --text-light: #FDFBFF;
    --text-link: var(--primary-purple);
    --text-link-hover: var(--accent-purple);
    --text-success: #16a34a;
    --text-danger: #dc2626;

    --border-color: #E0DCEC;
    --border-color-light: #f0f0f0;
    --shadow-color: rgba(92, 64, 232, 0.1);
    --shadow-color-hover: rgba(92, 64, 232, 0.2);
}

/* ==========================================================================
   2. Estilos Globais e Tipografia
   ========================================================================== */
body {
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--background-main);
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--text-link-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

.display-4 {
    font-weight: 700;
    color: var(--primary-purple);
}

.text-primary {
    font-size: 36px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--primary-purple) !important;
}

/* ==========================================================================
   3. Layout Principal (Sidebar, Conteúdo da Página)
   ========================================================================== */
.sidebar {
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    padding: 1.5rem 1rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    border-right: 1px solid #f9f3ff;
}

.sidebar-header {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-brand:hover {
    color: var(--accent-purple);
}
.sidebar-brand i {
    font-size: 2rem;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav .nav-link {
    color: var(--text-secondary);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease, box-shadow 0.2s ease;
    font-size: 12px;
}
.sidebar-nav .nav-link i {
    margin-right: 1rem;
    font-size: 12px;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
}
.sidebar-nav .nav-link:hover {
    background-color: var(--background-alt);
    color: var(--primary-purple);
    padding-left: 24px;
}
.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}
.sidebar-nav .nav-link.active {
    background-color: var(--primary-purple);
    color: var(--text-light);
    font-weight: 600;
    box-shadow: 0 4px 10px var(--shadow-color-hover);
}
.sidebar-nav .nav-link.active:hover {
    background-color: var(--accent-purple);
    padding-left: 20px;
}
.sidebar-nav .nav-link.active i {
    color: var(--text-light);
}

.sidebar-footer {
    padding-top: 1.5rem;
    margin-top: auto;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.page-content {
    margin-left: 240px;
    padding: 22px 40px;
    flex-grow: 1;
    width: calc(100% - 240px);
    background-color: var(--background-main);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.main-area {
    flex-grow: 1;
}

.sidebar-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.75rem 0;
}

.sidebar-user-profile {
    padding: 0 0.5rem;
}
.sidebar-user-profile .btn-sm {
    font-size: 13px;
    padding: 5px 8px;
}
.sidebar-user-profile h6 {
    font-size: 15px;
    color: var(--text-primary);
}

#toggleSidebarBtn {
    border-radius: 6px;
}
#toggleSidebarBtn i {
    vertical-align: middle;
}

.page-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Ajustes em classes antigas para evitar conflitos */
.main-content { margin-top: 0; padding: 0; min-height: auto; }
.footer, .navbar { display: none; }

/* ==========================================================================
   4. Componentes (Botões, Cards, Formulários, Tabelas, Badges)
   ========================================================================== */

/* --- Botões --- */
.btn {
    border-radius: 8px;
    padding: 10px 19px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    border-width: 1px;
    font-size: 14px;
}
.btn:hover {
    transform: translateY(-2px);
}
.btn:focus {
    box-shadow: 0 0 0 4px var(--shadow-color);
}
.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}
.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: var(--text-light);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
    color: var(--text-light);
    box-shadow: 0 4px 12px var(--shadow-color-hover);
}

.btn-secondary {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: var(--text-light);
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: #6B88E5;
    border-color: #6B88E5;
    color: var(--text-light);
    box-shadow: 0 4px 12px rgba(134, 157, 255, 0.25);
}

/* Estilos para o filtro de categorias */
.dropdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center; /* Centraliza os botões */
}

.btn-outline-secondary.filter-btn {
    color: var(--text-secondary);
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 14px;
}
.btn-outline-secondary.filter-btn:hover {
    background-color: var(--background-alt);
    color: var(--primary-purple);
    border-color: var(--border-color);
}
.btn-outline-secondary.filter-btn.active {
    background-color: var(--primary-purple);
    color: var(--text-light);
    border-color: var(--primary-purple);
    transform: translateY(0);
}

.btn-gradient, .btn-contratar, .bnt-test {
    background: linear-gradient(to right, #460087, #992BFF);
    border-radius: 12px;
    font-size: 14px;
    border-color: #e0e0e0;
    color: white;
    padding: 10px 32px;
}
.btn-gradient:hover, .btn-contratar:hover, .bnt-test:hover {
    transition: .7s ease;
    background-color: var(--primary-purple);
    color: white;
}

.btn-outline-purple, .bnt-edit, .btn-integration {
    background-color: white;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--primary-purple);
    color: var(--primary-purple);
    padding: 10px 32px;
    transition: .7s ease;
}
.btn-outline-purple:hover, .bnt-edit:hover, .btn-integration:hover {
    background-color: var(--primary-purple);
    color: white;
}

.btn-dark-indigo, .bnt-api {
    background-color: #312e81;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid #312e81;
    padding: 10px 32px;
    transition: .7s ease;
}
.btn-dark-indigo:hover, .bnt-api:hover {
    background-color: #4338ca;
    border-color: #4338ca;
}
.btn-dark-indigo i, .bnt-api i {
    font-size: 13px;
    margin-right: 8px;
}

.btn-marketplace {
    background-color: var(--primary-purple);
    padding: 8px 16px;
    color: white;
    min-height: 40px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    gap: 4px;
}

.btn-table {
    background-color: transparent;
    border: none;
}

/* --- Cards --- */
.card {
    border-radius: 12px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #fbf8fd;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: none;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-color-hover);
}
.card-header {
    background-color: transparent;
    padding: 1rem 1.25rem;
    font-weight: 500;
    display: flex;
    color: var(--text-primary);
    gap: 16px;
    border: none;
}
.card-header .card-title {
     color: var(--text-primary);
     font-size: 16px;
     font-weight: 500;
}
.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.card-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}
.card-text.small {
    font-size: 13px;
}
.list-unstyled li {
    font-size: 13px;
}
.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}
.card-subtitle {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
}
.card-img-top {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background-color: transparent;
}

/* --- Formulários --- */
.form-control, .form-select, .form-control-edit {
    border-radius: 8px;
    border: 1px solid #e9e9e9;
    padding: 10px 15px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: var(--background-main);
    color: #747474;
    font-size: 12px;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.form-control:focus, .form-select:focus, .form-control-edit:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.2);
    background-color: var(--background-main);
    outline: none;
}
.input-group .btn {
    z-index: 2;
    font-size: 14px;
}
.input-group > .form-control, .input-group > .form-floating, .input-group > .form-select {
    padding-left: 10px;
}
.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.375rem;
    padding-left: 15px;
}
.form-text {
    font-size: 12px;
}

/* --- Tabelas --- */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table th, .table td {
    border: none;
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
}
.table th {
    color: #686868;
    font-weight: 500;
    text-align: left;
    font-size: 14px;
}
.table-hover tbody tr:hover {
    background-color: var(--background-alt);
}
.table code {
    background-color: var(--background-alt);
    padding: 3px 6px;
    border-radius: 4px;
    color: var(--accent-purple);
    font-size: 13px;
}
.table .badge {
    font-size: 13px;
    padding: 6px 10px;
}
.table-transparent-bg {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(70, 0, 135, 0.07);
}
.table-transparent-bg th, .table-transparent-bg td {
    background-color: transparent;
}
.table-transparent-bg thead th {
    border-bottom: 1px solid var(--border-color-light);
}

/* --- Badges --- */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 12px;
    font-size: 12px;
}
.badge.bg-primary-custom {
    background-color: var(--primary-purple) !important;
    color: var(--text-light);
}
.badge.bg-secondary-custom {
    background-color: var(--primary-purple) !important;
    color: var(--text-light);
}
.badge.bg-light-purple {
    border: 1px solid #ebebeb;
    border-radius: 20px;
    color: var(--primary-purple);
}
.badge.bg-tertiary {
    background-color: var(--light-purple) !important;
    color: var(--text-primary) !important;
}

/* ==========================================================================
   5. Seções Específicas e Elementos de Página
   ========================================================================== */
.hero-section {
    background: #f9f3ff;
    border-radius: 25px;
    padding: 24px 40px;
    margin-bottom: 2rem;
    text-align: center;
    align-items: center;
}
.hero-section .lead {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 16px;
}

.hero-section-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(70, 0, 135, 0.03), rgba(164, 149, 255, 0.03));
    padding: 24px 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
}
.hero-text h1 {
    margin-bottom: 0.25rem;
    font-size: 2rem;
    font-weight: 600;
}
.hero-text p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}
.hero-stats-and-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--background-main);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(var(--primary-purple-rgb), 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease-in-out;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--primary-purple-rgb), 0.12);
}
.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(var(--primary-purple-rgb), 0.1);
    border-radius: 50%;
    color: var(--primary-purple);
    flex-shrink: 0;
}
.stat-card-icon .bi {
    font-size: 1.5rem;
    line-height: 1;
}
.stat-card-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}
.stat-card-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-success);
    line-height: 1.2;
}

.integration-card {
    transition: transform 0.3s ease;
}
.integration-card:hover {
    transform: scale(1.03) translateY(-3px);
}
.integration-icon {
    background: var(--background-hero);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: var(--primary-purple);
}
.integration-icon .display-3 {
    font-size: 2.5rem;
}

.popular-integration {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-align: center;
}
.popular-integration:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}
.popular-integration .bg-light {
    background-color: var(--background-alt) !important;
}
.popular-integration small {
    font-size: 13px;
}

.agent_area {
    border: 1px solid var(--border-color) !important;
    font-size: 11px !important;
    color: var(--primary-purple) !important;
    padding: 5px 11px !important;
    border-radius: 32px !important;
}
.agent_footer {
    border-top: 1px solid var(--border-color-light);
    padding-top: 20px;
}
.text-sucess {
    color: var(--text-success);
    font-weight: 400;
    font-size: 20px;
}
.background-icon {
    background-color: #F6EBFF;
    width: 50px;
    height: 50px;
    justify-self: center;
    align-content: center;
    border-radius: 15px;
}
.bi-currency-dollar {
    color: var(--primary-purple);
    font-size: 20px;
}
.card-dash-my-team {
    font-size: 14px;
    font-weight: 500;
}
.card-dash-my-team-money {
    font-weight: 600 !important;
    font-size: 28px;
    margin-top: -12px;
    color: var(--text-success);
}
.card-my-team.card-body {
    height: 140px !important;
}
.bi-circle-fill {
    font-size: 4px;
    margin-right: 8px;
    color: var(--text-secondary);
}
.funtions {
    color: var(--text-secondary);
}
.bi-cpu {
    font-size: 12px;
    margin-right: 4px;
}
.card-category {
    font-size: 12px;
    border: 1px solid var(--primary-purple);
    border-radius: 50px;
    width: 150px;
    align-self: center;
}
.bi-pencil-square, .bi-chat {
    font-size: 12px;
    margin-right: 8px;
}
.bi-file-earmark-check {
    margin-right: 8px;
    font-size: 15px;
    background-color: #f6ebff;
    padding: 4px 8px;
    border-radius: 10px;
    color: var(--primary-purple);
}
.bi-2 {
    font-size: 15px !important;
}
.bi-trash3 {
    color: var(--text-danger);
    font-size: 15px;
}
.bi-eye {
    font-size: 15px;
}
.bi-tools {
    margin-right: 8px;
    font-size: 20px;
    background-color: #f6ebff;
    padding: 4px 8px;
    border-radius: 10px;
    color: var(--primary-purple);
}
.number-tools {
    font-size: 14px;
    background-color: white;
    border: 1px solid #f6edff;
    padding: 2px 8px;
    border-radius: 32px;
    margin-left: 4px;
}
.list-group-transparent {
    padding: 0;
}
.list-group-transparent .list-group-item {
    background-color: transparent;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 30px;
}
.list-group-transparent .list-group-item:last-child {
    margin-bottom: 0;
}
.list-group-transparent .list-group-item:hover {
    background-color: var(--background-alt);
    border-color: var(--accent-purple);
}
.icon-tool {
    align-self: center;
    margin-right: 8px;
    font-size: 20px;
    background-color: #f6ebff;
    padding: 4px 8px;
    border-radius: 10px;
    color: var(--primary-purple);
}

/* ==========================================================================
   6. Estilos de Autenticação (Login/Register)
   ========================================================================== */
.auth-page-body {
    font-family: 'Poppins', sans-serif;
    background-color: #F9FAFB;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.auth-logo-inner {
    width: 32px;
    height: 32px;
    background-color: #FFFFFF;
    border-radius: 8px;
}
.auth-main-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
}
.auth-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}
.auth-form-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 1px solid var(--border-color);
}
.auth-page-body .nav-pills {
    background-color: var(--background-alt);
    border-radius: 12px;
    padding: 4px;
}
.auth-page-body .nav-pills .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.auth-page-body .nav-pills .nav-link.active {
    background-color: #FFFFFF;
    color: var(--primary-purple);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.auth-page-body .form-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}
.auth-page-body .form-control {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    background-color: #F9FAFB;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 16px;
}
.auth-page-body .form-control:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(70, 0, 135, 0.15);
    background-color: #FFFFFF;
}
.auth-page-body .input-group .form-control {
    padding-left: 12px;
}
.auth-page-body .input-group-text {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    color: var(--text-secondary);
}
.auth-page-body .form-control:focus ~ .input-group-text,
.auth-page-body .input-group:focus-within .input-group-text {
     border-color: var(--primary-purple);
     box-shadow: none;
}
.auth-password-toggle {
     border-left: 0;
     cursor: pointer;
}
.auth-forgot-password a {
    font-size: 14px;
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
}
.auth-forgot-password a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}
.auth-page-body .btn-primary {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: var(--text-light);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}
.auth-page-body .btn-primary:hover, .auth-page-body .btn-primary:focus {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}
.auth-page-body .modal-content {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px var(--shadow-color-hover);
}
.auth-page-body .modal-header, .auth-page-body .modal-footer {
    border: none;
}
.auth-page-body .modal-title {
    font-size: 20px;
}
.auth-page-body .fs-5 {
    font-size: 20px !important;
}
.auth-page-body p.small {
    font-size: 14px;
}

/* ==========================================================================
   7. Estilos para Modais e Componentes Modernos
   ========================================================================== */

/* --- Chat --- */
.chat-message {
    margin-bottom: 10px;
    display: flex;
}
.chat-message-user {
    justify-content: flex-end;
}
.chat-message-agent, .chat-message-agent-typing, .chat-message-agent-error {
    justify-content: flex-start;
}
.message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
}
.chat-message-user .message-bubble {
    background-color: #0d6efd;
    color: white;
}
.chat-message-agent .message-bubble {
    background-color: #e9ecef;
    color: #212529;
}
.chat-message-agent-typing .message-bubble {
    background-color: #e9ecef;
    color: #6c757d;
    font-style: italic;
}
.chat-message-agent-error .message-bubble {
    background-color: #f8d7da;
    color: #842029;
}

/* --- Modais --- */
.modal-content {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-color-hover);
}
.modal-header {
    background-color: var(--background-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}
.modal-header .modal-title {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 18px;
}
.modal-footer {
    background-color: var(--background-alt);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}
.modal-body .nav-tabs {
    border-bottom-color: var(--border-color);
}
.modal-body .nav-tabs .nav-link {
    color: var(--text-secondary);
    border-bottom-width: 2px;
    padding: 10px 16px;
    font-size: 14px;
}
.modal-body .nav-tabs .nav-link.active {
    color: var(--primary-purple);
    border-color: var(--primary-purple) var(--primary-purple) var(--background-main);
    font-weight: 500;
}
.modal-body .tab-content {
    padding-top: 1rem;
}

/* --- Modal Moderno --- */
.modal-modern {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: none;
}
.modal-modern-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-modern-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}
.modal-modern-header .btn-close {
    font-size: 1rem;
}
.modal-modern-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
}
.modal-modern-footer {
    padding: 1.5rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
.modal-modern-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    text-align: center;
}
.modal-modern-empty-state svg {
    margin-bottom: 1rem;
}

/* --- Lista de Tarefas (Modal) --- */
.modal-modern-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.task-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out;
}
.task-item:hover {
    background-color: #f9fafb;
}
.task-item-icon-wrapper {
    padding: 0.5rem;
    border-radius: 9999px;
    margin-right: 1rem;
}
.task-item-icon-wrapper svg {
    height: 1.25rem;
    width: 1.25rem;
}
.task-item-details {
    flex-grow: 1;
}
.task-item-title {
    font-weight: 500;
    color: #1f2937;
    margin: 0;
}
.task-item-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}
.task-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}
.task-item-delete-btn {
    color: #9ca3af;
    background-color: transparent;
    border: none;
    padding: 0;
    opacity: 0;
    transition: all 0.2s ease-in-out;
}
.task-item:hover .task-item-delete-btn {
    opacity: 1;
}
.task-item-delete-btn:hover {
    color: #ef4444;
}

/* --- Tags de Frequência --- */
.frequency-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.tag-gray { background-color: #e5e7eb; color: #374151; }
.tag-blue { background-color: #dbeafe; color: #1e40af; }
.tag-green { background-color: #d1fae5; color: #065f46; }
.tag-orange { background-color: #ffedd5; color: #9a3412; }

/* --- Botões Modernos --- */
.btn-modern-secondary, .btn-modern-primary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.btn-modern-secondary {
    color: #374151;
    background-color: #ffffff;
    border-color: #d1d5db;
}
.btn-modern-secondary:hover {
    background-color: #f9fafb;
}
.btn-modern-primary {
    color: #ffffff !important;
    background-color: var(--primary-purple) !important;
    border-color: var(--primary-purple) !important;
}
.btn-modern-primary:hover {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* --- Formulários Modernos --- */
.form-modern-group { margin-bottom: 1.25rem; }
.form-modern-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.form-modern-input, .form-modern-select, .form-modern-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: var(--background-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-modern-input:focus, .form-modern-select:focus, .form-modern-textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(var(--primary-purple-rgb), 0.15);
}
.form-modern-textarea {
    min-height: 100px;
    resize: vertical;
}
.form-modern-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}
.form-modern-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.form-modern-check-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}
.form-modern-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 1.25rem;
    width: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 9999px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: 0.75rem;
    flex-shrink: 0;
    display: grid;
    place-content: center;
}
.form-modern-check-input[type="checkbox"] {
    border-radius: 0.375rem;
}
.form-modern-check-input::before {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--primary-purple);
}
.form-modern-check-input[type="checkbox"]::before {
    background-color: var(--primary-purple);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    box-shadow: none;
}
.form-modern-check-input:checked {
    border-color: var(--primary-purple);
}
.form-modern-check-input:checked::before {
    transform: scale(1);
}
.form-modern-check-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}
.form-modern-options-group {
    margin-left: 2rem;
    padding-left: 0.75rem;
    margin-top: 0.75rem;
    border-left: 2px solid var(--border-color);
}
.form-modern-check-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.form-modern-check-inline-group .form-modern-check-group {
    margin-bottom: 0;
}

/* --- Modal API --- */
.api-modal-content {
    background-color: #1f2937;
    border-radius: 12px;
    border: 1px solid #4b5563;
    color: #d1d5db;
}
.api-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #374151;
}
.api-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb;
}
.btn-close-api {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
}
.btn-close-api:hover { color: white; }
.btn-close-api svg { width: 24px; height: 24px; }
.api-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    max-height: 70vh;
}
.api-modal-subtitle {
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 8px;
}
.api-code-block {
    background-color: rgba(17, 24, 39, 0.7);
    border-radius: 8px;
    padding: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.api-code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.api-code-block code {
    font-family: monospace;
    font-size: 0.875rem;
}
.api-code-block .copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 12px;
}
.api-code-block .copy-btn svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}
.api-code-block .copy-btn:hover svg { color: white; }
.api-code-block .copy-btn .icon-copied { color: #4ade80; }
.hidden-copy-text { display: none; }
.api-method { font-weight: bold; color: #4ade80; }
.api-url { color: #d1d5db; }
.language-json .punc { color: #6b7280; }
.language-json .key { color: #93c5fd; }
.language-json .string { color: #86efac; }
.language-json .bool { color: #c4b5fd; }

/* --- Card de Agente --- */
.agent-card {
    background: var(--background-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
}
.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07), 0 0 20px var(--shadow-color);
    border-color: rgba(88, 4, 167, 0.4);
}
.agent-card-header, .agent-card-body, .agent-card-footer {
    position: relative;
    z-index: 1;
    padding: 20px;
    justify-content: space-between;
}
.agent-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}
.agent-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 1;
    overflow: hidden;
}
.agent-price-tag {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-success);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 10px;
}
.agent-price-tag .price-period {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 4px;
}
.agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-purple);
    flex-shrink: 0;
}
.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.agent-title h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.agent-area-tag {
    background: rgba(88, 4, 167, 0.1);
    color: var(--primary-purple);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
.agent-card-body {
    flex-grow: 1;
}
.agent-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}
.agent-details-grid {
    display: grid;
    gap: 16px;
}
.detail-item h6 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}
.detail-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.detail-list .bi {
    color: var(--text-success);
    font-size: 0.9rem;
}
.detail-empty {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}
.detail-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.detail-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}
.detail-badge.llm { background: rgba(37, 99, 235, 0.1); color: #3b82f6; }
.detail-badge.tool { background: rgba(217, 119, 6, 0.1); color: #f59e0b; }
.detail-badge.integration { background: rgba(22, 163, 74, 0.1); color: #22c55e; }
.agent-card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    background-color: #F9FAFB;
}
.btn-group-modern {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.btn-modern {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-modern:hover {
    background: #F3F4F6;
    color: var(--text-primary);
    border-color: #D1D5DB;
}
.btn-modern i {
    font-size: 1.1rem;
}
.btn-modern-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}
.btn-modern-danger:hover {
    background-color: #f5c2c7;
    color: #721c24;
    border-color: #f1b0b7;
}
.btn-modern-danger i, .btn-modern-danger span {
    color: #842029;
}

/* --- Modal de Contratação --- */
.hiring-modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-color-hover);
}
.hiring-modal-svg-container {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem auto;
    background-color: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hiring-modal-svg-container .bi-exclamation-triangle-fill {
    font-size: 2rem;
    color: #ef4444;
}
.hiring-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.hiring-modal-text {
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 auto 1.25rem;
    line-height: 1.6;
}
.hiring-modal-list {
    text-align: left;
    display: inline-block;
    margin-bottom: 1.25rem;
}
.hiring-modal-list li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hiring-modal-list li .bi-x-circle-fill {
    color: #ef4444;
    flex-shrink: 0;
}
.hiring-modal-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-direction: column;
}
.btn-modal-secondary, .btn-modal-danger, .btn-modal-primary {
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid;
    transition: all 0.2s ease;
    width: 100%;
}
.btn-modal-secondary {
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    color: #374151;
}
.btn-modal-secondary:hover {
    background-color: #d1d5db;
}
.btn-modal-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.btn-modal-danger:hover {
    background-color: var(--text-danger);
    border-color: var(--text-danger);
}
.btn-modal-primary {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: var(--text-light);
}
.btn-modal-primary:hover {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ==========================================================================
   8. Responsividade
   ========================================================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        box-shadow: none;
        padding: 1rem;
    }
    .page-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem 1rem;
    }
    .sidebar-header, .sidebar-footer {
        text-align: center;
    }
    .sidebar-nav .nav-link {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    .sidebar-nav .nav-link i {
        margin-right: 0.75rem;
    }
    .modal-xl { max-width: 95%; }
    .modal-lg { max-width: 90%; }
    .display-4 { font-size: 1.8rem; }
    .hero-section { padding: 2rem 1rem; }
    .page-footer { padding: 1rem 0; }
    .hero-section-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .hero-stats-and-actions {
        width: 100%;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 1rem;
    }
    .stat-card {
        justify-content: flex-start;
        width: 100%;
    }
    .btn-marketplace {
        justify-content: center;
    }

    /* Estilos específicos para página de configurações em mobile */
    .config-container {
        padding: 0 1rem;
    }
    
    .config-grid {
        gap: 1.5rem;
    }
    
    .config-card {
        padding: 1rem;
    }
    
    .config-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .config-card .card-title .bi {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }
    
    /* Integration items responsivos */
    .integration-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .integration-info {
        width: 100%;
    }
    
    .integration-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .integration-logo {
        width: 24px;
        height: 24px;
        margin-right: 0.75rem;
    }
    
    .integration-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .integration-description {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    /* Botões de configuração em mobile */
    .btn-config {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Modais em mobile */
    .modal-panel {
        margin: 1rem;
        max-width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn-config {
        width: 100%;
    }
    
    /* Drop zone em mobile */
    .drop-zone {
        padding: 1.5rem 1rem;
    }
    
    .drop-zone-text-bold {
        font-size: 1rem;
    }
    
    .drop-zone-text {
        font-size: 0.875rem;
    }
    
    /* Formulários em mobile */
    .form-control-config {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    /* Input group em mobile */
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .input-group .form-control-config {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .input-group .btn-config {
        width: 100%;
        margin-top: 0;
    }
    
    /* Grid de botões no input group */
    .input-group .btn-config:not(:first-child) {
        margin-top: 0.5rem;
    }
}

/* Estilos para telas muito pequenas (smartphones) */
@media (max-width: 480px) {
    .config-container {
        padding: 0 0.75rem;
    }
    
    .config-card {
        padding: 0.75rem;
    }
    
    .config-card .card-title {
        font-size: 1rem;
    }
    
    .integration-item {
        padding: 0.75rem 0;
    }
    
    .integration-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .integration-actions .btn-config {
        width: 100%;
    }
    
    /* Status indicators em mobile */
    .status-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .modal-panel {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        border-radius: 0.75rem;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 0.75rem;
    }
    
    .drop-zone {
        padding: 1rem 0.75rem;
    }
    
    .form-control-config {
        padding: 0.5rem;
    }
    
    .btn-config {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .hero-section-modern {
        padding: 1rem 0;
    }
    
    .hero-section-modern h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-section-modern p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Melhorar espaçamento geral */
    .page-content {
        padding: 1rem 0.75rem;
    }
    
    /* Ajustar grid para mobile muito pequeno */
    .config-grid {
        gap: 1rem;
    }
}

@media (min-width: 576px) {
    .hiring-modal-actions {
        flex-direction: row;
    }
    .btn-modal-secondary, .btn-modal-danger, .btn-modal-primary {
        width: 150px;
    }
}

/* ==========================================================================
   9. Estilos para Ícones (Feather Icons)
   ========================================================================== */
i[data-feather] {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    stroke-width: 2.5;
}
i[data-feather].feather-sm {
    width: 14px;
    height: 14px;
}
i[data-feather].feather-xs {
    width: 12px;
    height: 12px;
}
.btn i[data-feather] {
   margin-bottom: -1px;
}
.display-4 i[data-feather] {
    width: 48px;
    height: 48px;
    stroke-width: 2;
}
#toggleSidebarBtn i[data-feather] {
    width: 18px;
    height: 18px;
}

/* Estilo para o aviso de custos no card do agente */
.cost-warning-box {
    background-color: var(--background-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 10px; /* Tamanho da fonte ajustado */
    padding: 8px 12px;
    line-height: 1.4; /* Melhora a legibilidade */
    margin-top: auto; /* Empurra para o final do card-body */
}

.cost-warning-box .bi-info-circle {
    color: var(--text-secondary);
}

@media (max-width: 576px) {
    .agent_footer {
        flex-direction: column;
        align-items: stretch; /* Make items take full width */
        gap: 1rem; /* Add some space between the items when stacked */
    }

    .agent_footer .price-tag {
        text-align: center; /* Center the price tag content */
    }

    .agent_footer .btn-contratar {
        width: 100%; /* Make button take full width */
    }
}

@media (max-width: 1080px) {
    .agent-card-header {
        /* Permite que o texto do nome quebre em vez de empurrar o preço */
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-group-modern {
        /* Para 7 botões, um grid de 4 colunas fica bom em tablets */
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Em telas de celular (a partir de 767px para baixo) */
@media (max-width: 1080px) {
    .agent-card-header {
        /* Força o empilhamento vertical do cabeçalho */
        flex-direction: column;
        align-items: flex-start;
    }

    .agent-info-left {
        /* Garante que a parte da esquerda ocupe toda a largura */
        width: 100%;
    }

    .agent-price-tag {
        /* Posiciona o preço no canto direito do card */
        align-self: flex-end;
        margin-left: 0;
        margin-top: 8px; /* Adiciona um espaço superior */
        font-size: 1.2rem; /* Aumenta um pouco para dar destaque */
    }

    .btn-group-modern {
        /* Em celulares menores, 3 colunas é mais adequado */
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Em telas muito pequenas (a partir de 420px para baixo) */
@media (max-width: 420px) {
    .btn-group-modern {
        /* Em telas bem estreitas, 2 colunas para não espremer os botões */
        grid-template-columns: repeat(2, 1fr);
    }

    .agent-title h5 {
        font-size: 1rem;
    }

    .agent-card-header, .agent-card-body, .agent-card-footer {
        /* Diminui o padding interno do card para ganhar mais espaço */
        padding: 16px;
    }
}

.config-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layout */
.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .lg-col-span-1 {
        grid-column: span 1 / span 1;
    }
    .lg-col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Cards de Configuração */
.config-card {
    background-color: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(92, 64, 232, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.config-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.config-card .card-title .bi {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-purple);
}

/* Formulários dentro dos Cards */
.config-card .form-group {
    margin-bottom: 1rem;
}

.config-card .form-group:last-of-type {
    margin-bottom: 0;
}

.config-card .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563; /* text-gray-600 */
    margin-bottom: 0.25rem;
}

.form-control-config {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--background-alt);
    border: 1px solid var(--border-color);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-config:disabled {
    cursor: not-allowed;
    background-color: #f3f4f6; /* gray-100 */
}

/* Botões */
.btn-config {
    width: 100%;
    margin-top: auto; /* Alinha o botão na base do card */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary-custom {
    background-color: var(--primary-purple);
    color: white;
}
.btn-primary-custom:hover {
    background-color: var(--accent-purple);
}
.btn-primary-custom:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary-custom {
    background-color: #fff;
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn-secondary-custom:hover {
    background-color: var(--background-alt);
    color: var(--text-primary);
}

/* Seção de Integrações */
.integrations-list {
    border-top: 1px solid var(--border-color);
}
.integration-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.integration-item:first-child {
    padding-top: 1.5rem;
}
.integration-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.integration-info {
    display: flex;
    align-items: center;
}

.integration-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 1rem;
}

.integration-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.integration-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.integration-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.status-connected {
    background-color: #22c55e; /* green-500 */
}
.status-disconnected {
    background-color: #ef4444; /* red-500 */
}

/* Estilos de Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal-overlay.hidden {
    display: none;
}

.modal-panel {
    position: relative;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 32rem; /* 512px */
    margin: 1rem;
    transition: all 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-close-btn {
    color: #9ca3af; /* gray-400 */
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}
.modal-close-btn:hover {
    background-color: #e5e7eb; /* gray-200 */
    color: #111827; /* gray-900 */
    border-radius: 0.5rem;
}
.modal-close-btn .bi {
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}
.modal-body .form-group:last-of-type {
    margin-bottom: 0;
}
.modal-text {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.code-inline {
    background-color: #f3f4f6; /* gray-100 */
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
}
.modal-footer .btn-config {
    width: auto;
    padding: 0.625rem 1.5rem;
}

/* Zona de Upload */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.drop-zone.active, .drop-zone:hover {
    border-color: var(--accent-purple);
    background-color: rgba(92, 64, 232, 0.05);
}
.drop-zone .bi {
    font-size: 3rem;
    color: var(--primary-purple);
}
.drop-zone-text-bold {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151; /* gray-700 */
    margin-top: 0.75rem;
}
.drop-zone-text {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}
.drop-zone label {
    cursor: pointer;
}

/* Informações do Arquivo */
.file-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #eff6ff; /* blue-50 */
    border: 1px solid #bfdbfe; /* blue-200 */
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.file-info.hidden, .upload-error.hidden {
    display: none;
}
.file-info-details {
    display: flex;
    align-items: center;
}
.file-info-details .bi {
    color: #2563eb; /* blue-600 */
    font-size: 1.5rem;
    margin-right: 0.75rem;
}
#file-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e40af; /* blue-800 */
}
#file-size {
    font-size: 0.75rem;
    color: #1d4ed8; /* blue-700 */
}
.remove-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3b82f6; /* blue-500 */
}
.remove-file-btn:hover {
    color: #1d4ed8; /* blue-700 */
}

/* Mensagem de Erro */
.upload-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fee2e2; /* red-50 */
    border: 1px solid #fecaca; /* red-200 */
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
}
.upload-error .bi {
    color: #dc2626; /* red-600 */
    font-size: 1.25rem;
    margin-right: 0.75rem;
}
#error-message {
    font-size: 0.875rem;
    color: #b91c1c; /* red-800 */
}

/* Animação de Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    animation: spin 1s linear infinite;
}
.hidden {
    display: none;
}
