/* Variáveis de cores */
:root {
    --primary-color: #0d6efd;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

html {
    scroll-behavior: smooth;
}

/* Gerais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #2c3e50;
    color: white;
    padding: 0;
    z-index: 1000;
}

.sidebar.bg-dark {
    background-color: #2c3e50;
}

.sidebar.text-white {
    color: white;
}

.sidebar h5 {
    color: white;
    font-weight: 700;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    background-color: #f8f9fa;
}

.flex-grow-1 {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.min-vh-100 {
    min-height: 100vh !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-title {
    color: #333;
    font-weight: 600;
}

/* Tabelas */
.table {
    border-collapse: collapse;
}

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

.table th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Botões */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

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

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

/* Navbar */
.navbar {
    border-bottom: 1px solid #e9ecef;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alertas */
.alert {
    border: none;
    border-radius: 0.375rem;
}

/* Badges */
.badge {
    padding: 0.4rem 0.6rem;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Sidebar Navigation */
.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsividade */
@media (max-width: 1200px) {
    /* Tablets grandes */
    .sidebar {
        width: 220px;
    }
    
    .main-content,
    .flex-grow-1 {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
}

@media (max-width: 992px) {
    /* Tablets */
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .main-content,
    .flex-grow-1 {
        margin-left: 0;
        width: 100%;
    }

    .nav {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.5rem;
    }

    .nav-link {
        margin-bottom: 0 !important;
        margin-right: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .nav-link span {
        display: none;
    }

    .nav-link i {
        margin-right: 0 !important;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    /* Mobile */
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }

    .main-content,
    .flex-grow-1 {
        margin-left: 0;
        width: 100%;
        padding: 0.5rem;
    }

    .nav {
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 0.5rem;
    }

    .nav-link {
        margin-bottom: 0 !important;
        margin-right: 0.3rem !important;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        min-width: fit-content;
    }

    /* Ocultar textos e mostrar apenas ícones em mobile */
    .nav-link span {
        display: none;
    }

    .nav-link i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }

    /* Ajustes para formulários em mobile */
    .row > .col-md-6,
    .row > .col-md-4,
    .row > .col-md-3,
    .row > .col-md-8,
    .row > .col-md-12 {
        margin-bottom: 1rem;
    }
}

/* Landing page / home pública */
.landing-page-body {
    background: #f4f7fb;
    color: #0f172a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.landing-page-body .navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid #e5ebf3;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.landing-page-body .nav-link {
    color: #334155 !important;
    font-weight: 600;
}

.landing-page-body .nav-link:hover {
    color: #1d4ed8 !important;
}

.landing-page-body .navbar-brand .brand-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-page-body .hero-highlights {
    margin-top: 0.25rem;
}

.landing-page-body .hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
}

.landing-page-body .hero {
    min-height: 86vh;
    padding: 120px 0 90px;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 38%, rgba(2, 6, 23, 0.28) 100%),
        url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

.landing-page-body .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), transparent 30%, rgba(255,255,255,0.04));
    pointer-events: none;
}

.landing-page-body .hero h1 {
    font-size: 2.7rem;
    line-height: 1.15;
    color: white;
    max-width: 680px;
}

.landing-page-body .hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.06rem;
    line-height: 1.8;
    max-width: 620px;
}

.landing-page-body .hero-panel {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.16);
}

.landing-page-body .section-card {
    background: white;
    border: 1px solid #e7edf5;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.landing-page-body .section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.landing-page-body .section-card .icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    font-size: 1.2rem;
}

.landing-page-body .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
}

.landing-page-body .btn-outline-primary {
    color: #2563eb;
    border-color: #2563eb;
}

.landing-page-body .section-title {
    color: #0f172a;
    letter-spacing: -0.02em;
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.15;
}

.landing-page-body .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-page-body .section-intro {
    max-width: 720px;
    margin: 0 auto;
}

.landing-page-body .section-card .feature-list {
    padding-left: 1rem;
    margin: 0;
    color: #475569;
}

.landing-page-body .section-card .feature-list li {
    margin-bottom: 0.55rem;
}

.landing-page-body .section-card .feature-list li:last-child {
    margin-bottom: 0;
}

.landing-page-body .metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.landing-page-body .cta-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: white;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.landing-page-body .cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 32%);
    pointer-events: none;
}

.landing-page-body .cta-banner .btn-light {
    color: #1d4ed8;
    font-weight: 700;
}

/* Banner de consentimento LGPD */
.lgpd-banner {
    z-index: 1050;
    display: none;
    padding: 1rem 0;
    background: rgba(15, 23, 42, 0.96);
    color: white;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}

.lgpd-banner a {
    color: #93c5fd;
    text-decoration: underline;
}

.lgpd-banner .btn-success {
    background-color: #16a34a;
    border-color: #16a34a;
}

.lgpd-banner .btn-outline-light:hover {
    background: white;
    color: #0f172a;
}

