/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    overflow-y: scroll;
}

body {
    background: #f5f7fa;
    color: #333;
    padding-top: 60px; /* igual navbar */
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;

    background: linear-gradient(120deg, #1e90ff, #003366);
    padding: 0 20px;
    z-index: 1000;

    /* REMOVE QUALQUER “LINHA” */
    box-shadow: none;
    border: none;
}

/* LOGO */
.logo {
    font-size: 22px;
    font-weight: bold;
    color: white;
}

/* MENU DESKTOP */
.menu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.menu a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.3s;
}

.menu a:hover {
    background: rgba(255,255,255,0.2);
}

/* BOTÃO LOGIN */
.btn-login {
    background: #ff8c00;
    color: white !important;
    padding: 8px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    height: 38px;
    width: 80px;              
    justify-content: center;
}

.btn-login:hover {
    background: #e67600;
}

/* DROPDOWN */
.dropdown {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 40px;
    background: white;
    min-width: 150px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    overflow: hidden;
}

.submenu a {
    display: block;
    padding: 10px;
    color: #333;
}

.submenu a:hover {
    background: #f0f0f0;
}

/* HEADER */
.header {
    background: #f5f7fa;
    color: #333; 
    padding: 20px;

    /* 🔥 IMPORTANTE: remove qualquer “quebra visual” */
    margin-top: -1px;
    border: none;
}

.header-content {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-content h1 {
    font-size: 40px;
}

.header-content p {
    margin-top: 10px;
    font-size: 18px;
}

/* BOTÃO HEADER */
.btn-header {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #ff8c00;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: 0.3s;
}

.btn-header:hover {
    background: #e67600;
}

/* SECTION */
.section {
    padding: 40px 20px;
    max-width: 1000px;
    margin: auto;
    text-align: center;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* FOOTER */
.footer {
    background: #003366;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* MOBILE MENU */
.menu-toggle {
    display: none;
    font-size: 26px;
    color: white;
    cursor: pointer;
    margin-left: auto;
}

.finanhen-dashboard{
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

/* HEADER */
.finanhen-dashboard .dashboard-header h1{
    font-size: 32px;
    color: #1e293b;
}

.finanhen-dashboard .dashboard-header p{
    color: #64748b;
    margin-bottom: 30px;
}

/* CARDS */
.finanhen-dashboard .cards{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.finanhen-dashboard .card{
    padding: 25px;
    border-radius: 12px;
    color: white;
}

.finanhen-dashboard .card.blue{
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
}

.finanhen-dashboard .card.green{
    background: linear-gradient(135deg,#059669,#047857);
}

/* TABELA */
.finanhen-dashboard .table-box{
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.finanhen-dashboard table{
    width: 100%;
    border-collapse: collapse;
}

.finanhen-dashboard th{
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
}

.finanhen-dashboard td{
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* LOGOUT */
.logout-form {
    display: inline-block;
    margin-top: 10px;
}

/* LOGOUT - ajuste para ficar alinhado na navbar */
.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;       
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    height: 38px;            
    transition: 0.2s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 80px;              
    justify-content: center; 
}

.btn-logout:hover {
    background: #c0392b;
}

/* LOGIN */
.login-box{
    background:white;
    padding:40px;
    border-radius:12px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
    width:100%;
    max-width:400px;
    margin:40px auto 0 auto;
}

.login-box h2{
    margin-bottom:25px;
    text-align:center;
    color:#003366;
}

.login-box input{
    width:100%;
    padding:12px;
    margin-bottom:15px;
    border:1px solid #dbe2ea;
    border-radius:8px;
    font-size:15px;
}

.login-box input:focus{
    outline:none;
    border-color:#1e90ff;
}

.login-box button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:8px;
    background:#ff8c00;
    color:white;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s;
}

.login-box button:hover{
    background:#e67600;
}

.login-error{
    color:#e74c3c;
    margin-top:10px;
    text-align:center;
}

.card-link{
    text-decoration:none;
    color:inherit;
}

.top-bar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 40px;
    background:#fff;
    border-bottom:1px solid #e2e8f0;
}

.finanhen-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
    overflow-x: hidden;    /* <- adicione isso */
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 20px;

        background: #003366;
        width: 200px;
        padding: 15px;
        border-radius: 8px;
    }

    .menu.active {
        display: flex;
    }

    .header-content h1 {
        font-size: 26px;
    }

    .header-content p {
        font-size: 16px;
    }

    .finanhen-dashboard {
        padding: 15px;
    }

    .finanhen-dashboard .cards {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 10px;
    }

    .top-bar h1 {
        font-size: 22px;
    }

    .top-bar p {
        font-size: 14px;
    }

    /* TABELA RESPONSIVA */
    .finanhen-dashboard .table-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .finanhen-dashboard table {
        min-width: 600px;
    }

    .finanhen-dashboard th,
    .finanhen-dashboard td {
        padding: 8px;
        font-size: 13px;
    }
    
    .finanhen-dashboard .table-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;          /* reduz padding no mobile */
    }

    .finanhen-dashboard table {
        min-width: 500px;       /* força scroll antes de vazar */
        width: 100%;
    }

    .finanhen-dashboard th,
    .finanhen-dashboard td {
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;    /* impede quebra de texto que bagunça colunas */
    }

}