/* ═════════════════════════════════════════════════════════════════════════
   GLOBAL CSS - ESTRUTURA BASE (LIMPO)
   Salvar em: public/css/global.css
   ═════════════════════════════════════════════════════════════════════════ */

/* 1. RESET E CONFIGURAÇÕES GERAIS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: transparent;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Imagem de fundo padrão - Caminho absoluto para funcionar em todos os níveis */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Caminho absoluto a partir da raiz do servidor */
    background-image: url('../img/imagem1.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 1;
    z-index: -1;
}

/* Fundo azul para login (Global) */
body.login-body {
    background: #143b63 !important;
}

body.login-body::before {
    opacity: 0.3;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* 2. CONTAINERS BASE */
.container {
    max-width: 450px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 40px auto;
}

.container-lg {
    max-width: 1400px;
    width: 95%;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    margin: 20px auto;
}

/* 3. FORMULÁRIOS E INPUTS */
label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 15px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Botões Gerais de Formulário */
button[type="submit"],
.btn-modern-login {
    width: 100%;
    padding: 12px;
    margin-top: 25px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background: #4CAF50;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

button[type="submit"]:hover,
.btn-modern-login:hover {
    background: #43a047;
}

.btn-modern-login {
    padding: 15px;
    margin-top: 15px;
    background: #1e293b;
}

.btn-modern-login:hover {
    background: #334155;
    transform: translateY(-2px);
}

/* 4. ALERTAS E BADGES */
.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.erro {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.sucesso {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-pendente {
    background: #fff3cd;
    color: #856404;
}

.badge-ativo {
    background: #d4edda;
    color: #155724;
}

/* 5. TABELAS (ESTRUTURA) */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff; /* Garantia de fundo branco */
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.tabela th,
.tabela td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.tabela th {
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tabela tr:hover {
    background: #f1f5f9;
}

code {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #475569;
}

/* 6. BARRA DE PESQUISA (BASE) */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
}

.search-form input {
    margin-top: 0;
    flex: 1;
}

/* 7. BOTÕES E LINKS */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-voltar {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    color: #64748b;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.acoes {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* 8. CARDS E ANIMAÇÕES */
.form-card {
    max-width: 400px;
    margin: 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.pulse-slow {
    animation: pulse-animation 3s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ═════════════════════════════════════════════════════════════════════════
   9. LANDING PAGE (INDEX.PHP PUBLIC)
   ═════════════════════════════════════════════════════════════════════════ */

/* Configurações Gerais Landing Page */
html.landing-page-html {
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

body.landing-page {
    background: radial-gradient(circle at center, #f8fafc, #cbd5e1);
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    font-family: 'Inter', sans-serif;
    position: relative;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

body.landing-page::before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: url('../img/imagem1.jpg');
    background-size: cover;
    opacity: 0.10;
    z-index: -10;
    filter: grayscale(80%);
}

/* Animações de Fundo */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -5;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: floatDynamic 20s infinite alternate ease-in-out;
}

@keyframes floatDynamic {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 30px) rotate(10deg); }
}

.shape-1 {
    top: -10%;
    left: -5%;
    width: 700px;
    height: 700px;
    background: rgba(20, 59, 99, 0.2);
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: rgba(37, 99, 235, 0.15);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 30%;
    width: 400px;
    height: 400px;
    background: rgba(147, 197, 253, 0.2);
    animation-duration: 30s;
}

.digital-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    opacity: 0.1;
    background-image: linear-gradient(rgba(20, 59, 99, 0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 59, 99, 0.4) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: moveGrid 80s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-40px, -40px); }
}

/* Header Landing Page */
.header-bar {
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    height: 80px;
    backdrop-filter: blur(5px);
}

.logo-area {
    font-size: 24px;
    font-weight: 800;
    color: #143b63;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-area i {
    color: #2563eb;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14px;
    font-weight: 600;
}

.nav-links a {
    text-decoration: none;
    color: #64748b;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover {
    color: #2563eb;
    transform: translateY(-2px);
}

/* Hero Section */
.main-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    flex: 1 1 auto;
    min-height: 0;
    z-index: 5;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.badge-tech {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    color: #2563eb;
    -webkit-text-fill-color: #2563eb;
}

.hero-desc {
    font-size: 18px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

.stat-item h3 {
    font-size: 28px;
    font-weight: 800;
    color: #143b63;
    margin: 0;
}

.stat-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-card-area {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.access-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    transition: transform 0.3s;
}

.access-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: #2563eb;
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.card-header h2 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #1e293b;
}

.card-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.btn-access {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(90deg, #1e293b, #0f172a);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
    border: 1px solid transparent;
}

.btn-access:hover {
    background: #2563eb;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    transform: scale(1.02);
}

/* Footer Landing Page */
.features-strip {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 0;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: 0;
}

.features-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #334155;
}

.feature i {
    font-size: 20px;
    color: #2563eb;
    opacity: 0.8;
}

.feature-text strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.feature-text small {
    font-size: 12px;
    color: #64748b;
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE COMPLETA — LANDING PAGE (global.css)
   Cola esse bloco inteiro no FINAL do global.css,
   SUBSTITUINDO todos os @media existentes da landing page.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── BASE: libera scroll em toda tela ── */
html.landing-page-html {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;          /* scroll sempre permitido */
}

body.landing-page {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────────────────
   ≤ 1200px
───────────────────────────────────────────────────── */
@media (max-width: 1200px) {

    .header-bar {
        padding: 18px 36px;
    }

    .main-container {
        gap: 36px;
        padding: 36px 32px;
    }

    .hero-title {
        font-size: 46px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 1024px — começa a empilhar
───────────────────────────────────────────────────── */
@media (max-width: 1024px) {

    html.landing-page-html,
    body.landing-page {
        height: auto;
        min-height: 100svh;
        overflow-y: auto;
    }

    .header-bar {
        padding: 16px 24px;
        height: auto;
    }

    .main-container {
        flex-direction: column;      /* EMPILHA */
        align-items: center;
        gap: 28px;
        padding: 28px 24px 32px;
        width: 90%;
    }

    .hero-text {
        text-align: center;
        padding-right: 0;
        max-width: 600px;
    }

    .hero-desc {
        margin: 0 auto 24px;
        font-size: 16px;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-card-area {
        justify-content: center;
        width: 100%;
    }

    .access-card {
        max-width: 460px;
        padding: 30px;
    }

    .features-strip {
        margin-top: 0;
        flex-shrink: 0;
        padding: 18px 0;
    }

    .features-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 28px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 900px
───────────────────────────────────────────────────── */
@media (max-width: 900px) {

    .header-bar {
        padding: 14px 20px;
    }

    .main-container {
        gap: 24px;
        padding: 24px 20px 28px;
        width: 92%;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-desc {
        font-size: 15px;
    }

    .access-card {
        max-width: 440px;
        padding: 28px 26px;
    }

    .features-content {
        gap: 12px 24px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 768px
───────────────────────────────────────────────────── */
@media (max-width: 768px) {

    .header-bar {
        padding: 12px 18px;
        height: auto;
    }

    .main-container {
        gap: 20px;
        padding: 20px 18px 24px;
        width: 94%;
    }

    .badge-tech {
        font-size: 11px;
        padding: 6px 14px;
        margin-bottom: 14px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 14px;
    }

    .hero-desc {
        font-size: 14px;
        margin-bottom: 0;
    }

    .access-card {
        max-width: 420px;
        padding: 24px 22px;
        border-radius: 20px;
    }

    .card-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
        margin-bottom: 18px;
    }

    .card-header h2 {
        font-size: 20px;
    }

    .card-header p {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .btn-access {
        padding: 14px 20px;
        font-size: 14px;
    }

    .features-strip {
        padding: 14px 0;
    }

    .features-content {
        gap: 10px 20px;
    }

    .feature i {
        font-size: 17px;
    }

    .feature-text strong {
        font-size: 13px;
    }

    .feature-text small {
        font-size: 11px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 600px
───────────────────────────────────────────────────── */
@media (max-width: 600px) {

    .main-container {
        gap: 18px;
        padding: 16px 14px 22px;
        width: 95%;
    }

    .hero-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .hero-desc {
        font-size: 13px;
    }

    .access-card {
        max-width: 100%;
        padding: 22px 18px;
        border-radius: 18px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    .card-header p {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .btn-access {
        padding: 13px 16px;
        font-size: 14px;
    }

    .features-strip {
        padding: 12px 0;
    }

    .features-content {
        flex-wrap: wrap;
        gap: 8px 14px;
        justify-content: center;
        padding: 0 12px;
    }

    .feature {
        gap: 8px;
    }

    .feature i {
        font-size: 15px;
    }

    .feature-text strong {
        font-size: 12px;
    }

    .feature-text small {
        font-size: 10px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 480px
───────────────────────────────────────────────────── */
@media (max-width: 480px) {

    .header-bar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .logo-area {
        font-size: 20px;
    }

    .nav-links {
        font-size: 12px;
        gap: 14px;
    }

    .main-container {
        gap: 16px;
        padding: 14px 12px 20px;
        width: 96%;
    }

    .badge-tech {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 10px;
        letter-spacing: 0.8px;
    }

    .hero-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .hero-desc {
        font-size: 13px;
        line-height: 1.5;
    }

    .access-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .card-header h2 {
        font-size: 17px;
    }

    .card-header p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .btn-access {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 10px;
    }

    .features-content {
        gap: 6px 12px;
    }

    /* Ocultar shapes para performance */
    .shape { display: none; }
    .digital-grid { opacity: 0.15; }
}

/* ─────────────────────────────────────────────────────
   ≤ 400px
───────────────────────────────────────────────────── */
@media (max-width: 400px) {

    .header-bar {
        padding: 8px 12px;
        gap: 4px;
    }

    .logo-area {
        font-size: 17px;
        gap: 7px;
    }

    .nav-links {
        font-size: 11px;
        gap: 10px;
    }

    .main-container {
        gap: 14px;
        padding: 12px 10px 18px;
        width: 97%;
    }

    .badge-tech {
        font-size: 9px;
        padding: 5px 10px;
        margin-bottom: 8px;
    }

    .hero-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .hero-desc {
        font-size: 12px;
        line-height: 1.45;
    }

    .access-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: 12px;
    }

    .card-header h2 {
        font-size: 16px;
    }

    .card-header p {
        font-size: 11px;
        margin-bottom: 14px;
    }

    .btn-access {
        padding: 12px 14px;
        font-size: 13px;
    }

    .features-strip {
        padding: 10px 0;
    }

    .features-content {
        gap: 5px 10px;
        padding: 0 10px;
    }

    .features-content .feature:last-child {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 2px;
    }
}

/* ─────────────────────────────────────────────────────
   ≤ 300px
───────────────────────────────────────────────────── */
@media (max-width: 300px) {

    .header-bar {
        padding: 7px 10px;
        gap: 3px;
    }

    .logo-area {
        font-size: 15px;
        gap: 6px;
    }

    .nav-links {
        font-size: 11px;
        gap: 8px;
    }

    .main-container {
        gap: 12px;
        padding: 10px 8px 16px;
        width: 98%;
    }

    .badge-tech {
        font-size: 9px;
        padding: 4px 9px;
        margin-bottom: 7px;
    }

    .hero-title {
        font-size: 17px;
        margin-bottom: 7px;
        line-height: 1.2;
    }

    /* Remove quebra de linha forçada */
    .hero-title br {
        display: none;
    }

    .hero-desc {
        font-size: 11px;
        line-height: 1.4;
    }

    .access-card {
        padding: 14px 12px;
        border-radius: 12px;
    }

    .card-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
        margin-bottom: 10px;
        border-radius: 10px;
    }

    .card-header h2 {
        font-size: 14px;
    }

    .card-header p {
        font-size: 11px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .btn-access {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Ocultar tudo decorativo */
    .shape,
    .background-shapes,
    .digital-grid {
        display: none !important;
    }

    .features-strip {
        padding: 8px 0;
    }

    .features-content {
        gap: 5px 8px;
        padding: 0 8px;
    }

    .feature i {
        font-size: 13px;
    }

    .feature-text strong {
        font-size: 10px;
    }

    .feature-text small {
        font-size: 9px;
    }

    .features-content .feature:last-child {
        flex: 1 1 100%;
        justify-content: center;
        font-size: 9px;
    }
}

/* ─────────────────────────────────────────────────────
   Landscape mobile: telas baixas (altura < 550px)
───────────────────────────────────────────────────── */
@media (max-height: 550px) and (max-width: 900px) {

    html.landing-page-html,
    body.landing-page {
        height: auto;
        overflow-y: auto;
    }

    .main-container {
        padding-top: 10px;
        padding-bottom: 16px;
        gap: 14px;
    }

    .hero-title {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }

    .hero-desc {
        font-size: 12px !important;
        margin-bottom: 0 !important;
    }

    .badge-tech {
        margin-bottom: 6px !important;
        font-size: 10px !important;
    }

    .access-card {
        padding: 14px !important;
        max-width: 380px !important;
    }

    .card-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    .card-header p {
        margin-bottom: 12px !important;
    }

    .features-content {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 16px;
        gap: 8px;
    }

    .feature {
        flex-shrink: 0;
    }
}