:root {
    /* Cores JUS - mantidas como accent secundário */
    --jus-vinho: #6d2932;
    --jus-azul: #2c4f5e;
    --jus-dourado: #b8963c;

    /* Paleta institucional TJTO - usada como identidade primária */
    --tjto-azul: #1c4870;
    --tjto-azul-dark: #0f2f4d;
    --tjto-azul-light: #4a78a3;
    --tjto-azul-soft: #e8eef5;

    --primary: var(--tjto-azul); /* Azul institucional como primário */
    --primary-dark: var(--tjto-azul-dark);
    --secondary: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;
    --dark: #202124;
    --light: #f8f9fa;
    --border: #dadce0;
    --shadow: rgba(0,0,0,0.1);
    --text: #202124;
    --text-muted: #5f6368;
    --success-bg: #e6f4ea;
    --error-bg: #fce8e6;
    --warning-bg: #fef7e0;
    --info-bg: #e8f0fe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Dark mode */
body.dark-mode {
    --primary: #4a7589;
    --primary-dark: #5a8599;
    --light: #1a1a1a;
    --text: #e8eaed;
    --text-muted: #9aa0a6;
    --border: #3c4043;
    --shadow: rgba(255,255,255,0.1);
    --success-bg: #1e3a2e;
    --error-bg: #3c1f1f;
    --warning-bg: #3a3319;
    --info-bg: #1e3a5f;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header aprimorado com cores JUS */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

.header h1 {
    font-size: 2.5rem;
    /* Tom institucional TJTO: sólido, sóbrio, confiável */
    color: var(--tjto-azul);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

body.dark-mode .header h1 {
    color: var(--tjto-azul-light);
}

/* Barra institucional TJTO no topo - logo branco em fundo azul institucional */
.tjto-bar {
    background: var(--tjto-azul);
    border-bottom: 3px solid var(--tjto-azul-dark);
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tjto-bar-inner {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.tjto-bar img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .tjto-bar {
        padding: 0.7rem 1rem;
    }
    .tjto-bar-inner {
        justify-content: center;
    }
    .tjto-bar img {
        height: 36px;
    }
}

@media (max-width: 480px) {
    .tjto-bar img {
        height: 30px;
    }
}

/* Subtítulo institucional - mantido como complemento textual ao logo */
.header-institutional {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tjto-azul);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tjto-azul);
    display: inline-block;
}

body.dark-mode .header-institutional {
    color: var(--tjto-azul-light);
    border-bottom-color: var(--tjto-azul-light);
}

/* Efeito de brilho animado - desativado no visual institucional */
.header h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: none;
    animation: none;
    pointer-events: none;
    display: none;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Avatar 3D no Header com cores JUS */
.header-avatar {
    width: 80px;
    height: 80px;
    position: relative;
    animation: rotate3D 12s ease-in-out infinite;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.header-avatar:hover {
    animation-play-state: paused;
    transform: scale(1.2) rotateY(180deg);
}

.header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(109, 41, 50, 0.4),
        0 0 30px rgba(44, 79, 94, 0.3),
        0 0 40px rgba(184, 150, 60, 0.2);
    border: 4px solid var(--jus-dourado);
    object-fit: cover;
    position: relative;
    z-index: 2;
}

/* Efeito 3D - Sombra e brilho com cores JUS */
.header-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, 
        rgba(109, 41, 50, 0.3) 0%, 
        rgba(44, 79, 94, 0.2) 50%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: pulse3D 4s ease-in-out infinite;
}

.header-avatar::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, 
        var(--jus-vinho), 
        var(--jus-azul), 
        var(--jus-dourado),
        var(--jus-vinho)
    );
    border-radius: 50%;
    z-index: 0;
    opacity: 0.6;
    filter: blur(12px);
    animation: rotate 12s linear infinite;
}

@keyframes rotate3D {
    0%, 100% {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: perspective(1000px) rotateY(90deg) rotateX(10deg);
    }
    50% {
        transform: perspective(1000px) rotateY(180deg) rotateX(0deg);
    }
    75% {
        transform: perspective(1000px) rotateY(270deg) rotateX(-10deg);
    }
}

