/* ============================================
   CarDealer - Estilos Customizados Profissionais
   ============================================ */

:root {
    --sidebar-width: 250px;
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

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

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: white;
    padding: 0;
    z-index: 1030;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
    padding: 0;
}

.sidebar-title {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background-color: var(--sidebar-hover);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-item i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================
   Navbar (DataBrasil Style)
   ============================================ */

.navbar-databrasil {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

.navbar-brand-text {
    color: var(--text-primary);
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.btn-nav-register {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white !important;
    border-radius: 8px;
    padding: 0.5rem 1.5rem !important;
}

.btn-nav-register:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ============================================
   Main Content
   ============================================ */

main {
    margin: 0 !important;
    padding: 0 !important;
}

.main-content {
    margin-left: var(--sidebar-width) !important;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width)) !important;
    transition: margin-left 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 1;
    padding: 0 !important;
    overflow-x: hidden;
}

/* Garantir que o conteúdo não fique atrás da sidebar */
body:has(.sidebar) .main-content,
body .main-content {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
}

/* Quando não tem sidebar, remover margin */
body:not(:has(.sidebar)) .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Forçar margem quando sidebar existe (fallback para navegadores sem suporte a :has) */
.sidebar ~ main.main-content {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
}

/* Páginas de autenticação sem padding */
body:has(.auth-container) main,
body:has(.auth-container) .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   Responsive - Mobile
   ============================================ */

@media (max-width: 768px) {
    /* Sidebar Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1050;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Overlay para fechar sidebar ao clicar fora */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Main Content Mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* Container Fluid Mobile */
    .container-fluid {
        padding: 1rem !important;
    }
    
    /* Navbar Mobile */
    .navbar {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    /* Cards Mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Títulos Mobile */
    h1, h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    /* Formulários Mobile */
    .form-control-lg {
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Grid Mobile */
    .row.g-4 > * {
        margin-bottom: 1rem;
    }
    
    /* Dashboard Cards Mobile */
    .card.bg-primary,
    .card.bg-success,
    .card.bg-info {
        margin-bottom: 1rem;
    }
    
    .card.bg-primary .fs-1,
    .card.bg-success .fs-1,
    .card.bg-info .fs-1 {
        font-size: 2rem !important;
    }
    
    /* Consultar Placa Mobile */
    .col-md-8 {
        padding: 0 !important;
    }
    
    /* Tipo de Consulta Cards Mobile */
    .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Tabelas Mobile */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    /* Botões Mobile */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* List Group Mobile */
    .list-group-item {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem;
    }
    
    /* Badges Mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Modais Mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    /* Input Groups Mobile */
    .input-group {
        flex-wrap: wrap;
    }
    
    /* hCaptcha Container Mobile */
    #hcaptcha-container {
        margin: 15px 0 !important;
        display: flex;
        justify-content: center;
    }
    
    /* Sidebar Logo Mobile */
    .sidebar-logo {
        max-width: 120px !important;
        max-height: 120px !important;
    }
    
    .sidebar-title {
        font-size: 1.25rem !important;
    }
    
    /* Nav Item Mobile */
    .nav-item {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem;
    }
    
    .nav-item i {
        font-size: 1.1rem !important;
    }
}

/* Mobile Extra Small */
@media (max-width: 576px) {
    .container-fluid {
        padding: 0.75rem !important;
    }
    
    h1, h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    .card-header h5 {
        font-size: 0.9rem !important;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.9rem !important;
    }
    
    .form-control-lg {
        font-size: 0.9rem !important;
        padding: 0.625rem !important;
    }
    
    /* Tipo de Consulta em coluna única */
    .col-md-4 {
        width: 100% !important;
        margin-bottom: 0.75rem;
    }
    
    /* Cards de tipo de consulta menores */
    .card.h-100 {
        min-height: auto;
    }
    
    .display-6 {
        font-size: 2rem !important;
    }
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-container {
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    margin: 0 !important;
    border: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.auth-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    overflow: visible !important;
    min-height: auto;
    position: relative;
    border: none !important;
}

.auth-card form {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
}

.auth-card .form-label {
    display: block !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    visibility: visible !important;
    opacity: 1 !important;
}

.auth-card .form-control {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 38px;
    position: relative;
    border: 2px solid var(--border-color);
}

.auth-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.auth-card .mb-3,
.auth-card .mb-4 {
    margin-bottom: 1.5rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative;
}

.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="email"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 38px;
    position: relative;
    z-index: 1;
}

.auth-card button[type="submit"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative;
    z-index: 1;
}

.auth-logo {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    text-align: center;
}

.auth-card .text-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

.auth-card .text-center img {
    margin: 0 auto !important;
    display: block !important;
}

/* ============================================
   Cards
   ============================================ */

.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.card-body {
    padding: 2rem;
}

.card-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

/* Cards de Features */
.features-section .card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 2px solid var(--border-color);
}

.features-section .card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(30, 64, 175, 0.02));
}

