/* ==========================================================================
   CONFIGURAÇÕES GERAIS E VARIÁVEIS CSS — FEQUAJUTO PREMIUM
   ========================================================================== */
:root {
    --primary: #1E88E5;
    /* Azul institucional */
    --primary-dark: #1565C0;
    /* Azul escuro */
    --primary-soft: #E3F2FD;
    /* Azul suave */

    --nav-blue: #010b33;
    --bg-dark: #0a0e1a;
    --glass: rgba(255, 255, 255, 0.98);

    --text-main: #202124;
    --text-muted: #666;

    --max-width: 1600px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: linear-gradient(rgba(10, 14, 26, 0.8), rgba(10, 14, 26, 0.8)),
        url('img/bg-painel.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    height: 70px;
    background: var(--nav-blue);
    display: flex;
    justify-content: center;
    z-index: 1000;
    position: sticky;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-spacer {
    flex: 1;
}

.logo-img {
    max-height: 65px;
}

.nav-links {
    display: flex;
    gap: 10px;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */
.main-content {
    flex: 1;
    padding: 25px;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ==========================================================================
   CARDS & HEADERS — PREMIUM
   ========================================================================== */
.glass-card {
    background: var(--glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: linear-gradient(135deg,
            #1E88E5,
            #1565C0);
    padding: 12px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.card-header h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Search */
.search-container {
    flex: 1;
    max-width: 350px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    outline: none;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrapper {
    overflow-x: auto;
    max-height: 400px;
}

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

th {
    background: #f8f9fa;
    padding: 12px 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
}

td {
    padding: 12px 15px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background: var(--primary-soft);
}

/* Botão */
.btn-view {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-view:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ==========================================================================
   CALENDAR
   ========================================================================== */
.calendar-column {
    height: 100%;
}

.iframe-container {
    flex: 1;
    min-height: 600px;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   DETAIL PAGE
   ========================================================================== */
.detail-header-optimized {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    color: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-card h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    padding-bottom: 8px;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   FOOTER PREMIUM JUNINOPRO — RESTAURADO (IDENTIDADE ORIGINAL)
   ========================================================================== */

.main-footer {
    background: var(--bg-dark);
    padding: 14px 16px;
    margin-top: auto;

    border-top: 2px solid rgba(212, 175, 55, 0.85);
    box-shadow: 0 -6px 18px rgba(212, 175, 55, 0.18);
}

/* CONTAINER */
.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

/* LOGO */
.footer-logo {
    max-height: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0px 3px 8px rgba(0, 0, 0, 0.4));
}

/* BLOCO CENTRAL */
.footer-info {
    display: flex;
    flex-direction: column;
    text-align: center;

    font-size: 0.72rem;
    line-height: 0.45;
    gap: 2px;

    color: rgba(255, 255, 255, 0.92);
}

/* TEXTO MENOR */
.footer-info p {
    font-size: 0.55rem;
    margin: 0;
    padding: 0;
    opacity: 0.55;
    color: #eeeeee;
}

.footer-info span {
    opacity: 1;
}

.footer-info strong {
    color: #ffffff;
    font-weight: 600;
}

/* REDES */
.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* ICONES */
.footer-social a {
    color: white;
    font-size: 1.25rem;
    opacity: 0.85;
    transition: 0.25s ease;
}

.footer-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: #d4af37;
}

/* WHATSAPP */
.whatsapp-3d img {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.5));
    transition: 0.25s ease;
}

.whatsapp-3d img:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* MOBILE */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }

    .footer-logo {
        max-height: 42px;
    }

    .footer-info {
        line-height: 1.05;
    }
}


/* ==========================================================================
   DETALHES DA QUADRILHA — AJUSTE VISUAL DEFINITIVO
   ========================================================================== */

.detail-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Header da Quadrilha */
.detail-header-optimized {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 12px 12px 0 0;
}

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

.header-text {
    display: flex;
    flex-direction: column;
}

.header-brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo-img {
    max-height: 38px;
    filter: drop-shadow(0px 3px 8px rgba(0, 0, 0, 0.3));
}

.btn-print-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-print-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.detail-header-optimized h1 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.detail-header-optimized p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Logo da quadrilha */
.quadrilha-logo-wrap {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quadrilha-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Grid principal */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 30px;
}

/* Cards internos */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 6px;
}

/* Itens de informação */
.info-item {
    margin-bottom: 14px;
}

.info-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.info-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Dados técnicos */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
}

.tech-item {
    background: var(--primary-soft);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
}

.tech-count {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.tech-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* História */
.history-section {
    grid-column: 1 / -1;
}

.history-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* Loading */
.loading-screen {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: #fff;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .detail-header-optimized {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .brand-logo-img {
        max-height: 32px;
    }
}


/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {

    .nav-container {
        flex-direction: column;
        align-items: center;
    }

    .hamburger {
        display: flex;
        margin: 10px 0;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: center;

        background: rgba(10, 20, 40, 0.95);
        backdrop-filter: blur(10px);

        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav-links.active {
        max-height: 80vh;
        padding-bottom: 15px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        color: #fff;
    }

    /* SAIR em destaque */
    .nav-highlight a {
        background: linear-gradient(135deg, #c62828, #e53935);
        margin: 10px 16px;
        border-radius: 10px;
        font-weight: bold;
    }
}


/* ================= HEADER CENTRALIZADO ================= */

.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-center {
    display: flex;
    justify-content: center;
}

.logo-central {
    height: 52px;
    object-fit: contain;
}

.logo-img {
    width: 100%;
    max-width: 150px; /* tamanho máximo no desktop */
    height: auto;
}
@media (max-width: 768px) {
    .logo-img {
        max-width: 100px; /* menor no celular */
    }
}
/* ================= TITULO CLARO ================= */

.admin-container header h1 {
    color: #ffffff;
    font-weight: 700;
}

.admin-container header p {
    color: rgba(255, 255, 255, 0.75);
}


/* ================= STATS INLINE ================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    padding: 14px 10px;
    border-radius: 10px;
}

.stat-card h3 {
    font-size: 1.9rem;
    margin: 5px 0;
}

.stat-card p {
    font-size: 0.85rem;
}

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

/* ===== NAVBAR 3 ZONAS ===== */

.nav-container {
    display: flex;
    align-items: center;
}

/* esquerda */
.nav-left {
    display: flex;
    align-items: center;
}

.logo-left {
    height: 35px;
    object-fit: contain;
}

/* centro */
.nav-center {
    display: flex;
    justify-content: center;
}

.logo-center {
    height: 55px;
    object-fit: contain;
}

/* ===== ALINHAMENTO ENTERPRISE NAVBAR x DASHBOARD ===== */

.admin-container {
    max-width: var(--max-width);
    margin: 25px auto 40px auto;
    padding: 0 20px;
}

/* Header alinhado com estatísticas */
.admin-container header {
    margin-bottom: 20px;
}

/* Bloco título + estatísticas em eixo único */
.dashboard-header-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}