* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #f5f5f5;
    color: #333;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0A4D9C;
    color: #fff;
    padding: 10px 16px;
}

.header-left h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.header-left p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-right img {
    height: 48px;
}

/* Nav */
.app-nav {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: #e9eef6;
    border-bottom: 1px solid #d0d7e2;
}

.nav-btn {
    border: none;
    padding: 8px 16px;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-btn.active {
    background: #0A4D9C;
    color: #fff;
}

/* Main layout */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.left-panel {
    flex: 1;
    padding: 16px;
    background: #fafafa;
    border-right: 1px solid #ddd;
}

.right-panel {
    flex: 3;
    padding: 16px;
}

/* Painel de entrada */
.panel {
    background: #ffffff;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.panel h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.panel p {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #555;
}

.panel label {
    display: block;
    font-size: 0.85rem;
    margin-top: 8px;
}

.panel input {
    width: 100%;
    padding: 6px 8px;
    margin-top: 2px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.panel button {
    margin-top: 14px;
    padding: 8px 12px;
    background: #0A4D9C;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.panel button:hover {
    background: #083b75;
}

/* Graph */
#graph {
    width: 100%;
    height: 100%;
    min-height: 480px; /* ou 500px, se quiser mais espaço */
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Footer */
.app-footer {
    padding: 8px 16px;
    height: auto;           /* antes era assim: height: 40px; */
    line-height: normal;    /* antes era assim: line-height: 40px; */
    background: #e0e0e0;
    text-align: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .app-main {
        flex-direction: column;
    }

    .left-panel, .right-panel {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .right-panel {
        border-bottom: none;
    }

    .header-right img {
        height: 40px;
    }

    .header-left h1 {
        font-size: 1.1rem;
    }
}