/**
 * Portal de Transparência - Estilos
 * Área pública do portal municipal
 * Módulo Transparência
 */

/* ====================================
   VARIÁVEIS E RESET
   ==================================== */

:root {
    --header-height-public: 56px;
    --accessibility-height: 0px;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset para área pública */
html:has(.public-page),
body.public-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.public-page {
    padding-top: var(--accessibility-height);
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ====================================
   HERO BAR - Institucional Premium
   Theme-aware Depth Gradient System
   ==================================== */

.hero-bar {
    position: relative;
    display: flex;
    margin-bottom: 0;
    overflow: hidden;

    /* Theme color references for gradient layers */
    --hero-primary: var(--gov-blue-primary, #5B9BD5);
    --hero-dark: var(--gov-blue-dark, #071D41);
    --hero-darker: var(--gov-blue-darker, #0C326F);
    --hero-light: var(--gov-blue-light, #6BA3E0);

    /* Multi-layer linear gradients - optimized for horizontal bar */
    background:
        /* Top edge highlight - horizontal light line */
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--hero-light) 20%, transparent) 0%,
            color-mix(in srgb, var(--hero-primary) 8%, transparent) 15%,
            transparent 40%
        ),
        /* Left to right sweep - main horizontal flow */
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--hero-light) 18%, transparent) 0%,
            color-mix(in srgb, var(--hero-primary) 12%, transparent) 20%,
            transparent 45%,
            color-mix(in srgb, var(--hero-primary) 8%, transparent) 70%,
            color-mix(in srgb, var(--hero-light) 15%, transparent) 100%
        ),
        /* Diagonal accent - adds depth */
        linear-gradient(
            105deg,
            color-mix(in srgb, var(--hero-primary) 22%, transparent) 0%,
            color-mix(in srgb, var(--hero-light) 10%, transparent) 30%,
            transparent 55%,
            color-mix(in srgb, var(--hero-darker) 15%, transparent) 100%
        ),
        /* Counter diagonal - balance */
        linear-gradient(
            -15deg,
            transparent 0%,
            color-mix(in srgb, var(--hero-primary) 6%, transparent) 40%,
            color-mix(in srgb, var(--hero-light) 12%, transparent) 60%,
            transparent 100%
        ),
        /* Bottom shadow gradient */
        linear-gradient(
            0deg,
            color-mix(in srgb, black 25%, transparent) 0%,
            transparent 50%
        ),
        /* Base horizontal gradient - dark to darker */
        linear-gradient(
            90deg,
            var(--hero-dark) 0%,
            var(--hero-darker) 30%,
            var(--hero-dark) 50%,
            var(--hero-darker) 70%,
            var(--hero-dark) 100%
        );

    /* Luminous bottom edge - uses primary */
    border-bottom: 1px solid color-mix(in srgb, var(--hero-primary) 20%, transparent);

    /* Layered shadows for depth */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.1),
        0 2px 8px color-mix(in srgb, var(--hero-dark) 30%, transparent);
}

