/* Palette: orange / navy / white */
:root {
    --primary: #0f1f4e;
    --secondary: #ff7f11;
    --background: #0b1430;
    --card: #101f47;
    --text: #ffffff;
    --muted: #c8d4f5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body {
    background: radial-gradient(circle at top left, #192d6c 0%, var(--background) 55%, #06122a 100%);
    color: var(--text);
    min-height: 100vh;
}

.container {
    width: min(95%, 1100px);
    margin: 1.2rem auto;
    margin-top: 50px;
    padding: 1.2rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 31, 78, 0.85), rgba(5, 11, 35, 0.78));
    box-shadow: 0 14px 35px rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.65s ease both;
}

header, .card, .section {
    margin-bottom: 1rem;
}
.card {
    background: rgba(9, 23, 56, 0.74);
    border: 1px solid rgba(255,127,17,0.3);
    border-radius: 12px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.45s ease both;
}
.muted { color: rgba(216, 229, 255, 0.75); font-size: .9rem; margin-top: 0.15rem; }
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
header h1 { margin: 0; font-size: 1.8rem; }

header nav {
    display: flex;
    gap: 0.7rem;
}

header nav a {
    color: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--secondary) 0%, #ff5000 100%);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

header nav a:hover,
header nav a:focus {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

header nav a:last-child {
    background: linear-gradient(90deg, #0d2b97 0%, #0c1d5d 100%);
}

a, button, input[type="submit"] {
    cursor: pointer;
    transition: all 0.3s ease;
}

a {
    color: var(--secondary);
    text-decoration: none;
}
a:hover { color: #ffd3a3; }

h1, h2, h3 { color: #f3f7ff; line-height: 1.2; }

form {
    margin-top: 0.7rem;
    border: 1px solid rgba(255, 127, 17, 0.3);
    border-radius: 10px;
    padding: 1rem;
    background: rgba(6, 13, 35, 0.65);
}

.login-card {
    max-width: 380px;
    margin: 0 auto;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}

.section img {
    display: block;
    margin: 0 auto 1rem;
}

#form-login label { margin-bottom: 0.45rem; }
#form-login input[type="text"],
#form-login input[type="password"],
#form-login input[type="submit"] { width: 100%; }

#form-login input[type="submit"] { margin-top: 0.5rem; }
form label {
    display: block;
    margin: 0.64rem 0 0.25rem;
    font-weight: 600;
}

input[type="text"], input[type="password"], input[type="number"], select, textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

option {
    color: #000;
    background: #f0f0f0;
}

input[type="radio"] { margin-right: 0.35rem; }

button, input[type="submit"] {
    background: linear-gradient(90deg, var(--secondary), #ff5000);
    border: none;
    color: #fff;
    padding: 0.75rem 1.2rem;
    border-radius: 9px;
    font-size: 1rem;
    box-shadow: 0 7px 15px rgba(255, 127, 17, 0.4);
}
button:hover, input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255, 127, 17, 0.55);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(16, 31, 71, 0.75);
    border-radius: 10px;
    overflow: hidden;
    animation: fadeIn 0.6s ease both;
}
th, td {
    padding: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
    color: #e7ecff;
}
th {
    background: rgba(9, 40, 94, 0.85);
    font-weight: 700;
}
tr:nth-child(even) { background: rgba(255,255,255,0.03); }

.grafico {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    margin: .7rem 0 .5rem;
    min-height: 140px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,127,17,.2);
    border-radius: 10px;
    padding: 0.8rem;
}
.chart-legend {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.chart-legend .legend {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}
.chart-legend .fpb { background: linear-gradient(90deg, #ff7f11, #ff5000); }
.chart-legend .unp { background: linear-gradient(90deg, #3c73d3, #0f1f4e); }
.chart-legend .unifg { background: linear-gradient(90deg, #ffffff, #c8d4f5); color: #000; border: 1px solid rgba(0,0,0,0.14); }
.barra {
    flex: 1;
    min-height: 10px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #3c73d3, #0f1f4e);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    animation: riseBar 0.8s forwards ease;
}
.barra:nth-child(1) { animation-delay: 0.12s; }
.barra:nth-child(2) { animation-delay: 0.20s; }
.barra:nth-child(3) { animation-delay: 0.28s; }
.barra::after {
    content: attr(data-text);
    position: absolute;
    top: -1.6rem;
    left: 0;
    width: 100%;
    font-size: 0.7rem;
    text-align: center;
    color: var(--text);
}

.barra.fpb {
    background: linear-gradient(180deg, #ff7f11, #ff5000);
}

.barra.unp {
    background: linear-gradient(180deg, #3c73d3, #0f1f4e);
}

.barra.unifg {
    background: linear-gradient(180deg, #ffffff, #c8d4f5);
    color: #fff;
}
.barra.unifg::after {
    color: #fff;
}

.toast {
    position: fixed;
    right: 1rem;
    top: 1rem;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #fff;
    background: rgba(10,25,70,.95);
    border: 1px solid var(--secondary);
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0,0,0,.5);
    animation: showToast 0.45s ease both;
}

.laranja {
    background: linear-gradient(180deg, #ff7f11, #ff5000);
    width: 50px;
    text-align: center;
    padding: 2px;
    border-radius: 10px;
}

.azul {
    background: linear-gradient(180deg, #3c73d3, #0f1f4e);
    width: 50px;
    text-align: center;
    padding: 2px;
    border-radius: 10px;
}

.branco {
    background: linear-gradient(180deg, #ffffff, #c8d4f5);
    color: black;
    width: 50px;
    text-align: center;
    padding: 2px;
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes riseBar {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes showToast {
    from { opacity: 0; transform: translateX(10px) translateY(-20px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

@media (max-width: 780px) {
    .grafico { flex-wrap: wrap; align-items: flex-end; }
    .barra { width: calc(33% - 7px); }
    header { flex-direction: column; align-items: flex-start; }
}
