body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #e6f0fa;
    color: #222;
    box-sizing: border-box;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: #1565c0;
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    box-sizing: border-box;
    overflow-x: auto;
}
.container {
    margin-top: 20px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.chart-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(21,101,192,0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 220px; /* Reduzido */
    
    box-sizing: border-box;
    width: 100%;
}
.chart-card canvas {
    max-width: 100%;
}
.train-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(21,101,192,0.10);
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin: 0 auto;
}
.train-btn:hover, .train-btn:focus {
    background: #1565c0;
    transform: scale(1.07);
}
.input-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(21,101,192,0.08);
    padding: 2rem;
    max-width: 590px;
    margin: 30px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.input-form {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}
.input-text {
    padding: 0.8rem 1rem;
    border: 1px solid #90caf9;
    border-radius: 6px;
    font-size: 1.1rem;
    width: 180px;
    box-sizing: border-box;
    outline: none;
    transition: border 0.2s;
    max-width: 100%;
}
.input-text:focus {
    border-color: #1976d2;
}
select {
    cursor: pointer;
    text-align: center;
}
.insert-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(21,101,192,0.10);
    transition: background 0.2s, transform 0.2s;
    height: 100%;
    align-self: center;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
}
.insert-btn:hover, .insert-btn:focus {
    background: #1565c0;
    transform: scale(1.07);
}
.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    min-width: 0;
}
.input-label {
    font-size: 1rem;
    font-weight: 500;
    color: #1565c0;
    margin-left: 2px;
    margin-bottom: 2px;
}
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(21,101,192,0.08);
    padding: 2rem;
    max-width: 900px;
    margin: 30px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow-x: auto;
}
.dados-tabela {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 1.05rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(21,101,192,0.06);
    max-height: 500px;
}
.dados-tabela th, .dados-tabela td {
    border: 1px solid #90caf9;
    padding: 0.3rem 0.3rem;
    text-align: center;
    min-width: 50px;
}
.dados-tabela th {
    background: #e3f2fd;
    color: #1565c0;
    font-weight: bold;
    border-bottom: 2px solid #1976d2;
    letter-spacing: 1px;
}
.dados-tabela td {
    background: #fff;
    color: #222;
    font-size: 1rem;
    transition: background 0.2s;
}
.dados-tabela tbody tr:hover td {
    background: #e3f2fd;
}
.dados-tabela tbody td {
    background: #f5fafd;
    color: #1976d2;
    font-style: italic;
    font-weight: 500;
    border: none;
}
.status-label {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: normal;
}
.status-pendente {
    background: #9e9e9e;
    color: #fff;
}
.status-fabricando {
    background: #1976d2;
    color: #fff;
}
.status-finalizado {
    background: #2e7d32;
    color: #fff;
}
.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    margin: 0 2px;
    transition: background 0.2s, transform 0.2s;
}
.btn-danger:hover {
    background: #b71c1c;
    transform: scale(1.07);
}
a {
    float: left;
    display: block;
    color: #fff;
    padding: 0px 24px;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.2s;
}
a:hover {
    transform: scale(1.05);
}
.painel{
    position: relative;
    width: 1000px;
    max-width: 100%;
    margin: auto;
    margin-top: 80px;
}
.fundo{
    width: 100%;
    display: block;
}
.overlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}
.loading-spinner {
    background: #1565c0;
    padding: 32px 48px;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 80px;
}

#relatorio {
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}
@media (max-width: 600px) {
    canvas { height: 200px !important; max-width: 100%; }
    .grid {
        grid-template-columns: 1fr;
    }
    table {
        overflow-x: auto;
        max-width: 100%;
    }
    .container {
        padding: 1rem;
        margin-top: 150px;
    }
    .painel {
        margin-top: 150px;
    }
    .painel + .container {
        margin-top: 20px;
    }
    .container .container {
        margin-top: 20px;
    }
    .chart-card {
        padding: 12px;
    }
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0.5rem;
        width: 100vw;
    }
    .menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0.3rem;
    }
    .menu a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 0.5rem 24px;
    }
    .input-form {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .insert-btn {
        max-width: 100%;
        width: 180px;
        box-sizing: border-box;
        align-self: stretch;
    }
    .table-card {
        padding: 0.5rem;
    }
    .dados-tabela {
        font-size: 0.9rem;
    }
}