@keyframes pulse3D {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Badges for supported formats - cores JUS */
.format-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.format-badge {
    background: var(--tjto-azul-soft);
    color: var(--tjto-azul);
    border: 1px solid var(--tjto-azul-light);
    padding: 0.3rem 0.85rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: fadeIn 0.5s ease;
    transition: all 0.2s ease;
}

.format-badge:hover {
    transform: translateY(-1px);
    background: var(--tjto-azul);
    color: #fff;
    border-color: var(--tjto-azul);
    box-shadow: 0 2px 6px rgba(28, 72, 112, 0.25);
}

body.dark-mode .format-badge {
    background: rgba(74, 120, 163, 0.15);
    color: var(--tjto-azul-light);
    border-color: var(--tjto-azul-light);
}

/* Cards com glassmorphism */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease;
    border: 1px solid var(--border);
}

body.dark-mode .card {
    background: rgba(42, 42, 42, 0.95);
    border-color: var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px var(--shadow);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    /* Reset estilos padrão de <ol> usado para acessibilidade */
    list-style: none;
    padding: 0;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: -1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1;
}

.step.active .step-circle {
    background: var(--jus-azul);
    color: white;
    border-color: var(--jus-azul);
    transform: scale(1.1);
}

.step.completed .step-circle {
    background: var(--jus-dourado);
    color: white;
    border-color: var(--jus-dourado);
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* File upload area melhorada */
#drop-area {
    border: 2px dashed var(--jus-dourado);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, 
        rgba(109, 41, 50, 0.05) 0%, 
        rgba(44, 79, 94, 0.05) 50%,
        rgba(184, 150, 60, 0.05) 100%
    );
    position: relative;
    overflow: hidden;
}

#drop-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--jus-dourado) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#drop-area:hover::before,
#drop-area.hover::before {
    opacity: 0.1;
}

#drop-area:hover,
#drop-area.hover {
    border-color: var(--jus-azul);
    transform: scale(1.02);
}

/* Image preview */
.preview-container {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    position: relative;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
}

.preview-info {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remove-file {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c23321;
    transform: scale(1.05);
}

/* OCR quality indicator */
.ocr-quality {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.ocr-quality.good {
    background: var(--success-bg);
    color: var(--secondary);
}

.ocr-quality.medium {
    background: var(--warning-bg);
    color: #ea8600;
}

.ocr-quality.low {
    background: var(--error-bg);
    color: var(--danger);
}

/* Botões melhorados com cores JUS */
.button {
    background: linear-gradient(135deg, var(--jus-azul) 0%, var(--jus-vinho) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(44, 79, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 79, 94, 0.4);
}

/* File type icons */
.file-type-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Supported formats grid */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.format-item {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.format-item:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, 
        rgba(109, 41, 50, 0.1) 0%, 
        rgba(184, 150, 60, 0.1) 100%
    );
    border-color: var(--jus-dourado);
}

.format-item .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.format-item .name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Loading avançado */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
}

body.dark-mode .loading-content {
    background: #2a2a2a;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top: 4px solid var(--jus-dourado);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text);
    margin-bottom: 1rem;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--jus-vinho) 0%, var(--jus-azul) 50%, var(--jus-dourado) 100%);
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 8px 32px var(--shadow);
    transition: bottom 0.3s ease;
    z-index: 10000;
    max-width: 90%;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    bottom: 2rem;
}

.toast.success {
    background: var(--secondary);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
    color: var(--dark);
}

.toast.info {
    background: var(--jus-azul);
}

/* Theme switch com cores JUS */
.theme-switch {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--jus-vinho) 0%, var(--jus-azul) 100%);
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "☀️";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

input:checked + .slider {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

input:checked + .slider:before {
    content: "🌙";
    transform: translateX(30px);
}

/* AVATAR ANIMADO */
.avatar-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.avatar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 4px solid var(--jus-dourado);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

.avatar::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 3px solid var(--jus-dourado);
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 50px rgba(184, 150, 60, 0.4);
}

