/* ==== Tema Claro e Escuro para Inputs ==== */
body.light-mode .input {
    background: #fff !important;
    color: #111 !important;
    border: 1.5px solid #2563eb33 !important;
    border-radius: 10px;
}
body.dark-mode .input {
    background: #191c28 !important;
    color: #e0e7ef !important;
    border: 1.5px solid #2563eb50 !important;
    border-radius: 10px;
}
/* Ajuste selects */
body.light-mode .select select {
    background: #fff !important;
    color: #111 !important;
}
body.dark-mode .select select {
    background: #191c28 !important;
    color: #eaf1fa !important;
}
.input {
    border-radius: 10px;
}
/* ==== Tema Claro e Escuro para .box, .title e label ==== */
body.light-mode .box {
    background: #fff !important;
    box-shadow: 0 4px 28px #2563eb13, 0 1.5px 8px #00000011;
}
body.dark-mode .box {
    background: #181b29f9 !important;
    box-shadow: 0 8px 36px #2563eb15, 0 2px 12px #0006;
}
/* LABELS VISÍVEIS EM TODOS OS MODOS */
body.light-mode .title,
body.light-mode label.label,
body.light-mode .label,
body.light-mode .box label.label,
body.light-mode .box .label {
    color: #222 !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-shadow: none !important;
}
body.dark-mode .title,
body.dark-mode label.label,
body.dark-mode .label,
body.dark-mode .box label.label,
body.dark-mode .box .label {
    color: #eaf1fa !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}
/* Checkbox label alto contraste */
body.light-mode .checkbox,
body.light-mode label.checkbox {
    color: #212c47 !important;
    font-weight: 700;
}
body.dark-mode .checkbox,
body.dark-mode label.checkbox {
    color: #eaf1fa !important;
    font-weight: 700;
}
/* ==== Login e botões ==== */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #181b29 0%, #2563eb 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}
.login-container {
    background: rgba(30, 34, 54, 0.98);
    border-radius: 18px;
    box-shadow: 0 8px 40px 0 rgba(36,99,235,0.18), 0 1.5px 8px 0 #000;
    padding: 2.3rem 2.2rem 2rem 2.2rem;
    max-width: 400px;
    width: 100%;
    margin: auto;
    z-index: 2;
    backdrop-filter: blur(2px);
}
.login-title {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 8px #2563eb66, 0 2px 1px #111;
}
.login-btn, .button.is-link {
    background: linear-gradient(90deg, #2563eb 60%, #60a5fa 100%) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 3px 18px #2563eb99;
    border: none;
    letter-spacing: 1px;
    transition: background 0.2s, box-shadow 0.2s;
}
.login-btn:hover, .button.is-link:hover {
    background: linear-gradient(90deg, #60a5fa 30%, #2563eb 100%) !important;
    box-shadow: 0 5px 28px #2563ebcc;
}
/* Footer fixo */
.footer {
    width: 100vw;
    background: #181b29e8;
    color: #b8b8b8;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    padding: 1.3rem 0 1rem 0;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
}
/* Table ajusta cor do cabeçalho (se quiser) */
body.dark-mode .table thead th {
    background: #181b29 !important;
    color: #e0e7ef !important;
}
body.light-mode .table thead th {
    background: #f4f6fc !important;
    color: #222 !important;
}
body.dark-mode .table tbody tr {
    background: #181b29 !important;
    color: #e0e7ef !important;
}
body.light-mode .table tbody tr {
    background: #fff !important;
    color: #222 !important;
}
/* Responsivo */
@media (max-width: 600px) {
    .login-container {
        padding: 1.1rem 0.5rem 1.4rem 0.5rem;
        max-width: 97vw;
    }
    .login-title {
        font-size: 1.3rem;
    }
}
/* ==== Footer visual claro/escuro sempre visível ==== */
.footer-text, .footer-text strong {
    color: #eaf1fa !important;    /* Cor clara como padrão */
    text-shadow: 0 2px 4px #0b153160, 0 1px 1px #fff2;
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: 1px;
    transition: color .3s;
}
body.light-mode .footer-text,
body.light-mode .footer-text strong {
    color: #222 !important;
    text-shadow: none;
}
body.dark-mode .footer-text,
body.dark-mode .footer-text strong {
    color: #eaf1fa !important;
    text-shadow: 0 2px 4px #0b1531cc;
}
/* ==== Tema Claro e Escuro para .box, .title e label ==== */
body.light-mode .box {
    background: #fff !important;
    box-shadow: 0 4px 28px #2563eb13, 0 1.5px 8px #00000011;
}
body.dark-mode .box {
    background: #181b29f9 !important;
    box-shadow: 0 8px 36px #2563eb15, 0 2px 12px #0006;
}
/* GARANTIA para labels e títulos ficarem visíveis */
body.light-mode .title,
body.light-mode label.label,
body.light-mode .label,
body.light-mode .box label.label,
body.light-mode .box .label {
    color: #222 !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-shadow: none !important;
}
body.dark-mode .title,
body.dark-mode label.label,
body.dark-mode .label,
body.dark-mode .box label.label,
body.dark-mode .box .label {
    color: #eaf1fa !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}
.status-badge {
    display: inline-block;
    padding: 0.28em 1.25em;
    font-size: 1.06em;
    font-weight: 700;
    border-radius: 14px;
    background: #54d39d;
    color: #222;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 3px #0001;
    line-height: 1.25;
    transition: background .2s;
}
.status-badge.inativo {
    background: #ec6973;
    color: #fff;
}
/* Aparência moderna para select[multiple] */
body.light-mode select[multiple], body.dark-mode select[multiple] {
    width: 100%;
    min-height: 130px;
    background: var(--select-bg, #f8fafc);
    color: #212c47;
    border: 1.5px solid #2563eb55;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 1.06rem;
    box-shadow: 0 2px 9px #2563eb15;
    outline: none;
    transition: border .15s, box-shadow .15s;
    appearance: none;
    scrollbar-width: thin;
    scrollbar-color: #2563eb88 #eaf1fa;
}
body.dark-mode select[multiple] {
    background: #202335;
    color: #eaf1fa;
    border-color: #2563eb88;
}
select[multiple]:focus {
    border: 1.5px solid #2563eb;
    box-shadow: 0 0 0 3px #2563eb25;
}
/* Rolagem mais suave */
select[multiple] option {
    padding: 6px 8px;
    border-radius: 5px;
    margin: 2px 0;
}
/* Destaca a opção selecionada */
select[multiple] option:checked {
    background: linear-gradient(90deg, #2563eb 50%, #60a5fa 100%);
    color: #fff;
    font-weight: 600;
}
/* Badge de status visual (usado em usuários, representantes etc) */
.status-badge {
    display: inline-block;
    padding: 2px 14px 3px 14px;
    border-radius: 18px;
    font-size: 0.99rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #e8fbee;
    color: #219c34;
    border: 1.3px solid #219c3466;
    box-shadow: 0 2px 12px #219c3433;
    transition: all .15s;
}
.status-badge.inativo {
    background: #fff0f2;
    color: #db2d43;
    border: 1.3px solid #db2d4360;
    box-shadow: 0 2px 12px #db2d4333;
}
body.dark-mode .status-badge {
    background: #0c2d20;
    color: #8affc6;
    border: 1.3px solid #13b15e77;
}
body.dark-mode .status-badge.inativo {
    background: #2c1621;
    color: #ff7b98;
    border: 1.3px solid #db2d438c;
}
.filiais-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em 1.1em;
    margin-top: 0.2em;
}
.checkbox-pill {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.45em 1.3em;
    background: #f4f6fc;
    border: 2px solid #2563eb33;
    border-radius: 22px;
    font-weight: 600;
    transition: background 0.15s, border 0.2s;
    user-select: none;
}
.checkbox-pill input[type="checkbox"] {
    display: none;
}
.checkbox-pill.selected, .checkbox-pill input[type="checkbox"]:checked + span {
    background: linear-gradient(90deg, #2563eb 60%, #60a5fa 100%);
    color: #fff;
    border: 2px solid #2563eb88;
}
body.dark-mode .checkbox-pill {
    background: #23273a;
    border-color: #2563eb55;
    color: #eaf1fa;
}
body.dark-mode .checkbox-pill.selected, body.dark-mode .checkbox-pill input[type="checkbox"]:checked + span {
    background: linear-gradient(90deg, #2563eb 60%, #60a5fa 100%);
    color: #fff;
    border: 2px solid #60a5fa99;
}
/* Checkbox moderno tipo quadrado */
.checkbox-square {
    position: relative;
    padding-left: 34px;
    cursor: pointer;
    user-select: none;
    font-size: 1.11rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.checkbox-square input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    left: 0; top: 0;
    width: 24px; height: 24px;
    cursor: pointer;
    z-index: 2;
}
.checkbox-custom {
    position: absolute;
    left: 0; top: 0;
    height: 23px; width: 23px;
    border-radius: 6px;
    border: 2px solid #2563eb7a;
    background: #f3f7fd;
    transition: background 0.18s, border 0.18s;
}
.checkbox-square input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #2563eb;
    border-color: #2563eb;
}
.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-square input[type="checkbox"]:checked ~ .checkbox-custom:after {
    display: block;
}
.checkbox-square .checkbox-custom:after {
    left: 6px; top: 2px;
    width: 7px; height: 14px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    border-radius: 1px;
    transform: rotate(45deg);
    content: "";
    position: absolute;
}
body.dark-mode .checkbox-custom {
    background: #222739;
    border-color: #2563ebcc;
}
/* ==== NAVBAR MODERNA ==== */
.custom-navbar {
    background: linear-gradient(90deg, #181b29 0%, #2563eb 90%);
    box-shadow: 0 2px 16px #181b2940, 0 1px 4px #2563eb14;
    border-bottom: 2.5px solid #2563eb44;
    padding: 0.5rem 0;
    min-height: 58px;
    z-index: 1000;
}
.custom-navbar .navbar-item {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 1.08rem;
    font-weight: 600;
    color: #eaf1fa !important;
    letter-spacing: 0.02em;
    transition: color 0.17s;
    border-radius: 7px;
    margin: 0 0.13em;
    padding: 0.55em 1.25em;
}
.custom-navbar .navbar-item.logo-text {
    font-size: 1.31rem;
    font-weight: 800;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.6em;
    letter-spacing: 0.04em;
}
.custom-navbar .navbar-logo {
    display: flex;
    align-items: center;
    margin-right: 2px;
}
.custom-navbar .navbar-item:hover, 
.custom-navbar .navbar-item.is-active {
    background: #2563eb30;
    color: #fff !important;
    box-shadow: 0 2px 12px #2563eb30;
    text-decoration: none;
}
.custom-navbar .logout-btn {
    background: linear-gradient(90deg, #2563eb 60%, #60a5fa 100%);
    color: #fff !important;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    padding: 0.52em 1.2em;
    box-shadow: 0 2px 12px #2563eb33;
    letter-spacing: 0.02em;
    transition: background 0.2s, box-shadow 0.2s;
}
.custom-navbar .logout-btn:hover {
    background: linear-gradient(90deg, #60a5fa 20%, #2563eb 100%);
    color: #fff !important;
    box-shadow: 0 5px 24px #2563eb55;
}
/* Burger menu (mobile) */
.navbar-burger {
    color: #eaf1fa !important;
    margin-left: 1.2em;
}
@media (max-width: 1000px) {
    .custom-navbar .navbar-start, .custom-navbar .navbar-end {
        background: #191c28;
        border-radius: 10px;
        margin: 0.6em 0;
        box-shadow: 0 2px 18px #2563eb19;
    }
}
/* Para garantir contraste com Bulma */
body.light-mode .custom-navbar {
    background: linear-gradient(90deg, #fff 0%, #eaf1fa 100%);
    color: #2563eb !important;
    border-bottom: 2px solid #2563eb22;
}
body.light-mode .custom-navbar .navbar-item,
body.light-mode .custom-navbar .logout-btn {
    color: #2563eb !important;
    background: transparent;
}
body.light-mode .custom-navbar .navbar-item:hover,
body.light-mode .custom-navbar .navbar-item.is-active {
    background: #2563eb14;
    color: #2563eb !important;
    box-shadow: 0 2px 12px #2563eb12;
}
body.light-mode .custom-navbar .logout-btn {
    background: linear-gradient(90deg, #2563eb 70%, #60a5fa 100%);
    color: #fff !important;
}
body.light-mode .custom-navbar .logout-btn:hover {
    background: linear-gradient(90deg, #60a5fa 30%, #2563eb 100%);
}
/* Sombra mais forte */
@media (max-width: 720px) {
    .custom-navbar {
        min-height: 48px;
        padding: 0.15rem 0;
    }
    .custom-navbar .navbar-item {
        padding: 0.45em 0.8em;
        font-size: 0.97rem;
    }
}
/* Corrige o menu burger mobile do Bulma */
.navbar-burger { cursor: pointer; }
.navbar-burger.is-active,
.navbar-menu.is-active { display: block; }
.custom-select {
    background: #151826;
    color: #fff;
    border: 2px solid #3c5eff;
    border-radius: 10px;
    font-size: 1rem;
    padding: 0.45em 1.8em 0.45em 1em;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    appearance: none;
    outline: none;
    min-width: 170px;
    box-shadow: 0 0 0 2px #2222 inset;
    transition: border 0.18s;
  }
  .custom-select:focus {
    border-color: #2563eb;
  }
  .custom-select option {
    background: #151826;
    color: #fff;
  }  