@media (max-width: 768px) {
    .landing-page-body .hero {
        padding: 100px 0 70px;
    }

    .landing-page-body .hero h1 {
        font-size: 2.2rem;
    }

    .lgpd-banner .text-end {
        text-align: left !important;
        margin-top: 0.75rem;
    }
}

/* Landing page / home pública */
.landing-page-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef3f8 100%);
    color: #0f172a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.landing-page-body .navbar {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.landing-page-body .navbar-brand {
    color: #0f172a !important;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.landing-page-body .nav-link {
    color: #334155 !important;
    font-weight: 600;
}

.landing-page-body .nav-link:hover {
    color: #1d4ed8 !important;
}

.landing-page-body .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    padding: 0.45rem;
}

.landing-page-body .dropdown-item {
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    color: #334155;
}

.landing-page-body .dropdown-item:hover,
.landing-page-body .dropdown-item:focus {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.landing-page-body .hero {
    position: relative;
    min-height: 88vh;
    padding: 120px 0 100px;
    background:
        linear-gradient(100deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.80) 42%, rgba(2, 6, 23, 0.35) 100%),
        url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    color: white;
    overflow: hidden;
}

.landing-page-body .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 42%);
    pointer-events: none;
}

.landing-page-body .hero > .container {
    position: relative;
    z-index: 1;
}

.landing-page-body .hero .badge {
    background: rgba(255,255,255,0.14) !important;
    color: #e0f2fe !important;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-page-body .hero h1 {
    font-size: clamp(2.6rem, 4.8vw, 4rem);
    line-height: 1.05;
    color: white;
    max-width: 760px;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.landing-page-body .hero p {
    color: rgba(255,255,255,0.82);
    font-size: 1.06rem;
    line-height: 1.8;
    max-width: 620px;
}

.landing-page-body .hero-panel {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.18);
    border-radius: 24px;
}

.landing-page-body .section-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-page-body .section-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.landing-page-body .section-card .icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    font-size: 1.2rem;
}

.landing-page-body .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.22);
}

.landing-page-body .btn-outline-primary {
    color: #2563eb;
    border-color: #2563eb;
}

.landing-page-body .section-title {
    color: #0f172a;
    letter-spacing: -0.02em;
    font-size: clamp(2.3rem, 3.4vw, 3.1rem);
    line-height: 1.12;
}

.landing-page-body .section-title::after {
    content: '';
    display: block;
    width: 92px;
    height: 4px;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.landing-page-body .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-page-body .section-intro {
    max-width: 760px;
    margin: 0 auto;
}

.landing-page-body .section-card .feature-list {
    padding-left: 1rem;
    margin: 0;
    color: #475569;
}

.landing-page-body .section-card .feature-list li {
    margin-bottom: 0.55rem;
}

.landing-page-body .section-card .feature-list li:last-child {
    margin-bottom: 0;
}

.landing-page-body .metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.landing-page-body .cta-banner {
    background: linear-gradient(135deg, #07111f 0%, #123c9e 55%, #1d4ed8 100%);
    color: white;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 60px rgba(29, 78, 216, 0.22);
}

.landing-page-body .cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.24), transparent 32%);
    pointer-events: none;
}

.landing-page-body .cta-banner .btn-light {
    color: #1d4ed8;
    font-weight: 700;
}

.landing-page-body .back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.24);
    z-index: 1100;
}

/* Banner de consentimento LGPD */
.lgpd-banner {
    z-index: 1050;
    display: none;
    padding: 1rem 0;
    background: rgba(15, 23, 42, 0.96);
    color: white;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}

.lgpd-banner a {
    color: #93c5fd;
    text-decoration: underline;
}

.lgpd-banner .btn-success {
    background-color: #16a34a;
    border-color: #16a34a;
}

.lgpd-banner .btn-outline-light:hover {
    background: white;
    color: #0f172a;
}

@media (max-width: 768px) {
    .landing-page-body .hero {
        padding: 100px 0 70px;
    }

    .landing-page-body .hero h1 {
        font-size: 2.2rem;
    }

    .lgpd-banner .text-end {
        text-align: left !important;
        margin-top: 0.75rem;
    }
}

    /* Tabelas responsivas melhoradas */
    .table-responsive {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        vertical-align: middle;
    }

    /* Botões menores em mobile */
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Cards mais compactos */
    .card-body {
        padding: 1rem 0.75rem;
    }

    /* Títulos menores */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Alertas mais compactos */
    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Mobile pequeno */
    .main-content {
        padding: 0.25rem !important;
    }

    .card {
        margin-bottom: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    /* Esconder colunas menos importantes em telas muito pequenas */
    .table .d-none-mobile {
        display: none !important;
    }

    /* Stack elementos em coluna */
    .d-flex {
        flex-direction: column !important;
    }

    .d-flex.flex-row-mobile {
        flex-direction: row !important;
    }

    /* Inputs full width */
    .form-control,
    .form-select {
        width: 100%;
    }
}