.speech-bubble {
    background: white;
    border-radius: 20px;
    padding: 15px 20px;
    max-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

body.dark-mode .speech-bubble {
    background: #2a2a2a;
}

.speech-bubble.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid white;
}

body.dark-mode .speech-bubble::after {
    border-top-color: #2a2a2a;
}

.speech-bubble p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.speech-bubble .avatar-name {
    font-weight: bold;
    color: var(--jus-azul);
    margin-bottom: 5px;
    display: block;
}

.thinking-dots {
    display: none;
    gap: 5px;
}

.thinking-dots.show {
    display: flex;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jus-dourado);
    animation: thinking 1.4s infinite;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--jus-dourado);
    border-radius: 50%;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(184, 150, 60, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(184, 150, 60, 0);
    }
}

.close-bubble {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-bubble:hover {
    background: var(--light);
    color: var(--danger);
}

.particle {
    position: absolute;
    pointer-events: none;
}

.avatar-container.minimized .avatar {
    width: 70px;
    height: 70px;
}

.avatar-container.minimized .speech-bubble {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header-avatar {
        width: 60px;
        height: 60px;
    }

    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .progress-steps::before {
        display: none;
    }

    .formats-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .avatar-container {
        bottom: 15px;
        right: 15px;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .speech-bubble {
        max-width: 200px;
        font-size: 13px;
    }

    .stats-thermometer {
        padding: 1rem;
    }

    .thermometer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gauge-container {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }

    .stats-compact {
        gap: 0.5rem;
    }

    .milestones-badges {
        gap: 0.75rem;
    }

    .badge-item {
        font-size: 1.5rem;
    }
}

/* === TERMÔMETRO V2: INOVADOR E INTERATIVO === */
.stats-thermometer-v2 {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    animation: fadeIn 0.6s ease;
}

body.dark-mode .stats-thermometer {
    background: linear-gradient(135deg, rgba(40,40,40,0.95) 0%, rgba(30,30,30,0.9) 100%);
}

.thermometer-header {
    text-align: center;
    margin-bottom: 1rem;
}

.thermometer-header h3 {
    font-size: 1.25rem;
    color: var(--jus-azul);
    margin: 0;
    font-weight: 700;
}

.thermometer-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

/* Gauge Circular */
.gauge-container {
    position: relative;
    width: 160px;
    height: 160px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.gauge-container:hover {
    transform: scale(1.05) rotate(5deg);
}

.gauge-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 16px rgba(44, 79, 94, 0.3));
    animation: gaugePulse 3s ease-in-out infinite;
}

@keyframes gaugePulse {
    0%, 100% {
        filter: drop-shadow(0 4px 16px rgba(44, 79, 94, 0.3));
    }
    50% {
        filter: drop-shadow(0 6px 24px rgba(44, 79, 94, 0.6)) drop-shadow(0 0 40px rgba(184, 150, 60, 0.4));
    }
}

#gaugeProgress {
    filter: drop-shadow(0 0 8px rgba(184, 150, 60, 0.6));
    animation: gaugeGlow 2s ease-in-out infinite;
}

@keyframes gaugeGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(184, 150, 60, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(184, 150, 60, 0.9)) drop-shadow(0 0 24px rgba(109, 41, 50, 0.5));
    }
}

#gaugeTotal {
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gauge-milestone {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--jus-vinho) 0%, var(--jus-azul) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(109, 41, 50, 0.3);
}

/* Estatísticas compactas */
.stats-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--light) 0%, rgba(255,255,255,0.8) 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 79, 94, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateX(8px) scale(1.02);
    border-color: var(--jus-azul);
    box-shadow: 0 4px 16px rgba(44, 79, 94, 0.3), 0 0 20px rgba(184, 150, 60, 0.2);
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(44, 79, 94, 0.05) 100%);
}

.stat-item:active {
    transform: translateX(4px) scale(0.98);
}

.stat-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
    animation: iconFloat 3s ease-in-out infinite;
}

.stat-item:hover .stat-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

