
:root {
    --bg-color: #ffffff;
    --color-red: #e1251b;
    --color-black: #000000;
    --color-cool-gray-11: #4d4f53;
    --color-cool-gray-7: #9a9b9c;
    --color-cool-gray-5: #b2b4b3;
    --color-cool-gray-2: #d5d6d2;
    --color-primary: var(--color-red);
    --color-text: var(--color-cool-gray-11);
    --color-text-muted: var(--color-cool-gray-7);
    --color-border: var(--color-cool-gray-5);
    --color-background: #ffffff;
    --color-error: #e50000;
    --color-success: #26b050;
    --cubic-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.dark-theme {
    --bg-color: #ffffff;
    --color-red: #e1251b;
    --color-black: #000000;
    --color-cool-gray-11: #000000;
    --color-cool-gray-7: #000000;
    --color-cool-gray-5: #ffffff;
    --color-cool-gray-2: #ffffff;
    --color-background: #121212;
    --color-text: var(--color-cool-gray-11);
    --color-text-muted: var(--color-cool-gray-7);
    --color-border: #9a9b9c;
    /*--color-primary: #bb86fc; roxo estilo Material Dark */
    --color-primary: var(--color-red);
    --color-error: #cf6679;
    --color-success: #03dac6;
}


html, body {
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: background-color 0.3s, color 0.3s;
}


a,
.btn-link {
    color: var(--color-primary);
}

.btn-primary {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}


.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--color-primary);
}


.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-error);
}

.validation-message {
    color: var(--color-error);
}


.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3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Y1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: var(--color-cool-gray-7);
}


.page-model {
    min-height: 75vh;
    display: flex;
    align-items: center;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    justify-content: space-around;
    margin-bottom: 0;
    margin-top:0;

    /*flex-direction: column;*/
    min-height: 100vh; /* altura mínima igual à altura da janela */
}
.page-content {
    flex: 1;  ocupa todo o espaço disponível 
    display: flex;
    flex-direction: column;
}

.bi {
    line-height: 1;
    vertical-align: -0.125em;
}

.toggle-btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

    .toggle-btn.on {
        background-color: var(--color-success);
        color: white;
    }

    .toggle-btn.off {
        background-color: var(--color-error);
        color: white;
    }


.switch {
    position: relative;
    display: flex;
    width: 60px;
    height: 28px;
    overflow: hidden;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    background-color: var(--color-cool-gray-5);
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 22px;
        width: 22px;
        left: 1px;
        bottom: 4px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4CAF50;
}

    input:checked + .slider:before {
        transform: translateX(38px);
    }

.slider.round {
    border-radius: 25px;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-black);
    color: white;
    text-align: center;
    padding: 10px 0;
}

.toastify {
    padding: 12px 20px;
    color: white;
    background: linear-gradient( 135deg, var(--color-cool-gray-11), var(--color-black) );
    display: inline-block;
    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);
    position: fixed;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-radius: 12px !important;
    cursor: pointer;
    text-decoration: none;
    max-width: calc(50% - 20px);
    z-index: 2147483647;
    font-size: 16px;
}

    .toastify.on {
        opacity: 1;
    }

.toast-close {
    background: transparent;
    border: 0;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    opacity: 0.4;
    padding: 0 5px;
}

.toastify-right {
    right: 15px;
}

.toastify-left {
    left: 15px;
}

.toastify-top {
    top: -150px;
}

.toastify-bottom {
    bottom: -150px;
}

.toastify-rounded {
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.toastify-avatar {
    width: 1.5em;
    height: 1.5em;
    margin: -7px 5px;
    border-radius: 12px !important;
}

.toastify-center {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    max-width: fit-content;
    max-width: -moz-fit-content;
}

.mini-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

    .mini-nav .nav-link {
        border-radius: 6px;
        padding: .5rem .75rem;
        color: var(--bs-secondary);
    }

        .mini-nav .nav-link.active {
            background-color: var(--bs-primary);
            color: #fff;
        }

        .mini-nav .nav-link:hover {
            background-color: rgba(13, 110, 253, 0.1);
        }

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    max-width: 720px;
    width: 100%;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    animation: authFadeUp 0.35s ease;
}

.auth-card__title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: #1f2937;
}

.auth-card__content {
    flex: 1;
    display: flex;
    justify-content: center;
}

    .auth-card__content > * {
        width: 100%;
        max-width: 420px;
    }

    .auth-card__content section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .auth-card__content form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

.auth-card .form-control {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .auth-card .form-control:focus {
        border-color: var(--color-red);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    }

.auth-card .form-floating > label {
    color: var(--color-cool-gray-11);
    font-size: 0.85rem;
    padding-left: 0.75rem;
}

.auth-card .form-floating > .form-control:focus ~ label,
.auth-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--color-cool-gray-11);
}

