/* Cores e componentes da app MVC (rateio.css e Index.cshtml) */
:root {
    --mc-red: #EB0203;
    --mc-red-hover: #B60202;
    --mc-red-active: #950102;
    --mc-red-light: #FDF2F2;
    --mc-alert: #DC3228;
    --mc-border: #EBEBEB;
    --mc-muted: #6F7070;
    --mc-label: #a5a5a5;
    --mc-icon: #9FA0A0;
    --mc-time: #000F64;
    --mc-gray-cell: #F5F5F5;
    --mc-ok: rgb(47, 151, 65);
}

html, body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #212529;
    background: #fff;
}

.app-loading {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--mc-muted);
}

    .app-loading img {
        width: 120px;
    }

.app-header {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    border-bottom: 2px solid var(--mc-border);
    box-sizing: border-box;
}

.app-logo {
    width: 73px;
    height: 32px;
}

.app-title {
    font-weight: 700;
    font-size: 16px;
    flex: 1;
}

.language-picker .k-input-inner {
    padding: 4px;
}

.flag {
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    vertical-align: middle;
}

.app-content {
    height: calc(100vh - 72px);
    padding: 18px 14px 8px 18px;
    box-sizing: border-box;
    position: relative;
}

/* Separadores */
.tabs {
    display: flex;
    margin-bottom: 16px;
}

.btn-rat {
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    width: 280px;
    height: 48px;
    color: #212529;
    background-color: #FFFFFF;
    border: 0;
    border-left: 4px solid var(--mc-red);
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

    .btn-rat > i {
        color: var(--mc-icon);
    }

    .btn-rat.active {
        background-color: var(--mc-red);
        color: #FFFFFF;
    }

        .btn-rat.active > i {
            color: #FFFFFF;
        }

/* Barra de ferramentas de cada separador */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding: 16px;
    border: 1px solid var(--mc-border);
    border-bottom: 0;
}

.supplier-name {
    flex: 1;
    min-width: 200px;
}

.time-limit strong {
    color: var(--mc-time);
}

.toolbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .toolbar-date label {
        font-weight: 700;
        color: var(--mc-label);
        white-space: nowrap;
    }

.toolbar-buttons {
    display: flex;
    gap: 12px;
}

/* Botões */
.btn-primario, .btn-secondario, .btn-ok, .btn-cancelar {
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.btn-primario, .btn-secondario {
    width: 120px;
    height: 40px;
}

.btn-ok, .btn-cancelar {
    width: 100px;
    height: 48px;
}

.btn-primario, .btn-ok {
    background: var(--mc-red);
    border: 1px solid var(--mc-red);
    color: #FFFFFF;
}

    .btn-primario:hover, .btn-ok:hover {
        background: var(--mc-red-hover);
    }

    .btn-primario:active, .btn-ok:active {
        background: var(--mc-red-active);
    }

.btn-secondario, .btn-cancelar {
    background: #FFFFFF;
    border: 1px solid var(--mc-red);
    color: var(--mc-red);
}

    .btn-secondario:hover, .btn-cancelar:hover {
        background: var(--mc-red-light);
    }

    .btn-primario:disabled, .btn-secondario:disabled {
        opacity: .6;
        cursor: default;
    }

/* Grelhas */
.app-grid .k-grid-header th {
    background: #FFFFFF;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--mc-muted);
    border-top: 2px solid var(--mc-border);
    border-bottom: 2px solid var(--mc-border);
}

.app-grid .father {
    text-align: center;
}

.app-grid td {
    border-width: 0 0 1px 0 !important;
    vertical-align: middle;
}

.app-grid .k-table-row.k-table-alt-row {
    background-color: #FFFFFF;
}

.app-grid .editable-cell, .app-grid .qty-cell {
    background: var(--mc-gray-cell);
}

.app-grid .inner {
    background: #FFFFFF;
    border: 2px solid var(--mc-border);
    border-radius: 8px;
    padding: 4px 8px;
    text-align: right;
}

.status-ok {
    color: var(--mc-ok);
    font-size: 16px;
}

.status-warn {
    color: var(--mc-alert);
    font-size: 16px;
}

.no-records {
    width: 240px;
    margin: 24px auto;
    display: block;
}

/* Janela de confirmação */
.confirm-dialog {
    min-width: 250px;
    border-radius: 10px;
}

    .confirm-dialog .k-dialog-actions {
        border-top: 1px solid var(--mc-border);
        justify-content: flex-end;
        gap: 12px;
    }

/* Notificações (topo, centradas) */
.app-notification {
    top: 60px !important;
}

    .app-notification .k-notification {
        width: 50vw;
        font-size: 14px;
        padding: 12px 16px;
    }

/* Acesso negado / link inválido */
.access-denied {
    text-align: center;
    padding-top: 48px;
}

    .access-denied h1 {
        font-weight: 800;
        font-size: 24px;
    }

    .access-denied img {
        width: 30%;
        min-width: 300px;
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

@media (max-width: 768px) {
    .btn-rat {
        width: auto;
        flex: 1;
    }

    .app-notification .k-notification {
        width: 90vw;
    }
}
