/* EMU - Painel Administrativo - Customização de Cores */

/* Cor principal do admin - Header */
#header,
body.admin #header,
body.admin #header * {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
}

#header a:link,
#header a:visited,
body.admin #header a:link,
body.admin #header a:visited {
    color: #fff !important;
}

#header a:hover,
body.admin #header a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Site name no header */
#site-name,
#site-name a,
#site-name a:link,
#site-name a:visited {
    color: #fff !important;
}

/* Logo no header */
#site-name img {
    display: inline-block;
    vertical-align: middle;
    height: 40px;
    max-height: 40px;
    width: auto;
    margin-right: 10px;
    margin-left: 0;
}

#site-name a {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 40px;
}

/* Botões principais - com maior especificidade */
.button,
input[type=submit],
input[type=button],
.submit-row input,
a.button,
body.admin .button,
body.admin input[type=submit],
body.admin input[type=button],
body.admin .submit-row input,
body.admin a.button {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    border-color: #ef9032 !important;
    color: #fff !important;
    position: relative !important;
    padding-left: 30px !important;
}

/* Garantir que TODO texto dentro dos botões seja branco */
.button,
.button *,
input[type=submit],
input[type=submit] *,
input[type=button],
input[type=button] *,
.submit-row input,
.submit-row input *,
a.button,
a.button *,
body.admin .button,
body.admin .button *,
body.admin input[type=submit],
body.admin input[type=submit] *,
body.admin input[type=button],
body.admin input[type=button] *,
body.admin .submit-row input,
body.admin .submit-row input *,
body.admin a.button,
body.admin a.button * {
    color: #fff !important;
}

/* Ícones para botões - usando pseudo-elementos - ÍCONE GENÉRICO PADRÃO */
.button:before,
input[type=submit]:before,
input[type=button]:before,
.submit-row input:before,
a.button:before,
body.admin .button:before,
body.admin input[type=submit]:before,
body.admin input[type=button]:before,
body.admin .submit-row input:before,
body.admin a.button:before {
    content: "→" !important;
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: #fff !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    text-align: center !important;
}

/* Ícone para botão de salvar/submit (checkmark) */
input[type=submit][name="_save"]:before,
input[type=submit].default:before,
input[type=submit][value*="Salvar"]:before,
input[type=submit][value*="Guardar"]:before,
input[type=submit][value*="Upload"]:before,
input[type=submit][value*="Processar"]:before,
.submit-row input[name="_save"]:before,
.submit-row input.default:before,
.submit-row input[value*="Salvar"]:before,
.submit-row input[value*="Guardar"]:before,
.submit-row input[value*="Upload"]:before,
.submit-row input[value*="Processar"]:before,
body.admin input[type=submit][name="_save"]:before,
body.admin input[type=submit].default:before,
body.admin input[type=submit][value*="Salvar"]:before,
body.admin input[type=submit][value*="Guardar"]:before,
body.admin input[type=submit][value*="Upload"]:before,
body.admin input[type=submit][value*="Processar"]:before,
body.admin .submit-row input[name="_save"]:before,
body.admin .submit-row input.default:before,
body.admin .submit-row input[value*="Salvar"]:before,
body.admin .submit-row input[value*="Guardar"]:before,
body.admin .submit-row input[value*="Upload"]:before,
body.admin .submit-row input[value*="Processar"]:before {
    content: "✓" !important;
    font-size: 16px !important;
}

/* Ícone para botão de adicionar (plus) */
.button.addlink:before,
a.button.addlink:before,
body.admin .button.addlink:before,
body.admin a.button.addlink:before {
    content: "+" !important;
    font-size: 18px !important;
    font-weight: bold !important;
}

/* Ícone para botão de cancelar (X) */
.button[href*="cancel"]:before,
a.button[href*="cancel"]:before,
input[type=submit][value*="Cancelar"]:before,
input[type=button][value*="Cancelar"]:before,
body.admin .button[href*="cancel"]:before,
body.admin a.button[href*="cancel"]:before,
body.admin input[type=submit][value*="Cancelar"]:before,
body.admin input[type=button][value*="Cancelar"]:before {
    content: "×" !important;
    font-size: 18px !important;
    font-weight: bold !important;
}