.stat-compact-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--jus-azul);
    line-height: 1;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-compact-value {
    color: var(--jus-dourado);
    transform: scale(1.1);
}

.stat-compact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1;
}

/* Milestones badges */
.milestones-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.badge-item {
    font-size: 1.75rem;
    filter: grayscale(100%) opacity(0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
}

.badge-item:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.3) rotate(20deg);
    animation: badgeShake 0.5s ease infinite;
}

@keyframes badgeShake {
    0%, 100% {
        transform: scale(1.3) rotate(18deg);
    }
    50% {
        transform: scale(1.3) rotate(22deg);
    }
}

.badge-item.achieved {
    filter: grayscale(0%) opacity(1);
    animation: achievedBounce 1s ease infinite;
}

@keyframes achievedBounce {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.15) translateY(-5px);
    }
}

.badge-item.achieved::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1rem;
    animation: sparkle 2s ease infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Compartilhamento social compacto */
.social-share-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.share-btn-small {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.share-btn-small:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px var(--shadow);
}

.share-btn-small.whatsapp {
    color: #25D366;
    border-color: #25D366;
}

.share-btn-small.whatsapp:hover {
    background: #25D366;
    color: white;
}

.share-btn-small.twitter {
    color: #1DA1F2;
    border-color: #1DA1F2;
}

.share-btn-small.twitter:hover {
    background: #1DA1F2;
    color: white;
}

.share-btn-small.facebook {
    color: #1877F2;
    border-color: #1877F2;
}

.share-btn-small.facebook:hover {
    background: #1877F2;
    color: white;
}

.share-btn-small.copy {
    color: var(--jus-azul);
    border-color: var(--jus-azul);
}

.share-btn-small.copy:hover {
    background: var(--jus-azul);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === TERMÔMETRO MINIMALISTA === */
.stats-minimal {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stats-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--jus-azul);
    font-weight: 700;
}

.stats-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.stat-mini strong {
    font-size: 1.2rem;
    color: var(--jus-vinho);
    font-weight: 800;
    line-height: 1;
}

.stat-mini span {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 120px;
}

.progress-minimal {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--jus-vinho), var(--jus-azul));
    border-radius: 4px;
    transition: width 0.8s ease;
}