.features-section .card i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-section .card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.features-section .card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.features-section .card .fw-bold {
    font-size: 1.5rem;
    margin-top: 1rem;
}

/* ============================================
   Services Section (DataBrasil Style)
   ============================================ */

.services-section {
    background: white;
}

.service-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* ============================================
   Pricing Section (DataBrasil Style)
   ============================================ */

.pricing-section {
    background: #f8fafc;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.pricing-card-featured {
    border-color: var(--primary-color);
    border-width: 3px;
    position: relative;
}

.pricing-card-featured::before {
    content: 'Mais Popular';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 1;
}

.pricing-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.pricing-body {
    padding: 2rem 1.5rem;
    flex-grow: 1;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-features li i {
    color: var(--success-color);
    font-size: 1.1rem;
}

.pricing-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-pricing {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-pricing:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   Tables
   ============================================ */

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: #f8f9fa;
}

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

/* ============================================
   Hero Section (DataBrasil Style)
   ============================================ */

.hero-section-databrasil {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0;
}

.hero-section-databrasil::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-content-wrapper {
        padding: 0 1.5rem;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 10px rgba(0,0,0,0.1);
}

.hero-icon-wrapper {
    position: relative;
}

.hero-icon {
    font-size: 12rem;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.btn-hero-primary {
    background: white;
    color: #1e40af;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-hero-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #1e40af;
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: white;
    color: #1e40af;
    transform: translateY(-2px);
}

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

/* ============================================
   Badges
   ============================================ */

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* ============================================
   Forms
   ============================================ */

.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

/* ============================================
   Accordion (FAQ)
   ============================================ */

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background: var(--bg-white);
    border: none;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(30, 64, 175, 0.05));
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   Utilities
   ============================================ */

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
}

.rounded-lg {
    border-radius: 15px !important;
}

/* ============================================
   Modais de Notificação
   ============================================ */

/* Correções de Z-Index para Modais */
.modal {
    z-index: 1055 !important;
}

/* Modal Manual (sem Bootstrap) */
.modal.show {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    outline: 0 !important;
    z-index: 1055 !important;
}

#modalBackdropCreditos,
#modalBackdropDetalhes,
#modalBackdropExclusao {
    z-index: 1050 !important;
    cursor: pointer;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Garantir que o body não trave após fechar modal */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

/* Remover backdrop travado */
body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1060;
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
    font-size: 1.1rem;
}

