/* ========================================================= */
/* RESET */
/* ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Poppins", Arial, Helvetica, sans-serif;

    background:
        linear-gradient(135deg,
            #000000 0%,
            #020617 45%,
            #050816 100%);

    color: #f8fafc;

    overflow-x: hidden;
}

/* ========================================================= */
/* LAYOUT */
/* ========================================================= */

.layout {
    display: flex;
    min-height: 100vh;
}

.conteudo {
    flex: 1;
    padding: 35px;
    overflow-y: auto;
    position: relative;

    background:
        radial-gradient(circle at top right,
            rgba(37, 99, 235, 0.08),
            transparent 30%);
}

.ambiente-indicadores {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: min(520px, calc(100vw - 36px));
}

.ambiente-indicador {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.92);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.ambiente-production {
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
}

.ambiente-homologation {
    border-color: rgba(250, 204, 21, 0.55);
    color: #fde68a;
    background: rgba(63, 47, 10, 0.92);
}

.ambiente-demo {
    border-color: rgba(56, 189, 248, 0.55);
    color: #bae6fd;
    background: rgba(8, 47, 73, 0.92);
}

/* ========================================================= */
/* SIDEBAR */
/* ========================================================= */

.sidebar {

    width: 245px;

    background:
        linear-gradient(180deg,
            #000000 0%,
            #020617 100%);

    border-right:
        1px solid rgba(59, 130, 246, 0.10);

    padding: 30px 22px;

    display: flex;
    flex-direction: column;
}

.logo-area {
    text-align: center;
    margin-bottom: 40px;
}

.logo-area img {
    width: 140px;
    margin-bottom: 14px;
    border-radius: 18px;
}

.logo-titulo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #2563eb 58%, #22c55e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-subtitulo {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.6;
}

/* ========================================================= */
/* MENU */
/* ========================================================= */

.menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    font-family: "Manrope", "Poppins", Arial, Helvetica, sans-serif;
}

.menu a {

    text-decoration: none;

    color: #e6edf8;

    background: transparent;

    padding: 10px 4px;

    border-radius: 0;

    border-left: none;

    transition: 0.25s;

    font-size: 15px;

    font-family: "Manrope", "Poppins", Arial, Helvetica, sans-serif;

    font-weight: 700;

    line-height: 1.25;

    display: flex;

    align-items: center;

    gap: 10px;
}

.menu-icone {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 8px rgba(29, 124, 255, 0.75));
}

.menu a:hover {

    background: transparent;

    color: #38bdf8;

    transform: translateX(4px);
}

.menu-grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.menu-grupo-titulo {
    width: 100%;
    border: none;
    background: transparent;
    color: #e6edf8;
    font-family: "Manrope", "Poppins", Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.25;
    padding: 10px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.25s;
}

.menu-grupo-titulo:hover {
    color: #38bdf8;
}

.menu-grupo-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-grupo-seta {
    font-size: 16px;
    line-height: 1;
    transition: 0.2s;
}

.submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    max-height: 420px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 1;
}

.menu-grupo-fechado .submenu {
    max-height: 0;
    opacity: 0;
}

.menu-grupo-fechado .menu-grupo-seta {
    transform: rotate(-90deg);
}

.submenu a {
    padding: 8px 4px 8px 16px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 650;
    background: transparent;
    color: #b8c4d8;
    border-left: none;
}

.submenu a:hover {
    transform: translateX(3px);
}

.menu-sair {
    margin-top: auto;
    color: #e5e7eb !important;
}

.menu-sair:hover {
    background: transparent !important;
    color: #fecaca !important;
}

/* ========================================================= */
/* BOTÕES */
/* ========================================================= */

.btn {

    border: none;

    border-radius: 12px;

    padding: 14px 22px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;

    text-decoration: none;

    display: inline-flex;

    align-items: center;

    justify-content: center;
}

.btn-primary {

    background:
        linear-gradient(135deg,
            #2563eb,
            #1d4ed8);

    color: white;
}

.btn-secondary {

    background: #111827;

    color: #d1d5db;

    border:
        1px solid rgba(255, 255, 255, 0.08);
}

/* ========================================================= */
/* AMBIENTE */
/* ========================================================= */

.ambiente-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
    gap: 20px;
    align-items: stretch;
}

.ambiente-card {
    min-width: 0;
}

.ambiente-status {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(180px, 0.62fr);
    gap: 14px;
    margin-top: 24px;
}

.ambiente-status-item {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
}

.ambiente-status-item span {
    color: #9fb5d7;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ambiente-status-item strong {
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.ambiente-status-item.destaque strong {
    font-size: 28px;
}

.alerta-erro strong,
.alerta-sucesso strong {
    display: block;
}

.alerta-erro span {
    display: block;
    margin-top: 8px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.ambiente-aviso {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.26);
    background: rgba(15, 23, 42, 0.72);
    color: #bfdbfe;
}

.ambiente-aviso strong {
    color: #ffffff;
    font-size: 14px;
}

.ambiente-aviso span {
    color: #a9bee0;
    font-size: 13px;
    line-height: 1.45;
}

.ambiente-aviso.producao {
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(63, 47, 10, 0.36);
}

.ambiente-ajuda {
    margin-top: 10px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.45;
}

.botao-primario:disabled,
.botao-secundario:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

@media (max-width: 1100px) {
    .ambiente-grid,
    .ambiente-status {
        grid-template-columns: 1fr;
    }
}

/* ========================================================= */
/* INPUTS */
/* ========================================================= */

input,
textarea,
select {

    width: 100%;

    background: #050b1d;

    border: 1px solid #1e3a8a;

    color: #ffffff;

    padding: 14px 16px;

    border-radius: 12px;

    font-size: 15px;

    outline: none;
}

input:focus,
textarea:focus,
select:focus {

    border-color: #3b82f6;

    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* ========================================================= */
/* LOGIN */
/* ========================================================= */

.pagina-login .sidebar {
    display: none;
}

.pagina-login .conteudo {
    width: 100%;
    padding: 0;
}

/* ========================================================= */
/* SCROLLBAR */
/* ========================================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {

    background:
        linear-gradient(180deg,
            #1d4ed8,
            #2563eb);

    border-radius: 999px;
}