.stats-footer-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badges-minimal {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.badge-mini {
    font-size: 1.1rem;
    cursor: help;
    transition: all 0.3s ease;
    opacity: 0.3;
    filter: grayscale(100%);
}

.badge-mini:not(.locked) {
    opacity: 1;
    filter: grayscale(0%);
    animation: badgePop 0.5s ease;
}

.badge-mini:hover {
    transform: scale(1.3);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

.social-minimal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.social-icon:hover {
    background: var(--jus-azul);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-icon:active {
    transform: translateY(0);
}

.social-icon svg {
    display: block;
}

/* Feedback Stats Section - Minimalista e Elegante */
.feedback-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0 0.5rem 0;
    padding: 0.8rem 0 0.5rem 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.feedback-stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.feedback-stat-item:hover {
    opacity: 1;
}

.feedback-stat-item .emoji {
    font-size: 0.9rem;
    opacity: 0.7;
}

.feedback-stat-item strong {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.feedback-stat-item span {
    font-size: 0.75rem;
    color: #666;
    font-weight: 400;
}

.feedback-divider {
    width: 1px;
    height: 20px;
    background: rgba(0,0,0,0.1);
}

.satisfaction-rate {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.satisfaction-rate:hover {
    opacity: 1;
}

.satisfaction-rate .percentage {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--jus-azul);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.satisfaction-rate span {
    font-size: 0.75rem;
    color: #666;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-inline {
        width: 100%;
        justify-content: space-between;
    }

    .stat-mini strong {
        font-size: 1rem;
    }

    .stat-mini span {
        font-size: 0.65rem;
    }

    .badges-minimal {
        gap: 0.4rem;
    }

    .badge-mini {
        font-size: 1rem;
    }

    .social-icon {
        width: 28px;
        height: 28px;
    }

    .social-icon svg {
        width: 16px;
        height: 16px;
    }

    .feedback-stats {
        gap: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .feedback-stat-item .emoji {
        font-size: 1rem;
    }

    .feedback-stat-item strong {
        font-size: 0.9rem;
    }

    .feedback-stat-item span {
        font-size: 0.65rem;
    }

    .satisfaction-rate .percentage {
        font-size: 1rem;
    }

    .feedback-divider {
        height: 20px;
    }
}

/* Estilos para valores discriminados */
.valores-detalhados {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.categoria-valor {
    margin-bottom: 15px;
}

.categoria-valor h4 {
    margin: 0 0 8px 0;
    color: #2c5282;
    font-size: 1.1em;
}

.categoria-valor ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.categoria-valor ul li {
    margin: 4px 0;
    color: #4a5568;
}

.total-valor {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #2c5282;
}

.total-valor h3 {
    margin: 0;
    color: #2c5282;
    font-size: 1.3em;
}

.categoria-valor p {
    margin: 0;
}

/* Footer INOVASSOL */
.footer-inovassol {
    background: linear-gradient(135deg, var(--jus-vinho) 0%, var(--jus-azul) 100%);
    color: white;
    padding: 2.5rem 1rem 1.5rem;
    margin-top: 4rem;
    text-align: center;
    border-top: 4px solid var(--jus-dourado);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.footer-inovassol h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--jus-dourado);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.footer-contact span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-link {
    color: var(--jus-dourado);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer-link:hover {
    border-bottom-color: var(--jus-dourado);
    text-shadow: 0 0 10px rgba(184, 150, 60, 0.5);
}

.footer-divider {
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 1.5rem auto;
}

@media (max-width: 768px) {
    .footer-inovassol {
        padding: 2rem 1rem 1rem;
        margin-top: 3rem;
    }

    .footer-inovassol h3 {
        font-size: 1.1rem;
    }

    .footer-content p {
        font-size: 0.85rem;
    }

    .footer-contact {
        flex-direction: column;
        gap: 0.8rem;
        font-size: 0.85rem;
    }
}

/* Estilos para botão Nova Simplificação */
.button-new-doc {
    background: linear-gradient(135deg, var(--jus-azul) 0%, var(--jus-vinho) 100%) !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.button-new-doc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 79, 94, 0.4);
}

/* Estilos para botões de feedback */
.feedback-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.feedback-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.feedback-positive {
    border-color: var(--secondary);
    color: var(--secondary);
}

.feedback-positive:hover {
    background: var(--secondary);
    color: white;
}

.feedback-positive:hover svg {
    stroke: white;
}

.feedback-negative {
    border-color: var(--danger);
    color: var(--danger);
}

.feedback-negative:hover {
    background: var(--danger);
    color: white;
}

.feedback-negative:hover svg {
    stroke: white;
}

.feedback-btn svg {
    transition: all 0.3s ease;
}

.feedback-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.feedback-btn.selected {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.feedback-positive.selected {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.feedback-positive.selected svg {
    stroke: white;
}

.feedback-negative.selected {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.feedback-negative.selected svg {
    stroke: white;
}

/* Responsividade para feedback */
@media (max-width: 768px) {
    .feedback-btn {
        min-width: 100px;
        padding: 0.75rem 1rem;
    }

    .feedback-label {
        font-size: 0.75rem;
    }
}

/* ===== SCROLL CONTAINER COM DETECÇÃO ===== */
.scroll-container {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Scroll customizado */
.scroll-container::-webkit-scrollbar {
    width: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

body.dark-mode .scroll-container::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--jus-dourado);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--jus-azul);
}

/* Marcador invisível para detectar fim do scroll */
.scroll-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
}

/* ===== BOTÕES DE AÇÃO COM ANIMAÇÃO ===== */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg,
        rgba(109, 41, 50, 0.05) 0%,
        rgba(44, 79, 94, 0.05) 50%,
        rgba(184, 150, 60, 0.05) 100%
    );
    border-radius: 12px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado oculto dos botões */
.action-buttons.hidden-actions {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Animação de entrada dos botões */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-buttons.show-actions {
    animation: slideInUp 0.6s ease-out forwards;
}

/* Botão individual */
.btn-action {
    flex: 1;
    min-width: 150px;
}

/* Botão WhatsApp especial */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    position: relative;
    overflow: hidden;
    color: white !important;
}

.btn-whatsapp svg {
    fill: white;
    vertical-align: middle;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
}

.btn-whatsapp::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-whatsapp:active::after {
    width: 300px;
    height: 300px;
}

/* ===== TOAST MELHORADO ===== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 90%;
    word-wrap: break-word;
}

.toast-success {
    background: #48bb78;
}

.toast-error {
    background: #f56565;
}

.toast-info {
    background: #4299e1;
}

.toast-warning {
    background: #ed8936;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== RESPONSIVIDADE MOBILE ===== */
@media (max-width: 768px) {
    .scroll-container {
        max-height: 60vh;
        padding: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .btn-action {
        width: 100%;
        min-width: unset;
    }

    .toast-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Logo INOVASSOL fixo no canto inferior esquerdo */
.logo-inovassol-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo-inovassol {
    display: block;
    width: 100px;
    height: 100px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: floatLogo 3s ease-in-out infinite;
    box-shadow:
        0 8px 24px rgba(109, 41, 50, 0.4),
        0 4px 12px rgba(44, 79, 94, 0.3),
        0 0 40px rgba(184, 150, 60, 0.2);
}

.logo-inovassol:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow:
        0 12px 32px rgba(109, 41, 50, 0.6),
        0 8px 20px rgba(44, 79, 94, 0.4),
        0 0 60px rgba(184, 150, 60, 0.4);
}

.logo-inovassol img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid var(--jus-dourado);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.logo-inovassol:hover img {
    filter: brightness(1.1);
}

.logo-inovassol::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    background: radial-gradient(
        circle,
        rgba(184, 150, 60, 0.3) 0%,
        rgba(109, 41, 50, 0.2) 50%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseLogoGlow 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulseLogoGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .logo-inovassol-container {
        bottom: 15px;
        left: 15px;
    }

    .logo-inovassol {
        width: 80px;
        height: 80px;
    }
}

/* =========================================================================
   Footer institucional - identidade Poder Judiciário do Tocantins
   Replica o padrão visual do site institucional (azul TJTO, tipografia
   sóbria, blocos de informação organizados em colunas).
   ========================================================================= */
.institutional-footer {
    margin-top: 4rem;
    background: var(--tjto-azul);
    color: #ffffff;
    padding: 2.5rem 1.5rem 1.5rem;
    border-top: 4px solid var(--tjto-azul-dark);
}

.institutional-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 3rem;
}

.institutional-footer h2 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.6rem;
    border: 0;
    padding: 0;
    display: block;
}

.institutional-footer p,
.institutional-footer address {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    font-style: normal;
    margin-bottom: 1.25rem;
}

.institutional-footer .footer-contact-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
}

.institutional-footer .footer-contact-line svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: var(--tjto-azul-light);
}

.institutional-footer .footer-brand {
    margin-bottom: 1.25rem;
}

.institutional-footer .footer-brand img {
    display: block;
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .institutional-footer .footer-brand img {
        height: 52px;
    }
}

@media (max-width: 480px) {
    .institutional-footer .footer-brand img {
        height: 44px;
    }
}

.institutional-footer-bottom {
    max-width: 1200px;
    margin: 1.75rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.5;
}

.institutional-footer-bottom a {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .institutional-footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .institutional-footer {
        padding: 2rem 1.25rem 1.25rem;
    }
}

/* =========================================================================
   Acessibilidade: respeito a prefers-reduced-motion
   Usuários com vestibular disorders, enxaqueca, autismo ou em situação de
   estresse (público típico desta aplicação) podem ter o sistema configurado
   para reduzir movimento. Aqui desligamos / encurtamos animações e mantemos
   apenas transições essenciais.
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .header h1::before,
    .header-avatar,
    .header-avatar::before,
    .header-avatar::after {
        animation: none !important;
    }

    .header-avatar:hover {
        transform: none;
    }
}

