/* ==========================================================================
   CONFIGURAÇÕES GERAIS E VARIÁVEIS CSS
   ========================================================================== */
:root {
    --primary: #DAA520;
    --primary-dark: #b8860b;
    --nav-blue: #010b33;
    --bg-dark: #0a0e1a;
    --glass: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #202124;
    --text-muted: #666;
    --cyan-bright: #00D9FF;
    --green-lime: #39FF14;
    --max-width: 1600px;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.4);
}

* {
    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/FundoJuninoPro.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;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
}

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

.logo-img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-modal {
    max-height: 45px !important;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.quadrilha-logo-wrap {
    display: none;
}

.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;
    transition: var(--transition);
    text-transform: uppercase;
}

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

/* Admin Menu Button */
#admin-menu-item a {
    background: linear-gradient(135deg, rgba(255, 184, 77, 0.3), rgba(218, 165, 32, 0.3));
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 184, 77, 0.3);
}

#admin-menu-item a:hover {
    background: linear-gradient(135deg, rgba(255, 184, 77, 0.5), rgba(218, 165, 32, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 184, 77, 0.5);
}

/* ==========================================================================
   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 (UX FIX)
   ========================================================================== */
.glass-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
}

.card-header {
    background: var(--primary);
    padding: 12px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

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

/* Search Box UX Fix */
.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.9);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

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

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

.badge {
    background: rgba(0, 0, 0, 0.2);
    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;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
}

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

tr:hover {
    background: rgba(218, 165, 32, 0.05);
}

.btn-view {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    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 UX
   ========================================================================== */
.detail-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

.detail-header-optimized {
    background: linear-gradient(135deg, var(--nav-blue), #0a133d);
    color: white;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-bottom: 4px solid var(--primary);
}

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

.back-link {
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-decoration: none;
}

.back-link:hover {
    background: var(--primary);
    transform: translateX(-5px);
}

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

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-branding {
    max-height: 60px;
    width: auto;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.4));
}

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

.btn-print:hover {
    background: white;
    color: var(--nav-blue);
    transform: scale(1.1);
}

.quadrilha-logo-wrap {
    display: none;
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

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

.detail-header-optimized h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.detail-header-optimized p {
    margin: 0;
    padding-left: 25px;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.95;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.info-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    color: var(--primary-dark);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3 i {
    color: var(--primary);
}

.info-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--nav-blue);
}

/* Tech Grid UI */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.tech-item {
    background: white;
    padding: 15px 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(218, 165, 32, 0.15);
}

.tech-count {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'Roboto', sans-serif;
}

.tech-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* History Section */
.history-section {
    grid-column: 1 / -1;
    background: #fff;
    border-left: 5px solid var(--primary);
}

.history-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    white-space: pre-line;
    font-style: italic;
    background: rgba(218, 165, 32, 0.03);
    padding: 20px;
    border-radius: 8px;
}

/* ==========================================================================
   FOOTER PREMIUM JUNINOPRO — COMPACTO
   ========================================================================== */

.main-footer {
    background: var(--bg-dark);
    padding: 14px 16px;
    margin-top: auto;
    border-top: 2px solid rgba(212, 175, 55, 0.8);
    box-shadow: 0 -6px 18px rgba(212, 175, 55, 0.12);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

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

.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;
    /* ↑ legível, porém compacto */
    margin: 0;
    /* <<< REMOVE ESPAÇO EXTRA */
    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;
}

.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;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 15px;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-container {
        max-width: 100%;
        width: 100%;
    }

    .nav-links {
        display: none;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }

    .navbar,
    .main-footer,
    .back-link,
    .btn-print,
    .loading-screen {
        display: none !important;
    }

    .detail-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .glass-card {
        box-shadow: none !important;
        border: 2px solid #ddd !important;
        background: white !important;
        border-radius: 0 !important;
    }

    .detail-header-optimized {
        background: #f0f0f0 !important;
        color: black !important;
        border-bottom: 4px solid #DAA520 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .header-info p {
        border-left: 2px solid #DAA520 !important;
        color: #333 !important;
    }

    .info-card {
        background: white !important;
        border: 1px solid #eee !important;
        break-inside: avoid;
    }

    .tech-item {
        border: 1px solid #ccc !important;
    }

    .history-text {
        background: #fafafa !important;
        border: 1px solid #eee !important;
    }

    .header-branding {
        filter: none !important;
    }

    /* Forçar cores no Chrome/Safari */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}