.auth-card .btn-primary {
    width: 100%;
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 500;
}

    .auth-card .btn-primary:hover {
        background-color: #b41b16;
        border-color: #b41b16;
        color: white
    }

.auth-card .btn-link {
    padding: 0;
    font-size: 0.85rem;
    align-self: flex-end;
}

.auth-card .btn-primary:hover {
    filter: brightness(0.95);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1rem;
}


.modal-content {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 90vmax;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.2s ease;
}

.modal-sm {
    max-width: 600px;
}

.modal-md {
    max-width: 700px;
}

.modal-lg {
    max-width: 1000px;
}

.modal-xl {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}


.modal-body {
    padding: 1.2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--color-border);
}

.weightMapClearData-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .weightMapClearData-table th,
    .weightMapClearData-table td {
        padding: 8px;
        border-bottom: 1px solid var(--color-border);
        text-align: left;
    }

    .weightMapClearData-table thead {
        background: #f5f5f5;
        font-weight: 600;
    }

.sticky-header th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.full-width {
    width: 100%;
}

.table-container {
    overflow-x: auto;
}

.weightMapReport-table input {
    height: 36px;
    font-size: 0.9rem;
}

.btn-icon {
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-footer {
    display: flex;
    justify-content: center;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

.config-actions {
    display: flex;
    gap: 10px;
}

    .config-actions select {
        flex: 1;
    }

    .config-actions button {
        white-space: nowrap;
    }

.report-container {
    margin-top: 10px;
}

.report-inner {
    font-size: 0.75rem;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.report-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.report-col-left {
    flex: 1;
    min-width: 280px;
}

.report-col-right {
    flex: 2;
    min-width: 400px;
}

.text-blue {
    color: royalblue;
}

.page-break {
    page-break-before: always;
}

.weightMapReport-table {
    width: 100%;
    border-collapse: collapse;
}

    .weightMapReport-table td,
    .weightMapReport-table th {
        border: 1px solid var(--color-border);
        padding: 6px;
        font-size: 0.75rem;
    }

.chart-placeholder {
    height: 500px;
    border: 2px dashed #cfcfcf;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #888;
}

.error-monitor-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
}

.chart-card {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.chart-placeholder {
    height: 420px;
}

.chart-bars {
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

.chart-column {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-value {
    font-weight: bold;
    margin-bottom: 8px;
}

.chart-bar {
    width: 45px;
    background: #0d6efd;
    border-radius: 6px 6px 0 0;
    transition: .3s;
}

    .chart-bar:hover {
        opacity: .8;
    }

.chart-label {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
}


.app-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--cool-gray-2);
    font-family: 'Assistant', sans-serif;
    color: var(--color-cool-gray-8);
}

    .app-footer p {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.2;
        text-align: center;
    }

    .app-footer img {
        max-width: 100%;
        height: 1.2rem;
    }

    .app-footer a {
        color: var(--color-cool-gray-6);
        text-decoration: none;
        margin: 0 0.4rem;
        transition: color 0.2s ease;
    }

        .app-footer a:hover {
            color: var(--color-cool-gray-8);
            text-decoration: underline;
        }

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}




@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@media (max-width: 768px) {

    .modal-content {
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

        .modal-footer .btn {
            width: 100%;
        }
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media (max-width: 768px) {
    .auth-card__content {
        grid-template-columns: 1fr;
    }

    .app-footer {
        padding: 1rem 0.75rem;
        gap: 0.5rem;
    }

        .app-footer p {
            font-size: 0.75rem;
        }

        .app-footer img {
            height: 1rem;
        }

    .footer-links {
        flex-direction: column;
        gap: 0.25rem;
    }

        .footer-links span {
            display: none;
        }

    .app-footer a {
        margin: 0;
    }
}

@media only screen and (max-width: 360px) {
    .toastify-right, .toastify-left {
        margin-left: auto;
        margin-right: auto;
        left: 0;
        right: 0;
        max-width: fit-content;
    }
}

.form-control:focus {
    border-color: red;
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
}



.tooltip .tooltip-arrow {
    /* border-top-color: #007bff;  cor da seta quando o tooltip está em cima */
}

.tooltip-inner {
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.2);
}

.tooltip {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .tooltip.show {
        opacity: 1;
    }

::-ms-reveal {
    border: 1px solid transparent;
    border-radius: 50%;
    box-shadow: 0 0 3px currentColor;
}




@media (min-width: 769px) {

    .footer-links {
        flex-direction: row;
        gap: 0.25rem;
    }

        .footer-links span {
            display: inline;
        }
}