/* Ícone para botão de deletar (trash) */
.button.deletelink:before,
a.button.deletelink:before,
body.admin .button.deletelink:before,
body.admin a.button.deletelink:before {
    content: "✕" !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

/* Removido - ícone genérico já está na regra base acima */

.button:hover,
input[type=submit]:hover,
input[type=button]:hover,
.submit-row input:hover,
a.button:hover,
body.admin .button:hover,
body.admin input[type=submit]:hover,
body.admin input[type=button]:hover,
body.admin .submit-row input:hover,
body.admin a.button:hover {
    background-color: #d67d1f !important;
    background: #d67d1f !important;
    border-color: #d67d1f !important;
}

.button.default,
input[type=submit].default,
.submit-row input.default,
body.admin .button.default,
body.admin input[type=submit].default,
body.admin .submit-row input.default {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    border-color: #ef9032 !important;
}

.button.default:hover,
input[type=submit].default:hover,
.submit-row input.default:hover,
body.admin .button.default:hover,
body.admin input[type=submit].default:hover,
body.admin .submit-row input.default:hover {
    background-color: #d67d1f !important;
    background: #d67d1f !important;
    border-color: #d67d1f !important;
}

/* Links ativos - módulos */
.module h2,
.module caption,
.inline-group h2,
body.admin .module h2,
body.admin .module caption,
body.admin .inline-group h2 {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
}

/* Seleção de objetos */
.selected,
body.admin .selected {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
}

/* Breadcrumbs */
.breadcrumbs,
body.admin .breadcrumbs {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
}

.breadcrumbs a,
body.admin .breadcrumbs a {
    color: #fff !important;
}

/* Mensagens de sucesso */
.success,
body.admin .success {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
}

/* Tabs */
.tabular .selected,
body.admin .tabular .selected {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
}

/* Add link */
.addlink,
body.admin .addlink {
    color: #ef9032 !important;
}

.addlink:hover,
body.admin .addlink:hover {
    color: #d67d1f !important;
}

/* Changelist filters */
#changelist-filter li.selected a,
body.admin #changelist-filter li.selected a {
    color: #ef9032 !important;
}