.modal-footer {
    border-top: none;
    padding: 1rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-header .modal-title i {
    margin-right: 0.5rem;
}

/* Animação suave para modais */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* ============================================
   Responsive
   ============================================ */

/* ============================================
   Sections
   ============================================ */

section {
    padding: 4rem 0;
    width: 100%;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

section h2 {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

section .lead {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    background: white;
}

.about-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(30, 64, 175, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    height: 100%;
}

.about-card h4 {
    color: var(--primary-color);
    font-weight: 700;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ============================================
   Utilities
   ============================================ */

.min-vh-50 {
    min-height: 50vh;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .hero-section-databrasil {
        padding: 5rem 0;
    }
    
    .hero-content-wrapper {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-icon {
        font-size: 8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .pricing-card-featured::before {
        display: none;
    }
    
    .pricing-price {
        font-size: 2.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .display-4, .display-5 {
        font-size: 2rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* ============================================
   Dashboard Cards - Tamanhos Ajustados
   ============================================ */
.card.bg-primary .fs-1,
.card.bg-success .fs-1,
.card.bg-info .fs-1,
.card.bg-warning .fs-1 {
    font-size: 2.5rem !important;
}

.card.bg-primary h4,
.card.bg-success h4,
.card.bg-info h4,
.card.bg-warning h4 {
    font-size: 1.75rem !important;
    font-weight: 600;
}

.card.bg-primary h6,
.card.bg-success h6,
.card.bg-info h6,
.card.bg-warning h6 {
    font-size: 0.875rem !important;
    font-weight: 500;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-info .card-body,
.card.bg-warning .card-body {
    padding: 1.25rem !important;
}

@media (max-width: 768px) {
    .card.bg-primary .fs-1,
    .card.bg-success .fs-1,
    .card.bg-info .fs-1,
    .card.bg-warning .fs-1 {
        font-size: 2rem !important;
    }
    
    .card.bg-primary h4,
    .card.bg-success h4,
    .card.bg-info h4,
    .card.bg-warning h4 {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   Admin Interface - Estilos Profissionais
   ============================================ */

/* Cards do Admin */
.admin-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

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

.admin-card .card-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.admin-card .card-body {
    padding: 1.5rem;
}

/* Tabelas do Admin */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

/* ============================================
   Formulário de Recall
   ============================================ */

.recall-form-container {
    background: #fff;
    border-radius: 8px;
}

.recall-form-container .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recall-form-container .form-label i {
    color: #2563eb;
    font-size: 0.9rem;
}

.recall-form-container .form-control-plaintext {
    font-size: 0.95rem;
    color: #212529;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    word-break: break-word;
    line-height: 1.5;
}

.recall-form-container .form-control-plaintext.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

.recall-form-container .badge {
    font-size: 0.8rem;
    padding: 0.4em 0.7em;
}

.recall-form-container .list-unstyled {
    margin: 0;
    padding-left: 0;
}

.recall-form-container .list-unstyled li {
    padding: 0.25rem 0;
}

.recall-form-container .list-unstyled li .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 4px;
    padding: 0.75rem !important;
    margin-top: 0.5rem;
}

/* Responsive para Formulário de Recall */
@media (max-width: 768px) {
    .recall-form-container .col-md-6,
    .recall-form-container .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    .recall-form-container .form-label {
        font-size: 0.8rem;
    }
    
    .recall-form-container .form-control-plaintext {
        font-size: 0.875rem;
        min-height: 2.25rem;
    }
}

/* ============================================
   Página de API - Campos Reduzidos
   ============================================ */

#formApi_simples .form-control-sm,
#formApi_completa .form-control-sm,
#formApi_recall .form-control-sm,
#formApi_cnpj .form-control-sm,
#formApi_cpf .form-control-sm,
#formApi_simples .form-select-sm,
#formApi_completa .form-select-sm,
#formApi_recall .form-select-sm,
#formApi_cnpj .form-select-sm,
#formApi_cpf .form-select-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
    line-height: 1.5;
}

#formApi_simples textarea.form-control-sm,
#formApi_completa textarea.form-control-sm,
#formApi_recall textarea.form-control-sm,
#formApi_cnpj textarea.form-control-sm,
#formApi_cpf textarea.form-control-sm {
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

#formApi_simples .form-label.small,
#formApi_completa .form-label.small,
#formApi_recall .form-label.small,
#formApi_cnpj .form-label.small,
#formApi_cpf .form-label.small {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

#formApi_simples small.text-muted,
#formApi_completa small.text-muted,
#formApi_recall small.text-muted,
#formApi_cnpj small.text-muted,
#formApi_cpf small.text-muted {
    font-size: 0.75rem;
    line-height: 1.4;
}

#formApi_simples .card-body,
#formApi_completa .card-body,
#formApi_recall .card-body,
#formApi_cnpj .card-body,
#formApi_cpf .card-body {
    padding: 1rem;
}

#formApi_simples .card-header h6,
#formApi_completa .card-header h6,
#formApi_recall .card-header h6,
#formApi_cnpj .card-header h6,
#formApi_cpf .card-header h6 {
    font-size: 0.9rem;
}

/* Responsive para API */
@media (max-width: 768px) {
    .col-lg-6.col-xl-4 {
        margin-bottom: 1rem;
    }
}

/* Formulários do Admin */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-label.fw-semibold {
    font-weight: 600;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Botões do Admin */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Ícones de ação - Tamanho adequado e centralizados */
.table .btn-sm i,
.table .btn-group .btn i,
.btn-group .btn-sm i,
.btn-sm i.bi,
.table td .btn i,
.table td .btn-group i {
    font-size: 0.875rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

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

/* Botões de ação em tabelas - tamanho adequado */
.table .btn-sm,
.table td .btn-sm {
    padding: 0.4rem 0.6rem !important;
    min-width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
}

.btn-group .btn-sm {
    padding: 0.4rem 0.6rem !important;
    min-width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Garantir que ícones dentro de botões pequenos sejam menores */
button.btn-sm i,
a.btn-sm i,
.btn-sm > i {
    font-size: 0.65rem !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Modais do Admin */
.modal-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
}

/* Preview de Logo */
.logo-preview-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-container img {
    max-height: 120px;
    max-width: 200px;
    object-fit: contain;
}

/* Cards de Planos */
.plano-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.plano-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.plano-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
}

/* Responsividade Admin */
@media (max-width: 768px) {
    .admin-card .card-body {
        padding: 1rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    max-width: 350px;
}

.toast {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.toast-header {
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.toast-body {
    padding: 0.75rem 1rem;
    background: white;
}

.toast.show {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

