/*
====================================================
 Sistema de Declarações Institucional – UniMB
 Desenvolvido por: Thalia Justino
 Ano: 2026
====================================================
*/

/* =========================
   RESET BÁSICO
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: #f6f7f9;
    color: #1f2937;
}

/* =========================
   HEADER GLOBAL
========================= */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: #7a0c0d;
}

/* =========================
   NAV
========================= */
.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    position: relative;
}

.header-nav a:hover {
    color: #7a0c0d;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7a0c0d;
    transition: width .2s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

.nav-highlight {
    font-weight: 600;
    color: #7a0c0d;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* =========================
   TÍTULOS
========================= */
h1 {
    font-size: 26px;
    color: #7a0c0d;
    margin-bottom: 20px;
}

h2 {
    font-size: 20px;
    color: #7a0c0d;
    margin-bottom: 16px;
}

h3 {
    font-size: 17px;
    color: #7a0c0d;
    margin-bottom: 14px;
}

/* =========================
   CARDS
========================= */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* =========================
   BOTÕES
========================= */
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #7a0c0d;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
}

.button:hover,
button:hover {
    background: #5e090a;
    transform: translateY(-1px);
}

.button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.button.secondary:hover {
    background: #d1d5db;
}

/* =========================
   FORMULÁRIOS
========================= */
label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

small {
    color: #6b7280;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
}

/* =========================
   LOGIN
========================= */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    text-align: center;
}

/* =========================
   TABELAS (HISTÓRICO)
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #f3f4f6;
    text-align: left;
    font-weight: 600;
}

table th,
table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* =========================
   PRÉVIA DA DECLARAÇÃO
========================= */
.previa {
    line-height: 1.6;
    font-size: 15px;
}

.previa strong {
    color: #7a0c0d;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 13px;
}

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

    .header-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-nav {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .container {
        margin: 20px auto;
        padding: 0 16px;
    }

    button,
    .button {
        width: 100%;
    }
}

/* ====================================================
   ANIMAÇÕES SUAVES – SISTEMA DE DECLARAÇÕES UNIMB
==================================================== */

/* -------------------------
   Fade + Slide padrão
-------------------------- */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------
   Fade simples
-------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================
   APLICAÇÕES
========================= */

/* Container geral */
.container {
    animation: fadeSlideUp .35s ease-out;
}

/* Cards */
.card {
    animation: fadeSlideUp .4s ease-out;
    transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

/* Botões */
button,
.button {
    transition: 
        background .2s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

button:active,
.button:active {
    transform: scale(.97);
}

/* Links do menu */
.header-nav a {
    transition: color .2s ease;
}

/* Inputs focus */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #7a0c0d;
    box-shadow: 0 0 0 3px rgba(122, 12, 13, 0.12);
    transition: all .2s ease;
}

/* Prévia da declaração */
.previa {
    animation: fadeIn .4s ease;
}

/* Tabela (linhas) */
table tbody tr {
    transition: background .2s ease;
}

table tbody tr:hover {
    background: #f9fafb;
}

/* Login box */
.login-box {
    animation: fadeSlideUp .45s ease;
}

/* Header */
.app-header {
    animation: fadeIn .25s ease;
}

/* =========================
   MOBILE – suavizar tudo
========================= */
@media (max-width: 768px) {
    .card:hover {
        transform: none;
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }
}

/* =========================
   LOGO – CORREÇÃO DEFINITIVA
========================= */

.logo-wrapper {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.header-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* =========================
   HEADER – AJUSTES FINAIS
========================= */

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

.logo-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

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

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: #7a0c0d;
}

.header-subtitle {
    font-size: 12px;
    color: #6b7280;
}

/* MENU */
.header-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.header-nav a {
    padding: 6px 0;
}

/* MOBILE – menu em coluna */
@media (max-width: 768px) {

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .header-nav {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid #e5e7eb;
    }
}