/* Object tools */
.object-tools a,
.object-tools a *,
.object-tools li a,
.object-tools li a *,
body.admin .object-tools a,
body.admin .object-tools a *,
body.admin .object-tools li a,
body.admin .object-tools li a * {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.object-tools a:hover,
.object-tools a:hover *,
.object-tools li a:hover,
.object-tools li a:hover *,
body.admin .object-tools a:hover,
body.admin .object-tools a:hover *,
body.admin .object-tools li a:hover,
body.admin .object-tools li a:hover * {
    background-color: #d67d1f !important;
    background: #d67d1f !important;
    color: #fff !important;
}

/* Inline add button */
.add-row a,
.inline-group .add-row a,
body.admin .add-row a,
body.admin .inline-group .add-row a {
    color: #ef9032 !important;
}

/* Related widget wrapper */
.related-widget-wrapper-link,
body.admin .related-widget-wrapper-link {
    color: #ef9032 !important;
}

/* Calendar icon */
.calendarlink,
.calendarbox-shortcut,
body.admin .calendarlink,
body.admin .calendarbox-shortcut {
    color: #ef9032 !important;
}

/* Time icon */
.clocklink,
.clockbox-shortcut,
body.admin .clocklink,
body.admin .clockbox-shortcut {
    color: #ef9032 !important;
}

/* Delete link */
.deletelink,
body.admin .deletelink {
    color: #ef9032 !important;
}

.deletelink:hover,
body.admin .deletelink:hover {
    color: #d67d1f !important;
}

/* Change link */
.changelink,
body.admin .changelink {
    color: #ef9032 !important;
}

.changelink:hover,
body.admin .changelink:hover {
    color: #d67d1f !important;
}

/* Active menu items - removido background para manter cor padrão */

/* Recent actions */
.recent-actions-module,
body.admin .recent-actions-module {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
}

/* Override any default Django admin colors */
body.admin #header {
    background: linear-gradient(to bottom, #ef9032, #ef9032) !important;
    background-color: #ef9032 !important;
}

/* Botões de ação nos módulos - mais específico */
.module ul li a.addlink,
.module ul li a.changelink,
body.admin .module ul li a.addlink,
body.admin .module ul li a.changelink {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
    border-color: #ef9032 !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
}

.module ul li a.addlink:hover,
.module ul li a.changelink:hover,
body.admin .module ul li a.addlink:hover,
body.admin .module ul li a.changelink:hover {
    background-color: #d67d1f !important;
    background: #d67d1f !important;
    border-color: #d67d1f !important;
}

/* Links de ação com ícones */
.module ul li a.addlink:before,
.module ul li a.changelink:before {
    color: #fff !important;
}

/* Garantir que todos os links de ação usem a cor */
a.addlink,
a.changelink,
a.deletelink,
body.admin a.addlink,
body.admin a.changelink,
body.admin a.deletelink {
    color: #ef9032 !important;
}

/* Botões pequenos e links de ação */
.module ul li .addlink,
.module ul li .changelink,
body.admin .module ul li .addlink,
body.admin .module ul li .changelink {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
}

/* Forçar cor em todos os elementos do dashboard */
.dashboard .module table th a,
body.admin .dashboard .module table th a {
    color: #fff !important;
}

/* Links nos módulos */
.module ul li a,
body.admin .module ul li a {
    color: #ef9032 !important;
}

.module ul li a:hover,
body.admin .module ul li a:hover {
    color: #d67d1f !important;
}

/* Garantir que botões de ação tenham fundo */
.module .addlink,
.module .changelink,
body.admin .module .addlink,
body.admin .module .changelink {
    background-color: #ef9032 !important;
    background: #ef9032 !important;
    color: #fff !important;
    border: 1px solid #ef9032 !important;
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
}

.module .addlink:hover,
.module .changelink:hover,
body.admin .module .addlink:hover,
body.admin .module .changelink:hover {
    background-color: #d67d1f !important;
    background: #d67d1f !important;
    border-color: #d67d1f !important;
    text-decoration: none !important;
}

/* Ícones dentro dos botões de ação */
.module .addlink:before,
.module .changelink:before,
body.admin .module .addlink:before,
body.admin .module .changelink:before {
    color: #fff !important;
    filter: brightness(0) invert(1) !important;
}

/* Garantir texto branco em TODOS os botões e links de ação */
.object-tools .addlink,
.object-tools .changelink,
.object-tools .deletelink,
.object-tools .button,
.object-tools a,
body.admin .object-tools .addlink,
body.admin .object-tools .changelink,
body.admin .object-tools .deletelink,
body.admin .object-tools .button,
body.admin .object-tools a {
    color: #fff !important;
}

.object-tools .addlink *,
.object-tools .changelink *,
.object-tools .deletelink *,
.object-tools .button *,
.object-tools a *,
body.admin .object-tools .addlink *,
body.admin .object-tools .changelink *,
body.admin .object-tools .deletelink *,
body.admin .object-tools .button *,
body.admin .object-tools a * {
    color: #fff !important;
}

/* Botões específicos que podem ter texto invisível */
input[type="submit"].default,
input[type="submit"][name="_save"],
input[type="submit"][name="_addanother"],
input[type="submit"][name="_continue"],
input[type="submit"][value*="Upload"],
input[type="submit"][value*="Processar"],
input[type="submit"][value*="Salvar"],
input[type="submit"][value*="Guardar"],
input[type="submit"][value*="Limpar"],
input[type="submit"][value*="Confirmar"],
body.admin input[type="submit"].default,
body.admin input[type="submit"][name="_save"],
body.admin input[type="submit"][name="_addanother"],
body.admin input[type="submit"][name="_continue"],
body.admin input[type="submit"][value*="Upload"],
body.admin input[type="submit"][value*="Processar"],
body.admin input[type="submit"][value*="Salvar"],
body.admin input[type="submit"][value*="Guardar"],
body.admin input[type="submit"][value*="Limpar"],
body.admin input[type="submit"][value*="Confirmar"] {
    color: #fff !important;
    text-shadow: none !important;
}

/* Links que são botões */
a.addlink.button,
a.changelink.button,
a.deletelink.button,
body.admin a.addlink.button,
body.admin a.changelink.button,
body.admin a.deletelink.button {
    color: #fff !important;
    background-color: #ef9032 !important;
    border-color: #ef9032 !important;
}

a.addlink.button:hover,
a.changelink.button:hover,
a.deletelink.button:hover,
body.admin a.addlink.button:hover,
body.admin a.changelink.button:hover,
body.admin a.deletelink.button:hover {
    color: #fff !important;
    background-color: #d67d1f !important;
    border-color: #d67d1f !important;
}

/* Garantir que spans e outros elementos dentro de botões tenham texto branco */
.button span,
.button label,
a.button span,
a.button label,
input[type=submit] span,
input[type=submit] label,
body.admin .button span,
body.admin .button label,
body.admin a.button span,
body.admin a.button label,
body.admin input[type=submit] span,
body.admin input[type=submit] label {
    color: #fff !important;
}