/* Animated horizontal light sweep */
.hero-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Traveling horizontal light band */
        linear-gradient(
            90deg,
            transparent 0%,
            transparent 30%,
            color-mix(in srgb, var(--gov-blue-light, #6BA3E0) 15%, transparent) 40%,
            color-mix(in srgb, var(--gov-blue-primary, #5B9BD5) 25%, transparent) 50%,
            color-mix(in srgb, var(--gov-blue-light, #6BA3E0) 15%, transparent) 60%,
            transparent 70%,
            transparent 100%
        );
    background-size: 300% 100%;
    animation: heroLightSweep 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroLightSweep {
    0% { background-position: 150% 0; }
    50% { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}

/* Noise texture for depth */
.hero-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-bar::before {
        animation: none;
        background-position: 50% 0;
    }
}

/* Barra de acento lateral - Gradient edge with expanded glow */
.hero-bar-accent {
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--gov-blue-lighter, #E8F4FD) 98%, transparent) 0%,
            color-mix(in srgb, var(--gov-blue-light, #6BA3E0) 90%, transparent) 20%,
            color-mix(in srgb, var(--gov-blue-primary, #5B9BD5) 75%, transparent) 50%,
            color-mix(in srgb, var(--gov-blue-light, #6BA3E0) 60%, transparent) 80%,
            color-mix(in srgb, var(--gov-blue-darker, #0C326F) 40%, transparent) 100%
        );
    box-shadow:
        0 0 12px color-mix(in srgb, var(--gov-blue-light, #6BA3E0) 60%, transparent),
        0 0 25px color-mix(in srgb, var(--gov-blue-primary, #5B9BD5) 45%, transparent),
        0 0 50px color-mix(in srgb, var(--gov-blue-primary, #5B9BD5) 25%, transparent),
        0 0 80px color-mix(in srgb, var(--gov-blue-darker, #0C326F) 15%, transparent);
}

.hero-bar-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px 14px 20px;
    margin-left: 4px;
}

/* Identidade - Título e Subtítulo */
.hero-bar-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-bar-title {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    white-space: nowrap;
}

.hero-bar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(15deg);
}

.hero-bar-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Navegação */
.hero-bar-nav {
    display: flex;
    gap: 6px;
}

.hero-bar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.hero-bar-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-bar-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-bar-link:hover::before {
    transform: scaleX(1);
}

.hero-bar-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.hero-bar-link:hover .hero-bar-link-icon {
    opacity: 1;
    transform: scale(1.1);
}

.hero-bar-link-text {
    letter-spacing: 0.01em;
}

/* Link Primário - Destaque */
.hero-bar-link--primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--gov-blue-primary, #1351B4);
    border-color: transparent;
    font-weight: 600;
}

.hero-bar-link--primary::before {
    display: none;
}

.hero-bar-link--primary .hero-bar-link-icon {
    opacity: 0.85;
}

.hero-bar-link--primary:hover {
    background: #fff;
    color: var(--gov-blue-darker, #071D41);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-bar-link--primary:hover .hero-bar-link-icon {
    opacity: 1;
}

/* Responsivo */
@media (max-width: 640px) {
    .hero-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px 12px 12px;
    }

    .hero-bar-identity {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .hero-bar-divider {
        display: none;
    }

    .hero-bar-title {
        font-size: 15px;
    }

    .hero-bar-subtitle {
        font-size: 11px;
    }

    .hero-bar-nav {
        width: 100%;
    }

    .hero-bar-link {
        flex: 1;
        justify-content: center;
        padding: 12px 14px;
    }
}

/* ====================================
   HERO SECTION - REDESIGN (legacy)
   ==================================== */

.hero-section {
    background: linear-gradient(135deg, var(--gov-blue-primary, #1351B4) 0%, var(--gov-blue-dark, #071D41) 100%);
    color: #fff;
    padding: 48px 24px 44px;
    margin: 0 0 20px 0;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(7, 29, 65, 0.28);
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 680px;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: #fff;
}

.hero-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin: 0 0 28px 0;
    line-height: 1.5;
    color: #fff;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #FFD700;
    color: var(--gov-blue-dark, #071D41);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-hero-primary:hover {
    background: #FFE44D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-visual {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-visual i {
    font-size: 64px;
    color: #FFD700;
    opacity: 0.95;
}

.hero-accent-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA000 50%, #FF6F00 100%);
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Hero Responsivo - Oculto em mobile */
@media (max-width: 768px) {
    .hero-section {
        display: none;
    }
}

.public-page .sidebar,
.public-page .top-header {
    display: none;
}

/* ====================================
   BARRA DE ACESSIBILIDADE
   ==================================== */

.accessibility-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--accessibility-height);
    background-color: var(--gov-blue-dark, #071D41);
    color: #fff;
    z-index: 2000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.accessibility-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accessibility-links,
.accessibility-external {
    display: flex;
    gap: 10px;
    align-items: center;
}

.accessibility-link {
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.accessibility-link:hover,
.accessibility-link:focus {
    background-color: rgba(255, 255, 255, 0.15);
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.accesskey {
    font-size: 9px;
    opacity: 0.7;
}

/* ====================================
   HEADER PÚBLICO - Swiss Civic Compact
   ==================================== */

.public-header {
    position: fixed;
    top: var(--accessibility-height);
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, var(--gov-blue-primary, #1351B4) 0%, var(--gov-blue-darker, #071D41) 100%);
    color: #fff;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Brand - Refined */
.header-brand {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 24px;
}

/* Diagonal separator after brand */
.header-brand::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease;
}

.brand-link:hover {
    opacity: 0.9;
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.05);
}

.brand-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

.brand-link:hover .brand-icon {
    color: #fff;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: none;
}

/* Navegação - Swiss Civic Refined */
.header-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
    height: 100%;
    align-items: center;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    position: relative;
    transition: all 0.2s ease;
}

/* Bottom accent line */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover background */
.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover::after {
    transform: scaleX(0.5);
}

.nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    transform: scaleX(1);
    background: #fff;
}

.nav-link i {
    font-size: 11px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.nav-link:hover i {
    opacity: 0.8;
    transform: scale(1.1);
}

.nav-link.active i {
    opacity: 1;
}

/* Menu Mobile */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ====================================
   CONTEÚDO PRINCIPAL
   ==================================== */

.public-main {
    margin-top: calc(var(--accessibility-height) + var(--header-height-public));
    min-height: calc(100vh - var(--accessibility-height) - var(--header-height-public) - 300px);
    padding: 30px 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ====================================
   TÍTULO MOBILE
   ==================================== */

.mobile-title {
    display: none;
}

/* ====================================
   ESTATÍSTICAS EM CARDS
   ==================================== */

/* ====================================
   DATA RIBBON - Métricas Institucionais
   ==================================== */

.data-ribbon {
    background: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.01) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0;
    overflow: hidden;
}

.data-ribbon-inner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Métrica Individual */
.data-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    position: relative;
    animation: metricFadeIn 0.4s ease-out backwards;
    animation-delay: calc(var(--delay, 0) * 0.08s);
    transition: background 0.2s ease;
}

.data-metric:hover {
    background: rgba(0,0,0,0.02);
}

@keyframes metricFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Valor numérico - Destaque tipográfico */
.data-metric-value {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gov-blue-primary, #1351B4);
    letter-spacing: -0.02em;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.data-metric:hover .data-metric-value {
    transform: scale(1.05);
    color: var(--gov-blue-darker, #071D41);
}

/* Label descritivo */
.data-metric-label {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

/* Divisor geométrico */
.data-metric-divider {
    width: 1px;
    align-self: stretch;
    margin: 10px 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.1) 70%,
        transparent 100%
    );
}

/* Responsivo */
@media (max-width: 700px) {
    .data-ribbon-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .data-metric {
        padding: 10px 16px;
        flex: 0 0 auto;
    }

    .data-metric-value {
        font-size: 17px;
    }

    .data-metric-label {
        font-size: 10px;
    }

    .data-metric-divider {
        display: none;
    }
}

@media (max-width: 400px) {
    .data-ribbon-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .data-metric {
        justify-content: center;
        padding: 12px 8px;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    .data-metric:nth-child(odd) {
        border-right: 1px solid rgba(0,0,0,0.04);
    }

    .data-metric-divider {
        display: none;
    }
}

.stats-section-fullwidth {
    width: 100%;
    background: var(--gray-lighter, #f3f4f6);
    padding: 16px 0;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Layout Desktop - Cards */
.stats-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stats-mobile {
    display: none !important;
}

.stats-cards .stat-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    /* Reset dos estilos de acesso rápido */
    display: block;
    border-left: none;
    opacity: 1;
    transform: none;
    animation: none;
}
.stats-cards .stat-card:hover {
    transform: none;
    border-left: none;
}

.stat-card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gov-blue-primary, #1351B4);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Layout Mobile - Compacto */
.stats-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    font-size: 12px;
    color: var(--gov-gray-dark, #555);
}

.stats-compact .stat-item {
    white-space: nowrap;
}

.stats-compact .stat-num {
    font-weight: 700;
    color: var(--gov-blue-primary, #1351B4);
}

/* ====================================
   CARDS DE ACESSO RÁPIDO - Swiss Civic Refinement
   ==================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border-left: 2px solid transparent;
    position: relative;
    opacity: 0;
    transform: translateY(6px);
    animation: cardFadeIn 0.35s ease forwards;
    transition: all 0.2s ease;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    background: rgba(19, 81, 180, 0.02);
    border-left-color: var(--gov-blue-primary, #1351B4);
    box-shadow: 0 2px 8px rgba(19, 81, 180, 0.08);
    transform: translateY(0);
}

.stat-card:hover .stat-icon {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
}

.stat-card:hover .stat-icon i {
    transform: scale(1.1);
}

/* Monochrome icon - unified civic look */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(19, 81, 180, 0.08);
    color: var(--gov-blue-primary, #1351B4);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.stat-icon i {
    transition: transform 0.2s ease;
}

/* Override color variants - all use unified blue */
.stat-icon.blue,
.stat-icon.purple,
.stat-icon.orange,
.stat-icon.green {
    background: rgba(19, 81, 180, 0.08);
    color: var(--gov-blue-primary, #1351B4);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    line-height: 1;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.65);
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.stat-content .stat-label:first-child {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
}

/* Entry animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .stat-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ====================================
   SEÇÃO DE CONTEÚDO
   ==================================== */

.content-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gov-gray-darkest, #333);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--gov-blue-primary, #1351B4);
}

.section-body {
    padding: 12px;
}

/* ====================================
   FILTROS COLAPSÁVEIS - Swiss Civic Refinement
   ==================================== */

.filters-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

.filters-collapse-header:hover {
    background: rgba(19, 81, 180, 0.02);
    border-left-color: var(--gov-blue-primary, #1351B4);
}

.filters-collapse-header.active {
    border-left-color: var(--gov-blue-primary, #1351B4);
    border-radius: 4px 4px 0 0;
    border-bottom-color: transparent;
}

.filters-collapse-header .filters-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-collapse-header .filters-header-content i {
    color: var(--gov-blue-primary, #1351B4);
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.filters-collapse-header:hover .filters-header-content i {
    opacity: 1;
}

.filters-collapse-header .filters-header-text {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.75);
    font-size: 13px;
    letter-spacing: 0.01em;
}

.filters-collapse-header .filters-toggle-icon {
    color: rgba(0, 0, 0, 0.5);
    font-size: 11px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-collapse-header.active .filters-toggle-icon {
    transform: rotate(180deg);
}

/* Active filters badge */
.active-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    letter-spacing: 0.02em;
}

/* Filters bar - refined */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: none;
    border-radius: 0 0 4px 4px;
    border-left: 2px solid var(--gov-blue-primary, #1351B4);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.filter-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.75);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%231351B4' fill-opacity='0.5' d='M6 8L1 3h10z'/%3E%3C/svg%3E") right 12px center no-repeat;
    appearance: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-select:hover {
    border-color: rgba(19, 81, 180, 0.3);
}

.filter-select:focus {
    outline: none;
    border-color: var(--gov-blue-primary, #1351B4);
    box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.08);
}

.filter-select::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* Filter actions */
.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
}

.filter-actions .btn {
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
}

.filter-actions .btn-primary {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    border: none;
}

.filter-actions .btn-primary:hover {
    background: var(--gov-blue-dark, #071D41);
}

.filter-actions .btn-secondary {
    background: transparent;
    color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.filter-actions .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
}

.btn-primary:hover {
    background: var(--gov-blue-dark, #071D41);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ====================================
   TABELA DE LICITAÇÕES - Swiss Civic Refinement
   ==================================== */

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.15s ease;
}

.data-table th {
    background: transparent;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.65);
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
    padding-bottom: 10px;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(19, 81, 180, 0.03);
}

.data-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--gov-blue-primary, #1351B4);
}

.data-table td {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.75);
}

/* Links */
.table-link {
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.15s ease;
}

.table-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.2s ease;
}

.table-link:hover {
    color: var(--gov-blue-dark, #071D41);
}

.table-link:hover::after {
    width: 100%;
}

/* ====================================
   BADGES - Refined with Subtle Depth
   ==================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.badge:hover {
    transform: translateY(-1px);
}

.badge-blue {
    background: linear-gradient(135deg, #E8F0FE 0%, #D4E4FC 100%);
    color: #1557B0;
    box-shadow: inset 0 -1px 0 rgba(21, 87, 176, 0.1), 0 1px 2px rgba(21, 87, 176, 0.08);
}

.badge-green {
    background: linear-gradient(135deg, #E6F4EA 0%, #CEEAD6 100%);
    color: #1E7E34;
    box-shadow: inset 0 -1px 0 rgba(30, 126, 52, 0.1), 0 1px 2px rgba(30, 126, 52, 0.08);
}

.badge-orange {
    background: linear-gradient(135deg, #FEF3E2 0%, #FCE8CC 100%);
    color: #C65D00;
    box-shadow: inset 0 -1px 0 rgba(198, 93, 0, 0.1), 0 1px 2px rgba(198, 93, 0, 0.08);
}

.badge-red {
    background: linear-gradient(135deg, #FDECEA 0%, #F9D6D5 100%);
    color: #B71C1C;
    box-shadow: inset 0 -1px 0 rgba(183, 28, 28, 0.1), 0 1px 2px rgba(183, 28, 28, 0.08);
}

.badge-gray {
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
    color: #555;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.badge-purple {
    background: linear-gradient(135deg, #F3E8FD 0%, #E5D4F7 100%);
    color: #6B21A8;
    box-shadow: inset 0 -1px 0 rgba(107, 33, 168, 0.1), 0 1px 2px rgba(107, 33, 168, 0.08);
}

/* Objeto - texto completo */
.data-table td.objeto-text,
.objeto-text {
    white-space: normal;
    word-wrap: break-word;
    text-align: justify !important;
}

/* Coluna mobile - escondida por padrão no desktop */
.data-table th.col-info-mobile,
.data-table td.col-info-mobile {
    display: none;
}

/* Elementos mobile - ocultos no desktop */
.mobile-badge,
.mobile-badge-first,
.mobile-info-col1,
.mobile-objeto-row {
    display: none;
}

/* Link no objeto - estilo discreto */
.objeto-link {
    color: inherit;
    text-decoration: none;
}

.objeto-link:hover {
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: underline;
}

/* Estilo da coluna combinada (sempre definido, visível só em mobile) */
.info-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-stack .info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ====================================
   PAGINAÇÃO
   ==================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: var(--gov-gray-dark, #666);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 12px;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f0f0f0;
    border-color: #ccc;
}

.pagination-btn.active {
    background: var(--gov-blue-primary, #1351B4);
    border-color: var(--gov-blue-primary, #1351B4);
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 15px;
    font-size: 14px;
    color: var(--gov-gray-dark, #666);
}

/* ====================================
   DETALHES DA LICITAÇÃO
   ==================================== */

.detail-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--gov-blue-primary, #1351B4) 0%, var(--gov-blue-dark, #071D41) 100%);
    color: #fff;
}

.detail-processo {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
    color: #fff;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.detail-meta-item i {
    opacity: 0.8;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.info-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gov-gray-dark, #555);
    margin-bottom: 4px;
}

.info-value {
    font-size: 13px;
    color: var(--gov-gray-darkest, #333);
}

/* ====================================
   TIMELINE DE MOVIMENTAÇÕES - Swiss Civic Refinement
   ==================================== */

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(
        to bottom,
        rgba(19, 81, 180, 0.3) 0%,
        rgba(19, 81, 180, 0.15) 70%,
        rgba(19, 81, 180, 0) 100%
    );
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
    opacity: 0;
    transform: translateY(8px);
    animation: timelineFadeIn 0.4s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.15s; }
.timeline-item:nth-child(4) { animation-delay: 0.2s; }
.timeline-item:nth-child(5) { animation-delay: 0.25s; }
.timeline-item:nth-child(6) { animation-delay: 0.3s; }
.timeline-item:nth-child(7) { animation-delay: 0.35s; }
.timeline-item:nth-child(8) { animation-delay: 0.4s; }
.timeline-item:nth-child(9) { animation-delay: 0.45s; }
.timeline-item:nth-child(10) { animation-delay: 0.5s; }
.timeline-item:nth-child(n+11) { animation-delay: 0.55s; }

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Diamond marker - refined civic symbol */
.timeline-marker {
    position: absolute;
    left: -28px;
    top: 14px;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid var(--gov-blue-primary, #1351B4);
    transform: rotate(45deg);
    transition: all 0.2s ease;
    z-index: 1;
}

.timeline-item:first-child .timeline-marker {
    background: var(--gov-blue-primary, #1351B4);
    box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.15);
}

.timeline-item:hover .timeline-marker {
    background: var(--gov-blue-primary, #1351B4);
    transform: rotate(45deg) scale(1.1);
}

.timeline-content {
    background: transparent;
    border-left: 2px solid transparent;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.timeline-content[data-link] {
    cursor: pointer;
}

.timeline-content:hover {
    background: rgba(19, 81, 180, 0.03);
    border-left-color: var(--gov-blue-primary, #1351B4);
}

.timeline-content[data-link]:hover {
    background: rgba(19, 81, 180, 0.05);
}

.timeline-date {
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0.02em;
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-date i {
    font-size: 10px;
    opacity: 0.6;
}

.timeline-title {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 0;
    flex: 1;
    transition: color 0.15s ease;
}

.timeline-content:hover .timeline-title {
    color: rgba(0, 0, 0, 0.9);
}

.timeline-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: none;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.timeline-content:hover .timeline-link {
    opacity: 1;
    transform: translateX(0);
}

.timeline-link:hover {
    color: var(--gov-blue-dark, #071D41);
}

/* Entry animation */
@keyframes timelineFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .timeline-item {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .timeline-link {
        opacity: 1;
        transform: none;
    }

    .footer-column {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ====================================
   MENSAGENS
   ==================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gov-gray-dark, #666);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

.loading {
    text-align: center;
    padding: 40px;
}

.loading i {
    font-size: 32px;
    color: var(--gov-blue-primary, #1351B4);
    animation: spin 1s linear infinite;
}

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

/* ====================================
   FOOTER PÚBLICO - Swiss Civic Refinement
   ==================================== */

.public-footer {
    background: linear-gradient(135deg, var(--gov-blue-dark, #071D41) 0%, #0a2a5c 100%);
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: calc(-50vw + 50%);
    position: relative;
    width: 100vw;
    box-sizing: border-box;
}

.public-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.4) 20%,
        rgba(255, 215, 0, 0.4) 80%,
        transparent 100%
    );
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
    animation: footerFadeIn 0.5s ease forwards;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(2) { animation-delay: 0.2s; }
.footer-column:nth-child(3) { animation-delay: 0.3s; }
.footer-column:nth-child(4) { animation-delay: 0.4s; }

/* Brand */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.footer-logo {
    height: 50px;
    width: auto;
    opacity: 0.6;
    filter: brightness(1.1);
    transition: opacity 0.2s ease;
}

.footer-logo:hover {
    opacity: 0.85;
}

.footer-icon {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.footer-brand:hover .footer-icon {
    color: rgba(255, 255, 255, 0.7);
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-brand-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
}

.footer-brand-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

.footer-text {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 280px;
}

/* Titles with left accent */
.footer-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 215, 0, 0.9);
    margin: 0 0 8px 0;
    padding-left: 10px;
    position: relative;
}

.footer-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: rgba(255, 215, 0, 0.6);
}

/* Links with animated underline */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: color 0.2s ease;
    padding: 2px 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 0;
    height: 1px;
    background: rgba(255, 215, 0, 0.6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
    color: #fff;
}

.footer-links a:hover::after {
    transform: scaleX(1);
}

.footer-links a i {
    width: 14px;
    font-size: 11px;
    color: rgba(255, 215, 0, 0.5);
    transition: color 0.2s ease;
}

.footer-links a:hover i {
    color: rgba(255, 215, 0, 0.9);
}

/* Contact */
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.footer-contact i {
    color: rgba(255, 215, 0, 0.6);
    width: 14px;
    font-size: 11px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Social - minimal icons */
.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    transition: all 0.2s ease;
    position: relative;
}

.footer-social a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: rgba(255, 215, 0, 0.8);
    transition: transform 0.2s ease;
}

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

.footer-social a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Divider - subtle */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
    margin-bottom: 16px;
}

/* Bottom section */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.01em;
}

.footer-copyright {
    margin: 0;
}

.footer-credits {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-admin-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-admin-link:hover {
    color: rgba(255, 215, 0, 0.9);
}

.footer-credits i {
    font-size: 10px;
    opacity: 0.7;
}

/* Entry animation */
@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mediaware-brand {
    font-weight: 600;
    color: #FFD700;
}

/* ====================================
   RESPONSIVO
   ==================================== */

@media (max-width: 992px) {
    /* Menu mobile - escondido por padrão */
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gov-blue-darker, #071D41);
        padding: 0;
        height: auto;
        z-index: 1000;
    }

    /* Menu mobile - visível quando ativo */
    .header-nav.active {
        display: block;
    }

    .header-nav .nav-menu {
        flex-direction: column;
        gap: 0;
        height: auto;
        padding: 0;
    }

    .header-nav .nav-item {
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .header-nav .nav-item:last-child {
        border-bottom: none;
    }

    .header-nav .nav-link {
        display: block;
        height: auto;
        padding: 14px 20px;
        font-size: 14px;
        font-weight: 400;
        color: #fff;
        text-decoration: none;
        background: none;
        border: none;
    }

    .header-nav .nav-link i {
        display: none;
    }

    .header-nav .nav-link::before,
    .header-nav .nav-link::after {
        display: none;
    }

    .header-nav .nav-link:hover,
    .header-nav .nav-link:focus {
        background: rgba(255, 255, 255, 0.1);
    }

    .header-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
        font-weight: 500;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 18px;
        color: #fff;
        cursor: pointer;
    }

    /* Hide separator on mobile */
    .header-brand::after {
        display: none;
    }

    .header-brand {
        padding-right: 0;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .accessibility-bar {
        display: none;
    }

    /* Ocultar seção de modalidade em mobile */
    .section-modalidade {
        display: none;
    }

    .public-header {
        top: 0;
        height: 52px;
    }

    .public-main {
        margin-top: 52px;
        padding: 12px 10px;
    }

    .brand-logo {
        height: 30px;
    }

    .brand-icon {
        font-size: 24px;
    }

    .brand-text {
        display: none;
    }

    /* Título mobile */
    .mobile-title {
        display: block;
        text-align: center;
        padding: 12px 10px 8px;
        background: transparent;
        color: var(--gov-gray-darkest, #333);
        margin: 0;
    }
    .mobile-title h1 {
        font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
        font-size: 20px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #1a1a1a;
        margin: 0;
    }

    /* Cabeçalhos de seção - mais discretos */
    .section-title {
        font-size: 12px;
        font-weight: 500;
        color: #777;
    }
    .section-title i {
        font-size: 11px;
        color: #999;
    }
    .section-header .btn {
        font-size: 10px;
        padding: 4px 8px;
        background: transparent;
        color: #888;
        border: 1px solid #ddd;
    }

    /* Badges de modalidade - mais discretos */
    .data-table .badge {
        font-size: 9px;
        font-weight: 500;
        padding: 2px 6px;
        background: #f5f5f5;
        color: #666;
        box-shadow: none;
        border: none;
    }

    /* Mostrar badge antes do processo em mobile */
    .mobile-badge-first {
        display: inline-block !important;
        margin-bottom: 4px;
    }

    /* Estatísticas mobile - ocultar completamente */
    .stats-section-fullwidth {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 10px;
    }

    .data-table th,
    .data-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    /* Tabela responsiva - esconder colunas individuais em mobile */
    .data-table th.col-modalidade,
    .data-table td.col-modalidade,
    .data-table th.col-orgao,
    .data-table td.col-orgao,
    .data-table th.col-situacao,
    .data-table td.col-situacao,
    .data-table th.col-data,
    .data-table td.col-data,
    .data-table th.col-acoes,
    .data-table td.col-acoes,
    .data-table td.objeto-text {
        display: none;
    }

    /* Esconder header do objeto em mobile */
    .data-table th:nth-child(3) {
        display: none;
    }

    /* Mostrar colunas combinadas em mobile */
    .data-table th.col-info-mobile,
    .data-table td.col-info-mobile {
        display: table-cell;
    }

    /* Mostrar informações da coluna 1 mobile (modalidade + secretaria) */
    .mobile-info-col1 {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        margin-top: 6px;
        align-items: center;
    }

    .mobile-orgao {
        font-size: 11px;
        color: #555;
    }

    /* Mostrar objeto na coluna 2 mobile */
    .mobile-objeto-row {
        display: flex !important;
    }

    .mobile-objeto {
        font-size: 11px;
        color: #444;
        text-align: left;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-data {
        font-size: 11px;
        color: #555;
    }

    /* Centralizar coluna processo (2ª) e coluna info em mobile */
    .data-table td:nth-child(2) {
        text-align: center;
    }

    .data-table td.col-info-mobile {
        text-align: left;
        vertical-align: top;
    }

    .info-stack {
        align-items: flex-start;
    }

    .info-stack .info-row {
        justify-content: flex-start;
    }

    .info-stack .info-row:first-child {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .detail-header {
        padding: 12px;
    }

    .detail-title {
        font-size: 14px;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .public-footer {
        padding: 32px 0 16px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-column {
        animation-delay: 0.1s !important;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================
   FOCO VISÍVEL E ACESSIBILIDADE
   ==================================== */

/* Focus visible para todos os elementos interativos */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.stat-card:focus-visible,
.pagination-btn:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.25);
}

/* Focus para tabela */
.data-table tbody tr:focus-within {
    outline: 2px solid var(--gov-blue-primary, #1351B4);
    outline-offset: -2px;
}

/* Focus para links dentro da tabela */
.table-link:focus-visible,
.objeto-link:focus-visible {
    outline: 2px solid var(--gov-blue-primary, #1351B4);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip link melhorado */
.accessibility-link:focus {
    background-color: #FFD700 !important;
    color: #000 !important;
    outline: none;
}

/* Indicador visual de elemento focado no mobile menu */
.mobile-menu-toggle:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* ====================================
   ALTO CONTRASTE
   ==================================== */

body.high-contrast {
    filter: contrast(1.3);
}

body.high-contrast .accessibility-bar {
    background-color: #000;
    border-bottom: 3px solid #ff0;
}

body.high-contrast .public-header {
    background: #000;
}

body.high-contrast .content-section,
body.high-contrast .stat-card {
    border: 2px solid #000;
}

/* ====================================
   PRINT
   ==================================== */

@media print {
    .accessibility-bar,
    .public-header,
    .public-footer,
    .filters-bar,
    .pagination {
        display: none !important;
    }

    .public-main {
        margin-top: 0;
    }

    .content-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ====================================
   SWISS CIVIC DESIGN SYSTEM
   Harmonized with hero-bar and data-ribbon
   ==================================== */

/* Panel Base - Sharp institutional style */
.civic-panel {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: civicPanelFadeIn 0.35s ease-out backwards;
}

.civic-panel:nth-of-type(1) { animation-delay: 0.1s; }
.civic-panel:nth-of-type(2) { animation-delay: 0.15s; }
.civic-panel:nth-of-type(3) { animation-delay: 0.2s; }

@keyframes civicPanelFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Header - Minimalist with theme color */
.civic-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.civic-panel-title {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--gov-blue-primary, #1351B4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.civic-panel-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: none;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    background: rgba(19, 81, 180, 0.04);
    border: 1px solid rgba(19, 81, 180, 0.08);
    transition: all 0.2s ease;
}

.civic-panel-action:hover {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    border-color: var(--gov-blue-primary, #1351B4);
}

.civic-panel-action i {
    font-size: 9px;
    transition: transform 0.2s ease;
}

.civic-panel-action:hover i {
    transform: translateX(2px);
}

/* Panel Body */
.civic-panel-body {
    padding: 16px;
}

.civic-panel-body--flush {
    padding: 0;
}

/* ====================================
   MODALIDADE GRID - Swiss Civic Numbers
   ==================================== */

.modalidade-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modalidade-grid::-webkit-scrollbar {
    display: none;
}

.modalidade-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    min-width: 100px;
    position: relative;
    animation: modalidadeFadeIn 0.3s ease-out backwards;
    animation-delay: calc(var(--delay, 0) * 0.05s);
    transition: all 0.2s ease;
}

.modalidade-item:last-child {
    border-right: none;
}

.modalidade-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--gov-blue-primary, #1351B4);
    transition: width 0.2s ease;
}

.modalidade-item:hover {
    background: rgba(19, 81, 180, 0.02);
}

.modalidade-item:hover::before {
    width: 3px;
}

.modalidade-item:hover .modalidade-value {
    transform: scale(1.08);
    color: var(--gov-blue-darker, #071D41);
}

@keyframes modalidadeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modalidade-value {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gov-blue-primary, #1351B4);
    line-height: 1;
    transition: all 0.2s ease;
}

.modalidade-label {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    white-space: nowrap;
}

.modalidade-item--loading {
    flex: 1;
    min-width: 100%;
}

/* ====================================
   CIVIC TABLE - Minimal Swiss Design
   ==================================== */

.civic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.civic-table thead {
    background: rgba(0, 0, 0, 0.02);
}

.civic-table th {
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.civic-table th:first-child {
    padding-left: 17px; /* 14px + 3px para alinhar com border-left das células */
}

.civic-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #333;
    vertical-align: middle;
}

.civic-table tbody tr {
    transition: background 0.15s ease;
}

.civic-table tbody tr td:first-child {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease;
}

.civic-table tbody tr:hover {
    background: rgba(19, 81, 180, 0.02);
}

.civic-table tbody tr:hover td:first-child {
    border-left-color: var(--gov-blue-primary, #1351B4);
}

.civic-table tbody tr:last-child td {
    border-bottom: none;
}

/* Coluna mobile - oculta no desktop */
.civic-table th.col-info-mobile,
.civic-table td.col-info-mobile {
    display: none;
}

/* Elementos mobile na civic-table - ocultos no desktop */
.civic-table .mobile-badge,
.civic-table .mobile-badge-first,
.civic-table .mobile-info-col1,
.civic-table .mobile-objeto-row,
/* Atas SRP mobile elements */
.civic-table .mobile-srp,
.civic-table .mobile-vigencia-row,
.civic-table .mobile-descricao-row {
    display: none;
}

/* Atas SRP - Desktop styles */
.civic-table .descricao-text {
    line-height: 1.4;
    word-wrap: break-word;
}

.civic-table .vigencia-text {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.civic-table-loading {
    text-align: center;
    padding: 32px !important;
    color: #64748b;
}

.civic-table-loading i {
    margin-right: 8px;
    color: var(--gov-blue-primary, #1351B4);
}

/* Table Links */
.civic-table .table-link {
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.civic-table .table-link:hover {
    color: var(--gov-blue-darker, #071D41);
    text-decoration: underline;
}

.civic-table .objeto-link {
    color: #444;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.civic-table .objeto-link:hover {
    color: var(--gov-blue-primary, #1351B4);
}

/* Refined Badges */
.civic-table .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 0;
    white-space: nowrap;
}

/* Badge Colors - Using theme variables */
.civic-table .badge-blue,
.civic-table .badge.badge-blue {
    background: rgba(19, 81, 180, 0.1);
    color: var(--gov-blue-primary, #1351B4);
}

.civic-table .badge-green,
.civic-table .badge.badge-green {
    background: rgba(34, 139, 34, 0.1);
    color: #228B22;
}

.civic-table .badge-yellow,
.civic-table .badge.badge-yellow {
    background: rgba(218, 165, 32, 0.15);
    color: #B8860B;
}

.civic-table .badge-orange,
.civic-table .badge.badge-orange {
    background: rgba(255, 140, 0, 0.1);
    color: #CC7000;
}

.civic-table .badge-red,
.civic-table .badge.badge-red {
    background: rgba(220, 20, 60, 0.1);
    color: #DC143C;
}

.civic-table .badge-gray,
.civic-table .badge.badge-gray {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* ====================================
   QUICK GRID - Swiss Civic Access Cards
   ==================================== */

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

.quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 2px solid transparent;
    position: relative;
    opacity: 0;
    transform: translateY(6px);
    animation: quickCardFadeIn 0.3s ease-out forwards;
    animation-delay: calc(var(--delay, 0) * 0.06s);
    transition: all 0.2s ease;
}

@keyframes quickCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-card:hover {
    background: rgba(19, 81, 180, 0.02);
    border-left-color: var(--gov-blue-primary, #1351B4);
    box-shadow: 0 2px 8px rgba(19, 81, 180, 0.08);
}

.quick-card:hover .quick-icon {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    transform: scale(1.05);
}

.quick-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(19, 81, 180, 0.08);
    color: var(--gov-blue-primary, #1351B4);
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quick-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.quick-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-desc {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ====================================
   CIVIC DETAIL HEADER - Process Details
   ==================================== */

.civic-detail-header {
    background: linear-gradient(135deg, var(--gov-blue-primary, #1351B4) 0%, var(--gov-blue-darker, #071D41) 100%);
    color: #fff;
    padding: 24px 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.civic-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 100%);
    pointer-events: none;
}

.civic-detail-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.civic-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.civic-detail-badges .badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 0;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.civic-detail-processo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.civic-detail-processo-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0.7;
    text-transform: uppercase;
}

.civic-detail-processo-number {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.civic-detail-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 20px 0;
    color: #fff;
}

.civic-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.civic-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.9;
}

.civic-detail-meta-item i {
    font-size: 12px;
    opacity: 0.7;
}

.civic-detail-meta-link a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: border-color 0.15s ease;
}

.civic-detail-meta-link a:hover {
    border-color: #fff;
}

.civic-detail-actions {
    margin-top: 24px;
    padding-top: 20px;
}

.civic-detail-actions .civic-btn {
    width: auto;
}

@media (max-width: 768px) {
    .civic-detail-actions {
        margin-top: 16px;
        padding-top: 16px;
    }

    .civic-detail-actions .civic-btn {
        width: auto;
        max-width: 200px;
    }
}

/* ====================================
   CIVIC INFO GRID - Process Information
   ==================================== */

.civic-info-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.civic-info-item {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.01);
    border-left: 2px solid var(--gov-blue-primary, #1351B4);
}

.civic-info-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.civic-info-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* ====================================
   CIVIC TIMELINE - Process Movements
   ==================================== */

.civic-timeline {
    position: relative;
    padding-left: 32px;
}

.civic-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gov-blue-primary, #1351B4);
    opacity: 0.2;
}

.civic-timeline-item {
    position: relative;
    margin-bottom: 12px;
    animation: civicFadeInUp 0.3s ease forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}

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

@keyframes civicFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.civic-timeline-marker {
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--gov-blue-primary, #1351B4);
    border-radius: 0;
    z-index: 1;
    transition: all 0.15s ease;
}

.civic-timeline-content {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid transparent;
    padding: 12px 16px;
    transition: all 0.15s ease;
}

/* Hover effect for all timeline items */
.civic-timeline-item:hover .civic-timeline-marker {
    background: var(--gov-blue-primary, #1351B4);
    transform: translateY(-50%) scale(1.2);
}

.civic-timeline-item:hover .civic-timeline-content {
    border-left-color: var(--gov-blue-primary, #1351B4);
    background: rgba(19, 81, 180, 0.02);
}

.civic-timeline-content--clickable {
    cursor: pointer;
}

.civic-timeline-content--clickable:hover {
    box-shadow: 0 2px 8px rgba(19, 81, 180, 0.1);
}

.civic-timeline-item:hover .civic-timeline-link-icon {
    opacity: 1;
}

.civic-timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.civic-timeline-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.civic-timeline-date i {
    font-size: 11px;
    color: var(--gov-blue-primary, #1351B4);
}

.civic-timeline-number {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.civic-timeline-link-icon {
    font-size: 11px;
    color: var(--gov-blue-primary, #1351B4);
    opacity: 0.5;
    margin-left: auto;
    transition: opacity 0.15s ease;
}

.civic-timeline-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
}

/* ====================================
   SWISS CIVIC - RESPONSIVE
   ==================================== */

@media (max-width: 992px) {
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Info Grid - 3 columns on tablet */
    .civic-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hide modalidade grid on mobile */
    .civic-panel:has(.modalidade-grid) {
        display: none;
    }

    .civic-panel-header {
        padding: 12px 14px;
    }

    .civic-panel-title {
        font-size: 10px;
    }

    .civic-panel-action {
        font-size: 10px;
        padding: 5px 8px;
    }

    /* Table responsive */
    .civic-table th,
    .civic-table td {
        padding: 10px 12px;
    }

    .civic-table .col-modalidade,
    .civic-table .col-orgao,
    .civic-table .col-situacao,
    .civic-table .col-data,
    .civic-table .objeto-text,
    .civic-table th:nth-child(3),
    /* Atas SRP columns */
    .civic-table .col-srp,
    .civic-table .col-descricao,
    .civic-table .col-vigencia,
    .civic-table .col-status {
        display: none;
    }

    .civic-table th.col-info-mobile,
    .civic-table td.col-info-mobile {
        display: table-cell;
    }

    /* Mobile info elements for Atas SRP */
    .civic-table .mobile-info-col1 {
        display: block;
        margin-top: 4px;
    }

    .civic-table .mobile-srp {
        font-size: 11px;
        color: #64748b;
    }

    .civic-table .mobile-vigencia {
        font-size: 11px;
        color: #64748b;
    }

    .civic-table .mobile-descricao {
        font-size: 11px;
        color: #333;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .civic-table .mobile-vigencia-row,
    .civic-table .mobile-descricao-row {
        margin-top: 4px;
    }

    /* Detail Header - Mobile */
    .civic-detail-header {
        padding: 20px;
    }

    .civic-detail-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .civic-detail-title {
        font-size: 16px;
    }

    .civic-detail-meta {
        flex-direction: column;
        gap: 12px;
    }

    /* Info Grid - 2 columns on mobile */
    .civic-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .civic-info-item {
        padding: 8px 10px;
    }

    /* Timeline - Mobile */
    .civic-timeline {
        padding-left: 24px;
    }

    .civic-timeline::before {
        left: 4px;
    }

    .civic-timeline-marker {
        left: -24px;
        width: 10px;
        height: 10px;
    }

    .civic-timeline-content {
        padding: 10px 12px;
    }

    .civic-timeline-title {
        font-size: 12px;
    }

    /* Quick grid 2 columns */
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .quick-card {
        padding: 12px;
    }

    .quick-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .quick-title {
        font-size: 12px;
    }

    .quick-desc {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .civic-panel-body {
        padding: 12px;
    }

    .quick-grid {
        gap: 6px;
    }

    .quick-card {
        padding: 10px;
        gap: 8px;
    }

    .quick-icon {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .civic-panel,
    .modalidade-item,
    .quick-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Focus states for civic elements */
.modalidade-item:focus-visible,
.quick-card:focus-visible,
.civic-panel-action:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.25);
}

.civic-table tbody tr:focus-within {
    outline: 2px solid var(--gov-blue-primary, #1351B4);
    outline-offset: -2px;
}

/* ====================================
   SWISS CIVIC - BREADCRUMB
   ==================================== */

.civic-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.civic-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gov-blue-primary, #1351B4);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.civic-breadcrumb-link:hover {
    color: var(--gov-blue-darker, #071D41);
}

.civic-breadcrumb-link i {
    font-size: 10px;
    opacity: 0.7;
}

.civic-breadcrumb-separator {
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(15deg);
}

.civic-breadcrumb-current {
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
}

/* ====================================
   SWISS CIVIC - PANEL EXTENDED
   ==================================== */

.civic-panel--full {
    margin-bottom: 24px;
}

.civic-panel-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.civic-panel-count {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.04);
    letter-spacing: 0.02em;
}

/* ====================================
   SWISS CIVIC - FILTERS
   ==================================== */

.civic-filters {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.civic-filters-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background 0.15s ease;
}

.civic-filters-toggle:hover {
    background: rgba(0, 0, 0, 0.02);
}

.civic-filters-toggle.active {
    background: rgba(19, 81, 180, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.civic-filters-toggle-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.civic-filters-toggle-content i {
    font-size: 12px;
    color: var(--gov-blue-primary, #1351B4);
    opacity: 0.7;
}

.civic-filters-toggle-text {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.civic-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

.civic-filters-toggle-icon {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.civic-filters-toggle.active .civic-filters-toggle-icon {
    transform: rotate(180deg);
}

.civic-filters-content {
    padding: 16px;
    background: rgba(0, 0, 0, 0.01);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.civic-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.civic-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.civic-filter-group--wide {
    grid-column: span 2;
}

.civic-filter-label {
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.civic-filter-input,
.civic-filter-select {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    transition: all 0.15s ease;
}

.civic-filter-input:focus,
.civic-filter-select:focus {
    outline: none;
    border-color: var(--gov-blue-primary, #1351B4);
    box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.1);
}

.civic-filter-input::placeholder {
    color: #94a3b8;
}

.civic-filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.civic-filters-actions {
    display: flex;
    gap: 8px;
}

/* ====================================
   SWISS CIVIC - BUTTONS
   ==================================== */

.civic-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.civic-btn i {
    font-size: 11px;
}

.civic-btn--primary {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
}

.civic-btn--primary:hover {
    background: var(--gov-blue-darker, #071D41);
}

.civic-btn--secondary {
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.civic-btn--secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
    color: #333;
}

/* ====================================
   SWISS CIVIC - TABLE EXTENDED
   ==================================== */

.civic-table-row-clickable {
    cursor: pointer;
}

.civic-table-empty {
    padding: 48px !important;
    text-align: center;
}

.civic-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #64748b;
}

.civic-empty-state i {
    font-size: 32px;
    opacity: 0.5;
}

.civic-empty-state h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.civic-empty-state p {
    margin: 0;
    font-size: 12px;
}

.civic-empty-state--error i {
    color: #dc2626;
}

/* ====================================
   SWISS CIVIC - PAGINATION
   ==================================== */

.civic-pagination-wrapper {
    display: block;
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.civic-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.civic-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.civic-pagination-btn:hover {
    background: rgba(19, 81, 180, 0.04);
    border-color: var(--gov-blue-primary, #1351B4);
    color: var(--gov-blue-primary, #1351B4);
}

.civic-pagination-btn i {
    font-size: 11px;
}

.civic-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.civic-pagination-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-family: 'Rawline', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.civic-pagination-num:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #333;
}

.civic-pagination-num.active {
    background: var(--gov-blue-primary, #1351B4);
    color: #fff;
    border-color: var(--gov-blue-primary, #1351B4);
}

.civic-pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 36px;
    color: #94a3b8;
    font-size: 14px;
}

/* ====================================
   SWISS CIVIC - RESPONSIVE FILTERS
   ==================================== */

@media (max-width: 992px) {
    .civic-filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .civic-filter-group--wide {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .civic-breadcrumb {
        font-size: 10px;
        margin-bottom: 12px;
    }

    .civic-filters-grid {
        grid-template-columns: 1fr;
    }

    .civic-filter-group--wide {
        grid-column: span 1;
    }

    .civic-filters-actions {
        flex-direction: column;
    }

    .civic-btn {
        width: 100%;
        justify-content: center;
    }

    .civic-pagination-btn,
    .civic-pagination-num {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .civic-pagination-num {
        font-size: 11px;
    }

    /* Mobile table styles */
    .civic-table .col-modalidade,
    .civic-table .col-orgao,
    .civic-table .col-situacao,
    .civic-table .col-data,
    .civic-table .objeto-text,
    .civic-table th:nth-child(3),
    /* Atas SRP columns */
    .civic-table .col-srp,
    .civic-table .col-descricao,
    .civic-table .col-vigencia,
    .civic-table .col-status {
        display: none;
    }

    .civic-table th.col-info-mobile,
    .civic-table td.col-info-mobile {
        display: table-cell;
    }

    .mobile-info-col1 {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        margin-top: 6px;
        align-items: center;
    }

    .mobile-orgao {
        font-size: 10px;
        color: #64748b;
    }

    .mobile-objeto-row {
        display: flex !important;
    }

    .mobile-objeto {
        font-size: 10px;
        color: #444;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-data {
        font-size: 10px;
        color: #64748b;
    }

    .info-stack {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .info-stack .info-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .civic-table td:nth-child(2) {
        text-align: center;
    }

    .civic-table td.col-info-mobile {
        text-align: left;
        vertical-align: top;
    }
}

/* ====================================
   MOBILE ENHANCEMENTS - v2.0
   Improved responsive design for government transparency portal
   ==================================== */

/* ----- TYPOGRAPHY IMPROVEMENTS ----- */
/* Ensure minimum readable font sizes on mobile */
@media (max-width: 768px) {
    /* Base typography - never smaller than 12px */
    .civic-table td,
    .civic-table th,
    .info-stack,
    .mobile-objeto,
    .mobile-data,
    .mobile-orgao,
    .mobile-srp,
    .mobile-vigencia,
    .mobile-descricao {
        font-size: 12px !important;
    }

    /* Badge minimum size - legible on touch devices */
    .badge,
    .civic-table .badge {
        font-size: 10px !important;
        padding: 5px 10px !important;
        min-height: 24px;
    }

    /* Panel titles - readable but compact */
    .civic-panel-title {
        font-size: 11px !important;
        letter-spacing: 0.04em;
    }

    /* Breadcrumb - keep visible but compact */
    .civic-breadcrumb {
        font-size: 11px !important;
        padding: 8px 0;
    }

    /* Table links - accessible */
    .table-link {
        font-size: 13px !important;
        font-weight: 600;
    }
}

/* ----- TOUCH TARGET IMPROVEMENTS ----- */
/* Minimum 44x44px for all interactive elements (WCAG 2.5.5) */
@media (max-width: 768px) {
    /* Pagination buttons */
    .civic-pagination-btn,
    .civic-pagination-num {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 13px !important;
    }

    .civic-pagination-ellipsis {
        width: 32px;
        height: 44px;
    }

    .civic-pagination-numbers {
        gap: 2px;
        margin: 0 4px;
    }

    /* Filter buttons */
    .civic-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 12px !important;
    }

    /* Filter toggle */
    .civic-filters-toggle {
        min-height: 48px;
        padding: 14px 16px;
    }

    /* Table rows - larger touch area */
    .civic-table-row-clickable td {
        padding: 14px 12px !important;
    }

    /* Quick cards - larger touch area */
    .quick-card {
        min-height: 60px;
        padding: 14px !important;
    }
}

/* ----- HERO BAR MOBILE - Compact but Visible ----- */
@media (max-width: 768px) {
    /* Keep hero-bar visible on mobile with compact layout */
    .hero-bar {
        display: flex !important;
    }

    .hero-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px;
    }

    .hero-bar-identity {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .hero-bar-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .hero-bar-subtitle {
        font-size: 10px;
        opacity: 0.8;
    }

    .hero-bar-divider {
        display: none;
    }

    .hero-bar-nav {
        display: flex;
        gap: 8px;
    }

    .hero-bar-link {
        flex: 1;
        justify-content: center;
        padding: 12px 10px;
        font-size: 11px;
        min-height: 44px;
    }

    .hero-bar-link-text {
        font-size: 11px;
    }
}

/* ----- DATA RIBBON - Hidden ----- */
.data-ribbon {
    display: none !important;
}

/* ----- DATA RIBBON MOBILE - Horizontal Scroll ----- */
@media (max-width: 768px) {
    /* Stats visible as horizontal scroll instead of hidden */
    .data-ribbon {
        display: none !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0;
    }

    .data-ribbon::-webkit-scrollbar {
        display: none;
    }

    .data-ribbon-inner {
        display: inline-flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: 100%;
        padding: 0 12px;
    }

    .data-metric {
        flex: 0 0 auto;
        padding: 12px 16px;
        min-width: 90px;
    }

    .data-metric-value {
        font-size: 18px;
    }

    .data-metric-label {
        font-size: 10px;
    }

    .data-metric-divider {
        display: block !important;
        margin: 8px 0;
    }
}

/* Very small screens - grid fallback */
@media (max-width: 400px) {
    .data-ribbon-inner {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        padding: 8px;
        gap: 0;
    }

    .data-metric {
        min-width: unset;
        padding: 10px 8px;
        justify-content: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .data-metric:nth-child(odd) {
        border-right: 1px solid rgba(0,0,0,0.05);
    }

    .data-metric-divider {
        display: none !important;
    }
}

/* ----- FILTERS MOBILE - 2-Column Layout ----- */
@media (max-width: 768px) {
    .civic-filters-content {
        padding: 14px;
    }

    /* 2-column grid for filter dropdowns */
    .civic-filters-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Search spans full width */
    .civic-filter-group--wide {
        grid-column: span 2 !important;
    }

    /* Filter inputs - proper mobile size */
    .civic-filter-input,
    .civic-filter-select {
        padding: 12px;
        font-size: 14px !important;
        min-height: 44px;
    }

    .civic-filter-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    /* Action buttons - 2 columns */
    .civic-filters-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .civic-filters-actions .civic-btn {
        width: 100%;
    }
}

/* Very small screens - single column */
@media (max-width: 400px) {
    .civic-filters-grid {
        grid-template-columns: 1fr !important;
    }

    .civic-filter-group--wide {
        grid-column: span 1 !important;
    }

    .civic-filters-actions {
        grid-template-columns: 1fr;
    }
}

/* ----- TABLE MOBILE - Better Info Layout ----- */
@media (max-width: 768px) {
    /* Improved info-stack layout */
    .info-stack {
        display: flex;
        flex-direction: column;
        gap: 6px !important;
    }

    .info-stack .info-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Badge + Date on same line */
    .info-stack .info-row:first-child {
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    /* Object text - better readability - NO truncation */
    .mobile-objeto,
    .mobile-descricao,
    .civic-table .mobile-objeto,
    .civic-table .mobile-descricao,
    .info-stack .mobile-objeto,
    .info-stack .mobile-descricao {
        font-size: 12px !important;
        line-height: 1.5 !important;
        color: #333 !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal !important;
        max-height: none !important;
    }

    /* Ensure info rows show full content */
    .info-stack .info-row,
    .info-stack .mobile-objeto-row,
    .info-stack .mobile-descricao-row,
    .civic-table .mobile-objeto-row,
    .civic-table .mobile-descricao-row {
        display: block !important;
        overflow: visible !important;
    }

    /* Date styling */
    .mobile-data,
    .mobile-vigencia {
        font-size: 11px !important;
        color: #64748b;
        font-weight: 500;
    }

    /* Mobile info col1 - process column */
    .mobile-info-col1 {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        margin-top: 6px;
        align-items: flex-start !important;
    }

    /* Órgão and SRP labels */
    .mobile-orgao,
    .mobile-srp {
        font-size: 11px !important;
        color: #64748b;
        background: rgba(0,0,0,0.03);
        padding: 2px 6px;
        border-radius: 2px;
    }

    /* Table cell alignment */
    .civic-table td:first-child,
    .civic-table td:nth-child(2) {
        vertical-align: top;
        text-align: left !important;
    }

    /* Clickable row hover - visible on touch */
    .civic-table-row-clickable {
        position: relative;
    }

    .civic-table-row-clickable::after {
        content: '\f054';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: #94a3b8;
        opacity: 0.6;
    }

    .civic-table-row-clickable:active {
        background: rgba(19, 81, 180, 0.06);
    }

    .civic-table-row-clickable td:last-child {
        padding-right: 32px !important;
    }
}

/* ----- CONTENT PADDING - Mobile Optimized ----- */
@media (max-width: 768px) {
    .public-main {
        padding: 16px !important;
    }

    .civic-panel-body {
        padding: 14px !important;
    }

    .civic-panel-body--flush {
        padding: 0 !important;
    }

    .civic-panel-header {
        padding: 14px 16px;
    }
}

/* ----- QUICK GRID MOBILE - Improved Touch ----- */
@media (max-width: 768px) {
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .quick-card {
        padding: 14px !important;
        min-height: 64px;
    }

    .quick-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .quick-title {
        font-size: 12px;
    }

    .quick-desc {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .quick-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .quick-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px 8px !important;
    }

    .quick-content {
        align-items: center;
    }
}

/* ----- MODALIDADE GRID - Show on Mobile ----- */
@media (max-width: 768px) {
    /* Show modalidade grid on mobile but more compact */
    .civic-panel:has(.modalidade-grid) {
        display: block !important;
    }

    .modalidade-grid {
        display: flex !important;
        overflow-x: auto;
        gap: 8px;
        padding: 0 4px 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .modalidade-grid::-webkit-scrollbar {
        display: none;
    }

    .modalidade-item {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 12px 16px;
    }

    .modalidade-value {
        font-size: 16px;
    }

    .modalidade-label {
        font-size: 9px;
    }
}

/* ----- HEADER MOBILE - Improved Navigation ----- */
/* Estilos movidos para a seção principal do header em @media (max-width: 992px) */

/* ----- EMPTY STATE MOBILE ----- */
@media (max-width: 768px) {
    .civic-table-empty {
        padding: 32px 16px !important;
    }

    .civic-empty-state i {
        font-size: 28px;
    }

    .civic-empty-state h3 {
        font-size: 14px;
    }

    .civic-empty-state p {
        font-size: 12px;
    }
}

/* ----- DETAIL PAGE MOBILE ----- */
@media (max-width: 768px) {
    .civic-detail-header {
        padding: 16px;
    }

    .civic-detail-title {
        font-size: 15px;
        line-height: 1.4;
    }

    .civic-detail-badges .badge {
        padding: 6px 10px;
    }

    .civic-info-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .civic-info-item {
        padding: 10px 12px;
    }

    .civic-info-label {
        font-size: 10px;
    }

    .civic-info-value {
        font-size: 13px;
    }

    /* Timeline mobile */
    .civic-timeline {
        padding-left: 20px;
    }

    .civic-timeline::before {
        left: 3px;
    }

    .civic-timeline-marker {
        left: -20px;
        width: 8px;
        height: 8px;
    }

    .civic-timeline-content {
        padding: 10px 12px;
    }

    .civic-timeline-header {
        gap: 8px;
    }

    .civic-timeline-date {
        font-size: 11px;
    }

    .civic-timeline-title {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* ----- ACCESSIBILITY IMPROVEMENTS ----- */
@media (max-width: 768px) {
    /* Focus states more visible on mobile */
    .civic-table-row-clickable:focus-within {
        outline: 3px solid #FFD700;
        outline-offset: -3px;
    }

    .civic-btn:focus-visible,
    .civic-pagination-btn:focus-visible,
    .civic-pagination-num:focus-visible {
        outline: 3px solid #FFD700;
        outline-offset: 2px;
    }

    /* Loading state more visible */
    .civic-table-loading {
        padding: 32px 16px !important;
        font-size: 13px;
    }

    .civic-table-loading i {
        font-size: 20px;
        margin-bottom: 8px;
    }
}

/* ----- PRINT STYLES ----- */
@media print {
    .hero-bar,
    .civic-filters,
    .civic-pagination-wrapper,
    .quick-grid,
    .accessibility-bar,
    .public-header {
        display: none !important;
    }

    .public-main {
        margin-top: 0 !important;
        padding: 20px !important;
    }

    .civic-table th.col-info-mobile,
    .civic-table td.col-info-mobile {
        display: none !important;
    }

    .civic-table .col-modalidade,
    .civic-table .col-orgao,
    .civic-table .col-situacao,
    .civic-table .col-data,
    .civic-table .objeto-text,
    .civic-table .col-srp,
    .civic-table .col-descricao,
    .civic-table .col-vigencia,
    .civic-table .col-status {
        display: table-cell !important;
    }
}

/* ====================================
   MOBILE CARDS LAYOUT - v1.0
   Card-based layout for mobile devices
   ==================================== */

/* Container visibility */
.mobile-cards-container {
    display: none;
}

@media (max-width: 768px) {
    /* Hide table on mobile */
    .civic-panel-body--flush:has(.civic-table) {
        display: none;
    }

    /* Show cards container */
    .mobile-cards-container {
        display: block;
        padding: 12px;
    }
}

/* Individual Card */
.mobile-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--gov-blue-primary, #1351B4);
    margin-bottom: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-card:hover {
    border-left-color: var(--gov-blue-darker, #071D41);
    box-shadow: 0 2px 8px rgba(19, 81, 180, 0.12);
}

.mobile-card:active {
    background: rgba(19, 81, 180, 0.02);
}

/* Card Header - Badges */
.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.mobile-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-card-header .badge {
    font-size: 10px;
    padding: 4px 8px;
    font-weight: 600;
}

.mobile-card-processo {
    font-size: 13px;
    font-weight: 600;
    color: var(--gov-blue-primary, #1351B4);
}

/* Card Body - Main Content */
.mobile-card-body {
    padding: 12px 16px;
}

.mobile-card-objeto {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    /* No truncation - show full text */
}

/* Card Footer - Meta Info */
.mobile-card-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.01);
}

.mobile-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.mobile-card-meta i {
    font-size: 11px;
    color: var(--gov-blue-primary, #1351B4);
    opacity: 0.7;
}

/* Arrow indicator */
.mobile-card::after {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.mobile-card:hover::after {
    opacity: 1;
    right: 14px;
    color: var(--gov-blue-primary, #1351B4);
}

/* Atas SRP specific styles */
.mobile-card-ata-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mobile-card-ata-numero {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.mobile-card-srp {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.mobile-card-vigencia {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.mobile-card-vigencia i {
    color: var(--gov-blue-primary, #1351B4);
    opacity: 0.7;
}

/* Loading state for cards */
.mobile-cards-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    color: #64748b;
    gap: 12px;
}

.mobile-cards-loading i {
    font-size: 24px;
    color: var(--gov-blue-primary, #1351B4);
}

/* Empty state for cards */
.mobile-cards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    text-align: center;
    color: #64748b;
}

.mobile-cards-empty i {
    font-size: 32px;
    opacity: 0.5;
    margin-bottom: 12px;
}

.mobile-cards-empty h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}

.mobile-cards-empty p {
    font-size: 12px;
    margin: 0;
}

/* Card link - for external atas */
.mobile-card--has-link .mobile-card-ata-numero {
    color: var(--gov-blue-primary, #1351B4);
}

/* Pagination adjustments for cards view */
@media (max-width: 768px) {
    .civic-pagination-wrapper {
        padding: 12px;
        margin-top: 0;
    }
}
